diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index fbf4b0439..7fdb600ce 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -46,23 +46,16 @@ body: attributes: label: PyMuPDF version options: - - - - 1.24.11 - - 1.24.10 - - 1.24.9 - - 1.24.8 - - 1.24.7 - - 1.24.6 - - 1.24.5 - - 1.24.4 - - 1.24.3 - - 1.24.2 - - 1.24.1 - - 1.24.0 - - 1.23.x or earlier + - 1.26.6 + - 1.26.5 + - 1.26.4 + - 1.26.3 + - 1.26.1 + - 1.26.0 + - 1.25.x or earlier - Built from source description: | - * For example from `pymupdf.VersionBind`. + * For example from `pymupdf.pymupdf_version`. * We generally only look at bugs in the most recent release of PyMuPDF. validations: required: true @@ -90,6 +83,7 @@ body: # Need quotes around `3.10` otherwise it is treated as a number and shows as `3.1`. options: - + - "3.14" - "3.13" - "3.12" - "3.11" diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 9d645cba7..40d29767f 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -7,7 +7,7 @@ on: flavours: description: 'If set, we build separate PyMuPDF and PyMuPDFb wheels.' type: boolean - default: true + default: false sdist: type: boolean @@ -72,8 +72,9 @@ jobs: run: python scripts/gh_release.py - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: sdist-${{ matrix.os }} path: dist/*.tar.gz @@ -155,6 +156,7 @@ jobs: # Upload generated wheels, to be accessible from github Actions page. # - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: wheels-${{ matrix.os }} path: ./wheelhouse/*.whl diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 038c96f1f..1ff2e9591 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -1,7 +1,5 @@ name: "CLA Assistant" on: - issue_comment: - types: [created] pull_request_target: types: [opened,closed,synchronize] diff --git a/.github/workflows/test-valgrind.yml b/.github/workflows/test-valgrind.yml index 090e1936b..244fcb95a 100644 --- a/.github/workflows/test-valgrind.yml +++ b/.github/workflows/test-valgrind.yml @@ -1,29 +1,27 @@ name: Test valgrind on: + workflow_dispatch: schedule: - cron: '13 6 * * *' - workflow_dispatch: - inputs: - scripts_test_options: - description: 'Extra options for scripts/test.py.' jobs: valgrind: - name: Test valgrind - runs-on: ${{ matrix.os }} + name: valgrind + runs-on: ubuntu-latest strategy: matrix: - os: [ubuntu-latest] - + args: [ + '', + '-m "git:--branch master https://github.com/ArtifexSoftware/mupdf"', + '-m "git:--branch 1.26.x https://github.com/ArtifexSoftware/mupdf"', + ] + fail-fast: false + steps: - - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - - - name: test_mupdf-master-branch - env: - PYMUDF_SCRIPTS_TEST_options: ${{inputs.scripts_test_options}} + - name: valgrind run: - python scripts/test.py -m 'git:--recursive --depth 1 --shallow-submodules --branch master https://github.com/ArtifexSoftware/mupdf.git' --valgrind 1 -f 0 -i r buildtest + python scripts/test.py ${{matrix.args}} -P 1 -T valgrind build test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..c7b59c722 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,64 @@ +# Run scripts/test.py directly on multiple Github servers. Instead of +# specifying individual inputs, we support a single string input which is used +# for the command line directly. +# +# This ensures we behave exactly like scripts/test.py, without confusion caused +# by having to translate between differing APIs. + +name: Tests + +on: + #schedule: + # - cron: '47 4 * * *' + #pull_request: + # branches: [main] + workflow_dispatch: + inputs: + args: + type: string + default: '' + description: 'Arguments to pass to scripts/test.py' + +jobs: + + test: + name: Test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-2022, macos-13, macos-14] + + # Avoid cancelling of all runs after a single failure. + fail-fast: false + + steps: + + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + # https://github.com/pypa/cibuildwheel/issues/2114 + # https://cibuildwheel.pypa.io/en/stable/faq/#emulation + # + - name: Set up QEMU + if: runner.os == 'Linux' && runner.arch == 'X64' + uses: docker/setup-qemu-action@v3 + with: + platforms: all + + - name: test + env: + PYMUPDF_test_args: ${{inputs.args}} + run: + python scripts/test.py -a PYMUPDF_test_args + + # Upload generated wheels, to be accessible from github Actions page. + # + - uses: actions/upload-artifact@v4 + with: + path: | + wheelhouse/pymupdf*.whl + wheelhouse/pymupdf*.tar.gz + name: artifact-${{ matrix.os }} diff --git a/.github/workflows/test_multiple.yml b/.github/workflows/test_multiple.yml new file mode 100644 index 000000000..54f09444b --- /dev/null +++ b/.github/workflows/test_multiple.yml @@ -0,0 +1,39 @@ +# Run scripts/test.py on multiple OS's (Windows, Linux, MacOS x64, MacOS arm64) +# and with multiple specifications of MuPDF (PyMuPDF's hard-coded default, +# master branch, release branch). + +name: multiple + +on: + workflow_dispatch: + inputs: + args: + type: string + default: '' + description: 'Additional arguments to scripts/test.py' + schedule: + - cron: '13 6 * * *' + +jobs: + + multiple: + name: multiple + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-2022, macos-13, macos-14] + args: [ + '', + '-m "git:--branch master https://github.com/ArtifexSoftware/mupdf"', + '-m "git:--branch 1.26.x https://github.com/ArtifexSoftware/mupdf"', + ] + fail-fast: false + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: multiple + env: + PYMUPDF_test_args: ${{inputs.args}} + run: + python scripts/test.py ${{matrix.args}} wheel test -a PYMUPDF_test_args diff --git a/.github/workflows/test_mupdf-master-branch.yml b/.github/workflows/test_mupdf-master-branch.yml deleted file mode 100644 index 8d95708d5..000000000 --- a/.github/workflows/test_mupdf-master-branch.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Test mupdf master branch - -on: - schedule: - - cron: '13 6 * * *' - workflow_dispatch: - -jobs: - - test_mupdf_master_branch: - # Build+test current PyMuPDF git with mupdf git master branch. - # - name: Test mupdf master branch - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-2019, macos-latest] - - # Avoid cancelling of all cibuildwheel runs after a single failure. - fail-fast: false - - steps: - - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - - name: test_mupdf-master-branch - env: - inputs_PYMUPDF_SETUP_MUPDF_BUILD: "git:--recursive --depth 1 --shallow-submodules --branch master https://github.com/ArtifexSoftware/mupdf.git" - inputs_flavours: "0" - inputs_sdist: "0" - inputs_wheels_cps: "cp312* cp313*" - inputs_wheels_default: "0" - inputs_wheels_linux_auto: "1" - inputs_wheels_linux_pyodide: "0" - inputs_wheels_macos_auto: "1" - inputs_wheels_windows_auto: "1" - run: - python scripts/gh_release.py diff --git a/.github/workflows/test_mupdf-release-branch.yml b/.github/workflows/test_mupdf-release-branch.yml deleted file mode 100644 index 8df8f727d..000000000 --- a/.github/workflows/test_mupdf-release-branch.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Test mupdf release branch - -on: - - schedule: - - cron: '20 6 * * *' - workflow_dispatch: - -jobs: - - test_mupdf_release_branch: - # Build+test current PyMuPDF git with mupdf git release branch. - # - name: Test mupdf release branch - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-2019, macos-latest] - - # Avoid cancelling of all cibuildwheel runs after a single failure. - fail-fast: false - - steps: - - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - - name: test_mupdf-release-branch - env: - inputs_PYMUPDF_SETUP_MUPDF_BUILD: "git:--recursive --depth 1 --shallow-submodules --branch 1.24.x https://github.com/ArtifexSoftware/mupdf.git" - inputs_flavours: "0" - inputs_sdist: "0" - inputs_wheels_cps: "cp312*" - inputs_wheels_default: "0" - inputs_wheels_linux_auto: "1" - inputs_wheels_linux_pyodide: "0" - inputs_wheels_macos_auto: "1" - inputs_wheels_windows_auto: "1" - run: - python scripts/gh_release.py diff --git a/.github/workflows/test_pyodide.yml b/.github/workflows/test_pyodide.yml index 2273d8fb1..bc1e823ef 100644 --- a/.github/workflows/test_pyodide.yml +++ b/.github/workflows/test_pyodide.yml @@ -1,57 +1,41 @@ -name: Build Pyodide wheel +name: Test pyodide + +# Build and test pyodide wheels using cibuildwheel. on: workflow_dispatch: - inputs: - PYMUPDF_SETUP_MUPDF_BUILD: - description: 'Value for PYMUPDF_SETUP_MUPDF_BUILD, e.g.: git:--branch master https://github.com/ArtifexSoftware/mupdf.git' - type: string - default: 'git:--branch master https://github.com/ArtifexSoftware/mupdf.git' - PYMUPDF_SETUP_PY_LIMITED_API: - type: string - default: '1' - schedule: - cron: '13 5 * * *' jobs: - build_pyodide: - - name: Build pyodide wheel + pyodide: + name: pyodide runs-on: ubuntu-latest - strategy: matrix: - # 2023-12-22: Python-3.12 is known to fail, due to setuptools trying to - # import distutils. - python-version: ["3.11"] - - # Avoid cancelling of all runs after a single failure. + # 2025-09-05: We don't test with default mupdf because mupdf-1.26.7 + # does not have the required pyodide rpath changes. + args: [ + # '', + '-m "git:--branch master https://github.com/ArtifexSoftware/mupdf"', + '-m "git:--branch 1.26.x https://github.com/ArtifexSoftware/mupdf"', + ] fail-fast: false steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} - - - name: build_pyodide_wheel - env: - inputs_sdist: 0 - inputs_PYMUPDF_SETUP_MUPDF_BUILD: ${{inputs.PYMUPDF_SETUP_MUPDF_BUILD}} - PYMUPDF_SETUP_PY_LIMITED_API: ${{inputs.PYMUPDF_SETUP_PY_LIMITED_API}} - inputs_wheels_default: 0 - inputs_wheels_linux_pyodide: 1 + python-version: 3.12 + + - name: pyodide run: - python scripts/gh_release.py build - - - # Upload generated wheels, to be accessible from github Actions page. - # - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse/*.whl + python scripts/test.py ${{matrix.args}} --cibw-pyodide 1 cibw + + # We do not use upload-artifact@v4 because it fails due to us creating + # identically-named wheels. + #- uses: actions/upload-artifact@v4 + # with: + # path: ./wheelhouse/*.whl diff --git a/.github/workflows/test_quick.yml b/.github/workflows/test_quick.yml index 5040cf746..e07aadf35 100644 --- a/.github/workflows/test_quick.yml +++ b/.github/workflows/test_quick.yml @@ -1,40 +1,46 @@ -name: Test quick +name: test_quick on: pull_request: branches: [main] workflow_dispatch: + inputs: + args: + type: string + default: '' + description: 'Additional arguments to scripts/test.py' jobs: - test_quick: - name: Test quick + master: + name: mupdf master runs-on: ${{ matrix.os }} strategy: matrix: - # We test on just Ubuntu with MuPDF master. - # os: [ubuntu-latest] - - # Avoid cancelling of all cibuildwheel runs after a single failure. fail-fast: false - steps: - - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - - - name: test_quick + - name: mupdf master + env: + PYMUPDF_test_args: ${{inputs.args}} + run: + python scripts/test.py build test -m 'git:--branch master https://github.com/ArtifexSoftware/mupdf.git' -a PYMUPDF_test_args + release: + name: mupdf release + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + fail-fast: false + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: mupdf release env: - inputs_PYMUPDF_SETUP_MUPDF_BUILD: "git:--recursive --depth 1 --shallow-submodules --branch master https://github.com/ArtifexSoftware/mupdf.git" - inputs_flavours: "0" - inputs_sdist: "0" - inputs_wheels_cps: "cp312*" - inputs_wheels_default: "0" - inputs_wheels_linux_auto: "1" - inputs_wheels_macos_auto: "1" - inputs_wheels_windows_auto: "1" + PYMUPDF_test_args: ${{inputs.args}} run: - python scripts/gh_release.py + python scripts/test.py build test -m 'git:--branch 1.26.x https://github.com/ArtifexSoftware/mupdf.git' -a PYMUPDF_test_args diff --git a/.github/workflows/test_sysinstall.yml b/.github/workflows/test_sysinstall.yml index 77c876923..a913de748 100644 --- a/.github/workflows/test_sysinstall.yml +++ b/.github/workflows/test_sysinstall.yml @@ -4,6 +4,9 @@ on: schedule: - cron: '13 4 * * *' workflow_dispatch: + inputs: + args: + description: 'Extra args for scripts/sysinstall.py.' jobs: @@ -31,12 +34,17 @@ jobs: # # sees `--venv` and defers to a venv, so we currently have to force use of python 3.11. # python-version: '3.11' + - name: sysinstall_venv + env: + PYMUDF_SCRIPTS_SYSINSTALL_ARGS_POST: ${{inputs.args}} run: # Use venv. - python3 scripts/sysinstall.py --root / --mupdf-git '--branch master https://github.com/ArtifexSoftware/mupdf.git' + python3 scripts/sysinstall.py --mupdf-git '--branch master https://github.com/ArtifexSoftware/mupdf.git' - name: sysinstall_sudo + env: + PYMUDF_SCRIPTS_SYSINSTALL_ARGS_POST: ${{inputs.args}} run: # Do not use a venv, instead install required packages with sudo. - python3 scripts/sysinstall.py --pip sudo --root / --mupdf-git '--branch master https://github.com/ArtifexSoftware/mupdf-julian.git' + python3 scripts/sysinstall.py --mupdf-git '--branch master https://github.com/ArtifexSoftware/mupdf.git' --pip sudo --root / diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 7e016e478..d20a78bb1 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -20,8 +20,7 @@ sphinx: configuration: docs/conf.py # If using Sphinx, optionally build your docs in additional formats such as PDF -formats: - - pdf +formats: all # Optionally declare the Python requirements required to build your docs python: diff --git a/README.md b/README.md index b9f99949d..4bc792175 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Join us on **Discord** here: [#pymupdf](https://discord.gg/TSpYGBW4eq) # Installation -**PyMuPDF** requires **Python 3.9 or later**, install using **pip** with: +**PyMuPDF** requires **Python 3.10 or later**, install using **pip** with: `pip install PyMuPDF` diff --git a/changes.txt b/changes.txt index dbb06b57d..970a75baf 100644 --- a/changes.txt +++ b/changes.txt @@ -2,6 +2,307 @@ Change Log ========== +**Changes in version 1.26.6** + +* Use MuPDF-1.26.11. + +* Supported Python versions are now 3.10-3.14. + +* Fixed issues: + + * **Fixed** `4699 `_: cannot find ExtGState resource + * **Fixed** `4712 `_: Crash with "corrupted double-linked list" + * **Fixed** `4720 `_: Memory leaking in rewrite_images? + * **Fixed** `4742 `_: 'Rect' object has no attribute 'get_area' + * **Fixed** `4746 `_: Document.__init__() got an unexpected keyword argument 'encoding' + + +**Changes in version 1.26.5** (2025-10-10) + +* Use MuPDF-1.26.10. + +* Fixed issues: + + * **Fixed** `2883 `_: Improve the Python type annotations for fitz_new + * **Fixed** `4507 `_: Bugs in pyodide + * **Fixed** `4613 `_: Thai and number blocks are not auto-scaled and get wrong hyphen when using in insert_htmlbox + * **Fixed** `4700 `_: pymupdf.open() processes .zip file without raising + * **Fixed** `4716 `_: Problems with unreadable characters + +* Other: + + * Supported Python versions are now 3.9-3.14. + * We now define all class methods explicitly instead of with dynamic assignment; this improves type hints. + * Removed `pymupdf.utils.Shape` class, was duplicate of `pymupdf.Shape`. + * Allow use of cibuildwheel to build and test on Pyodide. + * Fixed various Pyodide bugs. + * In documentation, added section about Linux wheels and glibc compatibility. + * Improved documentation of pymupdf.open()'s arg. + * Retrospectively mark `4544 `_ as fixed in 1.26.4. + + +**Changes in version 1.26.4 (2025-08-25)** + +* Use MuPDF-1.26.7. + +* Fixed issues: + + * **Fixed** `3806 `_: pdf to image rendering ignore optional content offs + * **Fixed** `4388 `_: Incorrect PixMap from page due to cached data from other PDF + * **Fixed** `4457 `_: Wrong characters displayed after font subsetting (w/ native method) + * **Fixed** `4462 `_: delete_pages() does not accept a single int + * **Fixed** `4533 `_: Open PDF error segmentation fault + * **Fixed** `4544 `_: About pdf_clip_page + * **Fixed** `4565 `_: MacOS uses Tesseract and not Tesseract-OCR + * **Fixed** `4571 `_: Broken merged pdfs. + * **Fixed** `4590 `_: TypeError in utils.py scrub(): annot.update_file(buffer=...) is invalid + * **Fixed** `4614 `_: Intercept bad widgets when inserting to another PDF + * **Fixed** `4639 `_: pymupdf.mupdf.FzErrorGeneric: code=1: Director error: : 'JM_new_bbox_device_Device' object has no attribute 'layer_name' + +* Other: + + * Check that #4392 `Segfault when running with pytest and -Werror` is fixed if PyMuPDF is built with swig>=4.4. + * Add `Page.clip_to_rect()`. + * Improved search for Tesseract data. + * Retrospectively mark #4496 as fixed in 1.26.1. + * Retrospectively mark #4503 as fixed in 1.26.3. + * Added experimental support for Graal. + + +**Changes in version 1.26.3 (2025-07-02)** + +* Use MuPDF-1.26.3. + +* Fixed issues: + + * **Fixed** `4462 `_: delete_pages() does not accept a single int + * **Fixed** `4503 `_: Undetected character styles + * **Fixed** `4527 `_: Rect.intersects() is much slower than necessary + * **Fixed** `4564 `_: Possible encoding issue in PDF metadata + * **Fixed** `4575 `_: Bug with IRect contains method + +* Other: + + * Class Shape is now available as pymupdf.Shape. + * Added table cell markdown support. + + +**Changes in version 1.26.2** + +[Skipped.] + + +**Changes in version 1.26.1 (2025-06-11)** + +* Use MuPDF-1.26.2. + +* Fixed issues: + + * **Fixed** `4520 `_: show_pdf_page does not like empty pages created by new_page + * **Fixed** `4524 `_: fitz.get_text ignores 'pages' kwarg + * **Fixed** `4412 `_: Regression? Spurious error? in insert_pdf in v1.25.4 + * **Fixed** `4496 `_: pymupdf4llm with pymupdfpro + +* Other: + + * Partial fix for `4503 `_: Undetected character styles + * New method `Document.rewrite_images()`, useful for reducing file size, changing image formats, or converting color spaces. + * `Page.get_text()`: restrict positional args to match docs. + * Removed bogus definition of class `Shape`. + * Removed release date from module, docs and changelog. + * `pymupdf.pymupdf_date` and `pymupdf.VersionDate` are now both None. + * They will be removed in a future release. + + +**Changes in version 1.26.0 (2025-05-22)** + +* Use MuPDF-1.26.1. + +* Fixed issues: + + * **Fixed** `4324 `_: cluster_drawings() fails to cluster horizontal and vertical thin lines + * **Fixed** `4363 `_: Trouble with searching + * **Fixed** `4404 `_: IndexError in page.get_links() + * **Fixed** `4412 `_: Regression? Spurious error? in insert_pdf in v1.25.4 + * **Fixed** `4423 `_: pymupdf.mupdf.FzErrorFormat: code=7: cannot find object in xref error encountered after version 1.25.3 + * **Fixed** `4435 `_: get_pixmap method stuck on one page + * **Fixed** `4439 `_: New Xml class from data does not work - bug in code + * **Fixed** `4445 `_: Broken XREF table incorrectly repaired + * **Fixed** `4447 `_: Stroke color of annotations cannot be correctly set + * **Fixed** `4479 `_: set_layer_ui_config() toggles all layers rather than just one + * **Fixed** `4505 `_: Follow Widget flag values up its parent structure + +* Other: + + * Partial fixed for `4457 `_: Wrong characters displayed after font subsetting (w/ native method) + * Support image stamp annotations. + * Support recoloring pages. + * Added example of using Django's file storage API to open files with pymupdf. + * Clarified FreeText annotation color options. + We now raise an exception if an attempt is made to set attributes that can not be supported. + * Fixed potential segv in Pixmap.is_unicolor(). + * Added runtime assert that that PyMuPDF and MuPDF were built with compatible + NDEBUG settings (related to `4390 `_). + * Simplified handling of filename/filetype when opening documents. + * Removed PDF linearization support. + * Calls to `Document.save()` with `linear` set to true will now raise an exception. + * See https://artifex.com/blog/mupdf-removes-linearisation for more information. + +**Changes in version 1.25.5 (2025-03-31)** + +* Fixed issues: + + * **Fixed** `4372 `_: Text insertion fails due to missing /Resources object + * **Fixed** `4400 `_: Infinite loop in fill_textbox + * **Fixed** `4403 `_: Unable to get_text() - layer/clip nesting too deep + * **Fixed** `4415 `_: PDF page is mirrored, origin is at bottom-left + +* Other: + + * Use MuPDF-1.25.6. + * Fixed MuPDF SEGV on MacOS with particular fonts. + * Fixed `Annot.get_textpage()`'s `clip` arg. + * Fixed Python-3.14 (pre-release) build error. + + +**Changes in version 1.25.4 (2025-03-14)** + +* Use MuPDF-1.25.5. + +* Fixed issues: + + * **Fixed** `4079 `_: Unexpected result for apply_redactions() + * **Fixed** `4224 `_: MuPDF error: format error: negative code in 1d faxd + * **Fixed** `4303 `_: page.get_image_info() returns outdated cached results after replacing image + * **Fixed** `4309 `_: FzErrorFormat Error When Deleting First Page + * **Fixed** `4336 `_: Major Performance Regression: pix.color_count is 150x slower in version 1.25.3 compared to 1.23.8 + * **Fixed** `4341 `_: Invalid label retrieval when /Kids is an array of multiple /Nums + +* Other: + + * Fixed handling of duplicate widget names when joining PDFs (PR #4347). + * Improved Pyodide build. + * Avoid SWIG-related build errors with Python-3.13 by disabling PY_LIMITED_API. + + +**Changes in version 1.25.3 (2025-02-06)** + +* Use MuPDF-1.25.4. + +* Fixed issues: + + * **Fixed** `4139 `_: Text color numbers change between 1.24.14 and 1.25.0 + * **Fixed** `4141 `_: Some insertion methods fails for pages without a /Resources object + * **Fixed** `4180 `_: Search problems + * **Fixed** `4182 `_: Text coordinate extraction error + * **Fixed** `4245 `_: Highlighting issue distorted on recent versions + * **Fixed** `4254 `_: add_freetext_annot is drawing text outside the annotation box + +* Other: + + * In annotations: + * Added support for subtype FreeTextCallout. + * Added support for rich text. + * Added miter_limit arg to insert_text*() to allow suppression of spikes caused by long miters. + * Add Widget Support to `Document.insert_pdf()`. + * Add `bibi` to span dicts. + * Add `synthetic' to char dict. + * Fixed Pyodide builds. + + +**Changes in version 1.25.2 (2025-01-17)** + +* Fixed issues: + + * **Fixed** `4055 `_: "Yes" for all checkboxes does not work for all PDF rendering engines. + * **Fixed** `4155 `_: samples_mv is unsafe + * **Fixed** `4162 `_: Got AttributeError, when tried to add Signature field + * **Fixed** `4186 `_: Incorrect handling of JPEG with color space CMYK image extraction + * **Fixed** `4195 `_: Pixmaps that are inverted and have an alpha channel are not rendered properly + * **Fixed** `4225 `_: pixmap.pil_save() fails due to colorspace definition + * **Fixed** `4232 `_: Incorrect Font style and Size + +* Other: + + * Use Python's built-in glyphname <> unicode conversion. + * Improve speed of pixmap color inversion. + * Add new `char_flags` member to span dictionary, for example allows detection of invisible text. + * Detect image masks in TextPage output. + * Added `Pixmap.pil_image()`. + + +**Changes in version 1.25.1 (2024-12-11)** + +* Use MuPDF-1.25.2. + +* Fixed issues: + + * **Fixed** `4125 `_: memory leak while convert Pixmap's colorspace + * **Fixed** `4034 `_: Possible regression in pdf cleaning during save. + + +**Changes in version 1.25.0 (2024-12-05)** + +* Use MuPDF-1.25.1. + +* Fixed issues: + + * **Fixed** `4026 `_: page.get_text('blocks') output two piece of very similar text with different bbox + * **Fixed** `4004 `_: Segmentation Fault When Updating PDF Form Field Value + * **Fixed** `3887 `_: Subset Fonts problem using Fallback Font + * **Fixed** `3886 `_: Another issue with destroying PDF when inserting html + * **Fixed** `3751 `_: apply_redactions causes part of the page content to be hidden / transparent + + +.. codespell:ignore-begin + +**Changes in version 1.24.14 (2024-11-19)** + +* Use MuPDF-1.24.11. + +* Fixed issues: + + * **Fixed** `3448 `_: get_pixmap function removes the table and leaves just the content behind + * **Fixed** `3758 `_: Got "malloc(): unaligned tcache chunk detected Aborted (core dumped)" while using add_redact_annot/apply_redactions + * **Fixed** `3813 `_: Stories: Ordered list count broken with nested unordered list + * **Fixed** `3933 `_: font.valid_codepoints() - malfunction + * **Fixed** `4018 `_: PyMuPDF hangs when iterating over zero page PDF pages backwards + * **Fixed** `4043 `_: fullcopypage bug + * **Fixed** `4047 `_: Segmentation Fault in add_redact_annot + * **Fixed** `4050 `_: Content of dict returned by doc.embfile_info() does not fit to documentation + +* Other: + + * Ensure that words from `Page.get_text()` never contain RTL/LTR char mixtures. + * Fix building with system MuPDF. + * Add dot product for points and vectors. + + +**Changes in version 1.24.13 (2024-10-29)** + +* Fixed issues: + + * **Fixed** `3848 `_: Piximap program crash + * **Fixed** `3950 `_: Unable to consistently extract field labels from PDFs + * **Fixed** `3981 `_: PyMuPDF 1.24.12 with pyinstaller throws error. + * **Fixed** `3994 `_: pix.color_topusage raise Segmentation fault (core dumped) + + +**Changes in version 1.24.12 (2024-10-21)** + +* Fixed issues: + + * **Fixed** `3914 `_: Ability to print MuPDF errors to logging instead of stdout + * **Fixed** `3916 `_: insert_htmlbox error: int too large to convert to float + * **Fixed** `3950 `_: Unable to consistently extract field labels from PDFs + +* Supported Python versions are now 3.9-3.13. + + * Dropped support for Python-3.8 because end-of-life. + * Added support for Python-3.13 because now released. + * See: https://devguide.python.org/versions/ + + **Changes in version 1.24.11 (2024-10-03)** * Use MuPDF-1.24.10. @@ -2511,3 +2812,5 @@ Changes in version 1.9.1 compared to version 1.8.0 are the following: * Incremental saves for changes are possible now using the call pattern *doc.save(doc.name, incremental=True)*. * A PDF's metadata can now be deleted, set or changed by document method *set_metadata()*. Supports incremental saves. * A PDF's bookmarks (or table of contents) can now be deleted, set or changed with the entries of a list using document method *set_toc(list)*. Supports incremental saves. + +.. codespell:ignore-end diff --git a/docs/README.md b/docs/README.md index db99ec74c..438469d34 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,6 +12,13 @@ This README assumes you have [Sphinx v5.0.2 installed](https://www.sphinx-doc.or Within `docs` update the associated restructured text (`.rst`) files. These files represent the corresponding document pages. +### Conventions + +- Code parameters and referenced code objects should be referenced within backticks, not italics, double backtick is better for safety +- When referencing names of some of our products surround with | , e.g. |PyMuPDF| , not PyMuPDF, see `header.rst` for products names listing +- When hyperlinking, avoid inline hyperlinks and try to references link from common location at page bottom, also avoid the use of "here" or "click here" as this provides little information about the link content. e.g. + +"`Click here ` for our Story class". Should be re-written to something more like "Find out more `on our Story class `" ## Building HTML documentation diff --git a/docs/_static/forum-logo-wink.png b/docs/_static/forum-logo-wink.png new file mode 100644 index 000000000..20bc16b70 Binary files /dev/null and b/docs/_static/forum-logo-wink.png differ diff --git a/docs/_static/forum-logo.gif b/docs/_static/forum-logo.gif new file mode 100644 index 000000000..ba9ebd146 Binary files /dev/null and b/docs/_static/forum-logo.gif differ diff --git a/docs/_static/pymupdf-console.html b/docs/_static/pymupdf-console.html deleted file mode 100644 index e2502aae6..000000000 --- a/docs/_static/pymupdf-console.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - - - - - -
- - - diff --git a/docs/about-feature-matrix.rst b/docs/about-feature-matrix.rst index b826a0e8b..793ea633f 100644 --- a/docs/about-feature-matrix.rst +++ b/docs/about-feature-matrix.rst @@ -448,7 +448,7 @@ PDF Page Labels - + Read-only diff --git a/docs/about-performance.rst b/docs/about-performance.rst index aece181ca..d89ed1f1b 100644 --- a/docs/about-performance.rst +++ b/docs/about-performance.rst @@ -316,7 +316,7 @@
fastest
-
+
slowest
diff --git a/docs/about.rst b/docs/about.rst index 0f4f86546..c6649689d 100644 --- a/docs/about.rst +++ b/docs/about.rst @@ -80,6 +80,21 @@ Here are current results, grouped by task: For more detail regarding the methodology for these performance timings see: :ref:`Performance Comparison Methodology`. + + +Architecture +---------------------- + + +|PyMuPDF| follows a four-layer system architecture with clear separation between components: + +- **Python API Layer** - User-facing classes and functions +- **Python Wrapper Layer** - High-level abstractions and utilities +- **Binding Layer** - SWIG-generated Python-C bridges +- **MuPDF Core Layer** - Native C/C++ implementation + +.. include:: version.rst + .. _About_License: License and Copyright @@ -87,7 +102,7 @@ License and Copyright -|PyMuPDF| and :title:`MuPDF` are now available under both, open-source :title:`AGPL` and commercial license agreements. Please read the full text of the :title:`AGPL` license agreement, available in the distribution material (file COPYING) and `here `_, to ensure that your use case complies with the guidelines of the license. If you determine you cannot meet the requirements of the :title:`AGPL`, please contact `Artifex `_ for more information regarding a commercial license. +|PyMuPDF| and |MuPDF| are now available under both, open-source |AGPL| and commercial license agreements. Please read the full text of the |AGPL| license agreement, available in the distribution material (file COPYING) and `on the GNU license page `_, to ensure that your use case complies with the guidelines of the license. If you determine you cannot meet the requirements of the |AGPL|, please contact `Artifex `_ for more information regarding a commercial license. .. raw:: html @@ -110,6 +125,7 @@ License and Copyright :title:`Artifex`, the :title:`Artifex` logo, :title:`MuPDF`, and the :title:`MuPDF` logo are registered trademarks of :title:`Artifex Software Inc.` -.. include:: version.rst + + .. include:: footer.rst diff --git a/docs/algebra.rst b/docs/algebra.rst index 97f9079d5..9fcde7812 100644 --- a/docs/algebra.rst +++ b/docs/algebra.rst @@ -19,18 +19,18 @@ General Remarks ----------------- 1. Operators can be either **binary** (i.e. involving two objects) or **unary**. -2. The resulting type of **binary** operations is either a **new object of the left operand's class** or a bool. +2. The resulting type of **binary** operations is either a **new object of the left operand's class,** a bool or (for dot products) a float. 3. The result of **unary** operations is either a **new object** of the same class, a bool or a float. -4. The binary operators *+, -, *, /* are defined for all classes. They *roughly* do what you would expect -- **except, that the second operand ...** +4. The binary operators `+, -, *, /` are defined for all classes. They *roughly* do what you would expect -- **except, that the second operand ...** - may always be a number which then performs the operation on every component of the first one, - may always be a numeric sequence of the same length (2, 4 or 6) -- we call such sequences :data:`point_like`, :data:`rect_like`, :data:`quad_like` or :data:`matrix_like`, respectively. -5. Rectangles support additional binary operations: **intersection** (operator *"&"*), **union** (operator *"|"*) and **containment** checking. +5. Rectangles support **additional binary** operations: **intersection** (operator `"&"`), **union** (operator `"|"`) and **containment** checking. -6. Binary operators fully support in-place operations, so expressions like `a /= b` are valid if b is numeric or "a_like". +6. Binary operators fully support in-place operations. So if "°" is a binary operator then the expression `a °= b` is always valid and the same as `a = a ° b`. Therefore, be careful and do **not** do `p1 *= p2` for two points, because thereafter "p1" is a **float**. Unary Operations @@ -50,17 +50,21 @@ Oper. Result Binary Operations ------------------ -For every geometry object "a" and every number "b", the operations "a ° b" and "a °= b" are always defined for the operators *+, -, *, /*. The respective operation is simply executed for each component of "a". If the **second operand is not a number**, then the following is defined: +These are expressions like `a ° b` where "°" is any of the operators `+, -, *, /`. Also binary operations are expressions of the form `a == b` and `b in a`. -========= ======================================================================= +If "b" is a number, then the respective operation is executed for each component of "a". Otherwise, if "b" is **not a number,** then the following happens: + + +========= =========================================================================== Oper. Result -========= ======================================================================= +========= =========================================================================== a+b, a-b component-wise execution, "b" must be "a-like". -a*m, a/m "a" can be a point, rectangle or matrix, but "m" must be +a*m, a/m "a" can be a point, rectangle or matrix and "m" is a :data:`matrix_like`. *"a/m"* is treated as *"a*~m"* (see note below for non-invertible matrices). If "a" is a **point** or a **rectangle**, then *"a.transform(m)"* is executed. If "a" is a matrix, then matrix concatenation takes place. +a*b returns the **vector dot product** for a point "a" and point-like "b". a&b **intersection rectangle:** "a" must be a rectangle and "b" :data:`rect_like`. Delivers the **largest rectangle** contained in both operands. @@ -70,8 +74,8 @@ a|b **union rectangle:** "a" must be a rectangle, and "b" may be b in a if "b" is a number, then `b in tuple(a)` is returned. If "b" is :data:`point_like`, :data:`rect_like` or :data:`quad_like`, then "a" must be a rectangle, and `a.contains(b)` is returned. -a == b *True* if *bool(a-b)* is *False* ("b" may be "a-like"). -========= ======================================================================= +a == b ``True`` if *bool(a-b)* is ``False`` ("b" may be "a-like"). +========= =========================================================================== .. note:: Please note an important difference to usual arithmetic: @@ -118,6 +122,29 @@ The following will deliver the **middle point of a line** that connects two poin Point(2356.0, 1571.5) >>> +Compute the **vector dot product** of two points. You can compute the **cosine of angles** and check orthogonality. + + >>> p1 = pymupdf.Point(1, 0) + >>> p2 = pymupdf.Point(1, 1) + >>> dot = p1 * p2 + >>> dot + 1.0 + + >>> # compute the cosine of the angle between p1 and p2: + >>> cosine = dot / (abs(p1) * abs(p2)) + >>> cosine # cosine of 45 degrees + 0.7071067811865475 + + >>> math.cos(mat.radians(45)) # verify: + 0.7071067811865476 + + >>> # check orhogonality + >>> p3 = pymupdf.Point(0, 1) + >>> # p1 and p3 are orthogonal so, as expected: + >>> p1 * p3 + 0.0 + + Manipulation with "like" Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/annot.rst b/docs/annot.rst index ac8eea942..35a5a6b04 100644 --- a/docs/annot.rst +++ b/docs/annot.rst @@ -8,7 +8,9 @@ Annot |pdf_only_class| -Quote from the :ref:`AdobeManual`: "An annotation associates an object such as a note, sound, or movie with a location on a page of a PDF document, or provides a way to interact with the user by means of the mouse and keyboard." +Quote from the :ref:`AdobeManual`: + + *"An annotation associates an object such as a note, sound, or movie with a location on a page of a PDF document, or provides a way to interact with the user by means of the mouse and keyboard."* There is a parent-child relationship between an annotation and its page. If the page object becomes unusable (closed document, any document structure change, etc.), then so does every of its existing annotation objects -- an exception is raised saying that the object is "orphaned", whenever an annotation property or method is accessed. @@ -22,6 +24,7 @@ There is a parent-child relationship between an annotation and its page. If the :meth:`Annot.get_sound` get the sound of an audio annotation :meth:`Annot.get_text` extract annotation text :meth:`Annot.get_textbox` extract annotation text +:meth:`Annot.get_textpage` create a TextPage for the annotation :meth:`Annot.set_border` set annotation's border properties :meth:`Annot.set_blendmode` set annotation's blend mode :meth:`Annot.set_colors` set annotation's colors @@ -77,10 +80,10 @@ There is a parent-child relationship between an annotation and its page. If the :arg int dpi: (new in v1.19.2) desired resolution in dots per inch. If not `None`, the matrix parameter is ignored. - :arg colorspace: a colorspace to be used for image creation. Default is *pymupdf.csRGB*. + :arg colorspace: a colorspace to be used for image creation. Default is ``pymupdf.csRGB``. :type colorspace: :ref:`Colorspace` - :arg bool alpha: whether to include transparency information. Default is *False*. + :arg bool alpha: whether to include transparency information. Default is ``False``. :rtype: :ref:`Pixmap` @@ -88,7 +91,7 @@ There is a parent-child relationship between an annotation and its page. If the * If the annotation has just been created or modified, you should :meth:`Document.reload_page` the page first via `page = doc.reload_page(page)`. - * The pixmap will have *"premultiplied"* pixels if `alpha=True`. To learn about some background, e.g. look for "Premultiplied alpha" `here `_. + * The pixmap will have *"premultiplied"* pixels if `alpha=True`. To learn about some background, e.g. look for "Premultiplied alpha" `in this online glossary `_. .. index:: @@ -134,11 +137,27 @@ There is a parent-child relationship between an annotation and its page. If the :arg rect-like rect: the area to consider, defaults to :attr:`Annot.rect`. + .. method:: get_textpage(clip=None, flags=3) + + Create a :ref:`TextPage` for the annotation. + + :arg int flags: indicator bits controlling the content available for subsequent text extractions and searches -- see the parameter of :meth:`Annot.get_text`. + + :arg rect-like clip: restrict extracted text to this area. + + :returns: :ref:`TextPage` + + |history_begin| + + * v1.25.5: fixed `clip` arg. + + |history_end| + .. method:: set_info(info=None, content=None, title=None, creationDate=None, modDate=None, subject=None) * Changed in version 1.16.10 - Changes annotation properties. These include dates, contents, subject and author (title). Changes for *name* and *id* will be ignored. The update happens selectively: To leave a property unchanged, set it to *None*. To delete existing data, use an empty string. + Changes annotation properties. These include dates, contents, subject and author (title). Changes for *name* and *id* will be ignored. The update happens selectively: To leave a property unchanged, set it to ``None``. To delete existing data, use an empty string. :arg dict info: a dictionary compatible with the *info* property (see below). All entries must be strings. If this argument is not a dictionary, the other arguments are used instead -- else they are ignored. :arg str content: *(new in v1.16.10)* see description in :attr:`info`. @@ -153,8 +172,7 @@ There is a parent-child relationship between an annotation and its page. If the .. note:: - * While 'FreeText', 'Line', 'PolyLine', and 'Polygon' annotations can have these properties, (Py-) MuPDF does not support line ends for 'FreeText', because the call-out variant of it is not supported. - * *(Changed in v1.16.16)* Some symbols have an interior area (diamonds, circles, squares, etc.). By default, these areas are filled with the fill color of the annotation. If this is *None*, then white is chosen. The *fill_color* argument of :meth:`Annot.update` can now be used to override this and give line end symbols their own fill color. + * Some symbols have an interior area (diamonds, circles, squares, etc.). These areas are filled with the fill color or the stroke color, depending on the annotation type. :arg int start: The symbol number for the first point. :arg int end: The symbol number for the last point. @@ -221,7 +239,7 @@ There is a parent-child relationship between an annotation and its page. If the The annotation's blend mode. See :ref:`AdobeManual`, page 324 for explanations. :rtype: str - :returns: the blend mode or *None*. + :returns: the blend mode or ``None``. .. method:: set_blendmode(blendmode) @@ -288,15 +306,13 @@ There is a parent-child relationship between an annotation and its page. If the .. method:: set_colors(colors=None, stroke=None, fill=None) - * Changed in version 1.16.9: Allow colors to be directly set. These parameters are used if *colors* is not a dictionary. - - Changes the "stroke" and "fill" colors for supported annotation types -- not all annotations accept both. + Changes the "stroke" and "fill" colors for supported annotation types -- not all annotation types accept both. **Do not use this method at all for FreeText annotations** because it has its special conventions to deal with up to three colors (border, fill, text). :arg dict colors: a dictionary containing color specifications. For accepted dictionary keys and values see below. The most practical way should be to first make a copy of the *colors* property and then modify this dictionary as required. :arg sequence stroke: see above. :arg sequence fill: see above. - *Changed in v1.18.5:* To completely remove a color specification, use an empty sequence like `[]`. If you specify `None`, an existing specification will not be changed. + To completely remove a color specification, use an empty sequence like `[]`. If you specify `None`, an existing specification will not be changed. .. method:: delete_responses() @@ -332,20 +348,26 @@ There is a parent-child relationship between an annotation and its page. If the Color specifications may be made in the usual format used in PuMuPDF as sequences of floats ranging from 0.0 to 1.0 (including both). The sequence length must be 1, 3 or 4 (supporting GRAY, RGB and CMYK colorspaces respectively). For GRAY, just a float is also acceptable. :arg float opacity: *(new in v1.16.14)* **valid for all annotation types:** change or set the annotation's transparency. Valid values are *0 <= opacity < 1*. + :arg str blend_mode: *(new in v1.16.14)* **valid for all annotation types:** change or set the annotation's blend mode. For valid values see :ref:`BlendModes`. + :arg float fontsize: change :data:`fontsize` of the text. 'FreeText' annotations only. - :arg sequence,float text_color: change the text color. 'FreeText' annotations only. - :arg sequence,float border_color: change the border color. 'FreeText' annotations only. + + :arg sequence,float text_color: change the text color. 'FreeText' annotations only. This has the same effect as ``border_color``. Note that the text color of rich-text annotations cannot be changed at all because it is set by HTML / CSS syntax and part of the text itself. + + :arg sequence,float border_color: change the border color. 'FreeText' annotations only. This has the same effect as ``text_color``. + :arg sequence,float fill_color: the fill color. - * 'Line', 'Polyline', 'Polygon' annotations: use it to give applicable line end symbols a fill color other than that of the annotation *(changed in v1.16.16)*. + :arg bool cross_out: *(new in v1.17.2)* add two diagonal lines to the annotation rectangle. 'Redact' annotations only. If not desired, ``False`` must be specified even if the annotation was created with ``False``. - :arg bool cross_out: *(new in v1.17.2)* add two diagonal lines to the annotation rectangle. 'Redact' annotations only. If not desired, *False* must be specified even if the annotation was created with *False*. :arg int rotate: new rotation value. Default (-1) means no change. Supports 'FreeText' and several other annotation types (see :meth:`Annot.set_rotation`), [#f1]_. Only choose 0, 90, 180, or 270 degrees for 'FreeText'. Otherwise any integer is acceptable. :rtype: bool - .. note:: Using this method inside a :meth:`Page.annots` loop is **not recommended!** This is because most annotation updates require the owning page to be reloaded -- which cannot be done inside this loop. Please use the example coding pattern given in the documentation of this generator. + This method is the only way to change the colors of a FreeText annotation. You cannot use :meth:`Annot.set_colors` for this purpose. But be aware that for rich-text annotations, the text color is never changed. The text color is set by the ``text_color`` entry of the ``info`` dictionary. This is a limitation of |MuPDF| and not a bug. + + .. caution:: Using this method inside a :meth:`Page.annots` loop is **not recommended!** This is because most annotation updates require the owning page to be reloaded -- which cannot be done inside this loop. Please use the example coding pattern given in the documentation of this generator. .. attribute:: file_info @@ -353,7 +375,7 @@ There is a parent-child relationship between an annotation and its page. If the Basic information of the annot's attached file. :rtype: dict - :returns: a dictionary with keys *filename*, *ufilename*, *desc* (description), *size* (uncompressed file size), *length* (compressed length) for FileAttachment annot types, else *None*. + :returns: a dictionary with keys *filename*, *ufilename*, *desc* (description), *size* (uncompressed file size), *length* (compressed length) for FileAttachment annot types, else ``None``. .. method:: get_file() @@ -464,7 +486,7 @@ There is a parent-child relationship between an annotation and its page. If the .. attribute:: line_ends - A pair of integers specifying start and end symbol of annotations types 'FreeText', 'Line', 'PolyLine', and 'Polygon'. *None* if not applicable. For possible values and descriptions in this list, see the :ref:`AdobeManual`, table 1.76 on page 400. + A pair of integers specifying start and end symbol of annotations types 'FreeText', 'Line', 'PolyLine', and 'Polygon'. ``None`` if not applicable. For possible values and descriptions in this list, see the :ref:`AdobeManual`, table 1.76 on page 400. :rtype: tuple @@ -483,7 +505,10 @@ There is a parent-child relationship between an annotation and its page. If the .. attribute:: colors - dictionary of two lists of floats in range *0 <= float <= 1* specifying the "stroke" and the interior ("fill") colors. The stroke color is used for borders and everything that is actively painted or written ("stroked"). The fill color is used for the interior of objects like line ends, circles and squares. The lengths of these lists implicitly determine the colorspaces used: 1 = GRAY, 3 = RGB, 4 = CMYK. So "[1.0, 0.0, 0.0]" stands for RGB color red. Both lists can be empty if no color is specified. + dictionary of two lists of floats in range *0 <= float <= 1* specifying the "stroke" and the interior ("fill") colors. The stroke color is used for borders and everything that is actively painted or written ("stroked"). The fill color is used for the interior of objects like line ends, circles and squares. The lengths of these lists implicitly determine the colorspaces used: 1 = GRAY, 3 = RGB, 4 = CMYK. So "[1.0, 0.0, 0.0]" stands for RGB color red. Both lists can be empty if no color is specified. Be aware about some potentially unexpected cases: + + * The color of Highlight annotations is a **stroke** color, contrary to intuition. + * The color if FreeText annotations is a **stroke** color, but appears as the color that fills the rectangle and any applicable line end symbols. Text color and border color cannot be accessed at all. :rtype: dict @@ -537,7 +562,7 @@ There is a parent-child relationship between an annotation and its page. If the * *style* -- 1-byte border style: **"S"** (Solid) = solid line surrounding the annotation, **"D"** (Dashed) = dashed line surrounding the annotation, the dash pattern is specified by the *dashes* entry, **"B"** (Beveled) = a simulated embossed rectangle that appears to be raised above the surface of the page, **"I"** (Inset) = a simulated engraved rectangle that appears to be recessed below the surface of the page, **"U"** (Underline) = a single line along the bottom of the annotation rectangle. - * *clouds* -- an integer indicating a "cloudy" border, where `n` is an integer `-1 <= n <= 2`. A value `n = 0` indicates a straight line (no clouds), 1 means small and 2 means large semi-circles, mimicking the cloudy appearance. If -1, then no specification is present. + * *clouds* -- an integer indicating a "cloudy" border, where ``n`` is an integer `-1 <= n <= 2`. A value `n = 0` indicates a straight line (no clouds), 1 means small and 2 means large semi-circles, mimicking the cloudy appearance. If -1, then no specification is present. :rtype: dict diff --git a/docs/app1.rst b/docs/app1.rst index 3c7ea7a10..f3b0c7169 100644 --- a/docs/app1.rst +++ b/docs/app1.rst @@ -94,7 +94,7 @@ Example output:: HTML ~~~~ -:meth:`TextPage.extractHTML` (or *Page.get_text("html")* output fully reflects the structure of the page's *TextPage* -- much like DICT / JSON below. This includes images, font information and text positions. If wrapped in HTML header and trailer code, it can readily be displayed by an internet browser. Our above example:: +:meth:`TextPage.extractHTML` (or *Page.get_text("html")* output fully reflects the structure of the page's ``TextPage`` -- much like DICT / JSON below. This includes images, font information and text positions. If wrapped in HTML header and trailer code, it can readily be displayed by an internet browser. Our above example:: >>> for line in page.get_text("html").splitlines(): print(line) @@ -159,7 +159,7 @@ To address the font issue, you can use a simple utility script to scan through t DICT (or JSON) ~~~~~~~~~~~~~~~~ -:meth:`TextPage.extractDICT` (or *Page.get_text("dict", sort=False)*) output fully reflects the structure of a *TextPage* and provides image content and position detail (*bbox* -- boundary boxes in pixel units) for every block, line and span. Images are stored as *bytes* for DICT output and base64 encoded strings for JSON output. +:meth:`TextPage.extractDICT` (or *Page.get_text("dict", sort=False)*) output fully reflects the structure of a ``TextPage`` and provides image content and position detail (*bbox* -- boundary boxes in pixel units) for every block, line and span. Images are stored as *bytes* for DICT output and base64 encoded strings for JSON output. For a visualization of the dictionary structure have a look at :ref:`textpagedict`. @@ -266,7 +266,7 @@ XHTML Text Extraction Flags Defaults ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* New in version 1.16.2: Method :meth:`Page.get_text` supports a keyword parameter *flags* *(int)* to control the amount and the quality of extracted data. The following table shows the defaults settings (flags parameter omitted or None) for each extraction variant. If you specify flags with a value other than *None*, be aware that you must set **all desired** options. A description of the respective bit settings can be found in :ref:`TextPreserve`. +* New in version 1.16.2: Method :meth:`Page.get_text` supports a keyword parameter *flags* *(int)* to control the amount and the quality of extracted data. The following table shows the defaults settings (flags parameter omitted or None) for each extraction variant. If you specify flags with a value other than ``None``, be aware that you must set **all desired** options. A description of the respective bit settings can be found in :ref:`TextPreserve`. * New in v1.19.6: The default combinations in the following table are now available as Python constants: :data:`TEXTFLAGS_TEXT`, :data:`TEXTFLAGS_WORDS`, :data:`TEXTFLAGS_BLOCKS`, :data:`TEXTFLAGS_DICT`, :data:`TEXTFLAGS_RAWDICT`, :data:`TEXTFLAGS_HTML`, :data:`TEXTFLAGS_XHTML`, :data:`TEXTFLAGS_XML`, and :data:`TEXTFLAGS_SEARCH`. You can now easily modify a default flag, e.g. diff --git a/docs/app3.rst b/docs/app3.rst index 8051a269f..086f21a47 100644 --- a/docs/app3.rst +++ b/docs/app3.rst @@ -113,12 +113,12 @@ To see how these fonts can be used -- including the **CJK built-in** fonts -- lo Adobe PDF References --------------------------- -This PDF Reference manual published by Adobe is frequently quoted throughout this documentation. It can be viewed and downloaded from `here `_. +This PDF Reference manual published by Adobe is frequently quoted throughout this documentation. It can be viewed and downloaded from `opensource.adobe.com `_. -.. note:: For a long time, an older version was also available under `this `_ link. It seems to be taken off of the web site in October 2021. Earlier (pre 1.19.*) versions of the PyMuPDF documentation used to refer to this document. We have undertaken an effort to replace referrals to the current specification above. ------------ + .. _SequenceTypes: Using Python Sequences as Arguments in PyMuPDF @@ -174,7 +174,7 @@ Python on the other hand implements the OO-model in a very clean way. The interf When you use one of PyMuPDF's objects or methods, this will result in execution of some code in *pymupdf.py*, which in turn will call some C code compiled with *fitz_wrap.c*. -Because SWIG goes a long way to keep the Python and the C level in sync, everything works fine, if a certain set of rules is being strictly followed. For example: **never access** a :ref:`Page` object, after you have closed (or deleted or set to *None*) the owning :ref:`Document`. Or, less obvious: **never access** a page or any of its children (links or annotations) after you have executed one of the document methods *select()*, *delete_page()*, *insert_page()* ... and more. +Because SWIG goes a long way to keep the Python and the C level in sync, everything works fine, if a certain set of rules is being strictly followed. For example: **never access** a :ref:`Page` object, after you have closed (or deleted or set to ``None``) the owning :ref:`Document`. Or, less obvious: **never access** a page or any of its children (links or annotations) after you have executed one of the document methods *select()*, *delete_page()*, *insert_page()* ... and more. But just no longer accessing invalidated objects is actually not enough: They should rather be actively deleted entirely, to also free C-level resources (meaning allocated memory). @@ -186,7 +186,7 @@ The required logic has therefore been built into PyMuPDF itself in the following 1. If a page "loses" its owning document or is being deleted itself, all of its currently existing annotations and links will be made unusable in Python, and their C-level counterparts will be deleted and deallocated. -2. If a document is closed (or deleted or set to *None*) or if its structure has changed, then similarly all currently existing pages and their children will be made unusable, and corresponding C-level deletions will take place. "Structure changes" include methods like *select()*, *delePage()*, *insert_page()*, *insert_pdf()* and so on: all of these will result in a cascade of object deletions. +2. If a document is closed (or deleted or set to ``None``) or if its structure has changed, then similarly all currently existing pages and their children will be made unusable, and corresponding C-level deletions will take place. "Structure changes" include methods like *select()*, *delePage()*, *insert_page()*, *insert_pdf()* and so on: all of these will result in a cascade of object deletions. The programmer will normally not realize any of this. If he, however, tries to access invalidated objects, exceptions will be raised. @@ -314,10 +314,10 @@ two ways: Call `set_messages()`: -MuPDF errors and warnings +|MuPDF| errors and warnings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -MuPDF generates text errors and warnings. +|MuPDF| generates text errors and warnings. * These errors and warnings are appended to an internal list, accessible with @@ -331,10 +331,10 @@ MuPDF generates text errors and warnings. `mupdf_display_warnings()`. * - These messages are prefixed with `MuPDF error: ` and `MuPDF warning: ` + These messages are prefixed with `MuPDF error:` and `MuPDF warning:` respectively. -Some MuPDF errors may lead to Python exceptions. +Some |MuPDF| errors may lead to Python exceptions. Example output for a **recoverable error**. We are opening a damaged PDF, but MuPDF is able to repair it and gives us a little information on what happened. Then we illustrate how to find out whether the document can later be saved incrementally. Checking the :attr:`Document.is_dirty` attribute at this point also indicates that during `pymupdf.open` the document had to be repaired: @@ -395,7 +395,7 @@ Images have a coordinate system with integer coordinates. Origin `(0, 0)` is the Origin Point, Point Size and Y-Axis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In **PDF**, the origin `(0, 0)` of a page is located at its **bottom-left point**. In **MuPDF**, the origin `(0, 0)` of a page is located at its **top-left point**. +In |PDF|, the origin `(0, 0)` of a page is located at its **bottom-left point**. In |MuPDF|, the origin `(0, 0)` of a page is located at its **top-left point**. .. image:: images/img-coordinate-space.png @@ -404,14 +404,14 @@ Coordinates are float numbers and measured in **points**, where: - **one point equals 1/72 inches**. -Typical document page sizes are **ISO A4** and **Letter**. A **Letter** page has a size of **8.5 x 11 inches**, corresponding to **612 x 792 points**. In the **PDF** coordinate system, the top-left point of a **Letter** page hence has the coordinate `(0, 792)` as **the y-axis points upwards**. Now we know our document size the **MuPDF** coordinate system for the bottom right would be coordinate `(612, 792)` (and for **PDF** this coordinate would then be `(612,0)`). +Typical document page sizes are **ISO A4** and **Letter**. A **Letter** page has a size of **8.5 x 11 inches**, corresponding to **612 x 792 points**. In the |PDF| coordinate system, the top-left point of a **Letter** page hence has the coordinate `(0, 792)` as **the y-axis points upwards**. Now we know our document size the |MuPDF| coordinate system for the bottom right would be coordinate `(612, 792)` (and for |PDF| this coordinate would then be `(612,0)`). -- Theoretically, there are **infinitely many** coordinate positions on a **PDF** page. In practice however, at most the first 5 decimal places are sufficient for a reasonable precision. +- Theoretically, there are **infinitely many** coordinate positions on a |PDF| page. In practice however, at most the first 5 decimal places are sufficient for a reasonable precision. -- In **MuPDF**, multiple document formats are supported - **PDF** just being one among **over a dozen others**. Images are also supported as documents in **MuPDF** (therefore having one page usually). This is one of the reasons why **MuPDF** uses a coordinate system with the origin `(0, 0)` being the **top-left** point of any document page. **The y-axis points downwards**, like with images. Coordinates in **MuPDF** in any case are floats, like in **PDF**. +- In |MuPDF|, multiple document formats are supported - |PDF| just being one among **over a dozen others**. Images are also supported as documents in |MuPDF| (therefore having one page usually). This is one of the reasons why |MuPDF| uses a coordinate system with the origin `(0, 0)` being the **top-left** point of any document page. **The y-axis points downwards**, like with images. Coordinates in |MuPDF| in any case are floats, like in |PDF|. -- A rectangle `Rect(0, 0, 100, 100)` for instance in **MuPDF** (and thus **PyMuPDF**) therefore is a square with edges of length 100 points (= 1.39 inches or 3.53 centimeters). Its top-left corner is the origin. To switch between the two coordinate systems **PDF** to **MuPDF**, every :ref:`Page` object has a :attr:`Page.transformation_matrix`. Its inverse can be used to compute a rectangle's PDF coordinates. In this way we can conveniently find that `Rect(0, 0, 100, 100)` in **MuPDF** is the same as `Rect(0, 692, 100, 792)` in **PDF**. See this code snippet:: +- A rectangle `Rect(0, 0, 100, 100)` for instance in |MuPDF| (and thus |PyMuPDF|) therefore is a square with edges of length 100 points (= 1.39 inches or 3.53 centimeters). Its top-left corner is the origin. To switch between the two coordinate systems |PDF| to |MuPDF|, every :ref:`Page` object has a :attr:`Page.transformation_matrix`. Its inverse can be used to compute a rectangle's PDF coordinates. In this way we can conveniently find that `Rect(0, 0, 100, 100)` in |MuPDF| is the same as `Rect(0, 692, 100, 792)` in |PDF|. See this code snippet:: >>> page = doc.new_page(width=612, height=792) # make new Letter page >>> ptm = page.transformation_matrix diff --git a/docs/app4.rst b/docs/app4.rst index f8edb80ec..26037fc98 100644 --- a/docs/app4.rst +++ b/docs/app4.rst @@ -55,7 +55,7 @@ A set of eight files is used for the performance testing. With each file we have - **KB/page** - **Textsize/page** - **Notes** - * - `adobe.pdf`_ + * - `adobe.pdf` - 32,472,771 - 1,310 - 794 @@ -63,7 +63,7 @@ A set of eight files is used for the performance testing. With each file we have - 24 - 1,942 - linearized, many links / bookmarks - * - `artifex-website.pdf`_ + * - `artifex-website.pdf` - 31,570,732 - 47 - 46 @@ -71,7 +71,7 @@ A set of eight files is used for the performance testing. With each file we have - 656 - 3,538 - graphics oriented - * - `db-systems.pdf`_ + * - `db-systems.pdf` - 29,326,355 - 1,241 - 0 @@ -79,7 +79,7 @@ A set of eight files is used for the performance testing. With each file we have - 23 - 2,142 - - * - `fontforge.pdf`_ + * - `fontforge.pdf` - 8,222,384 - 214 - 31 @@ -87,7 +87,7 @@ A set of eight files is used for the performance testing. With each file we have - 38 - 1,058 - mix of text & graphics - * - `pandas.pdf`_ + * - `pandas.pdf` - 10,585,962 - 3,071 - 536 @@ -95,7 +95,7 @@ A set of eight files is used for the performance testing. With each file we have - 3 - 1,539 - many pages - * - `pymupdf.pdf`_ + * - `pymupdf.pdf` - 6,805,176 - 478 - 276 @@ -103,7 +103,7 @@ A set of eight files is used for the performance testing. With each file we have - 14 - 1,937 - text oriented - * - `pythonbook.pdf`_ + * - `pythonbook.pdf` - 9,983,856 - 669 - 198 @@ -111,7 +111,7 @@ A set of eight files is used for the performance testing. With each file we have - 15 - 1,929 - - * - `sample-50-MB-pdf-file.pdf`_ + * - `sample-50-MB-pdf-file.pdf` - 52,521,850 - 1 - 0 @@ -215,7 +215,7 @@ These are our run time findings in **seconds** along with a base rate summary co :header-rows: 1 * - **Name** - - **PyMuPDF** + - |PyMuPDF| - **PDFrw** - **PikePDF** - **PyPDF2** @@ -293,7 +293,7 @@ These are our run time findings in **seconds** along with a base rate summary co :header-rows: 1 * - **Name** - - **PyMuPDF** + - |PyMuPDF| - **XPDF** - **PyPDF2** - **PDFMiner** @@ -405,7 +405,7 @@ These are our run time findings in **seconds** along with a base rate summary co :header-rows: 1 * - **Name** - - **PyMuPDF** + - |PyMuPDF| - **XPDF** - **PDF2JPG** * - adobe.pdf diff --git a/docs/archive-class.rst b/docs/archive-class.rst index f7aae521e..ab3c0b7c5 100644 --- a/docs/archive-class.rst +++ b/docs/archive-class.rst @@ -42,7 +42,7 @@ In PyMuPDF, archives are currently only used by :ref:`Story` objects to specify * a Python binary object (`bytes`, `bytearray`, `io.BytesIO`): this will add a single-member sub-archive. In this case, the `path` parameter is **mandatory** and should be the member name under which this item can be found / retrieved. - * a tuple `(data, name)`: This will add a single-member sub-archive with the member name `name`. `data` may be a Python binary object or a local file name (in which case its binary file content is used). Use this format if you need to specify `path`. + * a tuple `(data, name)`: This will add a single-member sub-archive with the member name ``name``. ``data`` may be a Python binary object or a local file name (in which case its binary file content is used). Use this format if you need to specify `path`. * a Python sequence: This is a convenience format to specify any combination of the above. diff --git a/docs/conf.py b/docs/conf.py index 4b15bfee5..353c3464b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,7 +19,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. # extensions = ["sphinx.ext.autodoc", "sphinx.ext.coverage", "sphinx.ext.ifconfig"] -extensions = ['sphinx_copybutton','notfound.extension'] +extensions = ['sphinx_copybutton','notfound.extension','sphinxcontrib.googleanalytics'] # rst2pdf is not available on OpenBSD. if hasattr(os, "uname") and os.uname()[0] != "OpenBSD": extensions.append("rst2pdf.pdfbuilder") @@ -30,12 +30,17 @@ # The suffix of source filenames. source_suffix = ".rst" +# from: pip install sphinxcontrib-googleanalytics +googleanalytics_id = "G-JZTN4VTL9M" + # The encoding of source files. # source_encoding = 'utf-8-sig' # The master toctree document. root_doc = "index" +rst_epilog = '' + # General information about the project. project = "PyMuPDF" thisday = datetime.date.today() @@ -46,19 +51,28 @@ # built documents. # # The full version, including alpha/beta/rc tags. -_path = os.path.abspath(f'{__file__}/../../src/__init__.py') -with open(_path) as f: - for line in f: - match = re.search('pymupdf_version = "([0-9][.][0-9]+[.][0-9]+(rc[0-9]+)?)"', line) - if match: - release = match.group(1) - print(f'{__file__}: setting version from {_path}: {release}') - break - else: - raise Exception(f'Failed to find `VersionBind = ...` in {_path}') - -# The short X.Y version -version = release + +# PyMuPDF version is set in setup.py, so we import it here. +sys.path.insert(0, os.path.abspath(f'{__file__}/../..')) +try: + import setup +finally: + del sys.path[0] +version = setup.version_p +del setup # Necessary otherwise sphinx seems to do `setup()`. + +# Supported Python versions are set in scripts.test.py. +sys.path.insert(0, os.path.abspath(f'{__file__}/../../scripts')) +try: + import test +finally: + del sys.path[0] +python_versions_minor = test.python_versions_minor +del test +python_versions_list = [f'3.{i}' for i in python_versions_minor] +python_versions = ', '.join(python_versions_list[:-1]) + f' and {python_versions_list[-1]}' +# Make `|python_versions|` available in .rst files. +rst_epilog += f'.. |python_versions| replace:: {python_versions}\n' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/converting-files.rst b/docs/converting-files.rst new file mode 100644 index 000000000..d27da3679 --- /dev/null +++ b/docs/converting-files.rst @@ -0,0 +1,97 @@ +.. include:: header.rst + +.. _ConvertingFiles: + +============================== +Converting Files +============================== + + + +Files to PDF +~~~~~~~~~~~~~~~~~~ + +:ref:`Document types supported by PyMuPDF` can easily be converted to |PDF| by using the :meth:`Document.convert_to_pdf` method. This method returns a buffer of data which can then be utilized by |PyMuPDF| to create a new |PDF|. + + + +**Example** + +.. code-block:: python + + import pymupdf + + xps = pymupdf.open("input.xps") + pdfbytes = xps.convert_to_pdf() + pdf = pymupdf.open("pdf", pdfbytes) + pdf.save("output.pdf") + + + +PDF to SVG +~~~~~~~~~~~~~~~~~~ + +Technically, as SVG files cannot be multipage, we must export each page as an SVG. + +To get an SVG representation of a page use the :meth:`Page.get_svg_image` method. + +**Example** + +.. code-block:: python + + import pymupdf + + doc = pymupdf.open("input.pdf") + page = doc[0] + + # Convert page to SVG + svg_content = page.get_svg_image() + + # Save to file + with open("output.svg", "w", encoding="utf-8") as f: + f.write(svg_content) + + doc.close() + + +PDF to Markdown +~~~~~~~~~~~~~~~~~ + +By utlilizing the :doc:`PyMuPDF4LLM API ` we are able to convert PDF to a Markdown representation. + +**Example** + +.. code-block:: python + + import pymupdf4llm + import pathlib + + md_text = pymupdf4llm.to_markdown("test.pdf") + print(md_text) + + pathlib.Path("4llm-output.md").write_bytes(md_text.encode()) + + +PDF to DOCX +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the pdf2docx_ library which uses |PyMuPDF| to provide document conversion from |PDF| to **DOCX** format. + + + +**Example** + +.. code-block:: python + + from pdf2docx import Converter + + pdf_file = 'input.pdf' + docx_file = 'output.docx' + + # convert pdf to docx + cv = Converter(pdf_file) + cv.convert(docx_file) # all pages by default + cv.close() + + +.. include:: footer.rst diff --git a/docs/device.rst b/docs/device.rst index 3f264162a..35f2d8c78 100644 --- a/docs/device.rst +++ b/docs/device.rst @@ -16,19 +16,19 @@ The different format handlers (pdf, xps, etc.) interpret pages to a "device". De Constructor for either a pixel map or a display list device. - :arg object: either a *Pixmap* or a *DisplayList*. + :arg object: either a ``Pixmap`` or a ``DisplayList``. :type object: :ref:`Pixmap` or :ref:`DisplayList` - :arg clip: An optional `IRect` for *Pixmap* devices to restrict rendering to a certain area of the page. If the complete page is required, specify *None*. For display list devices, this parameter must be omitted. + :arg clip: An optional `IRect` for ``Pixmap`` devices to restrict rendering to a certain area of the page. If the complete page is required, specify ``None``. For display list devices, this parameter must be omitted. :type clip: :ref:`IRect` .. method:: __init__(self, textpage, flags=0) Constructor for a text page device. - :arg textpage: *TextPage* object + :arg textpage: ``TextPage`` object :type textpage: :ref:`TextPage` - :arg int flags: control the way how text is parsed into the text page. Currently 3 options can be coded into this parameter, see :ref:`TextPreserve`. To set these options use something like *flags=0 | TEXT_PRESERVE_LIGATURES | ...*. + :arg int flags: control the way how text is parsed into the text page. Currently 3 options can be coded into this parameter, see :ref:`TextPreserve`. To set these options use something like `flags=0 | TEXT_PRESERVE_LIGATURES | ...`. .. include:: footer.rst diff --git a/docs/displaylist.rst b/docs/displaylist.rst index 7a0078b22..a96391c9d 100644 --- a/docs/displaylist.rst +++ b/docs/displaylist.rst @@ -37,7 +37,7 @@ A display list is populated with objects from a page, usually by executing :meth :arg mediabox: The page's rectangle. :type mediabox: :ref:`Rect` - :rtype: *DisplayList* + :rtype: ``DisplayList`` .. method:: run(device, matrix, area) diff --git a/docs/document.rst b/docs/document.rst index 7f7033365..352347da9 100644 --- a/docs/document.rst +++ b/docs/document.rst @@ -96,6 +96,8 @@ For details on **embedded files** refer to Appendix 3. :meth:`Document.pdf_catalog` PDF only: :data:`xref` of catalog (root) :meth:`Document.pdf_trailer` PDF only: trailer source :meth:`Document.prev_location` return (chapter, pno) of preceding page +:meth:`Document.rewrite_images` PDF only: rewrite / extra compression for images +:meth:`Document.recolor` PDF only: execute :meth:`Page.recolor` for all pages :meth:`Document.reload_page` PDF only: provide a new copy of a page :meth:`Document.resolve_names` PDF only: Convert destination names into a Python dict :meth:`Document.save` PDF only: save the document @@ -169,28 +171,25 @@ For details on **embedded files** refer to Appendix 3. .. method:: __init__(self, filename=None, stream=None, *, filetype=None, rect=None, width=0, height=0, fontsize=11) - * Changed in v1.14.13: support `io.BytesIO` for memory documents. - * Changed in v1.19.6: Clearer, shorter and more consistent exception messages. File type "pdf" is always assumed if not specified. Empty files and memory areas will always lead to exceptions. - - Creates a *Document* object. + Create a ``Document`` object. * With default parameters, a **new empty PDF** document will be created. - * If *stream* is given, then the document is created from memory and, if not a PDF, either *filename* or *filetype* must indicate its type. - * If *stream* is `None`, then a document is created from the file given by *filename*. Its type is inferred from the extension. This can be overruled by *filetype.* + * If ``stream`` is given, then the document is created from memory. + * If ``stream`` is `None`, then a document is created from the file given by ``filename``. - :arg str,pathlib filename: A UTF-8 string or *pathlib* object containing a file path. The document type is inferred from the filename extension. If not present or not matching :ref:`a supported type`, a PDF document is assumed. For memory documents, this argument may be used instead of `filetype`, see below. + :arg str,pathlib filename: A UTF-8 string or ``pathlib.Path`` object containing a file path. The document type is always determined from the file content. The ``filetype`` parameter is ignored, except when content inspection was unsuccessful. This is regularly the case for plain text types like "txt", "html", "xml" etc. with a wrong or missing file extension. - :arg bytes,bytearray,BytesIO stream: A memory area containing a supported document. If not a PDF, its type **must** be specified by either `filename` or `filetype`. + :arg bytes,bytearray,BytesIO stream: A memory area containing file data. The document type is always detected from the data content. The ``filetype`` parameter is ignored, except when content inspection was unsuccessful. This is regularly the case for plain text types like "txt", "html", "xml" etc. - :arg str filetype: A string specifying the type of document. This may be anything looking like a filename (e.g. "x.pdf"), in which case MuPDF uses the extension to determine the type, or a mime type like *application/pdf*. Just using strings like "pdf" or ".pdf" will also work. May be omitted for PDF documents, otherwise must match :ref:`a supported document type`. + :arg str filetype: A string specifying the type of document. This is only ever needed when file content inspection fails. Text types like "txt", "html", "xml" etc. cannot be disambiguated by their content. When such files are provided in memory or being provided with the wrong file extension, this parameter **must** be used. - :arg rect_like rect: a rectangle specifying the desired page size. This parameter is only meaningful for documents with a variable page layout ("reflowable" documents), like e-books or HTML, and ignored otherwise. If specified, it must be a non-empty, finite rectangle with top-left coordinates (0, 0). Together with parameter *fontsize*, each page will be accordingly laid out and hence also determine the number of pages. + :arg rect_like rect: a rectangle specifying the desired page size. This parameter is only meaningful for documents with a variable page layout ("reflowable" documents), like e-books or HTML, and ignored otherwise. If specified, it must be a non-empty, finite rectangle with top-left coordinates (0, 0). Together with parameter :data:`fontsize`, each page will be accordingly laid out and hence also determine the number of pages. - :arg float width: may used together with *height* as an alternative to *rect* to specify layout information. + :arg float width: may used together with ``height`` as an alternative to ``rect`` to specify layout information. - :arg float height: may used together with *width* as an alternative to *rect* to specify layout information. + :arg float height: may used together with ``width`` as an alternative to ``rect`` to specify layout information. - :arg float fontsize: the default :data:`fontsize` for reflowable document types. This parameter is ignored if none of the parameters *rect* or *width* and *height* are specified. Will be used to calculate the page layout. + :arg float fontsize: the default :data:`fontsize` for reflowable document types. This parameter is ignored if none of the parameters ``rect`` or ``width`` and ``height`` are specified. Will be used to calculate the page layout. :raises TypeError: if the *type* of any parameter does not conform. :raises FileNotFoundError: if the file / path cannot be found. Re-implemented as subclass of `RuntimeError`. @@ -202,31 +201,26 @@ For details on **embedded files** refer to Appendix 3. In case of problems you can see more detail in the internal messages store: `print(pymupdf.TOOLS.mupdf_warnings())` (which will be emptied by this call, but you can also prevent this -- consult :meth:`Tools.mupdf_warnings`). - .. note:: Not all document types are checked for valid formats already at open time. Raster images for example will raise exceptions only later, when trying to access the content. Other types (notably with non-binary content) may also be opened (and sometimes **accessed**) successfully -- sometimes even when having invalid content for the format: - - * HTM, HTML, XHTML: **always** opened, `metadata["format"]` is "HTML5", resp. "XHTML". - * XML, FB2: **always** opened, `metadata["format"]` is "FictionBook2". - Overview of possible forms, note: `open` is a synonym of `Document`:: >>> # from a file >>> doc = pymupdf.open("some.xps") >>> # handle wrong extension - >>> doc = pymupdf.open("some.file", filetype="xps") + >>> doc = pymupdf.open("some.file", filetype="xps") # assert expected type + >>> doc = pymupdf.open("some.file", filetype="txt") # treat as plain text >>> - >>> # from memory, filetype is required if not a PDF - >>> doc = pymupdf.open("xps", mem_area) - >>> doc = pymupdf.open(None, mem_area, "xps") - >>> doc = pymupdf.open(stream=mem_area, filetype="xps") + >>> # from memory + >>> doc = pymupdf.open(stream=mem_area) # works for any supported type + >>> doc = pymupdf.open(stream=unknown-type, filetype="txt") # treat as plain text >>> >>> # new empty PDF >>> doc = pymupdf.open() >>> doc = pymupdf.open(None) >>> doc = pymupdf.open("") - .. note:: Raster images with a wrong (but supported) file extension **are no problem**. MuPDF will determine the correct image type when file **content** is actually accessed and will process it without complaint. So `pymupdf.open("file.jpg")` will work even for a PNG image. + .. note:: Raster images with a wrong (but supported) file extension **are no problem**. MuPDF will determine the correct image type when file **content** is actually accessed and will process it without complaint. - The Document class can be also be used as a **context manager**. On exit, the document will automatically be closed. + The Document class can be also be used as a **context manager**. Exiting the content manager will close the document automatically. >>> import pymupdf >>> with pymupdf.open(...) as doc: @@ -254,7 +248,7 @@ For details on **embedded files** refer to Appendix 3. * New in v1.18.4 - If *xref* represents an image or form xobject, set or remove the cross reference number *ocxref* of an optional contents object. + If :data:`xref` represents an image or form xobject, set or remove the cross reference number *ocxref* of an optional contents object. :arg int xref: the :data:`xref` of an image or form xobject [#f5]_. Valid such cross reference numbers are returned by :meth:`Document.get_page_images`, resp. :meth:`Document.get_page_xobjects`. For invalid numbers, an exception is raised. :arg int ocxref: the :data:`xref` number of an :data:`OCG` / :data:`OCMD`. If not zero, an invalid reference raises an exception. If zero, any OC reference is removed. @@ -290,7 +284,7 @@ For details on **embedded files** refer to Appendix 3. :arg int number: config number as returned by :meth:`Document.layer_configs`. :arg bool as_default: make this the default configuration. - Activates the ON / OFF states of OCGs as defined in the identified layer. If *as_default=True*, then additionally all layers, including the standard one, are merged and the result is written back to the standard layer, and **all optional layers are deleted**. + Activates the ON / OFF states of OCGs as defined in the identified layer. If ``as_default=True``, then additionally all layers, including the standard one, are merged and the result is written back to the standard layer, and **all optional layers are deleted**. .. method:: add_ocg(name, config=-1, on=True, intent="View", usage="Artwork") @@ -364,7 +358,7 @@ For details on **embedded files** refer to Appendix 3. :arg int xref: the :data:`xref` of the OCMD. :rtype: dict - :returns: a dictionary with the keys *xref*, *ocgs*, *policy* and *ve*. + :returns: a dictionary with the keys :data:`xref`, *ocgs*, *policy* and *ve*. .. method:: get_layer(config=-1) @@ -456,7 +450,7 @@ For details on **embedded files** refer to Appendix 3. :arg str password: owner or user password. :rtype: int - :returns: a positive value if successful, zero otherwise (the string does not match either password). If positive, the indicator :attr:`Document.is_encrypted` is set to *False*. **Positive** return codes carry the following information detail: + :returns: a positive value if successful, zero otherwise (the string does not match either password). If positive, the indicator :attr:`Document.is_encrypted` is set to ``False``. **Positive** return codes carry the following information detail: * 1 => authenticated, but the PDF has neither owner nor user passwords. * 2 => authenticated with the **user** password. @@ -594,6 +588,89 @@ For details on **embedded files** refer to Appendix 3. To maintain a consistent API, for document types not supporting a chapter structure (like PDFs), :attr:`Document.chapter_count` is 1, and pages can also be loaded via tuples *(0, pno)*. See this [#f3]_ footnote for comments on performance improvements. + + .. method:: rewrite_images(dpi_threshold=None, dpi_target=0, quality=0, lossy=True, lossless=True, bitonal=True, color=True, gray=True, set_to_gray=False, options=None) + + PDF only: Walk through all images and rewrite them according to the specified parameters. This is useful for reducing file size, changing image formats, or converting color spaces. + + The typical usage is extra compression of images for significantly reducing the file size of the PDF. When setting quality and the dpi parameters to positive values and accepting defaults for the rest, the following will happen: + + * Lossy and lossless images will be rewritten as JPEG images (FZ_RECOMPRESS_JPEG) as far as technically possible. + + * Bitonal (monochrome) images will be rewritten in FAX format (FZ_RECOMPRESS_FAX). + + * Subsampling method is **FZ_SUBSAMPLE_AVERAGE** (see below). + + :arg int dpi_target: target DPI value for the resampled images. Ignored if `dpi_threshold` is `None`, otherwise must be less than `dpi_threshold` and positive. + + :arg int dpi_threshold: If None (the default) no resampling takes place. Otherwise images with a DPI value larger than this will be resampled to `dpi_target` (which must be less than `dpi_threshold`). + + :arg int quality: desired target JPEG quality, a value between 0 and 100. 0 means no quality change, 100 means best quality. + + :arg bool lossy: include lossy image types (e.g. JPEG). + + :arg bool lossless: include lossless image types (e.g. PNG). + + :arg bool bitonal: include black-and-white images (e.g. FAX). + + :arg bool color: include colored images. + + :arg bool gray: include grayscale images. + + :arg bool set_to_gray: if True, the PDF will be converted to grayscale by executing :meth:`Document.recolor` before all image processing. Please note that this will also change text and vector graphics to grayscale -- not just the images. + + :arg dict options: This parameter is intended for expert users. Except ``set_to_gray``, all other parameters are ignored. It must be an object prepared in the following way: ``options = pymupdf.mupdf.PdfImageRewriterOptions()``. Then attributes of this object can be set to achieve fine-grained control. Following are the adjustable attributes of the ``options`` object and their default (do nothing) values. + + :: + + options.bitonal_image_recompress_method = FZ_RECOMPRESS_NEVER + options.bitonal_image_recompress_quality = None + options.bitonal_image_subsample_method = FZ_SUBSAMPLE_AVERAGE + options.bitonal_image_subsample_threshold = 0 + options.bitonal_image_subsample_to = 0 + options.color_lossless_image_recompress_method = FZ_RECOMPRESS_NEVER + options.color_lossless_image_recompress_quality = None + options.color_lossless_image_subsample_method = FZ_SUBSAMPLE_AVERAGE + options.color_lossless_image_subsample_threshold = 0 + options.color_lossless_image_subsample_to = 0 + options.color_lossy_image_recompress_method = FZ_RECOMPRESS_NEVER + options.color_lossy_image_recompress_quality = None + options.color_lossy_image_subsample_method = FZ_SUBSAMPLE_AVERAGE + options.color_lossy_image_subsample_threshold = 0 + options.color_lossy_image_subsample_to = 0 + options.gray_lossless_image_recompress_method = FZ_RECOMPRESS_NEVER + options.gray_lossless_image_recompress_quality = None + options.gray_lossless_image_subsample_method = FZ_SUBSAMPLE_AVERAGE + options.gray_lossless_image_subsample_threshold = 0 + options.gray_lossless_image_subsample_to = 0 + options.gray_lossy_image_recompress_method = FZ_RECOMPRESS_NEVER + options.gray_lossy_image_recompress_quality = None + options.gray_lossy_image_subsample_method = FZ_SUBSAMPLE_AVERAGE + options.gray_lossy_image_subsample_threshold = 0 + options.gray_lossy_image_subsample_to = 0 + + The ``*_recompress_method`` attributes may be one of the values **FZ_RECOMPRESS_NEVER (0), FZ_RECOMPRESS_SAME (1), FZ_RECOMPRESS_LOSSLESS (2), FZ_RECOMPRESS_JPEG (3), FZ_RECOMPRESS_J2K (4), FZ_RECOMPRESS_FAX (5)**. Value FZ_RECOMPRESS_NEVER will skip this image type altogether and FZ_RECOMPRESS_SAME will not change the type. The other values will execute type conversions (as far as technically possible). + + The ``*_quality`` values are strings of integers from "0" to "100" or ``None``. + + The ``*_subsample_method`` attributes are either **FZ_SUBSAMPLE_AVERAGE (0)** or **FZ_SUBSAMPLE_BICUBIC (1)** and refer to how a pixel value is derived from its neighboring pixels during subsampling. For some background see `this Wikipedia article about bicubic interpolation `_. + + Attributes ``*_subsample_threshold`` excludes images from subsampling which have a lower DPI. Participating images will be subsampled to the DPI values given by the ``*_subsample_to`` values. Values of 0 mean that no subsampling will take place. + + The ``*_subsample_threshold`` values should be chosen notably larger than the ``*_subsample_to`` values to ensure that there are enough size savings. After all, every subsampling inevitably incurs quality losses. + + An example for a good choice is ``threshold=100`` and ``to=72``. + + + .. method:: recolor(components=1) + + PDF only: Change the color component counts for all object types text, images and vector graphics for all pages. + + :arg int components: desired color space indicated by the number of color components: 1 = DeviceGRAY, 3 = DeviceRGB, 4 = DeviceCMYK. + + The typical use case is 1 (DeviceGRAY) which converts the PDF to grayscale. + + .. method:: reload_page(page) * New in v1.16.10 @@ -737,7 +814,7 @@ For details on **embedded files** refer to Appendix 3. Creates a table of contents (TOC) out of the document's outline chain. - :arg bool simple: Indicates whether a simple or a detailed TOC is required. If *False*, each item of the list also contains a dictionary with :ref:`linkDest` details for each outline entry. + :arg bool simple: Indicates whether a simple or a detailed TOC is required. If ``False``, each item of the list also contains a dictionary with :ref:`linkDest` details for each outline entry. :rtype: list @@ -842,7 +919,7 @@ For details on **embedded files** refer to Appendix 3. :arg str key: the desired PDF key (without leading "/"). Must not be empty. Any valid PDF key -- whether already present in the object (which will be overwritten) -- or new. It is possible to use PDF path notation like `"Resources/ExtGState"` -- which sets the value for key `"/ExtGState"` as a sub-object of `"/Resources"`. :arg str value: the value for the key. It must be a non-empty string and, depending on the desired PDF object type, the following rules must be observed. There is some syntax checking, but **no type checking** and no checking if it makes sense PDF-wise, i.e. **no semantics checking**. Upper / lower case is important! - * **xref** -- must be provided as `"nnn 0 R"` with a valid :data:`xref` number nnn of the PDF. The suffix "`0 R`" is required to be recognizable as an xref by PDF applications. + * *:data:`xref`* -- must be provided as `"nnn 0 R"` with a valid :data:`xref` number nnn of the PDF. The suffix "`0 R`" is required to be recognizable as an xref by PDF applications. * **array** -- a string like `"[a b c d e f]"`. The brackets are required. Array items must be separated by at least one space (not commas like in Python). An empty array `"[]"` is possible and *equivalent* to removing the key. Array items may be any PDF objects, like dictionaries, xrefs, other arrays, etc. Like in Python, array items may be of different types. * **dict** -- a string like `"<< ... >>"`. The brackets are required and must enclose a valid PDF dictionary definition. The empty dictionary `"<<>>"` is possible and *equivalent* to removing the key. * **int** -- an integer formatted **as a string**. @@ -887,7 +964,7 @@ For details on **embedded files** refer to Appendix 3. :rtype: list :returns: a list of (non-image) XObjects. These objects typically represent pages *embedded* (not copied) from other PDFs. For example, :meth:`Page.show_pdf_page` will create this type of object. An item of this list has the following layout: `(xref, name, invoker, bbox)`, where - * **xref** (*int*) is the XObject's :data:`xref`. + * *:data:`xref`* (*int*) is the XObject's :data:`xref`. * **name** (*str*) is the symbolic name to reference the XObject. * **invoker** (*int*) the :data:`xref` of the invoking XObject or zero if the page directly invokes it. * **bbox** (:ref:`Rect`) the boundary box of the XObject's location on the page **in untransformed coordinates**. To get actual, non-rotated page coordinates, multiply with the page's transformation matrix :attr:`Page.transformation_matrix`. *Changed in v.18.11:* the bbox is now formatted as :ref:`Rect`. @@ -902,47 +979,44 @@ For details on **embedded files** refer to Appendix 3. :rtype: list - :returns: a list of images **referenced** by this page. Each item looks like - - `(xref, smask, width, height, bpc, colorspace, alt. colorspace, name, filter, referencer)` + :returns: a list of images **referenced** by this page. Each item looks like: - Where + `(xref, smask, width, height, bpc, colorspace, alt_colorspace, name, filter, referencer)` - * **xref** (*int*) is the image object number - * **smask** (*int*) is the object number of its soft-mask image - * **width** and **height** (*ints*) are the image dimensions - * **bpc** (*int*) denotes the number of bits per component (normally 8) - * **colorspace** (*str*) a string naming the colorspace (like **DeviceRGB**) - * **alt. colorspace** (*str*) is any alternate colorspace depending on the value of **colorspace** - * **name** (*str*) is the symbolic name by which the image is referenced - * **filter** (*str*) is the decode filter of the image (:ref:`AdobeManual`, pp. 22). - * **referencer** (*int*) the :data:`xref` of the referencer. Zero if directly referenced by the page. Only present if *full=True*. + * ``xref`` (*int*) is the image object number + * ``smask`` (*int*) is the object number of its soft-mask image + * ``width`` (*int*) is the image width + * ``height`` (*int*) is the image height + * ``bpc`` (*int*) denotes the number of bits per component (normally 8) + * ``colorspace`` (*str*) a string naming the colorspace (like **DeviceRGB**) + * ``alt_colorspace`` (*str*) is any alternate colorspace depending on the value of **colorspace** + * ``name`` (*str*) is the symbolic name by which the image is referenced + * ``filter`` (*str*) is the decode filter of the image (:ref:`AdobeManual`, pp. 22). + * ``referencer`` (*int*) the :data:`xref` of the referencer. Zero if directly referenced by the page. Only present if *full=True*. .. note:: In general, this is not the list of images that are **actually displayed**. This method only parses several PDF objects to collect references to embedded images. It does not analyse the page's :data:`contents`, where all the actual image display commands are defined. To get this information, please use :meth:`Page.get_image_info`. Also have a look at the discussion in section :ref:`textpagedict`. .. method:: get_page_fonts(pno, full=False) - PDF only: Return a list of all fonts (directly or indirectly) referenced by the page. + PDF only: Return a list of all fonts (directly or indirectly) referenced by the page object definition. :arg int pno: page number, 0-based, `-∞ < pno < page_count`. - :arg bool full: whether to also include the referencer's :data:`xref`. If *True*, the returned items are one entry longer. Use this option if you need to know, whether the page directly references the font. In this case the last entry is 0. If the font is referenced by an `/XObject` of the page, you will find its :data:`xref` here. + :arg bool full: whether to also include the referencer's :data:`xref`. If ``True``, the returned items are one entry longer. Use this option if you need to know, whether the page directly references the font. In this case the last entry is 0. If the font is referenced by an `/XObject` of the page, you will find its :data:`xref` here. :rtype: list - :returns: a list of fonts referenced by this page. Each entry looks like + :returns: a list of fonts referenced by the object definition of the page. Each entry looks like: - **(xref, ext, type, basefont, name, encoding, referencer)**, + `(xref, ext, type, basefont, name, encoding, referencer)` - where - - * **xref** (*int*) is the font object number (may be zero if the PDF uses one of the builtin fonts directly) - * **ext** (*str*) font file extension (e.g. "ttf", see :ref:`FontExtensions`) - * **type** (*str*) is the font type (like "Type1" or "TrueType" etc.) - * **basefont** (*str*) is the base font name, - * **name** (*str*) is the symbolic name, by which the font is referenced - * **encoding** (*str*) the font's character encoding if different from its built-in encoding (:ref:`AdobeManual`, p. 254): - * **referencer** (*int* optional) the :data:`xref` of the referencer. Zero if directly referenced by the page, otherwise the xref of an XObject. Only present if *full=True*. + * ``xref`` (*int*) is the font object number (may be zero if the PDF uses one of the builtin fonts directly) + * ``ext`` (*str*) font file extension (e.g. "ttf", see :ref:`FontExtensions`) + * ``type`` (*str*) is the font type (like "Type1" or "TrueType" etc.) + * ``basefont`` (*str*) is the base font name, + * ``name`` (*str*) is the symbolic name, by which the font is referenced + * ``encoding`` (*str*) the font's character encoding if different from its built-in encoding (:ref:`AdobeManual`, p. 254): + * ``referencer`` (*int* optional) the :data:`xref` of the referencer. Zero if directly referenced by the page, otherwise the xref of an XObject. Only present if *full=True*. Example:: @@ -958,7 +1032,12 @@ For details on **embedded files** refer to Appendix 3. .. note:: * This list has no duplicate entries: the combination of :data:`xref`, *name* and *referencer* is unique. - * In general, this is a superset of the fonts actually in use by this page. The PDF creator may e.g. have specified some global list, of which each page only makes partial use. + * In general, this is a true superset of the fonts actually in use by this page. The PDF creator may e.g. have specified some global list, of which each page make only partial use. + * Be aware that font names returned by some variants of :meth:`Page.get_text` (respectively :ref:`TextPage` methods) need not (exactly) equal the base font name shown here. Reasons for any differences include: + + - This method always shows any subset prefixes (the pattern ``ABCDEF+``), whereas text extractions do not do this by default. + - Text extractions use the base library to access the font name, which has a length cap of 31 bytes and generally interrogates the font file binary to access the name. Method ``get_page_fonts()`` however looks at the PDF definition source. + - Text extractions work for all supported document types in exactly the same way -- not just for PDFs. Consequently they do not contain PDF-specifics. .. method:: get_page_text(pno, output="text", flags=3, textpage=None, sort=False) @@ -978,11 +1057,11 @@ For details on **embedded files** refer to Appendix 3. .. method:: layout(rect=None, width=0, height=0, fontsize=11) - Re-paginate ("reflow") the document based on the given page dimension and fontsize. This only affects some document types like e-books and HTML. Ignored if not supported. Supported documents have *True* in property :attr:`is_reflowable`. + Re-paginate ("reflow") the document based on the given page dimension and fontsize. This only affects some document types like e-books and HTML. Ignored if not supported. Supported documents have ``True`` in property :attr:`is_reflowable`. :arg rect_like rect: desired page size. Must be finite, not empty and start at point (0, 0). - :arg float width: use it together with *height* as alternative to *rect*. - :arg float height: use it together with *width* as alternative to *rect*. + :arg float width: use it together with ``height`` as alternative to ``rect``. + :arg float height: use it together with ``width`` as alternative to ``rect``. :arg float fontsize: the desired default fontsize. .. method:: select(s) @@ -1088,7 +1167,7 @@ For details on **embedded files** refer to Appendix 3. PDF only: Return the :data:`xref` of the outline item. This is mainly used for internal purposes. - arg int idx: index of the item in list :meth:`Document.get_toc`. + :arg int idx: index of the item in list :meth:`Document.get_toc`. :returns: :data:`xref`. @@ -1154,7 +1233,7 @@ For details on **embedded files** refer to Appendix 3. Please consider that annotations are complex objects and may consist of more data "underneath" their visual appearance. Examples are "Text" and "FileAttachment" annotations. When "baking in" annotations / widgets with this method, all this underlying information (attached files, comments, associated PopUp annotations, etc.) will be lost and be removed on next garbage collection. - Use this feature for instance for methods :meth:`Document.insert_pdf` (which supports no copying of widgets) or :meth:`Page.show_pdf_page` (which supports neither annotations nor widgets) when the source pages should look exactly the same in the target. + Use this feature for instance for :meth:`Page.show_pdf_page` (which supports neither annotations nor widgets) when the source pages should look exactly the same in the target. :arg bool annots: convert annotations. @@ -1174,7 +1253,7 @@ For details on **embedded files** refer to Appendix 3. PDF only: Remove potentially sensitive data from the PDF. This function is inspired by the similar "Sanitize" function in Adobe Acrobat products. The process is configurable by a number of options. :arg bool attached_files: Search for 'FileAttachment' annotations and remove the file content. - :arg bool clean_pages: Remove any comments from page painting sources. If this option is set to *False*, then this is also done for *hidden_text* and *redactions*. + :arg bool clean_pages: Remove any comments from page painting sources. If this option is set to ``False``, then this is also done for *hidden_text* and *redactions*. :arg bool embedded_files: Remove embedded files. :arg bool hidden_text: Remove OCRed text and invisible text [#f7]_. :arg bool javascript: Remove JavaScript sources. @@ -1258,7 +1337,7 @@ For details on **embedded files** refer to Appendix 3. .. method:: saveIncr() - PDF only: saves the document incrementally. This is a convenience abbreviation for *doc.save(doc.name, incremental=True, encryption=PDF_ENCRYPT_KEEP)*. + PDF only: saves the document incrementally. This is a convenience abbreviation for ``doc.save(doc.name, incremental=True, encryption=PDF_ENCRYPT_KEEP)``. .. note:: @@ -1292,13 +1371,13 @@ For details on **embedded files** refer to Appendix 3. pair: rotate; Document.insert_pdf pair: links; Document.insert_pdf pair: annots; Document.insert_pdf + pair: widgets; Document.insert_pdf + pair: join_duplicates; Document.insert_pdf pair: show_progress; Document.insert_pdf - .. method:: insert_pdf(docsrc, from_page=-1, to_page=-1, start_at=-1, rotate=-1, links=True, annots=True, show_progress=0, final=1) - - * Changed in v1.19.3 - as a fix to issue `#537 `_, form fields are always excluded. + .. method:: insert_pdf(docsrc, *, from_page=-1, to_page=-1, start_at=-1, rotate=-1, links=True, annots=True, widgets=True, join_duplicates=False, show_progress=0, final=1) - PDF only: Copy the page range **[from_page, to_page]** (including both) of PDF document *docsrc* into the current one. Inserts will start with page number *start_at*. Value -1 indicates default values. All pages thus copied will be rotated as specified. Links and annotations can be excluded in the target, see below. All page numbers are 0-based. + PDF only: Copy the page range **[from_page, to_page]** (including both) of PDF document *docsrc* into the current one. Inserts will start with page number *start_at*. Value -1 indicates default values. All pages thus copied will be rotated as specified. Links, annotations and widgets can be excluded in the target, see below. All page numbers are 0-based. :arg docsrc: An opened PDF *Document* which must not be the current document. However, it may refer to the same underlying file. :type docsrc: *Document* @@ -1312,13 +1391,24 @@ For details on **embedded files** refer to Appendix 3. :arg int rotate: All copied pages will be rotated by the provided value (degrees, integer multiple of 90). :arg bool links: Choose whether (internal and external) links should be included in the copy. Default is `True`. *Named* links (:data:`LINK_NAMED`) and internal links to outside the copied page range are **always excluded**. - :arg bool annots: *(new in v1.16.1)* choose whether annotations should be included in the copy. Form **fields can never be copied** -- see below. + + :arg bool annots: choose whether annotations should be included in the copy. + + :arg bool widgets: choose whether annotations should be included in the copy. If `True` and at least one of the source pages contains form fields, the target PDF will be turned into a Form PDF (if not already being one). + + :arg bool join_duplicates: *(New in version 1.25.5)* Choose how to handle duplicate root field names in the source pages. This parameter is ignored if `widgets=False`. + + Default is ``False`` which will add unifying strings to the name of those source root fields which have a duplicate in the target. For instance, if "name" already occurs in the target, the source widget's name will be changed to "name [text]" with a suitably chosen string "text". + + If ``True``, root fields with duplicate names in source and target will be converted to so-called "Kids" of a "Parent" object (which lists all kid widgets in a PDF array). This will effectively turn those kids into instances of the "same" widget: if e.g. one of the kids is changed, then all its instances will automatically inherit this change -- no matter on which page they happen to be displayed. + :arg int show_progress: *(new in v1.17.7)* specify an interval size greater zero to see progress messages on `sys.stdout`. After each interval, a message like `Inserted 30 of 47 pages.` will be printed. - :arg int final: *(new in v1.18.0)* controls whether the list of already copied objects should be **dropped** after this method, default *True*. Set it to 0 except for the last one of multiple insertions from the same source PDF. This saves target file size and speeds up execution considerably. + + :arg int final: *(new in v1.18.0)* controls whether the list of already copied objects should be **dropped** after this method, default ``True``. Set it to 0 except for the last one of multiple insertions from the same source PDF. This saves target file size and speeds up execution considerably. .. note:: - 1. This is a page-based method. Document-level information of source documents is therefore ignored. Examples include Optional Content, Embedded Files, `StructureElem`, `AcroForm`, table of contents, page labels, metadata, named destinations (and other named entries) and some more. As a consequence, specifically, **Form Fields (widgets) can never be copied** -- although they seem to appear on pages only. Look at :meth:`Document.bake` for converting a source document if you need to retain at least widget **appearances.** + 1. This is a page-based method. Document-level information of source documents is therefore mostly ignored. Examples include Optional Content, Embedded Files, `StructureElem`, table of contents, page labels, metadata, named destinations (and other named entries) and some more. 2. If `from_page > to_page`, pages will be **copied in reverse order**. If `0 <= from_page == to_page`, then one page will be copied. @@ -1354,13 +1444,13 @@ For details on **embedded files** refer to Appendix 3. PDF only: Insert an empty page. - :arg int pno: page number in front of which the new page should be inserted. Must be in *1 < pno <= page_count*. Special values -1 and *doc.page_count* insert **after** the last page. + :arg int pno: page number index (zero-indexed) at which to insert page. Special values -1 and *doc.page_count* insert **after** the last page. :arg float width: page width. :arg float height: page height. :rtype: :ref:`Page` - :returns: the created page object. + :returns: the created page object. Be aware that the page numbers of pages after the inserted one will have changed after method execution. For the same reason, **all existing page objects will be invalidated.** Using them will lead to exceptions. .. index:: pair: fontsize; Document.insert_page @@ -1374,7 +1464,7 @@ For details on **embedded files** refer to Appendix 3. PDF only: Insert a new page and insert some text. Convenience function which combines :meth:`Document.new_page` and (parts of) :meth:`Page.insert_text`. - :arg int pno: page number (0-based) **in front of which** to insert. Must be in `range(-1, doc.page_count + 1)`. Special values -1 and `doc.page_count` insert **after** the last page. + :arg int pno: page number index (zero-indexed) at which to insert page. Special values -1 and `doc.page_count` insert **after** the last page. Changed in v1.14.12 This is now a positional parameter @@ -1386,7 +1476,7 @@ For details on **embedded files** refer to Appendix 3. .. method:: delete_page(pno=-1) - PDF only: Delete a page given by its 0-based number in `-∞ < pno < page_count - 1`. + PDF only: Delete a page given by its 0-based number in `-∞ < pno < page_count`. * Changed in v1.18.14: support Python's `del` statement. @@ -1551,21 +1641,19 @@ For details on **embedded files** refer to Appendix 3. :rtype: dict :returns: a dictionary with the following keys: - * *name* -- (*str*) name under which this entry is stored - * *filename* -- (*str*) filename - * *ufilename* -- (*unicode*) filename - * *desc* -- (*str*) description - * *size* -- (*int*) original file size - * *length* -- (*int*) compressed file length - * *creationDate* -- *(New in v1.18.13)* (*str*) date-time of item creation in PDF format - * *modDate* -- *(New in v1.18.13)* (*str*) date-time of last change in PDF format - * *collection* -- *(New in v1.18.13)* (*int*) :data:`xref` of the associated PDF portfolio item if any, else zero. - * *checksum* -- *(New in v1.18.13)* (*str*) a hashcode of the stored file content as a hexadecimal string. Should be MD5 according to PDF specifications, but be prepared to see other hashing algorithms. + * ``name`` -- (*str*) name under which this entry is stored + * ``filename`` -- (*str*) filename + * ``ufilename`` -- (*unicode*) filename + * ``description`` -- (*str*) description + * ``size`` -- (*int*) original file size + * ``length`` -- (*int*) compressed file length + * ``creationDate`` -- (*str*) date-time of item creation in PDF format + * ``modDate`` -- (*str*) date-time of last change in PDF format + * ``collection`` -- (*int*) :data:`xref` of the associated PDF portfolio item if any, else zero. + * ``checksum`` -- (*str*) a hashcode of the stored file content as a hexadecimal string. Should be MD5 according to PDF specifications, but be prepared to see other hashing algorithms. .. method:: embfile_names() - * New in v1.14.16 - PDF only: Return a list of embedded file names. The sequence of the names equals the physical sequence in the document. :rtype: list @@ -1623,7 +1711,7 @@ For details on **embedded files** refer to Appendix 3. * New in v1.16.8 - PDF only: Return the trailer source of the PDF, which is usually located at the PDF file's end. This is :meth:`Document.xref_object` with an *xref* argument of -1. + PDF only: Return the trailer source of the PDF, which is usually located at the PDF file's end. This is :meth:`Document.xref_object` with an :data:`xref` argument of -1. .. method:: xref_stream(xref) @@ -1669,7 +1757,7 @@ For details on **embedded files** refer to Appendix 3. * Changed in v1.19.2: added parameter "compress" * Changed in v1.19.6: deprecated parameter "new". Now confirms that the object is a PDF dictionary object. - Replace the stream of an object identified by *xref*, which must be a PDF dictionary. If the object is no :data:`stream`, it will be turned into one. The function automatically performs a compress operation ("deflate") where beneficial. + Replace the stream of an object identified by :data:`xref`, which must be a PDF dictionary. If the object is no :data:`stream`, it will be turned into one. The function automatically performs a compress operation ("deflate") where beneficial. :arg int xref: :data:`xref` number. @@ -1680,7 +1768,7 @@ For details on **embedded files** refer to Appendix 3. :arg bool new: *deprecated* and ignored. Will be removed some time after v1.20.0. :arg bool compress: whether to compress the inserted stream. If `True` (default), the stream will be inserted using `/FlateDecode` compression (if beneficial), otherwise the stream will inserted as is. - :raises ValueError: if *xref* does not represent a PDF :data:`dict`. An empty dictionary ``<<>>`` is accepted. So if you just created the xref and want to give it a stream, first execute `doc.update_object(xref, "<<>>")`, and then insert the stream data with this method. + :raises ValueError: if :data:`xref` does not represent a PDF :data:`dict`. An empty dictionary ``<<>>`` is accepted. So if you just created the xref and want to give it a stream, first execute `doc.update_object(xref, "<<>>")`, and then insert the stream data with this method. The method is primarily (but not exclusively) intended to manipulate streams containing PDF operator syntax (see pp. 643 of the :ref:`AdobeManual`) as it is the case for e.g. page content streams. @@ -1693,19 +1781,19 @@ For details on **embedded files** refer to Appendix 3. * New in v1.19.5 - PDF Only: Make *target* xref an exact copy of *source*. If *source* is a :data:`stream`, then these data are also copied. + PDF Only: Make ``target`` xref an exact copy of ``source``. If ``source`` is a :data:`stream`, then this data is also copied. :arg int source: the source :data:`xref`. It must be an existing **dictionary** object. :arg int target: the target xref. Must be an existing **dictionary** object. If the xref has just been created, make sure to initialize it as a PDF dictionary with the minimum specification ``<<>>``. - :arg list keep: an optional list of top-level keys in *target*, that should not be removed in preparation of the copy process. + :arg list keep: an optional list of top-level keys in ``target``, that should not be removed in preparation of the copy process. .. note:: * This method has much in common with Python's *dict* method `copy()`. * Both xref numbers must represent existing dictionaries. - * Before data is copied from *source*, all *target* dictionary keys are deleted. You can specify exceptions from this in the *keep* list. If *source* however has a same-named key, its value will still replace the target. - * If *source* is a :data:`stream` object, then these data will also be copied over, and *target* will be converted to a stream object. - * A typical use case is to replace or remove an existing image without using redaction annotations. Example scripts can be seen `here `_. + * Before data is copied from *source*, all *target* dictionary keys are deleted. You can specify exceptions from this in the ``keep`` list. If *source* however has a same-named key, its value will still replace the target. + * If ``source`` is a :data:`stream` object, then these data will also be copied over, and ``target`` will be converted to a stream object. + * A typical use case is to replace or remove an existing image without using redaction annotations. Example scripts can be seen `in this PyMuPDF Utilities example `_. .. method:: Document.extract_image(xref) @@ -1718,8 +1806,8 @@ For details on **embedded files** refer to Appendix 3. * *ext* (*str*) image type (e.g. *'jpeg'*), usable as image file extension * *smask* (*int*) :data:`xref` number of a stencil (/SMask) image or zero - * *width* (*int*) image width - * *height* (*int*) image height + * ``width`` (*int*) image width + * ``height`` (*int*) image height * *colorspace* (*int*) the image's *colorspace.n* number. * *cs-name* (*str*) the image's *colorspace.name*. * *xres* (*int*) resolution in x direction. Please also see :data:`resolution`. @@ -1810,7 +1898,7 @@ For details on **embedded files** refer to Appendix 3. PDF only: Check whether there are links, resp. annotations anywhere in the document. - :returns: *True* / *False*. As opposed to fields, which are also stored in a central place of a PDF document, the existence of links / annotations can only be detected by parsing each page. These methods are tuned to do this efficiently and will immediately return, if the answer is *True* for a page. For PDFs with many thousand pages however, an answer may take some time [#f6]_ if no link, resp. no annotation is found. + :returns: ``True`` / ``False``. As opposed to fields, which are also stored in a central place of a PDF document, the existence of links / annotations can only be detected by parsing each page. These methods are tuned to do this efficiently and will immediately return, if the answer is ``True`` for a page. For PDFs with many thousand pages however, an answer may take some time [#f6]_ if no link, resp. no annotation is found. .. method:: subset_fonts(verbose=False, fallback=False) @@ -1931,25 +2019,25 @@ For details on **embedded files** refer to Appendix 3. .. attribute:: is_closed - *False* if document is still open. If closed, most other attributes and methods will have been deleted / disabled. In addition, :ref:`Page` objects referring to this document (i.e. created with :meth:`Document.load_page`) and their dependent objects will no longer be usable. For reference purposes, :attr:`Document.name` still exists and will contain the filename of the original document (if applicable). + ``False`` if document is still open. If closed, most other attributes and methods will have been deleted / disabled. In addition, :ref:`Page` objects referring to this document (i.e. created with :meth:`Document.load_page`) and their dependent objects will no longer be usable. For reference purposes, :attr:`Document.name` still exists and will contain the filename of the original document (if applicable). :type: bool .. attribute:: is_dirty - *True* if this is a PDF document and contains unsaved changes, else *False*. + ``True`` if this is a PDF document and contains unsaved changes, else ``False``. :type: bool .. attribute:: is_pdf - *True* if this is a PDF document, else *False*. + ``True`` if this is a PDF document, else ``False``. :type: bool .. attribute:: is_form_pdf - *False* if this is not a PDF or has no form fields, otherwise the number of root form fields (fields with no ancestors). + ``False`` if this is not a PDF or has no form fields, otherwise the number of root form fields (fields with no ancestors). *(Changed in v1.16.4)* Returns the total number of (root) form fields. @@ -1957,7 +2045,7 @@ For details on **embedded files** refer to Appendix 3. .. attribute:: is_reflowable - *True* if document has a variable page layout (like e-books or HTML). In this case you can set the desired page dimensions during document creation (open) or via method :meth:`layout`. + ``True`` if document has a variable page layout (like e-books or HTML). In this case you can set the desired page dimensions during document creation (open) or via method :meth:`layout`. :type: bool @@ -1965,7 +2053,7 @@ For details on **embedded files** refer to Appendix 3. * New in v1.18.2 - *True* if PDF has been repaired during open (because of major structure issues). Always *False* for non-PDF documents. If true, more details have been stored in `TOOLS.mupdf_warnings()`, and :meth:`Document.can_save_incrementally` will return *False*. + ``True`` if PDF has been repaired during open (because of major structure issues). Always ``False`` for non-PDF documents. If true, more details have been stored in `TOOLS.mupdf_warnings()`, and :meth:`Document.can_save_incrementally` will return ``False``. :type: bool @@ -1973,7 +2061,7 @@ For details on **embedded files** refer to Appendix 3. * New in v1.22.2 - *True* if PDF is in linearized format. *False* for non-PDF documents. + ``True`` if PDF is in linearized format. ``False`` for non-PDF documents. :type: bool @@ -2017,7 +2105,7 @@ For details on **embedded files** refer to Appendix 3. .. attribute:: is_encrypted - This indicator initially equals :attr:`Document.needs_pass`. After successful authentication, it is set to *False* to reflect the situation. + This indicator initially equals :attr:`Document.needs_pass`. After successful authentication, it is set to ``False`` to reflect the situation. :type: bool @@ -2101,7 +2189,7 @@ Clear metadata information. If you do this out of privacy / data protection conc {'producer': 'none', 'format': 'PDF 1.4', 'encryption': None, 'author': 'none', 'modDate': 'none', 'keywords': 'none', 'title': 'none', 'creationDate': 'none', 'creator': 'none', 'subject': 'none'} ->>> doc._delXmlMetadata() # clear any XML metadata +>>> doc.del_xml_metadata() # clear any XML metadata >>> doc.save("anonymous.pdf", garbage = 4) # save anonymized doc :meth:`set_toc` Demonstration @@ -2185,7 +2273,7 @@ Other Examples .. [#f5] Examples for "Form XObjects" are created by :meth:`Page.show_pdf_page`. -.. [#f6] For a *False* the **complete document** must be scanned. Both methods **do not load pages,** but only scan object definitions. This makes them at least 10 times faster than application-level loops (where total response time roughly equals the time for loading all pages). For the :ref:`AdobeManual` (756 pages) and the Pandas documentation (over 3070 pages) -- both have no annotations -- the method needs about 11 ms for the answer *False*. So response times will probably become significant only well beyond this order of magnitude. +.. [#f6] For a ``False`` the **complete document** must be scanned. Both methods **do not load pages,** but only scan object definitions. This makes them at least 10 times faster than application-level loops (where total response time roughly equals the time for loading all pages). For the :ref:`AdobeManual` (756 pages) and the Pandas documentation (over 3070 pages) -- both have no annotations -- the method needs about 11 ms for the answer ``False``. So response times will probably become significant only well beyond this order of magnitude. .. [#f7] This only works under certain conditions. For example, if there is normal text covered by some image on top of it, then this is undetectable and the respective text is **not** removed. Similar is true for white text on white background, and so on. diff --git a/docs/font.rst b/docs/font.rst index b4e259499..875213c17 100644 --- a/docs/font.rst +++ b/docs/font.rst @@ -8,9 +8,9 @@ Font * New in v1.16.18 -This class represents a font as defined in MuPDF (*fz_font_s* structure). It is required for the new class :ref:`TextWriter` and the new :meth:`Page.write_text`. Currently, it has no connection to how fonts are used in methods :meth:`Page.insert_text` or :meth:`Page.insert_textbox`, respectively. +This class represents a font as defined in |MuPDF| (``fz_font_s`` structure). It is required for the new class :ref:`TextWriter` and the new :meth:`Page.write_text`. Currently, it has no connection to how fonts are used in methods :meth:`Page.insert_text` or :meth:`Page.insert_textbox`, respectively. -A Font object also contains useful general information, like the font bbox, the number of defined glyphs, glyph names or the bbox of a single glyph. +A ``Font`` object also contains useful general information, like the font bbox, the number of defined glyphs, glyph names or the ``bbox`` of a single glyph. ==================================== ============================================ @@ -74,7 +74,7 @@ A Font object also contains useful general information, like the font bbox, the :arg bool is_italic: look for an italic font. :arg bool is_serif: look for a serifed font. - :returns: a MuPDF font if successful. This is the overall sequence of checks to determine an appropriate font: + :returns: a |MuPDF| font if successful. This is the overall sequence of checks to determine an appropriate font: =========== ============================================================ Argument Action @@ -138,9 +138,9 @@ A Font object also contains useful general information, like the font bbox, the .. method:: has_glyph(chr, language=None, script=0, fallback=False) - Check whether the unicode *chr* exists in the font or (option) some fallback font. May be used to check whether any "TOFU" symbols will appear on output. + Check whether the unicode ``chr`` exists in the font or (option) some fallback font. May be used to check whether any "TOFU" symbols will appear on output. - :arg int chr: the unicode of the character (i.e. *ord()*). + :arg int chr: the unicode of the character (i.e. ``ord()``). :arg str language: the language -- currently unused. :arg int script: the UCDN script number. :arg bool fallback: *(new in v1.17.5)* perform an extended search in fallback fonts or restrict to current font (default). @@ -152,7 +152,7 @@ A Font object also contains useful general information, like the font bbox, the Return an array of unicodes supported by this font. - :returns: an *array.array* [#f2]_ of length at most :attr:`Font.glyph_count`. I.e. *chr()* of every item in this array has a glyph in the font without using fallbacks. This is an example display of the supported glyphs: + :returns: an ``array.array`` [#f2]_ of length at most :attr:`Font.glyph_count`. I.e. ``chr()`` of every item in this array has a glyph in the font without using fallbacks. This is an example display of the supported glyphs: >>> import pymupdf >>> font = pymupdf.Font("math") @@ -191,8 +191,8 @@ A Font object also contains useful general information, like the font bbox, the Calculate the "width" of the character's glyph (visual representation). - :arg int chr: the unicode number of the character. Use *ord()*, not the character itself. Again, this should normally work even if a character is not supported by that font, because fallback fonts will be checked where necessary. - :arg int wmode: write mode, 0 = horizontal, 1 = vertical. + :arg int chr: the unicode number of the character. Use ``ord()``, not the character itself. Again, this should normally work even if a character is not supported by that font, because fallback fonts will be checked where necessary. + :arg int wmode: write mode, ``0`` = horizontal, ``1`` = vertical. The other parameters are not in use currently. @@ -218,7 +218,7 @@ A Font object also contains useful general information, like the font bbox, the The glyph rectangle relative to :data:`fontsize` 1. - :arg int chr: *ord()* of the character. + :arg int chr: ``ord()`` of the character. :returns: a :ref:`Rect`. @@ -227,7 +227,7 @@ A Font object also contains useful general information, like the font bbox, the Show the name of the character's glyph. - :arg int ch: the unicode number of the character. Use *ord()*, not the character itself. + :arg int ch: the unicode number of the character. Use ``ord()``, not the character itself. :returns: a string representing the glyph's name. E.g. `font.glyph_name(ord("#")) = "numbersign"`. For an invalid code ".notfound" is returned. @@ -340,7 +340,7 @@ A Font object also contains useful general information, like the font bbox, the * New in v1.18.0 - The ascender value of the font, see `here `_ for details. Please note that there is a difference to the strict definition: our value includes everything above the baseline -- not just the height difference between upper case "A" and and lower case "a". + The ascender value of the font, see `ascender typography `_ for details. Please note that there is a difference to the strict definition: our value includes everything above the baseline -- not just the height difference between upper case "A" and and lower case "a". :rtype: float @@ -348,7 +348,7 @@ A Font object also contains useful general information, like the font bbox, the * New in v1.18.0 - The descender value of the font, see `here `_ for details. This value always is negative and is the portion that some glyphs descend below the base line, for example "g" or "y". As a consequence, the value `ascender - descender` is the total height, that every glyph of the font fits into. This is true at least for most fonts -- as always, there are exceptions, especially for calligraphic fonts, etc. + The descender value of the font, see `descender typography `_ for details. This value always is negative and is the portion that some glyphs descend below the base line, for example "g" or "y". As a consequence, the value `ascender - descender` is the total height, that every glyph of the font fits into. This is true at least for most fonts -- as always, there are exceptions, especially for calligraphic fonts, etc. :rtype: float diff --git a/docs/footer.rst b/docs/footer.rst index ef4dd145b..7e652a942 100644 --- a/docs/footer.rst +++ b/docs/footer.rst @@ -1,34 +1,21 @@ -.. raw:: html - - - ---- .. raw:: html - -

This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at artifex.com or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.

- - diff --git a/docs/how-to-open-a-file.rst b/docs/how-to-open-a-file.rst index 26bde98d0..d40fb2cf9 100644 --- a/docs/how-to-open-a-file.rst +++ b/docs/how-to-open-a-file.rst @@ -11,9 +11,15 @@ Opening Files .. _Supported_File_Types: + Supported File Types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +| + +PyMuPDF +""""""""" + |PyMuPDF| can open files other than just |PDF|. The following file types are supported: @@ -21,43 +27,63 @@ The following file types are supported: .. include:: supported-files-table.rst +---- -How to Open a File -~~~~~~~~~~~~~~~~~~~~~ -To open a file, do the following: +PyMuPDF Pro +""""""""""""""" -.. code-block:: python +|PyMuPDF Pro| can open Office files. - doc = pymupdf.open("a.pdf") +The following file types are supported: +.. list-table:: + :header-rows: 1 -.. note:: The above creates a :ref:`Document`. The instruction `doc = pymupdf.Document("a.pdf")` does exactly the same. So, `open` is just a convenient alias and you can find its full API documented in that chapter. + * - **DOC/DOCX** + - **XLS/XLSX** + - **PPT/PPTX** + - **HWP/HWPX** + * - .. image:: images/icons/icon-docx.svg + :width: 40 + :height: 40 + - .. image:: images/icons/icon-xlsx.svg + :width: 40 + :height: 40 + - .. image:: images/icons/icon-pptx.svg + :width: 40 + :height: 40 + - .. image:: images/icons/icon-hangul.svg + :width: 40 + :height: 40 -Opening with :index:`a Wrong File Extension ` -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -If you have a document with a wrong file extension for its type, you can still correctly open it. +How to Open a File +~~~~~~~~~~~~~~~~~~~~~ -Assume that *"some.file"* is actually an **XPS**. Open it like so: +To open a file, do the following: .. code-block:: python - doc = pymupdf.open("some.file", filetype="xps") + doc = pymupdf.open("a.pdf") +.. note:: The above creates a :ref:`Document`. The instruction `doc = pymupdf.Document("a.pdf")` does exactly the same. So, `open` is just a convenient alias and you can find its full API documented in that chapter. -.. note:: - |PyMuPDF| itself does not try to determine the file type from the file contents. **You** are responsible for supplying the file type information in some way -- either implicitly, via the file extension, or explicitly as shown with the `filetype` parameter. There are pure :title:`Python` packages like `filetype `_ that help you doing this. Also consult the :ref:`Document` chapter for a full description. +File Recognizer: Opening with :index:`a Wrong File Extension ` +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - If |PyMuPDF| encounters a file with an unknown / missing extension, it will try to open it as a |PDF|. So in these cases there is no need for additional precautions. Similarly, for memory documents, you can just specify `doc=pymupdf.open(stream=mem_area)` to open it as a |PDF| document. +If you have a document with a wrong file extension for its type, do not worry: it will still be opened correctly, thanks to the integrated file "content recognizer". - If you attempt to open an unsupported file then |PyMuPDF| will throw a file data error. +This component looks at the actual data in the file using a number of heuristics -- independent of the file extension. This of course is also true for file names **without** an extension. +Here is a list of details about how the file content recognizer works: +* When opening from a file name, use the ``filetype`` parameter if your file format cannot be determined by content inspection. This is for instance the case for all text files: "txt", "html", "xml" or source files. If the file extension is missing or wrong or the file resides in memory, the ``filetype`` must be used. File formats that can successfully be recognized will be opened even without or wrong extensions, and the ``filetype`` paraneter will be ignored. +* Files based on text content do not contain unambiguously recognizable internal structures. This is true for source files (Python, C, etc.) but also HTML, XML and so on. Here, the file extensions and the ``filetype`` parameter continue to play a role and are used to create a "Tex" / "HTML" / ... document. Correspondingly, text files with other / no extensions, can successfully be opened using ``filetype``. ---------- @@ -87,6 +113,34 @@ For further examples which deal with files held on typical cloud services please +---------- + + +Opening Django Files +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Django implements a `File Storage API `_ to store files. The default is the `FileSystemStorage `_, but the `django-storages `_ library provides a number of other storage backends. + +You can open the file, move the contents into memory, then pass the contents to |PyMuPDF| as a stream. + +.. code-block:: python + + import pymupdf + from django.core.files.storage import default_storage + + from .models import MyModel + + obj = MyModel.objects.get(id=1) + with default_storage.open(obj.file.name) as f: + data = f.read() + + doc = pymupdf.Document(stream=data) + +Please note that if the file you open is large, you may run out of memory. + +The File Storage API works well if you're using different storage backends in different environments. If you're only using the `FileSystemStorage`, you can simply use the `obj.file.name` to open the file directly with |PyMuPDF| as shown in an earlier example. + + ---------- @@ -136,14 +190,7 @@ Opening a `JSON` file And so on! -As you can imagine many text based file formats can be *very simply opened* and *interpreted* by |PyMuPDF|. This can make data analysis and extraction for a wide range of previously unavailable files suddenly possible. - - - - - - - +As you can imagine many text based file formats can be *very simply opened* and *interpreted* by |PyMuPDF|. This can make data analysis and extraction for a wide range of previously unavailable files possible. .. include:: footer.rst diff --git a/docs/images/img-freetext.jpg b/docs/images/img-freetext1.jpg similarity index 100% rename from docs/images/img-freetext.jpg rename to docs/images/img-freetext1.jpg diff --git a/docs/images/img-freetext2.jpg b/docs/images/img-freetext2.jpg new file mode 100644 index 000000000..36fe4f47c Binary files /dev/null and b/docs/images/img-freetext2.jpg differ diff --git a/docs/images/img-matrix-9.png b/docs/images/img-matrix-9.png new file mode 100644 index 000000000..ee6be7e2d Binary files /dev/null and b/docs/images/img-matrix-9.png differ diff --git a/docs/images/pymupdf-logo.png b/docs/images/pymupdf-logo.png index 500be0230..2ea48ca60 100644 Binary files a/docs/images/pymupdf-logo.png and b/docs/images/pymupdf-logo.png differ diff --git a/docs/images/pymupdf-sidebar-logo.png b/docs/images/pymupdf-sidebar-logo.png deleted file mode 100644 index 5a1e37729..000000000 Binary files a/docs/images/pymupdf-sidebar-logo.png and /dev/null differ diff --git a/docs/images/spikes-no.png b/docs/images/spikes-no.png new file mode 100644 index 000000000..ac26eeedb Binary files /dev/null and b/docs/images/spikes-no.png differ diff --git a/docs/images/spikes-yes.png b/docs/images/spikes-yes.png new file mode 100644 index 000000000..ac68dad5e Binary files /dev/null and b/docs/images/spikes-yes.png differ diff --git a/docs/index.rst b/docs/index.rst index bed928308..509efc3ab 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -19,10 +19,16 @@ Welcome to |PyMuPDF| ================================ -|PyMuPDF| is a high-performance **Python** library for data extraction, analysis, conversion & manipulation of **PDF** (and other) documents. +|PyMuPDF| is a high-performance **Python** library for data extraction, analysis, conversion & manipulation of |PDF| (and other) documents. |PyMuPDF| is hosted on `GitHub `_ and registered on `PyPI `_. +.. if we want a Github repo badge + + .. raw:: html + + pymupdf%2FPyMuPDF | Trendshift + ---- @@ -35,8 +41,10 @@ This documentation covers all versions up to |version|. :maxdepth: 1 about.rst + pymupdf-layout/index.rst pymupdf4llm/index.rst - pymupdf-pro.rst + pymupdf-pro/index.rst + .. toctree:: diff --git a/docs/installation.rst b/docs/installation.rst index 9c37b239a..512545701 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -30,7 +30,7 @@ For example: Installation --------------------------------------------------------- -PyMuPDF should be installed using pip with:: +|PyMuPDF| should be installed using pip with:: pip install --upgrade pymupdf @@ -67,7 +67,7 @@ Problems after installation * On Windows, Python error:: - ImportError: DLL load failed while importing _fitz + ImportError: DLL load failed while importing _extra This has been occasionally seen if `MSVCP140.dll` is missing, and appears to be caused by a bug in some versions (2015-2017) of `Microsoft Visual C++ @@ -114,6 +114,14 @@ Problems after installation This appears to be a problem in Jupyter labs; see: https://github.com/pymupdf/PyMuPDF/issues/3643#issuecomment-2210588778. +* On Windows, Python error:: + + ImportError: dynamic module does not define module export function (PyInit__extra) + + This was reported 2025-03-26 in https://github.com/pymupdf/PyMuPDF/issues/4405. + + The fix appears to be to install the latest `VC_redist.x64.exe`. + Notes --------------------------------------------------------- @@ -134,13 +142,12 @@ Notes * Each wheel uses the Python Stable ABI of the current oldest supported - Python version (currently 3.9), and so works with all later Python + Python version (currently 3.10), and so works with all later Python versions, including new Python releases. * - Wheels are tested on all Python versions currently marked as "Supported" on - https://devguide.python.org/versions/, currently 3.9, 3.10, 3.11, 3.12 and - 3.13. + Wheels are tested on all Python versions currently marked as "Supported" + on https://devguide.python.org/versions/, currently |python_versions|. * Wheels are not available for Python installed with `Chocolatey @@ -159,7 +166,12 @@ Notes * `Pillow `_ is required for :meth:`Pixmap.pil_save` and :meth:`Pixmap.pil_tobytes`. * `fontTools `_ is required for :meth:`Document.subset_fonts`. * `pymupdf-fonts `_ is a collection of nice fonts to be used for text output methods. - * `Tesseract-OCR `_ for optical character recognition in images and document pages. Tesseract is separate software, not a Python package. To enable OCR functions in PyMuPDF, the software must be installed and the system environment variable `"TESSDATA_PREFIX"` must be defined and contain the `tessdata` folder name of the Tesseract installation location. See below. + * + `Tesseract-OCR `_ for optical + character recognition in images and document pages. Tesseract is separate + software, not a Python package. To enable OCR functions in PyMuPDF, + Tesseract must be installed and the `tessdata` folder name specified; see + below. .. note:: You can install these additional components at any time -- before or after installing PyMuPDF. PyMuPDF will detect their presence during import or when the respective functions are being used. @@ -212,7 +224,7 @@ Also, one can build for different Python versions in the same PyMuPDF tree: So for example on Windows one can build different versions with:: - cd PyMuPDF && py -3.9 -m pip install . + cd PyMuPDF && py -3.10 -m pip install . or:: @@ -252,6 +264,28 @@ not generally supported: command line. +Official PyMuPDF Linux wheels may not install on older Linux systems +-------------------------------------------------------------------- + +Releases of PyMuPDF are incompatible with older Linux systems. + +For example as of 2025-09-03, `pip install pymupdf` does not work on some AWS +Lambda systems - see https://github.com/pymupdf/PyMuPDF/discussions/4631. + +This is because official PyMuPDF Linux wheels are built with a version of +glibc determined by the current Python manylinux environment. These wheels are +incompatible with Linux systems that have an older glibc. + +The official Python manylinux environment is updated periodically to use newer +glibc versions, so new releases of PyMuPDF become increasingly incompatible +with older Linux systems. + +There is nothing that can be done about this, other than updating older Linux +systems, or building PyMuPDF locally from source. + +For more details, please see: `Python Packaging Authority `_. + + Packaging --------- @@ -264,6 +298,8 @@ Using with Pyodide See :doc:`pyodide`. +.. _installation_ocr: + Enabling Integrated OCR Support --------------------------------------------------------- @@ -271,18 +307,27 @@ If you do not intend to use this feature, skip this step. Otherwise, it is requi PyMuPDF will already contain all the logic to support OCR functions. But it additionally does need `Tesseract’s language support data `_. -The language support folder location must be communicated either via storing it in the environment variable `"TESSDATA_PREFIX"`, or as a parameter in the applicable functions. +If not specified explicitly, PyMuPDF will attempt to find the installed +Tesseract's tessdata, but this should probably not be relied upon. + +Otherwise PyMuPDF requires that Tesseract's language support folder is +specified explicitly either in PyMuPDF OCR functions' `tessdata` arguments or +`os.environ["TESSDATA_PREFIX"]`. So for a working OCR functionality, make sure to complete this checklist: 1. Locate Tesseract's language support folder. Typically you will find it here: - - Windows: `C:/Program Files/Tesseract-OCR/tessdata` - - Unix systems: `/usr/share/tesseract-ocr/4.00/tessdata` - -2. Set the environment variable `TESSDATA_PREFIX` - - Windows: `setx TESSDATA_PREFIX "C:/Program Files/Tesseract-OCR/tessdata"` - - Unix systems: `declare -x TESSDATA_PREFIX=/usr/share/tesseract-ocr/4.00/tessdata` -.. note:: On Windows systems, this must happen outside Python -- before starting your script. Just manipulating `os.environ` will not work! + * Windows: `C:/Program Files/Tesseract-OCR/tessdata` + * Unix systems: `/usr/share/tesseract-ocr/4.00/tessdata` + +2. Specify the language support folder when calling PyMuPDF OCR functions: + + * Set the `tessdata` argument. + * Or set `os.environ["TESSDATA_PREFIX"]` from within Python. + * Or set environment variable `TESSDATA_PREFIX` before running Python, for example: + + * Windows: `setx TESSDATA_PREFIX "C:/Program Files/Tesseract-OCR/tessdata"` + * Unix systems: `declare -x TESSDATA_PREFIX=/usr/share/tesseract-ocr/4.00/tessdata` .. include:: footer.rst diff --git a/docs/intro.rst b/docs/intro.rst deleted file mode 100644 index 36c3b0296..000000000 --- a/docs/intro.rst +++ /dev/null @@ -1,67 +0,0 @@ -.. include:: header.rst - -Introduction -============== - -.. image:: images/pymupdf-logo.png - :align: center - :scale: 10% - -.. - Don't delete the bar symbol - it forces a line break beneath the image - which is required. - -| - -**PyMuPDF** is a Python binding for `MuPDF `_ -- a lightweight PDF, XPS, and E-book viewer, renderer, and toolkit, which is maintained and developed by Artifex Software, Inc - -MuPDF can access files in PDF, XPS, OpenXPS, CBZ, EPUB, MOBI and FB2 (e-books) formats, and it is known for its top performance and high rendering quality. - -MuPDF stands out among all similar products for its top rendering capability and unsurpassed processing speed. At the same time, its "light weight" makes it an excellent choice for platforms where resources are typically limited, like smartphones. - -Check this out yourself and compare the various free PDF-viewers. In terms of speed and rendering quality `SumatraPDF `_ ranges at the top (apart from MuPDF's own standalone viewer) -- since it has changed its library basis to MuPDF! - -With PyMuPDF you can access files with extensions like “.pdf”, “.xps”, “.oxps”, “.cbz”, “.fb2”, ".mobi" or “.epub”. In addition, about 10 popular image formats can also be opened and handled like documents. - -PyMuPDF provides access to many important functions of MuPDF from within a Python environment, and we are continuously seeking to expand this function set. - -PyMuPDF runs and has been tested on Mac, Linux and Windows for all currently supported Python versions. Other platforms should work too, as long as MuPDF and Python support them. - -PyMuPDF is hosted on `GitHub `_ and registered on `PyPI `_. - -For MS Windows, Mac OSX and Linux Python wheels are available -- please see the installation chapter. - -The GitHub repository `PyMuPDF-Utilities `_ contains a full range of examples, demonstrations and use cases. - -Note on the legacy module name *fitz* -------------------------------------- -Prior to release 1.24.3, the top level Python import name for this library was **"fitz"**. This has historical reasons: - -The original rendering library for MuPDF was called *Libart*. - -*"After Artifex Software acquired the MuPDF project, the development focus shifted on writing a new modern graphics library called "Fitz". Fitz was originally intended as an R&D project to replace the aging Ghostscript graphics library, but has instead become the rendering engine powering MuPDF."* (Quoted from `Wikipedia `_). - -`import fitz` is still supported for backwards compatibility. - -.. note:: - - Use of legacy name `fitz` can fail if defunct package pypi.org `fitz` is installed; see :ref:`problems-after-installation`. - - -License and Copyright ----------------------- -In order to comply with MuPDF’s dual licensing model, PyMuPDF has entered into an agreement with Artifex who has the right to sublicense PyMuPDF to third parties. - -PyMuPDF and MuPDF are now available under both, open-source AGPL and commercial license agreements. Please read the full text of the AGPL license agreement, available in the distribution material (file COPYING) and `here `_, to ensure that your use case complies with the guidelines of the license. If you determine you cannot meet the requirements of the AGPL, please contact `Artifex `_ for more information regarding a commercial license. - -Artifex is the exclusive commercial licensing agent for MuPDF. - -Artifex, the Artifex logo, MuPDF, and the MuPDF logo are registered trademarks of Artifex Software Inc. © 2022 Artifex Software, Inc. All rights reserved. - -.. include:: version.rst - ------ - -.. rubric:: Footnotes - - -.. include:: footer.rst diff --git a/docs/irect.rst b/docs/irect.rst index c61115589..4d1fc55bd 100644 --- a/docs/irect.rst +++ b/docs/irect.rst @@ -72,16 +72,16 @@ IRect is a rectangular bounding box, very similar to :ref:`Rect`, except that al .. method:: contains(x) - Checks whether *x* is contained in the rectangle. It may be :data:`rect_like`, :data:`point_like` or a number. If *x* is an empty rectangle, this is always true. Conversely, if the rectangle is empty this is always *False*, if *x* is not an empty rectangle and not a number. If *x* is a number, it will be checked to be one of the four components. *x in irect* and *irect.contains(x)* are equivalent. + Checks whether *x* is contained in the rectangle. It may be :data:`rect_like`, :data:`point_like` or a number. If *x* is an empty rectangle, this is always true. Conversely, if the rectangle is empty this is always ``False``, if *x* is not an empty rectangle and not a number. If *x* is a number, it will be checked to be one of the four components. *x in irect* and *irect.contains(x)* are equivalent. :arg x: the object to check. - :type x: :ref:`IRect` or :ref:`Rect` or :ref:`Point` or int + :type x: :ref:`IRect` or :ref:`Rect` or :ref:`Point` or `int`. :rtype: bool .. method:: intersects(r) - Checks whether the rectangle and the :data:`rect_like` "r" contain a common non-empty :ref:`IRect`. This will always be *False* if either is infinite or empty. + Checks whether the rectangle and the :data:`rect_like` "r" contain a common non-empty :ref:`IRect`. This will always be ``False`` if either is infinite or empty. :arg rect_like r: the rectangle to check. @@ -200,13 +200,13 @@ IRect is a rectangular bounding box, very similar to :ref:`Rect`, except that al .. attribute:: is_infinite - *True* if rectangle is infinite, *False* otherwise. + ``True`` if rectangle is infinite, ``False`` otherwise. :type: bool .. attribute:: is_empty - *True* if rectangle is empty, *False* otherwise. + ``True`` if rectangle is empty, ``False`` otherwise. :type: bool diff --git a/docs/link.rst b/docs/link.rst index 40ef387ea..e1761d5f9 100644 --- a/docs/link.rst +++ b/docs/link.rst @@ -69,13 +69,13 @@ There is a parent-child relationship between a link and its page. If the page ob .. attribute:: colors - Meaningful for PDF only: A dictionary of two tuples of floats in range `0 <= float <= 1` specifying the *stroke* and the interior (*fill*) colors. If not a PDF, *None* is returned. As mentioned above, the fill color is always `None` for links. The stroke color is used for the border of the link rectangle. The length of the tuple implicitly determines the colorspace: 1 = GRAY, 3 = RGB, 4 = CMYK. So `(1.0, 0.0, 0.0)` stands for RGB color red. The value of each float *f* is mapped to the integer value *i* in range 0 to 255 via the computation *f = i / 255*. + Meaningful for PDF only: A dictionary of two tuples of floats in range `0 <= float <= 1` specifying the *stroke* and the interior (*fill*) colors. If not a PDF, ``None`` is returned. As mentioned above, the fill color is always `None` for links. The stroke color is used for the border of the link rectangle. The length of the tuple implicitly determines the colorspace: 1 = GRAY, 3 = RGB, 4 = CMYK. So `(1.0, 0.0, 0.0)` stands for RGB color red. The value of each float *f* is mapped to the integer value *i* in range 0 to 255 via the computation *f = i / 255*. :rtype: dict .. attribute:: border - Meaningful for PDF only: A dictionary containing border characteristics. It will be *None* for non-PDFs and an empty dictionary if no border information exists. The following keys can occur: + Meaningful for PDF only: A dictionary containing border characteristics. It will be ``None`` for non-PDFs and an empty dictionary if no border information exists. The following keys can occur: * *width* -- a float indicating the border thickness in points. The value is -1.0 if no width is specified. @@ -104,9 +104,9 @@ There is a parent-child relationship between a link and its page. If the page ob * `is_external` is true: `uri` points to some target outside the current - PDF, which may be an internet resource (`uri` starts with "http://" or + PDF, which may be an internet resource (`uri` starts with ``http://`` or similar), another file (`uri` starts with "file:" or "file://") or some - other service like an e-mail address (`uri` starts with "mailto:"). + other service like an e-mail address (`uri` starts with ``mailto:``). * `is_external` is false: `uri` will be `None` or point to an @@ -126,7 +126,7 @@ There is a parent-child relationship between a link and its page. If the page ob .. attribute:: next - The next link or *None*. + The next link or ``None``. :type: *Link* diff --git a/docs/locales/ja/LC_MESSAGES/404.mo b/docs/locales/ja/LC_MESSAGES/404.mo index ac19c8951..939d7612e 100644 Binary files a/docs/locales/ja/LC_MESSAGES/404.mo and b/docs/locales/ja/LC_MESSAGES/404.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/404.po b/docs/locales/ja/LC_MESSAGES/404.po index c901afe52..d87a5d25b 100644 --- a/docs/locales/ja/LC_MESSAGES/404.po +++ b/docs/locales/ja/LC_MESSAGES/404.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.24.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-06 22:50+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -18,39 +18,38 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header-404.rst:-1 a6f30f9ef5464d349f5fdabbb8741927 +#: ../../header-404.rst:-1 7d1db678351e48a589812b0fc43a3c6e msgid "Artifex" msgstr "" -#: ../../header-404.rst:-1 78c8644ffa434937b986c8c5111ff0c7 +#: ../../header-404.rst:-1 1240b3bfde8e4c75af72a7add2aa6ece msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "" -#: ../../header-404.rst:-1 ddd49518b56b4d249e215d7a61fb7447 +#: ../../header-404.rst:-1 e9db42018d9749a3a1b1fcd7d2ffbad7 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "" -#: ../../404.rst:4 35b725124b6d4317ae091e2ae1221f28 +#: ../../404.rst:4 47500cd0e1e4472092d58a3f1eb0de05 msgid "404!" msgstr "" -#: ../../404.rst:7 f4ca6e0bb82f4262b343eb38a550aef7 +#: ../../404.rst:7 00f23d61373848a99a4874c470e1479a msgid "**This page is not available.**" msgstr "**このページは利用できません。**" -#: ../../404.rst:10 fa09ea54fa304d9d98c54ed8252476bb +#: ../../404.rst:10 108326f9c443411e998790ba1e98be35 msgid "Please use the menu or search to find what you are looking for." msgstr "メニューまたは検索を使用して、お探しのものを見つけてください。" -#: ../../footer.rst:71 b4323a61d74e4c6fa8f71f222b8366e1 +#: ../../footer.rst:60 eab1290efc024ba1b73c0d32ce382104 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 cf79ccc8d3c14094822a8f63711e6804 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/about.mo b/docs/locales/ja/LC_MESSAGES/about.mo index b2acee3f2..c90b81e39 100644 Binary files a/docs/locales/ja/LC_MESSAGES/about.mo and b/docs/locales/ja/LC_MESSAGES/about.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/about.po b/docs/locales/ja/LC_MESSAGES/about.po index e3f3a8dff..26d2ca396 100644 --- a/docs/locales/ja/LC_MESSAGES/about.po +++ b/docs/locales/ja/LC_MESSAGES/about.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,72 +19,72 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 b3129ddc19c14365bd545242fd1242ed +#: ../../header.rst:-1 5d238527c8e04fd5914f93988259bb02 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 b458a051bc39489689ff5af57133782c +#: ../../header.rst:-1 3a68f07f8c764256a00c938c461be585 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 c232efb84975462b869330287da9aabe +#: ../../header.rst:-1 5af89f9406714567bc9b29c2e8724cdf msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../about.rst:10 b0540e1d2909409abef9136b18bb1a2d +#: ../../about.rst:10 24b91e30bb5842a783ab4c2dd528a96e msgid "Features Comparison" msgstr "機能の比較" -#: ../../about.rst:16 e62d98dd45a444dfa2504d182d7d388b +#: ../../about.rst:16 57b8145e5e9549d3821d11e7559032da msgid "Feature Matrix" msgstr "機能比較表" -#: ../../about.rst:18 25e5a42efb9047c48b2f3bbd1059aedb +#: ../../about.rst:18 e847545ce066499184063dec33a7ea41 msgid "" "The following table illustrates how |PyMuPDF| compares with other typical" " solutions." msgstr "以下の表は、|PyMuPDF| が他の典型的な解決策と比較した場合の違いを示しています。" -#: ../../about.rst:47 76435b385c3540579323f2445843fdaf +#: ../../about.rst:47 12835a57de7d46edb91ab07d15e05149 msgid "" "A note about **Office** document types (DOCX, XLXS, PPTX) and **Hangul** " "documents (HWPX). These documents can be loaded into |PyMuPDF| and you " "will receive a :ref:`Document ` object." msgstr "" -#: ../../about.rst:49 01b36c4ab032463da234cae4582ea2b5 +#: ../../about.rst:49 f5c04dbbbd644019b42ccb6ed85023bc msgid "There are some caveats:" msgstr "" -#: ../../about.rst:52 e8e5ed7eeb114a94b800627f238ae6f5 +#: ../../about.rst:52 d325d0602b4840538d3af13f9ec4ce4d msgid "we convert the input to **HTML** to layout the content." msgstr "" -#: ../../about.rst:53 2df7ba2c17194408b53582db925ccbd4 +#: ../../about.rst:53 b4b91b8b878140bca6308694c93edcad msgid "because of this the original page separation has gone." msgstr "" -#: ../../about.rst:55 67311eecb98f45d8867c34e6f7a77957 +#: ../../about.rst:55 a54824efe7304d39ad9cfdfdbb3e60d1 msgid "" "When saving out the result any faithful representation of the original " "layout cannot be expected." msgstr "" -#: ../../about.rst:57 06ac42c2659e4d4cb42bf1e2ddc3d020 +#: ../../about.rst:57 2d37135544024d269b3719fba49d1f61 msgid "" "Therefore input files are mostly in a form that's useful for text " "extraction." msgstr "" -#: ../../about.rst:65 39fc9ebe13e04d5e8790927284931c75 +#: ../../about.rst:65 f6793685c5514f36b0ce8ce27739aaa9 msgid "Performance" msgstr "パフォーマンス" -#: ../../about.rst:69 2bcabe2f20f147f7bf51b5e270151e88 +#: ../../about.rst:69 5389aefbda2f4d8f99a537554c49d9e6 msgid "" "To benchmark |PyMuPDF| performance against a range of tasks a test suite " "with a fixed set of :ref:`8 PDFs with a total of 7,031 " @@ -95,29 +95,29 @@ msgstr "" "にテキストと画像が含まれている固定されたセットのテストスイートを使用して、|PyMuPDF| " "のパフォーマンスをさまざまなタスクに対してベンチマークします。" -#: ../../about.rst:72 596a7f1028f34122b99205fe9469bf86 +#: ../../about.rst:72 a54635ae0fec493eaa26d5e43a746700 msgid "Here are current results, grouped by task:" msgstr "以下は、タスクごとにグループ化された現在の結果です:" -#: ../../about.rst:81 c022173a10664cf48e6a8147ec3f1511 +#: ../../about.rst:81 3bcf7e6697dd4a299d5fc7bb0ce5828b msgid "" "For more detail regarding the methodology for these performance timings " "see: :ref:`Performance Comparison Methodology`." msgstr "これらのパフォーマンスのタイミングに関する方法の詳細については、:ref:`パフォーマンス比較方法` を参照してください。" -#: ../../about.rst:86 c1ece101b9554bb5830a3e5a8961c409 +#: ../../about.rst:86 4ada17d39d3d4a5581189a0db14b0791 msgid "License and Copyright" msgstr "ライセンスと著作権" -#: ../../about.rst:90 3cee8977568d476eaa5846a7b9fe743f +#: ../../about.rst:90 d2b1eb94b7a9461b9b9bd6171afc1f0c msgid "" -"|PyMuPDF| and :title:`MuPDF` are now available under both, open-source " -":title:`AGPL` and commercial license agreements. Please read the full " -"text of the :title:`AGPL` license agreement, available in the " -"distribution material (file COPYING) and `here " +"|PyMuPDF| and |MuPDF| are now available under both, open-source " +"|AGPL| and commercial license agreements. Please read the full " +"text of the |AGPL| license agreement, available in the " +"distribution material (file COPYING) and `on the GNU license page " "`_, to ensure that your use " "case complies with the guidelines of the license. If you determine you " -"cannot meet the requirements of the :title:`AGPL`, please contact " +"cannot meet the requirements of the |AGPL|, please contact " "`Artifex `_ for more information " "regarding a commercial license." @@ -128,13 +128,13 @@ msgstr "" "`Artifex `_ にお問い合わせください。" -#: ../../about.rst:108 a24288da4e4948b8b8b61f645dc5372d +#: ../../about.rst:108 2dc4abc678434142a4c2d84996a9a606 msgid "" ":title:`Artifex` is the exclusive commercial licensing agent for " ":title:`MuPDF`." msgstr ":title:`Artifex` Artifexは、:title:`MuPDF` の独占的な商業ライセンスエージェントです。" -#: ../../about.rst:110 08a8536d5ddc4e9b90021f0d84ed9e63 +#: ../../about.rst:110 f7805b9d0ffa4880a589062048e09c27 msgid "" ":title:`Artifex`, the :title:`Artifex` logo, :title:`MuPDF`, and the " ":title:`MuPDF` logo are registered trademarks of :title:`Artifex Software" @@ -143,42 +143,38 @@ msgstr "" ":title:`Artifex` 、:title:`Artifex` のロゴ、:title:`MuPDF` " "、およびMuPDFのロゴは、:title:`Artifex Software Inc.` の登録商標です。" -#: ../../version.rst:3 5bfd3fba26bf44298eab8dbad29ac315 +#: ../../version.rst:3 2f2f403fc96a411687d859e4bfbabdc9 msgid "" -"This documentation covers **PyMuPDF v1.24.10** features as of " -"**2024-09-02 00:00:01**." +"This documentation covers **PyMuPDF v1.25.5** features as of **2025-03-31" +" 00:00:01**." msgstr "" -#: ../../version.rst:5 dc72afbeec5047e080293715b0cb5e2e +#: ../../version.rst:5 ed936de961bc470d8e4b0f8c4693effb msgid "" -"The major and minor versions of **PyMuPDF** and **MuPDF** will always be " -"the same. Only the third qualifier (patch level) may deviate from that of" -" **MuPDF**." +"The major and minor versions of |PyMuPDF| and |MuPDF| will always be the " +"same. Only the third qualifier (patch level) may deviate from that of " +"|MuPDF|." msgstr "" -#: ../../version.rst:7 5c135fff424a4caaaa725b7dd49535b2 +#: ../../version.rst:7 54e62d11a1ba4032809ce7da1c4bf38d msgid "" "Typically PyMuPDF is released more frequently than MuPDF so it will often" " be the case that the patch level of PyMuPDF will be greater than the " "embedded MuPDF." msgstr "" -#: ../../version.rst:11 6df78cff39634f9b890f31e9d89f36e8 +#: ../../version.rst:11 cc2b0e17f25a45278b71bb561fe3ec99 msgid "For example PyMuPDF-1.24.5 contains MuPDF-1.24.2." msgstr "" -#: ../../version.rst:13 64a87115bc924a0588b9e348c4c4ed4f +#: ../../version.rst:13 b8d1b658b77e49a681dbfe3cb80f1612 msgid "Also see `pymupdf_version` and `mupdf_version`." msgstr "" -#: ../../footer.rst:60 6cecb8a62a4a4f0d9588587473c502e6 +#: ../../footer.rst:60 b59252015bda410cabe17ba393eb9bfa msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 2ae288dcfaf34721bfa1664042209b07 -msgid "Discord logo" -msgstr "" - #~ msgid "" #~ "This documentation covers **PyMuPDF " #~ "v1.23.0rc1** features as of **2023-08-10 " @@ -216,3 +212,11 @@ msgstr "" #~ " features as of **2024-04-17 00:00:01**." #~ msgstr "" +#~ msgid "" +#~ "This documentation covers **PyMuPDF v1.24.10**" +#~ " features as of **2024-09-02 00:00:01**." +#~ msgstr "" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/algebra.mo b/docs/locales/ja/LC_MESSAGES/algebra.mo index 401022e59..30cb275bc 100644 Binary files a/docs/locales/ja/LC_MESSAGES/algebra.mo and b/docs/locales/ja/LC_MESSAGES/algebra.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/algebra.po b/docs/locales/ja/LC_MESSAGES/algebra.po index 8aed5f7b9..5a4a00987 100644 --- a/docs/locales/ja/LC_MESSAGES/algebra.po +++ b/docs/locales/ja/LC_MESSAGES/algebra.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 524ecef29aca4c79a2b2bfdeeacc8d51 +#: ../../header.rst:-1 a244f13b9c764d21b6a4e35ef573b3fc msgid "Artifex" msgstr "" -#: ../../header.rst:-1 b2c04d3e4e41403b9defe1e53b5bd2c4 +#: ../../header.rst:-1 9bd00aa1c6e2464c98edbdfe23c4f225 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 f9080590734840729068f5ed197105ca +#: ../../header.rst:-1 0bb8ce2fa7b8439cb16f9ec725fae345 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../algebra.rst:6 98abb02b3a97455181f91e69fe8cd9da +#: ../../algebra.rst:6 a46fc8868909429d85fea1440fd28881 msgid "Operator Algebra for Geometry Objects" msgstr "幾何学オブジェクトのためのオペレーター代数" -#: ../../algebra.rst:10 7301f979b8a045b19a1b510844750799 +#: ../../algebra.rst:10 f2868bfbb77d48739b417240e859be75 msgid "" "Instances of classes :ref:`Point`, :ref:`IRect`, :ref:`Rect`, :ref:`Quad`" " and :ref:`Matrix` are collectively also called \"geometry\" objects." @@ -47,61 +47,63 @@ msgstr "" "クラス :ref:`Point` 、 :ref:`IRect` 、 :ref:`Rect` 、 :ref:`Quad` 、および " ":ref:`Matrix` のインスタンスは、集合的に「幾何学オブジェクト」とも呼ばれます。" -#: ../../algebra.rst:12 5c013dbf0e03498e93d3d96e72f441ee +#: ../../algebra.rst:12 7c7e99aaa08449cc9a3e4a9c1891053e msgid "" "They all are special cases of Python sequences, see :ref:`SequenceTypes` " "for more background." msgstr "これらはすべてPythonシーケンスの特殊なケースであり、詳細については、PyMuPDFでのPythonシーケンスを引数として使用するを参照してください。" -#: ../../algebra.rst:14 45a2be4459c04cd6a5a6af0f3a06898c +#: ../../algebra.rst:14 b6a45b1271a0423d9097d983f99dac54 msgid "" "We have defined operators for these classes that allow dealing with them " "(almost) like ordinary numbers in terms of addition, subtraction, " "multiplication, division, and some others." msgstr "これらのクラスには、加算、減算、乗算、除算など、通常の数値とほぼ同じように取り扱うための演算子が定義されています。" -#: ../../algebra.rst:16 ccb1c51b4a0b4ee3ba5efa65aa7241f0 +#: ../../algebra.rst:16 b84d121c948844b78d31027bcf1cc8bb msgid "This chapter is a synopsis of what is possible." msgstr "この章では、可能な操作の要約を説明します。" -#: ../../algebra.rst:19 de60686843f44300ad52e28ad0b490a2 +#: ../../algebra.rst:19 8da4401664bf45689416d5a624615e21 msgid "General Remarks" msgstr "一般的な注意事項" -#: ../../algebra.rst:20 5a7ce34c9e3a45318ec5d9e22899b545 +#: ../../algebra.rst:20 b27e0413604140b6a4e3d9dd5604397e msgid "" "Operators can be either **binary** (i.e. involving two objects) or " "**unary**." msgstr "演算子は2つのオブジェクトを含むバイナリ演算子または単項演算子になります。" -#: ../../algebra.rst:22 c2cbc25b70cc403e8fc03040e75dc04f +#: ../../algebra.rst:22 ff83ad4ef4924a928f7fe7c91f007de7 + msgid "" "The resulting type of **binary** operations is either a **new object of " -"the left operand's class** or a bool." +"the left operand's class,** a bool or (for dot products) a float." msgstr "バイナリ演算の結果の型は、左オペランドのクラスの新しいオブジェクトまたはbool型です。" -#: ../../algebra.rst:24 4ca59ca02b1a4a7ab36c5b971a30c869 +#: ../../algebra.rst:24 b6935b28e0494757bdefacd86e1f3a36 msgid "" "The result of **unary** operations is either a **new object** of the same" " class, a bool or a float." msgstr "単項演算の結果は、同じクラスの新しいオブジェクト、bool型、またはfloat型のいずれかです。" -#: ../../algebra.rst:26 e37076372350435984f6f8ff11f68eef +#: ../../algebra.rst:26 a1336f1afec74044ada260ccd870436a + msgid "" -"The binary operators *+, -, *, /* are defined for all classes. They " +"The binary operators `+, -, *, /` are defined for all classes. They " "*roughly* do what you would expect -- **except, that the second operand " "...**" msgstr "" "バイナリ演算子 ``+`` 、``-`` 、``*`` 、 ``/`` " "はすべてのクラスで定義されています。これらはおおよその期待通りの動作をしますが、2番目のオペランドは...(省略されました)。" -#: ../../algebra.rst:28 b40f276d66984d3183379581643ecf2d +#: ../../algebra.rst:28 e18cb846582247cb975a9ddc6340a73e msgid "" "may always be a number which then performs the operation on every " "component of the first one," msgstr "第2のオペランドは常に数値であり、それにより最初のオペランドのすべての要素に対して操作を行います。" -#: ../../algebra.rst:29 87a681abce8b48cdaf436134e65cfd9b +#: ../../algebra.rst:29 e60ed0a7fa554df0a16910687c2c88be msgid "" "may always be a numeric sequence of the same length (2, 4 or 6) -- we " "call such sequences :data:`point_like`, :data:`rect_like`, " @@ -110,114 +112,118 @@ msgstr "" "第2のオペランドは常に同じ長さの数値のシーケンスであることができます(2つ、4つ、または6つ) - それぞれ :data:`point_like`" " 、 :data:`rect_like` 、 :data:`quad_like` 、または :data:`matrix_like` と呼びます。" -#: ../../algebra.rst:31 30a0d27e738b40b882a3ebe803fed1a1 +#: ../../algebra.rst:31 d93daa3887f04faead0f46a53b4c2a9a + msgid "" -"Rectangles support additional binary operations: **intersection** " -"(operator *\"&\"*), **union** (operator *\"|\"*) and **containment** " +"Rectangles support **additional binary** operations: **intersection** " +"(operator `\"&\"`), **union** (operator `\"|\"`) and **containment** " "checking." msgstr "矩形は追加のバイナリ演算をサポートしています:交差(演算子“&”)、結合(演算子“|”)、および包含チェック。" -#: ../../algebra.rst:33 11b89115aeb84295999c61f30637c132 +#: ../../algebra.rst:33 03d276c145154e428f81b4e854a12723 msgid "" -"Binary operators fully support in-place operations, so expressions like " -"`a /= b` are valid if b is numeric or \"a_like\"." -msgstr "" -"バイナリ演算子は、すべての場所で完全にサポートされているため、``b`` が数値または「a_like」の場合、 ``a /= b`` " -"のような式が有効です" +"Binary operators fully support in-place operations. So if \"°\" is a " +"binary operator then the expression `a °= b` is always valid and the same" +" as `a = a ° b`. Therefore, be careful and do **not** do `p1 *= p2` for " +"two points, because thereafter \"p1\" is a **float**." +msgstr "バイナリ演算子は「インプレース演算」を完全にサポートしています。つまり、"°"がバイナリ演算子である場合、式 ``a °= b`` は常に有効であり、 ``a = a ° b`` と同じです。したがって、2つの点に対して ``p1 *= p2`` を行わないように注意してください。なぜなら、その後「p1」は浮動小数点数になってしまうからです。" -#: ../../algebra.rst:37 2707a153b6d14de583c7dfa13caf77c7 +#: ../../algebra.rst:37 b197551ac91841fba96a5406efd0e076 msgid "Unary Operations" msgstr "単項演算" -#: ../../algebra.rst:40 ../../algebra.rst:56 82bf0342c1f8486ca41d639e0a3a417a -#: 9c2c5519d20840ee82ff4126722b98b3 +#: ../../algebra.rst:40 ../../algebra.rst:59 299776843ce14340b3ffec69dbf18e83 +#: 9ef10cc27f674df49def7dbf4b132848 msgid "Oper." msgstr "演算" -#: ../../algebra.rst:40 ../../algebra.rst:56 0d206237a15d4085aa9225bab9cd5a9b -#: 3a2d430b68174ccd81865908b5e5d930 +#: ../../algebra.rst:40 ../../algebra.rst:59 0723d28bc56b478c85107cedb40b5793 +#: 7bff453d3e3548e4910efaf0d7e280d4 msgid "Result" msgstr "結果" -#: ../../algebra.rst:42 15585d8111654b2c97deb385f4d31a91 +#: ../../algebra.rst:42 d7ac030d071642528ff3bf57fcc11bd3 msgid "bool(OBJ)" msgstr "" -#: ../../algebra.rst:42 8147866aee2c4973acbd6c660bbb5643 +#: ../../algebra.rst:42 0d27ce4c315a43758b0c7f988ac2baca msgid "is false exactly if all components of OBJ are zero" msgstr "OBJのすべての成分がゼロの場合にのみfalse" -#: ../../algebra.rst:43 aa4803f32c574854b5b1bf27d5338185 +#: ../../algebra.rst:43 3a98a962f2cb4317ad6986bbdec24e65 msgid "abs(OBJ)" msgstr "" -#: ../../algebra.rst:43 18e08add25a34f81b37c6b7995b8aada +#: ../../algebra.rst:43 6c1997e211ee4d939dd044c813508abb msgid "the rectangle area -- equal to norm(OBJ) for the other types" msgstr "他のタイプに対してnorm(OBJ)と等しい長方形の面積" -#: ../../algebra.rst:44 d51100830a7e4406b3a1b4cb51c84884 +#: ../../algebra.rst:44 94bcec1a0e3d4e96be8a96074d02378d msgid "norm(OBJ)" msgstr "" -#: ../../algebra.rst:44 eb989feccac848f0a1a1639fcdd1c638 +#: ../../algebra.rst:44 e0b98f2206cf4032b715abe02f8be8cd msgid "square root of the component squares (Euclidean norm)" msgstr "成分の二乗の平方根(ユークリッドノルム)" -#: ../../algebra.rst:45 fbead06b7dc446c6970c0a4ca88813e3 +#: ../../algebra.rst:45 00744445072349b8b253bc092cc7bb87 msgid "+OBJ" msgstr "" -#: ../../algebra.rst:45 3dc6d02f1fff404cab0f065b59de1e8d +#: ../../algebra.rst:45 0b56037ce3e04d528042a1a6098bb2f9 msgid "new copy of OBJ" msgstr "OBJの新しいコピー" -#: ../../algebra.rst:46 dddab3ea2a69413d8143375a147a71e9 +#: ../../algebra.rst:46 0c1dfe4fe3344199b8b76d70f4f7d7f3 msgid "-OBJ" msgstr "" -#: ../../algebra.rst:46 496928dbb29947269ac2a6088d37a99e +#: ../../algebra.rst:46 ef82c60af2dc4d238eba6b421e3047d9 msgid "new copy of OBJ with negated components" msgstr "成分が反転されたOBJの新しいコピー" -#: ../../algebra.rst:47 dcabb41a111a47ef8c4f492e015fc1b7 +#: ../../algebra.rst:47 ee6061816bb3437fa7e09c6d431dc788 msgid "~m" msgstr "" -#: ../../algebra.rst:47 49eef148c30048fe987cbeb35e141097 +#: ../../algebra.rst:47 1e8a0c10344348238fc0f64c83edd642 msgid "inverse of matrix \"m\", or the null matrix if not invertible" msgstr "行列 \"m\" の逆行列、または逆行列が存在しない場合は零行列" -#: ../../algebra.rst:52 1d0673aff40b4c47ba42340f26c1788d +#: ../../algebra.rst:52 398158a768f84b89a520021ea6d0a25f msgid "Binary Operations" msgstr "二項演算" -#: ../../algebra.rst:53 937824d7c5e74f0f8a872186581e8a09 +#: ../../algebra.rst:53 01209ef26eeb4f6284e42a5165ad12aa msgid "" -"For every geometry object \"a\" and every number \"b\", the operations " -"\"a ° b\" and \"a °= b\" are always defined for the operators *+, -, *, " -"/*. The respective operation is simply executed for each component of " -"\"a\". If the **second operand is not a number**, then the following is " -"defined:" -msgstr "" -"あらゆるジオメトリオブジェクト\"a\"とあらゆる数値 \"b\" に対して、演算子 ``+``, ``-`` , ``*`` , ``/`` " -"については常に \"a ° b\" と \"a °= b\" の操作が定義されています。それぞれの操作は、\"a\" " -"の各成分に対して単純に実行されます。もし第二オペランドが数値でない場合、次のように定義されます:" +"These are expressions like `a ° b` where \"°\" is any of the operators " +"`+, -, *, /`. Also binary operations are expressions of the form `a == b`" +" and `b in a`." +msgstr "これらは ``a ° b`` のような式であり、ここで「°」は ``+``, ``-``, ``*``, ``/`` などの演算子のいずれかです。また、バイナリ演算には ``a == b`` や ``b in a`` のような形式の式も含まれます。" -#: ../../algebra.rst:58 56e6fface4224d4a82123e8342165f8a +#: ../../algebra.rst:55 347337c08b6e49ba8133b876c65de703 +msgid "" +"If \"b\" is a number, then the respective operation is executed for each " +"component of \"a\". Otherwise, if \"b\" is **not a number,** then the " +"following happens:" +msgstr "もし「b」が数値である場合、それぞれの演算は「a」の各コンポーネントに対して実行されます。一方、「b」が数値ではない場合、以下のことが起こります:" + +#: ../../algebra.rst:61 882647f50a3548ada51850492e59336c msgid "a+b, a-b" msgstr "" -#: ../../algebra.rst:58 c63cb688585843218dc6e36da69ed24c +#: ../../algebra.rst:61 529c2b3a1c8f440f8afd4fba9ce0396e msgid "component-wise execution, \"b\" must be \"a-like\"." msgstr "成分ごとの実行。\"b\" は \"a\" と同様の要素数である必要があります。" -#: ../../algebra.rst:59 451b76b83e9c45269692c7a62b8b38b1 +#: ../../algebra.rst:62 2606cc3b045c4835abe58d011464d50a msgid "a*m, a/m" msgstr "" -#: ../../algebra.rst:59 3e0554c51f6f4290baea05d3cf0a6e7d +#: ../../algebra.rst:62 7d3849829e3b4508827663e012314f30 + msgid "" -"\"a\" can be a point, rectangle or matrix, but \"m\" must be " +"\"a\" can be a point, rectangle or matrix and \"m\" is a " ":data:`matrix_like`. *\"a/m\"* is treated as *\"a*~m\"* (see note below " "for non-invertible matrices). If \"a\" is a **point** or a **rectangle**," " then *\"a.transform(m)\"* is executed. If \"a\" is a matrix, then matrix" @@ -227,11 +233,19 @@ msgstr "" " は \"a*〜m\" として処理されます(非逆行列の場合は以下の注記を参照)。\"a\" " "がポイントまたは矩形の場合、\"a.transform(m)\" が実行されます。\"a\" が行列の場合、行列の連結が行われます。" -#: ../../algebra.rst:64 532dc00d51a347fb80b84d3940b08d88 +#: ../../algebra.rst:67 b98d2bd8c76145a093239f6b2583ff78 +msgid "a*b" +msgstr "" + +#: ../../algebra.rst:67 55f9b0922451482484ef7fe2110fefb7 +msgid "returns the **vector dot product** for a point \"a\" and point-like \"b\"." +msgstr "点「a」と点のような「b」に対して、ベクトルの内積を返します。" + +#: ../../algebra.rst:68 2c02e64b04dd47a89a57341e5557c6f4 msgid "a&b" msgstr "" -#: ../../algebra.rst:64 1fc1280aed274bd18d447bdd48df0e28 +#: ../../algebra.rst:68 b1ebf38a599942378b28ecc93be28dbc msgid "" "**intersection rectangle:** \"a\" must be a rectangle and \"b\" " ":data:`rect_like`. Delivers the **largest rectangle** contained in both " @@ -240,11 +254,11 @@ msgstr "" "共通の長方形: \"a\" は長方形であり、\"b\" は :data:`rect_like` " "形式である必要があります。両方のオペランドに含まれる最大の長方形を返します。" -#: ../../algebra.rst:67 ceed4c58cfd64e95a30398277e269ede +#: ../../algebra.rst:71 6b94ffc704eb47269f5a3961a01cc914 msgid "a|b" msgstr "" -#: ../../algebra.rst:67 dc5ae657f90440ea920dec0fad6a6e68 +#: ../../algebra.rst:71 f10408473ce74344941deb9adedaea81 msgid "" "**union rectangle:** \"a\" must be a rectangle, and \"b\" may be " ":data:`point_like` or :data:`rect_like`. Delivers the **smallest " @@ -253,11 +267,11 @@ msgstr "" "合併した長方形: \"a\" は長方形であり、\"b\" は 点のような :data:`point_like` :data:`rect_like`" " 形式である必要があります。両方のオペランドを含む最小の長方形を返します。" -#: ../../algebra.rst:70 924b74577d3a4bab9171aa08805e731b +#: ../../algebra.rst:74 68ba14dfcb0944fb8f12d32ccd74acfc msgid "b in a" msgstr "" -#: ../../algebra.rst:70 386a21de654c42ea8eb712c33681590e +#: ../../algebra.rst:74 20c6156b787d407bba8ac0eb66d0003f msgid "" "if \"b\" is a number, then `b in tuple(a)` is returned. If \"b\" is " ":data:`point_like`, :data:`rect_like` or :data:`quad_like`, then \"a\" " @@ -267,35 +281,35 @@ msgstr "" "形式、 :data:`rect_like` 形式、または :data:`quad_like` 形式である場合、\"a\" " "は長方形である必要があり、`a.contains(b)` が返されます。" -#: ../../algebra.rst:73 8ad8238399044630afcdddfa50dbb035 +#: ../../algebra.rst:77 14c642acfd6a4cc09dd70b7edfc9479d msgid "a == b" msgstr "" -#: ../../algebra.rst:73 a0f643e2c1844bb794ec3c92ab0cbabe -msgid "*True* if *bool(a-b)* is *False* (\"b\" may be \"a-like\")." +#: ../../algebra.rst:77 b5f52a2ccb364df6aafabfc00b804bfd +msgid "``True`` if *bool(a-b)* is ``False`` (\"b\" may be \"a-like\")." msgstr "bool(a-b) が `False` であれば `True` を返します(\"b\"は\"a-like\"である可能性があります)。" -#: ../../algebra.rst:77 90de045e22724073b368489f0bc9198f +#: ../../algebra.rst:81 91cf0864d56a40f89a084004444ece8e msgid "Please note an important difference to usual arithmetic:" msgstr "以下は通常の算術との重要な違いに注意してください:" -#: ../../algebra.rst:79 1f6e088fe5f74d88807c13715df14e16 +#: ../../algebra.rst:83 c2257dafe2e54f93bdf6e878a27abb1e msgid "" "Matrix multiplication is **not commutative**, i.e. in general we have " "`m*n != n*m` for two matrices. Also, there are non-zero matrices which " "have no inverse, for example `m = Matrix(1, 0, 1, 0, 1, 0)`. If you try " "to divide by any of these, you will receive a `ZeroDivisionError` " -"exception using operator *\"/\"*, e.g. for the expression `pymupdf.Identity " -"/ m`. But if you formulate `pymupdf.Identity * ~m`, the result will be " -"`pymupdf.Matrix()` (the null matrix)." +"exception using operator *\"/\"*, e.g. for the expression " +"`pymupdf.Identity / m`. But if you formulate `pymupdf.Identity * ~m`, the" +" result will be `pymupdf.Matrix()` (the null matrix)." msgstr "" "行列の乗算は可換ではありません。つまり、一般に2つの行列に対して `m*n != n*m` " "が成り立ちます。また、逆行列を持たないゼロでない行列も存在します。例えば、`m = Matrix(1, 0, 1, 0, 1, 0)` " -"のような行列があります。これらの行列で除算しようとすると、演算子 *\"/\"* を使用して `pymupdf.Identity / m` のような式で" -" `ZeroDivisionError` 例外が発生します。しかし、`pymupdf.Identity * ~m` のように記述すると、結果は " -"`pymupdf.Matrix()` (零行列)となります。" +"のような行列があります。これらの行列で除算しようとすると、演算子 *\"/\"* を使用して `pymupdf.Identity / m` " +"のような式で `ZeroDivisionError` 例外が発生します。しかし、`pymupdf.Identity * ~m` " +"のように記述すると、結果は `pymupdf.Matrix()` (零行列)となります。" -#: ../../algebra.rst:81 47bdce8eaf8e4ba48a5187f9bde443ea +#: ../../algebra.rst:85 0e187d91aa3543128b18a63bdf168871 msgid "" "Admittedly, this represents an inconsistency, and we are considering to " "remove it. For the time being, you can choose to avoid an exception and " @@ -306,7 +320,7 @@ msgstr "" "が零行列であるかどうかをチェックするか、`pymupdf.Identity / m` を使用して `ZeroDivisionError` " "の可能性を受け入れることができます。" -#: ../../algebra.rst:85 244b4e5406b742499d182cbb06547b4c +#: ../../algebra.rst:89 de603159545946e8bdc68fe78cd85024 msgid "" "With these conventions, all the usual algebra rules apply. For example, " "arbitrarily using brackets **(among objects of the same class!)** is " @@ -316,37 +330,37 @@ msgstr "" "これらの規則に従うと、すべての通常の代数のルールが適用されます。例えば、任意の括弧を使うことができます(同じクラスのオブジェクトの間で!):もし " "`r1`, `r2` が長方形であり、`m1`, `m2` が行列であれば、次のようにできます: `(r1 + r2) * m1 * m2` 。" -#: ../../algebra.rst:86 110fdefd09cc485db0eafb93d076b4e8 +#: ../../algebra.rst:90 2e9035f1be214ad5993be5461f301e62 msgid "" "For all objects of the same class, `a + b + c == (a + b) + c == a + (b + " "c)` is true." msgstr "同じクラスのオブジェクトに対して、 `a + b + c == (a + b) + c == a + (b + c)` が成り立ちます。" -#: ../../algebra.rst:87 e3d4d2906d314c1eb068e843e8c147be +#: ../../algebra.rst:91 695f00e56afc43e8bbde8536925b9ffc msgid "" "For matrices in addition the following is true: `(m1 + m2) * m3 == m1 * " "m3 + m2 * m3` (distributivity property)." msgstr "行列の加法については、次のような性質が成り立ちます: `(m1 + m2) * m3 == m1 * m3 + m2 * m3` (分配律)。" -#: ../../algebra.rst:88 c01624c0ee414065848e22d89f67a1ab +#: ../../algebra.rst:92 85174e316c684b489921150e95d1aed3 msgid "" "**But the sequence of applying matrices is important:** If r is a " "rectangle and m1, m2 are matrices, then -- **caution!:**" msgstr "ただし、行列の適用順序が重要です:もし `r` が長方形であり、 `m1` , `m2` が行列である場合、注意してください!次のような場合:" -#: ../../algebra.rst:89 e1cb6c2618b743988f5d6e3704471b99 +#: ../../algebra.rst:93 8db6b272b39a4051b95fd6474751c244 msgid "`r * m1 * m2 == (r * m1) * m2 != r * (m1 * m2)`" msgstr "" -#: ../../algebra.rst:92 d1e33a114cc44bb2be45cfba14f7ba28 +#: ../../algebra.rst:96 5a5c13a7f2b542b59628658c7a3217f1 msgid "Some Examples" msgstr "いくつかの例" -#: ../../algebra.rst:95 d6ff987fd1db46e080c95630a83ebe10 +#: ../../algebra.rst:99 b685ff344b354dd6b03324c45389e661 msgid "Manipulation with numbers" msgstr "数値の操作" -#: ../../algebra.rst:96 7a8ae4b2d5034faaad4649f5249ddb8e +#: ../../algebra.rst:100 92463489f90f4556b3d5a7b306e1e7ac msgid "" "For the usual arithmetic operations, numbers are always allowed as second" " operand. In addition, you can formulate `\"x in OBJ\"`, where x is a " @@ -355,34 +369,40 @@ msgstr "" "通常の算術演算では、数値は常に第二オペランドとして使用できます。さらに、`\"x in OBJ\"` " "のように式を記述することもできます。ここで、xは数値です。これは `\"x in tuple(OBJ)\"` として実装されています::" -#: ../../algebra.rst:104 dbd0be4225e64c3d8e5171e2b904ad25 +#: ../../algebra.rst:108 d3192c1a63bb460ba17fe04f2de5b3ff msgid "" "The following will create the upper left quarter of a document page " "rectangle::" msgstr "以下は、ドキュメントページの四角形の左上の四分の一を作成します::" -#: ../../algebra.rst:112 8c480a62548d4632bbcbebef1c1f7652 +#: ../../algebra.rst:116 9f9d44b5091a4a65844a451e8d7c92c4 msgid "" "The following will deliver the **middle point of a line** that connects " "two points **p1** and **p2**::" msgstr "以下は、点 `p1` と点 `p2` を結ぶ直線の中点を求めます::" -#: ../../algebra.rst:122 6b844692fa88465784405e25afd41021 +#: ../../algebra.rst:125 2908e3f62351463a817217bed9ee7101 +msgid "" +"Compute the **vector dot product** of two points. You can compute the " +"**cosine of angles** and check orthogonality." +msgstr "2つの点のベクトル内積を計算します。これにより、角度のコサインを計算したり、直交性を確認したりすることができます。" + +#: ../../algebra.rst:149 05936628739f4f5392d49359e0f8860d msgid "Manipulation with \"like\" Objects" msgstr "「Like」オブジェクトを用いた操作" -#: ../../algebra.rst:124 66d4f7e8ccf1478bb7ae46872d5f150f +#: ../../algebra.rst:151 64ff208b10184910a7052e2d2fde5560 msgid "" "The second operand of a binary operation can always be \"like\" the left " "operand. \"Like\" in this context means \"a sequence of numbers of the " "same length\". With the above examples::" msgstr "2項演算の第2オペランドは常に左オペランドと「like」することができます。「Like」とは、この文脈では「同じ長さの数列」という意味です。上記の例を用いて説明します。" -#: ../../algebra.rst:135 b73c9b71a2d7423b941e5f32670b07c1 +#: ../../algebra.rst:162 7626451d4f89418ea6f21c0194766c1e msgid "To shift a rectangle for 5 pixels to the right, do this::" msgstr "長方形を右に5ピクセルシフトさせるには、次のようにします::" -#: ../../algebra.rst:141 e51d03f132b24a1db4f8c99f00b13d9f +#: ../../algebra.rst:168 ffbacdbea5aa4828ab455e4e9da44bf2 msgid "" "Points, rectangles and matrices can be *transformed* with matrices. In " "PyMuPDF, we treat this like a **\"multiplication\"** (or resp. " @@ -391,41 +411,66 @@ msgid "" "matrix\"::" msgstr "点、長方形、および行列は行列で変換できます。PyMuPDFでは、これを「乗算」(または「除算」とも)として扱います。ここで、第2オペランドは行列と「like」することができます。「除算」とは、この文脈では「逆行列との乗算」を意味します。" -#: ../../algebra.rst:181 c50980d0f1974d2b8ec349ec2daceb7e +#: ../../algebra.rst:208 f6063ded1f794fdfa330d05aab12b59a msgid "As a specialty, rectangles support additional binary operations:" msgstr "特に、長方形は追加の2項演算をサポートしています:" -#: ../../algebra.rst:183 6a5ea5b4494e4f54b5f85065b8c9c516 +#: ../../algebra.rst:210 8ddb30b3a1e6414cb4ab801649852302 msgid "**intersection** -- the common area of rectangle-likes, operator *\"&\"*" msgstr "**交差** -- 長方形や類似の長方形の共通領域を示す演算子 *\"&\"*" -#: ../../algebra.rst:184 988e1c36308a4a96b2aa272d72476287 +#: ../../algebra.rst:211 44b3d1c0634a46f1ae3506fe5d9c9046 msgid "" "**inclusion** -- enlarge to include a point-like or rect-like, operator " "*\"|\"*" msgstr "**含有** -- 点状または長方形状を含むように拡大する演算子 *\"|\"*" -#: ../../algebra.rst:185 7c9df0f6614e45fb93e5d0b99bf7c27a +#: ../../algebra.rst:212 462847c9ff494bef9387ce0aff093bfd msgid "**containment** check -- whether a point-like or rect-like is inside" msgstr "**含有確認** 点状または長方形状が内部にあるかどうかを確認します" -#: ../../algebra.rst:187 ef93e39630344587bca89c3706689d9a +#: ../../algebra.rst:214 8733fac916f74438a2cecf7b54a9c218 msgid "" "Here is an example for creating the smallest rectangle enclosing given " "points::" msgstr "以下は、与えられた点を囲む最小の長方形を作成する例です::" -#: ../../footer.rst:71 4949efb5878f45be8352116040f663e8 +#: ../../footer.rst:60 1533c6c3a8344ce0b45e9762c0145328 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 c8d9bbdec3354ca7b025cb5f434dbf83 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "" +#~ "Binary operators fully support in-place" +#~ " operations, so expressions like `a " +#~ "/= b` are valid if b is " +#~ "numeric or \"a_like\"." +#~ msgstr "" +#~ "バイナリ演算子は、すべての場所で完全にサポートされているため、``b`` が数値または「a_like」の場合、 " +#~ "``a /= b`` のような式が有効です" + +#~ msgid "" +#~ "For every geometry object \"a\" and " +#~ "every number \"b\", the operations \"a" +#~ " ° b\" and \"a °= b\" are " +#~ "always defined for the operators *+, " +#~ "-, *, /*. The respective operation " +#~ "is simply executed for each component" +#~ " of \"a\". If the **second operand" +#~ " is not a number**, then the " +#~ "following is defined:" +#~ msgstr "" +#~ "あらゆるジオメトリオブジェクト\"a\"とあらゆる数値 \"b\" に対して、演算子 ``+``," +#~ " ``-`` , ``*`` , ``/`` については常に " +#~ "\"a ° b\" と \"a °= b\" " +#~ "の操作が定義されています。それぞれの操作は、\"a\" " +#~ "の各成分に対して単純に実行されます。もし第二オペランドが数値でない場合、次のように定義されます:" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/annot.mo b/docs/locales/ja/LC_MESSAGES/annot.mo index 9ca957a9a..ea0995b90 100644 Binary files a/docs/locales/ja/LC_MESSAGES/annot.mo and b/docs/locales/ja/LC_MESSAGES/annot.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/annot.po b/docs/locales/ja/LC_MESSAGES/annot.po index ae3cd0a06..f01dc55f2 100644 --- a/docs/locales/ja/LC_MESSAGES/annot.po +++ b/docs/locales/ja/LC_MESSAGES/annot.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,41 +19,47 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 f58faa14969d4c498db94bf9a88538df +#: ../../header.rst:-1 ff7a088e26e441d29ec4e3aca594d728 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 d04d6dc4aac249c78283cbe109973a04 +#: ../../header.rst:-1 18977871afd44db590c7a3b2bb53f215 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 1a724598276e4fbfad419ff5de764741 +#: ../../header.rst:-1 1b2c3384886c41a0827a54c74b8505d9 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../annot.rst:7 8bc9eab9e0a94e4c9b37d530f9189232 +#: ../../annot.rst:7 5000811e2d7e4bf0b31e898f6141c30a msgid "Annot" msgstr "Annot (注釈)" -#: ../../annot.rst:9 2bbd8c25d43448378e20567cb38ee63d +#: ../../annot.rst:9 6572aa4344904647b2861639064ec562 msgid "|pdf_only_class|" msgstr "PDFのみ。" -#: ../../annot.rst:11 c167a796f5d0401e9bbb9086d43b8504 +#: ../../annot.rst:11 58f32778ecd843849cffbac30da6580a msgid "" -"Quote from the :ref:`AdobeManual`: \"An annotation associates an object " +"Quote from the :ref:`AdobeManual`:" +msgstr "" +":ref:`AdobeManual` からの引用: " + +msgid "" +"*\"An annotation associates an object " "such as a note, sound, or movie with a location on a page of a PDF " "document, or provides a way to interact with the user by means of the " -"mouse and keyboard.\"" +"mouse and keyboard.\"*" msgstr "" -":ref:`AdobeManual` からの引用: " "「注釈は、ノート、音声、動画などのオブジェクトをPDFドキュメントのページ上の位置に関連付けるか、マウスとキーボードを介してユーザーと対話する手段を提供します。」" -#: ../../annot.rst:13 73fdf164d538471899ce67f58342c9f2 + + +#: ../../annot.rst:13 a1ef865437ed4e5b8622fb4c309b374d msgid "" "There is a parent-child relationship between an annotation and its page. " "If the page object becomes unusable (closed document, any document " @@ -62,344 +68,352 @@ msgid "" " whenever an annotation property or method is accessed." msgstr "注釈とそのページとの間には親子関係があります。ページオブジェクトが使用できなくなる場合(閉じたドキュメント、文書構造の変更など)、そのページに存在するすべての注釈オブジェクトも同様に使用できなくなります。注釈のプロパティやメソッドにアクセスされるたびに、オブジェクトが「孤立した」という例外が発生します。" -#: ../../annot.rst:16 c93f68f07a5e42dfa820a4346dab999c +#: ../../annot.rst:16 c126f4b877914becad42b5b9654e9e4e msgid "**Attribute**" msgstr "**アトリビュート** " -#: ../../annot.rst:16 c3d7143cdb2349038066e7e79a4a5993 +#: ../../annot.rst:16 3fa27aa576664040b2fb04bfaf95f590 msgid "**Short Description**" msgstr "**短い説明** " -#: ../../annot.rst:18 a8b273b6d03f4a99b4a65e00127a5cc8 +#: ../../annot.rst:18 ea087de99b44415f897643e65decb123 msgid ":meth:`Annot.delete_responses`" msgstr "" -#: ../../annot.rst:18 4bb5054e003e4a0eab4557a602962f43 +#: ../../annot.rst:18 7f486bb052864bc2a47e8dfe9f73e9e8 msgid "delete all responding annotations" msgstr "すべての応答アノテーションを削除します" -#: ../../annot.rst:19 be33f456bc764e028444f979903ac32d +#: ../../annot.rst:19 7b62bdd30e3e486b88c51a3324a55249 msgid ":meth:`Annot.get_file`" msgstr "" -#: ../../annot.rst:19 be081dafafdf4901987890df7c97b228 +#: ../../annot.rst:19 ad45a655b150485fb69b9ddefe467eee msgid "get attached file content" msgstr "添付ファイルの内容を取得します" -#: ../../annot.rst:20 eff2da38e8144a40850b02a9239caf75 +#: ../../annot.rst:20 c938adec44fd42ebbdfd6b8ab384b6dc msgid ":meth:`Annot.get_oc`" msgstr "" -#: ../../annot.rst:20 c17b43c3fc414c1ea7e9114bddff056a +#: ../../annot.rst:20 ede08aa7b8a9490fb82654ba462331fe msgid "get :data:`xref` of an :data:`OCG` / :data:`OCMD`" msgstr ":data:`xref` を :data:`OCG` または :data:`OCMD` に取得します。" -#: ../../annot.rst:21 77bb4efd19cb4e3da9c5b95b7d038d34 +#: ../../annot.rst:21 d2693fb2e1ba408bb519d0c17278ac67 msgid ":meth:`Annot.get_pixmap`" msgstr "" -#: ../../annot.rst:21 8c73fe7e84774b4fa82787655c075425 +#: ../../annot.rst:21 80fd13f75a364a16a5170ad843148df0 msgid "image of the annotation as a pixmap" msgstr "アノテーションの画像をピクマップとして取得します" -#: ../../annot.rst:22 ce77a66ab3d54db382a1585eb7fede15 +#: ../../annot.rst:22 cff57bdb24884692afe25a6a3850650d msgid ":meth:`Annot.get_sound`" msgstr "" -#: ../../annot.rst:22 4e4fa3ef3b174e649c216a83d7867564 +#: ../../annot.rst:22 6994a4c09b9b405597ab42a1bec163f6 msgid "get the sound of an audio annotation" msgstr "オーディオアノテーションの音声を取得します" -#: ../../annot.rst:23 b947269ccbae4a28b43cfb146bbd3071 +#: ../../annot.rst:23 58ec6233ee8c46cd9b32b2d4537d1c4e msgid ":meth:`Annot.get_text`" msgstr "" -#: ../../annot.rst:23 ../../annot.rst:24 7f8ff67ff1a9499aa98fdc552d68437a -#: bb03942fc87441b2bf67afc145f85abb +#: ../../annot.rst:23 ../../annot.rst:24 7991062612ee456d9d02ac909cb903ab +#: b049c9c1cfe14a53841638c277c3dc9d msgid "extract annotation text" msgstr "アノテーションテキストを抽出します" -#: ../../annot.rst:24 568e92c1d7f846e195a42a21f1ad2a67 +#: ../../annot.rst:24 3293e6c0727e4c7fbb897607e9abda13 msgid ":meth:`Annot.get_textbox`" msgstr "" -#: ../../annot.rst:25 4acdf700d42548bfa5bf5423fda7bbbe +#: ../../annot.rst:25 c7107ff6b91244629a578499c2693f97 +msgid ":meth:`Annot.get_textpage`" +msgstr "" + +#: ../../annot.rst:25 f960592668bb4d61a14db7770f245ff7 +msgid "create a TextPage for the annotation" +msgstr "アノテーションのためのポップアップを作成します" + +#: ../../annot.rst:26 08f9508de1fc426b8b0dad3648e4a0ab msgid ":meth:`Annot.set_border`" msgstr "" -#: ../../annot.rst:25 30b50c49125d4a14965f25476af02d0f +#: ../../annot.rst:26 7f667fc22c864184a53baf1b41f2f422 msgid "set annotation's border properties" msgstr "アノテーションの境界線のプロパティを設定します" -#: ../../annot.rst:26 37665ea74bd74540a2a0255601238e6d +#: ../../annot.rst:27 d24ba1cc1ce34a149bcbf60b2434df4e msgid ":meth:`Annot.set_blendmode`" msgstr "" -#: ../../annot.rst:26 f3d329c13b414365b888960f2d0005b5 +#: ../../annot.rst:27 922e48bd5c9c4d01bbcbdfa4a956b427 msgid "set annotation's blend mode" msgstr "アノテーションのブレンドモードを設定します" -#: ../../annot.rst:27 10e2dc93452a416ca144666cd9b01825 +#: ../../annot.rst:28 50bf516a0b764d70a67a2b30e60aeacb msgid ":meth:`Annot.set_colors`" msgstr "" -#: ../../annot.rst:27 8a32c70363a9458d8003fe33fdee26dd +#: ../../annot.rst:28 34603b17e7e24106b41fdcf554ba1360 msgid "set annotation's colors" msgstr "アノテーションの色を設定します" -#: ../../annot.rst:28 ../../annot.rst:325 a48261eeb1124c3ebf6cf938eb667a9c -#: cbc7bbc35ebb478cb46f59c4e71cc028 +#: ../../annot.rst:29 ../../annot.rst:342 1c824645834845a0ae5154e55b3cdbf4 +#: cb309c0b399f41ffa927d9853ab58985 msgid ":meth:`Annot.set_flags`" msgstr "" -#: ../../annot.rst:28 0454cc3962eb47deab3d5096d62dbe4c +#: ../../annot.rst:29 163cd8ded8aa4fe89173df3c1b0d8d6b msgid "set annotation's flags field" msgstr "アノテーションのフラグフィールドを設定します" -#: ../../annot.rst:29 2d8385a084074ff5a91fd60d8be86f34 +#: ../../annot.rst:30 ac5223c7a43f49589c2d85e8b1380675 msgid ":meth:`Annot.set_irt_xref`" msgstr "" -#: ../../annot.rst:29 686785502a864fc5a528a7009b5025ee +#: ../../annot.rst:30 6acda0a7b8404cf7ae6381140fd376ab msgid "define the annotation to being \"In Response To\"" msgstr "アノテーションを「応答対象」として定義します" -#: ../../annot.rst:30 409352bcaf5e4e648524acbe25d7730a +#: ../../annot.rst:31 71e625c5f2854e86acf0da6bdbecafc6 msgid ":meth:`Annot.set_name`" msgstr "" -#: ../../annot.rst:30 6d0fee3a41e9472d89f8ab1be94434ca +#: ../../annot.rst:31 93e021065f1249bca197aba645a1ae23 msgid "set annotation's name field" msgstr "アノテーションの名前フィールドを設定します" -#: ../../annot.rst:31 ../../annot.rst:326 731b64bee53f4898b852d2971c4c5c53 -#: ccd8fa4a256748048b917ef70341ccc9 +#: ../../annot.rst:32 ../../annot.rst:343 d35d1936521f4902a7308fb2833b06f8 +#: dd1fc298be724240b0bbc96ae65e503d msgid ":meth:`Annot.set_oc`" msgstr "" -#: ../../annot.rst:31 d166b85bab534619803e4992b259c332 +#: ../../annot.rst:32 375a7e1792f34e01a55dd16d3f73d808 msgid "set :data:`xref` to an :data:`OCG` / :data:`OCMD`" msgstr ":data:`xref` を :data:`OCG` または :data:`OCMD` に設定します。" -#: ../../annot.rst:32 c109decb34064d528898b6e4fc2fa2ec +#: ../../annot.rst:33 c8b80eb861434f07bd261aa9435ac037 msgid ":meth:`Annot.set_opacity`" msgstr "" -#: ../../annot.rst:32 f23ca422a2794397b2d8ae99eeb5fd82 +#: ../../annot.rst:33 0798272be98b4e6284d7e419c7f6d4d6 msgid "change transparency" msgstr "透明度を変更します" -#: ../../annot.rst:33 c3e2b6c5f65143019c9d3e38a7698c20 +#: ../../annot.rst:34 11786c94965b4da98e8467611d3aacc5 msgid ":meth:`Annot.set_open`" msgstr "" -#: ../../annot.rst:33 cebb3931ce844c4093c5abed06775a7a +#: ../../annot.rst:34 84272bd5f9ba495f958777194709def4 msgid "open / close annotation or its Popup" msgstr "アノテーションまたはそのポップアップを開く/閉じる" -#: ../../annot.rst:34 7ee1acc4627e422fbaba47fdd0ab28bb +#: ../../annot.rst:35 cf0b1c55f79c449299f2c02061edc6ed msgid ":meth:`Annot.set_popup`" msgstr "" -#: ../../annot.rst:34 9fa7c75644e5462a9929445944c559ad +#: ../../annot.rst:35 85d219e184364d30a1dc9a4764ea4c7d msgid "create a Popup for the annotation" msgstr "アノテーションのためのポップアップを作成します" -#: ../../annot.rst:35 ../../annot.rst:324 9070ef4169534831bc9dcc042c1b14a5 -#: b3265e34ca75410f9f2a281538d0a027 +#: ../../annot.rst:36 ../../annot.rst:341 5d07938cf9484386bbf4154a889a6a30 +#: 8015d3625a67455f88892d3ed0e7cda7 msgid ":meth:`Annot.set_rect`" msgstr "" -#: ../../annot.rst:35 a3bff12ea7084209b8d9f930ec2f9ccf +#: ../../annot.rst:36 871ad36e30794a4cb1ef6a47d85fd43b msgid "change annotation rectangle" msgstr "アノテーションの長方形を変更します" -#: ../../annot.rst:36 b0190b57eb0d488882b14c5a42a8f0c3 +#: ../../annot.rst:37 a1ad49c8d1884520aac479a12df9f827 msgid ":meth:`Annot.set_rotation`" msgstr "" -#: ../../annot.rst:36 e7487a00971246919e35cc6285b94093 +#: ../../annot.rst:37 cacca8eff36344cc8374cc89c957483e msgid "change rotation" msgstr "回転を変更します" -#: ../../annot.rst:37 ../../annot.rst:327 2c9bec3202b8419aac57f67e3cf72586 -#: e9c40cdde9eb44d7adace1522969b611 +#: ../../annot.rst:38 ../../annot.rst:344 6485afe67e3442258d9d3698bfc4b536 +#: 7557e579699f4dd79e2202a136f61f23 msgid ":meth:`Annot.update_file`" msgstr "" -#: ../../annot.rst:37 4e06928de9a040c7ab9fc412842385f7 +#: ../../annot.rst:38 817586391bcb49fb9b9ee6f69cde7868 msgid "update attached file content" msgstr "添付ファイルの内容を更新します" -#: ../../annot.rst:38 a4c6a14598124b7882fc0891157bea30 +#: ../../annot.rst:39 2ab6962c0ead4a75b45dd6cf2abaa51d msgid ":meth:`Annot.update`" msgstr "" -#: ../../annot.rst:38 7a0bb70efce54c8caafb9b70f2418dff +#: ../../annot.rst:39 51fc956198004f8d9a16bc9ac938de48 msgid "apply accumulated annot changes" msgstr "蓄積されたアノテーションの変更を適用します" -#: ../../annot.rst:39 d2ba4ef292994e709dc4380c4bbabde6 +#: ../../annot.rst:40 0ae5ddfde6a840b3bb5570b800f1d653 msgid ":attr:`Annot.blendmode`" msgstr "" -#: ../../annot.rst:39 ec71849cb97a41338ea3dbfc6e1bbdaa +#: ../../annot.rst:40 c3b350ed72634609bf89ec671eb98821 msgid "annotation BlendMode" msgstr "アノテーションのブレンドモード" -#: ../../annot.rst:40 33f75de1f22d4b8cb7e2beb77c51172e +#: ../../annot.rst:41 7c0ad77081df47acb4fb5fc50e2adc57 msgid ":attr:`Annot.border`" msgstr "" -#: ../../annot.rst:40 3cb3932a615d4280be92cc9ddbdefb34 +#: ../../annot.rst:41 524c0edf6aaa466ebcdf8d43118eebd6 msgid "border details" msgstr "境界線の詳細" -#: ../../annot.rst:41 cc1bbfd26c2d45b080acef345a907316 +#: ../../annot.rst:42 391ec574189d4e5d99dcc5de5d15b441 msgid ":attr:`Annot.colors`" msgstr "" -#: ../../annot.rst:41 20292b07b663479ba4fd75775b055d26 +#: ../../annot.rst:42 491d801bcbdf44f0a1cc60e0e0b43785 msgid "border / background and fill colors" msgstr "境界線/背景および塗りつぶしの色" -#: ../../annot.rst:42 c27389071be14e469ff2bb8ec0ba217c +#: ../../annot.rst:43 70881f5fbe3f444ca69c132b8525a8a4 msgid ":attr:`Annot.file_info`" msgstr "" -#: ../../annot.rst:42 125d3acc5bb048ac82eaa8146606bb85 +#: ../../annot.rst:43 ed4a1667427941a0a42c016cdb472ecc msgid "get attached file information" msgstr "添付ファイル情報を取得します" -#: ../../annot.rst:43 a81da555aba546beb39dc1aa3f65833c +#: ../../annot.rst:44 fc587e8b72b24093ba42f0200439612f msgid ":attr:`Annot.flags`" msgstr "" -#: ../../annot.rst:43 e76017b2adc3455699aadf22c56a8938 +#: ../../annot.rst:44 412be177d1f04bb7aa7efbae8a26b2b9 msgid "annotation flags" msgstr "アノテーションフラグ" -#: ../../annot.rst:44 92d525c3334e40c6b2a2477fc3dd2ebd +#: ../../annot.rst:45 e1730d3ddaf94a5ba8a40ae46d1ebd27 msgid ":attr:`Annot.has_popup`" msgstr "" -#: ../../annot.rst:44 4867fb143500494c92cecaebca7f7e24 +#: ../../annot.rst:45 d60eec1bd2e24dda97956603fa503999 msgid "whether annotation has a Popup" msgstr "アノテーションにポップアップがあるかどうか" -#: ../../annot.rst:45 a2b36b11cbc94d4b89cb15f414269d5d +#: ../../annot.rst:46 c2bf5bf4df6844c48801c20befcd9327 msgid ":attr:`Annot.irt_xref`" msgstr "" -#: ../../annot.rst:45 a82c4cf5016542ea8efb8f2e5c2cd9ce +#: ../../annot.rst:46 7448ababb2e746a394c74eb1d1d51424 msgid "annotation to which this one responds" msgstr "このアノテーションへの応答としてのアノテーション" -#: ../../annot.rst:46 0c84f297efc94646bfa58440e29e073d +#: ../../annot.rst:47 722b5d2dc3fa466d87a301aa2009ce91 msgid ":attr:`Annot.info`" msgstr "" -#: ../../annot.rst:46 e4067b8dd5694572839c67a57582a628 +#: ../../annot.rst:47 0f31b4b67f6c4f3580312e80d84264b1 msgid "various information" msgstr "さまざまな情報" -#: ../../annot.rst:47 0442a526d0ca4cdda4907bedf8c15185 +#: ../../annot.rst:48 b80dffed8e3748148d2ccc8227450602 msgid ":attr:`Annot.is_open`" msgstr "" -#: ../../annot.rst:47 cd0bca2861da4a1c95f841da1f30404b +#: ../../annot.rst:48 ddfc282227b548df89328272f9ef3b46 msgid "whether annotation or its Popup is open" msgstr "アノテーションまたはそのポップアップが開いているかどうか" -#: ../../annot.rst:48 51a1a01e00ac4580acbd81afa85977df +#: ../../annot.rst:49 2023405da922439f980b6e1c5fa916af msgid ":attr:`Annot.line_ends`" msgstr "" -#: ../../annot.rst:48 ae74191600374b6fa817fe66f406009f +#: ../../annot.rst:49 96322f741c9c4c3cad018601e21b70f4 msgid "start / end appearance of line-type annotations" msgstr "線タイプのアノテーションの始点/終点の外観" -#: ../../annot.rst:49 0a7c9e0cb1b046e4ba4568ccb35b1583 +#: ../../annot.rst:50 6440c9f13ce742aeb84a3ff8c0a58ba6 msgid ":attr:`Annot.next`" msgstr "" -#: ../../annot.rst:49 4efd0cc967734749b80947ebde43f366 +#: ../../annot.rst:50 c697cfff2b7d432aa56de4e2f3d84bf5 msgid "link to the next annotation" msgstr "次のアノテーションへのリンク" -#: ../../annot.rst:50 fc4307cab4d54c3e941a5c304d056db7 +#: ../../annot.rst:51 69859d25e053434eb9f58f06a5e84215 msgid ":attr:`Annot.opacity`" msgstr "" -#: ../../annot.rst:50 01f50211ff4944ce8aa168c014930a9c +#: ../../annot.rst:51 2346e2f7904f4f4f89b78e3d4cc5191a msgid "the annot's transparency" msgstr "アノテーションの透明度" -#: ../../annot.rst:51 5884163c5ba44d2a8404db655bdbf5a8 +#: ../../annot.rst:52 dc09b3803b4b40708d90ee360746806e msgid ":attr:`Annot.parent`" msgstr "" -#: ../../annot.rst:51 93100253f2824a6aa670dd6c77de460c +#: ../../annot.rst:52 d4300a6a5817452a904ca1424d707494 msgid "page object of the annotation" msgstr "アノテーションのページオブジェクト" -#: ../../annot.rst:52 f065cb4b1d53435987c0588012576a8d +#: ../../annot.rst:53 4a1c85bcc643456eb893652c94e1ffb1 msgid ":attr:`Annot.popup_rect`" msgstr "" -#: ../../annot.rst:52 dfec2a092d0048d5a80183c996a73ae6 +#: ../../annot.rst:53 310a3a9c999e45aa8530e9e0406ae7a1 msgid "rectangle of the annotation's Popup" msgstr "アノテーションのポップアップの長方形" -#: ../../annot.rst:53 daa22cccd54e495b8e70eec579b17cd7 +#: ../../annot.rst:54 29e2ed85a69c4705aa62eb078926195e msgid ":attr:`Annot.popup_xref`" msgstr "" -#: ../../annot.rst:53 2b30147d54d643df8c5fa5eb81e7bf6f +#: ../../annot.rst:54 a58383e6b647405dae30968ba753daff msgid "the PDF :data:`xref` number of the annotation's Popup" msgstr "アノテーションのポップアップのPDF :data:`xref` 番号" -#: ../../annot.rst:54 359f3658ca844fdca1df613046794a01 +#: ../../annot.rst:55 54f3ad9d61224189875abeaa829739fc msgid ":attr:`Annot.rect`" msgstr "" -#: ../../annot.rst:54 3e1bad066d0f4446ac257cd76750d5c2 +#: ../../annot.rst:55 ed12e42c92214db1a837f18c33ec864e msgid "rectangle containing the annotation" msgstr "アノテーションを含む長方形" -#: ../../annot.rst:55 99b8214e81324156b9687bb3149f0586 +#: ../../annot.rst:56 b322c2136f6641d6b3700eb40d06354c msgid ":attr:`Annot.type`" msgstr "" -#: ../../annot.rst:55 68e661e292ad4f6c9bda9bac668664eb +#: ../../annot.rst:56 d05081e51bda43e1aed2a07fecee14ae msgid "type of the annotation" msgstr "アノテーションのタイプ" -#: ../../annot.rst:56 e47fe4e5f9374ea0845c2e1eb06b35fa +#: ../../annot.rst:57 7760d9f11dc1455bbce39fef1d726122 msgid ":attr:`Annot.vertices`" msgstr "" -#: ../../annot.rst:56 0f51f183d1a94e7c8ca5d6bbdf1b3a11 +#: ../../annot.rst:57 b65ac6b16aef48679a1d885ce92fd12c msgid "point coordinates of Polygons, PolyLines, etc." msgstr "ポリゴン、ポリラインなどの点の座標" -#: ../../annot.rst:57 e4331ee3637847c5a651575724ebe618 +#: ../../annot.rst:58 324031e7bc8344b7891eea42262c24eb msgid ":attr:`Annot.xref`" msgstr "" -#: ../../annot.rst:57 6bb7481f0f144222ad16e25aeee85449 +#: ../../annot.rst:58 45eb2c6f94d241b9a99b179f77e1c730 msgid "the PDF :data:`xref` number" msgstr "PDF :data:`xref` 番号" -#: ../../annot.rst:60 00da2356251b47e7b171c918f7661d34 +#: ../../annot.rst:61 47b2c93409ed420491e9d1165df4fceb msgid "**Class API**" msgstr " **APIクラス** " -#: ../../annot.rst:72 8f24cd13a69a40d981c934b1c6030986 +#: ../../annot.rst:73 86260e9a3eee40d8be9f41ac0a98d586 msgid "Changed in v1.19.2: added support of dpi parameter." msgstr "v1.19.2で変更: dpiパラメータのサポートが追加されました。" -#: ../../annot.rst:74 414ad1d83aad40e3b3e3bb4e90caf00b +#: ../../annot.rst:75 880909430980416ea32acec47fd74620 msgid "" "Creates a pixmap from the annotation as it appears on the page in " "untransformed coordinates. The pixmap's :ref:`IRect` equals " @@ -408,80 +422,80 @@ msgstr "" "変換されていない座標でページ上に表示される注釈からピクスマップを作成します。ピクスマップの :ref:`IRect` は " "*Annot.rect.irect* と同じです(以下を参照)。 **すべてのパラメータはキーワード専用です。** " -#: ../../annot.rst 0fce00f251374863b4f89a4e8dfdc9ba -#: 18c5d905d17b4314913786d0fc6725c8 23ca0b11f6c04e34bead0ac5090c355c -#: 2c13ad7203994ac3bd3f4cb72f9e3a50 365ad206531c42f99beb4357f3bf9f47 -#: 5f94a192fe784fddba8f493accf1cbf2 73f8f5b3e31f41269c7568e58c7fd52d -#: 81ba22622544488cad50074cbec82775 85dc3cf6c4f54958b9196c7d723b7bca -#: a3ec666ee2c3473b87dc71f943b97ff0 ac282398d48a4b6b93c08e46c90b42e6 -#: aea88fb6d34c447a843190604780ddd7 b1aad47dc76146b5bc499302e338b3bd -#: c1a9d87771ae40f38b0ed2384d3568f1 cf87165eb5614ef8954aaefbf43fe8b5 -#: d6f605074223416a9808bec439dd7fd1 e0d6ad8c631c484391f7c381d889e0d0 -#: e32be9236b62407b940a0f49ab9f26e3 f00d98a4b1d649a08cfafb534104d3c2 +#: ../../annot.rst 089ffb55a5c54d31b2a099695ee8e8b5 +#: 0e4c6fa44dde49ac847bd4cc76f84095 2d7cda1dee384169b88e5f69f469a86b +#: 31ec6dab43204aea9cc8515ad1bcab55 345b4a70f79d44b0ad9a4fe11ae6749d +#: 4df572c9469347c7b2d092efd5937020 57f3253f02da4f71af4c62f36a91b1f0 +#: 6311f05f830242038f6be5d788bd8b3a 83f0ce983b3149f19f1937976f26c38c +#: 8a15651d997b433694fb86a9a61cf34e 9812334b860241feb0f05f5542163c29 +#: 9a80f3d4399746328022f9a04fb35393 a3f5c2dfd7d8447da39f78b071ecec3d +#: ac371b0005864d5f867373b568c23cff bedb0b087bb84f0a8c0728a11f6879c9 +#: d115b2f26341443f9931ddf8b3474e58 d2a145a6bb0a425aaf5dba567f435051 +#: d99a889618da40e8a0fc713671dcf33e e38967643d4246a199e2b38e2a034778 +#: ecb79981326049eab38b7dd94daff1dd msgid "Parameters" msgstr "パラメータ" -#: ../../annot.rst:76 bb926393440540d18c337c2c62e09d6b +#: ../../annot.rst:77 e417565017cd45dbb90662a4eb077f40 msgid "a matrix to be used for image creation. Default is :ref:`Identity`." msgstr "画像の作成に使用される行列。デフォルトは :ref:`Identity` です。" -#: ../../annot.rst:78 dd8ac5da67554766af659d0745dcd6b0 +#: ../../annot.rst:79 b405de362c454c6e98060e7acc458ee5 msgid "" "(new in v1.19.2) desired resolution in dots per inch. If not `None`, the " "matrix parameter is ignored." msgstr "(v1.19.2で新規追加)インチあたりのドット数で指定された解像度。 `None` でない場合、matrixパラメータは無視されます。" -#: ../../annot.rst:80 472388915f304edaa87f5c6ee0c0602d -msgid "a colorspace to be used for image creation. Default is *pymupdf.csRGB*." -msgstr "画像の作成に使用されるカラースペース。デフォルトは *pymupdf.csRGB* です。" - -#: ../../annot.rst:83 fcfedb41f14e4061ba26f9747b54769d -msgid "whether to include transparency information. Default is *False*." -msgstr "透明情報を含めるかどうか。デフォルトは *False* です。" - -#: ../../annot.rst 016e1cf6953b4897a30d2c05d8655bff -#: 0d71ec2bc6c94992af02136160e906d5 1ac58ca510184d47872825b637006208 -#: 1c87c66dc8eb4df493ec7a39049895e8 22cdfe9077d44f94ba239fb9d014226e -#: 23c044472fa6401fb4093057d8c66f19 2b0698ca09d44883a9b38a5615188c5a -#: 2bf6911b1a054c008e81c50421f625d5 2d11f6e070fa488f9ce1fbb1729f286d -#: 2eefd884ab77424fa5b05800693c1877 3fe5cfba11da4582af82072d9e4c6614 -#: 4199014531b44dfba09e2b67e66c5c07 45b0da5a3a414d0b8f5e39be69c859e2 -#: 46353d244f3442e384dc1c91e17f0a09 5012e75dbb8041f5a4415c4323bc76f4 -#: 63df2d22ed1e46cba0beb0b43bc28150 6a0c5d1ad85d481eb3b32a2301ba3c56 -#: 897239cf863344aab55281b108fa364e 92cd3598868f4c03b0fd2413bcd79ea6 -#: b4e004ffc7844812b8d0ff8c10ad482b d0b6b25e71374810a98c56d2169b70a3 -#: d55477231b0a4eb0ba3e3572be8b462f d8e2e5888b4d41009b8e30875b8a94b6 -#: fd1168467b2942c08746f7195979a399 +#: ../../annot.rst:81 b77081c57af64088978ad2f41b248bd4 +msgid "a colorspace to be used for image creation. Default is ``pymupdf.csRGB``." +msgstr "画像の作成に使用されるカラースペース。デフォルトは ``pymupdf.csRGB`` です。" + +#: ../../annot.rst:84 2dcd533cb5c24787bf3ef2ea667576c1 +msgid "whether to include transparency information. Default is ``False``." +msgstr "透明情報を含めるかどうか。デフォルトは ``False`` です。" + +#: ../../annot.rst 03bdb651fd5d43e0b50daa68b3f29301 +#: 07b682c9b1494fd680a932f123bea564 0d44e48248b94319939438ec421594ba +#: 10ea7432521545c1b51851cb404aaa0a 1ddb2fc5b5524df78da3cbde901f4e28 +#: 23944f91176a44299ff38be1a9b2fcf0 2be3544d8d6f4593bc5ad0d1d8327da7 +#: 361c2326f3c041f6bd559b8d3528012d 3891e2a8472640c3be4bdedf20c6cc9f +#: 49ff50d3391a465a93c0558311214b07 72e96380ba7442b789c04b2cef259e6b +#: 776268181a164c45856b7f26c6d91330 797c9a492b094ed58f03d179a0c36352 +#: 7e96eff6b04d4d18ad9b50324bff1890 8e3aba14e0704da497c753ab9da937ce +#: 9cdc041b2f43450fb713e2a0b8c9caba ae746abd2c394decb52eef9ad542d93f +#: b4cfe4c19ed249038ce618565b456e1c b5b693248d7b4439a7ce3b2316508ee1 +#: c9b331263c504d9798802d4c76edf0f3 d112cfe7ae6f4091aba2610588a0ce1d +#: dcac44df5c924b6d9b805a49b1754ba4 eb59a0c6a52e4d15ad132925deb11e2e +#: f55053f9e847488593d336020468cebb msgid "Return type" msgstr "戻り値の型" -#: ../../annot.rst:85 9e61de727a4a4a08968231bf4c3cc79d +#: ../../annot.rst:86 8bc98996e43b49e98902ab152c1681ae msgid ":ref:`Pixmap`" msgstr "" -#: ../../annot.rst:89 0cfe984cbd28424eb40d22e386a1ff26 -#, fuzzy +#: ../../annot.rst:90 0b7db7e99f7746abad597233349afdaf msgid "" "If the annotation has just been created or modified, you should " ":meth:`Document.reload_page` the page first via `page = " "doc.reload_page(page)`." msgstr "" -"注釈が作成または変更されたばかりの場合、まず *page = doc.reload_page(page)* " +"注釈が作成または変更されたばかりの場合、まず ``page = doc.reload_page(page)`` " "を使用してページを再読み込みする必要があります。" -#: ../../annot.rst:91 075e6da012db4ba78216ec06d48184b0 +#: ../../annot.rst:92 672b6b5650554da988247bd501528456 msgid "" "The pixmap will have *\"premultiplied\"* pixels if `alpha=True`. To learn" -" about some background, e.g. look for \"Premultiplied alpha\" `here " +" about some background, e.g. look for \"Premultiplied alpha\" `in this online glossary " "`_." msgstr "" -#: ../../annot.rst:109 ../../annot.rst:130 9291196a2ee24345a1282e7ebea53ae0 -#: b6d4689968a545cb8f1b1b43cac74827 +#: ../../annot.rst:110 ../../annot.rst:131 2c14274b38ca40928460b67999b1c1ec +#: 5079bb8a71b44da3b5ef92fff930f701 msgid "New in 1.18.0" msgstr "1.18.0 で新たに追加" -#: ../../annot.rst:111 90ada283fa1c4194bb091129358215ab +#: ../../annot.rst:112 328e54dec81c4a1dbe69080e8e98eb9c msgid "" "Retrieves the content of the annotation in a variety of formats -- much " "like the same method for :ref:`Page`.. This currently only delivers " @@ -491,7 +505,7 @@ msgstr "" "さまざまなフォーマットで注釈の内容を取得します - これは :ref:`Page` " "の同じメソッドのように動作します。現在、これはアノテーションタイプ「FreeText」と「Stamp」に関連するデータのみを提供します。他の種類は空の文字列(または同等のオブジェクト)を返します。" -#: ../../annot.rst:113 f8f400cd53404748a7dd44b41f143258 +#: ../../annot.rst:114 58feb90344fd49c8b4824a369da850b4 msgid "" "(positional only) the desired format - one of the following values. " "Please note that this method works exactly like the same-named method of " @@ -504,7 +518,7 @@ msgid "" ":meth:`TextPage.extractRAWDICT`" msgstr "" -#: ../../annot.rst:113 d2e4b95d132e47869aa8f01a290ad534 +#: ../../annot.rst:114 c9e62c7b73724f1c8e6235f8f6cbda04 msgid "" "(positional only) the desired format - one of the following values. " "Please note that this method works exactly like the same-named method of " @@ -513,80 +527,118 @@ msgstr "" "(位置指定のみ) 望ましいフォーマット - 以下のいずれかの値の1つです。このメソッドは、:ref:`Page` " "の同名のメソッドとまったく同じように動作することに注意してください。" -#: ../../annot.rst:115 5f6f56ccc7cf4b83991370d549b6ba4a +#: ../../annot.rst:116 41033f33feec4d6cbb8e872e49834e35 msgid "\"text\" -- :meth:`TextPage.extractTEXT`, default" msgstr "\"text\" -- :meth:`TextPage.extractTEXT`、デフォルト" -#: ../../annot.rst:116 bba0bcb694a3411b84901cc732314b47 +#: ../../annot.rst:117 0f63370b1d564689a30b933603e4c3e6 msgid "\"blocks\" -- :meth:`TextPage.extractBLOCKS`" msgstr "" -#: ../../annot.rst:117 5cb5c3e312234a7eac81b4b7a6d0d554 +#: ../../annot.rst:118 913527d283fe4c76926fe0d4e4eaaf65 msgid "\"words\" -- :meth:`TextPage.extractWORDS`" msgstr "" -#: ../../annot.rst:118 d6fc7d7fdafb40d5adfa32932a005d83 +#: ../../annot.rst:119 dfeba93112b743e9b6b22423e828ae9c msgid "\"html\" -- :meth:`TextPage.extractHTML`" msgstr "" -#: ../../annot.rst:119 e28f215d1bda4c87a1398e75febad37a +#: ../../annot.rst:120 80912195e04d40f9baf509203c257b1f msgid "\"xhtml\" -- :meth:`TextPage.extractXHTML`" msgstr "" -#: ../../annot.rst:120 3395d6b9a09e429d83d02c69ade8688f +#: ../../annot.rst:121 cd4deb7f93034a8bbfd0bd74e2f12450 msgid "\"xml\" -- :meth:`TextPage.extractXML`" msgstr "" -#: ../../annot.rst:121 568d1ab1321944bb98f95c5aef680226 +#: ../../annot.rst:122 b286687300f54486ae11f97ee845c847 msgid "\"dict\" -- :meth:`TextPage.extractDICT`" msgstr "" -#: ../../annot.rst:122 800b364bf02246a7adc6d4b6f1524c50 +#: ../../annot.rst:123 9dc28b03f1ea41e8b66cf1bb75ede2af msgid "\"json\" -- :meth:`TextPage.extractJSON`" msgstr "" -#: ../../annot.rst:123 bb9793317ebe457fba6153858be288d9 +#: ../../annot.rst:124 38208eb8ae134ee1a76f75088217b67d msgid "\"rawdict\" -- :meth:`TextPage.extractRAWDICT`" msgstr "" -#: ../../annot.rst:125 8b4fb0199b904d05a2ff7899e3f8c576 +#: ../../annot.rst:126 09f1c69a2a314fe4b0c7a41518666c60 msgid "" "(keyword only) restrict the extraction to this area. Should hardly ever " "be required, defaults to :attr:`Annot.rect`." msgstr "(キーワードのみ) このエリアに抽出を制限します。ほとんど必要ない場合がほとんどで、デフォルトは :attr:`Annot.rect` です。" -#: ../../annot.rst:126 7d99ffc24ae4413089bbc3cc6692fcbd +#: ../../annot.rst:127 10c8554551bc4032abd2670e94cdb2b8 msgid "" "(keyword only) control the amount of data returned. Defaults to simple " "text extraction." msgstr "(キーワードのみ) 返されるデータの量を制御します。単純なテキスト抽出がデフォルトです。" -#: ../../annot.rst:132 a94f1c0b59004f5886598e158922fad4 +#: ../../annot.rst:133 da44ee14361e4946b9f738c42752dbf1 msgid "" "Return the annotation text. Mostly (except line breaks) equal to " ":meth:`Annot.get_text` with the \"text\" option." msgstr "注釈のテキストを返します。主に(改行を除く)「text」オプションを使用した :meth:`Annot.get_text` と同等です" -#: ../../annot.rst:134 bfaf40ca0eb042f58237529dff2ce541 +#: ../../annot.rst:135 775ed8af3b514f7cb93fca3075fb7b66 msgid "the area to consider, defaults to :attr:`Annot.rect`." msgstr "rect (rect-like) – 考慮する領域、デフォルトは :attr:`Annot.rect` です。" -#: ../../annot.rst:139 b102cffdb2f141d9ac68a9fd0e279c54 +#: ../../annot.rst:140 a37b251418e1438eb6557034157f78d6 +#, fuzzy +msgid "Create a :ref:`TextPage` for the annotation." +msgstr "アノテーションのためのポップアップを作成します" + +#: ../../annot.rst:142 853a6807eb2e4838b3a76e058d318a16 +msgid "" +"indicator bits controlling the content available for subsequent text " +"extractions and searches -- see the parameter of :meth:`Annot.get_text`." +msgstr "後続のテキスト抽出や検索に利用可能なコンテンツを制御する指標ビット -- :meth:`Annot.get_text` のパラメータを参照してください。" + +#: ../../annot.rst:144 a0916e69962b40559ccefc18b36fe7ab +msgid "restrict extracted text to this area." +msgstr "抽出されるテキストをこのエリアに制限します。" + +#: ../../annot.rst 10c25cc74cf14a4487da85267fd798e1 +#: 23ab237bc68240aab0c5942ffd105dbc 491acd8d88934a05b86aa6b039da0c4b +#: 61ef90c5224d40d2a863f618127ffcbd 67a45cfcd15047fea621454ad26174e8 +#: 944c95687ff74ea6ad35abc0e299761a c03ec076d8fa47a889fcd76c059f864c +msgid "Returns" +msgstr "戻り値" + +#: ../../annot.rst:146 8ffa753f1b664b66bd4b57101af0dcac +msgid ":ref:`TextPage`" +msgstr "" + +#: ../../annot.rst:148 a9f9910300164ed1b6a9d9d35e97ccc7 +msgid "|history_begin|" +msgstr "" + +#: ../../annot.rst:150 faba4699392d4b29a960fcfd7e0f9e79 +msgid "v1.25.5: fixed `clip` arg." +msgstr "" + +#: ../../annot.rst:152 55dcf062ed404c9289bb09e898b26e1a +msgid "|history_end|" +msgstr "" + +#: ../../annot.rst:156 2a88cb05dd094eca83c54413f0cf5ce8 msgid "Changed in version 1.16.10" msgstr "バージョン 1.16.10 で変更" -#: ../../annot.rst:141 72067836dcef4c0dafeed7442c6029a5 +#: ../../annot.rst:158 3d7812355216454aaffbae4bba32aae5 msgid "" "Changes annotation properties. These include dates, contents, subject and" " author (title). Changes for *name* and *id* will be ignored. The update " -"happens selectively: To leave a property unchanged, set it to *None*. To " -"delete existing data, use an empty string." +"happens selectively: To leave a property unchanged, set it to ``None``. " +"To delete existing data, use an empty string." msgstr "" "注釈のプロパティを変更します。これには日付、内容、題名、および著者(タイトル)が含まれます。*名前* と *ID* " -"の変更は無視されます。更新は選択的に行われます:プロパティを変更しない場合は、それを *None* " +"の変更は無視されます。更新は選択的に行われます:プロパティを変更しない場合は、それを ``None`` " "に設定します。既存のデータを削除するには、空の文字列を使用します。" -#: ../../annot.rst:143 b559a50cdee64ba7872d7ced4a94e51b +#: ../../annot.rst:160 99d8112ddc2a49fdacf5c1ba5e3c4e53 msgid "" "a dictionary compatible with the *info* property (see below). All entries" " must be strings. If this argument is not a dictionary, the other " @@ -595,25 +647,25 @@ msgstr "" "*info* " "プロパティと互換性のある辞書(以下参照)。すべてのエントリは文字列である必要があります。この引数が辞書でない場合、他の引数が代わりに使用されます。それ以外の場合、無視されます。" -#: ../../annot.rst:144 ../../annot.rst:145 ../../annot.rst:148 -#: 15f12cde73614e239ccc4f355efcd6ae a770a66f6b134d67884a70673446b9d8 -#: d64e063eb8634d7c86081d6286dfae22 +#: ../../annot.rst:161 ../../annot.rst:162 ../../annot.rst:165 +#: 298f8bd243c74fd8815ee77d8616eb88 4f949b0c27064158a50619fef16f97c1 +#: d48ad8dfb0234e2f8a3fb95edc52b5ec msgid "*(new in v1.16.10)* see description in :attr:`info`." msgstr "*(v1.16.10 で新規追加)* :attr:`info` の説明を参照してください。" -#: ../../annot.rst:146 4fad1c688e3e4cd2bea7463cf0b336ac +#: ../../annot.rst:163 b37754ca35e947d187046764f489d377 msgid "" "*(new in v1.16.10)* date of annot creation. If given, should be in PDF " "datetime format." msgstr "*(v1.16.10 で新規追加)* 注釈の作成日。指定する場合、PDF 日時形式である必要があります。" -#: ../../annot.rst:147 01d83ca87f554c3f9d7d3721ed739f35 +#: ../../annot.rst:164 4f5cc39695f54dd1ba9374889dd6ab3a msgid "" "*(new in v1.16.10)* date of last modification. If given, should be in PDF" " datetime format." msgstr "*(v1.16.10 で新規追加)* 最終変更日。指定する場合、PDF 日時形式である必要があります。" -#: ../../annot.rst:152 8baecc99235f4e26aff998d17f237b0d +#: ../../annot.rst:169 1e74b028b8224bbf9d84b29aa7a1f114 msgid "" "Sets an annotation's line ending styles. Each of these annotation types " "is defined by a list of points which are connected by lines. The symbol " @@ -625,7 +677,7 @@ msgstr "" "で指定されたシンボルは、最初の点に、*end* " "はこのリストの最後の点に取り付けられます。サポートされていない注釈タイプの場合、警告メッセージとともに無操作となります。" -#: ../../annot.rst:156 712dd03feca349a0b3476b70683f1de6 +#: ../../annot.rst:173 f51503de04174f5892b72d2795bc07b6 msgid "" "While 'FreeText', 'Line', 'PolyLine', and 'Polygon' annotations can have " "these properties, (Py-) MuPDF does not support line ends for 'FreeText', " @@ -634,28 +686,28 @@ msgstr "" "「FreeText」、「Line」、「PolyLine」、および「Polygon」注釈はこれらのプロパティを持つことができますが、(Py-)MuPDF" " は「FreeText」の線終端をサポートしていません。なぜなら、そのコールアウトバリアントはサポートされていないからです。" -#: ../../annot.rst:157 1daf59fbbe424526a9012de57379e1d1 +#: ../../annot.rst:174 a700a60706ca4e569abfa259b0b9fb63 msgid "" "*(Changed in v1.16.16)* Some symbols have an interior area (diamonds, " "circles, squares, etc.). By default, these areas are filled with the fill" -" color of the annotation. If this is *None*, then white is chosen. The " +" color of the annotation. If this is ``None``, then white is chosen. The " "*fill_color* argument of :meth:`Annot.update` can now be used to override" " this and give line end symbols their own fill color." msgstr "" "*(v1.16.16 で変更)* " "一部のシンボルには内部領域(ダイヤモンド、円、正方形など)があります。デフォルトでは、これらの領域は注釈の塗りつぶし色で塗りつぶされます。これが " -"*None* の場合、白色が選択されます。:meth:`Annot.update` の *fill_color* " +"``None`` の場合、白色が選択されます。:meth:`Annot.update` の *fill_color* " "引数を使用して、線終端シンボルに独自の塗りつぶし色を設定することができるようになりました。" -#: ../../annot.rst:159 1d196d375e03485f8edda9c3a99e6b10 +#: ../../annot.rst:176 db8246f575e5488d96aa74a3a2514029 msgid "The symbol number for the first point." msgstr "最初の点のシンボル番号。" -#: ../../annot.rst:160 eac2d0a402094746b3f16c11ccf26843 +#: ../../annot.rst:177 3cc0f00120ce499a934058c5ccaf4de9 msgid "The symbol number for the last point." msgstr "最後の点のシンボル番号。" -#: ../../annot.rst:164 c585c38c544d4b179b7efb98b943076a +#: ../../annot.rst:181 9b8aa01ea6a148488442f0b9f54fd48b msgid "" "Set the annotation's visibility using PDF optional content mechanisms. " "This visibility is controlled by the user interface of supporting PDF " @@ -665,7 +717,7 @@ msgstr "" "PDFのオプションコンテンツメカニズムを使用して、注釈の表示/非表示を設定します。この表示は、サポートするPDFビューアのユーザーインターフェースによって制御されます。:attr:`Annot.flags`" " のような他の属性とは独立しています。" -#: ../../annot.rst:166 2d345fb5410846569566d5afea9cd55f +#: ../../annot.rst:183 b8604fe16b22458ea3a6c3ebed57b912 msgid "" "the :data:`xref` of an optional contents group (OCG or OCMD). Any " "previous xref will be overwritten. If zero, a previous entry will be " @@ -675,109 +727,102 @@ msgstr "" "オプションコンテンツグループ(OCGまたはOCMD)のxref。以前の :data:`xref` " "は上書きされます。ゼロの場合、以前のエントリが削除されます。xrefがゼロでない場合かつ有効なPDFオブジェクトを指していない場合、例外が発生します。" -#: ../../annot.rst:168 43814cf880c341688fcd829352485e18 +#: ../../annot.rst:185 552f6fa51ec3485693b27f15c1ad9e28 msgid "This does **not require executing** :meth:`Annot.update` to take effect." msgstr "これは :meth:`Annot.update` の **実行を必要としません。** " -#: ../../annot.rst:172 90ca5fd4d12c4ba5aecc410cff1cafcd +#: ../../annot.rst:189 883041291cbb4087af3abbc8d2db4d3e msgid "" "Return the :data:`xref` of an optional content object, or zero if there " "is none." msgstr "オプションコンテンツオブジェクトの :data:`xref` 、または存在しない場合はゼロを返します。" -#: ../../annot.rst 1b2e47bf7a0540ff8911f99b032a9545 -#: a90dd1078d7d4e359cd1ac24cc0083be ba7033d076f546acabd2ae8821e0a72b -#: beffbafdde4f48a794f446bc77b1849c d46dfd3d0d3842e99058a3a995b3d881 -#: dafd3208f1ad4ffaa36b8242b1c1ddbe -msgid "Returns" -msgstr "戻り値" - -#: ../../annot.rst:174 e3467ed51507480f91da6df271b68070 +#: ../../annot.rst:191 da9806aa82134c699ec1298c08405974 msgid "zero or the xref of an OCG (or OCMD)." msgstr "ゼロまたはOCG(またはOCMD)のxref。" -#: ../../annot.rst:179 87ec8d4e9aa64b4eb544053e9a259740 +#: ../../annot.rst:196 0232d0f9f89c4b9caf445de434761a86 msgid "New in v1.19.3" msgstr "v1.19.3 で新規追加" -#: ../../annot.rst:181 26e99a69c12d46b4aec177471541edae +#: ../../annot.rst:198 bd8f5da402b344e7a57080ae00f8f8ea msgid "Set annotation to be \"In Response To\" another one." msgstr "注釈を別の注釈への「応答として」設定します。" -#: ../../annot.rst:183 9e8a85d788194d4aaa7282262891b9f4 +#: ../../annot.rst:200 29a518aa3ac14b4fb96189039d52a919 msgid "" "The :data:`xref` of another annotation. .. note:: Must refer to an " "existing annotation on this page. Setting this property requires no " "subsequent `update()`." msgstr "" -#: ../../annot.rst:183 5984e6b7b2ef403bb936d5a4127bd777 +#: ../../annot.rst:200 044062a21f8a4ffba1e8c12a4dbfc7da msgid "The :data:`xref` of another annotation." msgstr "別の注釈の :data:`xref` 。" -#: ../../annot.rst:185 5e39451c14e04e38af7e43d60c90af0b +#: ../../annot.rst:202 056ca100a6c744158b0f80b623e231b8 msgid "" "Must refer to an existing annotation on this page. Setting this property " "requires no subsequent `update()`." msgstr "このプロパティを設定するには、このページの既存の注釈を参照する必要があります。このプロパティを設定する際、後続の `update()` は不要です。" -#: ../../annot.rst:190 ../../annot.rst:199 ../../annot.rst:219 -#: 7d51c75255ca42c58d8bbd989d49c765 a48fde4b22594fe68ac66a37560928d6 -#: d41a8548432241c1a2c70f04607a7a86 +#: ../../annot.rst:207 ../../annot.rst:216 ../../annot.rst:236 +#: 4f1bdf826df24156ae246c89b4778e32 712a3a2f72694e64a884ee7a5034ee28 +#: a6e6686854de4108a873d9d33f171c1c msgid "New in v1.18.4" msgstr "v1.18.4 で新たに追加" -#: ../../annot.rst:192 dd94030820a74b6f8279aa33f9fb941f +#: ../../annot.rst:209 1f213b949eb642e28f99585ec1a407d4 msgid "" "Set the annotation's Popup annotation to open or closed -- **or** the " "annotation itself, if its type is 'Text' (\"sticky note\")." msgstr "注釈のポップアップ注釈を開いた状態または閉じた状態に設定します – *または* その注釈自体、そのタイプが 'Text'(「付箋」)の場合。" -#: ../../annot.rst:194 0bc82eba310d4dc3a0ee0eadee53215b +#: ../../annot.rst:211 92f2770d0bff4361a606a0310fa7bbef msgid "the desired open state." msgstr "望ましい開いた状態。" -#: ../../annot.rst:201 fc1c439a021e4ae88f1324fa4542868e +#: ../../annot.rst:218 5b8c653d8a8843e8babb5fceb37261ea msgid "" "Create a Popup annotation for the annotation and specify its rectangle. " "If the Popup already exists, only its rectangle is updated." msgstr "注釈のためのポップアップ注釈を作成し、その矩形を指定します。ポップアップが既に存在する場合、その矩形のみが更新されます。" -#: ../../annot.rst:203 82e9e776cbe54dd3b5309044a7f7f0f3 +#: ../../annot.rst:220 7909b167cec241d99b7c2d3413fe1fbe msgid "the desired rectangle." msgstr "望ましい矩形。" -#: ../../annot.rst:209 a082992dc4864c4ea2f4e404045d6d08 +#: ../../annot.rst:226 0026e882e4004b07b13c1e01e1fc77e4 msgid "" "Set the annotation's transparency. Opacity can also be set in " ":meth:`Annot.update`." msgstr "注釈の透明度を設定します。透明度は :meth:`Annot.update` でも設定できます。" -#: ../../annot.rst:211 f322e0e987c54ef1923ea0435427faaa +#: ../../annot.rst:228 5405316104d84f4abcecbc698904a721 msgid "" "a float in range *[0, 1]*. Any value outside is assumed to be 1. E.g. a " "value of 0.5 sets the transparency to 50%." msgstr "*[0、1]* の範囲内の浮動小数点数。範囲外の値は 1 と見なされます。例:0.5 の値は透明度を 50% に設定します。" -#: ../../annot.rst:213 43202c5acc704da19562841daa2dc0ca +#: ../../annot.rst:230 9a3c8b905c7949bbb3e5acb4a19981b6 msgid "Three overlapping 'Circle' annotations with each opacity set to 0.5:" msgstr "透明度がそれぞれ 0.5 に設定された3つの重なる「Circle」注釈:" -#: ../../annot.rst:221 cdebf5829a15468d97060e3f700c7c4f +#: ../../annot.rst:238 95cea4131fbd4be4ac5581cfa874b1e4 msgid "" "The annotation's blend mode. See :ref:`AdobeManual`, page 324 for " "explanations." msgstr "注釈のブレンドモード。詳細については :ref:`AdobeManual` 、ページ324を参照してください。" -#: ../../annot.rst:224 e9ed482e6e23459aaf953c46cc3be588 -msgid "the blend mode or *None*." -msgstr "ブレンドモードまたは *None* 。" +#: ../../annot.rst:241 2ff0fa0dc5fe4ec8a25c8bc7b2d4fcef +msgid "the blend mode or ``None``." +msgstr "ブレンドモードまたは ``None`` 。" -#: ../../annot.rst:229 e180015a649e4a8aa6f0fdb91010a732 +#: ../../annot.rst:246 e1a9e6a9cfe74f7ab8cc8cffb93c59bc msgid "New in v1.16.14" msgstr "v1.16.14 で新たに追加" -#: ../../annot.rst:231 91be449efd3c4ee9ba2647215f5bd32a +#: ../../annot.rst:248 e7ba898f2d6a4a198a520db5457bbad2 msgid "" "Set the annotation's blend mode. See :ref:`AdobeManual`, page 324 for " "explanations. The blend mode can also be set in :meth:`Annot.update`." @@ -785,7 +830,7 @@ msgstr "" "注釈のブレンドモードを設定します。詳細については :ref:`AdobeManual` 、ページ324を参照してください。ブレンドモードは " ":meth:`Annot.update` でも設定できます。" -#: ../../annot.rst:233 b7e6d344879446fc9be5306f3038ee2c +#: ../../annot.rst:250 ddb5fbe792ab4eae98a254729382b924 msgid "" "set the blend mode. Use :meth:`Annot.update` to reflect this in the " "visual appearance. For predefined values see :ref:`BlendModes`. Use " @@ -795,11 +840,11 @@ msgstr "" "を使用します。事前定義の値についてはPDF標準のブレンドモードを参照してください。ブレンドモードを **削除する** には " "`PDF_BM_Normal` を使用します。" -#: ../../annot.rst:238 8e6a187457784fd0bc943fd45fb2f021 +#: ../../annot.rst:255 0cd5afc2c9a14bbfa787d0023b2604f0 msgid "New in version 1.16.0" msgstr "バージョン1.16.0で新たに追加" -#: ../../annot.rst:240 ffd41fe88cd74692a2057a91a9e937a2 +#: ../../annot.rst:257 64b51d5037e246d29be36ea82f374e63 msgid "" "Change the name field of any annotation type. For 'FileAttachment' and " "'Text' annotations, this is the icon name, for 'Stamp' annotations the " @@ -809,11 +854,11 @@ msgstr "" "すべての注釈タイプの名前フィールドを変更します。「FileAttachment」と「Text」注釈の場合、これはアイコンの名前であり、「Stamp」注釈の場合はスタンプのテキストです。視覚的な結果(ある場合)は、PDFビューアに依存します。:ref:`mupdficons`" " も参照してください。" -#: ../../annot.rst:242 48f1a7560612471abf01dca545b8f497 +#: ../../annot.rst:259 ea1dcd069e554ea7882c4893488c637c msgid "the new name." msgstr "新しい名前。" -#: ../../annot.rst:244 5aeb35e8fc1643fcae40ee1a561358a3 +#: ../../annot.rst:261 01e8667a8ae34ab1a9f4fe7311f976b3 msgid "" "If you set the name of a 'Stamp' annotation, then this will **not " "change** the rectangle, nor will the text be layouted in any way. If you " @@ -832,7 +877,7 @@ msgstr "" "に表示され、収まるように短縮されます。テキストを完全に表示するには、フォントサイズ20を使用してのテキストの長さが190ピクセルを超えてはいけません。したがって、以下の不等式が成り立つことを確認してください:" " `pymupdf.get_text_length(text, fontname=\"tibo\", fontsize=20) <= 190` 。" -#: ../../annot.rst:248 0c83c13908074354b67569584deba79f +#: ../../annot.rst:265 86ab16b4319d42389d6edde9d42dc4f0 msgid "" "Change the rectangle of an annotation. The annotation can be moved around" " and both sides of the rectangle can be independently scaled. However, " @@ -845,7 +890,7 @@ msgstr "" " [#f2]_ 、それ以外の場合はPythonの `sys.stderr` にメッセージが表示されます。例外は発生しませんが、`False` " "が返されます。" -#: ../../annot.rst:250 b54cc5845428492a9b826edbe78a6169 +#: ../../annot.rst:267 a9a53793892b498e943440f97163a7d6 msgid "" "the new rectangle of the annotation (finite and not empty). E.g. using a " "value of *annot.rect + (5, 5, 5, 5)* will shift the annot position 5 " @@ -854,28 +899,28 @@ msgstr "" "rect (rect_like) – 注釈の新しい矩形(有限で空ではない)です。たとえば、*annot.rect + (5, 5, 5, 5)* " "の値を使用すると、注釈を右に5ピクセル、下に5ピクセル移動させます。" -#: ../../annot.rst:252 b24664fc332841e2afe47f2ad0061cb4 +#: ../../annot.rst:269 6898411fb0da40fa867760423a53258f msgid "You **need not** invoke :meth:`Annot.update` for activation of the effect." msgstr "効果の有効化には :meth:`Annot.update` を呼び出す **必要はありません** 。" -#: ../../annot.rst:257 92459da6dfb84ecd95725ea116c5062f +#: ../../annot.rst:274 e67ffff21f5f4efaa7d4c8275c30a8fe msgid "" "Set the rotation of an annotation. This rotates the annotation rectangle " "around its center point. Then a **new annotation rectangle** is " "calculated from the resulting quad." msgstr "注釈の回転を設定します。これにより、注釈の矩形はその中心点を中心に回転します。その後、結果の四角形から **新しい注釈の矩形** が計算されます。" -#: ../../annot.rst:259 2aa8122c0f2a41bd9eb051e10fac697d +#: ../../annot.rst:276 308edadc7a93427ea4c587eeedf6a4cb msgid "" "rotation angle in degrees. Arbitrary values are possible, but will be " "clamped to the interval `[0, 360)`." msgstr "度数法での回転角度。任意の値が可能ですが、区間 `[0, 360)` にクランプされます。" -#: ../../annot.rst:262 084f1ced51744adcae655d3d2eade880 +#: ../../annot.rst:279 f81088d72d42429a81b58cbe0635cf58 msgid "You **must invoke** :meth:`Annot.update` to activate the effect." msgstr "効果を有効にするには、:meth:`Annot.update` を **呼び出す必要があります** 。" -#: ../../annot.rst:263 bfb6df75ae0e4b7eaeaf862d50149bcf +#: ../../annot.rst:280 cb61e0b1ff9649bc874eb5669b39fda1 msgid "" "For PDF_ANNOT_FREE_TEXT, only one of the values 0, 90, 180 and 270 is " "possible and will **rotate the text** inside the current rectangle (which" @@ -884,7 +929,7 @@ msgstr "" "PDF_ANNOT_FREE_TEXTの場合、値0、90、180、270のいずれかの値のみが可能で、現在の矩形内の **テキストを回転させます**" " (矩形自体は変更されません)。その他の値は静かに無視され、0に置き換えられます。" -#: ../../annot.rst:264 8f863300954046cfae58436ad359dde5 +#: ../../annot.rst:281 2b42b8dba5254e0b9d8f787fc6ce8197 msgid "" "Otherwise, only the following :ref:`AnnotationTypes` can be rotated: " "'Square', 'Circle', 'Caret', 'Text', 'FileAttachment', 'Ink', 'Line', " @@ -893,18 +938,18 @@ msgstr "" "それ以外の場合、次の :ref:`AnnotationTypes` " "のみが回転できます:'Square'、'Circle'、'Caret'、'Text'、'FileAttachment'、'Ink'、'Line'、'Polyline'、'Polygon'、および'Stamp'。それ以外のすべての場合、このメソッドは無効です。" -#: ../../annot.rst:269 17835d05090a49e88daa134deb4b7432 +#: ../../annot.rst:286 9b7d7c0af36c4997a1b2014f00fd693a msgid "" "Changed in version 1.16.9: Allow specification without using a " "dictionary. The direct parameters are used if *border* is not a " "dictionary." msgstr "バージョン1.16.9で変更: 辞書を使用せずに指定を許可。*border* が辞書でない場合、直接のパラメータが使用されます。" -#: ../../annot.rst:271 4f3ca73fc5024c36a644eb5dc364df11 +#: ../../annot.rst:288 6a3bcf3fd55e40f0906bfc9c73321125 msgid "Changed in version 1.22.5: Support of the \"cloudy\" border effect." msgstr "バージョン1.22.5で変更: \"cloudy\"ボーダーエフェクトのサポート。" -#: ../../annot.rst:273 bedf7fa547c34f2c9492ddd149f41c11 +#: ../../annot.rst:290 766f20871ac840ad82e2a534a5d7428c msgid "" "PDF only: Change border width, dashing, style and cloud effect. See the " ":attr:`Annot.border` attribute for more details." @@ -912,7 +957,7 @@ msgstr "" "PDFのみ: ボーダーの幅、点線、スタイル、およびクラウド効果を変更します。詳細については :attr:`Annot.border` " "属性を参照してください。" -#: ../../annot.rst:276 574222025a134863a00cc002bdb161b3 +#: ../../annot.rst:293 5412a3c876dc445b8991e6bfe6206c97 msgid "" "a dictionary as returned by the :attr:`border` property, with keys " "*\"width\"* (*float*), *\"style\"* (*str*), *\"dashes\"* (*sequence*) " @@ -925,15 +970,15 @@ msgstr "" "\"clouds\"(int)を持っています。省略されたキーはそれぞれのプロパティを変更しないままにします。他の引数を使用する場合、border引数を" " `None` (デフォルト)に設定します。" -#: ../../annot.rst:278 01ddb64bb6a14667a32876e6b2cabac2 +#: ../../annot.rst:295 a1a029503d4f45a6bfc58610e6294894 msgid "A non-negative value will change the border line width." msgstr "非負の値はボーダーの線幅を変更します。" -#: ../../annot.rst:279 2bf876c635f84882bc63dd3fe1c5a907 +#: ../../annot.rst:296 3133c2f7605a4781b259ff26dab31bcf msgid "A value other than `None` will change this border property." msgstr "`None` 以外の値はこのボーダープロパティを変更します。" -#: ../../annot.rst:280 be267f858688404fbd5dcbfa3778bc79 +#: ../../annot.rst:297 1243de5fc0aa4006bdde153c4e9f164c msgid "" "All items of the sequence must be integers, otherwise the parameter is " "ignored. To remove dashing use: `dashes=[]`. If dashes is a non-empty " @@ -942,7 +987,7 @@ msgstr "" "シーケンスのすべてのアイテムは整数である必要があり、それ以外の場合、パラメータは無視されます。点線を削除するには、`dashes=[]` " "を使用します。dashesが空でないシーケンスの場合、\"style\"は自動的に \"D\"(点線)に設定されます。" -#: ../../annot.rst:281 ca65d52bc9a0498dbf6009ffa11a204d +#: ../../annot.rst:298 03237562991b48e080aec6fb53dfc4aa msgid "" "A value >= 0 will change this property. Use `clouds=0` to remove the " "cloudy appearance completely. Only annotation types 'Square', 'Circle', " @@ -951,27 +996,27 @@ msgstr "" "0以上の値はこのプロパティを変更します。クラウディな外観を完全に削除するには、`clouds=0` " "を使用します。このプロパティはアノテーションタイプ 'Square'、'Circle'、および 'Polygon' のみでサポートされています。" -#: ../../annot.rst:285 e58b61c8bb204becb23c89e21a29fa87 +#: ../../annot.rst:302 4f67c0516f2e43d2a6432673d5bf3c8f msgid "Changes the annotation flags. Use the `|` operator to combine several." msgstr "注釈のフラグを変更します。複数のフラグを組み合わせるには `|` 演算子を使用します。" -#: ../../annot.rst:287 27a5a59ba3634df5a7cee7c1e72f4e7e +#: ../../annot.rst:304 9837a34f7e344f5db3646bd8c2935c08 msgid "an integer specifying the required flags." msgstr "必要なフラグを指定する整数。" -#: ../../annot.rst:291 43d873a6d1d141cb853e29649ef0ed4e +#: ../../annot.rst:308 717edac376fa4c2781212ccf4f1300fb msgid "" "Changed in version 1.16.9: Allow colors to be directly set. These " "parameters are used if *colors* is not a dictionary." msgstr "バージョン1.16.9で変更: 色を直接設定できるようにしました。これらのパラメータは、*colors* が辞書でない場合に使用されます。" -#: ../../annot.rst:293 9fd24d944a7c421fa9afaa8f9b96e2b7 +#: ../../annot.rst:310 d388c00f532d4aecafa4def64bd6c525 msgid "" -"Changes the \"stroke\" and \"fill\" colors for supported annotation types" -" -- not all annotations accept both." -msgstr "サポートされている注釈タイプに対して「ストローク」と「塗りつぶし」の色を変更します – すべての注釈が両方を受け入れるわけではありません。" +"Changes the \"stroke\" and \"fill\" colors for supported annotation types -- not all annotation types accept both. **Do not use this method at all for FreeText annotations** because it has its special conventions to deal with up to three colors (border, fill, text)." +msgstr "サポートされている注釈タイプに対して「ストローク」と「塗りつぶし」の色を変更します – すべての注釈が両方を受け入れるわけではありません。FreeText注釈にはこのメソッドを一切使用しないでください。 +このタイプの注釈は、境界線、塗りつぶし、テキストの最大3つの色を扱うための特別な規則があるためです。" -#: ../../annot.rst:295 d6aac7418e074fbc9cbcfa6f13e52be5 +#: ../../annot.rst:312 6de264581c6f4f85a50cbe3ab18a7397 msgid "" "a dictionary containing color specifications. For accepted dictionary " "keys and values see below. The most practical way should be to first make" @@ -981,45 +1026,43 @@ msgstr "" "色の仕様を含む辞書。受け入れられる辞書のキーと値については以下を参照してください。最も実用的な方法は、まず ** " "プロパティのコピーを作成し、その後必要に応じてこの辞書を変更することです。" -#: ../../annot.rst:296 ../../annot.rst:297 86afb9de70b4460e8bfafd4c4c98e954 -#: e8135962d849482aa5b767f9d97e6726 +#: ../../annot.rst:313 ../../annot.rst:314 36d2b5665df049e29f372ec83d1b2090 +#: f841d09bf133425690dda9c556072aa1 msgid "see above." msgstr "上記を参照してください。" -#: ../../annot.rst:299 fbfad03720d747ba99b96742174269c8 +#: ../../annot.rst:316 13a268dfb4a44682b64f2e122fe775e3 msgid "" -"*Changed in v1.18.5:* To completely remove a color specification, use an " -"empty sequence like `[]`. If you specify `None`, an existing " -"specification will not be changed." +"To completely remove a color specification, use an empty sequence like `[]`. If you specify `None`, an existing specification will not be changed." msgstr "" -"*バージョン1.18.5で変更:* 色の仕様を完全に削除するには、`[]` のような空のシーケンスを使用してください。`None` " +"色の仕様を完全に削除するには、`[]` のような空のシーケンスを使用してください。`None` " "を指定した場合、既存の仕様は変更されません。" -#: ../../annot.rst:304 3a067e83867c4a7c880d45074fc9aeec +#: ../../annot.rst:321 941d573346c9417a9e600b67f4c4cdfb msgid "New in version 1.16.12" msgstr "バージョン1.16.12で新規追加" -#: ../../annot.rst:306 03b55429abf4453f8413097f2af16d7f +#: ../../annot.rst:323 b371873f742e46ad9b68e6d4496f6e92 msgid "" "Delete annotations referring to this one. This includes any 'Popup' " "annotations and all annotations responding to it." msgstr "この注釈を参照する注釈を削除します。これには「ポップアップ」注釈とそれに応答するすべての注釈が含まれます。" -#: ../../annot.rst:320 10b693f12b354040a48f9b072aa635f8 +#: ../../annot.rst:337 826c48ae25be4dc5a9aa146fc165e55f msgid "" "Synchronize the appearance of an annotation with its properties after " "relevant changes." msgstr "関連する変更後に注釈の外観をプロパティに同期させます。" -#: ../../annot.rst:322 ec3cc181314040b599846fa89f09b083 +#: ../../annot.rst:339 a2fd472b5bf84f209bce5c88b39a1804 msgid "You can safely **omit** this method **only** for the following changes:" msgstr "以下の変更に関して **のみ** 、このメソッドを安全に **省略できます** :" -#: ../../annot.rst:328 8434306f7c8d49a288acb63105440965 +#: ../../annot.rst:345 883f006d1b2a459bbf7d268dc47bd9eb msgid ":meth:`Annot.set_info` (except any changes to *\"content\"*)" msgstr ":meth:`Annot.set_info` (*「content」* 以外の変更を除く)" -#: ../../annot.rst:330 27ada64457a947ac94c561192377d73a +#: ../../annot.rst:347 0e9409972acc4017918ec20f51e46ce4 msgid "" "All arguments are optional. *(Changed in v1.16.14)* Blend mode and " "opacity are applicable to **all annotation types**. The other arguments " @@ -1028,7 +1071,7 @@ msgstr "" "すべての引数はオプションです。 *(v1.16.14で変更)* ブレンドモードと不透明度は **すべての注釈タイプ** に適用されます。 " "他の引数は主に特殊な用途として、以下で説明されています。" -#: ../../annot.rst:332 7515e8e6f72348648e53b30169a32a81 +#: ../../annot.rst:349 f2acfb9d00cd4a1f8886ea7b59416839 msgid "" "Color specifications may be made in the usual format used in PuMuPDF as " "sequences of floats ranging from 0.0 to 1.0 (including both). The " @@ -1036,7 +1079,7 @@ msgid "" "colorspaces respectively). For GRAY, just a float is also acceptable." msgstr "カラーの仕様は、通常のPuMuPDFで使用される形式で指定できます。0.0から1.0までの浮動小数点数のシーケンスです(両方を含む)。シーケンスの長さは1、3、または4である必要があります(GRAY、RGB、およびCMYKのカラースペースをサポートしています)。GRAYの場合、浮動小数点数だけでも受け入れられます。" -#: ../../annot.rst:334 f0ec7ab65b3e4fc0b66f4f72cc0c8efa +#: ../../annot.rst:351 c579a7f52a8c4efba4049c2f1011da6d msgid "" "*(new in v1.16.14)* **valid for all annotation types:** change or set the" " annotation's transparency. Valid values are *0 <= opacity < 1*." @@ -1044,7 +1087,7 @@ msgstr "" "*(v1.16.14で新規)* **すべての注釈タイプに対して有効:** 注釈の透明度を変更または設定します。有効な値は *0 <= " "opacity < 1です* 。" -#: ../../annot.rst:335 fa0bbca69dd34861980431fb23fae4df +#: ../../annot.rst:352 a81a6b9db111497fb78b5b3ceb27e377 msgid "" "*(new in v1.16.14)* **valid for all annotation types:** change or set the" " annotation's blend mode. For valid values see :ref:`BlendModes`." @@ -1052,31 +1095,30 @@ msgstr "" "*(v1.16.14で新規)* **すべての注釈タイプに対して有効:** " "注釈のブレンドモードを変更または設定します。有効な値についてはPDF標準のブレンドモードを参照してください。" -#: ../../annot.rst:336 2f5eec20745440b88862c664f8f00968 -#, fuzzy +#: ../../annot.rst:353 ae8e841246674f4ab53acaa575475903 msgid "change :data:`fontsize` of the text. 'FreeText' annotations only." msgstr "テキストのフォントサイズを変更します。 'FreeText' 注釈のみです。" -#: ../../annot.rst:337 219c52795c6c44a5a3eb678577ce24db -msgid "change the text color. 'FreeText' annotations only." +#: ../../annot.rst:354 26cc7f290781487ea2c8260b485b91f9 +msgid "change the text color. 'FreeText' annotations only. This has the same effect as ``border_color``. Note that the text color of rich-text annotations cannot be changed at all because it is set by HTML / CSS syntax and part of the text itself." msgstr "テキストの色を変更します。 'FreeText' 注釈のみです。" -#: ../../annot.rst:338 caaec9b39b164ddabb8c65aa4c00d597 -msgid "change the border color. 'FreeText' annotations only." +#: ../../annot.rst:355 b98848bcd4c84b94b4f2339e929facdb +msgid "change the border color. 'FreeText' annotations only. This has the same effect as ``text_color``." msgstr "境界線の色を変更します。 'FreeText' 注釈のみです。" -#: ../../annot.rst:339 31ee14f3ef7b4e1e8ced464a98a7d804 +#: ../../annot.rst:356 ea1d7e13b3fc45dcaeaa3bd564ccba38 msgid "" "the fill color. * 'Line', 'Polyline', 'Polygon' annotations: use it to " "give applicable line end symbols a fill color other than that of the " "annotation *(changed in v1.16.16)*." msgstr "" -#: ../../annot.rst:339 93e11177f0dc4eaba2264096ffbca72e +#: ../../annot.rst:356 70408a2e0957432fafc595f63a72dac3 msgid "the fill color." msgstr "塗りつぶしの色です。" -#: ../../annot.rst:341 e0ca1be5795f4d7489235dc4228336d5 +#: ../../annot.rst:358 56698a0491524cf1839cfd2e29a272a8 msgid "" "'Line', 'Polyline', 'Polygon' annotations: use it to give applicable line" " end symbols a fill color other than that of the annotation *(changed in " @@ -1085,16 +1127,16 @@ msgstr "" "'Line'、'Polyline'、'Polygon' 注釈:適用可能な線の端のシンボルに注釈の色以外の塗りつぶしの色を与えるために使用します " "*(v1.16.16で変更)* 。" -#: ../../annot.rst:343 1adc6e192c79414ca13bd3eb91304333 +#: ../../annot.rst:360 98b738882d314e1ca9e47acfb29b9c4c msgid "" "*(new in v1.17.2)* add two diagonal lines to the annotation rectangle. " -"'Redact' annotations only. If not desired, *False* must be specified even" -" if the annotation was created with *False*." +"'Redact' annotations only. If not desired, ``False`` must be specified " +"even if the annotation was created with ``False``." msgstr "" -"*(v1.17.2で新規)* 注釈の矩形に2本の対角線を追加します。 'Redact' 注釈のみです。希望しない場合、注釈が*False* " -"で作成された場合でも *False* を指定する必要があります。" +"*(v1.17.2で新規)* 注釈の矩形に2本の対角線を追加します。 'Redact' 注釈のみです。希望しない場合、注釈が``False`` " +"で作成された場合でも ``False`` を指定する必要があります。" -#: ../../annot.rst:344 d46bd879c5b84b30a8efa46258ae6221 +#: ../../annot.rst:361 317ef91a944a47d2bcd414dfa48b595b msgid "" "new rotation value. Default (-1) means no change. Supports 'FreeText' and" " several other annotation types (see :meth:`Annot.set_rotation`), [#f1]_." @@ -1105,7 +1147,7 @@ msgstr "" "およびいくつかの他の注釈タイプをサポートします:meth:`Annot.set_rotation` を参照) [#f1]_ 。 " "'FreeText' の場合、0、90、180、または270度を選択してください。それ以外の場合、任意の整数が受け入れられます。" -#: ../../annot.rst:348 724776c313ba4082b55aa6c14b070b82 +#: ../../annot.rst:365 5d8619257f4e40e5be96294c5adbc57f msgid "" "Using this method inside a :meth:`Page.annots` loop is **not " "recommended!** This is because most annotation updates require the owning" @@ -1115,65 +1157,69 @@ msgstr "" ":meth:`Page.annots` ループ内でこのメソッドを使用することは **お勧めしません!** " "これは、ほとんどの注釈の更新には所有ページの再読み込みが必要であり、このループ内で行うことはできないためです。このジェネレータのドキュメントで提供されている例のコーディングパターンを使用してください。" -#: ../../annot.rst:353 c3edf71660cb42fa8ef8e1a5adf6eb4e +#: ../../annot.rst:368 +msgid "This method is the only way to change the colors of a FreeText annotation. You cannot use :meth:`Annot.set_colors` for this purpose. But be aware that for rich-text annotations, the text color is never changed. The text color is set by the ``text_color`` entry of the ``info`` dictionary. This is a limitation of |MuPDF| and not a bug." +msgstr "このメソッドは、FreeText注釈の色を変更する唯一の方法です。この目的には、 :meth:`Annot.set_colors()` を使用することはできません。 ただし、リッチテキスト注釈の場合は注意が必要です。テキストの色は変更されず、 ``info`` 辞書の ``text_color`` エントリによって設定されます。 これは |MuPDF| の制限であり、不具合ではありません。" + +#: ../../annot.rst:370 ff9bc4bf0cdd4acc976c156f5a315306 msgid "Basic information of the annot's attached file." msgstr "アノットが添付されたファイルの基本情報。" -#: ../../annot.rst:356 ffd38b06976b45b6a2b0dfbd01ff3a1e +#: ../../annot.rst:373 c32d33e3cdca401092ffe639bf885cc5 msgid "" "a dictionary with keys *filename*, *ufilename*, *desc* (description), " "*size* (uncompressed file size), *length* (compressed length) for " -"FileAttachment annot types, else *None*." +"FileAttachment annot types, else ``None``." msgstr "" "FileAttachmentアノットタイプの場合、*filename* (ファイル名)、*ufilename* " "(Unicodeファイル名)、*desc* (説明)、*size* (非圧縮ファイルサイズ)、*length* " -"(圧縮長さ)のキーを持つ辞書。それ以外の場合は *None* 。" +"(圧縮長さ)のキーを持つ辞書。それ以外の場合は ``None`` 。" -#: ../../annot.rst:360 6ed8e40b0fe64787923674de06c106f5 +#: ../../annot.rst:377 4ac1fb9aefc542cf945016ead24f219e msgid "Returns attached file content." msgstr "添付ファイルの内容を返します。" -#: ../../annot.rst:363 9ef2167fbcb149aea0e0bed1817d0cea +#: ../../annot.rst:380 4f235876a19742f5b965f2ae9491d61f msgid "the content of the attached file." msgstr "添付ファイルの内容。" -#: ../../annot.rst:373 6ea5545d33684b9689f6fa516af5f332 +#: ../../annot.rst:390 be5cd657efdd473d928763bba0df5b4e msgid "" "Updates the content of an attached file. All arguments are optional. No " "arguments lead to a no-op." msgstr "添付ファイルの内容を更新します。すべての引数はオプションです。引数が指定されない場合、操作は行われません。" -#: ../../annot.rst:375 887c9199019a43d89a3f75653548ce68 +#: ../../annot.rst:392 a0ad11a9b58947a286714487e1c2087e msgid "" "the new file content. Omit to only change meta-information. *(Changed in" " version 1.14.13)* *io.BytesIO* is now also supported." msgstr "" -#: ../../annot.rst:375 455ec0992628400a8ba08f0a3ca4ab35 +#: ../../annot.rst:392 804bc0250bb544798eca747f4537b547 msgid "the new file content. Omit to only change meta-information." msgstr "新しいファイルの内容。メタ情報のみ変更する場合は省略します。" -#: ../../annot.rst:377 fe42c5296e974d55a16496defb1afd67 +#: ../../annot.rst:394 11834fed4d684da79f297310c1d94791 msgid "*(Changed in version 1.14.13)* *io.BytesIO* is now also supported." msgstr "*(バージョン1.14.13で変更)io.BytesIO* もサポートされるようになりました。" -#: ../../annot.rst:379 c4dbac7584b44a5abd5211d72087e9ba +#: ../../annot.rst:396 7985a4acc30f428ca3928e1fd5bb9186 msgid "new filename to associate with the file." msgstr "ファイルに関連付ける新しいファイル名。" -#: ../../annot.rst:381 2defdbe785ae4655adeb606b7363cf65 +#: ../../annot.rst:398 c51d1187235645a19eb686c1ec3a154d msgid "new unicode filename to associate with the file." msgstr "ファイルに関連付ける新しいUnicodeファイル名。" -#: ../../annot.rst:383 3f5a325a26904752b6187280f824b12b +#: ../../annot.rst:400 9312c3798d7e49c7b0526c1498516ca0 msgid "new description of the file content." msgstr "ファイル内容の新しい説明。" -#: ../../annot.rst:387 b2812313975548afb4f5218d1ab9e470 +#: ../../annot.rst:404 8242ad3e8f6b4974832e88f31eac0d67 msgid "Return the embedded sound of an audio annotation." msgstr "オーディオアノテーションの埋め込まれた音声を返します。" -#: ../../annot.rst:390 7a01d9e9c7674efb8f6f2647cf257ea9 +#: ../../annot.rst:407 38833c4151ab4eb1a89dd8bceb570228 msgid "" "the sound audio file and accompanying properties. These are the possible " "dictionary keys, of which only \"rate\" and \"stream\" are always " @@ -1189,70 +1235,70 @@ msgid "" "=======================================================" msgstr "" -#: ../../annot.rst:390 4398abd511ad44a39a49d5b94b2e6941 +#: ../../annot.rst:407 79ae636e3b544cd6b621add147e138b5 msgid "" "the sound audio file and accompanying properties. These are the possible " "dictionary keys, of which only \"rate\" and \"stream\" are always " "present." msgstr "音声オーディオファイルと関連するプロパティ。これらは可能な辞書キーで、常に「rate」と「stream」が存在します。" -#: ../../annot.rst:393 3f2ba083b0a649cca396ad92e0d47e32 +#: ../../annot.rst:410 0b4fc6b85ef1479090143f2663f4c999 msgid "Key" msgstr "キー" -#: ../../annot.rst:393 61de328cb9cd454ea3ea3b43ade66b38 +#: ../../annot.rst:410 1c994b43bf0d44c0820ed3b48815120a msgid "Description" msgstr "説明" -#: ../../annot.rst:395 399c2671dabe40dcabe75e1ed7f397a7 +#: ../../annot.rst:412 10203784bab44814ac64618438deabc8 msgid "rate" msgstr "" -#: ../../annot.rst:395 af2ab9279a4f44978b222b106f65fc65 +#: ../../annot.rst:412 a983a057a13d497d8f91e9f59e5eac09 msgid "(float, requ.) samples per second" msgstr "(float, 必須) 1秒あたりのサンプル数" -#: ../../annot.rst:396 56fbda4ec6dc43fe96ff77f49f291835 +#: ../../annot.rst:413 3c97dcc4efdc4791a046bca23054cb1b msgid "channels" msgstr "" -#: ../../annot.rst:396 85184265d83f426e899a1960281340d2 +#: ../../annot.rst:413 758eb73453cc466fbe0b3e537183b810 msgid "(int, opt.) number of sound channels" msgstr "(int, オプション) サウンドチャンネルの数" -#: ../../annot.rst:397 0544b367a4344812b6177b483f712e2a +#: ../../annot.rst:414 618e9b1f317145ab9b2b4f65a918ecbb msgid "bps" msgstr "" -#: ../../annot.rst:397 4e8d6766cbf14a61922e69cbf2253804 +#: ../../annot.rst:414 5273044bf12f464b986e788dfcb075bc msgid "(int, opt.) bits per sample value per channel" msgstr "(int, オプション) チャンネルごとのサンプル値のビット数" -#: ../../annot.rst:398 0cec8e2934bb41519562a474cc997efa +#: ../../annot.rst:415 09e58c52e10d4eec90e2798ea701c1b7 msgid "encoding" msgstr "" -#: ../../annot.rst:398 78552cfbaa8246dba104d1722052738d +#: ../../annot.rst:415 9a81a8db10c54364aea6ec3b8e317efe msgid "(str, opt.) encoding format: Raw, Signed, muLaw, ALaw" msgstr "(str, オプション) エンコーディング形式: Raw, Signed, muLaw, ALaw" -#: ../../annot.rst:399 daee28624d184e05bbffb06b0141ae4f +#: ../../annot.rst:416 e8c893531a1348178d13e91dfd70d89b msgid "compression" msgstr "" -#: ../../annot.rst:399 a76c4d1a539d41fca7bc208a9ad51426 +#: ../../annot.rst:416 ce945113b1be4736bc132b8adfb4aac1 msgid "(str, opt.) name of compression filter" msgstr "(str, オプション) 圧縮フィルタの名前" -#: ../../annot.rst:400 32a7d38cd0834adf95aa73f872970819 +#: ../../annot.rst:417 9e1d46ec4ad34aa7bec8e3020fc5b66c msgid "stream" msgstr "" -#: ../../annot.rst:400 caa34f228e284e8c9ac537168fda8a28 +#: ../../annot.rst:417 4de00f39b9834412b3cb30f1a730c6c2 msgid "(bytes, requ.) the sound file content" msgstr "(bytes, 必須) サウンドファイルの内容" -#: ../../annot.rst:406 273f1f5f06914ea297ca9b69b1ab09de +#: ../../annot.rst:423 dad1a748ee124360ac7a5a31d4f5c0a3 msgid "" "The annotation's transparency. If set, it is a value in range *[0, 1]*. " "The PDF default is 1. However, in an effort to tell the difference, we " @@ -1261,19 +1307,19 @@ msgstr "" "アノテーションの透明度。設定されている場合、範囲 *[0, 1]* の値です。PDFのデフォルトは1ですが、違いを示すために設定されていない場合は" " *-1.0* を返します。" -#: ../../annot.rst:412 c6d7f6eb7db34364b99de67da1ac96b6 +#: ../../annot.rst:429 3ad7eb5c46b5403bb06e364a56cacbfd msgid "The owning page object of the annotation." msgstr "アノテーションの所属ページオブジェクト。" -#: ../../annot.rst:414 a5a8dab5b5524f0daa10c5a01e53949e +#: ../../annot.rst:431 1b5914cbce69437181992042c380a420 msgid ":ref:`Page`" msgstr "" -#: ../../annot.rst:418 8c603f1d9b5d44f18352a4a9b6544b37 +#: ../../annot.rst:435 3e199076c06343159be68b9b9ac5854c msgid "The annot rotation." msgstr "アノテーションの回転角度。" -#: ../../annot.rst:421 78762c4a0e9e4d6d815da28bcb820240 +#: ../../annot.rst:438 f064f446736f4f3ca1bdda570466d81d msgid "" "a value [-1, 359]. If rotation is not at all, -1 is returned (and implies" " a rotation angle of 0). Other possible values are normalized to some " @@ -1282,24 +1328,24 @@ msgstr "" "値は[-1, 359]です。回転が全くない場合、-1が返されます(回転角度0を意味します)。その他の可能な値は、一定の値0 <= angle < " "360に正規化されます。" -#: ../../annot.rst:425 1518f77966334f3a95bd2e0fad6e5ab4 +#: ../../annot.rst:442 1f476437e6b3410f9645674ced6eeb13 msgid "The rectangle containing the annotation." msgstr "アノテーションを含む長方形領域。" -#: ../../annot.rst:427 ../../annot.rst:524 2c9efbb6d09d44948e0a4ec1321d8699 -#: 700c5234bb13435e8f9dde4558926059 +#: ../../annot.rst:444 ../../annot.rst:541 0103de8760f04f8b89b8e02781091781 +#: 86935ea548d34e7faf9b648b84bb5422 msgid ":ref:`Rect`" msgstr "" -#: ../../annot.rst:431 371accb0a6b743b5987f0f4ad201955a +#: ../../annot.rst:448 419bed750a274cb29401beaa0ab8594e msgid "The next annotation on this page or None." msgstr "このページ上の次のアノテーションまたはNone。" -#: ../../annot.rst:433 e0a286d3d8ad461c8366032a11f9db04 +#: ../../annot.rst:450 571c7db54b9c4cc895a02cc3323aa52b msgid "*Annot*" msgstr "" -#: ../../annot.rst:437 0354e30a4d0c4105abdd7a1efa0cefa9 +#: ../../annot.rst:454 3478938110934003bb0b27db9dd1d0f6 msgid "" "A number and one or two strings describing the annotation type, like " "**[2, 'FreeText', 'FreeTextCallout']**. The second string entry is " @@ -1310,13 +1356,13 @@ msgstr "" "。第2の文字列エントリはオプションで、空であるかもしれません。可能な値とその意味については、付録の :ref:`AnnotationTypes` " "のリストを参照してください。" -#: ../../annot.rst:443 e2810fe5ad7f463a9a17840aa99eb4ee +#: ../../annot.rst:460 d18d81d2c0e74065996a20b62876188b msgid "" "A dictionary containing various information. All fields are optional " "strings. For information items not provided, an empty string is returned." msgstr "異なる情報を含む辞書。すべてのフィールドはオプションの文字列です。提供されない情報項目については、空の文字列が返されます。" -#: ../../annot.rst:445 be2e2c133ef144bc9fae4a35c5adbb7b +#: ../../annot.rst:462 1cdd4502a1294093bfc18ad103a2792b msgid "" "*name* -- e.g. for 'Stamp' annotations it will contain the stamp text " "like \"Sold\" or \"Experimental\", for other annot types you will see the" @@ -1326,7 +1372,7 @@ msgstr "" "のようなスタンプテキストが含まれ、他の注釈のタイプでは注釈のアイコンの名前がここに表示されます(FileAttachment の場合は " "'PushPin')。" -#: ../../annot.rst:447 7aa255a5e0224790bc9836bbf70bfdf3 +#: ../../annot.rst:464 d8988903bd564a26815802c44906eb95 msgid "" "*content* -- a string containing the text for type *Text* and *FreeText* " "annotations. Commonly used for filling the text field of annotation pop-" @@ -1335,25 +1381,25 @@ msgstr "" "*content* – *テキスト* タイプと *FreeText* " "注釈のテキストを含む文字列。注釈のポップアップウィンドウのテキストフィールドを埋めるために一般的に使用されます。" -#: ../../annot.rst:449 eb4684da338741b6888ec72db50df34c +#: ../../annot.rst:466 b2ba350b46154e08a3e4b2ac58f36f9c msgid "" "*title* -- a string containing the title of the annotation pop-up window." " By convention, this is used for the **annotation author**." msgstr "*title* – 注釈のポップアップウィンドウのタイトルを含む文字列。通常、これは **注釈の著者** に使用されます。" -#: ../../annot.rst:451 761ea53ebf64487485daa2233ca70b47 +#: ../../annot.rst:468 56e95e9ee6f64bfe83d55681934676a0 msgid "*creationDate* -- creation timestamp." msgstr "*creationDate* – 作成タイムスタンプ。" -#: ../../annot.rst:452 0435fb79ca3d4df6ae67a247c5c000cc +#: ../../annot.rst:469 94225a86dd7e41ce95cf8ec26e18ceb5 msgid "*modDate* -- last modified timestamp." msgstr "*modDate* – 最終変更タイムスタンプ。" -#: ../../annot.rst:453 a9d0afa9686645a0a19d530c75d9996b +#: ../../annot.rst:470 3a3948aa631a4dc1bc04385e2dca9396 msgid "*subject* -- subject." msgstr "*subject* – 主題。" -#: ../../annot.rst:454 06f61a30beda48c995ebb887df689fe9 +#: ../../annot.rst:471 0bc8e45b8d36435684bfd646d1f1e5b4 msgid "" "*id* -- *(new in version 1.16.10)* a unique identification of the " "annotation. This is taken from PDF key */NM*. Annotations added by " @@ -1362,45 +1408,45 @@ msgstr "" "*id* – (バージョン1.16.10で新規追加)注釈の一意の識別子。これはPDFキー */ NM* " "から取得されます。PyMuPDFによって追加された注釈には一意の名前があり、ここに表示されます" -#: ../../annot.rst:461 78dea2c70c71421b9dbcd6c011e0c97e +#: ../../annot.rst:478 a128a345685340cfa13587bc266a1624 msgid "" "An integer whose low order bits contain flags for how the annotation " "should be presented." msgstr "注釈の表示方法を示すフラグを含む低位ビットを持つ整数。" -#: ../../annot.rst:467 651313d04e8642b8a1e2a8b69649c8c8 +#: ../../annot.rst:484 a55e047cd36041628d5919c2b49276d0 msgid "" "A pair of integers specifying start and end symbol of annotations types " -"'FreeText', 'Line', 'PolyLine', and 'Polygon'. *None* if not applicable. " -"For possible values and descriptions in this list, see the " +"'FreeText', 'Line', 'PolyLine', and 'Polygon'. ``None`` if not " +"applicable. For possible values and descriptions in this list, see the " ":ref:`AdobeManual`, table 1.76 on page 400." msgstr "" "'FreeText'、'Line'、'PolyLine'、および'Polygon'の注釈タイプの開始および終了シンボルを指定する2つの整数のペア。該当しない場合は" " *なし* 。このリストでの可能な値と説明については、:ref:`AdobeManual` のページ400の表1.76を参照してください。" -#: ../../annot.rst:473 44304b7e1a1f4cff91772e5b7b675e08 +#: ../../annot.rst:490 13761897f939405a97d8a3498f0040d7 msgid "" "A list containing a variable number of point (\"vertices\") coordinates " "(each given by a pair of floats) for various types of annotations:" msgstr "さまざまな種類の注釈に対する、可変数の点(\"頂点\")座標(各々が浮動小数点数のペアで指定される)を含むリスト:" -#: ../../annot.rst:475 0f08723dc7df4bbc8722cf48bd808645 +#: ../../annot.rst:492 9b008a64e3ec4e7c8eea518475d9ac74 msgid "'Line' -- the starting and ending coordinates (2 float pairs)." msgstr "'Line' – 開始座標と終了座標(2つの浮動小数点数のペア)。" -#: ../../annot.rst:476 e40bb82484f4438c96dd9e30dc63b4e0 +#: ../../annot.rst:493 e58aa9b8392c4e12a2e4df235a8ad9e5 msgid "" "'FreeText' -- 2 or 3 float pairs designating the starting, the (optional)" " knee point, and the ending coordinates." msgstr "'FreeText' – 開始座標、(オプションの)曲線点、および終了座標を指定する2または3つの浮動小数点数のペア。" -#: ../../annot.rst:477 8a55e873bcab43a89b1fa21b40c929ac +#: ../../annot.rst:494 7bfa92a879014f19b320c26616f6da2a msgid "" "'PolyLine' / 'Polygon' -- the coordinates of the edges connected by line " "pieces (n float pairs for n points)." msgstr "'PolyLine' / 'Polygon' – 線分で接続されたエッジの座標(nポイントのためのn個の浮動小数点数のペア)。" -#: ../../annot.rst:478 bbdda313526a4d3d9074b3823539c99c +#: ../../annot.rst:495 e2e1fefa75324b12af2a2e152477d2b4 msgid "" "text markup annotations -- 4 float pairs specifying the *QuadPoints* of " "the marked text span (see :ref:`AdobeManual`, page 403)." @@ -1408,13 +1454,13 @@ msgstr "" "テキストのマークアップ注釈 – マークされたテキストスパンのQuadPointsを指定する4つの浮動小数点数のペア(Adobe " "PDFリファレンス、ページ403を参照)。" -#: ../../annot.rst:479 f9cda8ed955945379206fa5fedf0b97c +#: ../../annot.rst:496 edec46c715024d748ae4737d4f9d8966 msgid "" "'Ink' -- list of one to many sublists of vertex coordinates. Each such " "sublist represents a separate line in the drawing." msgstr "'Ink' – 頂点座標の1つから多数のサブリストのリスト。各サブリストは、描画内の別々の線を表します。" -#: ../../annot.rst:486 33dbfcd91b9142ee879c388591c1985e +#: ../../annot.rst:503 bd59b247d3c44bf38a70ffe1720bc49c msgid "" "dictionary of two lists of floats in range *0 <= float <= 1* specifying " "the \"stroke\" and the interior (\"fill\") colors. The stroke color is " @@ -1430,39 +1476,39 @@ msgstr "" " = GRAY、3 = RGB、4 = CMYK。したがって、\"[1.0, 0.0, 0.0]\" " "はRGBカラーの赤を表します。どちらのリストも指定されていない場合、空にすることができます。" -#: ../../annot.rst:492 3f8f3645fe5448f8bb8afcc9ebc5ff65 +#: ../../annot.rst:509 c49c07a1c4fd499da22862b729bd0114 msgid "The PDF :data:`xref`." msgstr "PDFの :data:`xref` 。" -#: ../../annot.rst:498 1264212743404185a96d12e01649311f +#: ../../annot.rst:515 229d9683a092484caea218d27e8a82ab msgid "" "The PDF :data:`xref` of an annotation to which this one responds. Return " "zero if this is no response annotation." msgstr "この注釈が応答する注釈のPDF :data:`xref` 。これが応答注釈でない場合はゼロを返します。" -#: ../../annot.rst:504 14a9294953834c428468a03bf3770c19 +#: ../../annot.rst:521 22cd8346d0a041539ab2b885daeb29c3 msgid "" "The PDF :data:`xref` of the associated Popup annotation. Zero if non-" "existent." msgstr "関連するポップアップ注釈のPDF :data:`xref` 。存在しない場合はゼロ。" -#: ../../annot.rst:510 bb142ab571454d9ebbf9fe87d7a15c66 +#: ../../annot.rst:527 a0ed476461bc407ea14ba28c1b792565 msgid "Whether the annotation has a Popup annotation." msgstr "注釈にポップアップ注釈があるかどうか。" -#: ../../annot.rst:516 cecb7c44853e4366b1902875f8e1cac9 +#: ../../annot.rst:533 e7941e1065454f0f8b62f6df310fb8e0 msgid "" "Whether the annotation's Popup is open -- **or** the annotation itself " "('Text' annotations only)." msgstr "注釈のポップアップが開いているかどうか - **または** 注釈自体('テキスト'注釈のみ)。" -#: ../../annot.rst:522 3c44cb28ccdd4757a54897f895b88442 +#: ../../annot.rst:539 943360bdb1974c80a2eb12cba6b49595 msgid "" "The rectangle of the associated Popup annotation. Infinite rectangle if " "non-existent." msgstr "関連するポップアップ注釈の矩形。存在しない場合は無限の矩形。" -#: ../../annot.rst:528 76233963d178406b9c5ff32193d2ca6a +#: ../../annot.rst:545 b0adc4587d03481aa617e7c63a5c89d5 msgid "" "A tuple of four floats representing the `/RD` entry of the annotation. " "The four numbers describe the numerical differences (left, top, -right, " @@ -1480,19 +1526,19 @@ msgstr "" "です。注釈の境界線が通常のまっすぐな線である場合、これらの数値は通常、境界線の幅を2で割ったものです。注釈に「雲状」の境界線がある場合、ここで雲の半円の幅が表示されます。一般的に、これらの数値は同一である必要はありません。内側の矩形を計算するには、`a.rect" " + a.rect_delta` を使用します。" -#: ../../annot.rst:532 3af8528320f3419c8813566ce3b4b58c +#: ../../annot.rst:549 ac7cd9df53604c578d2e0e038b4f2aa3 msgid "" "A dictionary containing border characteristics. Empty if no border " "information exists. The following keys may be present:" msgstr "境界線の特性を含む辞書。境界線情報が存在しない場合は空です。次のキーが存在する可能性があります:" -#: ../../annot.rst:534 340ba9913e8f4c9ca3d0b82a545155bb +#: ../../annot.rst:551 e32ec3cdef384d7390414599188bf214 msgid "" "*width* -- a float indicating the border thickness in points. The value " "is -1.0 if no width is specified." msgstr "*width* – ポイントでの境界線の太さを示す浮動小数点数。幅が指定されていない場合、値は -1.0 です。" -#: ../../annot.rst:536 0f736220c35f45ad91c15a9d729dd762 +#: ../../annot.rst:553 3c4027a4271343f794a2c09a46c35ffe msgid "" "*dashes* -- a sequence of integers specifying a line dashing pattern. " "*[]* means no dashes, *[n]* means equal on-off lengths of *n* points, " @@ -1503,7 +1549,7 @@ msgstr "" "ポイントの等しいオンオフの長さを意味し、より長いリストは交互のオンオフ長さ値を指定して解釈されます。詳細については、:ref:`AdobeManual`" " のページ126を参照してください。" -#: ../../annot.rst:538 8ae391367f074553ab886603f8d0d982 +#: ../../annot.rst:555 6f0beca4771340bc950824e0586004f7 msgid "" "*style* -- 1-byte border style: **\"S\"** (Solid) = solid line " "surrounding the annotation, **\"D\"** (Dashed) = dashed line surrounding " @@ -1519,9 +1565,10 @@ msgstr "" "ページの表面よりも上に浮かぶように見える模擬的な浮き出し矩形、 **\"I\"** (Inset)= " "ページの表面よりも下に凹んだように見える模擬的な浮き彫りの矩形、 **\"U\"** (Underline)= 注釈矩形の底部に沿った単一の線。" -#: ../../annot.rst:540 56ec44b9f87f4c32b20f4f7402a12e2f +#: ../../annot.rst:557 43804865211f4957b4ab00f844766472 + msgid "" -"*clouds* -- an integer indicating a \"cloudy\" border, where `n` is an " +"*clouds* -- an integer indicating a \"cloudy\" border, where ``n`` is an " "integer `-1 <= n <= 2`. A value `n = 0` indicates a straight line (no " "clouds), 1 means small and 2 means large semi-circles, mimicking the " "cloudy appearance. If -1, then no specification is present." @@ -1529,11 +1576,11 @@ msgstr "" "*clouds* – “雲状”の境界を示す整数。``n`` は整数 `-1 <= n <= 2` を指します。値 `n = 0` " "は直線(雲なし)を示し、1 は小さな半円、2 は大きな半円を模倣した雲の外観を示します。-1 の場合、仕様が存在しないことを示します。" -#: ../../annot.rst:548 ec756956143649189c97b88ca807a374 +#: ../../annot.rst:565 ad29546a4c774e9696b2fb1753e2bed6 msgid "Annotation Icons in MuPDF" msgstr "MuPDFの注釈アイコン" -#: ../../annot.rst:549 173eaff0b62e4eed94c31452b32e07a0 +#: ../../annot.rst:566 e01c8a73c9a44cf8839c89752851d01c msgid "" "This is a list of icons referenceable by name for annotation types 'Text'" " and 'FileAttachment'. You can use them via the *icon* parameter when " @@ -1547,36 +1594,36 @@ msgstr "" "の引数として使用したりできます。どのアイテムを選択するかはあなたの裁量に任されています - " "たとえば、「Speaker」アイコンを「FileAttachment」に使用することを防ぐメカニズムは存在しません。" -#: ../../annot.rst:555 5794453816c14d28af08440489a710d2 +#: ../../annot.rst:572 7c089224f63344fcba8697097a564015 msgid "Example" msgstr "例" -#: ../../annot.rst:556 6e6f39ba8fd24c7d91bfbdbcff577eb1 +#: ../../annot.rst:573 583a7a5d57f44851b86fd376a6aec42b msgid "" "Change the graphical image of an annotation. Also update the \"author\" " "and the text to be shown in the popup window::" msgstr "注釈のグラフィカルな画像を変更します。また、ポップアップウィンドウに表示される「著者」とテキストを更新します。" -#: ../../annot.rst:579 c44bb5898c82472ab66fea06213f8b9a +#: ../../annot.rst:596 d29c75fc8898424e806cde474df35881 msgid "" "This is how the circle annotation looks like before and after the change " "(pop-up windows displayed using Nitro PDF viewer):" msgstr "これが、変更前と変更後のサークル注釈の見た目です(Nitro PDFビューアを使用して表示されるポップアップウィンドウ):" -#: ../../annot.rst:581 d0d8888dee2241e5ae54b8cc3f4f8f3f +#: ../../annot.rst:598 fb7ea614d50d49a3a8491368e2e82516 msgid "|circle|" msgstr "" -#: ../../annot.rst:583 439df2d727e3488fa9de8c4e19871c16 -#: f010cb7c6dc44518987b9f5fc84bb79c +#: ../../annot.rst:600 a6222a025a02454abe58230b96b2a2a8 +#: fa94e2075bf7415597643866c18ab1b4 msgid "circle" msgstr "" -#: ../../annot.rst:587 22c69c4bf2f24a87a7e083e730d00662 +#: ../../annot.rst:604 00c8769e28fc422fb7202705ebb74eeb msgid "Footnotes" msgstr "脚注" -#: ../../annot.rst:588 4d067625802642b8b5abcaf64f225783 +#: ../../annot.rst:605 5372e13a7237496289e4410fa7074f92 msgid "" "Rotating an annotation also changes its rectangle. Depending on how the " "annotation was defined, the original rectangle is **cannot be " @@ -1586,7 +1633,7 @@ msgstr "" "注釈を回転させると、その矩形も変更されます。注釈がどのように定義されたかによって、元の矩形は回転値を再びゼロに設定しても **再構築できず** " "、失われます。" -#: ../../annot.rst:590 bbce0217640f4f48991c6ad5feae9c1e +#: ../../annot.rst:607 812e239885c44b8c95d47d70dab6a2d6 msgid "" "Only the following annotation types support method " ":meth:`Annot.set_rect`: Text, FreeText, Square, Circle, Redact, Stamp, " @@ -1595,14 +1642,10 @@ msgstr "" ":meth:`Annot.set_rect` " "をサポートする注釈タイプは、次のものだけです:Text、FreeText、Square、Circle、Redact、Stamp、Caret、FileAttachment、Sound、およびMovie。" -#: ../../footer.rst:60 84670552cb3c47d5aafb332612f3310e +#: ../../footer.rst:60 3e6e795dbb954a1f90e29e5c581fe2a0 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 8ccd5341e4ca400f9fc4bc6277228cb4 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" @@ -1612,3 +1655,6 @@ msgstr "" #~ msgid "**This class is supported for PDF documents only.**" #~ msgstr "**このクラスはPDFドキュメントのみに対応しています。** " +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/app1.mo b/docs/locales/ja/LC_MESSAGES/app1.mo index 82de16e1a..70a0c18e4 100644 Binary files a/docs/locales/ja/LC_MESSAGES/app1.mo and b/docs/locales/ja/LC_MESSAGES/app1.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/app1.po b/docs/locales/ja/LC_MESSAGES/app1.po index 7354874d8..3d5da3f93 100644 --- a/docs/locales/ja/LC_MESSAGES/app1.po +++ b/docs/locales/ja/LC_MESSAGES/app1.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,49 +19,49 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 2a860f8585624ad89f0f751ddb6918d3 +#: ../../header.rst:-1 fdfbfd4ec6524865abf05d4f02f40bd4 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 5390987fde4945528b46c4a9b9aee25b +#: ../../header.rst:-1 4ef893e3d65549bdb97761ade9d2fbe0 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 5c0cc97673de4a0d8efeeaeff3b27284 +#: ../../header.rst:-1 93b3b77eb5fb4d609385d37e1b52f560 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../app1.rst:7 8b5b166b183e4b11bbb256f335ddb654 +#: ../../app1.rst:7 32522e45284f47b9a2baab2001f554fc msgid "Appendix 1: Details on Text Extraction" msgstr "付録1: テキスト抽出の詳細" -#: ../../app1.rst:8 94cb906c52b94f7386f7407c2edcfacc +#: ../../app1.rst:8 7a46450d4e694b47ba30ff347aa1295a msgid "" "This chapter provides background on the text extraction methods of " "PyMuPDF." msgstr "この章では、PyMuPDFのテキスト抽出メソッドに関する背景情報を提供します。" -#: ../../app1.rst:10 fdf02886603e4e53ac52bc6a1d1eb245 +#: ../../app1.rst:10 433c42d12e1e466887a62caef1d48c04 msgid "Information of interest are" msgstr "興味のある情報は以下です" -#: ../../app1.rst:12 ef65dc11dce74050a842475e5bee4353 +#: ../../app1.rst:12 855bc392f61942508bcfcfee3ff9ad79 msgid "what do they provide?" msgstr "彼らは何を提供するのか?" -#: ../../app1.rst:13 4019febb74c1440f95ccfed52a38edd1 +#: ../../app1.rst:13 7bfcfb2ef4424ff1bfff9c532da582fc msgid "what do they imply (processing time / data sizes)?" msgstr "それらは何を意味するのか(処理時間 / データサイズ)?" -#: ../../app1.rst:16 b5668527833a431882e40abbbc6429b7 +#: ../../app1.rst:16 f054be020fee4f7dbe78d82ec1f9a215 msgid "General structure of a TextPage" msgstr "TextPageの一般的な構造" -#: ../../app1.rst:17 933edb0162d1428fa97217db31928211 +#: ../../app1.rst:17 c38170b0abfd4137afa0635a2f080530 msgid "" ":ref:`TextPage` is one of (Py-) MuPDF's classes. It is normally created " "(and destroyed again) behind the curtain, when :ref:`Page` text " @@ -72,29 +72,29 @@ msgstr "" ":ref:`TextPage` は(Py-)MuPDFのクラスの一つです。通常、:ref:`Page` " "のテキスト抽出メソッドが使用されるときにカーテンの後ろで作成され(および破棄され)ますが、直接利用することもでき、永続オブジェクトとして使用することができます。その名前が示すよりも、テキストページにはオプションで画像も含まれる場合があります:" -#: ../../app1.rst:27 2097897ce8ba4b6e902c4c21c5c0fcb9 +#: ../../app1.rst:27 fa5133b907134789b7b5bcf5427df499 msgid "A **text page** consists of blocks (= roughly paragraphs)." msgstr "**テキストページ** は、ブロック(おおよそ段落)で構成されています。" -#: ../../app1.rst:29 19d8b720c96743809268ea998e9fbef9 +#: ../../app1.rst:29 8a84fe5ed0fa4b028ce78c0283f42e05 msgid "A **block** consists of either lines and their characters, or an image." msgstr "**ブロック** は、行とその文字、または画像のいずれかから成り立っています。" -#: ../../app1.rst:31 fc034d85b4cc4b3ba8123683eb972743 +#: ../../app1.rst:31 b618a5ef31c6418385e67337d450a352 msgid "A **line** consists of spans." msgstr "**行** は、スパンから成り立っています。" -#: ../../app1.rst:33 f300d0a9a7b64e2091fcf71842074b75 +#: ../../app1.rst:33 10807e13bcf148d1901a347693b84092 msgid "" "A **span** consists of adjacent characters with identical font " "properties: name, size, flags and color." msgstr "**スパン** は、同一のフォントプロパティ(名前、サイズ、フラグ、色)を持つ隣接する文字から成り立っています。" -#: ../../app1.rst:36 bcb65e770ed447528f22ece81a0d204d +#: ../../app1.rst:36 94770e1286bd45faa80dd24ab08a2b98 msgid "Plain Text" msgstr "プレーンテキスト" -#: ../../app1.rst:38 d40b5de926f9493c9baae38d129509d8 +#: ../../app1.rst:38 4e59da8e7882467d9e3fc99a17ebcd20 msgid "" "Function :meth:`TextPage.extractText` (or *Page.get_text(\"text\")*) " "extracts a page's plain **text in original order** as specified by the " @@ -103,11 +103,11 @@ msgstr "" "関数 :meth:`TextPage.extractText` (または *Page.get_text(\"text\")* " ")は、ドキュメントの作成者によって指定された元の順序で、ページのプレーンテキストを抽出します。" -#: ../../app1.rst:40 c3680b176108486a93ca9db997565764 +#: ../../app1.rst:40 43eb12dcbd3741a39565376bce991deb msgid "An example output::" msgstr "例の出力:" -#: ../../app1.rst:45 e9a611463e034cc0b4999c0bd1090047 +#: ../../app1.rst:45 9b508c1639d948d0bb34f53480a454de msgid "" "The output may not equal an accustomed \"natural\" reading order. " "However, you can request a reordering following the scheme \"top-left to " @@ -116,12 +116,12 @@ msgstr "" "出力は通常の「自然な」読み順と一致しない場合があります。ただし、`page.get_text(\"text\", sort=True)` " "を実行することで、「左上から右下」のスキームに従った並べ替えを要求することができます。" -#: ../../app1.rst:49 ../../app1.rst:337 44ec7768412d4b4689ddb9648f204245 -#: 83cfba3ae5604fad8c2ad2387565bb67 +#: ../../app1.rst:49 ../../app1.rst:337 01218363ec8b4f25b01be035183f2bad +#: ea3b77edca944acd87dfae64354fc218 msgid "BLOCKS" msgstr "ブロック" -#: ../../app1.rst:51 cae7116a208c4a94892be479271b56ed +#: ../../app1.rst:51 84c30a08712041efbd0d51b5d1f3b869 msgid "" "Function :meth:`TextPage.extractBLOCKS` (or *Page.get_text(\"blocks\")*) " "extracts a page's text blocks as a list of items like::" @@ -129,36 +129,36 @@ msgstr "" "関数 :meth:`TextPage.extractBLOCKS` (または `Page.get_text(\"blocks\")` " ")は、ページのテキストブロックを以下のような項目のリストとして抽出します:" -#: ../../app1.rst:55 8e9c25cb0963475e9c92ecdb3c6b119e +#: ../../app1.rst:55 eca4a5b7ac1e429d922a4caaf3b1508a msgid "" "Where the first 4 items are the float coordinates of the block's bbox. " "The lines within each block are concatenated by a new-line character." msgstr "最初の4つの項目は、ブロックのバウンディングボックスの浮動小数点座標です。各ブロック内の行は改行文字で連結されます。" -#: ../../app1.rst:57 ca1346ab56f14adebb00f3627a74af21 +#: ../../app1.rst:57 a2ec0b47ebce4d5a924b99a85953372a msgid "" "This is a high-speed method, which by default also extracts image meta " "information: Each image appears as a block with one text line, which " "contains meta information. The image itself is not shown." msgstr "これは高速なメソッドであり、デフォルトでは画像のメタ情報も抽出されます。各画像はメタ情報を含む1行のテキスト行で表されるブロックとして表示されます。画像そのものは表示されません。" -#: ../../app1.rst:59 df2195a0f327471ba56ed2022d2d8873 +#: ../../app1.rst:59 c7b5a7b9a23e458a96b54934b3ed775f msgid "" "As with simple text output above, the `sort` argument can be used as well" " to obtain a reading order." msgstr "前述の単純なテキスト出力と同様に、`sort` 引数を使用して読み順を取得することもできます。" -#: ../../app1.rst:61 ../../app1.rst:79 222e453c786c4cb48f9da59b90a49f7f -#: 747793be9b814c168e0bed9a7ba0fa7d +#: ../../app1.rst:61 ../../app1.rst:79 a78d72a8fc184086a8d50d1cf5a9ef1a +#: e2343d105e624aeb882debda02386431 msgid "Example output::" msgstr "例の出力:" -#: ../../app1.rst:69 ../../app1.rst:338 631c698e870e4fe69d5ede856d97d92f -#: ebc9f86973954cb5b4cfbc8c140dbc4e +#: ../../app1.rst:69 ../../app1.rst:338 acff28e048b34b4ba229b68304cfb76b +#: cddad20f52224312b51a7f0c5053ac5a msgid "WORDS" msgstr "単語" -#: ../../app1.rst:71 4fe406725ebb46978362284593243d2c +#: ../../app1.rst:71 89a704f3ac384146b0b14fac38aa5a65 msgid "" "Function :meth:`TextPage.extractWORDS` (or *Page.get_text(\"words\")*) " "extracts a page's text **words** as a list of items like::" @@ -166,41 +166,41 @@ msgstr "" "関数 :meth:`TextPage.extractWORDS` (または *Page.get_text(\"words\")* " ")は、ページのテキスト単語を以下のような項目のリストとして抽出します:" -#: ../../app1.rst:75 a74e862234ca473cb7be7680ddc7935f +#: ../../app1.rst:75 f050c877e9a940cdbec7cc265b1bb992 msgid "" "Where the first 4 items are the float coordinates of the words's bbox. " "The last three integers provide some more information on the word's " "whereabouts." msgstr "最初の4つの項目は、単語のバウンディングボックスの浮動小数点座標です。最後の3つの整数は、単語の位置に関する追加情報を提供します" -#: ../../app1.rst:77 f2706b53b8e04bd3869a26e70e180112 +#: ../../app1.rst:77 0f54ed7a09db4671bf357a69f4eaf0cf msgid "" "This is a high-speed method. As with the previous methods, argument " "`sort=True` will reorder the words." msgstr "これは高速なメソッドです。前のメソッドと同様に、引数 `sort=True` を使用すると単語が再並べ替えされます。" -#: ../../app1.rst:95 ../../app1.rst:341 4f9e4566f8f6440fb70c95f9909a320d -#: 7fbcd00324d141deb4f8478b67652e50 +#: ../../app1.rst:95 ../../app1.rst:341 9c256b41e353481a8f9d1120383e185d +#: b01eed8bd2214d029f98ed8e402c64ec msgid "HTML" msgstr "" -#: ../../app1.rst:97 9705c9b338dc48528c26bbc1a7d77049 +#: ../../app1.rst:97 ae629776c0304c299e0e8d208a5c09fa msgid "" ":meth:`TextPage.extractHTML` (or *Page.get_text(\"html\")* output fully " -"reflects the structure of the page's *TextPage* -- much like DICT / JSON " -"below. This includes images, font information and text positions. If " -"wrapped in HTML header and trailer code, it can readily be displayed by " +"reflects the structure of the page's ``TextPage`` -- much like DICT / " +"JSON below. This includes images, font information and text positions. If" +" wrapped in HTML header and trailer code, it can readily be displayed by " "an internet browser. Our above example::" msgstr "" ":meth:`TextPage.extractHTML` (または *Page.get_text(\"html\")* の出力は、ページの " "`TextPage` の構造を完全に反映します。これは、以下のDICT / " "JSONのようなものです。これには画像、フォント情報、テキスト位置が含まれます。HTMLヘッダーとトレイラーコードで囲むと、インターネットブラウザで簡単に表示できます。上記の例:" -#: ../../app1.rst:113 2499bf675a104d489d381cb45b5419eb +#: ../../app1.rst:113 7390b832da484722ac5b9460920b0c9b msgid "Controlling Quality of HTML Output" msgstr "HTML出力の品質の制御" -#: ../../app1.rst:114 32f104ca2ff242c3bd943d1043956e8a +#: ../../app1.rst:114 cda88645b63f404c8de487595a91b015 msgid "" "While HTML output has improved a lot in MuPDF v1.12.0, it is not yet bug-" "free: we have found problems in the areas **font support** and **image " @@ -209,7 +209,7 @@ msgstr "" "MuPDF v1.12.0でHTML出力はかなり改善されましたが、まだバグがないわけではありません。**フォントサポート** や**画像の配置**" " に関する問題が見つかっています。" -#: ../../app1.rst:116 218f7b75d1a24c54bb15bd3b86b2d991 +#: ../../app1.rst:116 8e67f6c0b40547eb8c013174c0840a60 msgid "" "HTML text contains references to the fonts used of the original document." " If these are not known to the browser (a fat chance!), it will replace " @@ -220,7 +220,7 @@ msgstr "" "HTMLテキストには元のドキュメントで使用されたフォントへの参照が含まれています。もしブラウザがそれらを認識できない場合(少ない確率ですが)、他のフォントで置き換えられ、結果が奇妙に見えるかもしれません。この問題はブラウザによって大きく異なります。Windowsマシンでは、MS" " Edgeはうまく動作するかもしれませんが、Firefoxはひどく見えるかもしれません。" -#: ../../app1.rst:118 f402ec98152547c69c7dc23e1576b625 +#: ../../app1.rst:118 a84f551c6b3c4c0daaeda98b73eff629 msgid "" "For PDFs with a complex structure, images may not be positioned and / or " "sized correctly. This seems to be the case for rotated pages and pages, " @@ -231,7 +231,7 @@ msgstr "" "複雑な構造を持つPDFの場合、画像の位置やサイズが正しく配置されないことがあります。これは回転したページや、さまざまなページbboxのバリアントが一致しない場合に起こる可能性があります(たとえば、*MediaBox" " != CropBox* )。これに対処する方法はまだわかっていませんが、MuPDFのサイトにバグを報告しました。" -#: ../../app1.rst:120 de2aba1e2b224759b1557455c833e66d +#: ../../app1.rst:120 ede45259306f4b25a8a69c2642ee7790 msgid "" "To address the font issue, you can use a simple utility script to scan " "through the HTML file and replace font references. Here is a little " @@ -241,38 +241,38 @@ msgid "" "\"bold\", \"italic\", etc. are hopefully done correctly by your browser::" msgstr "フォントの問題に対処するために、HTMLファイルをスキャンし、フォントの参照を置換するシンプルなユーティリティスクリプトを使用できます。以下は、すべてのフォントをPDFのベース14フォントの一つに置き換える例です:セリフフォントは「Times」になり、セリフのないフォントは「Helvetica」になり、等幅フォントは「Courier」になります。太字、斜体などの各バリエーションは、おそらくブラウザによって正しく処理されるでしょう。" -#: ../../app1.rst:160 8c33eed00302488b8be91f720a98aef0 +#: ../../app1.rst:160 604f24c1899b445a8e5f147bbea58c6b msgid "DICT (or JSON)" msgstr "DICT(またはJSON)" -#: ../../app1.rst:162 b9673012777647499aab0529f6db6356 +#: ../../app1.rst:162 2b4124eaa6184e5abeb4751eb27b7d28 msgid "" ":meth:`TextPage.extractDICT` (or *Page.get_text(\"dict\", sort=False)*) " -"output fully reflects the structure of a *TextPage* and provides image " +"output fully reflects the structure of a ``TextPage`` and provides image " "content and position detail (*bbox* -- boundary boxes in pixel units) for" " every block, line and span. Images are stored as *bytes* for DICT output" " and base64 encoded strings for JSON output." msgstr "" ":meth:`TextPage.extractDICT` (または *Page.get_text(\"dict\", sort=False)* " -")の出力は、 *TextPage* の構造を完全に反映し、各ブロック、行、スパンのために画像の内容と位置の詳細( *bbox* – " +")の出力は、 ``TextPage`` の構造を完全に反映し、各ブロック、行、スパンのために画像の内容と位置の詳細( *bbox* – " "ピクセル単位の境界ボックス)を提供します。画像はDICT出力では *バイト* " "として格納され、JSON出力ではbase64エンコードされた文字列として格納されます。" -#: ../../app1.rst:164 4e2d17568d6a4247a5a731de1cafc718 +#: ../../app1.rst:164 c899504e3d93462ebf94a0ae253c284d msgid "" "For a visualization of the dictionary structure have a look at " ":ref:`textpagedict`." msgstr "辞書の構造の可視化については、辞書出力の構造をご覧ください。" -#: ../../app1.rst:166 09d04d4f64f44b5ab80310c1e822087b +#: ../../app1.rst:166 a85a77c0a97a4b999a9608db09a62055 msgid "Here is how this looks like::" msgstr "以下がその様子です:" -#: ../../app1.rst:192 0fb39d75ab46486ca6bdbd8417fa6c47 +#: ../../app1.rst:192 a39d5bea096643a481b871a235198902 msgid "RAWDICT (or RAWJSON)" msgstr "RAWDICT(またはRAWJSON)" -#: ../../app1.rst:193 a2e79ba9d4074387b0288b809cef2a19 +#: ../../app1.rst:193 e30e534d09664d99a59c74a2819edd1f msgid "" ":meth:`TextPage.extractRAWDICT` (or *Page.get_text(\"rawdict\", " "sort=False)*) is an **information superset of DICT** and takes the detail" @@ -288,12 +288,12 @@ msgstr "" "というリストに置き換えられます。各 *「chars」* エントリは文字の *dict* です。例えば、 *「Text in black " "color.」* の代わりに以下のような項目が表示されます:" -#: ../../app1.rst:224 ../../app1.rst:339 34fe1d2013914da6a8b8b60b9df17051 -#: fdbdc716f71f43bdaf3a814c1c6d3fdf +#: ../../app1.rst:224 ../../app1.rst:339 1019709da94c447c87b21a8889ff73c6 +#: 2e6cf3faa00c40b99808a48b7890f736 msgid "XML" msgstr "" -#: ../../app1.rst:226 9a46ed5ca923435e9cedb58e14f266bd +#: ../../app1.rst:226 3e2cf1ef340e453c9ee25d4f7a082534 msgid "" "The :meth:`TextPage.extractXML` (or *Page.get_text(\"xml\")*) version " "extracts text (no images) with the detail level of RAWDICT::" @@ -301,18 +301,18 @@ msgstr "" ":meth:`TextPage.extractXML` (または *Page.get_text(\"xml\")* " "バージョンは、RAWDICTの詳細レベルでテキスト(画像なし)を抽出します:" -#: ../../app1.rst:255 0143e6142039487cb2770c0ccec72813 +#: ../../app1.rst:255 b27a0017f5ac4d09a62ef96d7158aa58 msgid "" "We have successfully tested `lxml `_ to " "interpret this output." msgstr "この出力を解釈するためにlxmlを使用して正常にテストしました。" -#: ../../app1.rst:258 ../../app1.rst:340 7a849192a5b84c85802238cbdc4b4e6c -#: c104684dff6d445888eb36ea13070c2a +#: ../../app1.rst:258 ../../app1.rst:340 769cf57a03fb4d8ebc77e12339dfe126 +#: dfb6a028240f4f25ace3456d80f1e379 msgid "XHTML" msgstr "" -#: ../../app1.rst:259 fd1b2cd6057447af9487acc9795d74b0 +#: ../../app1.rst:259 9489175cb6d1431fab9e8388a1b5ee8d msgid "" ":meth:`TextPage.extractXHTML` (or *Page.get_text(\"xhtml\")*) is a " "variation of TEXT but in HTML format, containing the bare text and images" @@ -321,17 +321,17 @@ msgstr "" ":meth:`TextPage.extractXHTML` (または *Page.get_text(\"xhtml\")* " "は、テキストと画像を含むHTML形式のTEXTのバリエーションです(「セマンティック」出力):" -#: ../../app1.rst:268 49e3d20a60eb4418a23fdf32462741f8 +#: ../../app1.rst:268 e1dc4d16be0744a9a7a2b424f7a34574 msgid "Text Extraction Flags Defaults" msgstr "テキスト抽出フラグのデフォルト値" -#: ../../app1.rst:269 896050d5e5b34525bef126eb5a2fa1a8 +#: ../../app1.rst:269 d6b62f1e66934d9391f12416f05cf4c3 msgid "" "New in version 1.16.2: Method :meth:`Page.get_text` supports a keyword " "parameter *flags* *(int)* to control the amount and the quality of " "extracted data. The following table shows the defaults settings (flags " "parameter omitted or None) for each extraction variant. If you specify " -"flags with a value other than *None*, be aware that you must set **all " +"flags with a value other than ``None``, be aware that you must set **all " "desired** options. A description of the respective bit settings can be " "found in :ref:`TextPreserve`." msgstr "" @@ -341,7 +341,7 @@ msgstr "" "パラメータが省略されたかNoneの場合)を示しています。 `None` 以外の値でflagsを指定する場合は、**すべての必要なオプション** " "を設定する必要があることに注意してください。各ビット設定の説明は「テキスト抽出フラグ」で確認できます。" -#: ../../app1.rst:271 db1dc8bb2f74498592235ac45c4394d0 +#: ../../app1.rst:271 e8bfb1e18c8a40ef9482158b1b48b799 msgid "" "New in v1.19.6: The default combinations in the following table are now " "available as Python constants: :data:`TEXTFLAGS_TEXT`, " @@ -358,163 +358,163 @@ msgstr "" ":data:`TEXTFLAGS_XHTML` 、 :data:`TEXTFLAGS_XML` 、 " ":data:`TEXTFLAGS_SEARCH` 。これにより、デフォルトのフラグを簡単に変更できます。例えば、" -#: ../../app1.rst:273 2cc8520362e8401fb21c5b41221f4dea +#: ../../app1.rst:273 6b7d5e078dee4d8faefcc18f13641d84 msgid "**include** images in a \"blocks\" output:" msgstr "「blocks」出力に画像を **含める** 場合:" -#: ../../app1.rst:275 b22ae38df67c4388a6bcb68be5c5ac72 +#: ../../app1.rst:275 920d23e221534056b885ac4d2aa40959 msgid "`flags = TEXTFLAGS_BLOCKS | TEXT_PRESERVE_IMAGES`" msgstr "" -#: ../../app1.rst:277 491ce0635df34aa8aa46f1cb0c27b21b +#: ../../app1.rst:277 442e0b5271e84503b89c3efda021a625 msgid "**exclude** images from a \"dict\" output:" msgstr "「dict」出力から画像を **除外する** 場合:" -#: ../../app1.rst:279 870754e4381541e0919d370a17d798cd +#: ../../app1.rst:279 8cc83a12e452488bbb0828a5b22c007b msgid "`flags = TEXTFLAGS_DICT & ~TEXT_PRESERVE_IMAGES`" msgstr "" -#: ../../app1.rst:281 7ecf5a54e86a4bf1933be51b8fb27d49 +#: ../../app1.rst:281 883ad6fe76334652937ecd82fe8393a8 msgid "set **dehyphenation off** in text searches:" msgstr "テキスト検索での **ハイフネーション** をオフに設定する:" -#: ../../app1.rst:283 ba87eeca7aa4436c861fec5c4b5a24aa +#: ../../app1.rst:283 46170567ecc240c88108dc6a14ac7982 msgid "`flags = TEXTFLAGS_SEARCH & ~TEXT_DEHYPHENATE`" msgstr "" -#: ../../app1.rst:287 4cf3dbadeb6f4843a81b95a57c76c3ee +#: ../../app1.rst:287 82de7610a8c84cdaa15aafa49960bf9a msgid "Indicator" msgstr "指標" -#: ../../app1.rst:287 5a6128d2022240f88e73a6a20f9edaf6 +#: ../../app1.rst:287 3892913f9254485a94780c276805766c msgid "text" msgstr "" -#: ../../app1.rst:287 e72ad4208f264070917517a98014631e +#: ../../app1.rst:287 37c756db16324c458f86f66f086d1941 msgid "html" msgstr "" -#: ../../app1.rst:287 bf49c7bb3193428084a05a576dffebe6 +#: ../../app1.rst:287 5063d3e2784149f188ffae7dcee78a89 msgid "xhtml" msgstr "" -#: ../../app1.rst:287 8e6c5553795b4782935ecb9763c55812 +#: ../../app1.rst:287 0f75631f443a4653a3622a073d27d5a5 msgid "xml" msgstr "" -#: ../../app1.rst:287 510f1bfb723f41b7847d2a8365917c7b +#: ../../app1.rst:287 5a83675663804474931ef4cde1e02911 msgid "dict" msgstr "" -#: ../../app1.rst:287 77967918895e4b9fa5d7c2763c80d401 +#: ../../app1.rst:287 78bc13d9ae104947a657ed2b864c5af2 msgid "rawdict" msgstr "" -#: ../../app1.rst:287 f8ba0fa87fa24d9ba30f45ba036b5562 +#: ../../app1.rst:287 c2b7a5a2bcd040c48f4832612cda9e17 msgid "words" msgstr "" -#: ../../app1.rst:287 29d6cb0a1bb44caca91a286c01263b48 +#: ../../app1.rst:287 e0b980adf7324d1cbf814983a363fe72 msgid "blocks" msgstr "" -#: ../../app1.rst:287 37316c3e6c0c4190abb34e2aba082e16 +#: ../../app1.rst:287 dd0b10b8c86e4f088602b83a1b03aa0d msgid "search" msgstr "" -#: ../../app1.rst:289 7dfaafa7bcef4e46a1880ac1e33e68a4 +#: ../../app1.rst:289 9782eb815e0b457292e05170f64c6ada msgid "preserve ligatures" msgstr "連結を保持" #: ../../app1.rst:289 ../../app1.rst:290 ../../app1.rst:291 ../../app1.rst:293 -#: ../../app1.rst:294 ../../app1.rst:295 02e04efe8d564d1095bd6614084bf237 -#: 09493ed848d9454c8d5284a4a5e09239 0ca7e0ba1241492f85e5d0cd3d2e47dd -#: 15d81574f61441e0bfb49108396e8adf 1b41c85bc4f74840afa930109dafa89f -#: 24b89faf653b41cbb9c46b94a5d36845 2ce329c65bbc49b7aaee28bfd9a42043 -#: 2eb4dae2a1ab433386aad70771a266e0 40056625ef614ca4b5c2c3e0fde13423 -#: 46cf2073cd7c44a4a4303e2bcd9a8341 4981ddd2ddb4481aa2e9c086aef09948 -#: 4a5cb0fc59064d58b793452ee70cd737 709991653a6f4790b1aa96a546c9ae8d -#: 7145e59cf15b4385bf3d4df1e9cae659 74743342e988418ab8fb7fa0762c612a -#: 748e93c8d82340da8f28db7846059e32 7685478b60ae44d0aef067d165d13e32 -#: 77449d5057f647699b89f57a868a6ffd 82ccb713a3d44a87aa3a5a559ef111e6 -#: 8e5996cdb58d44e98b2bc97b5e7d5c0b 8f2e5b3754b549bda380c0889295aac8 -#: 921ab332a0974cff9f2580b352188d33 93ed5c932e8b401ca4b1f96d1b619ded -#: 9a917f7f56184cdabfbbfc332613d111 9e24099952c6453eb8ae831d7dcf90ac -#: a03166f7c820475989916200378f63ee a218f4f08fd44079b4bd75efd913cd76 -#: a8a4ce62a4cc494382abc74325514418 b1803e298f9e45878bb8dd6e37efc998 -#: b28b8a5baad041e395cd8b95ab8a008d b590d3d7d5f44889b5eb4a8633f61738 -#: beb5e66f39024deb8d6ff8d5845d8752 c0e2c76ea55343e9bb1e34fb997a2789 -#: cf0d5e8a77304ba7a32d3aa367191baf d50b8ff484f9410d969867e3e7ac0022 -#: d84ac71af0a3458eb35501aa1434a45a e1383637c1e6489089d92a704bedd3f3 -#: ee27949532e14736b52e976c31cdb532 f7ddc45f0719443ba75d14d038e66741 -#: ff673d945f1648deb01121ec6563f2b5 +#: ../../app1.rst:294 ../../app1.rst:295 1e983a6cb6d44aceb3853c9a83ba5aaf +#: 20b8ab4098ee4007bac8fd0a40bfdbb3 233a030d06984ee593bb98e31c636824 +#: 2b27ec6f790744eb9312d79895d0f846 3b76c164a3bd43af8ddd602b9fb58732 +#: 3b9f9e75e6cc47f79c07151895da4ffd 47460e3c55b04dc4b8ace07d8270df1c +#: 4bdb19637b214e6491ff869852694c6a 567e1e72445749069d46f1f2eff63e0f +#: 59a08f97de8d4245a3e54d4fb26b0291 5c07f51342ce4bba9fc7be3cda6af8df +#: 5d843f7031c14f799bd56886af16313f 6f96176fe534473abd3d0a3b10886daf +#: 775cb0f5f029464d8b6b265a6bd9fbcb 7f8c04030eb2428a8b6e3e4aa1434875 +#: 808f822d5cb846f8bf7e619119fb9318 92acb46014f34d0e94841db5fa7aee7f +#: 93a5eb0806364fc79a03a21a7e1aae61 98b5b944f37445a483864fd0c3c1acc4 +#: 99ab73e65de34fa382f9740422544e20 a2e3210d3b93435d8ae28371d790b824 +#: a3d6d493a3b043b98c7cb1f8282d9733 a8ca4f38d35b49a399948cd811aa950a +#: b718c1a0f6744595bea22305cb934b23 bbbec0ca7da34f32aab5fff3961bc220 +#: bf51c38c6b3b4c3aa9e4a844f049a028 c89bbe13e12949ddb0baa34db3c1e2dc +#: cee800543a0646cca1e99c244818c547 d21544b4657c404689ea4a1442e7b770 +#: d540a50f31844489b476bc3b2eccf0bf df435d6f1108468683ceacd21cfd87c9 +#: e0d49fa814f943faac85b4230fc44880 ed76c68df9d6403bb3828c2fa2b236f3 +#: ef74eb0f02c24d33becc781ce950b651 f20c32d4888f4d029ee7074ede80e23a +#: f5ce82fd58e648bd8434116561a19697 f6559ff8a2154209bc3e256c2035e51a +#: fbd7fda4af014d3882244ca311699849 fc0e3ef690de498a853cfa1bbf8aa702 msgid "1" msgstr "" -#: ../../app1.rst:290 25dead8148bd4bf699c85ebc8b3fcce5 +#: ../../app1.rst:289 ../../app1.rst:291 ../../app1.rst:292 ../../app1.rst:293 +#: ../../app1.rst:295 06a775ff9e024c69b2b20b72b87e2f39 +#: 0dcfeff6364f486b85e82098cd35dad9 251e9b0cc0c1420fae3dd91f99f24d7f +#: 3698b2725d17402fb0a6d21a9f8528a6 46a337a4a68e49d7a800dd9701077648 +#: 4ba8146f24be48239504f8a299500f64 4dda4b0faa7a41b4bd93757bfa5e48fc +#: 52d30ea082894e04b0ccd40e6bafc7a5 5994e677f5c94c30828758452ab35e2c +#: 6063573b774c440dabdd54208c398123 62ed92eea3bd495b99addd70a3fd7823 +#: 6d98e245478f48c590bdc7e8f8585eda 709d6cddbcef491aa2d2d653bb6ecb16 +#: 86e73f4e80894ea5b04fa62a9ca34165 9f9ddfd3cdab40c58298f9300c4e6ad0 +#: a8f2711acc19466397e196137cd3d96a bc6bd4d438e8412289b2d55436bd3341 +#: dbb1a8bf2fa344d9916b1ec4ebf075db ef81628962544a8ebf82a15aac960331 +#: f18b0d81b3da4760894d1814700e43c4 fe2557a2e37b4bf29c6cd13888e1ba55 +msgid "0" +msgstr "" + +#: ../../app1.rst:290 1beaf7102f1945d8bbb04d397b9227f1 msgid "preserve whitespace" msgstr "空白を保持" -#: ../../app1.rst:291 ca281f5aea224ac0a1a2833c6dda0cf6 +#: ../../app1.rst:291 4691c88b06074b38896de74a86973a95 msgid "preserve images" msgstr "画像を保持" -#: ../../app1.rst:291 3aac39dec92f4f598f8be3a9a23cc050 -#: 59a9e023c85e43f1b655dce407606e9c afc2e3975fd34a4d8dddf1115d9b0c06 +#: ../../app1.rst:291 b2eacea067054a2c89b01026f348d200 +#: cde51036a4774390b6b3b86bad72cebf d34b28c25d6a4b8eb72ae032050e8ef2 msgid "n/a" msgstr "" -#: ../../app1.rst:291 ../../app1.rst:292 ../../app1.rst:293 ../../app1.rst:295 -#: 013cab2aca894359a665ce4800105409 05d3ee30c05b45a78425e8e1ef622739 -#: 0ed64e90d13241098a2b594d1a3fb46c 143c17b506154ae7a66186af9d7a9b69 -#: 23aa7e8c93374a78857a53bd4bdeb52e 2588532e89fd42408cd6fea40f59161b -#: 2aeec4fce3444c428866a206768c05ec 38f68840f1ba466da9d9c407267ea958 -#: 47d6e25a01d64b7681cdbc671892304f 55e383c035a64abb8c9b5b3ea75ef728 -#: 677131a130eb460ebb597bfd82700cbb 6f5816ceef7c477eaeef5550467c3ac9 -#: 77bac29b2b1443bfb53babb62c391106 77d105d83e1840d1b9baea6c144831e7 -#: 8ab3824f309b4832804d88e46612a96d 90d27c4ce1504832a750ceceda77ce4c -#: a04f6a7c5f214b94b77c5a771053a4b8 ccaea946956a4f88b6b89f1463472341 -#: f845fce532b54ba18586160b70ce5665 ffdb10d0ed4d48569109d3c111d1d06e -msgid "0" -msgstr "" - -#: ../../app1.rst:292 12f38aa106af49fcb4a4c7fa42373aa4 +#: ../../app1.rst:292 6280ef433e7648fd83936d5d9fabf2e3 msgid "inhibit spaces" msgstr "スペースの抑制" -#: ../../app1.rst:293 1a27304e6623442b95a7913d89d022bd +#: ../../app1.rst:293 ffbb4fff9bc14f4b89c7138073298de3 msgid "dehyphenate" msgstr "ハイフネーション解除" -#: ../../app1.rst:294 713bfe65d2fb4cb082489147410b9ecb +#: ../../app1.rst:294 1c61f64ea3c046aa98ef330907277d28 msgid "clip to mediabox" msgstr "メディアボックスにクリップ" -#: ../../app1.rst:295 7fcb6fcbcd424bdbbc79be6cb137eb11 +#: ../../app1.rst:295 46e9e87165ad4603ad27fca406580f85 msgid "use CID instead of U+FFFD" msgstr "" -#: ../../app1.rst:298 4293537b8a4d48aebadc39e5f8b3d451 +#: ../../app1.rst:298 d03c9f5449f345a3b73490298a0485f9 msgid "**search** refers to the text search function." msgstr "**検索** はテキスト検索機能を指します。" -#: ../../app1.rst:299 cd53d8f11ad946428137e5fec7cb9404 +#: ../../app1.rst:299 e69a3f6563a349f7ac389cad653d8f9f msgid "**\"json\"** is handled exactly like **\"dict\"** and is hence left out." msgstr "**「json」** は **「dict」** とまったく同様に処理されるため、省略されています。" -#: ../../app1.rst:300 907d031f0eab4620a54f273d96a139ff +#: ../../app1.rst:300 00f7c04e64ee45e09727561d7a20c052 msgid "" "**\"rawjson\"** is handled exactly like **\"rawdict\"** and is hence left" " out." msgstr "**「rawjson」** は **「rawdict」** とまったく同様に処理されるため、省略されています。" -#: ../../app1.rst:301 11c131c3832f4f08b9d99a54c208337d +#: ../../app1.rst:301 6b8b4b0d4438489eb25ff507f4d3b024 msgid "" "An \"n/a\" specification means a value of 0 and setting this bit never " "has any effect on the output (but an adverse effect on performance)." msgstr "「n/a」の指定は値が0であり、このビットを設定しても出力に影響を与えることはありません(ただしパフォーマンスに悪影響を及ぼす可能性があります)。" -#: ../../app1.rst:302 e9039b4afb9f47458de59300a7dfb249 +#: ../../app1.rst:302 9e71d45dfa8a432a85b4c21b50596e46 msgid "" "If you are not interested in images when using an output variant which " "includes them by default, then by all means set the respective bit off: " @@ -522,16 +522,15 @@ msgid "" "requirements." msgstr "画像を含む出力バリアントを使用する際に画像に興味がない場合、必ず該当するビットをオフに設定してください。これにより、パフォーマンスが向上し、スペース要件が大幅に削減されます。" -#: ../../app1.rst:304 806b7dadfb7e466995dd4e7b3e532e5f -#, fuzzy +#: ../../app1.rst:304 4babe75226f64adeb13494c473d77bda msgid "To show the effect of `TEXT_INHIBIT_SPACES` have a look at this example::" msgstr "`TEXT_INHIBIT_SPACES` の効果を示すために、この例をご覧ください:" -#: ../../app1.rst:324 68729abbc0cf4e9ea7b5f4afed97695a +#: ../../app1.rst:324 791593433363447884bf96a0f495a7ed msgid "Performance" msgstr "パフォーマンス" -#: ../../app1.rst:325 aaa853e33a8143ae8b050e329abfc319 +#: ../../app1.rst:325 0da8da4ddf0640e08849ffc214bbc392 msgid "" "The text extraction methods differ significantly both: in terms of " "information they supply, and in terms of resource requirements and " @@ -539,7 +538,7 @@ msgid "" "processing is required and a higher data volume is generated." msgstr "テキスト抽出メソッドは、情報の提供方法とリソース要件、実行時間の両方で大きく異なります。一般的に、情報が多いほど処理が必要であり、より多くのデータが生成されることを意味します。" -#: ../../app1.rst:327 5fa74e39a5c941829f21b29b11ba420c +#: ../../app1.rst:327 20586902aec24daab2b5f3efb0591035 #, python-format msgid "" "Especially images have a **very significant** impact. Make sure to " @@ -552,7 +551,7 @@ msgstr "" "特に画像は **非常に大きな** " "影響を持ちます。必要のない場合は、必ず画像を除外する(フラグパラメータを使用)ようにしてください。以下で言及されている2,700ページの総ページ数をデフォルトのフラグ設定で処理するには、全ての抽出メソッドで160秒が必要でした。画像をすべて除外した場合、その時間の50%未満(77秒)が必要でした。" -#: ../../app1.rst:329 c6b523a1b9a744c5b0fd013bc3edfa76 +#: ../../app1.rst:329 2e8a95a956e644ac8d4696dce6c61cc2 msgid "" "To begin with, all methods are **very fast** in relation to other " "products out there in the market. In terms of processing speed, we are " @@ -564,119 +563,119 @@ msgstr "" "です。処理速度の観点から、より速い(無料の)ツールは私たちの知る限り存在しません。最も詳細なメソッドであるRAWDICTでも、 " ":ref:`AdobeManual` リファレンスの1,310ページを5秒未満で処理できます(ここでは簡単なテキストは2秒未満で処理されます)。" -#: ../../app1.rst:331 5d65abf2035a4c3e8bc1d48f10d4ff80 +#: ../../app1.rst:331 b478d8651f884657b5f2968d78bde08e msgid "" "The following table shows average relative speeds (\"RSpeed\", baseline " "1.00 is TEXT), taken across ca. 1400 text-heavy and 1300 image-heavy " "pages." msgstr "以下の表は、約1400ページのテキストが多く、約1300ページが画像が多いページでの平均相対速度(ベースライン1.00はTEXT)を示しています。" -#: ../../app1.rst:334 3cbf7d19cff44a23ba6db25d970f3f6a +#: ../../app1.rst:334 e4cd1e92a16243b9bdc20d79c041f5ab msgid "Method" msgstr "メソッド" -#: ../../app1.rst:334 73fc57f505d24dc594edc961069201ef +#: ../../app1.rst:334 e7cdf152a1914df4b50d9e29af7c6414 msgid "RSpeed" msgstr "平均相対" -#: ../../app1.rst:334 97ff70f48f404b8f836a54803ac776b3 +#: ../../app1.rst:334 d842d0f8ae3a48d0a969867502970a0c msgid "Comments" msgstr "コメント" -#: ../../app1.rst:334 5c67c714d87b46508a28ea9330822e16 +#: ../../app1.rst:334 48d44a0956cd43a1b911aeb4417696ea msgid "no images" msgstr "画像なし" -#: ../../app1.rst:336 a2aa626778104c818238a4fe160c1b63 +#: ../../app1.rst:336 52d85a2f5b704adc8c686c36a9f92fe2 msgid "TEXT" msgstr "" #: ../../app1.rst:336 ../../app1.rst:337 ../../app1.rst:340 -#: 389f7901d2654cebbdb2249482ebf21e 41cc3387570a41c1ae38d09dd67830fe -#: 977e0048dc1e4808b0c04dafa9de2acb afbf34a491944d9c9e284944ed2b92ba -#: cef3349602a74d1bb70d83f01f10ef30 +#: 3bcb90f59d8f4da58255a7a86093aa07 59f27de687b642ddb52e91f17533cc5b +#: a0b2dcf2b2ef4bd7ad4cff46bb823559 db1033e32d794e808303b3da34f587ac +#: f1cf54ba71c34f339ccf48d538136125 msgid "1.00" msgstr "" -#: ../../app1.rst:336 77d6a256f0a44a27a2a965b7c5bd03fe +#: ../../app1.rst:336 6dabc232af8f4901aea1c358a0ae9564 msgid "no images, **plain** text, line breaks" msgstr "画像なし、 **プレーン** テキスト、改行" -#: ../../app1.rst:337 76beec0a77df46b9991b3bb3cffdd84c +#: ../../app1.rst:337 23cec37141ab47548b08ce6a51c47532 msgid "image bboxes (only), **block** level text with bboxes, line breaks" msgstr "画像のバウンディングボックス(のみ)、 **ブロック** レベルのテキストとバウンディングボックス、改行" -#: ../../app1.rst:338 50fa173064c64222b3768d21522661d3 -#: 65e74fe36c5241a2adcb69dba2b57601 +#: ../../app1.rst:338 04eaefca5e1f41eda6d2831fd36c1a5d +#: 4f0d944bd46143d298a7a366f9b35d36 msgid "1.02" msgstr "" -#: ../../app1.rst:338 8e18ec5ea31d4c02b4d36a0332401c84 +#: ../../app1.rst:338 f4c82b98aa294a4ba829c5ba6dd0b736 msgid "no images, **word** level text with bboxes" msgstr "画像なし、 **ワード** レベルのテキストとバウンディングボックス" -#: ../../app1.rst:339 4b7c0db464c640bba505776b7c37ba1e -#: d1b996772cb541f583071bcdea63bc53 +#: ../../app1.rst:339 6b2dcc5f62e242a3bc9579407a6568a1 +#: f95901f3f681472a947f2f30ee664a42 msgid "2.72" msgstr "" -#: ../../app1.rst:339 1d23c31cbeb4409f8bf8603b5b6cd5a3 +#: ../../app1.rst:339 8a17afd3b00a478db3c1a02c3174167f msgid "no images, **char** level text, layout and font details" msgstr "画像なし、**文字** レベルのテキスト、レイアウトとフォントの詳細" -#: ../../app1.rst:340 339147fff69347aeabfda95e05ebb717 +#: ../../app1.rst:340 0f0de8a5134b47348c6bb22b8c2a813a msgid "3.32" msgstr "" -#: ../../app1.rst:340 59d11202c7514a14a304bf1c4bab5af6 +#: ../../app1.rst:340 fa9159767f484518983dcfa06467eead msgid "**base64** images, **span** level text, no layout info" msgstr "**base64** 画像、 **スパン** レベルのテキスト、レイアウト情報なし" -#: ../../app1.rst:341 f89a9f9f9c824855afcc148193e1f4d8 +#: ../../app1.rst:341 efb4a91cc528491c86864634ab1c8962 msgid "3.54" msgstr "" -#: ../../app1.rst:341 709d2a8eaf224a5794955edc5aae24cc +#: ../../app1.rst:341 612c89df3d5046f399cd591cbecfa4d1 msgid "**base64** images, **span** level text, layout and font details" msgstr "**base64画像** 、 **スパン** レベルのテキスト、レイアウトとフォントの詳細" -#: ../../app1.rst:341 28b2de4324e7460ab00d3f298a0ce226 +#: ../../app1.rst:341 82007c0df4b04de7b342be7f608efe6d msgid "1.01" msgstr "" -#: ../../app1.rst:342 a871641a06df4b328d1f5da0db083ac6 +#: ../../app1.rst:342 22c93672d1754b45979767b416822fc9 msgid "DICT" msgstr "" -#: ../../app1.rst:342 84b8a19232a041c9ab82ada80cdcc0f8 +#: ../../app1.rst:342 73dbc0957638492db3cb33c44afc4ff0 msgid "3.93" msgstr "" -#: ../../app1.rst:342 2e0bd9bc74fa438dbb09ff18fbdef53e +#: ../../app1.rst:342 081b9112703a4d6f8b31780c1f8d4708 msgid "**binary** images, **span** level text, layout and font details" msgstr "**バイナリ** 画像、 **スパン** レベルのテキスト、レイアウトとフォントの詳細" -#: ../../app1.rst:342 a5e3f92d46a64c8285a2deed81573eb9 +#: ../../app1.rst:342 c0b41f51a7214a12a3efec0ecbba1e5f msgid "1.04" msgstr "" -#: ../../app1.rst:343 c88f5dafe2684d95b5fb3d47aeefebef +#: ../../app1.rst:343 5de542c1e80e424294d32a859e17ca43 msgid "RAWDICT" msgstr "" -#: ../../app1.rst:343 ad9baa9977844a628f2437097357aca6 +#: ../../app1.rst:343 8bec4991b902406e931341dbb186a6d0 msgid "4.50" msgstr "" -#: ../../app1.rst:343 f79697a7a1994df1bace36569b8b99ce +#: ../../app1.rst:343 c4f7dd03bce440c6a1820660104e7a31 msgid "**binary** images, **char** level text, layout and font details" msgstr "**バイナリ** 画像、**文字** レベルのテキスト、レイアウトとフォントの詳細" -#: ../../app1.rst:343 ce825302a1c14010a7b0902b4e073e5a +#: ../../app1.rst:343 71321cf4b722412abdf5f6eaa793ec1d msgid "1.68" msgstr "" -#: ../../app1.rst:346 1494541f28f243cba9f4c115c6767cbd +#: ../../app1.rst:346 e12d6cb6be1b4701a2b213d3f27afa27 #, python-format msgid "" "As mentioned: when excluding image extraction (last column), the relative" @@ -687,21 +686,20 @@ msgstr "" "前述のように、画像の抽出を除外する場合(最後の列)、相対速度は大きく変わります。RAWDICTとXMLを除いて、他のメソッドはほぼ同じ速さであり、RAWDICTは" " **今では遅いXML** よりも40%少ない実行時間を必要とします。" -#: ../../app1.rst:348 2cc3bc592b9c44a089dcc6e8b9ac7ec2 +#: ../../app1.rst:348 6750dde161a54ad6adb3ada9203f0253 msgid "Look at chapter **Appendix 1** for more performance information." msgstr "もっとパフォーマンス情報については、 **付録1章** をご覧ください。" -#: ../../footer.rst:60 57800ba0b1de4ef3b02e5d710688173b +#: ../../footer.rst:60 05804a3786b14f7fa5098ddfaf65f873 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 10875e96faaf4f4d92f84351f1d06a7c -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/app2.mo b/docs/locales/ja/LC_MESSAGES/app2.mo index b101d6d32..64600705d 100644 Binary files a/docs/locales/ja/LC_MESSAGES/app2.mo and b/docs/locales/ja/LC_MESSAGES/app2.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/app2.po b/docs/locales/ja/LC_MESSAGES/app2.po index 84ac28c02..b766aaa96 100644 --- a/docs/locales/ja/LC_MESSAGES/app2.po +++ b/docs/locales/ja/LC_MESSAGES/app2.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,37 +19,37 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 1db0b4e6f060444585e70a919ac213d2 +#: ../../header.rst:-1 ce178b1ad1a74ee4b4c40ab17fe257ae msgid "Artifex" msgstr "" -#: ../../header.rst:-1 efc456609e34422c8cbcecc13b3b2767 +#: ../../header.rst:-1 419c2281e2e246658e42483c0a1fc0d6 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 5f389770a8484cdebecbfd5a9b1eac63 +#: ../../header.rst:-1 ebb04a69cb76400eb6074b4c9c39ec1f msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../app2.rst:7 cb2ca70ccc3b4ccf975cdac5b4d0aa63 +#: ../../app2.rst:7 64d6bda691354b77987e85bd9a04296b msgid "Appendix 2: Considerations on Embedded Files" msgstr "付録2:埋め込みファイルに関する考慮事項" -#: ../../app2.rst:8 b467ff1ee5574fc1938255e45bf4918c +#: ../../app2.rst:8 d15d38307aa649f983ce5b15f6c6a3fd msgid "" "This chapter provides some background on embedded files support in " "PyMuPDF." msgstr "この章では、PyMuPDFにおける埋め込みファイルのサポートに関する背景情報を提供します。" -#: ../../app2.rst:11 093ef9b2f0c843ea9eb56f5020f1fbfd +#: ../../app2.rst:11 20abd6d046f14fb19306663331d645c0 msgid "General" msgstr "一般" -#: ../../app2.rst:12 b87e73306a9047769efb921a4b55b593 +#: ../../app2.rst:12 7dd965f6d81847bb95992e2db8036f26 msgid "" "Starting with version 1.4, PDF supports embedding arbitrary files as part" " (\"Embedded File Streams\") of a PDF document file (see chapter \"7.11.4" @@ -58,7 +58,7 @@ msgstr "" "バージョン1.4から、PDFはPDFドキュメントファイルの一部として任意のファイルを埋め込むことができるようになりました(「7.11.4 " "埋め込みファイルストリーム」章を参照、 :ref:`AdobeManual` リファレンスの103ページ)。" -#: ../../app2.rst:15 8857cd146bf9408f8d3d105c993cfc4b +#: ../../app2.rst:15 9673011500be45a5b2780b4f29fcb427 msgid "" "In many aspects, this is comparable to concepts also found in ZIP files " "or the OLE technique in MS Windows. PDF embedded files do, however, *not*" @@ -69,7 +69,7 @@ msgstr "" "WindowsのOLE技術でも見られる概念に類似しています。ただし、PDFの埋め込みファイルはZIP形式とは異なり、ディレクトリ構造をサポート " "*しません* 。埋め込みファイル自体もさらに埋め込みファイルを含むことができます。" -#: ../../app2.rst:17 8561288901ad4d9ba89b700aeaa3712e +#: ../../app2.rst:17 21d8ec87be9d4021aec6fa647434f686 msgid "" "Advantages of this concept are that embedded files are under the PDF " "umbrella, benefitting from its permissions / password protection and " @@ -78,7 +78,7 @@ msgid "" "unit of information." msgstr "このコンセプトの利点は、埋め込みファイルがPDFの枠組みに含まれ、その権限/パスワード保護および整合性の側面を活用できることです。PDFが参照するデータや依存する可能性があるデータはすべて、PDFにまとめて1つの一貫した情報ユニットを形成することができます。" -#: ../../app2.rst:19 feec4905b2ae4d0fbb6db101232409e3 +#: ../../app2.rst:19 27f0645490d24afd94260b80f51190e2 msgid "" "In addition to embedded files, PDF 1.7 adds *collections* to its support " "range. This is an advanced way of storing and presenting meta information" @@ -87,11 +87,11 @@ msgstr "" "埋め込みファイルに加えて、PDF 1.7は *コレクション* " "をサポート範囲に追加しました。これは、埋め込みファイルのメタ情報(任意で拡張可能なプロパティ)を格納し、表示する高度な方法です" -#: ../../app2.rst:22 6c12e4f873fe4e35aac81dbd56775283 +#: ../../app2.rst:22 6461638e9a0c4f6d8dd9404f02cae88c msgid "MuPDF Support" msgstr "MuPDFのサポート" -#: ../../app2.rst:23 3fcb97a7cfeb400b94da50ed84725590 +#: ../../app2.rst:23 7a4bd68162ca408082e0fe0981edfb0e msgid "" "After adding initial support for collections (portfolios) and " "*/EmbeddedFiles* in MuPDF version 1.11, this support was dropped again in" @@ -100,13 +100,13 @@ msgstr "" "MuPDFバージョン1.11でコレクション(ポートフォリオ)と */EmbeddedFiles* " "への初期サポートを追加した後、このサポートはバージョン1.15で再び削除されました。" -#: ../../app2.rst:25 de175229812046c0998feea9dba69d70 +#: ../../app2.rst:25 5d971b234a074542a7fe67243445baac msgid "" "As a consequence, the cli utility *mutool* no longer offers access to " "embedded files." msgstr "その結果、cliユーティリティ *mutool* ではもはや埋め込みファイルにアクセスできなくなりました。" -#: ../../app2.rst:27 0680e77307bd472e9e2d9035888a714f +#: ../../app2.rst:27 121edfcf69c34685bbfd37adf5eed763 msgid "" "PyMuPDF -- having implemented an */EmbeddedFiles* API in response in its " "version 1.11.0 -- was therefore forced to change gears starting with its " @@ -116,23 +116,23 @@ msgstr "" "APIを実装したため、バージョン1.16.0からギアを変更せざるを得なくなりました(MuPDF " "v1.15.x互換のPyMuPDFは公開されませんでした)。" -#: ../../app2.rst:29 088e37bdceab486b99bd9c4ce3cee904 +#: ../../app2.rst:29 179951424a4d4e85899ade12ee77d71b msgid "" "We are now maintaining our own code basis supporting embedded files. This" " code makes use of basic MuPDF dictionary and array functions only." msgstr "私たちは現在、埋め込みファイルをサポートする独自のコードベースを維持しています。このコードは、基本的なMuPDFの辞書と配列の機能のみを使用しています。" -#: ../../app2.rst:32 2635d5513ce841a5ae3612c7e8e7940f +#: ../../app2.rst:32 9f89c97ca1ff44a59f6b127c6a772547 msgid "PyMuPDF Support" msgstr "PyMuPDFのサポート" -#: ../../app2.rst:33 de598b1600054e1e9630184678ed1ac8 +#: ../../app2.rst:33 cdda1b955d134a22825d992b8d121028 msgid "" "We continue to support the full old API with respect to embedded files --" " with only minor, cosmetic changes." msgstr "私たちは、埋め込みファイルに関する古いAPIを、わずかな見た目の変更のみを行いながら引き続きサポートしています。" -#: ../../app2.rst:35 0e90123c24a44203bba977a27e7a55bc +#: ../../app2.rst:35 77890c822c424653bfeba8e464bc73a5 msgid "" "There even also is a new function, which delivers a list of all names " "under which embedded data are registered in a PDF, " @@ -141,17 +141,16 @@ msgstr "" "また、PDF内の埋め込みデータが登録されているすべての名前のリストを返す新しい関数も存在します。:meth:`Document.embfile_names`" " です。" -#: ../../footer.rst:71 489604d4ac6b4cf88a0f25aa1234efe8 +#: ../../footer.rst:60 0a64be666c834c3aaf01bfaa636d73ad msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 7749080ed69f402ebc41363739ffd4b7 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/app3.mo b/docs/locales/ja/LC_MESSAGES/app3.mo index 4b89a51d5..912c04854 100644 Binary files a/docs/locales/ja/LC_MESSAGES/app3.mo and b/docs/locales/ja/LC_MESSAGES/app3.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/app3.po b/docs/locales/ja/LC_MESSAGES/app3.po index dbe9fa09d..dd74c6948 100644 --- a/docs/locales/ja/LC_MESSAGES/app3.po +++ b/docs/locales/ja/LC_MESSAGES/app3.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,37 +19,37 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 b6648a5f45f6492cab032cfb3f78d8c1 +#: ../../header.rst:-1 60f6be1d195a47dfa71e36c01046a6f2 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 ac34864719434fa5b825a325eb268254 +#: ../../header.rst:-1 a4c0fceff01a49b8af3eeac93d6dad96 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 23920b4d18634b539a3c5192c5d04860 +#: ../../header.rst:-1 98d12c2cb9034b46a9688c6079f6ba7d msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../app3.rst:7 f3a8cc14d0d74ff8b2d7d08f96a266f4 +#: ../../app3.rst:7 cca161444d5f424ea46010c939dda2bf msgid "Appendix 3: Assorted Technical Information" msgstr "付録3:さまざまな技術情報" -#: ../../app3.rst:8 61700585f9634334a6f50e69fdd3a604 +#: ../../app3.rst:8 13009e428fa54f0f8b0fd4f28fd0135d msgid "" "This section deals with various technical topics, that are not " "necessarily related to each other." msgstr "このセクションでは、必ずしも関連しないさまざまな技術的なトピックについて取り扱います。" -#: ../../app3.rst:15 a52e2fe7bfe149769f212802e67a3122 +#: ../../app3.rst:15 13e1d68350c14d2296f3b76f13faaaab msgid "Image Transformation Matrix" msgstr "画像変換行列" -#: ../../app3.rst:16 4b5bf1f96aee4fceaf3a9f9e6e6d020f +#: ../../app3.rst:16 848f582117934433a927f0dbb689c00c msgid "" "Starting with version 1.18.11, the image transformation matrix is " "returned by some methods for text and image extraction: " @@ -58,7 +58,7 @@ msgstr "" "バージョン1.18.11から、テキストと画像の抽出に関する一部のメソッドで画像変換行列が返されます::meth:`Page.get_text` " "および :meth:`Page.get_image_bbox` 。" -#: ../../app3.rst:18 510de0359f20447ea3cfe76525a50e72 +#: ../../app3.rst:18 0654c7ad36c640a3b0cab3d7cd9c247d msgid "" "The transformation matrix contains information about how an image was " "transformed to fit into the rectangle (its \"boundary box\" = \"bbox\") " @@ -67,39 +67,41 @@ msgid "" "displayed scaled or rotated on a page." msgstr "変換行列には、画像が文書ページ上の矩形(「境界ボックス」=「bbox」)に適合するためにどのように変換されたかに関する情報が含まれています。ページ上の画像のbboxとこの行列を検査することにより、例えば画像がページ上で拡大縮小または回転して表示されるかどうか、そしてどのように表示されるかを判断することができます。" -#: ../../app3.rst:20 28242e4db05f4743890c356f35f4f5a7 +#: ../../app3.rst:20 20f8cdadb1584a6ab210701b4ad8f4c5 msgid "" "The relationship between image dimension and its bbox on a page is the " "following:" msgstr "画像の寸法とページ上のbboxとの関係は次のとおりです:" -#: ../../app3.rst:24 d5f5587835b94ffd967722910f294d30 +#: ../../app3.rst:24 64e0b4b249684b7881f7532d0a28a921 msgid "Using the original image's width and height," msgstr "元の画像の幅と高さを使用して、" -#: ../../app3.rst:23 2254528a02204db29976656cce479394 +#: ../../app3.rst:23 9ec9e8f5100a4c169aa6fb31af4f7ee7 msgid "define the image rectangle `imgrect = pymupdf.Rect(0, 0, width, height)`" msgstr "画像の矩形を `imgrect = pymupdf.Rect(0, 0, width, height)` と定義します。" -#: ../../app3.rst:24 0889a555e2c64ba39bf996f84dfbe69d +#: ../../app3.rst:24 9849a7a8eaf843a48b675921279bce2d msgid "" "define the \"shrink matrix\" `shrink = pymupdf.Matrix(1/width, 0, 0, " "1/height, 0, 0)`." msgstr "「縮小行列」を `shrink = pymupdf.Matrix(1/width, 0, 0,1/height, 0, 0)` と定義します。" -#: ../../app3.rst:26 863b902429b74a0ea4d682d95d708b85 +#: ../../app3.rst:26 69793febeda4444a95c8d6b2e8b73251 msgid "" "Transforming the image rectangle with its shrink matrix, will result in " "the unit rectangle: `imgrect * shrink = pymupdf.Rect(0, 0, 1, 1)`." -msgstr "画像矩形を縮小行列で変換すると、単位矩形が得られます: `imgrect * shrink = pymupdf.Rect(0, 0, 1, 1)` 。" +msgstr "" +"画像矩形を縮小行列で変換すると、単位矩形が得られます: `imgrect * shrink = pymupdf.Rect(0, 0, 1, 1)`" +" 。" -#: ../../app3.rst:28 98e630c525654f03a1c95410d9f89381 +#: ../../app3.rst:28 e1934c547348415db72046991c64653a msgid "" "Using the image **transformation matrix** \"transform\", the following " "steps will compute the bbox::" msgstr "画像 **変換行列** 「transform」を使用して、次の手順でbboxを計算します:" -#: ../../app3.rst:34 dae965419f304c81bd374c811df1ca26 +#: ../../app3.rst:34 0e8eccf66ebc4a85873f62a2bd80c6d1 msgid "" "Inspecting the matrix product `shrink * transform` will reveal all " "information about what happened to the image rectangle to make it fit " @@ -109,11 +111,11 @@ msgstr "" "行列の積 `shrink * transform` " "を検査することで、画像矩形がページ上のbboxに適合させるために何が起こったかに関するすべての情報が明らかになります。回転、辺のスケーリング、および原点の移動です。例を見てみましょう:" -#: ../../app3.rst:71 e0986c00f7d84d44acb0889fa6a4389c +#: ../../app3.rst:71 b14abce2fb5d425297600773378533df msgid "PDF Base 14 Fonts" msgstr "PDFベース14フォント" -#: ../../app3.rst:72 427ff444efe24e7684b8a9e36a185151 +#: ../../app3.rst:72 0ae7c8fe1e22485bbc633ff8d3a9bc46 msgid "" "The following 14 builtin font names **must be supported by every PDF " "viewer** application. They are available as a dictionary, which maps " @@ -125,7 +127,7 @@ msgstr "" "。これらは辞書として利用可能で、それぞれのフルネームとその略称を小文字で完全な **フォントベース名** " "にマッピングします。PyMuPDFでフォント名を提供する必要がある場合、辞書からの任意の **キーまたは値** を使用できます:" -#: ../../app3.rst:105 9824461260cd43abbd8896b27a9ddd1c +#: ../../app3.rst:105 3e6f6703b8da46708e3fc8c2384de523 msgid "" "In contrast to their obligation, not all PDF viewers support these fonts " "correctly and completely -- this is especially true for Symbol and " @@ -133,7 +135,7 @@ msgid "" "reader." msgstr "義務とは対照的に、すべてのPDFビューアがこれらのフォントを正確かつ完全にサポートしているわけではありません。特にSymbolとZapfDingbatsについては、これが特に当てはまります。また、グリフ(視覚的な)イメージは、それぞれの閲覧者に固有のものになります。" -#: ../../app3.rst:107 b4c5d0f7b6614779afedc13d5f334145 +#: ../../app3.rst:107 a14f874dae6142fca8307f5dc4d5ea59 msgid "" "To see how these fonts can be used -- including the **CJK built-in** " "fonts -- look at the table in :meth:`Page.insert_font`." @@ -141,14 +143,14 @@ msgstr "" "これらのフォントがどのように使用されるか( **CJK組み込みフォント** も含めて)、:meth:`Page.insert_font` " "のテーブルをご覧ください。" -#: ../../app3.rst:114 39b67702821c4fc0a25fcace88e339ed +#: ../../app3.rst:114 e74c51f5d9244a07ba5ff41d7d1f7eae msgid "Adobe PDF References" msgstr "Adobe PDFリファレンス" -#: ../../app3.rst:116 33264597fd83403391209c5b93fbfcc9 +#: ../../app3.rst:116 f437d3bd70b8474d9c453efcf4fde51e msgid "" "This PDF Reference manual published by Adobe is frequently quoted " -"throughout this documentation. It can be viewed and downloaded from `here" +"throughout this documentation. It can be viewed and downloaded from `opensource.adobe.com" " `_." msgstr "" @@ -156,7 +158,7 @@ msgstr "" "`_ から閲覧およびダウンロードが可能です。" -#: ../../app3.rst:118 57a75397c3474cdc9135a1b4d6497d18 +#: ../../app3.rst:118 62c01b0557a14537b1af278fbf1e9d7d msgid "" "For a long time, an older version was also available under `this " "`_" @@ -170,11 +172,11 @@ msgstr "" " " "リンクで利用可能でしたが、2021年10月にウェブサイトから取り下げられたようです。以前(1.19.*より前)のPyMuPDFドキュメンテーションはこの文書を参照していました。私たちは、上記の現行仕様への参照を置き換える取り組みを行っています。" -#: ../../app3.rst:125 8846fcb3204d4a5f8b0a3341b0a41116 +#: ../../app3.rst:125 ff92f05294a745e2935ab9010d0cece0 msgid "Using Python Sequences as Arguments in PyMuPDF" msgstr "PythonシーケンスをPyMuPDFで引数として使用する場合" -#: ../../app3.rst:126 fd02384aa02e41d7b8757073cea406d4 +#: ../../app3.rst:126 457903724c494cda86653c06537c9dc2 msgid "" "When PyMuPDF objects and methods require a Python **list** of numerical " "values, other Python **sequence types** are also allowed. Python classes " @@ -185,7 +187,7 @@ msgstr "" "も許可されています。Pythonのクラスは、`__getitem__()` メソッドを持つ場合、**シーケンスプロトコル** " "を実装していると言われています。" -#: ../../app3.rst:128 e50328609dd042c9b9859f5717435897 +#: ../../app3.rst:128 509b0d726a2a421b8b96fc497e097ef9 msgid "" "This basically means, you can interchangeably use Python *list* or " "*tuple* or even *array.array*, *numpy.array* and *bytearray* types in " @@ -194,47 +196,47 @@ msgstr "" "基本的には、これらの場合にPythonの *リスト* や *タプル* 、*array.array* 、*numpy.array* " "、*bytearray* 型を互換性を持って使用できることを意味しています。" -#: ../../app3.rst:130 40d52d5e20424f8db181f5c2b8095fdb +#: ../../app3.rst:130 d7a8445cad7a4ff4915c3b219e40a525 msgid "For example, specifying a sequence `\"s\"` in any of the following ways" msgstr "例えば、次のいずれかの方法でシーケンス `\"s\"` を指定すると" -#: ../../app3.rst:132 b6aec74c505d4d3d918e3a8fbacd6d31 +#: ../../app3.rst:132 be280649629141ceaa48ab75c52aac03 msgid "`s = [1, 2]` -- a list" msgstr "`s = [1, 2]` – リスト" -#: ../../app3.rst:133 7ed908ffa1d643cc8d586817efec1a2c +#: ../../app3.rst:133 37f22b1ed77f40f3a6f9d8062d8e3529 msgid "`s = (1, 2)` -- a tuple" msgstr "`s = (1, 2)` – タプル" -#: ../../app3.rst:134 4d16288853a04fb6a1bb5ef5bde6a5b7 +#: ../../app3.rst:134 c0ff25efcfc84116b5686e2a4d499d2a msgid "`s = array.array(\"i\", (1, 2))` -- an array.array" msgstr "`s = array.array(\"i\", (1, 2))` – array.array" -#: ../../app3.rst:135 234202c068e6473dbd4c5c0d50e8451f +#: ../../app3.rst:135 dcc0cf4fb2d44b299145d5420fc5fe4d msgid "`s = numpy.array((1, 2))` -- a numpy array" msgstr "`s = numpy.array((1, 2))` – numpy配列" -#: ../../app3.rst:136 96130cf6bfab45ba8402e8c024538a8b +#: ../../app3.rst:136 07b6af8c8b6c4d01b9053e873478532d msgid "`s = bytearray((1, 2))` -- a bytearray" msgstr "`s = bytearray((1, 2))` – bytearray" -#: ../../app3.rst:138 24048f3b3bc94f4d9ef8d92b7f9dc44e +#: ../../app3.rst:138 734fab1b094844babc00897aa6e59617 msgid "will make it usable in the following example expressions:" msgstr "これによって、以下の例の式で使用可能になります:" -#: ../../app3.rst:140 432743f5750a4c5c908b41631cf9fb0a +#: ../../app3.rst:140 d44ca9b7519149f6a404444a778d68ff msgid "`pymupdf.Point(s)`" msgstr "" -#: ../../app3.rst:141 d4509f3c403a493696b92e8e4b693bf1 +#: ../../app3.rst:141 ee6a0b7d41b8429fbae8f23229104cf2 msgid "`pymupdf.Point(x, y) + s`" msgstr "" -#: ../../app3.rst:142 08ea77d7eeb34f6daafbd3344c96f595 +#: ../../app3.rst:142 54ccac4c6a6f44ffb1d176c095907782 msgid "`doc.select(s)`" msgstr "" -#: ../../app3.rst:144 fa734df2a0404b80ada7f45d1218245a +#: ../../app3.rst:144 dae021bd0ba3466daa809ae6c1c994c2 msgid "" "Similarly with all geometry objects :ref:`Rect`, :ref:`IRect`, " ":ref:`Matrix` and :ref:`Point`." @@ -242,7 +244,7 @@ msgstr "" "同様に、すべてのジオメトリオブジェクト :ref:`Rect` 、:ref:`IRect` 、:ref:`Matrix` 、 " ":ref:`Point` も同様です。" -#: ../../app3.rst:146 8ef0d2934ea743c2a095e62643f272d4 +#: ../../app3.rst:146 5c26e587a0964c99927a3ca8dc6f2704 msgid "" "Because all PyMuPDF geometry classes themselves are special cases of " "sequences, they (with the exception of :ref:`Quad` -- see below) can be " @@ -254,20 +256,17 @@ msgstr "" "を除く)数値のシーケンスが使用可能な場所で自由に使用できるからです。例えば、 *list()* 、 *tuple()* 、 " "*array.array()* " -#: ../../app3.rst:163 a319b1dbd1214e30b86a4bd181e9001b -msgid "" -":ref:`Quad` is a Python sequence object as well and has a length of 4. " -"Its items however are :data:`point_like` -- not numbers. Therefore, the " -"above remarks do not apply." +#: ../../app3.rst:163 1b2a7bd2869c448db2997c66e5c8ede9 +msgid ":ref:`Quad` is a Python sequence object as well and has a length of 4. Its items however are :data:`point_like` -- not numbers. Therefore, the above remarks do not apply." msgstr "" -" :ref:`Quad` もPythonのシーケンスオブジェクトであり、長さが4です。ただし、そのアイテムは数値ではなく " +":ref:`Quad` もPythonのシーケンスオブジェクトであり、長さが4です。ただし、そのアイテムは数値ではなく " ":data:`point_like` です。したがって、上記の注釈は適用されません。" -#: ../../app3.rst:170 37ec70fd8bb14175a074c0911649d3db +#: ../../app3.rst:170 94e21a5bc8ee4477a04441d5c30d724d msgid "Ensuring Consistency of Important Objects in PyMuPDF" msgstr "重要なオブジェクトの整合性を確保するためのPyMuPDF" -#: ../../app3.rst:171 66a97c6f1be448b280b3ab04327b684c +#: ../../app3.rst:171 88e6f720f7994790a9e0537ae0a79c24 msgid "" "PyMuPDF is a Python binding for the C library MuPDF. While a lot of " "effort has been invested by MuPDF's creators to approximate some sort of " @@ -275,33 +274,33 @@ msgid "" "shortcomings of the C language in that respect." msgstr "PyMuPDFは、CライブラリMuPDFのPythonバインディングです。MuPDFの開発者たちは、ある種のオブジェクト指向の振る舞いを模倣するために多くの努力をしてきましたが、C言語の基本的な制約を克服することはできませんでした。" -#: ../../app3.rst:173 990e1cff3fc24b7891ef3be031e6fb84 +#: ../../app3.rst:173 cba001279ead48629806d8dd14a397a7 msgid "" "Python on the other hand implements the OO-model in a very clean way. The" " interface code between PyMuPDF and MuPDF consists of two basic files: " -"*pymupdf.py* and *fitz_wrap.c*. They are created by the excellent SWIG tool " -"for each new version." +"*pymupdf.py* and *fitz_wrap.c*. They are created by the excellent SWIG " +"tool for each new version." msgstr "" "一方で、Pythonは非常にクリーンな方法でOOモデルを実装しています。PyMuPDFとMuPDFの間のインターフェースコードは、基本的に2つのファイルから構成されています:" " *pymupdf.py* と *fitz_wrap.c* 。これらは、新バージョンごとに優れたSWIGツールによって作成されます。" -#: ../../app3.rst:175 6d7bd080bff74db6882f2cd8657ea611 +#: ../../app3.rst:175 97bdc84ef0d442ddb2f51fed23efdce2 msgid "" "When you use one of PyMuPDF's objects or methods, this will result in " -"execution of some code in *pymupdf.py*, which in turn will call some C code " -"compiled with *fitz_wrap.c*." +"execution of some code in *pymupdf.py*, which in turn will call some C " +"code compiled with *fitz_wrap.c*." msgstr "" "PyMuPDFのオブジェクトやメソッドのいずれかを使用すると、これにより *pymupdf.py* でいくつかのコードが実行され、それがさらに " "*fitz_wrap.c* でコンパイルされたCコードを呼び出します。" -#: ../../app3.rst:177 cca361ee883c4605a003cb058f92a6ac +#: ../../app3.rst:177 4f2a76ae2d334cbaa03fad1952397145 msgid "" "Because SWIG goes a long way to keep the Python and the C level in sync, " "everything works fine, if a certain set of rules is being strictly " "followed. For example: **never access** a :ref:`Page` object, after you " -"have closed (or deleted or set to *None*) the owning :ref:`Document`. Or," -" less obvious: **never access** a page or any of its children (links or " -"annotations) after you have executed one of the document methods " +"have closed (or deleted or set to ``None``) the owning :ref:`Document`. " +"Or, less obvious: **never access** a page or any of its children (links " +"or annotations) after you have executed one of the document methods " "*select()*, *delete_page()*, *insert_page()* ... and more." msgstr "" "SWIGはPythonとCレベルを同期させるために大いに役立っているため、一定のルールが厳密に守られる限り、すべてが正常に動作します。例えば、所有している" @@ -310,14 +309,14 @@ msgstr "" "*insert_page()* などのドキュメントメソッドを実行した後にページやその子要素(リンクや注釈など)に **アクセスしないでください**" " 。" -#: ../../app3.rst:179 bcf66862b5054fe98c8708b2a55dd658 +#: ../../app3.rst:179 1ca68a43b1a54a1ca23b33b1a82350cf msgid "" "But just no longer accessing invalidated objects is actually not enough: " "They should rather be actively deleted entirely, to also free C-level " "resources (meaning allocated memory)." msgstr "ただし、無効なオブジェクトへのアクセスをやめるだけでは実際には十分ではありません。これらのオブジェクトは、Cレベルのリソース(割り当てられたメモリ)も解放するために、完全に削除されるべきです。" -#: ../../app3.rst:181 bf9ca57352984a499669bfe110314895 +#: ../../app3.rst:181 8f76f7db96944107970598e7bedd8e4e msgid "" "The reason for these rules lies in the fact that there is a hierarchical " "2-level one-to-many relationship between a document and its pages and " @@ -328,44 +327,44 @@ msgstr "" "これらのルールの理由は、ドキュメントとそのページ、およびページとそのリンク/注釈の間に階層的な2段階の1対多の関係があるためです。一貫した状況を維持するために、上記のアクションのいずれもが" " **PythonとCの両方で** 完全なリセットを引き起こさなければなりません。" -#: ../../app3.rst:183 9dbc3f9b0e3e4602a073b149323a7a4b +#: ../../app3.rst:183 1de141a55ff04b70aaaf88a5e4986383 msgid "SWIG cannot know about this and consequently does not do it." msgstr "SWIGはこれを知ることはできないため、それを実行しません。" -#: ../../app3.rst:185 6c63ed9a261c4aa69f74b6041754225a +#: ../../app3.rst:185 ae8c62aa153947348c48a7365666a43f msgid "" "The required logic has therefore been built into PyMuPDF itself in the " "following way." msgstr "必要な論理はしたがって、PyMuPDF自体に以下のように組み込まれています。" -#: ../../app3.rst:187 2ec9cd735e4e4c29aaf3c07cb59e4d54 +#: ../../app3.rst:187 e8321451c76f4ae4ba926dd0c87b7277 msgid "" "If a page \"loses\" its owning document or is being deleted itself, all " "of its currently existing annotations and links will be made unusable in " "Python, and their C-level counterparts will be deleted and deallocated." msgstr "ページが所有するドキュメントを失ったり、それ自体が削除されると、現在存在するすべての注釈とリンクはPythonで使用できなくなり、それらのCレベルの対応部分が削除されて解放されます。" -#: ../../app3.rst:189 45355fbf65294031ad4b66db204e52a7 +#: ../../app3.rst:189 96f99f420a1c4ef185b7e412c245ad07 msgid "" -"If a document is closed (or deleted or set to *None*) or if its structure" -" has changed, then similarly all currently existing pages and their " -"children will be made unusable, and corresponding C-level deletions will " -"take place. \"Structure changes\" include methods like *select()*, " +"If a document is closed (or deleted or set to ``None``) or if its " +"structure has changed, then similarly all currently existing pages and " +"their children will be made unusable, and corresponding C-level deletions" +" will take place. \"Structure changes\" include methods like *select()*, " "*delePage()*, *insert_page()*, *insert_pdf()* and so on: all of these " "will result in a cascade of object deletions." msgstr "" -"ドキュメントが閉じられたり(または削除されたり、 *None* " +"ドキュメントが閉じられたり(または削除されたり、 ``None`` " "に設定されたり)したり、構造が変更されたりすると、同様に現在存在するすべてのページとその子要素は使用できなくなり、対応するCレベルの削除が行われます。「構造の変更」とは、" " *select()* 、 *delete_page()* 、 *insert_page()* 、 *insert_pdf()* " "などのメソッドを含みます。これらのすべてはオブジェクトの削除の連鎖を引き起こします。" -#: ../../app3.rst:191 9023466cb46b4158afc75a27877a68c1 +#: ../../app3.rst:191 bcc9663628be4e6aba0eda43e8714ec4 msgid "" "The programmer will normally not realize any of this. If he, however, " "tries to access invalidated objects, exceptions will be raised." msgstr "プログラマーは通常、これらのいずれも気づかないでしょう。ただし、無効なオブジェクトにアクセスしようとすると、例外が発生します。" -#: ../../app3.rst:193 98f8c882fd9b4c1f9ce81d0252930f78 +#: ../../app3.rst:193 2bae3cd4fe2b4fbbb03c916169069d20 msgid "" "Invalidated objects cannot be directly deleted as with Python statements " "like *del page* or *page = None*, etc. Instead, their *__del__* method " @@ -374,7 +373,7 @@ msgstr "" "無効なオブジェクトは、 *del page* または *page = None* " "などのPythonステートメントで直接削除することはできません。代わりに、その *__del__* メソッドを呼び出す必要があります。" -#: ../../app3.rst:195 91f38349448d43be8eb7f60d67431137 +#: ../../app3.rst:195 ce99d9952b6246ab8d51aed6697384d0 msgid "" "All pages, links and annotations have the property *parent*, which points" " to the owning object. This is the property that can be checked on the " @@ -386,15 +385,15 @@ msgstr "" "プロパティがあります。これはアプリケーションレベルでチェックできるプロパティです: *obj.parent == None* " "ならば、そのオブジェクトの親は存在せず、そのプロパティやメソッドへの参照は例外を発生させてこの「孤立」した状態について通知します。" -#: ../../app3.rst:197 f1d39fc739344260850746758dc2a379 +#: ../../app3.rst:197 85bda416e78f4e74ab6528e5a1a5049f msgid "A sample session:" msgstr "サンプルセッション:" -#: ../../app3.rst:214 ea1644a348c94dbe964adc41665ea342 +#: ../../app3.rst:214 17bb59c9cda1416c9b5d94fa4c8a6e85 msgid "This shows the cascading effect:" msgstr "これは連鎖効果を示しています。" -#: ../../app3.rst:231 6c0786b9c40b4dfdb772bfa0721b0b46 +#: ../../app3.rst:231 2bcef2f15dab4059900aa81e56f44ec8 msgid "" "Objects outside the above relationship are not included in this " "mechanism. If you e.g. created a table of contents by *toc = " @@ -406,50 +405,50 @@ msgstr "" "のように目次を作成し、後で文書を閉じたり変更したりする場合、これは変数 toc " "をどのようにも変更しません。必要に応じてそのような変数を更新する責任はあなたにあります。" -#: ../../app3.rst:238 bca8d968d8804f23ba4a43b8275992cc +#: ../../app3.rst:238 14e8b8a4d4a542eb81903ececa2ef219 msgid "Design of Method :meth:`Page.show_pdf_page`" msgstr "メソッド :meth:`Page.show_pdf_page` の設計" -#: ../../app3.rst:241 736c3d289bb442d3a3a3a29d91ecdad5 +#: ../../app3.rst:241 5e29628b2cf546ffaea96853a2799ead msgid "Purpose and Capabilities" msgstr "目的と機能" -#: ../../app3.rst:243 1b90e21daa8a4a88985a20de7d442ac3 +#: ../../app3.rst:243 1f05906717f343c4a5b20953e30cd42d msgid "" "The method displays an image of a (\"source\") page of another PDF " "document within a specified rectangle of the current (\"containing\", " "\"target\") page." msgstr "このメソッドは、現在の(「含まれる」、「ターゲット」)ページの指定された矩形内に別のPDF文書の(「ソース」)ページの画像を表示します。" -#: ../../app3.rst:245 e93219fbe22040cf92f967b8639d27a7 +#: ../../app3.rst:245 610835e36fb248bb9aaec3c84f56d479 msgid "" "**In contrast** to :meth:`Page.insert_image`, this display is vector-" "based and hence remains accurate across zooming levels." msgstr ":meth:`Page.insert_image` **とは異なり** 、この表示はベクターベースであり、ズームレベルを超えて正確に保たれます。" -#: ../../app3.rst:246 7dbad4005f2a44119312e06189c520c8 +#: ../../app3.rst:246 d9f42a6ad2df465282bc7f547af785a1 msgid "" "**Just like** :meth:`Page.insert_image`, the size of the display is " "adjusted to the given rectangle." msgstr ":meth:`Page.insert_image` **と同様に** 、表示のサイズは指定された矩形に調整されます。" -#: ../../app3.rst:248 e5434d7d24644bc2aece2a337f956106 +#: ../../app3.rst:248 c04d0bb6dc87492d861387305afd04a9 msgid "The following variations of the display are currently supported:" msgstr "現在、次のバリエーションの表示がサポートされています:" -#: ../../app3.rst:250 e253cf2198094705bcdb4bcf248d9ad4 +#: ../../app3.rst:250 7793c6362929447eb6d633a4972e90cf msgid "" "Bool parameter `\"keep_proportion\"` controls whether to maintain the " "aspect ratio (default) or not." msgstr "Bool パラメーター `\"keep_proportion\"` はアスペクト比を保持するかどうかを制御します(デフォルト)。" -#: ../../app3.rst:251 915b1b0f41e8443196deeb0bb2edd3d1 +#: ../../app3.rst:251 f04a25c8fef448039df5ba3f241c77ad msgid "" "Rectangle parameter `\"clip\"` restricts the visible part of the source " "page rectangle. Default is the full page." msgstr "矩形パラメーター `\"clip\"` はソースページの矩形の可視部分を制限します。デフォルトはフルページです。" -#: ../../app3.rst:252 e4bd962d62544813ae652b30a0b9c2cb +#: ../../app3.rst:252 bd5c3926320048e0b41f2646d25bd84f msgid "" "float `\"rotation\"` rotates the display by an arbitrary angle (degrees)." " If the angle is not an integer multiple of 90, only 2 of the 4 corners " @@ -460,7 +459,7 @@ msgstr "" "は表示を任意の角度(度)で回転させます。角度が90の倍数でない場合、`\"keep_proportion\"` も true " "の場合、ターゲットの境界に4つのうち2つのコーナーのみが配置される場合があります。" -#: ../../app3.rst:253 965b791f2fae47f6b3d50d4ff1f93f6a +#: ../../app3.rst:253 bc7eb9db1e2a4bbd909ab1c051a53490 msgid "" "Bool parameter `\"overlay\"` controls whether to put the image on top " "(foreground, default) of current page content or not (background)." @@ -468,23 +467,23 @@ msgstr "" "Bool パラメーター `\"overlay\"` " "は、画像を現在のページコンテンツの上(前景、デフォルト)に配置するか、そうでないか(背景)を制御します。" -#: ../../app3.rst:255 711d9d28ee7f4b80ae7f4a73f66c8b07 +#: ../../app3.rst:255 ed8c5c5838af4734971f7bcbc99ece4b msgid "Use cases include (but are not limited to) the following:" msgstr "使用例は以下のようなものがありますが、これに限定されません:" -#: ../../app3.rst:257 1727865d3e03434e9bd1bc22840a8ebc +#: ../../app3.rst:257 f4e19bbd27d64e8daed6a71bd1586047 msgid "" "\"Stamp\" a series of pages of the current document with the same image, " "like a company logo or a watermark." msgstr "現在の文書の複数のページに同じ画像(企業のロゴや透かし)を「スタンプ」する。" -#: ../../app3.rst:258 c360fac27b16475d86a1acd3e96bd711 +#: ../../app3.rst:258 f14819856e0a47a8828aff5410df1a9e msgid "" "Combine arbitrary input pages into one output page to support “booklet” " "or double-sided printing (known as \"4-up\", \"n-up\")." msgstr "任意の入力ページを1つの出力ページに組み合わせ、\"ブックレット\"や両面印刷をサポートする(「4-up」、「n-up」としても知られています)。" -#: ../../app3.rst:259 b279a01e7e11499299cf0eda9f1cd9b0 +#: ../../app3.rst:259 e3c34f8c6c5c4f4a80b1d05f8d857c73 msgid "" "Split up (large) input pages into several arbitrary pieces. This is also " "called “posterization”, because you e.g. can split an A4 page " @@ -492,11 +491,11 @@ msgid "" "pages, and end up with an A2 version of your original page." msgstr "(大きな)入力ページをいくつかの任意のピースに分割する。これは「ポスタリゼーション」とも呼ばれ、たとえばA4ページを水平および垂直に分割し、4つのピースを別々のA4ページに拡大印刷して、元のページのA2バージョンを作成することができます。" -#: ../../app3.rst:262 7e4b08a1b621415289164edb4f28ba3e +#: ../../app3.rst:262 758ca9db46c44e75be2fb1cf2c44ea91 msgid "Technical Implementation" msgstr "テクニカル実装" -#: ../../app3.rst:264 0b4aaf50285f4efdb8c70ba35b2d0dbf +#: ../../app3.rst:264 ecec59169e68440ea430229d4b285d11 msgid "" "This is done using PDF **\"Form XObjects\"**, see section 8.10 on page " "217 of :ref:`AdobeManual`. On execution of a :meth:`Page.show_pdf_page`, " @@ -506,7 +505,7 @@ msgstr "" "の217ページ、セクション8.10を参照してください。 :meth:`Page.show_pdf_page` " "が実行されると、次のことが起こります。" -#: ../../app3.rst:266 5a4b19b60219419fbb37f77bf4cffa0d +#: ../../app3.rst:266 4cf6aa869dc647639227684417fea492 msgid "" "The :data:`resources` and :data:`contents` objects of source page in " "source document are copied over to the target document, jointly creating " @@ -517,15 +516,15 @@ msgstr "" "オブジェクトは、ターゲットドキュメントにコピーされ、共同で新しい **フォームXObject** が作成されます。このオブジェクトのPDF " ":data:`xref` 番号がメソッドによって返されます。" -#: ../../app3.rst:268 e67c5898516146229ff11def4d12484c +#: ../../app3.rst:268 6a4e90e689f34c1b9227d77cc202848e msgid "`/BBox` equals `/Mediabox` of the source page" msgstr "`/BBox` はソースページの `/Mediabox` に等しいです。" -#: ../../app3.rst:269 f29e8a3c44414c5ea055df23f4de5a89 +#: ../../app3.rst:269 a10cd43bfe234839887ebf03e6f9f60d msgid "`/Matrix` equals the identity matrix." msgstr "`/Matrix` は単位行列と等しいです。" -#: ../../app3.rst:270 3deeb660b0fe40e9b8bdfeaaedd1b03b +#: ../../app3.rst:270 14c5d12da8294828b0c1ce38065dbce8 msgid "" "`/Resources` equals that of the source page. This involves a “deep-copy” " "of hierarchically nested other objects (including fonts, images, etc.). " @@ -535,7 +534,7 @@ msgstr "" "`/Resources` " "はソースページのものに等しいです。これには、階層的にネストされた他のオブジェクト(フォント、画像など)の「ディープコピー」が含まれます。ここでの複雑さは、MuPDFのグラフティング[1]技術関数によってカバーされています。" -#: ../../app3.rst:271 1d37d5c93e434236a1a917fecd5f4c54 +#: ../../app3.rst:271 aeef902e98f74b2c934243459b384b22 msgid "" "This is a stream object type, and its stream is an exact copy of the " "combined data of the source page's :data:`contents` objects." @@ -543,14 +542,14 @@ msgstr "" "これはストリームオブジェクトタイプであり、そのストリームはソースページの :data:`contents` " "オブジェクトの結合データの正確なコピーです。" -#: ../../app3.rst:273 74434661a152490ba5007d34fcb8f0fb +#: ../../app3.rst:273 9221ae2797b044898b9ccc33853b1d18 msgid "" "This Form XObject is only executed once per shown source page. Subsequent" " displays of the same source page will skip this step and only create " "\"pointer\" Form XObjects (done in next step) to this object." msgstr "このフォームXObjectは、表示されるソースページごとに1回だけ実行されます。同じソースページの後続の表示では、このステップはスキップされ、このオブジェクトへの「ポインター」フォームXObject(次のステップで行われる)のみが作成されます。" -#: ../../app3.rst:275 f54000df805b477eb35e0e040b5304e0 +#: ../../app3.rst:275 226210faaf584ae1824537a7c5a2a6b2 msgid "" "A second **Form XObject** is then created which the target page uses to " "invoke the display. This object has the following properties:" @@ -558,39 +557,39 @@ msgstr "" "次に、ターゲットページが表示を呼び出すために使用する2番目の **フォームXObject** " "が作成されます。このオブジェクトには次のような特性があります。" -#: ../../app3.rst:277 3113abc49f66468985adbd2d5ebc80cb +#: ../../app3.rst:277 41fc749a67944e429e2d3bb946515aec msgid "`/BBox` equals the `/CropBox` of the source page (or `\"clip\"`)." msgstr "`/BBox` はソースページの `/CropBox`(または `\"クリップ\"` )に等しいです。" -#: ../../app3.rst:278 b7f8422d55eb40aab5eea6bdf0457e22 +#: ../../app3.rst:278 eec5f4bf421146d6a8a42621e6e510ac msgid "`/Matrix` represents the mapping of `/BBox` to the target rectangle." msgstr "`/Matrix` は `/BBox` からターゲット矩形へのマッピングを表します。" -#: ../../app3.rst:279 32cc80d98c2142219e398b63eaa77ddf +#: ../../app3.rst:279 d62e8a586ddf4f09af38ebddd1230061 msgid "" "`/XObject` references the previous Form XObject via the fixed name " "`fullpage`." msgstr "`/XObject` は、以前のフォームXObjectを固定された名前 `fullpage` を介して参照します。" -#: ../../app3.rst:280 63d1dfb782bd4342a4cd0247f7635da3 +#: ../../app3.rst:280 7d246f2a490343a3ab683bc628df56b9 msgid "" "The stream of this object contains exactly one fixed statement: " "`/fullpage Do`." msgstr "このオブジェクトのストリームには、正確に1つの固定されたステートメントが含まれています: `/fullpage Do` 。" -#: ../../app3.rst:281 c36f33e353684387a9fa9ad0e56252ab +#: ../../app3.rst:281 1ccfb2d1358b478492c3700a4538218e msgid "" "If the method's `\"oc\"` argument is given, its value is assigned to this" " Form XObject as `/OC`." msgstr "メソッドの `「oc」` 引数が指定された場合、その値はこのフォームXObjectに `/OC` として割り当てられます。" -#: ../../app3.rst:283 3ddba227701e49a789a43f4618944159 +#: ../../app3.rst:283 7bf4dc3eb07941deb6a5193e0a042d23 msgid "" "The :data:`resources` and :data:`contents` objects of the target page are" " now modified as follows." msgstr "ターゲットページの :data:`リソース` と :data:`コンテンツ` オブジェクトは以下のように変更されます。" -#: ../../app3.rst:285 3134f946c5994e70b0f095f11eca3593 +#: ../../app3.rst:285 aad7990a3a3d45639b13246d835a0c65 msgid "" "Add an entry to the `/XObject` dictionary of `/Resources` with the name " "`fzFrm` (with n chosen such that this entry is unique on the page)." @@ -598,7 +597,7 @@ msgstr "" "`/Resources` の `/XObject` 辞書に、 ` fzFrm ` " "という名前のエントリをページ内で一意であるように追加します(nはこのエントリがページで一意であるように選択されます)。" -#: ../../app3.rst:286 9344860bc82545cb87cda37a3cb1ec56 +#: ../../app3.rst:286 b82b302f499f410b9e350f36bbfdda59 msgid "" "Depending on `\"overlay\"`, prepend or append a new object to the page's " "`/Contents` array, containing the statement `q /fzFrm Do Q`." @@ -606,50 +605,105 @@ msgstr "" "`\"overlay\"` に応じて、ページの `/ Contents` 配列に新しいオブジェクトを前または後に追加し、ステートメント `q / " "fzFrm Do Q` を含めます。" -#: ../../app3.rst:288 45e7e527306041ad89d801f693134014 +#: ../../app3.rst:288 b071c7d341434d26bdeed45392697a34 msgid "This design approach ensures that:" msgstr "この設計アプローチは次を保証します:" -#: ../../app3.rst:290 6bff180bc3ed4995b4d5845f6f6a7e6c +#: ../../app3.rst:290 63f00a3e1dd04f6781934140e874c7a7 msgid "" "The (potentially large) source page is only copied once to the target " "PDF. Only small \"pointer\" Form XObjects objects are created per each " "target page to show the source page." msgstr "(潜在的に大きな)ソースページは、ターゲットPDFに1度だけコピーされます。各ターゲットページごとに、ソースページを表示するための小さな「ポインター」フォームXObjectオブジェクトが作成されます。" -#: ../../app3.rst:291 806c5d8e1c3c48e6addbfcb4921da8c3 +#: ../../app3.rst:291 b41e1ced86c94cf8a082e74176de111f msgid "" "Each referring target page can have its own `\"oc\"` parameter to control" " the source page's visibility individually." msgstr "参照する各ターゲットページは、ソースページの表示を個別に制御するための独自の `「oc」` パラメータを持つことができます。" -#: ../../app3.rst:298 c142bd595edb4943951b81896593b49f -msgid "Redirecting Error and Warning Messages" -msgstr "エラーと警告メッセージのリダイレクト" +#: ../../app3.rst:298 76a4f77bd1e14da79d353bd8260eed70 +msgid "Diagnostics" +msgstr "" + +#: ../../app3.rst:303 6fc791083a8748a1859e411cc8953c59 +msgid "|PyMuPDF| messages" +msgstr "" -#: ../../app3.rst:299 56df6e20331b48efa644d5070f5eb423 +#: ../../app3.rst:305 c601036e9eab4c8ebbeef49f120f5f4c +msgid "|PyMuPDF| has a Message system for showing text diagnostics." +msgstr "" + +#: ../../app3.rst:307 8b50daec304d440da53e24b598f0bf34 msgid "" -"Since MuPDF version 1.16 error and warning messages can be redirected via" -" an official plugin." -msgstr "MuPDFバージョン1.16以降、エラーと警告メッセージは公式プラグインを介してリダイレクトできます。" +"By default messages are written to `sys.stdout`. This can be controlled " +"in two ways:" +msgstr "" + +#: ../../app3.rst:311 0254e3834f4642e18301ef987f609bae +msgid "Set environment variable `PYMUPDF_MESSAGE` before |PyMuPDF| is imported." +msgstr "" -#: ../../app3.rst:301 4ef380e457c34e269447fef409bf1e73 +#: ../../app3.rst:314 70440a09782b4278ba14d7c690dd6b5e +msgid "Call `set_messages()`:" +msgstr "" + +#: ../../app3.rst:318 5a458f1861c547ccb584f969867943b7 +msgid "MuPDF errors and warnings" +msgstr "" + +#: ../../app3.rst:320 c1737a8bacca4f438f61217eaacc4fe9 +msgid "MuPDF generates text errors and warnings." +msgstr "" + +#: ../../app3.rst:323 13acc645814b4b3c886c1b149f0d8f16 msgid "" -"PyMuPDF will put error messages to `sys.stderr` prefixed with the string " -"\"mupdf:\". Warnings are internally stored and can be accessed via " -"*pymupdf.TOOLS.mupdf_warnings()*. There also is a function to empty this " -"store." +"These errors and warnings are appended to an internal list, accessible " +"with `Tools.mupdf_warnings()`. Also see `Tools.reset_mupdf_warnings()`." msgstr "" -"PyMuPDFはエラーメッセージを、先頭に文字列「mupdf:」を付けて `sys.stderr` " -"に表示します。警告は内部で保存され、*pymupdf.TOOLS.mupdf_warnings()* " -"を通じてアクセスできます。また、この保存領域を空にするための関数も存在します。" -#: ../../app3.rst:308 32225e3faefa444b8273d0478a9d4b06 -#, fuzzy +#: ../../app3.rst:327 492bd13e7c93436488a4721a9822f908 +msgid "" +"By default these errors and warnings are also sent to the |PyMuPDF| " +"message system." +msgstr "" + +#: ../../app3.rst:330 a61e2baba2164b7f92e239307e36c6aa +msgid "" +"This can be controlled with `mupdf_display_errors()` and " +"`mupdf_display_warnings()`." +msgstr "" + +#: ../../app3.rst:334 e6ff12f897e24b62989474208bea60a4 +msgid "" +"These messages are prefixed with `MuPDF error:` and `MuPDF warning:` " +"respectively." +msgstr "" + +#: ../../app3.rst:337 8d7c2c04a7ca425c8569ca5c0aabdba3 +msgid "Some MuPDF errors may lead to Python exceptions." +msgstr "" + +#: ../../app3.rst:339 5a00219693a446a4963089abe7ad80bd +msgid "" +"Example output for a **recoverable error**. We are opening a damaged PDF," +" but MuPDF is able to repair it and gives us a little information on what" +" happened. Then we illustrate how to find out whether the document can " +"later be saved incrementally. Checking the :attr:`Document.is_dirty` " +"attribute at this point also indicates that during `pymupdf.open` the " +"document had to be repaired:" +msgstr "" + +#: ../../app3.rst:360 c64e229b9b34446f899be35325d09c35 +msgid "Example output for an **unrecoverable error**:" +msgstr "" + +#: ../../app3.rst:378 77eea1b26e664197b0bb4bcaf68a0f7b + msgid "Coordinates" msgstr "脚注" -#: ../../app3.rst:311 606d646c9795454d96a11757dcce554a +#: ../../app3.rst:381 dc043632f05e4719bd2eaddd7df7acaf msgid "" "This is one of the most frequently used terms in this documentation. A " "**coordinate** generally means a pair of numbers `(x, y)` referring to " @@ -658,7 +712,7 @@ msgid "" "like images which only allow them to be integers." msgstr "" -#: ../../app3.rst:313 1c3770258db14e3d90bb11dbf2393372 +#: ../../app3.rst:383 56f1c800efe94faca41120039a3bdcf6 msgid "" "To actually *find* a coordinate's location, we also need to know the " "*reference* point for ``x`` and ``y`` - in other words, we must know " @@ -666,7 +720,7 @@ msgid "" "known, we speak of a \"coordinate system\"." msgstr "" -#: ../../app3.rst:315 732b40e6ed5c43b5a73a30e2181be303 +#: ../../app3.rst:385 680606534deb4bbeb64f63e5e7974fde msgid "" "Several coordinate systems exist in document processing. For instance, " "the coordinate systems of a PDF page and the image created from it are " @@ -680,11 +734,11 @@ msgid "" "reverted by dividing the result by 3 (or multiplying it with 1/3)." msgstr "" -#: ../../app3.rst:318 b5439be75ade4dd283e2fb5b91f28c95 +#: ../../app3.rst:388 70a2643cf5834d0f8bd9a519bb39e5c8 msgid "Coordinates and Images" msgstr "" -#: ../../app3.rst:320 5c28f03ed4984180a4da260f212f45e9 +#: ../../app3.rst:390 d674cd731bb3481a93ffb0323a2cd62b msgid "" "Images have a coordinate system with integer coordinates. Origin `(0, 0)`" " is the top-left point. ``x`` values must be in `range(width)`, and ``y``" @@ -694,7 +748,7 @@ msgid "" "called a \"pixel\"." msgstr "" -#: ../../app3.rst:322 588a15a78c0940b19f7471463e45f2ba +#: ../../app3.rst:392 57ae46c4d2954c38903fba3ab34553f7 msgid "" "How **large** an image will be (in centimeters or inches) when e.g. " "printed, depends on additional information: the \"resolution\". This is " @@ -704,71 +758,71 @@ msgid "" " and for height) and will get the respective number of inches." msgstr "" -#: ../../app3.rst:326 6f634030f1ac483b927a57a01d4e6f86 +#: ../../app3.rst:396 5e0511df1f0a483c8fe7410639ec7301 msgid "Origin Point, Point Size and Y-Axis" msgstr "" -#: ../../app3.rst:328 a9e91d5d77994064a013f1a5c5f281cb +#: ../../app3.rst:398 2594cf765c404df0baaeb3e9e5522bd2 msgid "" -"In **PDF**, the origin `(0, 0)` of a page is located at its **bottom-left" -" point**. In **MuPDF**, the origin `(0, 0)` of a page is located at its " +"In |PDF|, the origin `(0, 0)` of a page is located at its **bottom-left " +"point**. In |MuPDF|, the origin `(0, 0)` of a page is located at its " "**top-left point**." msgstr "" -#: ../../app3.rst:333 92405d6a89c24a48b3dbbdc9495ef0a9 +#: ../../app3.rst:403 88d467234422454ea94c59e3bd6b8b84 msgid "Coordinates are float numbers and measured in **points**, where:" msgstr "" -#: ../../app3.rst:335 388352fbb8484b36a13631a7b236229d +#: ../../app3.rst:405 3900c8d8ab694352a7d5ba3d88cc7cf6 msgid "**one point equals 1/72 inches**." msgstr "" -#: ../../app3.rst:337 88b6eacf4ac24014a9ccb78bd06e250b +#: ../../app3.rst:407 5887ebc05faa46d582e5cd548d983d0c msgid "" "Typical document page sizes are **ISO A4** and **Letter**. A **Letter** " "page has a size of **8.5 x 11 inches**, corresponding to **612 x 792 " -"points**. In the **PDF** coordinate system, the top-left point of a " +"points**. In the |PDF| coordinate system, the top-left point of a " "**Letter** page hence has the coordinate `(0, 792)` as **the y-axis " -"points upwards**. Now we know our document size the **MuPDF** coordinate " +"points upwards**. Now we know our document size the |MuPDF| coordinate " "system for the bottom right would be coordinate `(612, 792)` (and for " -"**PDF** this coordinate would then be `(612,0)`)." +"|PDF| this coordinate would then be `(612,0)`)." msgstr "" -#: ../../app3.rst:339 681786d37c9c4b979f9dbabaa1ee27b6 +#: ../../app3.rst:409 5d8680c9d78d4c46bbabf6025dbcd498 msgid "" "Theoretically, there are **infinitely many** coordinate positions on a " -"**PDF** page. In practice however, at most the first 5 decimal places are" -" sufficient for a reasonable precision." +"|PDF| page. In practice however, at most the first 5 decimal places are " +"sufficient for a reasonable precision." msgstr "" -#: ../../app3.rst:342 035cc1ebe8414b0a825095ad85d803ab +#: ../../app3.rst:412 6976bdd2380c4367b9f3f0a94c4e1a2b msgid "" -"In **MuPDF**, multiple document formats are supported - **PDF** just " -"being one among **over a dozen others**. Images are also supported as " -"documents in **MuPDF** (therefore having one page usually). This is one " -"of the reasons why **MuPDF** uses a coordinate system with the origin " -"`(0, 0)` being the **top-left** point of any document page. **The y-axis " -"points downwards**, like with images. Coordinates in **MuPDF** in any " -"case are floats, like in **PDF**." +"In |MuPDF|, multiple document formats are supported - |PDF| just being " +"one among **over a dozen others**. Images are also supported as documents" +" in |MuPDF| (therefore having one page usually). This is one of the " +"reasons why |MuPDF| uses a coordinate system with the origin `(0, 0)` " +"being the **top-left** point of any document page. **The y-axis points " +"downwards**, like with images. Coordinates in |MuPDF| in any case are " +"floats, like in |PDF|." msgstr "" -#: ../../app3.rst:344 cb7651396e85454e93793fd64ceed6d0 +#: ../../app3.rst:414 cb098c0514b6405b819a098b185365a8 msgid "" -"A rectangle `Rect(0, 0, 100, 100)` for instance in **MuPDF** (and thus " -"**PyMuPDF**) therefore is a square with edges of length 100 points (= " -"1.39 inches or 3.53 centimeters). Its top-left corner is the origin. To " -"switch between the two coordinate systems **PDF** to **MuPDF**, every " -":ref:`Page` object has a :attr:`Page.transformation_matrix`. Its inverse " -"can be used to compute a rectangle's PDF coordinates. In this way we can " -"conveniently find that `Rect(0, 0, 100, 100)` in **MuPDF** is the same as" -" `Rect(0, 692, 100, 792)` in **PDF**. See this code snippet::" +"A rectangle `Rect(0, 0, 100, 100)` for instance in |MuPDF| (and thus " +"|PyMuPDF|) therefore is a square with edges of length 100 points (= 1.39 " +"inches or 3.53 centimeters). Its top-left corner is the origin. To switch" +" between the two coordinate systems |PDF| to |MuPDF|, every :ref:`Page` " +"object has a :attr:`Page.transformation_matrix`. Its inverse can be used " +"to compute a rectangle's PDF coordinates. In this way we can conveniently" +" find that `Rect(0, 0, 100, 100)` in |MuPDF| is the same as `Rect(0, 692," +" 100, 792)` in |PDF|. See this code snippet::" msgstr "" -#: ../../app3.rst:355 16f6a104e25d4e4ab18569c129ad0a9f +#: ../../app3.rst:425 ce9f7604adb041b5a42884b1fbcf2458 msgid "Footnotes" msgstr "脚注" -#: ../../app3.rst:356 58412525d2534e16a3c71ee299768dab +#: ../../app3.rst:426 6710c6c4a0cb4c8f95a2db0a2d0154a1 msgid "" "MuPDF supports \"deep-copying\" objects between PDF documents. To avoid " "duplicate data in the target, it uses so-called \"graftmaps\", like a " @@ -788,14 +842,14 @@ msgstr "" ":meth:`Page.show_pdf_page` " "の2つの場所でこの技術を使用しています。このプロセスは高速で非常に効率的です。なぜなら、通常大きなデータや頻繁に参照されるデータ(画像やフォントなど)の複数のコピーを防ぐためです。ただし、次のいずれかの場合にはガベージコレクション(オプション4)の使用を検討することをお勧めします:" -#: ../../app3.rst:358 924dfe5104d3485284ebb94c5d94bc64 +#: ../../app3.rst:428 461400f147fb42298ea228749fce0741 msgid "" "The target PDF is not new / empty: grafting does not check for resources " "that already existed (e.g. images, fonts) in the target document before " "opening it." msgstr "対象のPDFが新しい/空でない場合:グラフティングは、対象ドキュメント内で既に存在しているリソース(例:画像、フォント)をチェックしません。" -#: ../../app3.rst:359 112c7f0e784641ecb38a494ee36eb0be +#: ../../app3.rst:429 180ae4a257254392a4e34e44abe0f57c msgid "" "Using :meth:`Page.show_pdf_page` for more than one source document: each " "grafting occurs **within one source** PDF only, not across multiple. So " @@ -805,17 +859,37 @@ msgstr "" "複数のソースドキュメントで :meth:`Page.show_pdf_page` を使用する場合:グラフティングは **1つのソース** " "PDF内でのみ発生し、複数のソースPDF間では発生しません。したがって、同じ画像が異なるソースPDFのページに存在する場合、これはガベージコレクションまで検出されません" -#: ../../footer.rst:71 c0d5a18e995b4a71a01e72f68ce220f0 +#: ../../footer.rst:60 2489ee1d71db47c19985990e4efb9382 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 7f733b84e86942a59217269cb8a12889 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Redirecting Error and Warning Messages" +#~ msgstr "エラーと警告メッセージのリダイレクト" + +#~ msgid "" +#~ "Since MuPDF version 1.16 error and " +#~ "warning messages can be redirected via" +#~ " an official plugin." +#~ msgstr "MuPDFバージョン1.16以降、エラーと警告メッセージは公式プラグインを介してリダイレクトできます。" + +#~ msgid "" +#~ "PyMuPDF will put error messages to " +#~ "`sys.stderr` prefixed with the string " +#~ "\"mupdf:\". Warnings are internally stored " +#~ "and can be accessed via " +#~ "*pymupdf.TOOLS.mupdf_warnings()*. There also is " +#~ "a function to empty this store." +#~ msgstr "" +#~ "PyMuPDFはエラーメッセージを、先頭に文字列「mupdf:」を付けて `sys.stderr` " +#~ "に表示します。警告は内部で保存され、*pymupdf.TOOLS.mupdf_warnings()* " +#~ "を通じてアクセスできます。また、この保存領域を空にするための関数も存在します。" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/app4.mo b/docs/locales/ja/LC_MESSAGES/app4.mo index bad62393a..f77060e73 100644 Binary files a/docs/locales/ja/LC_MESSAGES/app4.mo and b/docs/locales/ja/LC_MESSAGES/app4.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/app4.po b/docs/locales/ja/LC_MESSAGES/app4.po index d447f7878..fefc37692 100644 --- a/docs/locales/ja/LC_MESSAGES/app4.po +++ b/docs/locales/ja/LC_MESSAGES/app4.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,37 +19,37 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 df28c93a74fb42b4b181401ac77d0269 +#: ../../header.rst:-1 b65281ab54ae48fe8a1bcd0250c11271 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 faa63fa41fca41b0bfcae2046e7b6acb +#: ../../header.rst:-1 d0836161a9da4e78816c23129af0bc7c msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 782ae303f5e14fefbcac2a69cf33ae43 +#: ../../header.rst:-1 eafd58bedac04f25b65821d0bfc7ddc2 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../app4.rst:14 861eeb887a6e40c490410d27f35c3db2 +#: ../../app4.rst:14 e875c5ebdbc3422d99a76e5b307d8488 msgid "Appendix 4: Performance Comparison Methodology" msgstr "付録4:性能比較方法" -#: ../../app4.rst:16 fce60e0d67be46c58c31bc6a5867a00b +#: ../../app4.rst:16 0f8302b49495485b86460818f44f4dc7 msgid "" "This article documents the approach to measure :title:`PyMuPDF's` " "performance and the tools and example files used to do comparisons." msgstr "この記事では、|PyMuPDF| の性能を測定するアプローチと、比較を行うために使用されるツールとサンプルファイルについて説明します。" -#: ../../app4.rst:18 42d1f1d047914ef38cc58862913f890e +#: ../../app4.rst:18 6c84be39d4424fd4babfb03d8db54dd3 msgid "The following three sections deal with different performance aspects:" msgstr "以下の3つのセクションでは、異なる性能の側面に取り組んでいます:" -#: ../../app4.rst:20 64007716ded34c158c37b3a0cd654ab9 +#: ../../app4.rst:20 e000313e5c5c42028877968fe5acc812 msgid "" ":ref:`Document Copying` - This includes opening and parsing" " :title:`PDFs`, then writing them to an output file. Because the same " @@ -60,7 +60,7 @@ msgstr "" "ファイルの開閉と解析、そしてそれらを出力ファイルに書き込む作業が含まれます。同じ基本的なアクティビティは、|PDF| " "ファイルの結合(マージ)にも使用されるため、結果はこれらのユースケースにも適用されます。" -#: ../../app4.rst:21 1a7f5ad501254fd7a107af66c268bf1d +#: ../../app4.rst:21 7ad2ccb2be0e437abb94eb2fcc7abed3 msgid "" ":ref:`Text Extraction` - This extracts plain text " "from :title:`PDFs` and writes it to an output text file." @@ -68,34 +68,33 @@ msgstr "" ":ref:`テキスト抽出` - これにより |PDF| " "ファイルから平文テキストが抽出され、テキストファイルに書き込まれます。" -#: ../../app4.rst:22 e98d3027103e4d78a44f61d827c3f7ad +#: ../../app4.rst:22 174dc9345ebd4759a0a7ad41fd107693 msgid "" -":ref:`Page Rendering` - This converts |PDF| " -"pages to image files looking identical to the pages. This ability is the " -"basic prerequisite for using a tool in :title:`Python GUI` scripts to " -"scroll through documents. We have chosen a medium-quality (resolution 150" -" DPI) version." +":ref:`Page Rendering` - This converts |PDF| pages to" +" image files looking identical to the pages. This ability is the basic " +"prerequisite for using a tool in :title:`Python GUI` scripts to scroll " +"through documents. We have chosen a medium-quality (resolution 150 DPI) " +"version." msgstr "" ":ref:`ページレンダリング` - " "これによりPDFページがページと同じような見た目の画像ファイルに変換されます。この機能は、:title:`Python GUI` " "スクリプトでドキュメントをスクロールするための基本的な前提条件です。中画質版(解像度150 DPI)を選択しました。" -#: ../../app4.rst:24 78870da8c87d47ac8169606f5a870a4e +#: ../../app4.rst:24 f509ac94d6d440c4bcd83cf9d7f17a91 msgid "" -"Please note that in all cases the actual speed in dealing with " -"|PDF| structures is not directly measured: instead, the timings " -"also include the durations of writing files to the operating system's " -"file system. This cannot be avoided because tools other than " -"|PyMuPDF| do not offer the option to e.g., separate the image " -"**creation** step from the following step, which **writes** the image " -"into a file." +"Please note that in all cases the actual speed in dealing with |PDF| " +"structures is not directly measured: instead, the timings also include " +"the durations of writing files to the operating system's file system. " +"This cannot be avoided because tools other than |PyMuPDF| do not offer " +"the option to e.g., separate the image **creation** step from the " +"following step, which **writes** the image into a file." msgstr "" "|PDF| " "構造の処理速度そのものを直接測定するのではなく、すべての場合において、タイミングにはファイルをオペレーティングシステムのファイルシステムに書き込む時間も含まれることに注意してください。これは回避できない要因です。なぜなら、|PyMuPDF|" " 以外のツールでは、例えばイメージの **作成** ステップと、イメージをファイルに **書き込む** " "後続のステップを分離するオプションが提供されていないためです。" -#: ../../app4.rst:26 575a13a627f840a088cdefda26e1c4e3 +#: ../../app4.rst:26 3e62d5606ac74cd4a8f0ed624824cf23 msgid "" "So all timings documented include a common, OS-oriented base effort. " "Therefore, performance **differences per tool are actually larger** than " @@ -104,345 +103,345 @@ msgstr "" "したがって、すべての記録されたタイミングには共通のOS指向の基本的な努力が含まれています。したがって、**ツールごとの性能の違いは、数字が示す以上に実際には大きいです**" " 。" -#: ../../app4.rst:33 e313cf9c13c94d7bba7c417292072eda +#: ../../app4.rst:33 16b81a9d40ac477cb3545a8d137dc0c6 msgid "Files used" msgstr "使用されるファイル" -#: ../../app4.rst:35 f0e732d5ac72498b809d96056a917055 +#: ../../app4.rst:35 575ba43a14f4487a82561a8b1ff49e3b msgid "" "A set of eight files is used for the performance testing. With each file " "we have the following information:" msgstr "性能テストには、8つのファイルセットが使用されます。各ファイルには、次の情報があります:" -#: ../../app4.rst:37 bde1b157fc5f44d6ab3086e92150c945 +#: ../../app4.rst:37 025950c5125d45a2904b55403d4c42db msgid "**Name** of the file and download **link**." msgstr "ファイル **名** とダウンロード **リンク**。" -#: ../../app4.rst:38 f985331d3ce64a109a686d93bcc3dbee +#: ../../app4.rst:38 28053451a91c46ecb551604c6f0bb5ed msgid "**Size** in bytes." msgstr "バイト単位の **サイズ**。" -#: ../../app4.rst:39 235faf8ffe4f44eea9cc4e4e625d58c7 +#: ../../app4.rst:39 e80d08e617524a9f9a4e8714b118b62a msgid "Total number of **pages** in file." msgstr "ファイル内の総 **ページ** 数。" -#: ../../app4.rst:40 4642c23350874c6892d4d6fd5ada1aee +#: ../../app4.rst:40 96a719d117644267a368982b482e4556 msgid "Total number of bookmarks (**Table of Contents** entries)." msgstr "ブックマーク( **目次** エントリー)の総数。" -#: ../../app4.rst:41 09a64be8fa634e51b72146318e931189 +#: ../../app4.rst:41 21dcfb30e5464a5ca3ff95401f654ba1 msgid "Total number of **links**." msgstr "**リンク** の総数。" -#: ../../app4.rst:42 2c998c368adb4d428fd577b54dc9e3e0 +#: ../../app4.rst:42 272c50da2cbb42a68c1af1a6f20912e6 msgid "**KB size** per page." msgstr "ページごとの **KBサイズ** 。" -#: ../../app4.rst:43 6c7704099b634cf0b3910f4afc64d8c5 +#: ../../app4.rst:43 25798cb6bcab4e729fd943d321bf2d1c msgid "" "**Textsize per page** is the amount text in the whole file in KB, divided" " by the number of pages." msgstr "**ページごとのテキストサイズ** は、ファイル全体のテキスト量をKBで割ったものです。" -#: ../../app4.rst:44 a3929ab29e994fc0b72cb1e9774ce8fa +#: ../../app4.rst:44 8772653d01c44b08a0b6d348c16e2dee msgid "Any **notes** to generally describe the type of file." msgstr "ファイルのタイプを一般的に説明するための **メモ** 。" #: ../../app4.rst:50 ../../app4.rst:217 ../../app4.rst:295 ../../app4.rst:407 -#: 4782942bc4e84717958fc916d11aac94 aa615fa34a9949c584cb7ceddfb7f0d5 -#: e1eacc906d7f4f098f484c62ba192f80 fa49f479e5844dd4ac5d4b968b5ad61e +#: 3a7f7d366c9d4cd68933b3aa52e47c36 4e932ab9bfe544f69f78419d7c3e77d2 +#: c09fd426aca746048611fb93deb100e6 fef672efd3ec4a55a97ed6f722884100 msgid "**Name**" msgstr "**ファイル名** " -#: ../../app4.rst:51 9a44b5c0ac734d96a108dcb251c3642b +#: ../../app4.rst:51 b0d124f56c87433db55a5f7b2d41cd7d msgid "**Size (bytes)**" msgstr "**サイズ(バイト)** " -#: ../../app4.rst:52 9bc40bea235840639c6afb2622b1645b +#: ../../app4.rst:52 d362b0c636e74244a325f72e9a9087e8 msgid "**Pages**" msgstr "**ページ数** " -#: ../../app4.rst:53 7ccc84ce47ca4af2a8e2563d51d61ced +#: ../../app4.rst:53 c3abbdf31f0b4a53aaec94f1bac2d08e msgid "**TOC size**" msgstr "**目次サイズ** " -#: ../../app4.rst:54 e7f839583812463d96c4a4725be203ec +#: ../../app4.rst:54 f20cbe59815944cab6401c135434edfe msgid "**Links**" msgstr "**リンク数** " -#: ../../app4.rst:55 41890ee030784346a7980b5d720f76b2 +#: ../../app4.rst:55 12ea07a140a043f7ac87d72a38bc120c msgid "**KB/page**" msgstr "**KB/ページ** " -#: ../../app4.rst:56 a3ecb466998744e899bf7638b1fd6971 +#: ../../app4.rst:56 9b9cb4615b2343088d290a2784145225 msgid "**Textsize/page**" msgstr "**テキストサイズ/ページ** " -#: ../../app4.rst:57 985520c24bce476bb02d81461ac96c2f +#: ../../app4.rst:57 439c3fd84f444720b730ea5b6fcbdb3d msgid "**Notes**" msgstr "**メモ** " -#: ../../app4.rst:58 8e3b99c545ff473abaa1ddc248930066 +#: ../../app4.rst:58 d4339a4e1e534a7aa58c7ac24f8e7a8e msgid "`adobe.pdf`_" msgstr "" -#: ../../app4.rst:59 6f553a920137416ab410ae39e2913c81 +#: ../../app4.rst:59 5590dd3c46464c09982ab3ed961c145f msgid "32,472,771" msgstr "" -#: ../../app4.rst:60 d501903f6a034167802dc0768b957b43 +#: ../../app4.rst:60 6e4f5d3e15a84754a874b75ca12be644 msgid "1,310" msgstr "" -#: ../../app4.rst:61 194d8a946baa4792bd94f81b7b4259a4 +#: ../../app4.rst:61 df8f51d9677f40bba42c33c044215698 msgid "794" msgstr "" -#: ../../app4.rst:62 2c41512e7d0b413ca801627e3626636f +#: ../../app4.rst:62 16e15d894e844594b9a2d07a288423a5 msgid "32,096" msgstr "" -#: ../../app4.rst:63 fdcc33b964fb419288f8b572a0579bf1 +#: ../../app4.rst:63 8a98b81dba6249eab5d2944c50b72d4a msgid "24" msgstr "" -#: ../../app4.rst:64 3649052c8aab41be92a683917125749d +#: ../../app4.rst:64 bd2a9d8a806540dbbb1296a17631c958 msgid "1,942" msgstr "" -#: ../../app4.rst:65 cc4686412ecc42fd8cd2de99ab82f974 +#: ../../app4.rst:65 59a50531261d44a28f76c8aa543ecaa6 msgid "linearized, many links / bookmarks" msgstr "線形化、多くのリンク/ブックマーク" -#: ../../app4.rst:66 1004e7877b464b29845393c6f84dee9d +#: ../../app4.rst:66 918a002a29be4fe7baebe58c7040cc78 msgid "`artifex-website.pdf`_" msgstr "" -#: ../../app4.rst:67 b86d4c056335434f911c91819e76f35d +#: ../../app4.rst:67 ca287cee43264f9084bb82bc73abce35 msgid "31,570,732" msgstr "" -#: ../../app4.rst:68 64ee7398674d45a8a9077dd19af802bd +#: ../../app4.rst:68 a9346a34d4374b8fb980e49b6cee10f4 msgid "47" msgstr "" -#: ../../app4.rst:69 e0c2bb7a63a44a78ab93d328be7be24a +#: ../../app4.rst:69 727136fb21b34d80a7052875d82f44bb msgid "46" msgstr "" -#: ../../app4.rst:70 7bb7b14159f645e6a722de3cf793acbf +#: ../../app4.rst:70 2e69102a3d8c457e842d25c89204c3d2 msgid "2,035" msgstr "" -#: ../../app4.rst:71 5a21c9ac98b342f09e24b499c9dcbc3f +#: ../../app4.rst:71 a171d97ad167415991ac238932d6a9f5 msgid "656" msgstr "" -#: ../../app4.rst:72 546516661fa8440790e7bc51ee64b367 +#: ../../app4.rst:72 4541105ef1a445d4b8c49a35ecd7dde3 msgid "3,538" msgstr "" -#: ../../app4.rst:73 869c1970ed1842e998e6c753f256206d +#: ../../app4.rst:73 ef59301c5b9d4e0c83d6057c216fcc34 msgid "graphics oriented" msgstr "グラフィックス志向" -#: ../../app4.rst:74 4b8b0c6ed9a947999e72fc2804ef25a5 +#: ../../app4.rst:74 d446e251c6c84a5882e0dc0f16c66f13 msgid "`db-systems.pdf`_" msgstr "" -#: ../../app4.rst:75 b35eb40dbccc4d0ca5fc104ab05d49e1 +#: ../../app4.rst:75 c4c7b19fb04943539a856abebb039a26 msgid "29,326,355" msgstr "" -#: ../../app4.rst:76 7c4dd3e6807546c597677d2213a17fd0 +#: ../../app4.rst:76 c8493e97e0894a68b17fb5ca43bb8cb4 msgid "1,241" msgstr "" #: ../../app4.rst:77 ../../app4.rst:78 ../../app4.rst:117 ../../app4.rst:118 -#: 318e651ec7e14478b21b59b59bb76c96 4d736f5e6745429d98fc4d7cf2975476 -#: 4f31eca5564243c4a71c1409dcdf58a2 7a615469338e4910aeba97ed7b317d91 +#: 469b9e8ab80f4fbca62f66c6408aac56 8701883ca58149b49edd938b79c60632 +#: 907210a5050c446c8573c0cbd9305e49 a393131c2bb84aa0ab0134c342843a10 msgid "0" msgstr "" -#: ../../app4.rst:79 06fe40a9b9114a189d62db9806bea3a6 +#: ../../app4.rst:79 0e86ba770bd340adb24cd0f1c14bab71 msgid "23" msgstr "" -#: ../../app4.rst:80 5995a463b8e14cd58485582f3c8f5688 +#: ../../app4.rst:80 e5801056aea44dfcac5a1abaf16e96cc msgid "2,142" msgstr "" -#: ../../app4.rst:82 ca68dd07383a4f1391428290ed01fb54 +#: ../../app4.rst:82 b97519331469472d8522f2bfe1653363 msgid "`fontforge.pdf`_" msgstr "" -#: ../../app4.rst:83 db9a5367771a40388fdbc9dda0c085cd +#: ../../app4.rst:83 b9d13fcb288d4b76af8964f8a77cecdb msgid "8,222,384" msgstr "" -#: ../../app4.rst:84 0c43b167cb59468fa588b4693af144ef +#: ../../app4.rst:84 17b5576ab80f412f8addb5a765efc53b msgid "214" msgstr "" -#: ../../app4.rst:85 e7982e7293e54e19b9bf951d455fb357 +#: ../../app4.rst:85 2dcd5ffb91694173815fd5f71f79eb29 msgid "31" msgstr "" -#: ../../app4.rst:86 3b1beb25a27842948fec78301e4ba3a7 +#: ../../app4.rst:86 594a6a6536504058bf95efddf6f6241d msgid "242" msgstr "" -#: ../../app4.rst:87 39957d88d9f348139bf4109cc66a5259 +#: ../../app4.rst:87 63ea1c4d3ee945c1ba5b17686c4089d5 msgid "38" msgstr "" -#: ../../app4.rst:88 2be27941bf554812a77c31a309aa938b +#: ../../app4.rst:88 4d250accb71d41558e2255b397be8194 msgid "1,058" msgstr "" -#: ../../app4.rst:89 4c3cf0f2973a47699750132bfdf0eca3 +#: ../../app4.rst:89 570063202acb4eb7b7faa8d4a517aba4 msgid "mix of text & graphics" msgstr "テキストとグラフィックスのミックス" -#: ../../app4.rst:90 998d382117c048a496e353992daafdd0 +#: ../../app4.rst:90 c7fa7da4992f4a548139415feb963ae8 msgid "`pandas.pdf`_" msgstr "" -#: ../../app4.rst:91 c75ab775a0a54ec8aca61175671821ac +#: ../../app4.rst:91 695d9ae1a2ae47a296647ae03b5d6b4e msgid "10,585,962" msgstr "" -#: ../../app4.rst:92 ce0eeb7f035040718a49d435f69e7783 +#: ../../app4.rst:92 7d45c29e31804c6280a247e8ffdb66a3 msgid "3,071" msgstr "" -#: ../../app4.rst:93 5527a8701716497694d4171149e18b62 +#: ../../app4.rst:93 df3b7957e23941dc8bd3a5c1ccb34ebe msgid "536" msgstr "" -#: ../../app4.rst:94 4bb19c65a47d468b8f4ac1db0052794e +#: ../../app4.rst:94 eecc97d4b5154ef4ae351b54d39f3e1a msgid "16,554" msgstr "" -#: ../../app4.rst:95 037e226e9c1146b9b3ab568714fc0a7d +#: ../../app4.rst:95 4810f249456f4515bbf7ca801b43a8e7 msgid "3" msgstr "" -#: ../../app4.rst:96 45ac3fdf10344189ac818c6c86aa90f9 +#: ../../app4.rst:96 df8c5b5bfd4d4565997129cdf635cba2 msgid "1,539" msgstr "" -#: ../../app4.rst:97 757d61dc34bb4806b35ff33845a01054 +#: ../../app4.rst:97 a786d6f5903541f9bcaed7139c8357fd msgid "many pages" msgstr "多くのページ" -#: ../../app4.rst:98 c3501ceed8a343d1b3cc62d05d69dcdb +#: ../../app4.rst:98 1240a135b2f64163a1bea7936c79fde2 msgid "`pymupdf.pdf`_" msgstr "" -#: ../../app4.rst:99 68c99fbcb4f144a8a1ffb91b29b9890f +#: ../../app4.rst:99 0ce0c9c9ed33422c80ce3dd06f7fe3b4 msgid "6,805,176" msgstr "" -#: ../../app4.rst:100 e2f90bcb1db8495bafd20a395d25c8e0 +#: ../../app4.rst:100 8c8a3312f9fe4963bc455f248bea71a2 msgid "478" msgstr "" -#: ../../app4.rst:101 ffc4e44b10bc47ff87c56dac03850e20 +#: ../../app4.rst:101 87be3ce662e94922abd94b769e71ecf9 msgid "276" msgstr "" -#: ../../app4.rst:102 299cb3ff47f24107a5937a5eaeb54411 +#: ../../app4.rst:102 80b0bc3f3ed84a4aa8793b4af2cd4956 msgid "5,277" msgstr "" -#: ../../app4.rst:103 95a04cc0b530402aaf9d3c30315f8a0d +#: ../../app4.rst:103 577fd220421f40a0a43d0cf490f79d2c msgid "14" msgstr "" -#: ../../app4.rst:104 906b349f9ff142dcb8db45dda867ca43 +#: ../../app4.rst:104 fb6b22b5018c47f2a7f9e88029c8985d msgid "1,937" msgstr "" -#: ../../app4.rst:105 95c99739e0484d71ada184a479cae18e +#: ../../app4.rst:105 f80fcdc04c5f4e36b7d4c1a846e0f246 msgid "text oriented" msgstr "テキスト志向" -#: ../../app4.rst:106 bbc98fbb8b9946ad9aa43e980d52d2ae +#: ../../app4.rst:106 790f8fe0e5744003b596a599ff91e410 msgid "`pythonbook.pdf`_" msgstr "" -#: ../../app4.rst:107 1d91c657608444ecb45ded23bc10c85a +#: ../../app4.rst:107 dcba3c0f2197467dbbcd6ddd003531cf msgid "9,983,856" msgstr "" -#: ../../app4.rst:108 e1ae3ba9cbd14a8d8087ce2c112b6079 +#: ../../app4.rst:108 872d5e20259a40c5b3ed0940f9b0290a msgid "669" msgstr "" -#: ../../app4.rst:109 bc9cd641cf77414b9d2bf6aee2df4943 +#: ../../app4.rst:109 91f57c0fd1ac43648f867600ac2c1ebd msgid "198" msgstr "" -#: ../../app4.rst:110 a663703a150e4730adfe4de5603e4a67 +#: ../../app4.rst:110 56b5755eb40943a09dda0732419266ce msgid "1,953" msgstr "" -#: ../../app4.rst:111 2c1cd8854ab34a2c8905da21964b69d7 +#: ../../app4.rst:111 9616347f3bf1430c8eae364c8ef574bc msgid "15" msgstr "" -#: ../../app4.rst:112 227068ac55034e65ac454a1c0960709d +#: ../../app4.rst:112 1ea93df464024ab6b87a27ae372ef096 msgid "1,929" msgstr "" -#: ../../app4.rst:114 41ab03c12d5f49e180fd66631ebef77f +#: ../../app4.rst:114 d9920f2bcf9840d3b873e5d0cc977671 msgid "`sample-50-MB-pdf-file.pdf`_" msgstr "" -#: ../../app4.rst:115 a792b9d917a74f39908ccca1abd22c67 +#: ../../app4.rst:115 b18d527f1aca48b2883a9475d7db6b3b msgid "52,521,850" msgstr "" -#: ../../app4.rst:116 cf077e23008e4577be400aae7e4a8d51 +#: ../../app4.rst:116 742fbc8385714d6ca4512df1cf504d7b msgid "1" msgstr "" -#: ../../app4.rst:119 ce21293597bd42919306c7a00e56fcf1 +#: ../../app4.rst:119 2a418619503d4d36b8657e4ac2867973 msgid "51,291" msgstr "" -#: ../../app4.rst:120 2b445e9e9f9242d5bc872dace57262b2 +#: ../../app4.rst:120 357f7e11d9dd4340976e7d66497e2f49 msgid "23,860" msgstr "" -#: ../../app4.rst:121 8b189ba4a0434860921e9ebd1142aee9 +#: ../../app4.rst:121 fbaa663f47ee4cc6aff794ab32f0b7d6 msgid "single page, graphics oriented, large file size" msgstr "単一ページ、グラフィックス志向、大きなファイルサイズ" -#: ../../app4.rst:127 c1e8f6af9c5d484ebc07bc5757f2c640 +#: ../../app4.rst:127 c16b155f0d724ad2acf5477dbc58284d msgid "" "**adobe.pdf** and **pymupdf.pdf** are clearly text oriented, **artifex-" "website.pdf** and **sample-50-MB-pdf-file.pdf** are graphics oriented. " "Other files are a mix of both." msgstr "" -"**adobe.pdf** と **pymupdf.pdf** は明らかにテキスト志向です。artifex-website.pdf と " +"**adobe.pdf** と **pymupdf.pdf** は明らかにテキスト志向です。 **artifex-website.pdf** と " "**sample-50-MB-pdf-file.pdf** はグラフィックス志向です。その他のファイルは両方のミックスです。" -#: ../../app4.rst:131 41ae148a24234f1f81e757382dd68677 +#: ../../app4.rst:131 cae4cecbbc174e919e8030a349897d8b msgid "Tools used" msgstr "使用されるツール" -#: ../../app4.rst:133 219d589c98e946219baf738ac0403616 +#: ../../app4.rst:133 eae2a9f6d309449b857fbfa679cb2331 msgid "" -"In each section, the same fixed set of |PDF| files is being " -"processed by a set of tools. The set of tools used per performance aspect" -" however varies, depending on the supported tool features." +"In each section, the same fixed set of |PDF| files is being processed by " +"a set of tools. The set of tools used per performance aspect however " +"varies, depending on the supported tool features." msgstr "" "各セクションでは、同じ固定されたセットの |PDF| " "ファイルが一連のツールによって処理されます。ただし、性能の側面ごとに使用されるツールのセットは、サポートされるツールの機能に応じて異なります。" -#: ../../app4.rst:135 ad5b106d9d4d49fca12efdd52cfeb24d +#: ../../app4.rst:135 08a0f8900a2447e783f29f4dd30d0418 msgid "" "All tools are either platform independent, or at least can run on both, " ":title:`Windows` and :title:`Unix` / :title:`Linux`." @@ -450,29 +449,31 @@ msgstr "" "すべてのツールは、プラットフォームに依存しないか、少なくとも :title:`Windows` と :title:`Unix` / " ":title:`Linux` の両方で実行できます。" -#: ../../app4.rst:141 74d20bbbbd8e415f809927e749437ef2 +#: ../../app4.rst:141 cc45988d1c5e48dea6a914496770536c msgid "**Tool**" msgstr "ツール" -#: ../../app4.rst:142 7216ee4a59564007a49c62cc89ee02a5 +#: ../../app4.rst:142 7085f0539d914435bd0d32e5a4cb95f6 msgid "**Description**" msgstr "説明" -#: ../../app4.rst:143 ../../app4.rst:172 ../../app4.rst:368 -#: 3428180373e8445eabe26f9ce8d67353 8f38222c05a145e6a1e887f8d37b78c6 -#: 90d20f28c9964670811ef58cff20808e +#: ../../app4.rst:143 ../../app4.rst:172 ../../app4.rst:218 ../../app4.rst:296 +#: ../../app4.rst:368 ../../app4.rst:408 3c40ad65813f477ca2de31da49502eed +#: 798aac00deeb417eb59f68e4df844cba 80d4513349494a9faa8aece1ed1361b4 +#: aa4f955d930b450ea437268a7f2cf87a cdc949e0918d4811a4c5752a67c7ee65 +#: ea31fb90cdc74c078ebc2d8c098c488a msgid "|PyMuPDF|" msgstr "" -#: ../../app4.rst:144 fd8df1c7718447729103820cdbf3e85c +#: ../../app4.rst:144 efd6c72c23f040599c7f47ec248dccf5 msgid "The tool of this manual." msgstr "このマニュアルのツールです。" -#: ../../app4.rst:145 792419a3183e4e2bb2cfa89a7ae38b01 +#: ../../app4.rst:145 f67f53847c2d4c378e7b2fb84da3b4a6 msgid "PDFrw_" msgstr "" -#: ../../app4.rst:146 494947b9fdda47d380638627f023b5bc +#: ../../app4.rst:146 7d5c52a641bd4e44ba33ed6bc0890066 msgid "" "A pure :title:`Python` tool, being used by :title:`rst2pdf`, has " "interface to :title:`ReportLab`." @@ -480,35 +481,35 @@ msgstr "" ":title:`rst2pdf` で使用される純粋な :title:`Python` " "ツールで、ReportLabとのインターフェースを持っています。" -#: ../../app4.rst:147 3c392146bee2405599ab6bbf4d07b767 +#: ../../app4.rst:147 5d1ea91abf13423085cf728fd811c571 msgid "PyPDF2_" msgstr "" -#: ../../app4.rst:148 b1045398bd074841be93bea8465208d6 +#: ../../app4.rst:148 56cbc1cdc6bf430598c52ff85f2d7884 msgid "A pure :title:`Python` tool with a large function set." msgstr "多くの機能を備えた純粋な :title:`Python` ツールです。" -#: ../../app4.rst:149 1adcdaf559754be3ab83fd1c228538c9 +#: ../../app4.rst:149 3ef4edf361f7465fa759bdf99abb55b4 msgid "PDFMiner_" msgstr "" -#: ../../app4.rst:150 aa445565c33446238c181df3eb7c3660 +#: ../../app4.rst:150 e3c71e821e5a4715818a9b9af2bd9cd0 msgid "A pure :title:`Python` to extract text and other data from |PDF|." msgstr "|PDF| からテキストやその他のデータを抽出するための純粋な :title:`Python` ツールです。" -#: ../../app4.rst:151 058b23f57d454765a50f6665dfee540e +#: ../../app4.rst:151 cabaa299d5c2474f91c5401f19cb5b85 msgid "XPDF_" msgstr "" -#: ../../app4.rst:152 956578f15f174d65bc02341c82baa5c7 +#: ../../app4.rst:152 386ca2bb4cdf40508bc69d8b02f4e6a0 msgid "A command line utility with multiple functions." msgstr "複数の機能を備えたコマンドラインユーティリティです。" -#: ../../app4.rst:153 903711da051b4f00955948798e79d821 +#: ../../app4.rst:153 f947112ae9044c999fa5f5be7d6f1aee msgid "PikePDF_" msgstr "" -#: ../../app4.rst:154 6d5d4031dc5b489da2ebcb6ac0827d61 +#: ../../app4.rst:154 7b8d4ac2f3c940b299dad00d2492eb7c msgid "" "A :title:`Python` package similar to :title:`PDFrw`, but based on " ":title:`C++` library :title:`QPDF`." @@ -516,21 +517,21 @@ msgstr "" ":title:`C++` ライブラリ :title:`QPDF` に基づいた :title:`Python` パッケージで、 " ":title:`PDFrw` に類似しています。" -#: ../../app4.rst:155 dbf754ed868e43b2ad0f49dc159a7101 +#: ../../app4.rst:155 4435c7075dd5458bac29fae9a9dfc6ab msgid "PDF2JPG_" msgstr "" -#: ../../app4.rst:156 959d755f2de44163b578a87be30993c0 +#: ../../app4.rst:156 26a923f0cb1d4874b83a9973a4cf7521 msgid "" "A :title:`Python` package specialized on rendering |PDF| pages to " ":title:`JPG` images." msgstr "|PDF| ページを :title:`JPG` 画像にレンダリングすることに特化した :title:`Python` パッケージです。" -#: ../../app4.rst:164 ff6e5dd3df614a07a7dfc154fcd9db95 +#: ../../app4.rst:164 ab71856b012d4951a4dd1cfe45e2c8b1 msgid "Copying / Joining / Merging" msgstr "コピー / 結合 / マージ" -#: ../../app4.rst:166 77ec351e142d49cf9fe7d1a219ece8c4 +#: ../../app4.rst:166 cc77bf393e184b30864374b448d7eca9 msgid "" "How fast is a |PDF| file read and its content parsed for further " "processing? The sheer parsing performance cannot directly be compared, " @@ -543,290 +544,281 @@ msgstr "" "ファイルの読み取りおよびそのコンテンツの解析は、どれだけ高速に行われるのでしょうか?純粋な解析の性能を直接比較することはできません。なぜなら、バッチユーティリティは常に要求されたタスクを一度に完全に実行するからです。" " :title:`PDFrw` も解析の際には *レイジー* な戦略を採用しており、必要な瞬間に必要な部分のみを解析します。" -#: ../../app4.rst:168 99d1875072034e0a8a239e326eccc4f2 +#: ../../app4.rst:168 d34888daf2f24ed08d5e5baa7df81caf msgid "" "To find an answer to the question, we therefore measure the time to copy " -"a |PDF| file to an output file with each tool, and do nothing " -"else." -msgstr "" -"したがって、この質問に答えるために、各ツールで |PDF| " -"ファイルを出力ファイルにコピーする時間を計測し、それ以外の操作は行いません。" +"a |PDF| file to an output file with each tool, and do nothing else." +msgstr "したがって、この質問に答えるために、各ツールで |PDF| ファイルを出力ファイルにコピーする時間を計測し、それ以外の操作は行いません。" -#: ../../app4.rst:170 ../../app4.rst:365 0b5fce24efce4d4e861fac0a608e7267 -#: 613d63957e37489cb5662b1781f1bb89 +#: ../../app4.rst:170 ../../app4.rst:365 39ee5d59922f43f6a4632ac84e87a16c +#: 98012a5b4e2d4381807c7c384ae505ed msgid "These are the :title:`Python` commands for how each tool is used:" msgstr "各ツールの使用方法に関する :title:`Python` コマンドは以下の通りです:" -#: ../../app4.rst:180 a6ed0c0c50fb4bf89b5fd517e7d5c459 +#: ../../app4.rst:180 098415bfb0c84fd698d9dd8767503706 msgid ":title:`PDFrw`" msgstr "" -#: ../../app4.rst:190 786fb97ac1674616af0b439d15a288c5 +#: ../../app4.rst:190 bb3be02428f749d0bb3d7f2a2c02f4e6 msgid ":title:`PikePDF`" msgstr "" -#: ../../app4.rst:198 85db38f6dab74d7abab94a07e8366024 +#: ../../app4.rst:198 a7ff02af2cbc46a982f6a95712187623 msgid ":title:`PyPDF2`" msgstr "" #: ../../app4.rst:210 ../../app4.rst:288 ../../app4.rst:399 -#: 0617576f219b449b8bc250e097781841 23d8f7ff770546bea93fb8d61dc230c2 -#: f134b602ed214c2884e0c9b11a4d6eb1 +#: 000ff0e8f68b48bf855c210b76e56070 0e9f42a5643a440fae93b73bf99f1986 +#: 2bd5f4833ba3402db744ab7377b6e00c msgid "**Observations**" msgstr "**観察結果**" #: ../../app4.rst:212 ../../app4.rst:290 ../../app4.rst:401 -#: 435cdd48c7984c76b59a4a60045a2a7a a1906041776c4e86b77b02bfde637a16 -#: e12eebe2e3cc47c086217676521e04e7 +#: 31ae5e61007c44c190595a23966bb19d 807225688a854c0280044fff4f169db1 +#: ea572448a1104daaa2cc30a51bd5c530 msgid "" "These are our run time findings in **seconds** along with a base rate " "summary compared to |PyMuPDF|:" msgstr "以下は、実行時間の結果( **秒単位**)と、 |PyMuPDF| との比較における基本レートの要約です:" -#: ../../app4.rst:218 ../../app4.rst:296 ../../app4.rst:408 -#: 1076732c4650415d9ae9712245ce04d6 4bf8949048cd4b0f8b92915d0b57b775 -#: 576dab0709b944ec87a333c5c6379149 -msgid "**PyMuPDF**" -msgstr "" - -#: ../../app4.rst:219 950c266f0e194cac90cd56a4bf85aac2 +#: ../../app4.rst:219 087eaa06d5254f66ae93934c8c7f977c msgid "**PDFrw**" msgstr "" -#: ../../app4.rst:220 b7c07d340c2d41e3b7b63456881fd4f2 +#: ../../app4.rst:220 fe97f76c5ff74774ab450a54bd366ab7 msgid "**PikePDF**" msgstr "" -#: ../../app4.rst:221 ../../app4.rst:298 9b405b1f0fe442aa870a0c53e072794a -#: e1683f01fbc040bca1c6ae27516199d0 +#: ../../app4.rst:221 ../../app4.rst:298 12504bf36e0e498a8a28bdc8a6642f2a +#: d7098a58a32240789d0013891ec1887d msgid "**PyPDF2**" msgstr "" #: ../../app4.rst:222 ../../app4.rst:300 ../../app4.rst:411 -#: 365389c93ea4410893d28c3aceed4c4f 64ad9f78432f46aba4fa221d12a2fcbd -#: 72a584ec8b5945328783fa9b1ae449df +#: 0579bf77dff54eafb32b534d82d727d4 172966661215461eb37399d216f46858 +#: e0f9034aa1734071a0c2b5d7940283fa msgid "adobe.pdf" msgstr "" -#: ../../app4.rst:223 334c1b9fdff8469a8f3636ea540f4608 +#: ../../app4.rst:223 33ccfd6a08d84bdaa980894ad37141dd msgid "1.75" msgstr "" -#: ../../app4.rst:224 d2074f338671411c9cc7cb6ece8ef648 +#: ../../app4.rst:224 d5bba5be203247a9b5af5890023bff83 msgid "5.15" msgstr "" -#: ../../app4.rst:225 503f3018abc841dea30ce03385c031cd +#: ../../app4.rst:225 bb7f98c73d5d4cd38989b8b32ba68f14 msgid "22.37" msgstr "" -#: ../../app4.rst:226 b989e3b6becf47819c5648331d91ab81 +#: ../../app4.rst:226 017bd19c7ef44a88b67a56301a916f92 msgid "374.05" msgstr "" #: ../../app4.rst:227 ../../app4.rst:305 ../../app4.rst:415 -#: 0b61980dc12848489544a00942a794e8 1b5691390c8e4bf382044cf4f53737a8 -#: da2e70a8e73a4ac3b63c23843c55a307 +#: 4083c98e040a4fb08a63a15984eddca2 84f4b14e5b0d426e997567b51d864c58 +#: c6ad8c14d5d64caca80a2b8f3381c0f9 msgid "artifex-website.pdf" msgstr "" -#: ../../app4.rst:228 ec1f39071f5a4ab8966c6dd16087bc8a +#: ../../app4.rst:228 446b60c823134f8cb7a0963b5882f5d2 msgid "0.26" msgstr "" -#: ../../app4.rst:229 ../../app4.rst:243 1ee4352132da4bf898844981893a4b87 -#: 3041d9dd2a614f32b5a8318196b3d97c +#: ../../app4.rst:229 ../../app4.rst:243 b094c7cdf2a6446c8a3a643d1cd5f6e7 +#: f771a5135e6b4b969e355ff296c38e5c msgid "0.38" msgstr "" -#: ../../app4.rst:230 47fc6037fefa462c9c3483f7158fb78a +#: ../../app4.rst:230 558139fa94304bfba8e9455825d290f2 msgid "1.41" msgstr "" -#: ../../app4.rst:231 40c8f90e1eb84bbea664df4ad503207a +#: ../../app4.rst:231 3fa9a0e4d22642a0a9118b44433c1f84 msgid "2.81" msgstr "" #: ../../app4.rst:232 ../../app4.rst:310 ../../app4.rst:419 -#: 1e7219dcfbb14ff7873114a66f0341aa ddf0bffe57404bc7907551aaf39495f6 -#: f1b2fac0132b43f0a839e055072cb901 +#: 0b636048d8e5485192740128dde856e2 1c1feb7c9759462191f279d0b351413c +#: c78432807979474ab55c794f1f70844c msgid "db-systems.pdf" msgstr "" -#: ../../app4.rst:233 99e5c550121d47bd9fdfcbabf77e6ea0 +#: ../../app4.rst:233 0f96d2adb69b40f1ae61b3abf24c4996 msgid "0.15" msgstr "" -#: ../../app4.rst:234 7dcecaf34fb84b21bd6fa500694f8d76 +#: ../../app4.rst:234 6d7a157a40ae4db5aa1e6fec05e121e1 msgid "0.8" msgstr "" -#: ../../app4.rst:235 307fb3c955254a3b807772a0e4e9e7be +#: ../../app4.rst:235 57df5bda2616424b810b890b91d052f1 msgid "1.68" msgstr "" -#: ../../app4.rst:236 291b05bbdf75412d860f62830067b7fe +#: ../../app4.rst:236 8f52d19199904d0fa372857a413a20fe msgid "2.46" msgstr "" #: ../../app4.rst:237 ../../app4.rst:315 ../../app4.rst:423 -#: 1a824b0742e045c79b4cf16627634933 4181167b036246d98d195517c3283fb4 -#: f037a7f7e1114f67bc389b5622dd0f72 +#: 014fb850a0ba4288b0a98f06d22913df 203bf305798d4baca89428d6acd63ca1 +#: 47c5c20d621042cb937b7d8077b810d5 msgid "fontforge.pdf" msgstr "" -#: ../../app4.rst:238 08e713d7fcf045428db208e80a9d521a +#: ../../app4.rst:238 d5a4d52e01344a58b77fed8bc4aa6cc3 msgid "0.09" msgstr "" -#: ../../app4.rst:239 fae1a6a200bf47338d6b8f8eb7f827e0 +#: ../../app4.rst:239 07ad8cb575224bd0a77c8f73498da2dd msgid "0.14" msgstr "" -#: ../../app4.rst:240 f1785b8d500048a4bc3cd1bff3789741 +#: ../../app4.rst:240 2782db1a31d642eb8ee71aa12d0a07fb msgid "0.28" msgstr "" -#: ../../app4.rst:241 ../../app4.rst:308 77e1bccf869b45608f107e9e3b2609d9 -#: eb8f76ae818a4d4cab881e16667ba76d +#: ../../app4.rst:241 ../../app4.rst:308 9730467f6988422984fbaa469746b258 +#: fa2e4397421748668c97bae4cf7cfecd msgid "1.1" msgstr "" #: ../../app4.rst:242 ../../app4.rst:320 ../../app4.rst:427 -#: 59c3defe4b624a1a9111167b789668de 74bf252cbf3241aba987a45a3e025b3b -#: bd922d7f309e4e6db3452263e18b9c3c +#: 84964178ddc641d9ad9b042dc0859a4d aa8101aab6b346d2a8b1bcd13e098da1 +#: e6d6998730614fcd8fb1633dbd0acab1 msgid "pandas.pdf" msgstr "" -#: ../../app4.rst:244 1648c45b20ae4eeca1b4c2b608638ba1 +#: ../../app4.rst:244 cb4fe72df12d4edd984f17c82aef0aa2 msgid "2.21" msgstr "" -#: ../../app4.rst:245 7920e53e069e410fac954367cb60536a +#: ../../app4.rst:245 2cb7408ebc3a42cb875be0b5d5f7b44e msgid "2.73" msgstr "" -#: ../../app4.rst:246 a2eade8afcb244bfb799bccdb1ae8667 +#: ../../app4.rst:246 671b631294b64a6ba1526e4c16fb3c96 msgid "70.3" msgstr "" #: ../../app4.rst:247 ../../app4.rst:325 ../../app4.rst:431 -#: 44efac358b2641dfafa5d5240387162a a451870e103d4bd3aba7cf6dde25b694 -#: d15d92c1babb43dbb6661e7c074b094c +#: 408b3e0d9fe04dc89a0270114047810e 8f397007025a4db6ae4c9d7e8cecbce7 +#: bb8942ae4b494cb9ba13152658b9d55c msgid "pymupdf.pdf" msgstr "" -#: ../../app4.rst:248 94a9d71e07ca4d86bd3570c3949d99ae +#: ../../app4.rst:248 17d86881be2843b3b98599f55c03956e msgid "0.11" msgstr "" -#: ../../app4.rst:249 f1a6e18520be406cae820e2d1b17b783 +#: ../../app4.rst:249 1b5371380cce431b907e18a035c69c16 msgid "0.56" msgstr "" -#: ../../app4.rst:250 4f5f0ad923df4f3fa20161a7c9318420 +#: ../../app4.rst:250 ada41a74da3547fe853c66b22b06602c msgid "0.83" msgstr "" -#: ../../app4.rst:251 7ed60fe88fff4dcc96d80d2009ca3ff1 +#: ../../app4.rst:251 f8ac8502e0864a779969183a5f2bdcae msgid "6.05" msgstr "" #: ../../app4.rst:252 ../../app4.rst:330 ../../app4.rst:435 -#: 8782bd2fa4f74464b54aad4f499c7957 9b983bd9e75548a288ad2cdca2b2aaaf -#: f9430e9cb4044daa8db1b7962b11653a +#: 23f158ffa8d0494c98401845f612953a 5e5934902a7d42a5a59bf81197dd75db +#: feba334429eb4cab84e66c248a94a9d2 msgid "pythonbook.pdf" msgstr "" -#: ../../app4.rst:253 d3bc0da23e0b42ef9a86997a443707a3 +#: ../../app4.rst:253 d18ff9da68324e21a5601b7b701ceb98 msgid "0.19" msgstr "" -#: ../../app4.rst:254 ac913a032d6a4b0bbdb8a3decb71a3c6 +#: ../../app4.rst:254 5a674cedef4b4b2eae9a1fc8a4d351bf msgid "1.2" msgstr "" -#: ../../app4.rst:255 e711f8d25ebf47efbd27fc0f6251f7a1 +#: ../../app4.rst:255 8180e14731504f1fa81a41548f784f56 msgid "1.34" msgstr "" -#: ../../app4.rst:256 005de8bc88ab48eaba834133dcc40fea +#: ../../app4.rst:256 b0c26ff6981f4d9cab541d3f1ed8aa51 msgid "37.19" msgstr "" #: ../../app4.rst:257 ../../app4.rst:335 ../../app4.rst:439 -#: 13e9b8f067004b7eae9dd49086b21290 5bc55013bfc64b50bb405b583e36f987 -#: 9728afcf64854f20867e44512101d184 +#: 5009b04279b94732b74b775e625fe7f0 9bcbd9860e1f41aea886358cf29f58f4 +#: b89f45f5198e4479b7ff10753175bf62 msgid "sample-50-MB-pdf-file.pdf" msgstr "" -#: ../../app4.rst:258 5b6fea87843c4f1b9ecefebf695bd044 +#: ../../app4.rst:258 93dbe783461f45249a5769552aa1a29d msgid "0.12" msgstr "" -#: ../../app4.rst:259 e6d5e28ee1f04a4da5128e97866fbe0f +#: ../../app4.rst:259 5959fcd2a9eb4f6abf11091dbca739cf msgid "0.1" msgstr "" -#: ../../app4.rst:260 bd58894b73234571b783af31de0a8d9b +#: ../../app4.rst:260 ffe5c7ee78244a7ab937b9e4f69b048b msgid "2.93" msgstr "" -#: ../../app4.rst:261 5a423ea09d6f497ebcf4d50fd122c614 +#: ../../app4.rst:261 4a2af1db49284e5e9a51d346bf69e7a5 msgid "0.08" msgstr "" #: ../../app4.rst:262 ../../app4.rst:340 ../../app4.rst:443 -#: 3ea330d561af4276a3506b6010a9f5b3 5e07d0e0b3ff4d47a0d8337ace2c3514 -#: 77601dc7750d4818ada5dc23e07afd12 +#: 0d75e663cff74ea7bbe177733e9bf035 80bd2b30f2884e87afda2a1c1a838ced +#: fa3773c82e14451f82f2da1a00a73021 msgid "**Total**" msgstr "**合計** " -#: ../../app4.rst:263 f3c794bf468d4f238b58d80be965afc0 +#: ../../app4.rst:263 a72960766ecb4cadb4dd01b0c0673c5b msgid "**3.05**" msgstr "" -#: ../../app4.rst:264 2870b739f11749f9b6cf54b546b9c4a3 +#: ../../app4.rst:264 d801960d9b034bddac657801dba14227 msgid "**10.54**" msgstr "" -#: ../../app4.rst:265 fa8bf229677f40c2962b26ad47aecf19 +#: ../../app4.rst:265 a1fda8841ebe42c3ab1952d319a16253 msgid "**33.57**" msgstr "" -#: ../../app4.rst:266 d5a1c6b3f6854b70a431892e0f928c6b +#: ../../app4.rst:266 b48e9c691850419c8f12c4279a11abea msgid "**494.04**" msgstr "" #: ../../app4.rst:272 ../../app4.rst:350 ../../app4.rst:451 -#: 61ad7addee58414190a886e847560126 b2f5a5c532884848bdd0e75f3b2833de -#: f1b81cd5f0184eb8ae8a28ee5929f6e2 +#: 0b46b231245b4f61a0d1767d82afc825 ab7fcc058b4a4068abbb243821783349 +#: fac28cdc461b45e3a48b2c1656519c5f msgid "**Rate compared to PyMuPDF**" msgstr "**PyMuPDFに対する比率** " #: ../../app4.rst:273 ../../app4.rst:351 ../../app4.rst:452 -#: 24b790deee4a4e86b100264cddabf94e 24beba73006e48ed99c02d19602e2eac -#: aef655264e2c457a9e2bf0f58b4c2907 +#: 0a28b89f605a4780b1783dd5f2924e73 ef4c56771d1e4b5e8f6f23cfa41c9d2d +#: f380c4b084454cef8f5b7ac7b43dc7a9 msgid ":green-color:`1.0`" msgstr "" -#: ../../app4.rst:274 71b6835c61184506b891acfdff14eac2 +#: ../../app4.rst:274 2593873cdfa64fbd9d0bbb573c8150aa msgid ":orange-color:`3.5`" msgstr "" -#: ../../app4.rst:275 432ae8aab3d94f6ca2ab52f9df15fa60 +#: ../../app4.rst:275 cdab03a80afe4d4dad11da5acdd86300 msgid ":orange-color:`11.0`" msgstr "" -#: ../../app4.rst:276 98bdb5dae687404a98faed2f273dbbe7 +#: ../../app4.rst:276 1dce58c46b2443a0a84790ccf0ad2467 msgid ":red-color:`162`" msgstr "" -#: ../../app4.rst:283 2081278554af46cb8e4b057c122d71a3 +#: ../../app4.rst:283 1c4d51591dae4ca394f9b073c9091d5f msgid "Text Extraction" msgstr "テキスト抽出" -#: ../../app4.rst:285 e01df7ad31b34ad5b271ddbd108e9f2e +#: ../../app4.rst:285 334c3aa502504d3b898bbad1e7821cb4 msgid "" "The following table shows plain text extraction durations. All tools have" " been used with their most basic functionality - i.e. no layout re-" @@ -835,318 +827,317 @@ msgstr "" "以下の表は、プレーンテキストの抽出にかかる時間を示しています。すべてのツールは、基本的な機能のみを使用しています - " "レイアウトの再配置などはありません。" -#: ../../app4.rst:297 ../../app4.rst:409 5283f694929945eb93446792db3399de -#: c792d0a2e6c146bdb748406dcf4d7ba0 +#: ../../app4.rst:297 ../../app4.rst:409 295f0feafbe34e729724d6cf4b3fc701 +#: e4108f33a0fa482dbc8a47e11a38f042 msgid "**XPDF**" msgstr "" -#: ../../app4.rst:299 0a35e90efdbe4cfca150f3487d4ab6f8 +#: ../../app4.rst:299 e6077890cead4338a8cf65b0d0b8e2b0 msgid "**PDFMiner**" msgstr "" -#: ../../app4.rst:301 3f28f9f577684a5485bd02be2180151d +#: ../../app4.rst:301 e41e7a1dc96e4aecb746deda8f9ee02e msgid "2.01" msgstr "" -#: ../../app4.rst:302 3124d1d863ca4079a2f6e2a0e3de99bb +#: ../../app4.rst:302 7e91cb2e541f4112bea1a21ef0a0aec5 msgid "6.19" msgstr "" -#: ../../app4.rst:303 a8afe0f6617444029f6506e41cf95a0a +#: ../../app4.rst:303 e69b13a658b54cecaabb6dcbbdf84ebe msgid "22.2" msgstr "" -#: ../../app4.rst:304 4784e2c94a664c74a44d59199be701b5 +#: ../../app4.rst:304 ef36308cc32944ca857d2e9cae5241a4 msgid "49.15" msgstr "" -#: ../../app4.rst:306 017a7edd24ca4159a7afb6b579ae05dc +#: ../../app4.rst:306 8427d1895767420b8db08fac9011f8c8 msgid "0.18" msgstr "" -#: ../../app4.rst:307 9d5b655e6c5c4cb1a49de10ce4ce07d8 +#: ../../app4.rst:307 b8317699623a427382ebaee1ad5471f2 msgid "0.3" msgstr "" -#: ../../app4.rst:309 b051662236984af3b6d99352902bd6d2 +#: ../../app4.rst:309 0e798465fa7f4c3199db25b7a90ed51f msgid "4.06" msgstr "" -#: ../../app4.rst:311 011788a5e6554452abd512360793b49f +#: ../../app4.rst:311 edecce9ed3144f17af063e167071243a msgid "1.57" msgstr "" -#: ../../app4.rst:312 8e6a68b2d71e42efadc7e7aa76868cf2 +#: ../../app4.rst:312 2d95636039ea426f9af05c8dfa8dad01 msgid "4.26" msgstr "" -#: ../../app4.rst:313 0bf083d18f3a467ab7fa082d1e213e7e +#: ../../app4.rst:313 16f29fb00e814fd5887126e2daaa2812 msgid "25.75" msgstr "" -#: ../../app4.rst:314 ee5e5feb04504ec8838e35b49ded0748 +#: ../../app4.rst:314 70feafb46d0d4f50a3851a1eab533e12 msgid "42.19" msgstr "" -#: ../../app4.rst:316 ed7f1f5ba46e4f9a91815c6d6f2af380 +#: ../../app4.rst:316 4d97900eec554c03b3388b7c098658d8 msgid "0.24" msgstr "" -#: ../../app4.rst:317 ba7f776a91b14b22ae13b8a5e1f020d2 +#: ../../app4.rst:317 1d74bd9d01854bad89885673bd068cfc msgid "0.47" msgstr "" -#: ../../app4.rst:318 1f6fd069485f478d87c148180207516b +#: ../../app4.rst:318 b479325345d643709a60c3c14c691d25 msgid "2.69" msgstr "" -#: ../../app4.rst:319 85f4c16e22264c02b5f7afc75836b93d +#: ../../app4.rst:319 ecd2657831b5452891c8a9d1fbf8ab16 msgid "4.2" msgstr "" -#: ../../app4.rst:321 5fb14dc989884196a14f6ebd40296e5c +#: ../../app4.rst:321 cbaf2aceaa4a4993b9d800eb26779434 msgid "2.41" msgstr "" -#: ../../app4.rst:322 a986ce42182543bea6924192183b6fb6 +#: ../../app4.rst:322 eea9e2a95efd4c1dafdc9ecff46be723 msgid "10.54" msgstr "" -#: ../../app4.rst:323 767959df0d604c109e59273dad8f2793 +#: ../../app4.rst:323 ed5fdd8b39db431698e4a400489da733 msgid "25.38" msgstr "" -#: ../../app4.rst:324 ceaacc97a80149fcaaf438737868495f +#: ../../app4.rst:324 2dfb2ea581c848e99b5c1807d5055b53 msgid "76.56" msgstr "" -#: ../../app4.rst:326 8f722d7f99d9422a91a3159febe106c4 +#: ../../app4.rst:326 9a3ad03cca2148deafd533a76ce0d720 msgid "0.49" msgstr "" -#: ../../app4.rst:327 de1dc40d9fd14358bff47de2752d61c1 +#: ../../app4.rst:327 b35253abb7ce482abf42d1de8d8125a2 msgid "2.34" msgstr "" -#: ../../app4.rst:328 f3b326cf4c414d39b9280a8ae0077de0 +#: ../../app4.rst:328 80f91c94a7ca41f58445fc0257332c35 msgid "6.44" msgstr "" -#: ../../app4.rst:329 48befdd918c348ff89e80be865d21e32 +#: ../../app4.rst:329 d86f8d1eea1c4b82ac1f3cd16673122d msgid "13.55" msgstr "" -#: ../../app4.rst:331 64ac1720e8c54d4387d00998dd3538a6 +#: ../../app4.rst:331 55eab9a8dfdc47029124d6d18d78344d msgid "0.84" msgstr "" -#: ../../app4.rst:332 1975d5a700214e23b7644139f75cddd2 +#: ../../app4.rst:332 4f1b94156e834ae5a9ec9d4b34757ccf msgid "2.88" msgstr "" -#: ../../app4.rst:333 68d137290d86464e928d247bc6dbc0ef +#: ../../app4.rst:333 96cd7243be2e4820958bdeeb2dd2508a msgid "9.28" msgstr "" -#: ../../app4.rst:334 b51e234fdcce4f82b0a52eb0983a6826 +#: ../../app4.rst:334 c0c4f35e622143f0a33db035fd36fd10 msgid "24.27" msgstr "" -#: ../../app4.rst:336 5d199172449140489acbc73983deb822 +#: ../../app4.rst:336 e3984686022e4f68931cdc516f2d8aa5 msgid "0.27" msgstr "" -#: ../../app4.rst:337 c521b09cef354bb2ac9e0f2077286d81 +#: ../../app4.rst:337 daebf37f3def48e4a97906466d04eddb msgid "0.44" msgstr "" -#: ../../app4.rst:338 5fc99da8eb974acab18568ae4b3a89ab +#: ../../app4.rst:338 6672b13d4e13495cabfea568b0bf8f0c msgid "8.8" msgstr "" -#: ../../app4.rst:339 231fb6389a404b3782003e214ca32759 +#: ../../app4.rst:339 d973f08abf1448c2b1600095618c8455 msgid "13.29" msgstr "" -#: ../../app4.rst:341 c03e5718e0a84b0ebf2705c1166ea390 +#: ../../app4.rst:341 4bef96a664b64a38ad41dfccc95f8c4a msgid "**8.01**" msgstr "" -#: ../../app4.rst:342 09e05a1aefd84ea6bc06053fdd5446ed +#: ../../app4.rst:342 f06c580572554b3497daa397db37622b msgid "**27.42**" msgstr "" -#: ../../app4.rst:343 a437da8dc5f34feeb8a634cfcba9abb1 +#: ../../app4.rst:343 befe94d6c0fe4af58b97aa9e5229d296 msgid "**101.64**" msgstr "" -#: ../../app4.rst:344 a6aa59b7ecfc454b9bed5696ec0b5c75 +#: ../../app4.rst:344 41585c7e46094055ab1ba5e8ff0f41eb msgid "**227.27**" msgstr "" -#: ../../app4.rst:352 3b46dfda102843509bde16bb80c67c3e +#: ../../app4.rst:352 c0f856a911ad45f08009409761dfd331 msgid ":orange-color:`3.42`" msgstr "" -#: ../../app4.rst:353 f58c41b52fc94f6984296a2730a3f9e9 +#: ../../app4.rst:353 c17aad6698c14585aa7d33aea9a24e65 msgid ":orange-color:`12.69`" msgstr "" -#: ../../app4.rst:354 201bd1b2ae094d61ad5756457fe47eb5 +#: ../../app4.rst:354 02e40dd6a6304c36bdff04c962495c02 msgid ":red-color:`28.37`" msgstr "" -#: ../../app4.rst:360 5500b5cdecbb44dcb02905418d5a68da +#: ../../app4.rst:360 9e9d8efb70054aa68772026b10852763 msgid "Page Rendering" msgstr "ページのレンダリング" -#: ../../app4.rst:362 ea2f8df7d39645c4bb770f5cd16724e5 +#: ../../app4.rst:362 61af2c85f2f646fe9110aa48420274d6 msgid "" -"We have tested rendering speed of |PyMuPDF| against " -":title:`pdf2jpg` and :title:`XPDF` at a resolution of 150 DPI," +"We have tested rendering speed of |PyMuPDF| against :title:`pdf2jpg` and " +":title:`XPDF` at a resolution of 150 DPI," msgstr "" -"私たちは、解像度150 DPIで |PyMuPDF| のレンダリング速度を :title:`pdf2jpg` と " -":title:`XPDF` と比較しました。" +"私たちは、解像度150 DPIで |PyMuPDF| のレンダリング速度を :title:`pdf2jpg` と :title:`XPDF` " +"と比較しました。" -#: ../../app4.rst:382 c05749a2902448aa82540c72fe24e9ea +#: ../../app4.rst:382 95c8b368baa24d13ac96dcdea58459e3 msgid ":title:`XPDF`" msgstr "" -#: ../../app4.rst:389 c3bb82aa1aa44a6c87d74c3e30544e77 +#: ../../app4.rst:389 dccffc19be6c4fde8b7ff341c14f8476 msgid ":title:`PDF2JPG`" msgstr "" -#: ../../app4.rst:410 9eb5ceff112d4baaa3b278df5190aa9e +#: ../../app4.rst:410 9ef3379555224426b70f7ce9d999824e msgid "**PDF2JPG**" msgstr "" -#: ../../app4.rst:412 4824a44bd51d417fb35459809e925f3d +#: ../../app4.rst:412 d6f81b8351394333877861849ea2eca9 msgid "51.33" msgstr "" -#: ../../app4.rst:413 a7d2672f2ea24b22a2956da76e66eb4b +#: ../../app4.rst:413 8faab5bff0384035a7634264e2035744 msgid "98.16" msgstr "" -#: ../../app4.rst:414 885a5bd1b8b5440daf7dae4920276e15 +#: ../../app4.rst:414 1b6d590a314d48cb9512951b0d2aca92 msgid "75.71" msgstr "" -#: ../../app4.rst:416 6fd7af36e29e4c62b0530fd6eabbd8e8 +#: ../../app4.rst:416 7ed949dea1fc49fba14c7290f5f0410a msgid "26.35" msgstr "" -#: ../../app4.rst:417 58c39c222b1f40b889b40b1ca2da7354 +#: ../../app4.rst:417 16f978c1e7584cf589151174cbd3e0c6 msgid "51.28" msgstr "" -#: ../../app4.rst:418 8515c1b745134bb7b1a5a47a385e70da +#: ../../app4.rst:418 97e3a62c6e9147379314df4e4b8c0752 msgid "54.11" msgstr "" -#: ../../app4.rst:420 8ac3e0794798412b8503d16239381a1c +#: ../../app4.rst:420 9796145e23124e0d94d9fd4bc453c764 msgid "84.59" msgstr "" -#: ../../app4.rst:421 17f5b0bba81946fb9183c11d8ed2e9a8 +#: ../../app4.rst:421 80fad20e9b2840e5890ffdda456c5cd4 msgid "143.16" msgstr "" -#: ../../app4.rst:422 b9c8b258d8cc44a8ab30d7599b1bec42 +#: ../../app4.rst:422 b13a7b03f5cf4e6181341a9d8943657f msgid "405.22" msgstr "" -#: ../../app4.rst:424 9fd43722f36b4eba9e613c3221103cda +#: ../../app4.rst:424 b0865450a8b54d689e7c4c18b70dba48 msgid "12.23" msgstr "" -#: ../../app4.rst:425 425c11e52bdc49689fbb86d4be8ad35d +#: ../../app4.rst:425 0e3ee45be04d49df904ad0b9b84cc59e msgid "22.18" msgstr "" -#: ../../app4.rst:426 ce5b624a0aff4ef39b708edd814e3b6a +#: ../../app4.rst:426 fb92cb655ccc4ef2b616e48f86f03592 msgid "20.14" msgstr "" -#: ../../app4.rst:428 32ebeaffea31441f87a0a5995fdd1b7f +#: ../../app4.rst:428 76327bf519c9498dadb7762d2d613b85 msgid "138.74" msgstr "" -#: ../../app4.rst:429 6c706ab99fde4d438cd3383ddbe47c3f +#: ../../app4.rst:429 87eac25439c1466ba9f8037334de82c1 msgid "241.67" msgstr "" -#: ../../app4.rst:430 c81f840ad43d459b8f40c7d7d0a5cd4a +#: ../../app4.rst:430 921ffdd160e1440bac4018a5913dc5a0 msgid "202.06" msgstr "" -#: ../../app4.rst:432 eaa504c7421b41b2a1c5963411035c8b +#: ../../app4.rst:432 7f7143de4eb24a3a99c917ad8ed3f872 msgid "22.35" msgstr "" -#: ../../app4.rst:433 267b6557c63e49c18b5b2d38bc6cac1b +#: ../../app4.rst:433 4f2027532127445691955867748ad040 msgid "39.11" msgstr "" -#: ../../app4.rst:434 056098f1e929465686e16b946ba28fce +#: ../../app4.rst:434 487d6c2a3364452a8bf0bc9cfcc7cfe8 msgid "33.38" msgstr "" -#: ../../app4.rst:436 08978370155b44c59d1fa4dd31abed71 +#: ../../app4.rst:436 1e241237259441cab94fca061a9cd505 msgid "30.44" msgstr "" -#: ../../app4.rst:437 82a35dc1b56a4d3aa8c9a911bb0af969 +#: ../../app4.rst:437 c71f5db7561c4511bf550bbdb402e815 msgid "49.12" msgstr "" -#: ../../app4.rst:438 5c487337b489413f99dd7b495a87c6dc +#: ../../app4.rst:438 c8143a7a48224a7f8ea8912623bd116c msgid "55.68" msgstr "" -#: ../../app4.rst:440 b4bcb6452fe54dfb9c793423b3f6b555 +#: ../../app4.rst:440 bfd54d2725ca41f58c2ed566e663fcd8 msgid "1.01" msgstr "" -#: ../../app4.rst:441 06d5b1c54a3c46baa1282c4dc6ca186e +#: ../../app4.rst:441 5db9427489fd453c82a8e02a9ccdc3e9 msgid "1.32" msgstr "" -#: ../../app4.rst:442 6f788505595f465893d263e62b17e995 +#: ../../app4.rst:442 4fe3a8898e4a404d8e0b776f3258d834 msgid "5.22" msgstr "" -#: ../../app4.rst:444 25c0513d37e34296bbd539756f965838 +#: ../../app4.rst:444 80cbb4bda94a413bb2e12bd12b290317 msgid "**367.04**" msgstr "" -#: ../../app4.rst:445 cdfb4e2801584349860e7b75c820be72 +#: ../../app4.rst:445 25f73ae8ec0b4d19b88ff761311afa17 msgid "**646**" msgstr "" -#: ../../app4.rst:446 3feaa923d73345ea834ed35d57c73706 +#: ../../app4.rst:446 2b18d417b7504b0ca812fb6dc4d81e3f msgid "**851.52**" msgstr "" -#: ../../app4.rst:453 4c0a52b6e79f4cba8a911bc9d5c431ba +#: ../../app4.rst:453 2529c3f932184badb6e059b2d241020c msgid ":orange-color:`1.76`" msgstr "" -#: ../../app4.rst:454 c635cf4b395d47e1a00f53ef9ea2d012 +#: ../../app4.rst:454 f918a4ed3d7f4d64be43baa58c5aeaa3 msgid ":red-color:`2.32`" msgstr "" -#: ../../footer.rst:71 8b7d46655ea44433943cebb23546686e +#: ../../footer.rst:60 c341e8f540ee456ab7d1314671ca2dd5 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 2e717ddcf43b4a8aa285c38f5a7d38fd -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/archive-class.mo b/docs/locales/ja/LC_MESSAGES/archive-class.mo index de6effee1..5aef0ec15 100644 Binary files a/docs/locales/ja/LC_MESSAGES/archive-class.mo and b/docs/locales/ja/LC_MESSAGES/archive-class.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/archive-class.po b/docs/locales/ja/LC_MESSAGES/archive-class.po index 1eeadbb52..543ee432a 100644 --- a/docs/locales/ja/LC_MESSAGES/archive-class.po +++ b/docs/locales/ja/LC_MESSAGES/archive-class.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,31 +19,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 ac921549ed114f0490a7efa13347a309 +#: ../../header.rst:-1 d617abc2bac44b79b8895c5a477d435e msgid "Artifex" msgstr "" -#: ../../header.rst:-1 191e37e3901b4865b38e7f3551b42fd7 +#: ../../header.rst:-1 11676cd8a070416581b0f70844041acd msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 5e9f9988e7aa4e4da49098029ad18fd0 +#: ../../header.rst:-1 e1542b64861144078ef1fec53974ec47 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../archive-class.rst:7 b67abee2b1da4097883f9fa2e0cc2a66 +#: ../../archive-class.rst:7 2f0bf46e9ac54fd68b23bc9210c74150 msgid "Archive" msgstr "Archive (アーカイブ)" -#: ../../archive-class.rst:9 821049b0078142079b5e2aec767d60e8 +#: ../../archive-class.rst:9 46f4ce49429542a1b693c99eadca160d msgid "New in v1.21.0" msgstr "v1.21.0での新機能" -#: ../../archive-class.rst:11 c7a6f32a11c34ea38cbb2429b11774f9 +#: ../../archive-class.rst:11 90ae46c1e95142ec8216ccb598850553 msgid "" "This class represents a generalization of file folders and container " "files like ZIP and TAR archives. Archives allow accessing arbitrary " @@ -51,7 +51,7 @@ msgid "" "elements as if they all were part of one hierarchical tree of folders." msgstr "このクラスは、ファイルフォルダーやZIPやTARアーカイブのようなコンテナファイルの一般化を表します。アーカイブは、ファイルフォルダー、ZIP/TARファイル、および単一のバイナリデータ要素の任意のコレクションにアクセスできるようにし、すべてが1つの階層的なフォルダーツリーの一部であるかのようにします。" -#: ../../archive-class.rst:13 eee2387e89504f39bbdafa6a35cd4707 +#: ../../archive-class.rst:13 3fd435f3261d48d4a0a727f172c9ddb6 msgid "" "In PyMuPDF, archives are currently only used by :ref:`Story` objects to " "specify where to look for fonts, images and other resources." @@ -59,75 +59,75 @@ msgstr "" "PyMuPDFでは、アーカイブは現在、フォント、画像、およびその他のリソースを検索する場所を指定するために :ref:`Story` " "オブジェクトによってのみ使用されています。" -#: ../../archive-class.rst:16 faf8fb61d3674265be5f55ff45ef9f51 +#: ../../archive-class.rst:16 1829b6e552a94dc5a3c61784652f1d73 msgid "**Method / Attribute**" msgstr "**メソッド / 属性**" -#: ../../archive-class.rst:16 13dc7454b5ae40949eb86e5c91cf9e59 +#: ../../archive-class.rst:16 2bf68b939c1d44f7be1ca6d449c27e53 msgid "**Short Description**" msgstr "**簡単な説明**" -#: ../../archive-class.rst:18 4f0cf6339c5f494b8b0494bd03b05787 +#: ../../archive-class.rst:18 5b94b5437aa84ff9a245301a956f8d18 msgid ":meth:`Archive.add`" msgstr "" -#: ../../archive-class.rst:18 1b1ea6786c934712b67335910b950588 +#: ../../archive-class.rst:18 8c9d95f042814c25a324f3ce9ec79170 msgid "add new data to the archive" msgstr "アーカイブに新しいデータを追加する" -#: ../../archive-class.rst:19 f09db86ad37c4be8a666b6b1ce9bd201 +#: ../../archive-class.rst:19 d5b520ec1d214317ac63ec60b509eb43 msgid ":meth:`Archive.has_entry`" msgstr "" -#: ../../archive-class.rst:19 25c5eae8b7da483c904df665b3b12cf4 +#: ../../archive-class.rst:19 054f56f20f6d4fa8a033a1dd80bd3cb6 msgid "check if given name is a member" msgstr "名前で指定されたデータを読む" -#: ../../archive-class.rst:20 3d6d9d419e67436fa7755447512978a0 +#: ../../archive-class.rst:20 dc2f8062523044d19ec994b1828e3195 msgid ":meth:`Archive.read_entry`" msgstr "" -#: ../../archive-class.rst:20 f5ea3dc13f3c442791d7d6a970371213 +#: ../../archive-class.rst:20 e680d9fb1dd44a7f85a61af9853e4e6d msgid "read the data given by the name" msgstr "名前で指定されたデータを読む" -#: ../../archive-class.rst:21 876d7f1a46e24644a5a4894e84623d87 +#: ../../archive-class.rst:21 e41ca685715b4dcbb45e53b209029663 msgid ":attr:`Archive.entry_list`" msgstr "" -#: ../../archive-class.rst:21 138f5dde2a9b4cc28a2b4dab2e5f0a72 +#: ../../archive-class.rst:21 f31453b71aeb4ade88edbebb982ff071 msgid "list[dict] of archive items" msgstr "アーカイブアイテムのリスト[辞書]" -#: ../../archive-class.rst:24 f7b79faa4aad4013badd646101d81d3e +#: ../../archive-class.rst:24 98357f302ae84859bd401682492995fa msgid "**Class API**" msgstr "クラス API" -#: ../../archive-class.rst:30 00c69894b70f43e18035a58502ef7556 +#: ../../archive-class.rst:30 422de49b171f4d18afbb8516afbc9095 msgid "Creates a new archive. Without parameters, an empty archive is created." msgstr "新しいアーカイブを作成します。パラメーターが指定されない場合、空のアーカイブが作成されます。" -#: ../../archive-class.rst:32 596279fae0754226b8ce2a740b5666cb +#: ../../archive-class.rst:32 ae5782f0b4a54bc3be2c009daab1a7ca msgid "If provided, `content` may be one of the following:" msgstr "提供される場合、`content` は次のいずれかであることができます:" -#: ../../archive-class.rst:34 9cd5009ab54047b69de9d757e05f11b2 +#: ../../archive-class.rst:34 fbf461b873ef4da5b1fda4e484d46cbf msgid "another Archive: the archive is being made a sub-archive of the new one." msgstr "別の Archive: アーカイブは新しいアーカイブのサブアーカイブになります。" -#: ../../archive-class.rst:36 1ce44bc0ba684541abb8e877ada5c3ca +#: ../../archive-class.rst:36 6ac58a1199014e0a932f80579a01fff4 msgid "" "a string: this must be the name of a local folder or file. `pathlib.Path`" " objects are also supported." msgstr "文字列: これはローカルフォルダまたはファイルの名前である必要があります。`pathlib.Path` オブジェクトもサポートされています。" -#: ../../archive-class.rst:38 27179c6de488494693ecd1240f216d51 +#: ../../archive-class.rst:38 63b7f15541554ca28bb94dacd2e33b99 msgid "" "A **folder** will be converted to a sub-archive, so its files (and any " "sub-folders) can be accessed by their names." msgstr "**フォルダ** はサブアーカイブに変換され、そのファイル(およびサブフォルダ)は名前でアクセスできます。" -#: ../../archive-class.rst:39 98fa25fa7601435496ab9cfe39d380e6 +#: ../../archive-class.rst:39 547200864ba043b295790af8b0b2a6cf msgid "" "A **file** will be read with mode `\"rb\"` and these binary data (a " "`bytes` object) be treated as a single-member sub-archive. In this case, " @@ -138,13 +138,13 @@ msgstr "" "オブジェクト)は単一のメンバーサブアーカイブとして扱われます。この場合、`path` パラメーターは **必須** " "で、このアイテムが見つかる/取得できるメンバー名である必要があります。" -#: ../../archive-class.rst:41 5b18139e48e641f58b9d6b68b179bd26 +#: ../../archive-class.rst:41 26fc387cc92a49b18be5fbb6e276303a msgid "" "a `zipfile.ZipFile` or `tarfile.TarFile` object: Will be added as a sub-" "archive." msgstr "`zipfile.ZipFile` または `tarfile.TarFile` オブジェクト: サブアーカイブとして追加されます。" -#: ../../archive-class.rst:43 8f16521d4fb443b7b322c8bdc448a10f +#: ../../archive-class.rst:43 a95ece3a221d4379bbdf468f3d625687 msgid "" "a Python binary object (`bytes`, `bytearray`, `io.BytesIO`): this will " "add a single-member sub-archive. In this case, the `path` parameter is " @@ -155,34 +155,35 @@ msgstr "" "これは単一のメンバーサブアーカイブを追加します。この場合、`path` パラメーターは **必須** " "で、このアイテムが見つかる/取得できるメンバー名である必要があります。" -#: ../../archive-class.rst:45 3853053c57204f8fb0367e801feab433 +#: ../../archive-class.rst:45 6cefb5b8a5ae4538b432a671e5624634 + msgid "" "a tuple `(data, name)`: This will add a single-member sub-archive with " -"the member name `name`. `data` may be a Python binary object or a local " -"file name (in which case its binary file content is used). Use this " -"format if you need to specify `path`." +"the member name ``name``. ``data`` may be a Python binary object or a " +"local file name (in which case its binary file content is used). Use this" +" format if you need to specify `path`." msgstr "" -"タプル`(data, name)`: これはメンバー名 `name` を持つ単一のメンバーサブアーカイブを追加します。`data` " +"タプル `(data, name)` : これはメンバー名 ``name`` を持つ単一のメンバーサブアーカイブを追加します。 ``data`` " "はPythonバイナリオブジェクトまたはローカルファイル名である可能性があります(その場合、バイナリファイルのコンテンツが使用されます)。`path`" " を指定する必要がある場合は、このフォーマットを使用してください。" -#: ../../archive-class.rst:47 1e263b1063f348cd9d1138f11e32f36b +#: ../../archive-class.rst:47 8916743a3d2e482e8fac00263e7c6839 msgid "" "a Python sequence: This is a convenience format to specify any " "combination of the above." msgstr "Pythonシーケンス: これは上記のいずれかの組み合わせを指定するための便益フォーマットです。" -#: ../../archive-class.rst:49 aa4bae06e2d549cea8616fd979b2e9f2 +#: ../../archive-class.rst:49 ea2b6c8e209e48e7a488431fc4d5dc5b msgid "If provided, `path` must be a string." msgstr "提供される場合、`path` は文字列である必要があります。" -#: ../../archive-class.rst:51 19cf1fdf0a394c25a13dd0d10993dfcc +#: ../../archive-class.rst:51 ce6b5084838e47998c1c0930a1c90a85 msgid "" "If `content` is either binary data or a file name, this parameter is " "mandatory and must be the name under which the data can be found." msgstr "`content` がバイナリデータまたはファイル名の場合、このパラメーターは必須で、データが見つかる名前である必要があります。" -#: ../../archive-class.rst:53 9d07459012dd416e85ae699dc78047f4 +#: ../../archive-class.rst:53 bfdfb9696f9d4267b9a0abcd4944814d msgid "" "Otherwise this parameter is optional. It can be used to simulate a folder" " name or a mount point, under which this sub-archive's elements can be " @@ -198,7 +199,7 @@ msgstr "" "で見つかります。他のサブアーカイブについても同様です:ZIPサブアーカイブのメンバーを取得するには、その名前に `\"path/\"` " "を接頭辞として追加する必要があります。このパラメーターの主な目的は、重複する名前を区別することである可能性があります。" -#: ../../archive-class.rst:55 b1b7a19b6f4b4bc89bdaaf9beb3f496b +#: ../../archive-class.rst:55 61677063f42641209e56a228534c33f2 msgid "" "If duplicate entry names exist in the archive, always the last entry with" " that name will be found / retrieved. During archive creation, or " @@ -209,58 +210,58 @@ msgstr "" "アーカイブ内に重複するエントリ名が存在する場合、常にその名前の最後のエントリが見つかり/取得されます。アーカイブの作成中、またはアーカイブにさらにデータを追加する際" " :meth:`Archive.add` を参照)、重複をチェックしません。この問題を防ぐために path パラメーターを使用してください。" -#: ../../archive-class.rst:59 3f52eb51258e42c29d70e411317457bf +#: ../../archive-class.rst:59 dc6f307620b443e59c60965c461c7642 msgid "" "Append a sub-archive. The meaning of the parameters are exactly the same " "as explained above. Of course, parameter `content` is not optional here." msgstr "サブアーカイブを追加します。パラメータの意味は上記とまったく同じです。もちろん、ここではパラメータ `content` はオプションではありません。" -#: ../../archive-class.rst:63 4b288ba8834a436d9cb56f514e43deea +#: ../../archive-class.rst:63 e1ad4f204f754654a6584c25842135fb msgid "Checks whether an entry exists in any of the sub-archives." msgstr "エントリがサブアーカイブのいずれかに存在するかどうかを確認します。" -#: ../../archive-class.rst 4e938c69a5634c23bd358430a8a70b39 -#: d380d078cda94b8d8367a2345952fe26 +#: ../../archive-class.rst 6748d18e7f6946d6b1497df192130d43 +#: feda328ffa8445dea3f5c2af2f98fdad msgid "Parameters" msgstr "パラメータ:" #: ../../archive-class.rst:65 ../../archive-class.rst:73 -#: 2df67328a23c4931950cd06851b981fc e43a30ca4792498db570ca4ca6f3c483 +#: 0458d0fa598349cf8a25c5752c8f840b 1806b51351774f19944fb27526851e14 msgid "" "The fully qualified name of the entry. So must include any `path` prefix " "under which the entry's sub-archive has been added." msgstr "エントリの完全修飾名。エントリのサブアーカイブが追加されたパスのプレフィックスを含む必要があります。" -#: ../../archive-class.rst 2f9a2d57ec8d4e2b9376cc38f7e3b567 -#: f5ae5398b1a049ceb789fb3086cb4243 +#: ../../archive-class.rst 0fb6926638df4e5d88376ea0eea6219d +#: b0c94ca65df04318aad6ff6b1d22633e msgid "Returns" msgstr "戻り値:" -#: ../../archive-class.rst:67 569cd2713e7c4c4298e63ddecec80189 +#: ../../archive-class.rst:67 484ce7feed2141d4b486ae9b49c1c29e msgid "`True` or `False`." msgstr "`True` または `False` 。" -#: ../../archive-class.rst:71 ea81111a4a69457d862dbf1c93b3ce69 +#: ../../archive-class.rst:71 affe45e0783c46f782832cb77fb3eb49 msgid "Retrieve the data of an entry." msgstr "エントリのデータを取得します。" -#: ../../archive-class.rst:75 9b77656d630d49f7ab5ead58a05343fa +#: ../../archive-class.rst:75 dc88278b5cee4df6a0867e93b0e234f2 msgid "" "The binary data (`bytes`) of the entry. If not found, an exception is " "raised." msgstr "エントリのバイナリデータ( `bytes` )です。見つからない場合は例外が発生します。" -#: ../../archive-class.rst:79 d74f0c1a6d774c5da7d75624af38ed48 +#: ../../archive-class.rst:79 3d32676328d34e37939a65792096baf5 msgid "" "A list of the archive's sub-archives. Each list item is a dictionary with" " the following keys:" msgstr "アーカイブのサブアーカイブのリストです。各リストアイテムは、次のキーを持つ辞書です:" -#: ../../archive-class.rst:81 478542936c1b4a31a8bbdb85f943db55 +#: ../../archive-class.rst:81 f4a44efa6e934e2ab4d5b59c1abb3212 msgid "`entries` -- a list of (top-level) entry names in this sub-archive." msgstr "`entries` - このサブアーカイブ内の(トップレベルの)エントリ名のリスト。" -#: ../../archive-class.rst:82 6b1f1dc890d445c894abe56fbb0a194f +#: ../../archive-class.rst:82 5aefdd53977e4a2aa8c559d7bac700f6 msgid "" "`fmt` -- the format of the sub-archive. This is one of the strings " "\"dir\" (file folder), \"zip\" (ZIP archive), \"tar\" (TAR archive), or " @@ -270,27 +271,26 @@ msgstr "" "\"dir\"(ファイルフォルダ)、\"zip\"(ZIPアーカイブ)、\"tar\"(TARアーカイブ)、または単一のバイナリエントリまたはファイルコンテンツの場合は" " \"tree\" のいずれかです。" -#: ../../archive-class.rst:83 ac5fd983da3e4853b950f18f83bb06c9 +#: ../../archive-class.rst:83 ef04652561cc41bca0c8d60f067bb118 msgid "" "`path` -- the value of the `path` parameter under which this sub-archive " "was added." msgstr "`path` - このサブアーカイブが追加されたパラメータの値です。" -#: ../../archive-class.rst:85 ff5f98b496414385b706691e2d2c6324 +#: ../../archive-class.rst:85 ddd26ce7aa1e42c09e3a7daa19769a5a msgid "**Example:**" msgstr "**例:** " -#: ../../footer.rst:71 262edac11982407e898b5e2b02a768ee +#: ../../footer.rst:60 9a53a999980d4a2da538998c8bb29234 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 a9202ebb9e1247ffbb0aa7afe44d70df -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/changes.mo b/docs/locales/ja/LC_MESSAGES/changes.mo index da2f1c0bd..42dda8e96 100644 Binary files a/docs/locales/ja/LC_MESSAGES/changes.mo and b/docs/locales/ja/LC_MESSAGES/changes.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/changes.po b/docs/locales/ja/LC_MESSAGES/changes.po index ea872d9b2..14487956a 100644 --- a/docs/locales/ja/LC_MESSAGES/changes.po +++ b/docs/locales/ja/LC_MESSAGES/changes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: ja\n" @@ -19,511 +19,1040 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 8c7eb872891340a0852e24fae3ca8d0c +#: ../../header.rst:-1 e6ef528c5fdf45fea6c7bb8dc84b7a73 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 adbbabe99b234225a7940eff608c587f +#: ../../header.rst:-1 fa3067ffc93b4ec490d385c7c51db147 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 2c2020adf071475992c6981932147e3a +#: ../../header.rst:-1 65b8350063cd4becbb6318725958b4a2 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../../changes.txt:2 2de547bd35ce455c84f6b817b24351bd +#: ../../../changes.txt:2 6d40d72e343d4d098b4a6606bb398d57 msgid "Change Log" msgstr "" -#: ../../../changes.txt:5 fd2b9723140a40a5b0f8bae38e9e297f -msgid "**Changes in version 1.24.10 (2024-09-02)**" +#: ../../../changes.txt:5 1f939ea110594a84b498a674a00e8ef9 +msgid "**Changes in version 1.25.5 (2025-03-31)**" +msgstr "" + +#: ../../../changes.txt:7 ../../../changes.txt:26 ../../../changes.txt:46 +#: ../../../changes.txt:69 ../../../changes.txt:92 ../../../changes.txt:102 +#: ../../../changes.txt:117 ../../../changes.txt:137 ../../../changes.txt:147 +#: ../../../changes.txt:164 ../../../changes.txt:190 ../../../changes.txt:223 +#: ../../../changes.txt:239 ../../../changes.txt:249 ../../../changes.txt:281 +#: ../../../changes.txt:318 ../../../changes.txt:345 ../../../changes.txt:367 +#: ../../../changes.txt:384 ../../../changes.txt:427 ../../../changes.txt:448 +#: ../../../changes.txt:462 ../../../changes.txt:475 ../../../changes.txt:501 +#: ../../../changes.txt:514 0d7ab8cafe384b21a13e9fa4e94fa25e +#: 22e0ba5e60b24940b98a79eb72236dc6 24b601119509480e85e64d5086770935 +#: 3eb1033ee4a748dc995302a89d3428ea 4a4d816e7f774fd6b4391e300089a64a +#: 54335ad1c1a347fb987701adba326e16 6f873b93c9b84cbbb35a8250ad726318 +#: 73562614ba9c4136a6f770b401f4a0a5 844916a474fe4777953bba7042c5c62e +#: 871494ee32db43f1a660fb2befb0faa3 87c42d84426b4b9d8b2e3e78b4015f20 +#: 8bc6fd3cd5d54d6a9b7432052d2e8ea1 90f7c06af142401485d2f81351f22a0e +#: 9b32e1eaaa574591be694ef7cdf4c9f3 b5507a0845b24c7dbd900eb8bcf3e28e +#: b61fa9157fd74900880c7ed69cef5779 bdd6dc046ff04ed59321e524d6f5bc8f +#: be3dbe1555564086a67190c4805b6b15 c5d00869cb3a4b0eb5529257897bc166 +#: c6bcf8cffbaf41e2bcfb5158822a6133 ca5934716f614b169002912c2851bef0 +#: ce828cf6c0b84569836352afcadd244e e5441c44488943f9916be452eecab44e +#: ec6cd4cb63fd47059d2ebb14184acbd7 f278fe4ecee043e5845ebfda88e9ed17 +msgid "Fixed issues:" msgstr "" -#: ../../../changes.txt:7 62a76de1e606435d9d533914d2f9481c -msgid "Use MuPDF-1.24.9." +#: ../../../changes.txt:9 6c676547ecbd4885ac4f07306a041c75 +msgid "" +"**Fixed** `4372 `_: Text " +"insertion fails due to missing /Resources object" msgstr "" -#: ../../../changes.txt:9 ../../../changes.txt:40 ../../../changes.txt:56 -#: ../../../changes.txt:66 ../../../changes.txt:98 ../../../changes.txt:135 -#: ../../../changes.txt:162 ../../../changes.txt:184 ../../../changes.txt:201 -#: ../../../changes.txt:244 ../../../changes.txt:265 ../../../changes.txt:279 -#: ../../../changes.txt:292 ../../../changes.txt:318 ../../../changes.txt:331 -#: 1940bb8685124b9dac2f77556698d175 279a1b7bf426496d9826bc52823a4fad -#: 2de8bc233f454101bebf6bb567cb31c1 650ad6e5e464436ea1735da1fecc969f -#: 67818ee2136e4f4abbcdc7737b357c18 6fbd269569624597b95c3086e326a1af -#: 7694f5964dc14ba0a2048aee31e29b6f 788fe23d674f48278fc56f44e1483f1f -#: 78cb0b67024b4e70af1d9c1645afb510 8092b6bfe6de4f6b8ac2726d65239cbe -#: 8ea90575fe01476cb20b748de3c29329 bfec5da58ea84b229486d4b0fc9e23be -#: e8d27cbac43e474c8325faad24655be6 fa256cedfd8947e5979ce908d602fa8e -#: fecb2df068f445139148de5489fdf467 -msgid "Fixed issues:" +#: ../../../changes.txt:10 233a37e829224f618adad63d88800d90 +msgid "" +"**Fixed** `4400 `_: " +"Infinite loop in fill_textbox" +msgstr "" + +#: ../../../changes.txt:11 8f504d94ef6e4fc6adbc0beff80e915a +msgid "" +"**Fixed** `4403 `_: " +"Unable to get_text() - layer/clip nesting too deep" +msgstr "" + +#: ../../../changes.txt:12 530b0f7079ee4851b59003ede7babd33 +msgid "" +"**Fixed** `4415 `_: PDF " +"page is mirrored, origin is at bottom-left" +msgstr "" + +#: ../../../changes.txt:14 ../../../changes.txt:35 ../../../changes.txt:55 +#: ../../../changes.txt:79 ../../../changes.txt:128 ../../../changes.txt:178 +#: ../../../changes.txt:209 ../../../changes.txt:230 ../../../changes.txt:266 +#: ../../../changes.txt:286 ../../../changes.txt:300 ../../../changes.txt:328 +#: ../../../changes.txt:350 ../../../changes.txt:373 ../../../changes.txt:399 +#: ../../../changes.txt:432 ../../../changes.txt:454 ../../../changes.txt:468 +#: ../../../changes.txt:485 ../../../changes.txt:507 ../../../changes.txt:516 +#: ../../../changes.txt:529 ../../../changes.txt:541 ../../../changes.txt:558 +#: ../../../changes.txt:571 ../../../changes.txt:584 ../../../changes.txt:597 +#: ../../../changes.txt:609 ../../../changes.txt:621 ../../../changes.txt:644 +#: ../../../changes.txt:676 ../../../changes.txt:702 ../../../changes.txt:742 +#: ../../../changes.txt:769 ../../../changes.txt:791 ../../../changes.txt:1043 +#: ../../../changes.txt:1177 022b6bfa6afb493cbf48260d9587ef96 +#: 0686f711812848d792aac1363acffadd 1320d7afdd2f4419b2a541a5032c7019 +#: 1e86d34c248d4a459adb4f4bcde3cf88 21907423a81745e08b59769313e1b134 +#: 2de90b23ccfa49398e439c6df69ccdf0 2f2b4a73362249b097a23bbea1c9e692 +#: 3825f4e0159e47049c342df98533b1f7 38a7babda0e1488cb4d62919735a1089 +#: 410661ce41c247e99b61ff558d4087db 440026bb912d40eca64ba81b279fa8de +#: 4505918a333e43a59cf4f2c12b2c1df0 4cb975e037494000a70d5e23e9642828 +#: 5e4b4e3e0687431a8d6f844e2ab7a1fc 5ed077d0f32743e7a73f2d39158998df +#: 639102a5dfea4fe7b81479fbaf9ba12e 653df2dc9c604eda9969fcdcfafbe289 +#: 76f2a0c606ce446181f504edbe5332f5 78ddcaab7357478691e827a12330fe01 +#: 7d7db1e8ab8e488ea73621d71a975688 7ff57395a6fa4591bbabdec956c6f742 +#: 81f75b2052e1487ea21a8a811ccb3275 9bd7098628404d3d9071c6223e0ea81b +#: af2a2168396b46fbb7bb533450a15609 bc33b4ea237e4ee897dfa9dfcafa449e +#: c13270d0f6ce4852b9aa500219eb7630 c1404ec3199e4ea192eb052c92b03495 +#: c3864e0acf1d4b5ea2d2b0344ee17e2a c3ceabd966f343469282be9ea1058a55 +#: c589e958bed544369dc0cf396e983ab5 c66a98e3ba5f4e44a100c1f020d68f07 +#: e1bad465c75f4ccebd3299b3cc9b7e44 e5f1e56358304f56a04354365ab60793 +#: e687ffd8f9d94081aec0299f6cb9e94c e7f33c9c6dd7438686123488c4852680 +#: ee02ea89392a4ad18c6b5079bf2f028a fd720a2cef374f37a052f6addee367c9 +msgid "Other:" +msgstr "" + +#: ../../../changes.txt:16 92abd73bd337417a94bbeacc151f90c4 +msgid "Use MuPDF-1.25.6." +msgstr "" + +#: ../../../changes.txt:17 098902c27c924f22b0da5268a65944ce +msgid "Fixed MuPDF SEGV on MacOS with particular fonts." +msgstr "" + +#: ../../../changes.txt:18 c8b2c415a5394403986202b6202f8128 +msgid "Fixed `Annot.get_textpage()`'s `clip` arg." +msgstr "" + +#: ../../../changes.txt:19 a89acf34e5f5400597c796f531beb4ec +msgid "Fixed Python-3.14 (pre-release) build error." +msgstr "" + +#: ../../../changes.txt:22 6a71249e0cd44311bc8ee2a5c1280cf3 +msgid "**Changes in version 1.25.4 (2025-03-14)**" +msgstr "" + +#: ../../../changes.txt:24 510cb2fe09864b5d8e031e145c6bf4dc +msgid "Use MuPDF-1.25.5." +msgstr "" + +#: ../../../changes.txt:28 f86cdbdb5f5e4d31a44799e36a0f8362 +msgid "" +"**Fixed** `4079 `_: " +"Unexpected result for apply_redactions()" +msgstr "" + +#: ../../../changes.txt:29 a6f9fbcdc8c84431b4595594cedff2cd +msgid "" +"**Fixed** `4224 `_: MuPDF" +" error: format error: negative code in 1d faxd" +msgstr "" + +#: ../../../changes.txt:30 1b0923c703684308a15af3d37ac4bfe7 +msgid "" +"**Fixed** `4303 `_: " +"page.get_image_info() returns outdated cached results after replacing " +"image" +msgstr "" + +#: ../../../changes.txt:31 4505fdd4497b4e8aa586994665507661 +msgid "" +"**Fixed** `4309 `_: " +"FzErrorFormat Error When Deleting First Page" +msgstr "" + +#: ../../../changes.txt:32 321213d8c9fe43e28107a432957d7f91 +msgid "" +"**Fixed** `4336 `_: Major" +" Performance Regression: pix.color_count is 150x slower in version 1.25.3" +" compared to 1.23.8" +msgstr "" + +#: ../../../changes.txt:33 7245eb8a03214b09bd3fc8fc27f88d96 +msgid "" +"**Fixed** `4341 `_: " +"Invalid label retrieval when /Kids is an array of multiple /Nums" +msgstr "" + +#: ../../../changes.txt:37 22b0e9deda174e80abda0d228909524c +msgid "Fixed handling of duplicate widget names when joining PDFs (PR #4347)." +msgstr "" + +#: ../../../changes.txt:38 3dad4548088c4a59af94fb80501679d5 +msgid "Improved Pyodide build." +msgstr "" + +#: ../../../changes.txt:39 cbb70c3a10364399b4b23d5af63a2824 +msgid "" +"Avoid SWIG-related build errors with Python-3.13 by disabling " +"PY_LIMITED_API." +msgstr "" + +#: ../../../changes.txt:42 79fec98c80a3475faef419d32b8e7aac +msgid "**Changes in version 1.25.3 (2025-02-06)**" +msgstr "" + +#: ../../../changes.txt:44 3906d5e93f9c420ea6362c8745d97a7a +msgid "Use MuPDF-1.25.4." +msgstr "" + +#: ../../../changes.txt:48 fd3dc6e30f1247caac716513dcf14fb5 +msgid "" +"**Fixed** `4139 `_: Text " +"color numbers change between 1.24.14 and 1.25.0" +msgstr "" + +#: ../../../changes.txt:49 be1304c92780409db80b52f432ddf998 +msgid "" +"**Fixed** `4141 `_: Some " +"insertion methods fails for pages without a /Resources object" +msgstr "" + +#: ../../../changes.txt:50 ddd02a63b7c84fa98adb923edd5188a5 +msgid "" +"**Fixed** `4180 `_: " +"Search problems" +msgstr "" + +#: ../../../changes.txt:51 1b417bfe27f84b139a26a15af365bd0c +msgid "" +"**Fixed** `4182 `_: Text " +"coordinate extraction error" +msgstr "" + +#: ../../../changes.txt:52 01c3c01de5aa44e495395a3cac8fe621 +msgid "" +"**Fixed** `4245 `_: " +"Highlighting issue distorted on recent versions" +msgstr "" + +#: ../../../changes.txt:53 608e056859f64b2caa8788ea94fedabd +msgid "" +"**Fixed** `4254 `_: " +"add_freetext_annot is drawing text outside the annotation box" +msgstr "" + +#: ../../../changes.txt:57 b75ad06fa2424331b3fc542b1713a09a +msgid "" +"In annotations: * Added support for subtype FreeTextCallout. * Added " +"support for rich text." +msgstr "" + +#: ../../../changes.txt:60 3be875b6e2324d438c977d9c46348f70 +msgid "" +"Added miter_limit arg to insert_text*() to allow suppression of spikes " +"caused by long miters." +msgstr "" + +#: ../../../changes.txt:61 994387965fff4603aa6a829344ad3ca4 +msgid "Add Widget Support to `Document.insert_pdf()`." +msgstr "" + +#: ../../../changes.txt:62 5f029e712cfa434bb0a9a9e5856f5f4f +msgid "Add `bibi` to span dicts." msgstr "" -#: ../../../changes.txt:11 896c678e806a4e1d89fc47b1cf17398a +#: ../../../changes.txt:63 8cf302d1d9a94f3ca18ccea31c3a99b2 +msgid "Add `synthetic' to char dict." +msgstr "" + +#: ../../../changes.txt:64 ../../../changes.txt:806 +#: 7f730e0ab55e4a848c89fd1269c9067e 91984e278f7b4898966c0d68a2b344f0 +msgid "Fixed Pyodide builds." +msgstr "" + +#: ../../../changes.txt:67 2197b1f6183f4787a98624f68d0c90b3 +msgid "**Changes in version 1.25.2 (2025-01-17)**" +msgstr "" + +#: ../../../changes.txt:71 bcd9d6d9c30e4f9089697c05f37952d4 +msgid "" +"**Fixed** `4055 `_: " +"\"Yes\" for all checkboxes does not work for all PDF rendering engines." +msgstr "" + +#: ../../../changes.txt:72 2dd19144b42b4b6da2fc49b5060d585a +msgid "" +"**Fixed** `4155 `_: " +"samples_mv is unsafe" +msgstr "" + +#: ../../../changes.txt:73 5b3668fc1e3b4af59d74879ef82706e5 +msgid "" +"**Fixed** `4162 `_: Got " +"AttributeError, when tried to add Signature field" +msgstr "" + +#: ../../../changes.txt:74 e7a9224374f442179d949e8359c86467 +msgid "" +"**Fixed** `4186 `_: " +"Incorrect handling of JPEG with color space CMYK image extraction" +msgstr "" + +#: ../../../changes.txt:75 085153beee204ec486180c680f272516 +msgid "" +"**Fixed** `4195 `_: " +"Pixmaps that are inverted and have an alpha channel are not rendered " +"properly" +msgstr "" + +#: ../../../changes.txt:76 fe083792a7954be0991c57c125174ae9 +msgid "" +"**Fixed** `4225 `_: " +"pixmap.pil_save() fails due to colorspace definition" +msgstr "" + +#: ../../../changes.txt:77 b6569feb175f41d78cec167d8de2b240 +msgid "" +"**Fixed** `4232 `_: " +"Incorrect Font style and Size" +msgstr "" + +#: ../../../changes.txt:81 9913d7fc8e4348108de8a630c084f1f8 +msgid "Use Python's built-in glyphname <> unicode conversion." +msgstr "" + +#: ../../../changes.txt:82 94d69880bac14607af7c4c9471bc3cd9 +msgid "Improve speed of pixmap color inversion." +msgstr "" + +#: ../../../changes.txt:83 e993a109d5574b8fb5a26c54cc55bc88 +msgid "" +"Add new `char_flags` member to span dictionary, for example allows " +"detection of invisible text." +msgstr "" + +#: ../../../changes.txt:84 00118ce8f3ee4885b763ddaad90b9d62 +msgid "Detect image masks in TextPage output." +msgstr "" + +#: ../../../changes.txt:85 7f4fbdd15be64328b08e0cbeaaa5d614 +msgid "Added `Pixmap.pil_image()`." +msgstr "" + +#: ../../../changes.txt:88 e7e078580e7d47d286bfbac687ebc119 +msgid "**Changes in version 1.25.1 (2024-12-11)**" +msgstr "" + +#: ../../../changes.txt:90 10ebd7cd55b34d178984a28f4b740ec3 +msgid "Use MuPDF-1.25.2." +msgstr "" + +#: ../../../changes.txt:94 65e54c9d1ca04480ac40be5bb8035e18 +msgid "" +"**Fixed** `4125 `_: " +"memory leak while convert Pixmap's colorspace" +msgstr "" + +#: ../../../changes.txt:95 21b47126d40247068762123f765da080 +msgid "" +"**Fixed** `4034 `_: " +"Possible regression in pdf cleaning during save." +msgstr "" + +#: ../../../changes.txt:98 f166abb249fc4ac6860cc8a35dab1995 +msgid "**Changes in version 1.25.0 (2024-12-05)**" +msgstr "" + +#: ../../../changes.txt:100 431f75b52aa24575abf3fd54665b0e69 +msgid "Use MuPDF-1.25.1." +msgstr "" + +#: ../../../changes.txt:104 e496b4dcb26f4a23b3caa3c6b878580f +msgid "" +"**Fixed** `4026 `_: " +"page.get_text('blocks') output two piece of very similar text with " +"different bbox" +msgstr "" + +#: ../../../changes.txt:105 4650742dd04a4029a85b61a77a51fe19 +msgid "" +"**Fixed** `4004 `_: " +"Segmentation Fault When Updating PDF Form Field Value" +msgstr "" + +#: ../../../changes.txt:106 78df31cddbd64c11b359cc8feab8bff7 +msgid "" +"**Fixed** `3887 `_: " +"Subset Fonts problem using Fallback Font" +msgstr "" + +#: ../../../changes.txt:107 6adac36cb18a48abb9273fe6cab6eed7 +msgid "" +"**Fixed** `3886 `_: " +"Another issue with destroying PDF when inserting html" +msgstr "" + +#: ../../../changes.txt:108 fdc420491fc74691ba2f5e6f46ae1076 +msgid "" +"**Fixed** `3751 `_: " +"apply_redactions causes part of the page content to be hidden / " +"transparent" +msgstr "" + +#: ../../../changes.txt:113 befad62f34a24b3f8b7f8a09e7044da3 +msgid "**Changes in version 1.24.14 (2024-11-19)**" +msgstr "" + +#: ../../../changes.txt:115 404ba5c29a1649b7b4ce67ac70e08854 +msgid "Use MuPDF-1.24.11." +msgstr "" + +#: ../../../changes.txt:119 2cbdee80702348d190fc8ba1fd7d7432 +msgid "" +"**Fixed** `3448 `_: " +"get_pixmap function removes the table and leaves just the content behind" +msgstr "" + +#: ../../../changes.txt:120 1626f95053674bd09bdb7fdc429a328b +msgid "" +"**Fixed** `3758 `_: Got " +"\"malloc(): unaligned tcache chunk detected Aborted (core dumped)\" while" +" using add_redact_annot/apply_redactions" +msgstr "" + +#: ../../../changes.txt:121 1058fbbf9e324668b5c01e9dc1475d52 +msgid "" +"**Fixed** `3813 `_: " +"Stories: Ordered list count broken with nested unordered list" +msgstr "" + +#: ../../../changes.txt:122 3fa9af56bd864ddcb15a94e032ca8959 +msgid "" +"**Fixed** `3933 `_: " +"font.valid_codepoints() - malfunction" +msgstr "" + +#: ../../../changes.txt:123 3c813ccc9f7d49c48f3b7989e75cc9cc +msgid "" +"**Fixed** `4018 `_: " +"PyMuPDF hangs when iterating over zero page PDF pages backwards" +msgstr "" + +#: ../../../changes.txt:124 6655246a1ef440979b582c17892554ac +msgid "" +"**Fixed** `4043 `_: " +"fullcopypage bug" +msgstr "" + +#: ../../../changes.txt:125 c411234000614f55965c36781983b6e9 +msgid "" +"**Fixed** `4047 `_: " +"Segmentation Fault in add_redact_annot" +msgstr "" + +#: ../../../changes.txt:126 479cdee401e140458f3465045bd11688 +msgid "" +"**Fixed** `4050 `_: " +"Content of dict returned by doc.embfile_info() does not fit to " +"documentation" +msgstr "" + +#: ../../../changes.txt:130 5ab00d77297a4c758e2d1720c2435d8d +msgid "" +"Ensure that words from `Page.get_text()` never contain RTL/LTR char " +"mixtures." +msgstr "" + +#: ../../../changes.txt:131 81cf6c6cdbee49b0a3f1c41680450647 +msgid "Fix building with system MuPDF." +msgstr "" + +#: ../../../changes.txt:132 2a5a72ed4d554f3cab847f2da8f12bd7 +msgid "Add dot product for points and vectors." +msgstr "" + +#: ../../../changes.txt:135 fdd277e9a55844cea500c5df64dc77d8 +msgid "**Changes in version 1.24.13 (2024-10-29)**" +msgstr "" + +#: ../../../changes.txt:139 e40f2063f2f74ba7a9b50836c92c3c35 +msgid "" +"**Fixed** `3848 `_: " +"Piximap program crash" +msgstr "" + +#: ../../../changes.txt:140 ../../../changes.txt:151 +#: 1cecbbf45b6448d8b35c9733469fb800 cbe153d5efc34453adf93d3d712be058 +msgid "" +"**Fixed** `3950 `_: " +"Unable to consistently extract field labels from PDFs" +msgstr "" + +#: ../../../changes.txt:141 c82866a736b142f7ace9f54bb02e43f1 +msgid "" +"**Fixed** `3981 `_: " +"PyMuPDF 1.24.12 with pyinstaller throws error." +msgstr "" + +#: ../../../changes.txt:142 3d60c900807443f398fb9f5a24ccfdd3 +msgid "" +"**Fixed** `3994 `_: " +"pix.color_topusage raise Segmentation fault (core dumped)" +msgstr "" + +#: ../../../changes.txt:145 3283ce76daf74ef989e550c533f30f80 +msgid "**Changes in version 1.24.12 (2024-10-21)**" +msgstr "" + +#: ../../../changes.txt:149 f6541b76bb2342c98a3ad12f058bb33e +msgid "" +"**Fixed** `3914 `_: " +"Ability to print MuPDF errors to logging instead of stdout" +msgstr "" + +#: ../../../changes.txt:150 4c8a8c254557474288408bdcdf340a80 +msgid "" +"**Fixed** `3916 `_: " +"insert_htmlbox error: int too large to convert to float" +msgstr "" + +#: ../../../changes.txt:153 64d0512b1bb640839c19174dd7575212 +msgid "Supported Python versions are now 3.9-3.13." +msgstr "" + +#: ../../../changes.txt:155 3f67810537984f01a9fab7268f77d6c4 +msgid "Dropped support for Python-3.8 because end-of-life." +msgstr "" + +#: ../../../changes.txt:156 391ae1d264e6466394afae9b34ed5e7e +msgid "Added support for Python-3.13 because now released." +msgstr "" + +#: ../../../changes.txt:157 eaa7296b536f41708ce11d20fb58f937 +msgid "See: https://devguide.python.org/versions/" +msgstr "" + +#: ../../../changes.txt:160 e4a68838097c42d5a09860102beae49b +msgid "**Changes in version 1.24.11 (2024-10-03)**" +msgstr "" + +#: ../../../changes.txt:162 a0e3c6145d4f48bf8b84de559955b88d +msgid "Use MuPDF-1.24.10." +msgstr "" + +#: ../../../changes.txt:166 3b0f700925b14e7eb9253cece173ef21 +msgid "" +"**Fixed** `3624 `_: Pdf " +"file transform to image have a black block" +msgstr "" + +#: ../../../changes.txt:167 d2ee88adc92b4684a7f6031898da91f3 +msgid "" +"**Fixed** `3859 `_: " +"doc.need_appearances() fails with \"AttributeError: module " +"'pymupdf.mupdf' has no attribute 'PDF_TRUE' \"" +msgstr "" + +#: ../../../changes.txt:168 f4316694781c46c5b3e4b6007c4f9637 +msgid "" +"**Fixed** `3863 `_: " +"apply_redactions() does not work as expected" +msgstr "" + +#: ../../../changes.txt:169 dbdda385386e443fb32bab3c3c403bf4 +msgid "" +"**Fixed** `3905 `_: open " +"stream can raise a FzErrorFormat error instead of FileDataError" +msgstr "" + +#: ../../../changes.txt:171 315ef728a85c4f25a22111cb9119e908 +msgid "Wheels now use the Python Stable ABI:" +msgstr "" + +#: ../../../changes.txt:173 8bb5cfb556b447b98fd75ab78a2c78bd +msgid "There is one PyMuPDF wheel for each platform." +msgstr "" + +#: ../../../changes.txt:174 26bfbd6448824100b418c25086422c6a +msgid "Each wheel works with all supported Python versions." +msgstr "" + +#: ../../../changes.txt:175 604c7e1c324c4008860a6957267ecbea +msgid "" +"Each wheel is built using the oldest supported Python version (currently " +"3.8)." +msgstr "" + +#: ../../../changes.txt:176 d6eb8ebe8d2045438fd3c184ab14e93b +msgid "There is no PyMuPDFb wheel." +msgstr "" + +#: ../../../changes.txt:180 a8f8ac736b8d47e7949081f1a21efec1 +msgid "Improvements to get_text_words() with sort=True." +msgstr "" + +#: ../../../changes.txt:181 596315d45d644ae082739e9d77f3502e +msgid "Tests now always get the latest versions of required Python packages." +msgstr "" + +#: ../../../changes.txt:182 a37a1491df594b928a6f964a83f9a190 +msgid "Removed dependency on setuptools." +msgstr "" + +#: ../../../changes.txt:183 f49604ba7909442495b3f512e738a573 +msgid "Added item to PyMuPDF-1.24.10 changes below - fix of #3630." +msgstr "" + +#: ../../../changes.txt:186 417faf427eba4d01b5dd48a964869021 +msgid "**Changes in version 1.24.10 (2024-09-02)**" +msgstr "" + +#: ../../../changes.txt:188 f91c0ed05c2c4fd09edc380141d28b1b +msgid "Use MuPDF-1.24.9." +msgstr "" + +#: ../../../changes.txt:192 2b4cd5189b694438af8491de2ea10836 msgid "" "**Fixed** `3450 `_: " "get_pixmap function takes too long to process" msgstr "" -#: ../../../changes.txt:12 32735447e8c84c478f17528bf9ddf025 +#: ../../../changes.txt:193 5c9db385314c46bb9c6f9ea1f69d46f5 msgid "" "**Fixed** `3569 `_: " "Invalid OCGs not ignored by SVG image creation" msgstr "" -#: ../../../changes.txt:13 c9298f0b33d94477bd77540281d4a522 +#: ../../../changes.txt:194 05ddb72b9e634cd7af213cb7162237dc msgid "" "**Fixed** `3603 `_: " "ObjStm compression and PDF linearization doesn't work together" msgstr "" -#: ../../../changes.txt:14 4795d607c3694e07be6fb0b9fefdbfa4 +#: ../../../changes.txt:195 53f90f39195c45f3bcbb5cc1961035af msgid "" "**Fixed** `3650 `_: " "Linebreak inserted between each letter" msgstr "" -#: ../../../changes.txt:15 03b867c0d5854aba979c099cef7e3446 +#: ../../../changes.txt:196 3db179fa45464dad9e70414c224247af msgid "" "**Fixed** `3661 `_: " "Update Document to check the /XYZ len" msgstr "" -#: ../../../changes.txt:16 518620787ebe4e38ad0b4f98f446116f +#: ../../../changes.txt:197 6d8ca1f356f142279e8ea68611225998 msgid "" "**Fixed** `3698 `_: " "documentation issue - old code in the annotations documentation" msgstr "" -#: ../../../changes.txt:17 5fd9da15361b4475b8a820a47f8009d0 +#: ../../../changes.txt:198 eef001d4e6ee4f0897dd8c9febd92e82 msgid "" "**Fixed** `3705 `_: " "Document.select() behaves weirdly in some particular kind of pdf files" msgstr "" -#: ../../../changes.txt:18 7c026129e6dc4f1d84d0cdcbdef4841d +#: ../../../changes.txt:199 ca5ca69d6ed24b58ba0338ee8c4020bc msgid "" "**Fixed** `3706 `_: " "extend Document.__getitem__ type annotation to reflect that the method " "also accepts slices" msgstr "" -#: ../../../changes.txt:19 1914cbf8d42348db98a34b61d126fe91 +#: ../../../changes.txt:200 d0edc9f50f66477f9196b9ea1fb49e80 msgid "" "**Fixed** `3727 `_: " "Method get_pixmap() make the program exit without any exceptions or " "messages" msgstr "" -#: ../../../changes.txt:20 75be584295514da99929a88cc9e577fc +#: ../../../changes.txt:201 f650b43986ff4603bc42fcbbde6eda0b msgid "" "**Fixed** `3767 `_: " "Cannot get Tessdata with Tesseract-OCR 5" msgstr "" -#: ../../../changes.txt:21 df563ea6d0af4736a93d1b9fec5a60f3 +#: ../../../changes.txt:202 4fc2a8f8d613411cb5c354a887854dcf msgid "" "**Fixed** `3773 `_: " "Link.set_border gives TypeError: '<' not supported between instances of " "'NoneType' and 'int'" msgstr "" -#: ../../../changes.txt:22 3388f74549f248d3b69aeda3e174b50b +#: ../../../changes.txt:203 d900024628ca4d089aecb0aef12682a8 msgid "" "**Fixed** `3774 `_: " "fitz.__version__` does not work anymore" msgstr "" -#: ../../../changes.txt:23 8d6b24d67a6248528abbefd44d390b55 +#: ../../../changes.txt:204 4007c30d95f84ca8babd2a2350cf4977 msgid "" "**Fixed** `3789 `_: " "ValueError: not enough values to unpack (expected 3, got 2) is thrown " "when call insert_pdf" msgstr "" -#: ../../../changes.txt:24 770d8f1d81114fdfa1cda76f70fe1364 +#: ../../../changes.txt:205 21102be692a24f46b22dddb3a6e21995 msgid "" "**Fixed** `3820 `_: class" " improves namedDest handling" msgstr "" -#: ../../../changes.txt:26 ../../../changes.txt:47 ../../../changes.txt:83 -#: ../../../changes.txt:103 ../../../changes.txt:117 ../../../changes.txt:145 -#: ../../../changes.txt:167 ../../../changes.txt:190 ../../../changes.txt:216 -#: ../../../changes.txt:249 ../../../changes.txt:271 ../../../changes.txt:285 -#: ../../../changes.txt:302 ../../../changes.txt:324 ../../../changes.txt:333 -#: ../../../changes.txt:346 ../../../changes.txt:358 ../../../changes.txt:375 -#: ../../../changes.txt:388 ../../../changes.txt:401 ../../../changes.txt:414 -#: ../../../changes.txt:426 ../../../changes.txt:438 ../../../changes.txt:461 -#: ../../../changes.txt:493 ../../../changes.txt:519 ../../../changes.txt:559 -#: ../../../changes.txt:586 ../../../changes.txt:608 ../../../changes.txt:860 -#: ../../../changes.txt:994 0021ac1eec2c4600af80d537db34d58f -#: 01e033af852745a7b516ac7460c41e64 0234d3b587da47098d09aa7839a5bace -#: 0f43fc50123f48779a17612f30c64e44 18d04dbd0e8f498d952b706798835b4e -#: 19ef3d87ef8f42c197765eb1e61cc42a 1cbcd9993d7c4c94ae438eee0527c831 -#: 22ad501fc0bf4a81af57ba0e558d7705 274b886c521a442b93e97aa9324342be -#: 2b97890ce6904422844f1486cec5d0cb 3f954895ca644bb095b95ff29450c6e4 -#: 4ca04a3eb47e436599110d63aab6dd8f 538cf3424f7f486a91689f65fd74793d -#: 5e5ff649438b47a7b0702d975ffeebca 72582a6c6267466d8142bce907ab3b6a -#: 7a720c6c5d724c15b78bf9f317885e0e 86cc3013ca5f4abe96cb21f44508703f -#: 970c954102824e559abdcdd183341b22 a3a2242c7c1d4012be8d2db3e5c11915 -#: a5ddb319244341a0bbd6f373341933dc b2e086016f7b47129cebe3caa0a6286b -#: b8b975137d2b401b928fdc53d840b333 c5b2e850c743415bbcaacab57d5834c4 -#: c61e08b8cc0946c48b3535de3c571f28 c92f15d97f314130bb6f52ddef099b3d -#: ce1d9487dab44083a659b2bb56725c79 e4a91fc9ad944939a21deeb2ea3abad0 -#: ea29af71ba1741648c3a97452a96617a f0162e858a264886bfd1776ee9094888 -#: f636f4c355554230b4e22f7a9599f515 f92a650e7169470ea29af138769bbc5a -msgid "Other:" +#: ../../../changes.txt:207 da3eb59070604923a017daf4c18f72a1 +msgid "" +"**Fixed** `3630 `_: " +"page.apply_redactions gives unwanted black rectangle" msgstr "" -#: ../../../changes.txt:28 aad92842e5e14e1a9f2105138b24e8af +#: ../../../changes.txt:211 03c28d16dea641f7952aa8ed37aea9fb msgid "" "Object streams and linearization cannot be used together; attempting to " "do so will raise an exception. (#3603)" msgstr "" -#: ../../../changes.txt:30 39b32ce5d1c4417c8ea68b98c9920598 +#: ../../../changes.txt:213 9b2c3f3e7cc34e72b672faa146c88b78 msgid "Fixed handling of non-existing /Contents object." msgstr "" -#: ../../../changes.txt:33 d8b77033198045629fdbd719e735e351 +#: ../../../changes.txt:216 61a174d09cf64eafbdc2367fea6883f5 msgid "**Changes in version 1.24.9 (2024-07-24)**" msgstr "" -#: ../../../changes.txt:35 d64cfc18906b44ada49fc8439969c118 +#: ../../../changes.txt:218 724a59f99c4945c4a6b63a8b411cf9cd msgid "Use MuPDF-1.24.8." msgstr "" -#: ../../../changes.txt:38 998cd7c2212d4c2d8cd35667b6f8fa7c +#: ../../../changes.txt:221 cfdccbd0f77a4cb8bd18f2b27bddc501 msgid "**Changes in version 1.24.8 (2024-07-22)**" msgstr "" -#: ../../../changes.txt:42 2e32393ec47b4991a97e7f2d9bdf63a6 +#: ../../../changes.txt:225 36055284b5504d479b15dbbb81526dd9 msgid "" "**Fixed** `3636 `_: API " "documentation for the open function is not obvious to find." msgstr "" -#: ../../../changes.txt:43 3e7eec78166241c280b63a0df24f0441 +#: ../../../changes.txt:226 1c90ee48b14d4e07960a62223b31bb43 msgid "" "**Fixed** `3654 `_: docx " "parsing was broken in 1.24.7" msgstr "" -#: ../../../changes.txt:44 11ad31f2f9cb4e64b23750a9a9191b42 +#: ../../../changes.txt:227 4611661f80ab4aeca47440e95b0b3f6a msgid "" "**Fixed** `3677 `_: " "Unable to extract subset font name using the newer versions of PyMuPDF : " "1.24.6 and 1.24.7." msgstr "" -#: ../../../changes.txt:45 3d92356bf2644cb1aa30d37804865ed2 +#: ../../../changes.txt:228 35bc435eff28466db744f7b71046c0d2 msgid "" "**Fixed** `3687 `_: " "Page.get_text results in AssertionError for epub files" msgstr "" -#: ../../../changes.txt:49 f1f6647a2b7a43278d4568badbd4af40 +#: ../../../changes.txt:232 cdd79859c92c4b4d80079607b6625111 msgid "Fixed various spelling mistakes spotted by codespell." msgstr "" -#: ../../../changes.txt:50 e31b8f82e7b74943a016817c240cb6d7 +#: ../../../changes.txt:233 90874632a02d437889e6667ae38f29b9 msgid "Improved how we modify MuPDF's default configuration on Windows." msgstr "" -#: ../../../changes.txt:51 45bd3c94b17841dfadb3cc902ad73e1e +#: ../../../changes.txt:234 9a07aff8242f4c7bbc6341a3f228cb9a msgid "Make text search to work with ligatures." msgstr "" -#: ../../../changes.txt:54 56689939b21a49f39008bbaa22157aac +#: ../../../changes.txt:237 2031962ffa474ccda6060efab36150a7 msgid "**Changes in version 1.24.7 (2024-06-26)**" msgstr "" -#: ../../../changes.txt:58 66992320f44f4291a02a8a737e9d5350 +#: ../../../changes.txt:241 065fa22156bc476b854ad82b616afd6b msgid "" "**Fixed** `3615 `_: " "Document.pagemode or Document.pagelayout crashes for epub files" msgstr "" -#: ../../../changes.txt:59 cc4f0126863a4946930707c458672c35 +#: ../../../changes.txt:242 fa3f95dd896e424f9e2565650c51f51a msgid "" "**Fixed** `3616 `_: not " "last version reported" msgstr "" -#: ../../../changes.txt:62 6192d21e865c4fcabc72267962952d9a +#: ../../../changes.txt:245 e2cc189dc2bb4b6da5807f8c63c309ee msgid "**Changes in version 1.24.6 (2024-06-25)**" msgstr "" -#: ../../../changes.txt:64 285c6860bf1b46e3b3df05b0abd74f78 +#: ../../../changes.txt:247 275f70bd5623499798385de0013c8399 msgid "Use MuPDF-1.24.4" msgstr "" -#: ../../../changes.txt:68 a387789d5caf4f8eba78d23908b09e42 +#: ../../../changes.txt:251 79e3898da4734f3481710ed52b676997 msgid "" "**Fixed** `3599 `_: " "Story.fit_width() has a weird line" msgstr "" -#: ../../../changes.txt:69 c38c0fc8859b4241a5eff035f763606d +#: ../../../changes.txt:252 91a6a2f3edfd482aa9e2f515d9baab01 msgid "" "**Fixed** `3594 `_: " "Garbled extraction for Amazon Sustainability Report" msgstr "" -#: ../../../changes.txt:70 7085ac06d6a2429583532043c4e22662 +#: ../../../changes.txt:253 70cce662a06947b3bae489a22703fca3 msgid "" "**Fixed** `3591 `_: " "'width' in Page.get_drawings() returns width equal as 0" msgstr "" -#: ../../../changes.txt:71 0897448c28bb48f4beddf812be91127f +#: ../../../changes.txt:254 de435aab81bf4c479ced7f8a9446c028 msgid "" "**Fixed** `3561 `_: " "ZeroDivisionError: float division by zero with page.apply_redactions()" msgstr "" -#: ../../../changes.txt:72 6b917cd316f049a0aa89043b19d6880d +#: ../../../changes.txt:255 44ec6c6728bd4c22be81f25974b6d97c msgid "" "**Fixed** `3559 `_: " "SegFault 11 when empty H1 H2 H3 H4 etc element is used in insert_htmlbox" msgstr "" -#: ../../../changes.txt:73 c54372fe7ab8479a9b6135980aa6727b +#: ../../../changes.txt:256 31e1c8d1ff9c495dac1362f65a21fbe9 msgid "" "**Fixed** `3539 `_: Add " "dotted gridline detection to table recognition" msgstr "" -#: ../../../changes.txt:74 924c94296f514d418293b7e18d75779d +#: ../../../changes.txt:257 8ca698e815434768bdc95208f6e5c273 msgid "" "**Fixed** `3519 `_: " "get_toc(simple=False) AttributeError: 'Outline' object has no attribute " "'rect'" msgstr "" -#: ../../../changes.txt:75 d5b36da670fd4463a18f5db8e25602b4 +#: ../../../changes.txt:258 247415af0e46448cab170bc8a456d15f msgid "" "**Fixed** `3510 `_: " "page.get_label() gets wrong label on the first page of doc" msgstr "" -#: ../../../changes.txt:76 97f9ad4fb924421c943727d952c2ab76 +#: ../../../changes.txt:259 a39d2c878ec842e3bfaaad8a0b6ee170 msgid "" "**Fixed** `3494 `_: " "1.24.2/1.24.3: spurious characters introduced when using subset_fonts and" " insert_pdf" msgstr "" -#: ../../../changes.txt:77 89e7c6a908354056837ecc4339f7f634 +#: ../../../changes.txt:260 20cca7e66cf14f38b869027fe95cb925 msgid "" "**Fixed** `3470 `_: " "subset_fonts error exit without exception/warning" msgstr "" -#: ../../../changes.txt:78 a8b51a35122a46079d8b0d5a42e445ad +#: ../../../changes.txt:261 2d654390f9f34e3da7c49ac149eb3421 msgid "" "**Fixed** `3400 `_: " "set_toc alters link coordinates for some rotated pages on pymupdf 1.24.2" msgstr "" -#: ../../../changes.txt:79 53086e71ca6643f5aa2204c84548a9d2 +#: ../../../changes.txt:262 a168c8281de84b57bd2fb3fd05c938cf msgid "" "**Fixed** `3347 `_: " "Incorrect links to points on pages having different heights" msgstr "" -#: ../../../changes.txt:80 8826e9c2695349efb913a48e99ddb104 +#: ../../../changes.txt:263 c2ac43a9173a42b9a52f445c0f1c1e21 msgid "" "**Fixed** `3237 `_: " "Set_metadata() does not work" msgstr "" -#: ../../../changes.txt:81 45f7b2b5ec62431daf06f03f76b56444 +#: ../../../changes.txt:264 a3a409d493b4421cb9bec08391e3fe3b msgid "" "**Fixed** `3493 `_: " "Isolate PyMuPDF from other libraries; issues when PyMuPDF is loaded with " "other libraries like GdkPixbuf" msgstr "" -#: ../../../changes.txt:85 6fe7cf4a14d54675bb29fe2fbbef7c3c +#: ../../../changes.txt:268 d5df9d7f9bd641a0bf62fd6c664622d8 msgid "" "Fixed concurrent use of PyMuPDF caused by use of constant temporary " "filenames." msgstr "" -#: ../../../changes.txt:87 b8c3578bca1e453596db8544666fa506 +#: ../../../changes.txt:270 7740388431174845b2d788a15675dee6 msgid "Add musllinux x86_64 wheels to release." msgstr "" -#: ../../../changes.txt:89 dbabb3cc320745908bd57be31a0ac7a0 +#: ../../../changes.txt:272 362e94b043be493ba75a17c338748497 msgid "Added clearer version information:" msgstr "" -#: ../../../changes.txt:91 0c628ceb28ca4588a8f6bbf97f70180b +#: ../../../changes.txt:274 c4d0619a541a45cb92e5361065bb48b1 msgid "`pymupdf.pymupdf_version`." msgstr "" -#: ../../../changes.txt:92 ddc95a8248f64477bcfeea2c51953ebd +#: ../../../changes.txt:275 bcde4e1785e54d109152991515f06628 msgid "`pymupdf.mupdf_version`." msgstr "" -#: ../../../changes.txt:93 6a1720e7c01646f8bba4a9423812526b +#: ../../../changes.txt:276 8076fdcb1f5140b88e61570245c98693 msgid "`pymupdf.pymupdf_date`." msgstr "" -#: ../../../changes.txt:96 874e466e4a224e20877f2c69c932bba8 +#: ../../../changes.txt:279 2dd3fcec4770444d8894974e3508f752 msgid "**Changes in version 1.24.5 (2024-05-30)**" msgstr "" -#: ../../../changes.txt:100 ee02ce97b69845c1a244756a3a9af54f +#: ../../../changes.txt:283 f666428db30d40e6b94b0244290bd045 msgid "" "**Fixed** `3479 `_: " "regression: fill_textbox: IndexError: pop from empty list" msgstr "" -#: ../../../changes.txt:101 5a371322242046ce94222dc6275bf1f4 +#: ../../../changes.txt:284 6bbeef393d754a509f3b5e4b7821549d msgid "" "**Fixed** `3488 `_: " "set_toc method error" msgstr "" -#: ../../../changes.txt:105 f876dba0b87640c08d7d02f77a8189ff +#: ../../../changes.txt:288 0ea44f262e8d4df995dcedebc1053fe2 msgid "Some more fixes to use MuPDF floating formatting." msgstr "" -#: ../../../changes.txt:106 56636ebb4bc94633b543ab688daa5aee +#: ../../../changes.txt:289 8dc51219115e4d24849d39ebd871f3e3 msgid "Removed/disabled some unnecessary diagnostics." msgstr "" -#: ../../../changes.txt:107 c89f9af6621042cf9446027c02d4f708 +#: ../../../changes.txt:290 0b9a119f8faa451cba61e353c6d55481 msgid "Fixed utils.do_links() crash." msgstr "" -#: ../../../changes.txt:108 a0e9b7154d3e48ba855d9e1f90774814 +#: ../../../changes.txt:291 147edf83380d4249b8c8e6248b5bfa3e msgid "" "Experimental new functions `pymupdf.apply_pages()` and " "`pymupdf.get_text()`." msgstr "" -#: ../../../changes.txt:109 24c24f6ed3a74f3c816e070ba4204d26 +#: ../../../changes.txt:292 c01954be993f4eb79afe8c14db8cc079 msgid "Addresses wrong label generation for label styles \"a\" and \"A\"." msgstr "" -#: ../../../changes.txt:112 6ead71dbcb124431b2a2abde4557df57 +#: ../../../changes.txt:295 17f8e93957d448988cad9a8f2bbd1856 msgid "**Changes in version 1.24.4 (2024-05-16)**" msgstr "" -#: ../../../changes.txt:114 a31fb5e1cb6149d5ad377d3022fa5c4d +#: ../../../changes.txt:297 8739bae3939441f4b5fa661332b0292d msgid "" "**Fixed** `3418 `_: Re-" "introduced bug, text align add_redact_annot" msgstr "" -#: ../../../changes.txt:115 d4af0b1c02be4583aab2aad708cc54e6 +#: ../../../changes.txt:298 7364b0e0566b48b48ab5379a8133dc60 msgid "" "**Fixed** `3472 `_: " "insert_pdf gives SystemError" msgstr "" -#: ../../../changes.txt:119 5fae02c1a4884ef2ad736a10df190b88 +#: ../../../changes.txt:302 bf397a0dd1834ca3baea98e4b30749e5 msgid "" "Fixed sysinstall test failing to remove all of prior installation before " "new install." msgstr "" -#: ../../../changes.txt:121 1df995e07d0941c9a0208508b0b769a0 +#: ../../../changes.txt:304 4f4d2aa8272445c98a5af91511057bf1 msgid "Fixed `utils.do_links()` crash." msgstr "" -#: ../../../changes.txt:122 4c6a508ca6164bd68331b3ef2e8ee92d +#: ../../../changes.txt:305 827df41b996b49cf8389603b3342e5e8 msgid "Correct `TextPage` creation Code." msgstr "" -#: ../../../changes.txt:123 10391dca85ce4196956b900c68896a3a +#: ../../../changes.txt:306 4861824e32fc4bc7a1f4c6652ecaa071 msgid "Unified various diagnostics." msgstr "" -#: ../../../changes.txt:124 4f2645f21c3f4245a209a5314a29cfdf +#: ../../../changes.txt:307 756402854b584d1fb9461309d6f24941 msgid "Fix bug in `page_merge()`." msgstr "" -#: ../../../changes.txt:127 6faddba426c74b55b982e8c635af454c +#: ../../../changes.txt:310 01ab99257c0b4d99ae865583a74141c7 msgid "**Changes in version 1.24.3 (2024-05-09)**" msgstr "" -#: ../../../changes.txt:130 0991aec042b54f959bc606d8d415dce0 +#: ../../../changes.txt:313 4ffc23d07b214eeba05e2d48125f92a9 msgid "" "The Python module is now called `pymupdf`. `fitz` is still supported for " "backwards compatibility." msgstr "" -#: ../../../changes.txt:133 aa2322eba25d4f83aaec40fe5723375f +#: ../../../changes.txt:316 7bd8f476d4774611b422f963389b013f msgid "Use MuPDF-1.24.2." msgstr "" -#: ../../../changes.txt:137 d5dbb21e46fb4c8db5f8dc3a86a1bd8e +#: ../../../changes.txt:320 c20ab64b9e7a49949e0555bad8ced17f msgid "" "**Fixed** `3357 `_: " "PyMuPDF==1.24.0 will hanging when using page.get_text(\"text\")" msgstr "" -#: ../../../changes.txt:138 2204c6eb56c340ce93ca3ba1967f3545 +#: ../../../changes.txt:321 c10db0fa5995470888a5adfbc25004e7 msgid "" "**Fixed** `3376 `_: " "Redacting results are not as expected in 1.24.x." msgstr "" -#: ../../../changes.txt:139 6bfbf9051941419ba23a581acc685d44 +#: ../../../changes.txt:322 bef45b21f5a347399f100596e98c46be msgid "" "**Fixed** `3379 `_: " "Documentation mismatch for get_text_blocks return value order." msgstr "" -#: ../../../changes.txt:140 6323f417d3c1488597856df9d5f954d4 +#: ../../../changes.txt:323 14283f78151946ae9f3ce5e5dafc8294 msgid "" "**Fixed** `3381 `_: " "Contents stream contains floats in scientific notation" msgstr "" -#: ../../../changes.txt:141 2339e1b505f24b51ad347a755dd4100f +#: ../../../changes.txt:324 e88a6a4318f84720a88b41dad94489b9 msgid "" "**Fixed** `3402 `_: " "Cannot add Widgets containing inter-field-calculation JavaScript" msgstr "" -#: ../../../changes.txt:142 277c8739149744b088786ee1b5c4bf3f +#: ../../../changes.txt:325 10f281049ef04d24a0b23f6bef0424ea msgid "" "**Fixed** `3414 `_: " "missing attribute set_dpi()" msgstr "" -#: ../../../changes.txt:143 19f3dbb4fc034ad589697a215c8bf3ff +#: ../../../changes.txt:326 77dbfa0dd18549f3a95c01ed17ec1de9 msgid "" "**Fixed** `3430 `_: " "page.get_text() cause process freeze with certain pdf on v1.24.2" msgstr "" -#: ../../../changes.txt:147 ../../../changes.txt:169 -#: 2cd8e262477f43ee8afce7e5947ac7d5 8a07cec214584ad298b2c0446bb78603 +#: ../../../changes.txt:330 ../../../changes.txt:352 +#: 13f90c207375462d9e95a5b927305290 b96f74bc921c4b8d8f60b6c26827655e msgid "New/modified methods:" msgstr "" -#: ../../../changes.txt:149 d3f73e6904684d5081cd52820fdca243 +#: ../../../changes.txt:332 a8c00735e8c44a398f31ba5211f477a9 msgid "" "`Page.remove_rotation()`: new, set page rotation to zero while keeping " "appearance." msgstr "" -#: ../../../changes.txt:151 f5eb96fe4ad34edea684f68a7f88f361 +#: ../../../changes.txt:334 c0f0a981cebb4324bb0d6cbb9a488d2f msgid "Fixed some problems when checking for PDF properties." msgstr "" -#: ../../../changes.txt:152 99fc090a1f2e48429e610e2117fa9222 +#: ../../../changes.txt:335 4156f92b39764681b2af919228763a1d msgid "" "Fixed pip builds from sdist (see discussion `3360 " "`_: Alpine linux " @@ -531,194 +1060,194 @@ msgid "" "pymupdfb==1.24.1\")." msgstr "" -#: ../../../changes.txt:157 4d640abf31614f988c95bf406ec45035 +#: ../../../changes.txt:340 81fe36d8869a443da05135ea366195cb msgid "**Changes in version 1.24.2 (2024-04-17)**" msgstr "" -#: ../../../changes.txt:159 01380033c1cb4a769e6eda79553df412 +#: ../../../changes.txt:342 0a9a3d2c9bba493792d89bc7cc65d28e msgid "" "Removed obsolete classic implementation from releases (previously " "available as module `fitz_old`)." msgstr "" -#: ../../../changes.txt:164 0bc210ac11bd4e45b8a2c171d6dae776 +#: ../../../changes.txt:347 7488698997974b779a59ce150f0bbf76 msgid "" "**Fixed** `3331 `_: " "Document.pages() is incorrectly type-hinted" msgstr "" -#: ../../../changes.txt:165 12d30c33d8e147cdbd019ad2d83372fb +#: ../../../changes.txt:348 2f00b9289d9240e3a3b48c0ebaef16ba msgid "" "**Fixed** `3354 `_: " "PyMuPDF==1.24.1: AttributeError: property 'metadata' of 'Document' object" " has no setter" msgstr "" -#: ../../../changes.txt:171 9c2b5a85b1bb445c827a8895b85e8922 +#: ../../../changes.txt:354 2d9e11b01ffb4035b7b8e491a602bf1a msgid "`Document.bake()`: new, make annotations / fields permanent content." msgstr "" -#: ../../../changes.txt:172 4c980a07eaeb4b1b9eb18e4846153da2 +#: ../../../changes.txt:355 92bbbf2759024b76a4aedeb72838309a msgid "" "`Page.cluster_drawings()`: new, identifies drawing items (i.e. vector " "graphics or line-art) that belong together based on their geometrical " "vicinity." msgstr "" -#: ../../../changes.txt:175 b17bf6b6bb2847f584709ce0acef7d59 +#: ../../../changes.txt:358 8c8e94031bc549368b1ac7e9a3718cd7 msgid "`Page.apply_redactions()`: added new parameter `text`." msgstr "" -#: ../../../changes.txt:176 2ebdc33f010c459894accd68455947c9 +#: ../../../changes.txt:359 2b42cb04d83b440b8af4da151920f352 msgid "" "`Document.subset_fonts()`: use MuPDF's `pdf_subset_fonts()` instead of " "PyMuPDF code." msgstr "" -#: ../../../changes.txt:178 db8b5a7697084b78a2429f69c0ea6ca3 +#: ../../../changes.txt:361 5e5df78f5bee47d897bf743b1b8ef355 msgid "The `Document` class now supports page numbers specified as slices." msgstr "" -#: ../../../changes.txt:179 dd7c870469524814abecb57b1afa8ee8 +#: ../../../changes.txt:362 9c93dc2dbbdf41ba9096a815dbd42ad3 msgid "Avoid causing MuPDF warnings." msgstr "" -#: ../../../changes.txt:182 026c5da1ee7f4dc1803ea2aafd28d482 +#: ../../../changes.txt:365 c79d56bf10734acaa3b2b7f6a97e4e53 msgid "**Changes in version 1.24.1 (2024-04-02)**" msgstr "" -#: ../../../changes.txt:186 2ce56567c0dd45e79b9d3d663bb51d99 +#: ../../../changes.txt:369 56f52960edef4cf599266101cda45e41 msgid "" "**Fixed** `3278 `_: " "apply_redactions moves some unredacted text" msgstr "" -#: ../../../changes.txt:187 5ca099e47dd447928b27ed6baf6e5e9c +#: ../../../changes.txt:370 2691e44a30b14dd7a0cafb5b685b912b msgid "" "**Fixed** `3301 `_: Be " "more permissive when classifying links as kind LINK_URI" msgstr "" -#: ../../../changes.txt:188 886e2838dd5a4914826234a076da2b73 +#: ../../../changes.txt:371 e5e29a5f647b4d238ed6a0f2ae20b57b msgid "" "**Fixed** `3306 `_: Text " "containing capital 'ET' not appearing as annotation" msgstr "" -#: ../../../changes.txt:192 d209b92298594d0789968a2baf1b47d2 +#: ../../../changes.txt:375 f40db39c2b1641688f82891b969ca3ba msgid "Use MuPDF-1.24.1." msgstr "" -#: ../../../changes.txt:193 cfb927c75a9c44cb8e97e1dc5a9f6010 +#: ../../../changes.txt:376 f665ada34f4c42a5a9dc3abb208d526e msgid "" "Support ObjStm Compression. Methods `Document.save()`, " "`Document.ez_save()` and `Document.write()` now support new parameters " "`use_objstm`, compression_effort` and `preserve_metadata`." msgstr "" -#: ../../../changes.txt:199 2412e57c057c4688a9e17289fb2c4c96 +#: ../../../changes.txt:382 0f152f480505446891857278644223a6 msgid "**Changes in version 1.24.0 (2024-03-21)**" msgstr "" -#: ../../../changes.txt:203 ebccc8b8a63641d4b4ba4fff90cda1bf +#: ../../../changes.txt:386 b01ae7a8cfa74c74ba633d65d02bcaac msgid "" "**Fixed** `3281 `_: " "Preparing metadata (pyproject.toml) did not run successfully" msgstr "" -#: ../../../changes.txt:204 fd2537c425d64a0e925a5bebcae4b5cf +#: ../../../changes.txt:387 3c9ba180fba24f1ca991629b2eb8b9c8 msgid "" "**Fixed** `3279 `_: " "PyMuPDF no longer builds in Alpine Linux" msgstr "" -#: ../../../changes.txt:205 657e6d7f712a48608ae5166cc2100395 +#: ../../../changes.txt:388 0c35d5ebac3a487fa1d60e2f48d711fd msgid "" "**Fixed** `3257 `_: " "apply_redactions() deleting text outside of annoted box" msgstr "" -#: ../../../changes.txt:206 1be75d5344634ed28d43bacb3589ddde +#: ../../../changes.txt:389 8f163469fef6461dbda83305263f0d7f msgid "" "**Fixed** `3216 `_: " "AttributeError: 'Annot' object has no attribute '__del__'" msgstr "" -#: ../../../changes.txt:207 5b91b8a58f41407e9911629dfd26fcc7 +#: ../../../changes.txt:390 a65a40e81c994596b74cc40aaeed0cc2 msgid "" "**Fixed** `3207 `_: " "get_drawings's items is missing line from h path operator" msgstr "" -#: ../../../changes.txt:208 3bb71bb9e08443f9acd44cf702618675 +#: ../../../changes.txt:391 21fc37fb9749416e833408ce04822880 msgid "" "**Fixed** `3201 `_: " "Memory leaks when merging PDFs" msgstr "" -#: ../../../changes.txt:209 5085b1065a5b4befb91ae4e0a035c87e +#: ../../../changes.txt:392 7948f671aa924ce1a8bbc2a83a1fde30 msgid "" "**Fixed** `3197 `_: " "page.get_text() returns hexadecimal text for some characters" msgstr "" -#: ../../../changes.txt:210 8a1a92e82af641d19619d7585687f45f +#: ../../../changes.txt:393 7e5c6015e0d44ee3bdade1dfd9f5b502 msgid "" "**Fixed** `3196 `_: " "Remove text not working in 1.23.25 version vs 1.20.2" msgstr "" -#: ../../../changes.txt:211 86aa65c487e7408286fa26a1f20fdbc3 +#: ../../../changes.txt:394 c072490998984668b0cf1c209cbfa50b msgid "" "**Fixed** `3172 `_: PDF's" " 45º lines dissapearing in png conversion" msgstr "" -#: ../../../changes.txt:212 bce2f70bd0e044eaa56172ca86a247b8 +#: ../../../changes.txt:395 502c8ffdae6f4d79ad2b008e4e3df49d msgid "" "**Fixed** `3135 `_: Do " "not log warnings to stdout" msgstr "" -#: ../../../changes.txt:213 a0bd2cf660f74a2c82e9377af6baa19f +#: ../../../changes.txt:396 88aa9921095b44e5a24f553963d3edd8 msgid "" "**Fixed** `3125 `_: " "get_pixmap method stuck on one page and runs forever" msgstr "" -#: ../../../changes.txt:214 2a207cfa283e40f8959e923568812d9c +#: ../../../changes.txt:397 a086b013741242e78fbe36d569881bfb msgid "" "**Fixed** `2964 `_: There" " is an issue with the image generated by the page.get_pixmap() function" msgstr "" -#: ../../../changes.txt:218 f1222ff00fe64ad7a8314eacf726e925 +#: ../../../changes.txt:401 de6e5174a6054dfc8c68e805edbb47e1 msgid "Use MuPDF-1.24.0." msgstr "" -#: ../../../changes.txt:219 41d7665a4b234ef1a97ad7b99a5489cb +#: ../../../changes.txt:402 ea4d02f0f40848ae9ea749edf5d94048 msgid "Add support for redacting vector graphics." msgstr "" -#: ../../../changes.txt:220 0c1eb02a99bb44c686f8e2200b083d29 +#: ../../../changes.txt:403 c72b7b0c692046aa8483eac92d99df40 msgid "Several fixes for table module" msgstr "" -#: ../../../changes.txt:222 5687b519eea04d298de0f0bdf1cb6cd4 +#: ../../../changes.txt:405 e2a901b4ec2f4d59afdac23bbeaa3f99 msgid "Add new method for outputting the table as a markdown string." msgstr "" -#: ../../../changes.txt:224 d1691c0498ac498d96f95887f7069aae +#: ../../../changes.txt:407 bce2303d13e643c2b9b41b1ebabfa8a8 msgid "Address errors in computing the table header object:" msgstr "" -#: ../../../changes.txt:226 943ae1f2c5614e3aa813cf2d130763ba +#: ../../../changes.txt:409 e2d8f9b142b74ee8adfe325018d9edc4 msgid "" "We now allow None as the cell value, because this will be resolved where " "needed (e.g. in the pandas DataFrame)." msgstr "" -#: ../../../changes.txt:229 10173cdc7501400d9541d8356a947922 +#: ../../../changes.txt:412 c7e3e62b890348239221f07f267b4f10 msgid "" "We previously tried to enforce rect-like tuples in all header cell " "bboxes, however this fails for tables with all-None columns. This fix " @@ -726,180 +1255,180 @@ msgid "" "string." msgstr "" -#: ../../../changes.txt:234 dda36d47f8b34c4fa4129087a6ec4ee3 +#: ../../../changes.txt:417 1a9c7e169b7e42019997dd03a0d31a68 msgid "" "We now correctly include start / stop points of lines in the bbox of the " "clustered graphic. We previously joined the line's rectangle - which had" " no effect because this is always empty." msgstr "" -#: ../../../changes.txt:238 3031bed16c054e8d91e95a1db68f160b +#: ../../../changes.txt:421 e810eae0f82142a689d28c2b5388d785 msgid "Improved exception text if we fail to open document." msgstr "" -#: ../../../changes.txt:239 b81f8f2f08a94a949c003c10eae4a6a5 +#: ../../../changes.txt:422 b466bce735a2416da76262d5b4a5968d msgid "Fixed build with new libclang 18." msgstr "" -#: ../../../changes.txt:242 a748391072ea46efa5b42d094f20eb50 +#: ../../../changes.txt:425 8c5b68d084164dafbf64758c244d9e8d msgid "**Changes in version 1.23.26 (2024-02-29)**" msgstr "" -#: ../../../changes.txt:246 a35742b145de43e09c98fe0f45c8a3ac +#: ../../../changes.txt:429 2ccf8fac8a4b446194628eda23d3f584 msgid "" "**Fixed** `3199 `_: Add " "entry_points to setuptools configuration to provide command-line console " "scripts" msgstr "" -#: ../../../changes.txt:247 6340fcbc945847deb63ffd1e09abcd8c +#: ../../../changes.txt:430 41d8053f4c2e43d5aaf9257dd8beeb07 msgid "" "**Fixed** `3209 `_: Empty" " vertices in ink annotation" msgstr "" -#: ../../../changes.txt:251 f5881854783a420f905b4a56c438ae53 +#: ../../../changes.txt:434 902727a625874df6ad9e266c98d97b6a msgid "Improvements to table detection:" msgstr "" -#: ../../../changes.txt:253 c0cc54a9687c4a41ab4d9bc16ad8d284 +#: ../../../changes.txt:436 b57aa583ca8743b9988c9580bc62d293 msgid "" "Improved check for empty tables, fixes bugs when determining table " "headers." msgstr "" -#: ../../../changes.txt:254 7e755a7b192c44068c2fb78fafc2ba80 +#: ../../../changes.txt:437 59b877fa13a44dfc806abfeef1f21a15 msgid "Improved computation of enveloping vector graphic rectangles." msgstr "" -#: ../../../changes.txt:255 5281817f420c46dbb2e642dd27370b51 +#: ../../../changes.txt:438 9c0e7c8d4573405dbb14c78024bd29c9 msgid "Ignore more meaningless \"pseudo\" tables" msgstr "" -#: ../../../changes.txt:257 4c02d3deb8e44835947c2ba62f788e8c +#: ../../../changes.txt:440 233a4100525444829bb2577a7690ba01 msgid "Install command-line 'pymupdf' command that runs fitz/__main__.py." msgstr "" -#: ../../../changes.txt:258 f53fb7ebe7fa4c62b319a4067a450e00 +#: ../../../changes.txt:441 ed88f84097ca4b6e801b41e90c81f002 msgid "Don't overwrite MuPDF's config.h when building on non-Windows." msgstr "" -#: ../../../changes.txt:259 3de16fef89704694b95157fc1cea7dc1 +#: ../../../changes.txt:442 59cc8cec3ce643d2b573db42561040ab msgid "" "Fix `Story` constructor's `archive` arg to match docs - now accepts a " "single `Archive` constructor arg." msgstr "" -#: ../../../changes.txt:260 ecac0b8d70b041b7ba3dc388537993b5 +#: ../../../changes.txt:443 30af29dadb6b4ec1a19ec56a3f5d231a msgid "" "Do not include MuPDF source in sdist; will be downloaded automatically " "when building." msgstr "" -#: ../../../changes.txt:263 a1a6b413d7724d08a2f7dac522dac334 +#: ../../../changes.txt:446 d1b07a84a69c464cbc1872f66a847288 msgid "**Changes in version 1.23.25 (2024-02-20)**" msgstr "" -#: ../../../changes.txt:267 394abd4f074e4756a36b54b5a67cd8db +#: ../../../changes.txt:450 cdf25137e0fb4ce98670f3181f765448 msgid "" "**Fixed** `3182 `_: " "Pixmap.invert_irect argument type error" msgstr "" -#: ../../../changes.txt:268 b95eea30a1ed4dc6bedbf87a6361901e +#: ../../../changes.txt:451 1d72c835607449caa408e50688dfb503 msgid "" "**Fixed** `3186 `_: " "extractText() extracts broken text from pdf" msgstr "" -#: ../../../changes.txt:269 5a653ab132854bb79c3022aace74fe7f +#: ../../../changes.txt:452 de265933324348f58529a7f8b8d955c4 msgid "" "**Fixed** `3191 `_: Error" " on .find_tables()" msgstr "" -#: ../../../changes.txt:273 853732a7875243198923c39fd78bb33c +#: ../../../changes.txt:456 c9d376636fe340e889660b3bf5d0e99a msgid "" "When building, be able to specify python-config directly, with " "environment variable `PIPCL_PYTHON_CONFIG`." msgstr "" -#: ../../../changes.txt:277 8d1b3fd42f1b4b33a6b2a4d150b5550d +#: ../../../changes.txt:460 128746cdefa94dc58c8ef1587ace5b5a msgid "**Changes in version 1.23.24 (2024-02-19)**" msgstr "" -#: ../../../changes.txt:281 9f5342e3ee5145acbf436c8ef0409fae +#: ../../../changes.txt:464 0777e9a86a4744479f489d2fa4ea0607 msgid "" "**Fixed** `3148 `_: Table" " extraction - vertical text not handled correctly" msgstr "" -#: ../../../changes.txt:282 f1889f4fb6db402ba69bfba2c2eb2667 +#: ../../../changes.txt:465 d6f5b711c4d94d8c9ca83cbb81c78789 msgid "" "**Fixed** `3179 `_: Table" " Detection: Incorrect Separation of Vector Graphics Clusters" msgstr "" -#: ../../../changes.txt:283 2dabcbe71c7b470bbb2f1130c0fd7fba +#: ../../../changes.txt:466 4c0194ff72e346a7ad233ea6d81875b4 msgid "" "**Fixed** `3180 `_: " "Cannot show optional content group: AttributeError: module 'fitz.mupdf' " "has no attribute 'pdf_array_push_drop'" msgstr "" -#: ../../../changes.txt:287 326f3d5bb05c4ba09a4c478cd805c9f8 +#: ../../../changes.txt:470 759fccf21d2f4a74a4a2b91ebab5d482 msgid "Be able to test system install using `sudo pip install` instead of a venv." msgstr "" -#: ../../../changes.txt:290 8ab986ed46cd4ef181f586480ed3e424 +#: ../../../changes.txt:473 788dfa9273434895b432ccb00c93e69a msgid "**Changes in version 1.23.23 (2024-02-18)**" msgstr "" -#: ../../../changes.txt:294 53b7cdbe7fe2498993e034c04663e326 +#: ../../../changes.txt:477 2bcb0741150641bd9887ffbbda0317c8 msgid "" "**Fixed** `3126 `_: " "Initialising Archive with a pathlib.Path fails." msgstr "" -#: ../../../changes.txt:295 88fc689f049b4bfd86515b9b38c5e027 +#: ../../../changes.txt:478 e35256f482a449c08e2d6672dff6d343 msgid "" "**Fixed** `3131 `_: " "Calling the next attribute of an Annot raises a \"No attribute .parent\" " "warning" msgstr "" -#: ../../../changes.txt:296 5d1052a051144039a0bb3c3a6ce243cd +#: ../../../changes.txt:479 88b148b9eba840b6ac253d98a2093281 msgid "" "**Fixed** `3134 `_: Using" " an IRect as clip parameter in Page.get_pixmap no longer works since " "1.23.9" msgstr "" -#: ../../../changes.txt:297 22fd229de5834cb28677da4964624e5c +#: ../../../changes.txt:480 9a53f89e825048439025863c9d4eae37 msgid "" "**Fixed** `3140 `_: PDF " "document stays in use after closing" msgstr "" -#: ../../../changes.txt:298 1060f5d5758a4fa2be3d8d705a712490 +#: ../../../changes.txt:481 8bfed5fa15c74c5b85cf71e521ab6842 msgid "" "**Fixed** `3150 `_: " "doc.select() hangs on this doc." msgstr "" -#: ../../../changes.txt:299 907fe5e4a90f49198c550914ea25760f +#: ../../../changes.txt:482 d8cc3717f051461cb6673fd2dac2c31d msgid "" "**Fixed** `3163 `_: " "AssertionError on using fitz.IRect" msgstr "" -#: ../../../changes.txt:300 789d5b5099bd4feda75ac7546d71a85a +#: ../../../changes.txt:483 4f03f7c527ce440faa03a653869192ae msgid "" "**Fixed** `3177 `_: " "fitz.Pixmap(None, pix) Unrecognised args for constructing Pixmap" msgstr "" -#: ../../../changes.txt:305 4d6a48ec294d47a5999419d11ed50d5f +#: ../../../changes.txt:488 fb974c6a5bb64b938bfa47a71b1eb83e msgid "" "Improved `Document.select() by using new MuPDF function " "`pdf_rearrange_pages()`. This is a more complete (and faster) " @@ -909,897 +1438,893 @@ msgid "" "Content definitions." msgstr "" -#: ../../../changes.txt:311 079b298aea8740ec81730bfa3ec1b0a5 +#: ../../../changes.txt:494 e69a3589ce184698bcc2f17f20427379 msgid "`TextWriter.appendv()`: added `small_caps` arg." msgstr "" -#: ../../../changes.txt:312 56bb5cefcb3b4d4590e0bd40824ab303 +#: ../../../changes.txt:495 884a541495bd45ae8adbf342ca3ba2f0 msgid "Fixed some valgrind errors with MuPDF master." msgstr "" -#: ../../../changes.txt:313 305345f67c0345d1a3ffaba56d142fa1 +#: ../../../changes.txt:496 3c640f756bdc4375801570fef032166d msgid "Fixed `Document.insert_image()` when build with MuPDF master." msgstr "" -#: ../../../changes.txt:316 740e3a147a64486a9ee879beec1207e5 +#: ../../../changes.txt:499 d8fd69d2be0e4ca092fd23c9235ae02c msgid "**Changes in version 1.23.22 (2024-02-12)**" msgstr "" -#: ../../../changes.txt:320 55314e3d3c184109a2bc9a77cefab4fa +#: ../../../changes.txt:503 e378f2374df04952a72be635791bdea3 msgid "" "**Fixed** `3143 `_: " "Difference in decoding of OCGs names between doc.get_ocgs() and " "page.get_drawings()" msgstr "" -#: ../../../changes.txt:322 99cd19d66fff416b9461b5cbd2574d35 +#: ../../../changes.txt:505 c4c2fa5c579b46b280156b50a2e4aff1 msgid "" "**Fixed** `3139 `_: " "Pixmap resizing needs positional arg \"clip\" - even if None." msgstr "" -#: ../../../changes.txt:326 b6fd811d084947969f226f6947319de7 +#: ../../../changes.txt:509 1d6171c3fe414d3492c08c2877177935 msgid "Removed the use of MuPDF function `fz_image_size()` from PyMuPDF." msgstr "" -#: ../../../changes.txt:329 e047b6b3070743b48fa05662cb7a5042 +#: ../../../changes.txt:512 12a0c3980aba477ba7505402411f7e1f msgid "**Changes in version 1.23.21 (2024-02-01)**" msgstr "" -#: ../../../changes.txt:335 8c5546fdfc794766a252bc4bfaf5b39c +#: ../../../changes.txt:518 1dee7842885a428383fdd421f24e82ec msgid "" "Fixed bug in set_xml_metadata(), PR `3112 " "https://github.com/pymupdf/PyMuPDF/pull/3112>`_: Fix pdf_add_stream " "metadata error" msgstr "" -#: ../../../changes.txt:336 57de90013979427d9f32097bbbe24b69 +#: ../../../changes.txt:519 4f2d5b1a58814d3c80f8daaf4c0b7ee0 msgid "Fixed lack of `.parent` member in `TextPage` from `Annot.get_textpage()`." msgstr "" -#: ../../../changes.txt:337 8b1537d86d51407d8edcd6e72bb57926 +#: ../../../changes.txt:520 0bfd6a220a4649ccb00804b1fe8b7201 msgid "Fixed bug in `Page.add_widget()`." msgstr "" -#: ../../../changes.txt:340 4cf808c0e6ec49e1813c065056c2f850 +#: ../../../changes.txt:523 340415b6e2ce4df48b9487e08c196ff7 msgid "**Changes in version 1.23.20 (2024-01-29)**" msgstr "" -#: ../../../changes.txt:342 ../../../changes.txt:353 ../../../changes.txt:371 -#: ../../../changes.txt:383 ../../../changes.txt:397 ../../../changes.txt:410 -#: ../../../changes.txt:421 ../../../changes.txt:433 ../../../changes.txt:457 -#: ../../../changes.txt:577 ../../../changes.txt:594 ../../../changes.txt:626 -#: ../../../changes.txt:683 ../../../changes.txt:759 ../../../changes.txt:793 -#: ../../../changes.txt:802 ../../../changes.txt:811 ../../../changes.txt:829 -#: ../../../changes.txt:929 ../../../changes.txt:968 -#: 3b532c1ff1c646949f37ec0c3e6b80ae 3f424ddf76f94d0cb806e7c4516adf91 -#: 3f75b772102b4683bbb658dd5c4a522e 421de6deed654d55954157f8d78f2f75 -#: 49ce936705c742d09524deeb55021b78 50cea935c6154d3ea024b4e1f674cd76 -#: 5340f630122e4735b5642bec92105302 5f270b010d374012b480a12c80cb76e0 -#: 5ff3d8b074874060b640e8ab536d556f 692fdad37703449d863d2d00222be0e6 -#: 6a479c0c73da4d54984dee1868a9fbe0 6fe913128f944fa3a38aa0cee6fd1716 -#: 84996d41e35b4cb2bcb961b613798f92 9c1bf49e4c5e4406ab78d0a1c4cc4e1b -#: a28e96917b7d41d1b1cb9a46d399ac0f b79f5a291b3443408024c990344724f5 -#: c6ef5771ac3142dd8004bacf6b068bb5 d6efcacb0f5842d3b8a27a5d3e8ad38c -#: f176bec83eb34fa2a954a689a3805bcb fcfb54e0fb804fa989efacacd410f03a +#: ../../../changes.txt:525 ../../../changes.txt:536 ../../../changes.txt:554 +#: ../../../changes.txt:566 ../../../changes.txt:580 ../../../changes.txt:593 +#: ../../../changes.txt:604 ../../../changes.txt:616 ../../../changes.txt:640 +#: ../../../changes.txt:760 ../../../changes.txt:777 ../../../changes.txt:809 +#: ../../../changes.txt:866 ../../../changes.txt:942 ../../../changes.txt:976 +#: ../../../changes.txt:985 ../../../changes.txt:994 ../../../changes.txt:1012 +#: ../../../changes.txt:1112 ../../../changes.txt:1151 +#: 2d61dd717b814ff094d3662012f2d18c 3e4ed138579743b39a32f8813c3b2e06 +#: 3ef6efffac1f4b7e9a653e9d1f296c3d 51fd65e4747f4d8f8b81de6b8a90a514 +#: 5fb04d0ff03b4789bf5c4aeabe2c7e15 606d6531e6554337b6c3ab8452c45ab0 +#: 65214ceb29b245868a158a9bfffa92d1 8a7880aed95644ea8aade26da406a37b +#: 968705d72d6f435a8b62f7f17b79c2d3 a27ecb9925af4dac91cd4af226a1d2d5 +#: a3d74a497ea148e7a1c7de31c00ee374 a46cd0d40ef5421fac9eb75e4fb898b9 +#: ac66e2f1e7004c37833e32fcc0116465 ada78a48dce74af3a3b5d181fb6fee38 +#: af10bc204bce4e21954c335e62a51ec9 be7d714ee714447e9ff7eb5c49530854 +#: c293b9e060844d05acc3178a91050794 cff5c1ea2c9a44d1b056e9e19549ce5e +#: ee8758a13e7e455699f88815363ce8ac f053f08242e7453db1d7144d88942d73 msgid "Bug fixes:" msgstr "" -#: ../../../changes.txt:344 acdab554d07f47d395ce76edf746259d +#: ../../../changes.txt:527 9464a8a8f8674bcdb9371ce12c044530 msgid "" "**Fixed** `3100 `_: Wrong" " internal property accessed in get_xml_metadata" msgstr "" -#: ../../../changes.txt:348 7a5d9f9ed0a341c7ad90c9528df824a4 +#: ../../../changes.txt:531 bb2df9b714cc473e957180178300aae2 msgid "Significantly improved speed of `Document.get_toc()`." msgstr "" -#: ../../../changes.txt:351 09f999f396f9457a94dd6e57c4022d82 +#: ../../../changes.txt:534 79bdfec9e4464ada983f653b5c5e97c7 msgid "**Changes in version 1.23.19 (2024-01-25)**" msgstr "" -#: ../../../changes.txt:355 555284e5121c4ba287f98e1f2b69b995 +#: ../../../changes.txt:538 1da592507a0340538b130185c9fa3779 msgid "" "**Fixed** `3087 `_: " "Exception in insert_image with mask specified" msgstr "" -#: ../../../changes.txt:356 2264fc57e07d4d179a116ad17e63de0b +#: ../../../changes.txt:539 2c4fa7f3a51d45889f0bb63a0e78b9c5 msgid "" "**Fixed** `3094 `_: " "TypeError: '<' not supported between instances of 'FzLocation' and 'int' " "in doc.delete_pages" msgstr "" -#: ../../../changes.txt:360 856d316936de4049bf36e839c5207615 +#: ../../../changes.txt:543 c3074effd2ad45da9d466e7c4721fe3a msgid "When finding tables:" msgstr "" -#: ../../../changes.txt:362 72a3119091bc4cf09af32dfd52e8413c +#: ../../../changes.txt:545 4cf8c152b4bd4b7ea3628a8ea7acd0a2 msgid "" "Allow addition of user-defined \"virtual\" vector graphics when finding " "tables." msgstr "" -#: ../../../changes.txt:363 34d06c1eafe7496db65254414ebbf157 +#: ../../../changes.txt:546 503232beafd64d76a6173e6094362d87 msgid "" "Confirm that the enveloping bboxes of vector graphics are inside the clip" " rectangle." msgstr "" -#: ../../../changes.txt:364 7883a745f2b74133b49dedbf276e14dc +#: ../../../changes.txt:547 01bb57ea92bd451f8e6fd2e087768146 msgid "Avoid slow finding of rectangle intersections." msgstr "" -#: ../../../changes.txt:366 0a6543a60a844b33a7f32f1cf0674825 +#: ../../../changes.txt:549 991bc2787a2f4d19b775a8e4422f6e21 msgid "Added `Font.bbox` property." msgstr "" -#: ../../../changes.txt:369 d3e4cdf9fd4243cda981498c41d9c5b4 +#: ../../../changes.txt:552 10fa3c83c527445db0d4b0f7e7b24cd8 msgid "**Changes in version 1.23.18 (2024-01-23)**" msgstr "" -#: ../../../changes.txt:373 fae62f06c122404dabb76cf2b26e0baa +#: ../../../changes.txt:556 9ccb3bb34ff1478d864bf982c9ae5339 msgid "" "**Fixed** `3081 `_: " "doc.close() not closing the document" msgstr "" -#: ../../../changes.txt:377 a89cdf121015451a9dddcd1d0fbc0b80 +#: ../../../changes.txt:560 7512c8338a574c56b0649dfa66ab175f msgid "" "Reduced size of sdist to fit on pypi.org (by reducing size of two test " "files)." msgstr "" -#: ../../../changes.txt:378 e559b5e65ae246148fd1938fb5fc8a47 +#: ../../../changes.txt:561 650a20e03bfb4dd6a57f5e07d95ccde8 msgid "Fix `Annot.file_info()` if no `Desc` item." msgstr "" -#: ../../../changes.txt:381 0002f4952c8542e98d5329171a7aff48 +#: ../../../changes.txt:564 736369637e864833b46a42f98fb0a3fb msgid "**Changes in version 1.23.17 (2024-01-22)**" msgstr "" -#: ../../../changes.txt:385 99be3dd680f94a068fd66b10154775c0 +#: ../../../changes.txt:568 55d1a4b2511e4e8f9f1d4f7acc76cf73 msgid "" "**Fixed** `3062 `_: " "page_rotation_reset does not return page to original rotation" msgstr "" -#: ../../../changes.txt:386 a4a0b39a501248648539dd462118379c +#: ../../../changes.txt:569 1b87ec3ef9ea440491ee7ffaf5442dc8 msgid "" "**Fixed** `3070 `_: " "update_link(): AttributeError: 'Page' object has no attribute 'super'" msgstr "" -#: ../../../changes.txt:390 c478287593d942f1a6d200bf20e0682e +#: ../../../changes.txt:573 3354ae51b2604ef1bbd91c15d0765dfe msgid "Fixed bug in `Page.links()` (PR #3075)." msgstr "" -#: ../../../changes.txt:391 4f0357f486da4bcbb2fccb6035a903e6 +#: ../../../changes.txt:574 f9597ac8b8c04a87b6355b6381e9c173 msgid "Fixed bug in `Page.get_bboxlog()` with layers." msgstr "" -#: ../../../changes.txt:392 65265a8f962b4f6e9d3bb3220bd46f18 +#: ../../../changes.txt:575 61706baf4b1a4827ad7d8a87e267ee9c msgid "Add support for timeouts in scripts/ and tests/run_compound.py." msgstr "" -#: ../../../changes.txt:395 27fcc6ee74b94edfb98dbe0f620f13c5 +#: ../../../changes.txt:578 87825e0e0580489298d3e62719284757 msgid "**Changes in version 1.23.16 (2024-01-18)**" msgstr "" -#: ../../../changes.txt:399 82a448025ad64a669b4c6e95ec2cd70d +#: ../../../changes.txt:582 6fbf8912a655447883da79f095cf40f3 msgid "" "**Fixed** `3058 `_: " "Pixmap created from CMYK JPEG delivers RGB format" msgstr "" -#: ../../../changes.txt:403 33c54001fe6e462a8733347fd7165a34 +#: ../../../changes.txt:586 3fcc09104dc54f6b8d270fa03621bb00 msgid "" "In table detection strategy \"lines_strict\", exclude fill-only vector " "graphics." msgstr "" -#: ../../../changes.txt:404 d3e906cd35a74b5587ac4c3335d8edf2 +#: ../../../changes.txt:587 18db20b909ed41d3bf2cac2deb0fa70b msgid "Fixed sysinstall test failure." msgstr "" -#: ../../../changes.txt:405 2a683e78a9aa49d290a2d036101ab0da +#: ../../../changes.txt:588 e362018465f2455daa6c79f51bae7526 msgid "In documentation, update feature matrix with item about text writing." msgstr "" -#: ../../../changes.txt:408 96ee0a54b34d4e938a3bc39c898d3487 +#: ../../../changes.txt:591 cca812b622a748ca83a5db1bceb35a29 msgid "**Changes in version 1.23.15 (2024-01-16)**" msgstr "" -#: ../../../changes.txt:412 bfd760c5f54f4ce5948883ddde256ffa +#: ../../../changes.txt:595 1c597102d34744a398afce8e168a32b3 msgid "" "**Fixed** `3050 `_: " "python3.9 pix.set_pixel has something wrong in c.append( ord(i))" msgstr "" -#: ../../../changes.txt:416 a10af2e4f7244e389100edff8097ea31 +#: ../../../changes.txt:599 17297b8ae3e14dc1b006574871337dfe msgid "Improved docs for Page.find_tables()." msgstr "" -#: ../../../changes.txt:419 2ae782ca4fa5417db08676396976339d +#: ../../../changes.txt:602 0be3eb0c81b842048bb25d1707fbc004 msgid "**Changes in version 1.23.14 (2024-01-15)**" msgstr "" -#: ../../../changes.txt:423 86a00bbcbb0f4b3f9af44854d27c6a41 +#: ../../../changes.txt:606 adf2fde25feb42ee8e8dc348a940227c msgid "" "**Fixed** `3038 `_: " "JM_pixmap_from_display_list > Assertion Error : Checking for wrong type" msgstr "" -#: ../../../changes.txt:424 9693467ff4f142639e017b11c00e510a +#: ../../../changes.txt:607 8b1406193b814638b27734a78c18c7b4 msgid "" "**Fixed** `3039 `_: Issue" " with doc.close() not closing the document in PyMuPDF" msgstr "" -#: ../../../changes.txt:428 9a1079b2bdb8428199b16606c1ae1755 +#: ../../../changes.txt:611 c9aa04500860461dabc38810c046cd6a msgid "" "Ensure valid \"re\" rectangles in `Page.get_drawings()` with derotated " "pages." msgstr "" -#: ../../../changes.txt:431 7013672e64d549479fc01c01a7015e4f +#: ../../../changes.txt:614 18aa23cc095044229dd7f2195997032c msgid "**Changes in version 1.23.13 (2024-01-15)**" msgstr "" -#: ../../../changes.txt:435 b838b8b6978e4cfea16d1400659bdb1a +#: ../../../changes.txt:618 2dbe91af362a4a399e3733f21966661d msgid "" "**Fixed** `2979 `_: list " "index out of range in to_pandas()" msgstr "" -#: ../../../changes.txt:436 0ddff611e86b4cf08fa49b15ae5be28c +#: ../../../changes.txt:619 3a7d51d26e2d40bdb6dacee4ff2962ed msgid "" "**Fixed** `3001 `_: " "Calling find_tables() on one document alters the bounding boxes of a " "subsequent document" msgstr "" -#: ../../../changes.txt:440 4abe1b57277243ca9b7b81eae9ed6b2e +#: ../../../changes.txt:623 8e60dc7df1b04c808b398ba3b5c52a56 msgid "Fixed `Rect.height` and `Rect.width` to never return negative values." msgstr "" -#: ../../../changes.txt:441 cdf6557de9a14b359e08182d484806f5 +#: ../../../changes.txt:624 507a19087e1c40e8ab2cac0737e3bc2d msgid "Fixed `TextPage.extractIMGINFO()`'s returned `dictkey_yres` value." msgstr "" -#: ../../../changes.txt:444 6116715be9484874b352d35d48a9cf62 +#: ../../../changes.txt:627 bafc5067041f4769b3ed5a5aeca8c925 msgid "**Changes in version 1.23.12 (2024-01-12)**" msgstr "" -#: ../../../changes.txt:446 d3df2f1354a442d9897be916af028405 +#: ../../../changes.txt:629 e74b60af0b4b494da3e81f08ff009346 msgid "" "**Fixed** `3027 `_: " "Page.get_text throws Attribute Error for 'parent'" msgstr "" -#: ../../../changes.txt:449 04bb7b2de0124704809c89633c72d66b +#: ../../../changes.txt:632 310201258dd94b6286f7e3ec62fc609b msgid "**Changes in version 1.23.11 (2024-01-12)**" msgstr "" -#: ../../../changes.txt:451 6f974147e626407aa55f9f86c5d01f09 +#: ../../../changes.txt:634 f3a1d737a1e34534a21c64422ef7a16d msgid "Fixed some Pixmap construction bugs." msgstr "" -#: ../../../changes.txt:452 1f4c82389c5a42c3a387c9d2a9984af4 +#: ../../../changes.txt:635 ce6a20341ecf4f58a0b492347fbe901f msgid "Fixed Pixmap.yres()." msgstr "" -#: ../../../changes.txt:455 89b4aad7b061494cb644b833bbce7edb +#: ../../../changes.txt:638 718d5223c71645788572cc52333b0c6b msgid "**Changes in version 1.23.10 (2024-01-12)**" msgstr "" -#: ../../../changes.txt:459 fae5ec85d1f548828d63ec6a719ca757 +#: ../../../changes.txt:642 1bfe098162d04a6181bdae28701c7aca msgid "" "**Fixed** `3020 `_: Can't" " resize a PixMap" msgstr "" -#: ../../../changes.txt:463 02a6ae7028734cc8bc448e2a95d1387a +#: ../../../changes.txt:646 81b4d02c910443928a7ba27b146ce644 msgid "Fixed Page.delete_image()." msgstr "" -#: ../../../changes.txt:466 f0eadf277cd24957a2fe860cecca23a1 +#: ../../../changes.txt:649 2f563b04be5d48acbb8d66e2933ff1ac msgid "**Changes in version 1.23.9 (2024-01-11)**" msgstr "" -#: ../../../changes.txt:468 55805013777e478c8b096cd25306ca0c +#: ../../../changes.txt:651 6d20fb5bb4c243d588cbda8bc937bcfe msgid "Default to new \"rebased\" implementation." msgstr "" -#: ../../../changes.txt:470 f4c599090e3042baa65a18fd3d8fbf21 +#: ../../../changes.txt:653 b20b8456cbf9479cac6a539bd20e0f6b msgid "" "The old \"classic\" implementation is available with `import fitz_old as " "fitz`." msgstr "" -#: ../../../changes.txt:471 8a736d3b3a7145048d89758b72df9edd +#: ../../../changes.txt:654 a0b841fa56684519a65856b953999265 msgid "" "For more information about why we are changing to the rebased " "implementation, see: https://github.com/pymupdf/PyMuPDF/discussions/2680" msgstr "" -#: ../../../changes.txt:474 69a4e5cccbbf475fba336f55658d98e3 +#: ../../../changes.txt:657 6f5720005cb948d0b9d22671750280b9 msgid "Use MuPDF-1.23.9." msgstr "" -#: ../../../changes.txt:476 ../../../changes.txt:508 -#: 30beff72853940b6a44790185707d0c8 abfb49db2f4f413ba35a1a53651d0759 +#: ../../../changes.txt:659 ../../../changes.txt:691 +#: d2565dd858fe4809876140f81ca1d770 efcc0badb1bb4a608130b04d97190234 msgid "Bug fixes (rebased implementation only):" msgstr "" -#: ../../../changes.txt:478 1345c0d904124ed983ea102fc45d2caa +#: ../../../changes.txt:661 20bdf1ba55b84a3b9382264646f0bcfa msgid "" "**Fixed** `2911 `_: " "Page.derotation_matrix returns a tuple instead of a Matrix with rebased " "implementation" msgstr "" -#: ../../../changes.txt:479 5c9003481da44e78a7f25530628f22b6 +#: ../../../changes.txt:662 ac7ebec2bed84d62be57b5f5f4444099 msgid "" "**Fixed** `2919 `_: " "Rebased version: KeyError in resolve_names when merging pdfs" msgstr "" -#: ../../../changes.txt:480 265fff96594b41ac828bd4d08f8fa637 +#: ../../../changes.txt:663 5a77fe644c304e3c9613de239eaf6f83 msgid "" "**Fixed** `2922 `_: New " "feature that allows inserting named-destination links doesn't work" msgstr "" -#: ../../../changes.txt:481 e629085438764867a684a3af13670c4a +#: ../../../changes.txt:664 746e5e364e4b43cebab8657aea2c8939 msgid "" "**Fixed** `2943 `_: " "ZeroDivisionError: float division by zero when use apply_redactions()" msgstr "" -#: ../../../changes.txt:482 c00a65c5cc314b20a32172e3e621b97a +#: ../../../changes.txt:665 0f4cbfe997144e80a1ecb838706ef7da msgid "" "**Fixed** `2950 `_: " "Shelling out to pip during tests is problematic" msgstr "" -#: ../../../changes.txt:483 36d6388fa67f4be39883bf8816dea81e +#: ../../../changes.txt:666 7e81791c8ae94fb392d4aa6614a89b66 msgid "" "**Fixed** `2954 `_: " "Replacement unicode character in text extraction" msgstr "" -#: ../../../changes.txt:484 ea5a400d50244c0eab05d03ff2338116 +#: ../../../changes.txt:667 2c26f1c85a284af597498e52289657a8 msgid "" "**Fixed** `2957 `_: " "apply_redactions() moving text" msgstr "" -#: ../../../changes.txt:485 63a59732bea6440a83855601f460b22b +#: ../../../changes.txt:668 dd270b5826c24236859e17b3a657e043 msgid "" "**Fixed** `2961 `_: " "Passing a string as a page number raises IndexError instead of TypeError." msgstr "" -#: ../../../changes.txt:486 c07bf2b941d2495fa1a6014122c96309 +#: ../../../changes.txt:669 e997aefd50bf4fa6af9b8fdbbb69071d msgid "" "**Fixed** `2969 `_: " "annot.next throws AttributeError" msgstr "" -#: ../../../changes.txt:487 baf5678f0e6a45e4a7818e4d71ad63ca +#: ../../../changes.txt:670 ac556f9c78514dd3b79831a806f2a39b msgid "" "**Fixed** `2978 `_: " "1.23.9rc1: module 'fitz.mupdf' has no attribute 'fz_copy_pixmap_rect'" msgstr "" -#: ../../../changes.txt:489 7e9e61e112d24c3ca5fb4564f5cf146a +#: ../../../changes.txt:672 a9c0241f244a445f821fdf6787b33919 msgid "" "**Fixed** `2907 `_: " "segfault trying to call clean_contents on certain pdfs with python 3.12" msgstr "" -#: ../../../changes.txt:490 0fc7c6d6ebf6472f9ccf00ac1d6fef9e +#: ../../../changes.txt:673 7d51a6025fdd44948dbc17637dc12062 msgid "" "**Fixed** `2905 `_: " "SystemError: returned a " "result with an exception set" msgstr "" -#: ../../../changes.txt:491 92f5db1b2978476c81fc5fa4ca98f723 +#: ../../../changes.txt:674 38ea8b10ef9c410ab1c2990c35563be7 msgid "" "**Fixed** `2742 `_: " "Segmentation Fault when inserting three (but not two) copies of the same " "source page into one destination page" msgstr "" -#: ../../../changes.txt:495 b4131204b42547659aefa19f1e528caa +#: ../../../changes.txt:678 181e94f319da45c2868eb7f80a6a2c5f msgid "Add optional setting of opacity to `Page.insert_htmlbox()`." msgstr "" -#: ../../../changes.txt:496 6e81521104b040cab43c70ea673df440 +#: ../../../changes.txt:679 dcf0014ae1d54482b470bae54bcf9c68 msgid "Fixed issue with add_redact_annot() mentioned in #2934." msgstr "" -#: ../../../changes.txt:497 6dfed56024dd47d0876a61fffe0b170c +#: ../../../changes.txt:680 aa5dc3c1ab8c4a6389e94f6d9a4111e6 msgid "" "Fixed `Page.rotation()` to return 0 for non-PDF documents instead of " "raising an exception." msgstr "" -#: ../../../changes.txt:498 cfeddce773914ac7a651fbba5035e298 +#: ../../../changes.txt:681 48c15430aa454909aac1d2c988486768 msgid "Fixed internal quad detection to cope with any Python sequence." msgstr "" -#: ../../../changes.txt:499 da83e8fe741b44198ed57ad0cc310911 +#: ../../../changes.txt:682 45e881e1daaa47c8871ffa544bc60c46 msgid "" "Fixed rebased `fitz.pymupdf_version_tuple` - was previously set to mupdf " "version." msgstr "" -#: ../../../changes.txt:500 f10dd3ade16c4b6dbe1415b82fee14ef +#: ../../../changes.txt:683 e0283fe9d2f1459f85915e361dfd8b11 msgid "" "Improved support for Linux system installs, including adding regular " "testing on Github." msgstr "" -#: ../../../changes.txt:501 efe61f80cad94d1392a95a3756f98959 +#: ../../../changes.txt:684 20d0efc7f5094d35ada7f05f8ac2fdfd msgid "Add missing `flake8` to `scripts/gh_release.py:test_packages`." msgstr "" -#: ../../../changes.txt:502 55395b59a3304b6b86578870afd8c52d +#: ../../../changes.txt:685 578cbeccb8484e299da16b03106d149b msgid "Use newly public functions in MuPDF-1.23.8." msgstr "" -#: ../../../changes.txt:503 a5a82ecdb37d4029ad24511e27cd24eb +#: ../../../changes.txt:686 3db94cc7bfc54321b25942d0d2040ec5 msgid "Improved `scripts/test.py` to help investigation of MuPDF issues." msgstr "" -#: ../../../changes.txt:506 79c5a92f86cd4b9c831bf97ed8b06d6e +#: ../../../changes.txt:689 673b7a0e8db64275b8740204f43bbaa0 msgid "**Changes in version 1.23.8 (2023-12-19)**" msgstr "" -#: ../../../changes.txt:510 9f76edc0b5db443ca725b4564dc52130 +#: ../../../changes.txt:693 27bee795f9db48a1af8c2173e470344f msgid "" "**Fixed** `2634 `_: " "get_toc and set_toc do not behave consistently for rotated pages" msgstr "" -#: ../../../changes.txt:511 2745c23a2926419994fbe2425fdfc3d3 +#: ../../../changes.txt:694 86d8eddf3d654428b7a4ccc6bdd65c53 msgid "" "**Fixed** `2861 `_: " "AttributeError in getLinkDict during PDF Merge" msgstr "" -#: ../../../changes.txt:512 c8b845dd3d86474f8315630bc8b4f4d0 +#: ../../../changes.txt:695 f68c5320044a4f9ab5d48e60e9d064d1 msgid "" "**Fixed** `2871 `_: " "KeyError in getLinkDict during PDF merge" msgstr "" -#: ../../../changes.txt:513 b2e01082bcb14352b31dceb3669a8cdb +#: ../../../changes.txt:696 03fafa317ff34cc5ba294bec5fc4a46f msgid "" "**Fixed** `2886 `_: Error" " in Skeleton for Named Link Destinations" msgstr "" -#: ../../../changes.txt:515 ../../../changes.txt:548 -#: a3b53808181e43bc842854de164b0b34 b0b007e71b0d47358fa0c3a5c63b455f +#: ../../../changes.txt:698 ../../../changes.txt:731 +#: 2ed69860112e407a8e4399a82a72eee4 8ab85d5c3d684f5f9c99fec79a96af7a msgid "Bug fixes (rebased and classic implementations):" msgstr "" -#: ../../../changes.txt:517 be24d8108a8b49e79f3805b624e0b375 +#: ../../../changes.txt:700 4f8cdaebded3474393bcd7df8c6b024d msgid "" "**Fixed** `2885 `_: " "pymupdf find tables too slow" msgstr "" -#: ../../../changes.txt:521 ../../../changes.txt:561 -#: 3d267b477b694c71ab32bcf6c8a3d92a f5649486fda34a73bdf1a6bdfa7d7a6f +#: ../../../changes.txt:704 ../../../changes.txt:744 +#: 62f080e1b1104d6f9f0776495ed8e257 c3af2467a2ca49c781374590dc47adac msgid "Rebased implementation:" msgstr "" -#: ../../../changes.txt:523 1b6cbb7dc6894be1a57f07372d562e6f +#: ../../../changes.txt:706 8a0141451676455e983d7a0f4c5f571b msgid "" "`Page.insert_htmlbox()`: new, much more powerful alternative to " "`Page.insert_textbox()` or `TextWriter.fill_textbox()`, using `Story`." msgstr "" -#: ../../../changes.txt:524 62a4e5b31b114d51bbdf3ca9347b18cb +#: ../../../changes.txt:707 6ca89e418e874daba4e230dacf411ccd msgid "`Story.fit*()`: new methods for fitting a Story into an expanded rect." msgstr "" -#: ../../../changes.txt:525 5c66212e4fb640ab82689d26440d27dd +#: ../../../changes.txt:708 f0205212a50b43769bd3999683570c72 msgid "`Story.write_with_links()`: add support for external links." msgstr "" -#: ../../../changes.txt:526 03cafe4aeb964c5fa23ccef02218bf67 +#: ../../../changes.txt:709 21f8dcec43f54291a78d41070e8bf3ec msgid "" "`Document.language()`: fixed to use MuPDF's new " "`mupdf.fz_string_from_text_language2()`." msgstr "" -#: ../../../changes.txt:527 2c155bca17df4e2ab810037b1d34ed53 +#: ../../../changes.txt:710 2801099cf0f14a9f9c9037e4aa10b76f msgid "`Document.subset_fonts()` - fixed." msgstr "" -#: ../../../changes.txt:528 480c33e7398c4cd9b1411cbf4e58cb1c +#: ../../../changes.txt:711 906b2a0aa08e47f0b0f3dec950e6dda0 msgid "Fixed internal `Archive._add_treeitem()` method." msgstr "" -#: ../../../changes.txt:529 2d8b7750debd46f3a64458ca27c5856d +#: ../../../changes.txt:712 9498eb7fa8b54530baa58998e349319a msgid "" "Fixed `fitz_new.__doc__` to contain PyMuPDF and Python version " "information, and OS name." msgstr "" -#: ../../../changes.txt:530 3af73ec6e6ec4225a7dc2ccecb3a3362 +#: ../../../changes.txt:713 b16e18a9cd7043b1acdfe4d3feb43607 msgid "" "Removed use of `(*args, **kwargs)` in API, we now specify keyword args " "explicitly." msgstr "" -#: ../../../changes.txt:531 ee279eefb3714e288b3a14d98a2252f1 +#: ../../../changes.txt:714 ccb9c77581ba4b9da3cca7b915aeaf85 msgid "Work with new MuPDF Python exception classes." msgstr "" -#: ../../../changes.txt:533 0342307e2daa4e8f83bac3be726bf0f6 +#: ../../../changes.txt:716 021169327c414972afa9eba3d09c63a7 msgid "" "Fixed bug where `button_states()` returns None when `/AP` points to an " "indirect object." msgstr "" -#: ../../../changes.txt:534 e277ced44a5c4ca8b5eed466d29565bc +#: ../../../changes.txt:717 97298fff9afc41548002a48459f1cc69 msgid "" "Fixed pillow test to not ignore all errors, and install pillow when " "testing." msgstr "" -#: ../../../changes.txt:535 8860655e205949e8b199722b056364f5 +#: ../../../changes.txt:718 b082ce6c6ad44f21b5f2a29e1a59665a msgid "" "Added test for `fitz.css_for_pymupdf_font()` (uses package `pymupdf-" "fonts`)." msgstr "" -#: ../../../changes.txt:536 b2eb2c8e0ab24bea9bf5c1d7dbc96f12 +#: ../../../changes.txt:719 1407d4a104764d73bb318596f91e4364 msgid "Simplified Github Actions test specifications." msgstr "" -#: ../../../changes.txt:537 d51bc66d598d4c82870cbf8bbfd7c6f0 +#: ../../../changes.txt:720 5f6270725b28426a8cd4971ad54e74dd msgid "Updated `tests/README.md`." msgstr "" -#: ../../../changes.txt:540 730dc018258d4c268ab076dd6b94c2c3 +#: ../../../changes.txt:723 4c895961905c49f68ab2650c2b8a9fe6 msgid "**Changes in version 1.23.7 (2023-11-30)**" msgstr "" -#: ../../../changes.txt:542 ded71e0234ec495f8e9ca017d21c528c +#: ../../../changes.txt:725 ee5d38f2ea9e42219cccad407131b04f msgid "Bug fixes in rebased implementation, not fixed in classic implementation:" msgstr "" -#: ../../../changes.txt:544 bb54c6de7e624885bcd5613febe55a22 +#: ../../../changes.txt:727 339b320cee7741c9932825cde87fef69 msgid "" "**Fixed** `2232 `_: " "Geometry helper classes should support keyword arguments" msgstr "" -#: ../../../changes.txt:545 2ca9d68db7e240558149844acb00a954 +#: ../../../changes.txt:728 2fa707dd9edf4f94bb5637bd4a28d0eb msgid "" "**Fixed** `2788 `_: " "Problem with get_toc in pymupdf 1.23.6" msgstr "" -#: ../../../changes.txt:546 11f48812ce2147e88a446b18239ac257 +#: ../../../changes.txt:729 9a1815349395436d91b72b0c7e56d6b4 msgid "" "**Fixed** `2791 `_: " "Experiencing small memory leak in save()" msgstr "" -#: ../../../changes.txt:550 d6e7f767299141a2adf84e7dbdceb05f +#: ../../../changes.txt:733 bfca811530f74ec9bc23e87f41d1a268 msgid "" "**Fixed** `2736 `_: " "Failure when set cropbox with mediabox negative value" msgstr "" -#: ../../../changes.txt:551 2c2cff4c980149aebe590616c96f7f89 +#: ../../../changes.txt:734 427c74b2289b45e0ad3edd747029ac09 msgid "" "**Fixed** `2749 `_: " "RuntimeError: cycle in structure tree" msgstr "" -#: ../../../changes.txt:552 5877d7b1682e47f89bedcd85e601d44d +#: ../../../changes.txt:735 6e34101c4b044ad9960add282084ba39 msgid "" "**Fixed** `2753 `_: " "Story.write_with_links will ignore everything after the first \"page " "break\" in the HTML." msgstr "" -#: ../../../changes.txt:553 a7be8937c7d444b6abe987ea1b4a2e59 +#: ../../../changes.txt:736 bafe1f526e0244eda987ab9f013ff61e msgid "" "**Fixed** `2812 `_: " "find_tables on landscape page generates reversed text" msgstr "" -#: ../../../changes.txt:554 2a56cddabb6942a787b3d79b2042000d +#: ../../../changes.txt:737 214f18e25a6a4ca1abfea39f7b0cef01 msgid "" "**Fixed** `2829 `_: " "[cannot create /Annot for kind] is still printed despite #2345 is closed." msgstr "" -#: ../../../changes.txt:555 40ad0a86472445db81398acac41f78dc +#: ../../../changes.txt:738 d263b1528eb54029b5f51e2b3acd0620 msgid "" "**Fixed** `2841 `_: " "Unexpected KeyError when using scrub with fitz_new" msgstr "" -#: ../../../changes.txt:557 3a3cd97421544ed2aee2ae4b14d31256 +#: ../../../changes.txt:740 54350c8a28f145cf8571fda8f170f077 msgid "Use MuPDF-1.23.7." msgstr "" -#: ../../../changes.txt:563 2f536b1f5c9747898096b4cf8413b47f +#: ../../../changes.txt:746 b4acef5e7f2d4bc98e9fa80a3b1c9c31 msgid "Added flake8 code checking to test suite, and made various fixes." msgstr "" -#: ../../../changes.txt:564 6066e1d7ec6c417e9a76cc1913bbfc8e +#: ../../../changes.txt:747 92d76d3ade924b2aa67472c4b074763f msgid "" "Disable diagnostics during Document constructor to match classic " "implementation." msgstr "" -#: ../../../changes.txt:566 d32dcdbe478d44fea329c3ae4c978fd1 +#: ../../../changes.txt:749 ed4f292e614b4cb684bf7926e7655785 msgid "" "Additional fix to `2553 " "`_: Invalid characters in" " versions >= 1.22" msgstr "" -#: ../../../changes.txt:567 5ade82ae9e8046b78c15cc03ab469cef +#: ../../../changes.txt:750 711655a363fe44deb8fb34ced91aab74 msgid "" "Fixed `MuPDF Bug 707324 " "`_: Story: HTML " "table row background color repeated incorrectly" msgstr "" -#: ../../../changes.txt:568 7bf52b5eb899460ead19184471c5d263 +#: ../../../changes.txt:751 76c1bd2fc5f446e2bcc6a7a4d4bb8859 msgid "Added `scripts/test.py`, for simple build+test of PyMuPDF git checkout." msgstr "" -#: ../../../changes.txt:569 38818651fd7c46919eebe740822c4a9d +#: ../../../changes.txt:752 8cca03c711524887828a6683b47143e1 msgid "Added `fitz.pymupdf_version_tuple`, e.g. `(1, 23, 6)`." msgstr "" -#: ../../../changes.txt:570 f9c335597b7c4ef7b181689be6bc7936 +#: ../../../changes.txt:753 40d15324bd114040a1c4035b8cdb89e4 msgid "" "Restored mistakenly-reverted fix for `2345 " "`_: Turn off print " "statements in utils.py" msgstr "" -#: ../../../changes.txt:571 c67777ae8b5e41a5980a274d39e8fc81 +#: ../../../changes.txt:754 881c24d332d94532ae730453f9a7fde0 msgid "" "Include any trailing `... repeated times...` text in warnings " "returned by `mupdf_warnings()` (rebased only)." msgstr "" -#: ../../../changes.txt:575 8fe7f4fe46654266bee31230461b089b +#: ../../../changes.txt:758 d872853707ad4064931d00a196bbf97c msgid "**Changes in version 1.23.6 (2023-11-06)**" msgstr "" -#: ../../../changes.txt:579 d6f747460265455d9ef5c2f319d5a58a +#: ../../../changes.txt:762 017033c49b804434af6eca76ab5827d3 msgid "" "**Fixed** `2553 `_: " "Invalid characters in versions >= 1.22" msgstr "" -#: ../../../changes.txt:580 6cf9506954c84f769cdda2a3ceed4b3d +#: ../../../changes.txt:763 358d5c6ef045454f8bab98837ad326ad msgid "" "**Fixed** `2608 `_: " "Incorrect utf32 text extraction (high & low surrogates are split)" msgstr "" -#: ../../../changes.txt:581 ../../../changes.txt:604 -#: 8d06ea958761428297b8e4efadecd98f caa44f7de978465dbbfa400afda562b1 +#: ../../../changes.txt:764 ../../../changes.txt:787 +#: 5fcdc8e45b5f4c609832c86a76099d85 de6f3b5dd8474b86a5265fe1cbc728ff msgid "" "**Fixed** `2710 `_: " "page.rect and text location wrong / differing from older version" msgstr "" -#: ../../../changes.txt:582 bc04464d36594a2597beee4672ce56e6 +#: ../../../changes.txt:765 acf583b7967b4b5ea619c6947569d17a msgid "" "**Fixed** `2774 `_: wrong" " encoding for \"\\?\" character when sort=True" msgstr "" -#: ../../../changes.txt:583 af9f1548131e4c1caff7d39a164f301f +#: ../../../changes.txt:766 392abb749f624b8bb1886892851d3b4f msgid "" "**Fixed** `2775 `_: " "fitz_new does not work with python3.10 or earlier" msgstr "" -#: ../../../changes.txt:584 ae634788de9d4bf6be09bb56f4e19616 +#: ../../../changes.txt:767 cf5b1039a1ba4662a91c375d0033da48 msgid "" "**Fixed** `2777 `_: With " "fitz_new, wrong type for Page.mediabox" msgstr "" -#: ../../../changes.txt:588 870240446c844bfc9ed33a4bb44a3cc7 +#: ../../../changes.txt:771 9634e1f7d7a248b49a6629a35d9c5293 msgid "Use MuPDF-1.23.5." msgstr "" -#: ../../../changes.txt:589 b5c0127b88c445cf8eeba63d9aee9fbc +#: ../../../changes.txt:772 662402905c614a83b0c186684ce35a68 msgid "Added Document.resolve_names() (rebased implementation only)." msgstr "" -#: ../../../changes.txt:592 fc5222261fed4200a42d76118829dacb +#: ../../../changes.txt:775 76329cea89ff45a2a4ed0d5adbc3bd31 msgid "**Changes in version 1.23.5 (2023-10-11)**" msgstr "" -#: ../../../changes.txt:596 2d3357af18f84e35aea3e1c472ea0138 +#: ../../../changes.txt:779 278264a9f0f849abb0a3e7e51e4bcf33 msgid "" "**Fixed** `2341 `_: " "Handling negative values in the zoom section for LINK_GOTO in linkDest" msgstr "" -#: ../../../changes.txt:597 6a28b9cea02f4ee0bb4c7b6a958fc086 +#: ../../../changes.txt:780 6253460783d7418e8497f1cdb2875fb2 msgid "" "**Fixed** `2522 `_: Typo " "in set_layer() - NameError: name 'f' is not defined" msgstr "" -#: ../../../changes.txt:598 19a03eb093b8487db723d044fc02e54a +#: ../../../changes.txt:781 a732f99e47504c389bb01f236abf5e74 msgid "" "**Fixed** `2548 `_: Fitz " "freezes on some PDFs when calling the fitz.Page.get_text_blocks method." msgstr "" -#: ../../../changes.txt:599 3b5acefd665444e39498223abc341484 +#: ../../../changes.txt:782 d262ff81210441cc9f4c6293238c033f msgid "" "**Fixed** `2596 `_: " "save(garbage=3) breaks get_pixmap() with side effect" msgstr "" -#: ../../../changes.txt:600 1585df356829495eb642fcb5a8ca8d58 +#: ../../../changes.txt:783 0decd50e22c34976b4dadde46da004ae msgid "" "**Fixed** `2635 `_: " "\"clean=True\" makes objects invisible in the pdf" msgstr "" -#: ../../../changes.txt:601 ../../../changes.txt:629 -#: a6662244f9d84aa4b9e308cef50ee5a5 aa80f149b59646a6a9b018aa314585f0 +#: ../../../changes.txt:784 ../../../changes.txt:812 +#: b72045cf3ebc425297bb5fca2e2fdf14 e18e697a3c2445b39268c151c595a94d msgid "" "**Fixed** `2637 `_: " "Page.insert_textbox incorrectly handles the last word if it starts a new " "line" msgstr "" -#: ../../../changes.txt:602 4eb453469ab04e5d8e53d1694edd49f9 +#: ../../../changes.txt:785 3905936b13384ba1850bc2457da78654 msgid "" "**Fixed** `2699 `_: " "extract paragraph with below table" msgstr "" -#: ../../../changes.txt:603 39570bf5ab6c476e9926024421679b63 +#: ../../../changes.txt:786 4659c53925194789a37ddb05f4684a45 msgid "" "**Fixed** `2703 `_: Wrong" " fontsize calculation in corner cases (\"page.get_texttrace()\")" msgstr "" -#: ../../../changes.txt:605 bcd6c143990743529604931ee9554868 +#: ../../../changes.txt:788 068fb89a2aee49bfbda8da27b7d7bbf6 msgid "" "**Fixed** `2723 `_: When " "will a Python 3.12 wheel be available?" msgstr "" -#: ../../../changes.txt:606 b1e2e997db894dd49f3a28bb27699a01 +#: ../../../changes.txt:789 07bbf5ae7e4749c6b873df336093b596 msgid "" "**Fixed** `2730 `_: " "persistent get_text() formatting" msgstr "" -#: ../../../changes.txt:610 92e55c69a2344c8791b3894175b9a874 +#: ../../../changes.txt:793 827be9716c0f45799f828806f32e4a46 msgid "Use MuPDF-1.23.4." msgstr "" -#: ../../../changes.txt:611 b8924482e66b44cf95e5270022112517 +#: ../../../changes.txt:794 f6586981ac234cd396fa43818ecfce43 msgid "Fix optimisation flags with system installs." msgstr "" -#: ../../../changes.txt:612 e963b4b85edc4a39b98a910b0151f82c +#: ../../../changes.txt:795 8a8d3c26e07f4e27a72876c93c28ce4a msgid "" "Fixed the problem that the clip parameter does not take effect during " "table recognition" msgstr "" -#: ../../../changes.txt:613 8d36d69e374945c4b2237f57e5da96c8 +#: ../../../changes.txt:796 b0a3f1403dde481e9883aa2c6580ecda msgid "Support Pillow mode \"RGBa\"" msgstr "" -#: ../../../changes.txt:614 49cbb3d5c82a45c4b78c2be1c18ebd06 +#: ../../../changes.txt:797 9d0ff8236a1849b7a38fc376b7872fb6 msgid "Support extra word delimiters" msgstr "" -#: ../../../changes.txt:615 607a4bd4fef7460ba4e5336ccb7e82eb +#: ../../../changes.txt:798 75856de791ff4f39a56e2fcf268e750f msgid "Support checking valid PDF name objects" msgstr "" -#: ../../../changes.txt:618 67de93ab15384ed6b588353023a82b7b +#: ../../../changes.txt:801 103cc581cd244d47af9758d05415b2e8 msgid "**Changes in version 1.23.4 (2023-09-26)**" msgstr "" -#: ../../../changes.txt:620 e0df1255b1bd4d31a722c750385111f8 +#: ../../../changes.txt:803 bae913132e3449a7aa423306e2f8b684 msgid "Improved build instructions." msgstr "" -#: ../../../changes.txt:621 c41c605d8290450baa606b0367c22a1b +#: ../../../changes.txt:804 4d9016b46972494eabae36e8d4fe9c46 msgid "Fixed Tesseract in rebased implementation." msgstr "" -#: ../../../changes.txt:622 9668f70b0e0543bdbbdbd4835148a0c0 +#: ../../../changes.txt:805 64583d37800d4f42a128cf51dae7384b msgid "Improvements to build/install with system MuPDF." msgstr "" -#: ../../../changes.txt:623 7aa73674f1e7466dbe8bf082a96f9c7c -msgid "Fixed Pyodide builds." -msgstr "" - -#: ../../../changes.txt:624 7c516a580138433fa170af192693afa3 +#: ../../../changes.txt:807 44a01e18ad854989a0727acf285e4304 msgid "Fixed rebased bug in _insert_image()." msgstr "" -#: ../../../changes.txt:628 bb129820dc7d47ed83fc137c2cfc3d14 +#: ../../../changes.txt:811 77077284a0444ad685e45b0e86c65327 msgid "" "**Fixed** `2556 `_: " "Segmentation fault at caling get_cdrawings(extended=True)" msgstr "" -#: ../../../changes.txt:630 01625bb5e39c4da9985592083c8fbe8f +#: ../../../changes.txt:813 0f46924776234c96a9f158798ecdb3f6 msgid "" "**Fixed** `2683 `_: " "Windows sdist build failure - non-quoting of path and using UNIX which " "command" msgstr "" -#: ../../../changes.txt:631 ae13d62368464bb08bb3d0e9e6ef8123 +#: ../../../changes.txt:814 42c749d57f6f410e85ae658701f0ec53 msgid "" "**Fixed** `2691 `_: " "Page.get_textpage_ocr() bug in rebased fitz_new version" msgstr "" -#: ../../../changes.txt:632 a8c6939c96bf450286dfa6fbbe7bffe0 +#: ../../../changes.txt:815 178d0039852645d5ba7349eec91de6f8 msgid "" "**Fixed** `2692 `_: " "Page.get_pixmap(clip=Rect()) bug in rebased fitz_new version" msgstr "" -#: ../../../changes.txt:635 7f5e415ce01e4f21bab9d7d809b412db +#: ../../../changes.txt:818 4c096fdef7c84aa3ad3766da8fd829f4 msgid "**Changes in version 1.23.3 (2023-08-31)**" msgstr "" -#: ../../../changes.txt:637 1f7ae419922846d29c0a64d63f9c0742 +#: ../../../changes.txt:820 fc9cfa91ff044d6097a979eca1cd971d msgid "Fixed use of Tesseract for OCR." msgstr "" -#: ../../../changes.txt:640 2e04ddba8c03431fa47a2e0dbaf587b0 +#: ../../../changes.txt:823 843dbd95c3184f77973f45ffe92b27d8 msgid "**Changes in version 1.23.2 (2023-08-28)**" msgstr "" -#: ../../../changes.txt:642 e618bedf8a0042a6afa0606c0120f8a5 +#: ../../../changes.txt:825 108f5c4365ff4f6a96491fae88a54640 msgid "" "**Fixed** `#2613 `_: " "release 1.23.0 not MacOS-arm64 compatible" msgstr "" -#: ../../../changes.txt:645 4bef811513cf4858bf219db7aefe21c9 +#: ../../../changes.txt:828 e1b6d0f984f742b3bc6d7b84e674ddf7 msgid "**Changes in version 1.23.1 (2023-08-24)**" msgstr "" -#: ../../../changes.txt:647 94b05c79c0cc44f09b40e63bbfad2325 +#: ../../../changes.txt:830 7476cc3c617145c9bac4b857ce5ce62e msgid "Updated README and package summary description." msgstr "" -#: ../../../changes.txt:650 7fb4c53b80ea42d3bb039698432db9df +#: ../../../changes.txt:833 327a22dab196488bb7066d63d09f7e08 msgid "" "Fixed a problem on some Linux installations with Python-3.10 (and " "possibly earlier versions) where `import fitz` failed with `ImportError: " @@ -1807,99 +2332,99 @@ msgid "" "directory`." msgstr "" -#: ../../../changes.txt:656 a10e62ad0b524dbeb2e197167385c344 +#: ../../../changes.txt:839 78e712a6bd7043dd90df607b90c4142a msgid "Fixed `incompatible architecture` error on MacOS arm64." msgstr "" -#: ../../../changes.txt:659 de9d7747ad4d4a25807c3a65eaacfa7d +#: ../../../changes.txt:842 6241fef4bb044910a27d4f7677c71242 msgid "" "Fixed installation warning from Poetry about missing entry in wheels' " "RECORD files." msgstr "" -#: ../../../changes.txt:663 aac871675cd4433badbf4ca77959387a +#: ../../../changes.txt:846 9df0ef853ccb4d338b1ca86b7cedb6e7 msgid "**Changes in version 1.23.0 (2023-08-22)**" msgstr "" -#: ../../../changes.txt:665 73ed347d04824218b1cc4bb5fbe20749 +#: ../../../changes.txt:848 0f1bdd72c98343f699861966bf0f6c3a msgid "Add method `find_tables()` to the `Page` object." msgstr "" -#: ../../../changes.txt:667 d98dd4304fd24abe8fcd23eaccea64bc +#: ../../../changes.txt:850 8654939c7c024ed6adf4f5d10c1abe7d msgid "" "This allows locating tables on any supported document page, and " "extracting table content by cell." msgstr "" -#: ../../../changes.txt:670 a9a7665de8e848c7a6f7caa0597e84ed +#: ../../../changes.txt:853 77b029509a4d4c3f8718cf2c64b3ec54 msgid "New \"rebased\" implementation of PyMuPDF." msgstr "" -#: ../../../changes.txt:672 563fc971bf4f4657beb0b9b442ae774c +#: ../../../changes.txt:855 48d881e482ca4bc4b99b9bb9ca4f6625 msgid "" "The rebased implementation is available as Python module `fitz_new`. It " "can be used as a drop-in replacement with `import fitz_new as fitz`." msgstr "" -#: ../../../changes.txt:677 1be0a9a1a3ce41279e6dd562e3ed80b7 +#: ../../../changes.txt:860 fbda2a6a43fe4b5483bee1d3fb17d59c msgid "" "Python-independent MuPDF libraries are now in a second wheel called " "`PyMuPDFb` that will be automatically installed by pip." msgstr "" -#: ../../../changes.txt:680 2b6372d1bd3a4640b494df4b5e377711 +#: ../../../changes.txt:863 df0c9eaf56814168af7e0ebc45caac53 msgid "" "This is to save space on pypi.org - a full release only needs one " "`PyMuPDFb` wheel for each OS." msgstr "" -#: ../../../changes.txt:685 c0e92a9b009c428ca17c4eda2bd4c370 +#: ../../../changes.txt:868 4251f217a0ba434490bc7d53700d44d6 msgid "" "**Fixed** `#2542 `_: " "fitz.utils.scrub AttributeError Annot object has no attribute fileUpd " "inside" msgstr "" -#: ../../../changes.txt:686 6997cc797b86456dbf213b87b599bd17 +#: ../../../changes.txt:869 a17ff529d1f84c619004c50fe455fa8a msgid "" "**Fixed** `#2533 `_: " "get_texttrace returned a incorrect character bbox" msgstr "" -#: ../../../changes.txt:687 524f27aee49940cabc89f570c0871156 +#: ../../../changes.txt:870 2cc1abba37874658a8a5b10a09b70f8d msgid "" "**Fixed** `#2537 `_: " "Validation when setting a grouped RadioButton throws a RuntimeError: path" " to 'V' has indirects" msgstr "" -#: ../../../changes.txt:689 ../../../changes.txt:1489 ../../../changes.txt:1653 -#: 70c59f6cf9a24f549c7c9a05d8b0d532 7158fdc1155b412b8eb61a2d80f4d338 -#: 7b09eafe32934e44b8a08930c787517a +#: ../../../changes.txt:872 ../../../changes.txt:1672 ../../../changes.txt:1836 +#: 2adce533804341359e79e543c8e32597 be0ad050d76848abaf5c4bf2dd926f47 +#: f10552d4ef324ed183963f71d17589ae msgid "Other changes:" msgstr "" -#: ../../../changes.txt:691 15874a2f220f4c418b1df2d7406734be +#: ../../../changes.txt:874 f4c93428b1e04e399bce86345ce4ac8e msgid "Dropped support for Python-3.7." msgstr "" -#: ../../../changes.txt:693 6dc43fc3e8f34271b9d875aa3bec5bb1 +#: ../../../changes.txt:876 b5a147c23d654aa8a1374ec85166af54 msgid "Fix for wrong page / annot `/Contents` cleaning." msgstr "" -#: ../../../changes.txt:695 3b332d8aa543464781064a301bdbaf85 +#: ../../../changes.txt:878 cf56d3d3eb394479b64940c95114dd3a msgid "We need to set `pdf_filter_options::no_update` to zero." msgstr "" -#: ../../../changes.txt:697 517dabb0d2534753ae1ffb47a1c9c29f +#: ../../../changes.txt:880 10366ab4e9324b888e0f48622b5ad6d2 msgid "Added new function get_tessdata()." msgstr "" -#: ../../../changes.txt:699 06d946b751bc42628fa4b17da0972fa0 +#: ../../../changes.txt:882 ac474f74dbc74809b4e8808748f474ad msgid "Cope with problem `/Annot` arrays." msgstr "" -#: ../../../changes.txt:701 680e0b6d74974bb8945b64fd9402769b +#: ../../../changes.txt:884 d3741f21a88842cc8c8e13309642ee75 msgid "" "When copying page annotations in method Document.insert_pdf we previously" " did not check the validity of members of the `/Annots` array. For " @@ -1908,32 +2433,32 @@ msgid "" "array items." msgstr "" -#: ../../../changes.txt:707 59ab3e19a3874e5e929f7628f594d912 +#: ../../../changes.txt:890 bdd753977a14421c918e39451c8e6e85 msgid "Additional annotation type checks." msgstr "" -#: ../../../changes.txt:709 1ee04b06f6bd4319aa3cb0cb43f9eb1e +#: ../../../changes.txt:892 d8f4cedfef5240a488f92dd78858f257 msgid "" "We did not previously check for annotation type when getting / setting " "annotation border properties. This is now checked in accordance with " "MuPDF." msgstr "" -#: ../../../changes.txt:713 1edad63b342f41688108b175d0e4948d +#: ../../../changes.txt:896 f352989e6f9847a0bfde4583e01e8c86 msgid "Increase fault tolerance." msgstr "" -#: ../../../changes.txt:715 ab54c81d4dac4a12982b68ddf81c7c91 +#: ../../../changes.txt:898 17d1fe7f81e94a2e946f57aeba6049c0 msgid "" "Avoid exceptions in method `insert_pdf()` when source pages contains " "invalid items in the `/Annots` array." msgstr "" -#: ../../../changes.txt:718 42784e9550e64f0890f219c52575a81d +#: ../../../changes.txt:901 b447a8623ebc4b269d6c93078450a4c6 msgid "Return empty border dict for applicable annots." msgstr "" -#: ../../../changes.txt:720 9b929d4700664bd48983ef54fa90d547 +#: ../../../changes.txt:903 af6d6b18663348e2bcd095ee59c9dabd msgid "" "We previously were returning a non-empty border dictionary even for non-" "applicable annotation types. We now return the empty dictionary `{}` in " @@ -1941,41 +2466,41 @@ msgid "" "`.update()` method, namely for dashes and border width." msgstr "" -#: ../../../changes.txt:725 fbefb63f1c9e4b049f6d0904e6540e76 +#: ../../../changes.txt:908 e3a589bf76fc4a7283ee0a15af5bd26e msgid "Restrict `set_rect` to applicable annot types." msgstr "" -#: ../../../changes.txt:727 7e767cdc90844bcf9f6914857649af0c +#: ../../../changes.txt:910 f25c7e27919646af84d880d0df6cbe89 msgid "" "We were insufficiently excluding non-applicable annotation types from " "`set_rect()` method. We now let MuPDF catch unsupported annotations and " "return `False` in these cases." msgstr "" -#: ../../../changes.txt:731 41fadfaed81e44ada361d31bbf7cf41c +#: ../../../changes.txt:914 0e0af9a092254efcba378caad6d4a1b2 msgid "Wrong fontsize computation in `page.get_texttrace()`." msgstr "" -#: ../../../changes.txt:733 7566d48ed1b0477ea5290302295be1f8 +#: ../../../changes.txt:916 cfe8ace08235424d901473a53c00d453 msgid "" "When computing the font size we were using the final text transformation " "matrix, where we should have taken `span->trm` instead. This is " "corrected here." msgstr "" -#: ../../../changes.txt:737 e9dbc4d8ef3b476e85ed755e6c0f236a +#: ../../../changes.txt:920 7dcc1debeebd455098741379fe8da1fe msgid "Updates to cope with changes to latest MuPDF." msgstr "" -#: ../../../changes.txt:739 109b915df0fe46b7bf36aaf77a3f3177 +#: ../../../changes.txt:922 05106636db4e491f81981ac17971f470 msgid "`pdf_lookup_anchor()` has been removed." msgstr "" -#: ../../../changes.txt:741 d030de7b3ca84fe890f0178763537dae +#: ../../../changes.txt:924 bbad1ed45e0d485da43a2d0aad55e753 msgid "Update fill_textbox to better respect rect.width" msgstr "" -#: ../../../changes.txt:743 8736eaef1f7544aa96201501950ad123 +#: ../../../changes.txt:926 229efd97000941c89ca97bf36fe92209 msgid "" "The function norm_words in fill_textbox had a bug in its last loop, " "appending n+1 characters when actually measuring width of n characters. " @@ -1984,414 +2509,414 @@ msgid "" "text to exceed the given rect." msgstr "" -#: ../../../changes.txt:749 f4eb83268f464292b350ca81330cbc1a +#: ../../../changes.txt:932 764335f5358e4e81b74fe45a3458952b msgid "The fix was just to replace n+1 by n." msgstr "" -#: ../../../changes.txt:751 f269815b90584c20bbce64c629d0627a +#: ../../../changes.txt:934 eb1125385bca41c79ecb0f555ed03f3a msgid "Add `script_focus` and `script_blur` options to widget." msgstr "" -#: ../../../changes.txt:755 9e7c5354122a4b80b8ef4e042a774a68 +#: ../../../changes.txt:938 20a01705be1c42399f0d8106509b1705 msgid "**Changes in version 1.22.5 (2023-06-21)**" msgstr "" -#: ../../../changes.txt:757 8ffbb1970b99466bbd93016558936062 +#: ../../../changes.txt:940 193f20603e9040de955e1b4717906ac6 msgid "This release uses ``MuPDF-1.22.2``." msgstr "" -#: ../../../changes.txt:761 d70fda56589947c69740d13e10f40651 +#: ../../../changes.txt:944 7e9cc37cde864f90bdb0957f1ffbc8c1 msgid "" "**Fixed** `#2365 `_: " "Incorrect dictionary values for type \"fs\" drawings." msgstr "" -#: ../../../changes.txt:762 7e657709d059419c9a4bf7534a4df63c +#: ../../../changes.txt:945 64b07853adc043ddb24d4d665d7a3124 msgid "" "**Fixed** `#2391 `_: " "Check box automatically uncheck when we update same checkbox more than 1 " "times." msgstr "" -#: ../../../changes.txt:763 ccc9e63b52464c0099ed2daf84565bf3 +#: ../../../changes.txt:946 3c2b547afceb432281c28b59289df4ef msgid "" "**Fixed** `#2400 `_: Gaps" " within text of same line not filled with spaces." msgstr "" -#: ../../../changes.txt:764 8da3d3f82aeb425eaa0b019bc2b98b63 +#: ../../../changes.txt:947 91b42babacf04225a8286e2635ccc155 msgid "" "**Fixed** `#2404 `_: " "Blacklining an image in PDF won't remove underlying content in version " "1.22.X." msgstr "" -#: ../../../changes.txt:765 39166ab0aece47b39dbe073247b8f25b +#: ../../../changes.txt:948 3fb91e3fac9d4e57ab84eccf1bd1be1a msgid "" "**Fixed** `#2430 `_: " "Incorrectly reducing ref count of Py_None." msgstr "" -#: ../../../changes.txt:766 0ba25e2f56e24b16b89b382690891d97 +#: ../../../changes.txt:949 4c1e45c820644d6ea47b6b7544c1b328 msgid "" "**Fixed** `#2450 `_: " "Empty fill color and fill opacity for paths with fill and stroke " "operations with 1.22.*" msgstr "" -#: ../../../changes.txt:767 60a6668e0ac7432990e322188d2d6c0c +#: ../../../changes.txt:950 dc4486cae00b4a8b90e9623f727d6f73 msgid "" "**Fixed** `#2462 `_: " "Error at \"get_drawing(extended=True )\"" msgstr "" -#: ../../../changes.txt:768 dbb7074693514904a4801fb34b45256f +#: ../../../changes.txt:951 4bdf307fb18444098aa46b847a9279ba msgid "" "**Fixed** `#2468 `_: " "Decode error when trying to get drawings" msgstr "" -#: ../../../changes.txt:769 21bf661c83ef44328a56e1bb13e7e899 +#: ../../../changes.txt:952 dcc459e62006443db89ff16b42b7ecf4 msgid "" "**Fixed** `#2710 `_: " "page.rect and text location wrong / differing from older version" msgstr "" -#: ../../../changes.txt:770 8405e743b50e4a10bcf96845372cfe69 +#: ../../../changes.txt:953 16bb9fb02df547c988a00bcf9aed6288 msgid "" "**Fixed** `#2723 `_: When" " will a Python 3.12 wheel be available?" msgstr "" -#: ../../../changes.txt:772 429816b52e85409b8d4c1e28a351a1af +#: ../../../changes.txt:955 53a084e9066d494e9613025a7844f581 msgid "New features:" msgstr "" -#: ../../../changes.txt:774 12bf78d6eb52406f99bda56305539b02 +#: ../../../changes.txt:957 32b82f498bb742b298afc01d469a5a50 msgid "" "**Changed** Annotations now support \"cloudy\" borders. The " ":attr:`Annot.border` property has the new item `clouds`, and method " ":meth:`Annot.set_border` supports the corresponding `clouds` argument." msgstr "" -#: ../../../changes.txt:778 ede84abbe1cc474da1c6c62d79e00ed5 +#: ../../../changes.txt:961 fa5b909ad5c049969b5a70426120219c msgid "" "**Changed** Radio button widgets in the same RB group are now " "consistently updated **if the group is defined in the standard way**." msgstr "" -#: ../../../changes.txt:781 3edf1ced02864c8fadd4bccdfe9e3169 +#: ../../../changes.txt:964 3f818b95573d4e6190d9c199f13a4f8b msgid "" "**Added** Support for the `/Locked` key in PDF Optional Content. This " "array inside the catalog entry `/OCProperties` can now be extracted and " "set." msgstr "" -#: ../../../changes.txt:784 17236d18c6e84c4ba1ea26b469f03252 +#: ../../../changes.txt:967 0a5bcfca4db34c77b9ba6e3bbdc32115 msgid "" "**Added** Support for new parameter `tessdata` in OCR functions. New " "function :meth:`get_tessdata` locates the language support folder if " "Tesseract is installed." msgstr "" -#: ../../../changes.txt:789 2a68a6dde52e458cb19350c788a8d5c6 +#: ../../../changes.txt:972 933f018b78ff48648387c805f4e9cede msgid "**Changes in version 1.22.3 (2023-05-10)**" msgstr "" -#: ../../../changes.txt:791 ../../../changes.txt:800 ../../../changes.txt:809 -#: ../../../changes.txt:821 3217540e997346f3b1dee87870ef7951 -#: c2db3628e0234319a17a971bc7083117 c961fa554a3046708b6742bd03d94f82 -#: cec2a0ade620473a9ed3ec48f19a127c +#: ../../../changes.txt:974 ../../../changes.txt:983 ../../../changes.txt:992 +#: ../../../changes.txt:1004 47f8eb670d284d0f897fffcaa6fa3f26 +#: e0e436a7050742fbae1c83ee0a207bd0 f7c6470cc74041dfa05783d4a6a6ebb0 +#: feaa863c22d14668874f211c2aab1d40 msgid "This release uses ``MuPDF-1.22.0``." msgstr "" -#: ../../../changes.txt:795 32df4a3a4c1446628506b11d04ceff68 +#: ../../../changes.txt:978 48cab086148b4141ad2788f665ab8237 msgid "" "**Fixed** `#2333 `_: " "Unable to set any of button radio group in form" msgstr "" -#: ../../../changes.txt:798 457ead6a381642439c1a6026b4d791f5 +#: ../../../changes.txt:981 1aa3a80a68144d44ac8642832bae3cdc msgid "**Changes in version 1.22.2 (2023-04-26)**" msgstr "" -#: ../../../changes.txt:804 3cfffc82d65f492c89963c321c5d33ad +#: ../../../changes.txt:987 226410ff43184f65ae3dcc7c8a25b6a2 msgid "" "**Fixed** `#2369 `_: " "Image extraction bugs with newer versions" msgstr "" -#: ../../../changes.txt:807 22834f8172474573a83f04f347a65415 +#: ../../../changes.txt:990 9c04bba73b584a398f6db314660efc4e msgid "**Changes in version 1.22.1 (2023-04-18)**" msgstr "" -#: ../../../changes.txt:813 f2c31c9ad30141ee8c76acb3220fc2c3 +#: ../../../changes.txt:996 56f34ed481bc41e2ae69f3e1b1bbac12 msgid "" "**Fixed** `#2345 `_: Turn" " off print statements in utils.py" msgstr "" -#: ../../../changes.txt:814 936b0a28e1774482b6bbf42febfed574 +#: ../../../changes.txt:997 f2c46fa9947e40ffbfbba836e8fd11b1 msgid "" "**Fixed** `#2348 `_: " "extract_image returns an extension \"flate\" instead of \"png\"" msgstr "" -#: ../../../changes.txt:815 5edbe87029f24a469554c4a7c07a2185 +#: ../../../changes.txt:998 a88b429f0f3d4e0f8dcbf33220f970df msgid "" "**Fixed** `#2350 `_: Can " "not make widget (checkbox) to read-only by adding flags " "PDF_FIELD_IS_READ_ONLY" msgstr "" -#: ../../../changes.txt:816 9c608e3be5784443aad2eae6b8b45ea6 +#: ../../../changes.txt:999 8f94c1295de84f11b648b15bfb96fbe5 msgid "" "**Fixed** `#2355 `_: " "1.22.0 error when using get_toc (AttributeError: 'SwigPyObject' object " "has no attribute)" msgstr "" -#: ../../../changes.txt:819 abe038ebfbcc4d44b60197ce483f8d9a +#: ../../../changes.txt:1002 b10b8e0894ad4f368cf491f22172a8a2 msgid "**Changes in version 1.22.0 (2023-04-14)**" msgstr "" -#: ../../../changes.txt:823 8ff22505922c4f6ca79e37ba0ad77b35 +#: ../../../changes.txt:1006 896ed49cac1e411cb81f50e2a020811d msgid "Behavioural changes:" msgstr "" -#: ../../../changes.txt:825 ad444091d6c64a8aaee50d740d5a74c5 +#: ../../../changes.txt:1008 95e8b0201bea41f0a189956256db83e0 msgid "" "Text extraction now includes glyphs that overlap with clip rect; " "previously they were included only if they were entirely contained within" " the clip rect." msgstr "" -#: ../../../changes.txt:831 d7f40af8551c4c1fa3e4d9ca92e05eb1 +#: ../../../changes.txt:1014 2ecfd19348bd4ee984a6181e55629f16 msgid "" "**Fixed** `#1763 `_: " "Interactive(smartform) form PDF calculation not working in pymupdf" msgstr "" -#: ../../../changes.txt:832 b3cba20456af4bc6962e640ca3be8736 +#: ../../../changes.txt:1015 095a18db3c5148f78b2f31fb2fef9fdf msgid "" "**Fixed** `#1995 `_: " "RuntimeError: image is too high for a long paged pdf file when trying" msgstr "" -#: ../../../changes.txt:833 a5545e5e204c4fdfa238184333c4d849 +#: ../../../changes.txt:1016 168a22f471304f4ca1f262c61cb9d5dd msgid "" "**Fixed** `#2093 `_: " "Image in pdf changes color after applying redactions" msgstr "" -#: ../../../changes.txt:834 8a482ba100d7444a846b41b1c9a176ae +#: ../../../changes.txt:1017 5732f0a0f91d47ae81d7ce36c7876e8c msgid "" "**Fixed** `#2108 `_: " "Redaction removing more text than expected" msgstr "" -#: ../../../changes.txt:835 096bea961ff147a5bfe7e77d8aaed9da +#: ../../../changes.txt:1018 d63c4ac7a6e845439544633a034a208f msgid "" "**Fixed** `#2141 `_: " "Failed to read JPX header when trying to get blocks" msgstr "" -#: ../../../changes.txt:836 dd70e3b391ed4ceba538e30e24c24eee +#: ../../../changes.txt:1019 c9865d0bec8e467184282fb00f777216 msgid "" "**Fixed** `#2144 `_: " "Replace image throws an error" msgstr "" -#: ../../../changes.txt:837 7d4f099ef97d449dbe7a6591b79b028a +#: ../../../changes.txt:1020 a7d71f6a989d4211a200f1787e958955 msgid "" "**Fixed** `#2146 `_: " "Wrong Handling of Reference Count of \"None\" Object" msgstr "" -#: ../../../changes.txt:838 438fc734d0ec437c89a2cbc922b29967 +#: ../../../changes.txt:1021 8c0ae982437c44298f874d491106d1a9 msgid "" "**Fixed** `#2161 `_: " "Support adding images as pages directly" msgstr "" -#: ../../../changes.txt:839 2f510024a1574a2c8f7c07a9aec8aba0 +#: ../../../changes.txt:1022 0a237d7a362748edb23cf7a968f3173e msgid "" "**Fixed** `#2168 `_: " "``page.add_highlight_annot(start=pointa, stop=pointb)`` not working" msgstr "" -#: ../../../changes.txt:840 c37d3c6850d04db99e354484f5fa8767 +#: ../../../changes.txt:1023 2e16353bde914eacb5bb7494a02dabb7 msgid "" "**Fixed** `#2173 `_: " "Double free of ``Colorspace`` used in ``Pixmap``" msgstr "" -#: ../../../changes.txt:841 60e30670947f49f7ab9db19180bc82a1 +#: ../../../changes.txt:1024 2979dd9f661d4da48dcc6f855d06eddc msgid "" "**Fixed** `#2179 `_: " "Incorrect documentation for ``pixmap.tint_with()``" msgstr "" -#: ../../../changes.txt:842 9cfa17663a1549a68142b9fb8b6f1246 +#: ../../../changes.txt:1025 8548ef0b665b49649bfdca09818cf198 msgid "" "**Fixed** `#2208 `_: " "Pushbutton widget appears as check box" msgstr "" -#: ../../../changes.txt:843 731118b75ab84d6f873015bc81a32745 +#: ../../../changes.txt:1026 60c3f9c4943540e99bcb62b739d017f5 msgid "" "**Fixed** `#2210 `_: " "``apply_redactions()`` move pdf text to right after redaction" msgstr "" -#: ../../../changes.txt:844 8475c52b9a6e426590029531b99f66a3 +#: ../../../changes.txt:1027 1ccb0299fd46433c8897acb4e310a3f0 msgid "" "**Fixed** `#2220 `_: " "``Page.delete_image()`` | object has no attribute ``is_image``" msgstr "" -#: ../../../changes.txt:845 11e6c27961ff4df3942c4eafe90b24ba +#: ../../../changes.txt:1028 7c746833cff44f158ec32c0d8e24cc68 msgid "" "**Fixed** `#2228 `_: open" " some pdf cost too much time" msgstr "" -#: ../../../changes.txt:846 82abd25306ce42e08719894bd7fb6835 +#: ../../../changes.txt:1029 e314c7c572ab498d88cfb5c35f637a88 msgid "" "**Fixed** `#2238 `_: Bug " "- can not extract data from file in the newest version 1.21.1" msgstr "" -#: ../../../changes.txt:847 e81790bfa3b041db9f58d5ce923a78fb +#: ../../../changes.txt:1030 7d5f3aefde2a4441834be423e385bc59 msgid "" "**Fixed** `#2242 `_: " "Python quits silently in ``Story.element_positions()`` if callback " "function prototype is wrong" msgstr "" -#: ../../../changes.txt:848 65457bf826554a739b90e25caab071a7 +#: ../../../changes.txt:1031 6ec48556e40b4a2eb184fd2525e0968e msgid "" "**Fixed** `#2246 `_: " "TextWriter write text in a wrong position" msgstr "" -#: ../../../changes.txt:849 6fce60370f0643949abf2259b02ad09b +#: ../../../changes.txt:1032 e145aed1d0634d7699634b8f141b822e msgid "" "**Fixed** `#2248 `_: " "After redacting the content, the position of the remaining text changes" msgstr "" -#: ../../../changes.txt:850 0ba505a4b8884d749902c28607496ecd +#: ../../../changes.txt:1033 a45ac9c0ba474998814b73896e4fa19d msgid "" "**Fixed** `#2250 `_: " "docs: unclear or broken link in page.rst" msgstr "" -#: ../../../changes.txt:851 f622373e517f4df894caa8a7ebae2f78 +#: ../../../changes.txt:1034 a6c30879fa014c239d56bf123d818726 msgid "" "**Fixed** `#2251 `_: " "mupdf_display_errors does not apply to Pixmap when loading broken image" msgstr "" -#: ../../../changes.txt:852 a84d956a42c04df0acd014dae57bc2e2 +#: ../../../changes.txt:1035 5b04df2094894cbda17293d2e807d8b9 msgid "" "**Fixed** `#2270 `_: " "``Annot.get_text(\"words\")`` - doesn't return the first line of words" msgstr "" -#: ../../../changes.txt:853 c9b7c557f09543099e4eedfd6cafddf1 +#: ../../../changes.txt:1036 609feab2717d48d98ce2ed0e97e78d39 msgid "" "**Fixed** `#2275 `_: " "insert_image: document that rotations are counterclockwise" msgstr "" -#: ../../../changes.txt:854 1b84d74c20014b2bafe92ea659e50577 +#: ../../../changes.txt:1037 eceefd69dd3449afb585f9713df1350e msgid "" "**Fixed** `#2278 `_: Can " "not make widget (checkbox) to read-only by adding flags " "PDF_FIELD_IS_READ_ONLY" msgstr "" -#: ../../../changes.txt:855 64b44513d16048aa97a49f4467610914 +#: ../../../changes.txt:1038 c1d3a5a2d9664b79b0d81b6ffb1101ae msgid "" "**Fixed** `#2290 `_: " "Different image format/data from Page.get_text(\"dict\") and " "Fitz.get_page_images()" msgstr "" -#: ../../../changes.txt:856 b4be4c8af87044f690a9fd3c83c8ec14 +#: ../../../changes.txt:1039 9ecd8df81b264fc28602487aaf2813e7 msgid "" "**Fixed** `#2293 `_: 68 " "failed tests when installing from sdist on my box" msgstr "" -#: ../../../changes.txt:857 c854ed66e1b64a079ba678c162124398 +#: ../../../changes.txt:1040 eb19df62e407402092a18e832ec928b0 msgid "" "**Fixed** `#2300 `_: Too " "much recursion in tree (parents), makes program terminate" msgstr "" -#: ../../../changes.txt:858 28fb3fcf6de5443c96622dc227426862 +#: ../../../changes.txt:1041 5a6f910be4d8460db6a88e9f05d097f3 msgid "" "**Fixed** `#2322 `_: " "add_highlight_annot using clip generates \"A Number is Out of Range\" " "error in PDF" msgstr "" -#: ../../../changes.txt:862 ef7999a428d74c81b6d76b213300d8db +#: ../../../changes.txt:1045 25b26a8da6e940ef8a27fb7ead0df71e msgid "" "Add key \"/AS (Yes)\" to the underlying annot object of a selected button" " form field." msgstr "" -#: ../../../changes.txt:864 513940326b9e4b34abad674642487721 +#: ../../../changes.txt:1047 79c32104157247d4b42e3cd1602104c1 msgid "" "Remove unused ``Document`` methods ``has_xref_streams()`` and " "``has_old_style_xrefs()`` as MuPDF equivalents have been removed." msgstr "" -#: ../../../changes.txt:867 6135edd0833547edb470a55b3879ade7 +#: ../../../changes.txt:1050 06b7f9e669a04233adf6d1bd3d251dd2 msgid "" "Add new ``Document`` methods and properties for getting/setting " "``/PageMode``, ``/PageLayout`` and ``/MarkInfo``." msgstr "" -#: ../../../changes.txt:870 8ea9014708cf4bb59907cf9986e24b08 +#: ../../../changes.txt:1053 f4f2db0fb7ac482199ecfdf0500f5f22 msgid "" "New ``Document`` property ``version_count``, which contains the number of" " incremental saves plus one." msgstr "" -#: ../../../changes.txt:873 ed72de5927ad48629638221439a71a1d +#: ../../../changes.txt:1056 2e66f78d2d3d40c881d1387ef7496384 msgid "" "New ``Document`` property ``is_fast_webaccess`` which tells whether the " "document is linearized." msgstr "" -#: ../../../changes.txt:876 878146b8362c4cf097b16dffb80dd4aa +#: ../../../changes.txt:1059 5ed7d10cb9a14b89bb46bf2a737b661d msgid "``DocumentWriter`` is now a context manager." msgstr "" -#: ../../../changes.txt:878 b7ad8caa5d84476b8bda0213212d79d9 +#: ../../../changes.txt:1061 1bbd4a98cf0d4fdba0f411293355ef64 msgid "Add support for ``Pixmap`` JPEG output." msgstr "" -#: ../../../changes.txt:880 91406a556e2b48d18709670b34670cee +#: ../../../changes.txt:1063 2b04688fc9ac46be956d7ca935e8aa13 msgid "Add support for drawing rectangles with rounded corners." msgstr "" -#: ../../../changes.txt:882 11f76f540d1040158a84b908023c11c6 +#: ../../../changes.txt:1065 ae71d3831f1846e38738b6d910b0f82c msgid "``get_drawings()``: added optional ``extended`` arg." msgstr "" -#: ../../../changes.txt:884 19be743ced94433fbedcefef7cf3eabd +#: ../../../changes.txt:1067 1ab82030b8b64bdb91b1608a21f3b7a5 msgid "" "Fixed issue where trace devices' state was not being initialised " "correctly; data returned from things like ``fitz.Page.get_texttrace()`` " "might be slightly altered, e.g. ``linewidth`` values." msgstr "" -#: ../../../changes.txt:888 699af8576a794ff9ac759f730acbe41f +#: ../../../changes.txt:1071 7481aee3d31341bf911416720ed98529 msgid "" "Output warning to ``stderr`` if it looks like we are being used with " "current directory containing an invalid ``fitz/`` directory, because this" @@ -2399,495 +2924,495 @@ msgid "" "attempts to use ``fitz`` when current directory is a PyMuPDF checkout." msgstr "" -#: ../../../changes.txt:894 ../../../changes.txt:949 -#: 32dadd15a44e436ebf75eaed2e377355 4bea722c016a438ca0930ae1b1cba20c +#: ../../../changes.txt:1077 ../../../changes.txt:1132 +#: 0be1fe7d711841d4a369e1ac2b6c83c9 eea908b777d04a46ab5aa846fa8f00ff msgid "Documentation:" msgstr "" -#: ../../../changes.txt:896 e1a3c2594c654347a34811d859a05be1 +#: ../../../changes.txt:1079 452c73ebeb194e6c962d4c1df98f2f70 msgid "General rework:" msgstr "" -#: ../../../changes.txt:898 aa34c4af08d44e849befc07e9f9e9906 +#: ../../../changes.txt:1081 13d8c841d1844c7da2c554e3c208ebd2 msgid "Introduces a new home page and new table of contents." msgstr "" -#: ../../../changes.txt:899 8d9e243866274200836624b5e024dcf5 +#: ../../../changes.txt:1082 0d60d070cdfc4295a6c1c0845dab5a3d msgid "Structural update to include new About section." msgstr "" -#: ../../../changes.txt:900 b0bb1111bc6c4be88fcc94a7a97b3e57 +#: ../../../changes.txt:1083 c032ea66644e40a6a10d7c3fa8856e51 msgid "Comparison & performance graphing." msgstr "" -#: ../../../changes.txt:901 56e8eb3ea83d4a3596324280971a4b4c +#: ../../../changes.txt:1084 e72ddf771e77494d898ef5b190d8fe76 msgid "Includes performance methodology in appendix." msgstr "" -#: ../../../changes.txt:902 2d19b7ab1fe24bd680373e75a518bd28 +#: ../../../changes.txt:1085 f8b3ceaa7fc44a689a2a952c95c67f90 msgid "Updates conf.py to understand single back-ticks as code." msgstr "" -#: ../../../changes.txt:903 f8eb438aa2aa4106b77d1306c473f3d0 +#: ../../../changes.txt:1086 dcb6db957d9d41ddb2726c56e5117eb8 msgid "Converts double back-ticks to single back-ticks." msgstr "" -#: ../../../changes.txt:904 ba5c457cfbea42b5994e0c06aa44c275 +#: ../../../changes.txt:1087 3293ed48cc574bbe98c7df0b89db86f5 msgid "Removes redundant files." msgstr "" -#: ../../../changes.txt:906 08e16cf64ac4460ea23ffe48e821f348 +#: ../../../changes.txt:1089 2f5b6b36f3164a5bae8c0ac2abfdb9e3 msgid "Improve ``insert_file()`` documentation." msgstr "" -#: ../../../changes.txt:908 19890468c381408388343a0552bfdfea +#: ../../../changes.txt:1091 eba1f9b7aa904bf6b82517d001a802de msgid "``get_bboxlog()``: aded optional ``layers`` to ``get_bboxlog()``." msgstr "" -#: ../../../changes.txt:909 3461b74bd90c4edaabae78b7b38b828b +#: ../../../changes.txt:1092 40daadc994364c7691c67846ed6fa351 msgid "" "``Page.get_texttrace()``: add new dictionary key ``layer``, name of " "Optional Content Group." msgstr "" -#: ../../../changes.txt:911 b5f131e0e8c844dfb71bb5e75affffb3 +#: ../../../changes.txt:1094 ab98feb4821143e4b6334043a3146ce3 msgid "Mention use of Python venv in installation documentation." msgstr "" -#: ../../../changes.txt:913 d12b81736796486ba7aa3823b0603ae0 +#: ../../../changes.txt:1096 2157b86cff42409da5a33e06841a182b msgid "Added missing fix for #2057 to release 1.21.1's changelog." msgstr "" -#: ../../../changes.txt:915 16d2012253d4472a906c68a146a6fe4c +#: ../../../changes.txt:1098 328289616f72435ea94320994d961626 msgid "Fixes many links to the PyMuPDF-Utilities repo scripts." msgstr "" -#: ../../../changes.txt:917 ef92225f33a1402aa6ca47c7500bf81b +#: ../../../changes.txt:1100 b54993ea53594ae8a73d4929a8375261 msgid "Avoid duplication of ``changes.txt`` and ``docs/changes.rst``." msgstr "" -#: ../../../changes.txt:919 51d81983f34742f2849b6c9c5582197d +#: ../../../changes.txt:1102 025cdc7a7578464e8ddd104564350a1a msgid "Build" msgstr "" -#: ../../../changes.txt:921 fa2fc06a66134b89a86cee115f7a9c03 +#: ../../../changes.txt:1104 69e89fa300bc48a4ab03d3d0897226ef msgid "Added ``pyproject.toml`` file to improve builds using pip etc." msgstr "" -#: ../../../changes.txt:925 505a5f29de19477986573c593ca83908 +#: ../../../changes.txt:1108 c535451da83d4789a10c9395586415a3 msgid "**Changes in Version 1.21.1 (2022-12-13)**" msgstr "" -#: ../../../changes.txt:927 c5c374917a754373bd3dd4741a3a918f +#: ../../../changes.txt:1110 3bb1eb2546e24b8ebdb0755a2b66b583 msgid "This release uses ``MuPDF-1.21.1``." msgstr "" -#: ../../../changes.txt:931 fea6dc2753b1404d986b663410a55e56 +#: ../../../changes.txt:1114 2de1b896301e4aaeaada183ee47c6844 msgid "" "**Fixed** `#2110 `_: " "Fully embedded font is extracted only partially if it occupies more than " "one object" msgstr "" -#: ../../../changes.txt:932 4c1b57c9f3a3498090e064e658fb8f00 +#: ../../../changes.txt:1115 23fd55546ad64412a49f806e2a08fbb2 msgid "" "**Fixed** `#2094 `_: " "Rectangle Detection Logic" msgstr "" -#: ../../../changes.txt:933 5874e07b101b4566b83a49006ba79655 +#: ../../../changes.txt:1116 378ac79f32aa46c0b050cafa349db820 msgid "" "**Fixed** `#2088 `_: " "Destination point not set for named links in toc" msgstr "" -#: ../../../changes.txt:934 678b26973f7b4976ad3bbe2c0036e40c +#: ../../../changes.txt:1117 82d872180d97428684a13afba4189125 msgid "" "**Fixed** `#2087 `_: " "Image with Filter \"[/FlateDecode/JPXDecode]\" not extracted" msgstr "" -#: ../../../changes.txt:935 bde63d8a756f4eb792c4e78056d01215 +#: ../../../changes.txt:1118 6b69f386a8b347a8878fc0131b68581e msgid "" "**Fixed** `#2086 `_: " "Document.save() owner_pw & user_pw has buffer overflow bug" msgstr "" -#: ../../../changes.txt:936 a0579845cad643608c772aa70bfcb0b6 +#: ../../../changes.txt:1119 b1af5bd35578441b8a526d612d9bbeb5 msgid "" "**Fixed** `#2076 `_: " "Segfault in fitz.py" msgstr "" -#: ../../../changes.txt:937 a057f35d552444c0a115db859c4d0b9f +#: ../../../changes.txt:1120 10bfbc8ba7704375aaf02c8e14fd1610 msgid "" "**Fixed** `#2057 `_: " "Document.save garbage parameter not working in PyMuPDF 1.21.0" msgstr "" -#: ../../../changes.txt:938 4421d593cb724255b48e190b2a992269 +#: ../../../changes.txt:1121 b9d1bef0500e459691ee5732ee6d9420 msgid "" "**Fixed** `#2051 `_: " "Missing DPI Parameter" msgstr "" -#: ../../../changes.txt:939 f258f4889d1a4387b73f4ff58720671a +#: ../../../changes.txt:1122 d332cb77d11a44c8b90dbee144a49144 msgid "" "**Fixed** `#2048 `_: " "Invalid size of TextPage and bbox with newest version 1.21.0" msgstr "" -#: ../../../changes.txt:940 428f10e0c44a4d1ea93cbac03814e099 +#: ../../../changes.txt:1123 e433f49a3f9b4f5d840653e8aaf19af9 msgid "" "**Fixed** `#2045 `_: " "SystemError: returned a result " "with an error set" msgstr "" -#: ../../../changes.txt:941 29b1211eec8f475daf7105a3e78d7ad4 +#: ../../../changes.txt:1124 d1a9d0c2081e4b8b9c9e6a5796599755 msgid "" "**Fixed** `#2039 `_: " "1.21.0 fails to build against system libmupdf" msgstr "" -#: ../../../changes.txt:942 59e2c5a860ee40088a70ec5920985dbc +#: ../../../changes.txt:1125 d2dda8f2369e4023bbb5302808b70f9a msgid "" "**Fixed** `#2036 `_: " "Archive::Archive defined twice" msgstr "" -#: ../../../changes.txt:944 d19f8a2abc884ae0846d7b5327cacfcb +#: ../../../changes.txt:1127 d6d20cd7e1d34deb8c8357d4092e06e4 msgid "Other" msgstr "" -#: ../../../changes.txt:946 43cf01af1c384802aee4331d260e9f8b +#: ../../../changes.txt:1129 93ef67701ea94d2a8376025a12f3ac30 msgid "Swallow \"&zoom=nan\" in link uri strings." msgstr "" -#: ../../../changes.txt:947 946add15ea874f608bd1ab2bdd602988 +#: ../../../changes.txt:1130 b64a068650c64de0bd772999dc57c0f5 msgid "" "Add new Page utility methods ``Page.replace_image()`` and " "``Page.delete_image()``." msgstr "" -#: ../../../changes.txt:951 c4c8e580545a421b8749e09fd844ee68 +#: ../../../changes.txt:1134 86ab6fec847d4f3885ca39139982df66 msgid "" "`#2040 `_: Added note " "about test failure with non-default build of MuPDF, to " "``tests/README.md``." msgstr "" -#: ../../../changes.txt:952 324de642ce2645799126f7b2657a8a35 +#: ../../../changes.txt:1135 274776123d27441caef4a47e77ea77af msgid "" "`#2037 `_: In " "``docs/installation.rst``, mention incompatibility with chocolatey.org on" " Windows." msgstr "" -#: ../../../changes.txt:953 8ecab8fb7dba4da4a0766cc7e52a21aa +#: ../../../changes.txt:1136 61e3ac1dd61e41c6bf577d4e833d25c9 msgid "" "`#2061 `_: Fixed " "description of ``Annot.file_info``." msgstr "" -#: ../../../changes.txt:954 89f317bb363749cfb3b91801f1301530 +#: ../../../changes.txt:1137 f6b19e96a9344289939778f8c247ec96 msgid "" "`#2065 `_: Show how to " "insert internal PDF link." msgstr "" -#: ../../../changes.txt:955 416d69972a2e49c99bd3ef3321ea2852 +#: ../../../changes.txt:1138 a7a4ccc8f7524e9bba4b9bafd823d398 msgid "Improved description of building from source without an sdist." msgstr "" -#: ../../../changes.txt:956 9f9e362f048b4c3b89bba4552efd8b0d +#: ../../../changes.txt:1139 57bd571205e64efab1acad657410273e msgid "Added information about running tests." msgstr "" -#: ../../../changes.txt:957 f94f7e1ba63647fc90c97efe1c391aec +#: ../../../changes.txt:1140 a9aa76fa4fe347e1be104390514767f2 msgid "" "`#2084 `_: Fixed broken " "link to PyMuPDF-Utilities." msgstr "" -#: ../../../changes.txt:960 c1f5da7804304fc7b4bbdf9a85848de4 +#: ../../../changes.txt:1143 8d142bd0cc904bac8edb9de68c0e66a4 msgid "**Changes in Version 1.21.0 (2022-11-8)**" msgstr "" -#: ../../../changes.txt:962 2c232bc5cf7e49f698c55097ab4756f7 +#: ../../../changes.txt:1145 f37ee6ea62e14d89830e50c7626b1239 msgid "This release uses ``MuPDF-1.21.0``." msgstr "" -#: ../../../changes.txt:964 8144b9fe03484021a48236c2c5b7b238 +#: ../../../changes.txt:1147 1a48a57b38ff4e07833e9c3d37727414 msgid "New feature: Stories." msgstr "" -#: ../../../changes.txt:966 4a6a7e5fb9694ebd86c5798153d9d8a2 +#: ../../../changes.txt:1149 059f8b39221247aa90432bd125a57346 msgid "Added wheels for Python-3.11." msgstr "" -#: ../../../changes.txt:970 a61324062ea943738ed9e2a2c9edfe50 +#: ../../../changes.txt:1153 8e13c13d7d1241e19d4a9b9643730a5e msgid "" "**Fixed** `#1701 `_: " "Broken custom image insertion." msgstr "" -#: ../../../changes.txt:971 7b55224f6c5e475491a83554f7f1b308 +#: ../../../changes.txt:1154 7bf2231b1e0b4b94915b5b1b3086c11d msgid "" "**Fixed** `#1854 `_: " "`Document.delete_pages()` declines keyword arguments." msgstr "" -#: ../../../changes.txt:972 d03f00a848ab467b9be0ff3aded596f8 +#: ../../../changes.txt:1155 92372dd80a064daf9c690376a45e1943 msgid "" "**Fixed** `#1868 `_: " "Access Violation Error at `page.apply_redactions()`." msgstr "" -#: ../../../changes.txt:973 d52a030cb63148dd9b7a1c15e85799b9 +#: ../../../changes.txt:1156 4b7551daad58493d8e1b5f9d46ab1069 msgid "" "**Fixed** `#1909 `_: " "Adding text with `fontname=\"Helvetica\"` can silently fail." msgstr "" -#: ../../../changes.txt:974 9fb7539246e44ba5a31e0abb3d7aff7e +#: ../../../changes.txt:1157 ba5e861150f9424cb820efff9aa97705 msgid "" "**Fixed** `#1913 `_: " "`draw_rect()`: does not respect width if color is not specified." msgstr "" -#: ../../../changes.txt:975 3308297c0db141d6a55b314075bebfe6 +#: ../../../changes.txt:1158 bcd64b9baa2348c0ac23a55fe605e452 msgid "" "**Fixed** `#1917 `_: " "`subset_fonts()`: make it possible to silence the stdout." msgstr "" -#: ../../../changes.txt:976 23a8d3ae0fc1481aa5e663675eb3b56e +#: ../../../changes.txt:1159 c8b98883b12047009210f07eb6d801b5 msgid "" "**Fixed** `#1936 `_: " "Rectangle detection can be incorrect producing wrong output." msgstr "" -#: ../../../changes.txt:977 063c9ac23b434b3382bfa9e893021060 +#: ../../../changes.txt:1160 1c0dfc851c0645b181fd9f2c7cbd0dd4 msgid "" "**Fixed** `#1945 `_: " "Segmentation fault when saving with `clean=True`." msgstr "" -#: ../../../changes.txt:978 9632e9d9dae3486d90e74012a2fe501a +#: ../../../changes.txt:1161 36b3990eb7c94e17be470c88003e2e42 msgid "" "**Fixed** `#1965 `_: " "`pdfocr_save()` Hard Crash." msgstr "" -#: ../../../changes.txt:979 f9655dc160c246688f36fdcd8d278854 +#: ../../../changes.txt:1162 961174ec01f64b6a914abafe58f6f837 msgid "" "**Fixed** `#1971 `_: " "Segmentation fault when using `get_drawings()`." msgstr "" -#: ../../../changes.txt:980 fa76367426034464af30f0c80b4a5685 +#: ../../../changes.txt:1163 678eccbe3c27419db3766841da6c74ac msgid "" "**Fixed** `#1946 `_: " "`block_no` and `block_type` switched in `get_text()` docs." msgstr "" -#: ../../../changes.txt:981 f329145267d441f59a94207da2713e2d +#: ../../../changes.txt:1164 29ce69170d32413999e2bf61a8b660ef msgid "" "**Fixed** `#2013 `_: " "AttributeError: 'Widget' object has no attribute '_annot' in delete " "widget." msgstr "" -#: ../../../changes.txt:983 613c9181943e45d389c9063bd8adb3c7 +#: ../../../changes.txt:1166 9beebd00fd6d448d92d7504ef1892255 msgid "Misc changes to core code:" msgstr "" -#: ../../../changes.txt:985 af36bd5220bd4879a20d1077443406eb +#: ../../../changes.txt:1168 660c2e826f474dbeb44ffe35874bcf2f msgid "Fixed various compiler warnings and a sequence-point bug." msgstr "" -#: ../../../changes.txt:986 6311294771ce47828ddb05b9db84c954 +#: ../../../changes.txt:1169 22ed24bd99ae45c0b842d4394d452c38 msgid "Added support for Memento builds." msgstr "" -#: ../../../changes.txt:987 598bd0e7b179403c80ff1d32ab9422ab +#: ../../../changes.txt:1170 bfa15d60a210494d843d5cd2c2485e71 msgid "Fixed leaks detected by Memento in test suite." msgstr "" -#: ../../../changes.txt:988 60460448763345b388a18ddc4c7b2ec2 +#: ../../../changes.txt:1171 57de10ad916844bb8adfd90224b3124e msgid "Fixed handling of exceptions in set_name() and set_rect()." msgstr "" -#: ../../../changes.txt:989 a2a4114cea7e4073826f6708fa245999 +#: ../../../changes.txt:1172 9ad7d680bbe5430f919a4c10bce408ef msgid "Allow build with latest MuPDF, for regular testing of PyMuPDF master." msgstr "" -#: ../../../changes.txt:990 6d5b45c9708b4673b52069e2c671c80d +#: ../../../changes.txt:1173 4807f7a4bb5c4082928d24debb43ce8a msgid "Cope with new MuPDF exceptions when setting rect for some Annot types." msgstr "" -#: ../../../changes.txt:991 becd6e52e4e445a7a7c7e0eec1d333c7 +#: ../../../changes.txt:1174 8175de75d6ce47f6a4397884ab6160d1 msgid "" "Reduced cosmetic differences between MuPDF's config.h and PyMuPDF's " "_config.h." msgstr "" -#: ../../../changes.txt:992 d29f86659aa44f9e9fc08c2ddcc1efde +#: ../../../changes.txt:1175 7a38e1cbd2f844d793f9dd5108fa280b msgid "Cope with various changes to MuPDF API." msgstr "" -#: ../../../changes.txt:996 4b41baa75124499d9e2d02a80b5df8fa +#: ../../../changes.txt:1179 5889cb3bfb2041eba8ea12c66c00014a msgid "Fixed various broken links and typos in docs." msgstr "" -#: ../../../changes.txt:997 dc36a2afdfa248e7a4caea61c94c2e59 +#: ../../../changes.txt:1180 8af2330e810445429d05d9bf2d52eb6d msgid "Mention install of `swig-python` on MacOS for #875." msgstr "" -#: ../../../changes.txt:998 e72d978986384d20a6fbab3dee1b4774 +#: ../../../changes.txt:1181 7da5ddc7306147c8aa4af9ebdf84a50b msgid "Added (untested) wheels for macos-arm64." msgstr "" -#: ../../../changes.txt:1003 96fc47e8dc6c4f01a0f7c8d263a570c5 +#: ../../../changes.txt:1186 ad22f625f2b646c8b529aaea34da4283 msgid "**Changes in Version 1.20.2**" msgstr "" -#: ../../../changes.txt:1005 129a038812cf4742ad6236638640a174 +#: ../../../changes.txt:1188 e34bcddf9c354eb0aea4463a83c58dd7 msgid "This release uses ``MuPDF-1.20.3``." msgstr "" -#: ../../../changes.txt:1007 81466bc4a9d04fe38ba86eaa562ef3a2 +#: ../../../changes.txt:1190 5811775a9ea9401aa90110ea63e89256 msgid "" "**Fixed** `#1787 `_. Fix " "linking issues on Unix systems." msgstr "" -#: ../../../changes.txt:1010 6c93a2fa0bb34e1d992d5fb1e0b1dc5d +#: ../../../changes.txt:1193 25bb4fb1d4304f16b1cb07650cf2f12a msgid "" "**Fixed** `#1824 `_. " "SegFault when applying redactions overlapping a transparent image. (Fixed" " in ``MuPDF-1.20.3``.)" msgstr "" -#: ../../../changes.txt:1014 a5249b2e7e2b458aa06656957d6e391c +#: ../../../changes.txt:1197 32e6f47fce404142907e47a4532c576a msgid "Improvements to documentation:" msgstr "" -#: ../../../changes.txt:1016 3cd2c5d901504c66bb8eec510004ab15 +#: ../../../changes.txt:1199 c482411a819a4f64a38c8e1a32d366cb msgid "" "Improved information about building from source in " "``docs/installation.rst``." msgstr "" -#: ../../../changes.txt:1017 e651ef457abd42d1847c52f3e0cd0c5e +#: ../../../changes.txt:1200 9413a77ed9ab4b4580992f121035d007 msgid "Clarified memory allocation setting ``JM_MEMORY` in ``docs/tools.rst``." msgstr "" -#: ../../../changes.txt:1018 078ef5b5e1594f3990fde234a3a6f2e4 +#: ../../../changes.txt:1201 ee4f3e379022483da0cb66bb5e461b51 msgid "Fixed link to PDF Reference manual in ``docs/app3.rst``." msgstr "" -#: ../../../changes.txt:1019 a19c76318fea4f87a9b817574f148179 +#: ../../../changes.txt:1202 41b1826514504b27a4559aed441e6155 msgid "Fixed building of html documentation on OpenBSD." msgstr "" -#: ../../../changes.txt:1020 e7ed181dee114514a7433b5ee8f0fc69 +#: ../../../changes.txt:1203 d7f99fbee3fd464cae429db22bf01e83 msgid "Moved old ``docs/faq.rst`` into separate ``docs/recipes-*`` files." msgstr "" -#: ../../../changes.txt:1022 fbfe1417e2194630b666720d87c89fca +#: ../../../changes.txt:1205 e0fdffe7fc984f0897ee6d05531f746a msgid "Removed some unused files and directories:" msgstr "" -#: ../../../changes.txt:1024 5c910eb334714386977652b1bc32e175 +#: ../../../changes.txt:1207 c0961b70583f4add905375509140ffd7 msgid "``installation/``" msgstr "" -#: ../../../changes.txt:1025 f3d407b088694c0e80500f391e72eef0 +#: ../../../changes.txt:1208 f3f4a94889fb40bfb59e643d7f29d940 msgid "``docs/wheelnames.txt``" msgstr "" -#: ../../../changes.txt:1028 a4d135166c544545aa4b70db30b98085 +#: ../../../changes.txt:1211 177ae9c1f4b74d65b1dd8f7057c9b2bb msgid "**Changes in Version 1.20.1**" msgstr "" -#: ../../../changes.txt:1030 6c15ea3db50141bc9982b8fa68d585f3 +#: ../../../changes.txt:1213 f9bc2c30db6b4913ad8f80c2a5ac86ae msgid "" "**Fixed** `#1724 `_. Fix " "for building on FreeBSD." msgstr "" -#: ../../../changes.txt:1033 42e2e77e5f78483bb648064658947ab1 +#: ../../../changes.txt:1216 4ddf7f55a449424aa337ccadb113e6c6 msgid "" "**Fixed** `#1771 `_. " "`linkDest()` had a broken call to `re.match()`, introduced in 1.20.0." msgstr "" -#: ../../../changes.txt:1036 53e243d4a5d94da4a65735012f89b26a +#: ../../../changes.txt:1219 966641d494d94cafaf728c1bce9d0026 msgid "" "**Fixed** `#1751 `_. " "`get_drawings()` and `get_cdrawings()` previously always returned with " "`closePath=False`." msgstr "" -#: ../../../changes.txt:1039 e76854cfd123488c8472a2a01bb65574 +#: ../../../changes.txt:1222 5c05ef22f2934aae9e39fa33add4d68e msgid "" "**Fixed** `#1645 `_. " "Default FreeText annotation text color is now black." msgstr "" -#: ../../../changes.txt:1042 9d66942725a846f1b9b5026e35a5df3b +#: ../../../changes.txt:1225 7a2c98d6944648a1bc2a9e27ca21546f msgid "Improvements to sphinx-generated documentation:" msgstr "" -#: ../../../changes.txt:1044 2e015bc6b5d04a33925cee9f4557b7d6 +#: ../../../changes.txt:1227 9b98b0cea0854e0fa69c679ce8aadc8e msgid "Use readthedocs theme with enhancements." msgstr "" -#: ../../../changes.txt:1045 c0a11582251e413fa30ff3abdf93f7ec +#: ../../../changes.txt:1228 a269f7c8267f4e4ba0cf4a2bc6c5db89 msgid "Renamed the `.txt` files to have `.rst` suffixes." msgstr "" -#: ../../../changes.txt:1049 f36cf8e6450a4be6a271d65cc38f7d57 +#: ../../../changes.txt:1232 de37c3a471ae4c21aafa2b5025f1d938 msgid "**Changes in Version 1.20.0**" msgstr "" -#: ../../../changes.txt:1051 584a61bbfe2f4168b86b8cf52532c1bf +#: ../../../changes.txt:1234 b39c87edf89940c38ab2b6884be47ec7 msgid "This release uses ``MuPDF-1.20.0``, released 2022-06-15." msgstr "" -#: ../../../changes.txt:1053 6585481d9daa427a803348811eaf56b8 +#: ../../../changes.txt:1236 47061f9f01e64ccd9c355cef3a8d6a17 msgid "" "Cope with new MuPDF link uri format, changed from ``#,,`` " "to ``#page=&zoom=,,``." msgstr "" -#: ../../../changes.txt:1055 0e088d5311814805a557f1c0fb4b7b6c +#: ../../../changes.txt:1238 abf0f98331b44a8e99e0fdaa923cefb5 msgid "" "In ``tests/test_insertpdf.py``, use new reference output " "``joined-1.20.pdf``. We also check that new output values are " "approximately the same as the old ones." msgstr "" -#: ../../../changes.txt:1057 45201614739a45cfbeda85c00f2e99be +#: ../../../changes.txt:1240 10f94b49fe2b4892bbbaac23ec3df790 msgid "" "**Fixed** `#1738 `_. Leak" " of `pdf_graft_map`. Also fixed a SEGV issue that this seemed to expose, " "caused by incorrect freeing of underlying fz_document." msgstr "" -#: ../../../changes.txt:1060 d67a76cdfe2a4a6fb9c9af0aeeeade09 +#: ../../../changes.txt:1243 4ee9d86d05624363b800826c8b6e83e9 msgid "" "**Fixed** `#1733 `_. " "Fixed ownership of `Annotation.get_pixmap()`." msgstr "" -#: ../../../changes.txt:1062 38455caa3c3745669f1dd1a2c8407d4f +#: ../../../changes.txt:1245 288f9aa21a664bf0b90656b16d3e9c9d msgid "Changes to build/release process:" msgstr "" -#: ../../../changes.txt:1064 ecfd1decb114481682d920a08b42970f +#: ../../../changes.txt:1247 c05acacb3fba4cb7aae4533893d59eb4 msgid "" "If pip builds from source because an appropriate wheel is not available, " "we no longer require MuPDF to be pre-installed. Instead the required " @@ -2895,30 +3420,30 @@ msgid "" "PyMuPDF." msgstr "" -#: ../../../changes.txt:1066 bd4dfb28ac814135ac412b8198e81a37 +#: ../../../changes.txt:1249 30dd92a556cc4e0f813b0d0f0dd314c5 msgid "" "Various changes to ``setup.py`` to download the required MuPDF release as" " required. See comments at start of setup.py for details." msgstr "" -#: ../../../changes.txt:1068 4341def40315410194055c29efa563ad +#: ../../../changes.txt:1251 96ce8c226fe743068f1e6d17cc4204ce msgid "" "Added ``.github/workflows/build_wheels.yml`` to control building of " "wheels on Github." msgstr "" -#: ../../../changes.txt:1072 5945c097732e4fc08bcad169b3d2d5ec +#: ../../../changes.txt:1255 30986c29af244f149746c662c31e41c5 msgid "**Changes in Version 1.19.6**" msgstr "" -#: ../../../changes.txt:1074 ff29d93c068d43aa98b3dafd31a9e293 +#: ../../../changes.txt:1257 306105c0937d4983b83bbb152ae03bae msgid "" "**Fixed** `#1620 `_. The " ":ref:`TextPage` created by :meth:`Page.get_textpage` will now be freed " "correctly (removed memory leak)." msgstr "" -#: ../../../changes.txt:1075 63a542fb193446bd996b65d5e47dfb29 +#: ../../../changes.txt:1258 ae60a9cbae3c4e31ad54c520b0382cd5 msgid "" "**Fixed** `#1601 `_. " "Document open errors should now be more concise and easier to interpret. " @@ -2926,36 +3451,36 @@ msgid "" "**added:**" msgstr "" -#: ../../../changes.txt:1077 453910aaef4f49bab214cf49f0b8702e +#: ../../../changes.txt:1260 ae778068f5db415e9647c63b20554f56 msgid "" "``EmptyFileError`` -- raised when trying to create a :ref:`Document` " "(``fitz.open()``) from an empty file or zero-length memory." msgstr "" -#: ../../../changes.txt:1078 58a88a901a0e4981a1c0eb1c6c4151e2 +#: ../../../changes.txt:1261 471c7d3b9cba41a1826f7ebe1bd878c9 msgid "" "``FileDataError`` -- raised when MuPDF encounters irrecoverable document " "structure issues." msgstr "" -#: ../../../changes.txt:1080 5a8a0abf37d14db181567da3b0f01180 +#: ../../../changes.txt:1263 e755c60e279f4827a8a2892e3d711566 msgid "**Added** :meth:`Page.load_widget` given a PDF field's xref." msgstr "" -#: ../../../changes.txt:1082 d2bd826f468c4cc2a4f662520a78373d +#: ../../../changes.txt:1265 5d0fefd2151543a48aa13be030ffda46 msgid "" "**Added** Dictionary :attr:`pdfcolor` which provide the about 500 colors " "defined as PDF color values with the lower case color name as key." msgstr "" -#: ../../../changes.txt:1084 bcae97691d1041489a63e637a371ef33 +#: ../../../changes.txt:1267 dc94518632fb45e3841694955709f0a1 msgid "" "**Added** algebra functionality to the :ref:`Quad` class. These objects " "can now also be added and subtracted among themselves, and be multiplied " "by numbers and matrices." msgstr "" -#: ../../../changes.txt:1086 aba75009c7a947a2a3f13e15b53817b1 +#: ../../../changes.txt:1269 27048c74287b4cef9fcd622695ad0ef3 msgid "" "**Added** new constants defining the default text extraction flags for " "more comfortable handling. Their naming convention is like " @@ -2963,7 +3488,7 @@ msgid "" ":ref:`text_extraction_flags`." msgstr "" -#: ../../../changes.txt:1088 347857eb55f440fb9a1ebd3a32606809 +#: ../../../changes.txt:1271 66296a89488f495e8ffdfdfdd543b607 msgid "" "**Changed** :meth:`Page.annots` and :meth:`Page.widgets` to detect and " "prevent reloading the page (illegally) inside the iterator loops via " @@ -2972,7 +3497,7 @@ msgid "" "properly designed loops." msgstr "" -#: ../../../changes.txt:1090 d1ccf58974fd45d9a6bdacc3cdff3683 +#: ../../../changes.txt:1273 e184245b4f08463481f8e8b18629efa4 msgid "" "**Changed** several internal utility functions to become standalone " "(\"SWIG inline\") as opposed to be part of the :ref:`Tools` class. This, " @@ -2980,7 +3505,7 @@ msgid "" "creation." msgstr "" -#: ../../../changes.txt:1092 c35c5bb9457c4070a4c9309d745c9c56 +#: ../../../changes.txt:1275 44d43c571e9d4903ac43dbd52bc0f442 msgid "" "**Changed** :meth:`Document.update_stream` to always accept stream " "updates - whether or not the dictionary object behind the xref already is" @@ -2988,43 +3513,43 @@ msgid "" "removed in v1.20.0." msgstr "" -#: ../../../changes.txt:1097 e588ae919011491996a74d01a0eb7f36 +#: ../../../changes.txt:1280 f399a35d5f64416db6d984f39d4b9b8f msgid "**Changes in Version 1.19.5**" msgstr "" -#: ../../../changes.txt:1099 9d4907fc97664c2bb040c15bc3d1c213 +#: ../../../changes.txt:1282 7b2a033386084aa185e40d79192ab2e7 msgid "" "**Fixed** `#1518 `_. A " "limited \"fix\": in some cases, rectangles and quadrupels were not " "correctly encoded to support re-drawing by :ref:`Shape`." msgstr "" -#: ../../../changes.txt:1101 6282dca62fc6452682d8809ff0ced040 +#: ../../../changes.txt:1284 3946afb9a5bd4971ba8541de589e4778 msgid "" "**Fixed** `#1521 `_. This" " had the same ultimate reason behind issue #1510." msgstr "" -#: ../../../changes.txt:1103 9dea960155a3495db9f9c859b67e4831 +#: ../../../changes.txt:1286 7b37601956b6480c9895b8e94eb2bbf6 msgid "" "**Fixed** `#1513 `_. Some" " Optional Content functions did not support non-ASCII characters." msgstr "" -#: ../../../changes.txt:1105 57a2de0489ed492c8db7d75168e76872 +#: ../../../changes.txt:1288 0e3e8d066bce4baa90014d9d2f806dc2 msgid "" "**Fixed** `#1510 `_. " "Support more soft-mask image subtypes." msgstr "" -#: ../../../changes.txt:1107 57ee6ba4215b47ffb98176c3a3b95845 +#: ../../../changes.txt:1290 dd3de42c8c174161bfb3fcb769b624d4 msgid "" "**Fixed** `#1507 `_. " "Immunize against items in the outlines chain, that are ``\"null\"`` " "objects." msgstr "" -#: ../../../changes.txt:1109 24eab298fced4ddea50a300aa5dc22b8 +#: ../../../changes.txt:1292 b80440005d8d4dd885a9b37949c88807 msgid "" "**Fixed** re-opened `#1417 " "`_. (\"too many open " @@ -3033,138 +3558,138 @@ msgid "" "`_." msgstr "" -#: ../../../changes.txt:1111 f7ca3afc90a84d1ab2d304dc8f3d84f1 +#: ../../../changes.txt:1294 3b434fe5008e4d5bad425da7101d03b9 msgid "" "**Fixed** several undocumented issues in relation to incorrectly setting " "the text span origin :data:`point_like`." msgstr "" -#: ../../../changes.txt:1113 7dafded02a5b4520a45b03d52effa821 +#: ../../../changes.txt:1296 0a9ff9b403a9449492e10f79a72c8ae5 msgid "" "**Fixed** undocumented error computing the character bbox in method " ":meth:`Page.get_texttrace` when text is **flipped** (as opposed to just " "rotated)." msgstr "" -#: ../../../changes.txt:1115 161e901e54ad4bacb4f913b7f28c7cd8 +#: ../../../changes.txt:1298 b824b84c7a61426e81fc587b8cf8e085 msgid "" "**Added** items to the dictionary returned by :meth:`image_properties`: " "``orientation`` and ``transform`` report the natural image orientation " "(EXIF data)." msgstr "" -#: ../../../changes.txt:1117 c3dd738cc2fa4e6daccdbddfcb853dbc +#: ../../../changes.txt:1300 ed32558e215b4f78b2a54154401bfa98 msgid "" "**Added** method :meth:`Document.xref_copy`. It will make a given target " "PDF object an exact copy of a source object." msgstr "" -#: ../../../changes.txt:1122 0d6704826c674b1982c57107a61bf376 +#: ../../../changes.txt:1305 ea587b102a4a4fa3a33075d5d6525268 msgid "**Changes in Version 1.19.4**" msgstr "" -#: ../../../changes.txt:1125 3957d3eff2684571b03b7220a1ecab7e +#: ../../../changes.txt:1308 bd93ad74360f4c9a8d9287630bc2d3c0 msgid "" "**Fixed** `#1505 `_. " "Immunize against circular outline items." msgstr "" -#: ../../../changes.txt:1127 ae051001d7ab4426b175a60adbc45fe9 +#: ../../../changes.txt:1310 dd0173bc16094414956cae7e260401e1 msgid "" "**Fixed** `#1484 `_. " "Correct CropBox coordinates are now returned in all situations." msgstr "" -#: ../../../changes.txt:1129 f23a3658250f47c1b428450e3546fb46 +#: ../../../changes.txt:1312 daee6dd009684357a7beaea521f6e95f msgid "**Fixed** `#1479 `_." msgstr "" -#: ../../../changes.txt:1131 646e8a6d295f4d4994bc07c23ae693ef +#: ../../../changes.txt:1314 4fb5317b94f941c4a4f55823b9924563 msgid "" "**Fixed** `#1474 `_. " "TextPage objects are now properly deleted again." msgstr "" -#: ../../../changes.txt:1133 de145e7acd284b63a7a3b80297a5042d +#: ../../../changes.txt:1316 e500fe03552646f2bbc8bfa78a28c6a2 msgid "" "**Added** :ref:`Page` methods and attributes for PDF ``/ArtBox``, " "``/BleedBox``, ``/TrimBox``." msgstr "" -#: ../../../changes.txt:1135 80b8ea76c1594c2c899619ceea5f152d +#: ../../../changes.txt:1318 79f3c98bc47b4362b98d464ede595203 msgid "" "**Added** global attribute :attr:`TESSDATA_PREFIX` for easy checking of " "OCR support." msgstr "" -#: ../../../changes.txt:1137 f3c641915a804feabd29a6a8c3f8240f +#: ../../../changes.txt:1320 6272356c55e74c9ab3254960dcb0bdaa msgid "" "**Changed** :meth:`Document.xref_set_key` such that dictionary keys will " "physically be removed if set to value ``\"null\"``." msgstr "" -#: ../../../changes.txt:1139 e4979069b87b495c8b1f5a02fb40e43b +#: ../../../changes.txt:1322 f5db8e277bc2420c9a0da6cc44f0e6f9 msgid "" "**Changed** :meth:`Document.extract_font` to optionally return a " "dictionary (instead of a tuple)." msgstr "" -#: ../../../changes.txt:1143 30bd04779de14de4828d6dfd6b7d8dd4 +#: ../../../changes.txt:1326 9fedc5b850804e27ade28d84efdf8079 msgid "**Changes in Version 1.19.3**" msgstr "" -#: ../../../changes.txt:1145 16088ed9d0d84b4daaed13e3e58cc2da +#: ../../../changes.txt:1328 f969561dd09e46339dfc3197c1f8d95e msgid "" "This patch version implements minor improvements for :ref:`Pixmap` and " "also some important fixes." msgstr "" -#: ../../../changes.txt:1147 2696608898cc4f38b42f00682377ad13 +#: ../../../changes.txt:1330 f28152e17a914f85ae2341d992a91dd1 msgid "" "**Fixed** `#1351 `_." " Reverted code that introduced the memory growth in v1.18.15." msgstr "" -#: ../../../changes.txt:1149 1fa21ef0184c4e859f8db63a0c19ec67 +#: ../../../changes.txt:1332 24112e49e2fd49f98349c220956a8633 msgid "" "**Fixed** `#1417 `_." " Developped circumvention for growth of open file handles using " ":meth:`Document.insert_pdf`." msgstr "" -#: ../../../changes.txt:1151 0270925e8a804f09908bcdcd26d55ec1 +#: ../../../changes.txt:1334 3b4ffd5736fd4eeca74b163cac7d8f51 msgid "" "**Fixed** `#1418 `_." " Developped circumvention for memory growth using " ":meth:`Document.insert_pdf`." msgstr "" -#: ../../../changes.txt:1153 67777fee6730420ea4c00eca8ddea008 +#: ../../../changes.txt:1336 2d79f3c27d7146659305df4383aee9b6 msgid "" "**Fixed** `#1430 `_." " Developped circumvention for mass pixmap generations of document pages." msgstr "" -#: ../../../changes.txt:1155 da660e1ca299423a933a89600df523ba +#: ../../../changes.txt:1338 a5c64ba9fd764d1d8494215e3c0b8858 msgid "" "**Fixed** `#1433 `_." " Solves a bbox error for some Type 3 font in PyMuPDF text processing." msgstr "" -#: ../../../changes.txt:1157 2879af920b044d5bb87686be42ee8648 +#: ../../../changes.txt:1340 13b39bcdc9194117a12843a43a34fc7d msgid "" "**Added** :meth:`Pixmap.color_topusage` to determine the share of the " "most frequently used color. Solves `#1397 " "`_." msgstr "" -#: ../../../changes.txt:1159 2b09bdb03bfe48e5bf99fd3f6699fa23 +#: ../../../changes.txt:1342 3d3512e6d4084104be69626f95680b4b msgid "" "**Added** :meth:`Pixmap.warp` which makes a new pixmap from a given " "arbitrary convex quad inside the pixmap." msgstr "" -#: ../../../changes.txt:1161 75838bce4a314febac31571507034b13 +#: ../../../changes.txt:1344 cea44c06be0444c2862a47f8d83aed1a msgid "" "**Added** :attr:`Annot.irt_xref` and :meth:`Annot.set_irt_xref` to " "inquire or set the `/IRT` (\"In Responde To\") property of an annotation." @@ -3172,63 +3697,63 @@ msgid "" "`_." msgstr "" -#: ../../../changes.txt:1163 bd53da47437b46eaaeea6810b6b0b9cb +#: ../../../changes.txt:1346 cd9c264f9b0c4ddeb0664c107019994c msgid "" "**Added** :meth:`Rect.torect` and :meth:`IRect.torect` which compute a " "matrix that transforms to a given other rectangle." msgstr "" -#: ../../../changes.txt:1165 59b499bd19f74c9c91387d79f7b536c9 +#: ../../../changes.txt:1348 779a9e0fc4e446ad99773627e86d338f msgid "" "**Changed** :meth:`Pixmap.color_count` to also return the count of each " "color." msgstr "" -#: ../../../changes.txt:1166 1d90865efcbe4045b0d9c043fc2e8258 +#: ../../../changes.txt:1349 181969c281544876825ae17c78b2a920 msgid "" "**Changed** :meth:`Page.get_texttrace` to also return correct span and " "character bboxes if ``span[\"dir\"] != (1, 0)``." msgstr "" -#: ../../../changes.txt:1170 59424b8381e24f64a286f8c58108d05e +#: ../../../changes.txt:1353 9e17f8f3942f4fd4b9bb961d7fa1b1af msgid "**Changes in Version 1.19.2**" msgstr "" -#: ../../../changes.txt:1172 f29734b3f6454991929f0ba7ce0b45fa +#: ../../../changes.txt:1355 ef70af06d0b9424cb9237cca9693fdb3 msgid "" "This patch version implements minor improvements for " ":meth:`Page.get_drawings` and also some important fixes." msgstr "" -#: ../../../changes.txt:1174 f13b65bcba994affbfb91ad0b1261379 +#: ../../../changes.txt:1357 c78fc0d815fd4c3fb1d07013e135363d msgid "" "**Fixed** `#1388 `_." " Fixed intermittent memory corruption when insert or updating " "annotations." msgstr "" -#: ../../../changes.txt:1176 be357aeaadad42c8b750f0c470fe7c1a +#: ../../../changes.txt:1359 254b3f6414de4542bbe42569eb38dba0 msgid "" "**Fixed** `#1375 `_." " Inconsistencies between line numbers as returned by the \"words\" and " "the \"dict\" options of :meth:`Page.get_text` have been corrected." msgstr "" -#: ../../../changes.txt:1178 6c41168c0c6243a489f2a2739fc85885 +#: ../../../changes.txt:1361 83eaa2d8c6154cbf9191af04ba4ff38a msgid "" "**Fixed** `#1364 `_. The " "check for being a ``\"rawdict\"`` span in :meth:`recover_span_quad` now " "works correctly." msgstr "" -#: ../../../changes.txt:1180 4a3077e757a0417093857036980067ae +#: ../../../changes.txt:1363 84c383e9b591448b969c3a085031fc56 msgid "" "**Fixed** `#1342 `_. " "Corrected the check for rectangle infiniteness in " ":meth:`Page.show_pdf_page`." msgstr "" -#: ../../../changes.txt:1182 a83525c80117402a877c0c02c607d6a8 +#: ../../../changes.txt:1365 81b8fa0c5ab045b4b7ac5efabae6112d msgid "" "**Changed** :meth:`Page.get_drawings`, :meth:`Page.get_cdrawings` to " "return an indicator on the area orientation covered by a rectangle. This " @@ -3237,7 +3762,7 @@ msgid "" "significantly improved." msgstr "" -#: ../../../changes.txt:1184 48fedc7859894900af5f00092d4eacca +#: ../../../changes.txt:1367 82b6728d6eda4df6b12b2446fcada553 msgid "" "**Changed** all text search and extraction methods to set the new " "``flags`` option ``TEXT_MEDIABOX_CLIP`` to ON by default. That bit causes" @@ -3247,38 +3772,38 @@ msgid "" "for omitting text outside the visible area." msgstr "" -#: ../../../changes.txt:1186 e6e22c506c634393b57c9cbce665b260 +#: ../../../changes.txt:1369 ebb3fbf2ef7343ef87fbcac225247cc5 msgid "" "**Added** parameter ``\"dpi\"`` to :meth:`Page.get_pixmap` and " ":meth:`Annot.get_pixmap`. When given, parameter ``\"matrix\"`` is " "ignored, and a :ref:`Pixmap` with the desired dots per inch is created." msgstr "" -#: ../../../changes.txt:1188 0a5c465fb34b49178e4b59fd4ec1bb54 +#: ../../../changes.txt:1371 76f6c7b1714843cf92b0ac65beb1d8f2 msgid "" "**Added** attributes :attr:`Pixmap.is_monochrome` and " ":attr:`Pixmap.is_unicolor` allowing fast checks of pixmap properties. " "Addresses `#1397 `_." msgstr "" -#: ../../../changes.txt:1190 0d64698159834a71bef19ec8998f7a7a +#: ../../../changes.txt:1373 7161418b4dd04d41938c12178aa11b80 msgid "" "**Added** method :meth:`Pixmap.color_count` to determine the unique " "colors in the pixmap." msgstr "" -#: ../../../changes.txt:1192 8764f96939044611975ffbb66578bd5d +#: ../../../changes.txt:1375 0658e70487044523abb865ad40815c18 msgid "" "**Added** boolean parameter ``\"compress\"`` to PDF document method " ":meth:`Document.update_stream`. Addresses / enables solution for `#1408 " "`_." msgstr "" -#: ../../../changes.txt:1196 357b9513d7b7414895c72846f5f0c05d +#: ../../../changes.txt:1379 4166c4a4e9654f78859df125ef92c209 msgid "**Changes in Version 1.19.1**" msgstr "" -#: ../../../changes.txt:1198 86e8f15e90f344aeb0124313193d62de +#: ../../../changes.txt:1381 3cc0414c43844efc808b24c4ba7b0626 msgid "" "This is the first patch version to support MuPDF v1.19.0. Apart from one " "bug fix, it includes important improvements for OCR support and the " @@ -3286,13 +3811,13 @@ msgid "" "top-left to bottom-right\"." msgstr "" -#: ../../../changes.txt:1200 c3b8c99249b34955a9aef22fa1fd5a4f +#: ../../../changes.txt:1383 d650872b63c54df09c9e7538f1325c67 msgid "" "**Fixed** `#1328 `_. " "\"words\" text extraction again returns correct ``(x0, y0)`` coordinates." msgstr "" -#: ../../../changes.txt:1202 5fcd9da74a674a3187b1686d0979d829 +#: ../../../changes.txt:1385 9e5ce0b5a7cb4e0eadae5b30c7b50fee msgid "" "**Changed** :meth:`Page.get_textpage_ocr`: it now supports parameter " "``dpi`` to control OCR quality. It is also possible to choose whether the" @@ -3300,7 +3825,7 @@ msgid "" "page." msgstr "" -#: ../../../changes.txt:1204 5d71c4a7dd824009aa5d3e0b2a4fcc01 +#: ../../../changes.txt:1387 27a9045f8e504c2480897220182db02d msgid "" "**Changed** :meth:`Page.get_drawings` and :meth:`Page.get_cdrawings` to " "automatically convert colors to RGB color tuples. Implements `#1332 " @@ -3308,35 +3833,35 @@ msgid "" "was applied to :meth:`Page.get_texttrace`." msgstr "" -#: ../../../changes.txt:1206 332336e8e2784a6b9ae651d6151177de +#: ../../../changes.txt:1389 329284c7a0dd40b19d7780fc3b8be57e msgid "" "**Changed** :meth:`Page.get_text` to support a parameter ``sort``. If set" " to ``True`` the output is conveniently sorted." msgstr "" -#: ../../../changes.txt:1211 21854c2380eb4e9ba5b012fd9a376c50 +#: ../../../changes.txt:1394 6ffe6054e8fc4ec982438f8fd71f7f71 msgid "**Changes in Version 1.19.0**" msgstr "" -#: ../../../changes.txt:1213 7df9910de0ea4af8969065719d215bd1 +#: ../../../changes.txt:1396 93fd42def89848ed83434ddc7c0150b3 msgid "" "This is the first version supporting MuPDF 1.19.*, published 2021-10-05. " "It introduces many new features compared to the previous version 1.18.*." msgstr "" -#: ../../../changes.txt:1215 e1cf6f00fbef4e65a344dc856757dc8f +#: ../../../changes.txt:1398 ccc5c32e95084bdfac6b6b57fec211ca msgid "" "PyMuPDF has now picked up integrated Tesseract OCR support, which was " "already present in MuPDF v1.18.0." msgstr "" -#: ../../../changes.txt:1217 410b16480a01445a957848ea27671988 +#: ../../../changes.txt:1400 28a2967018544517b2ef43b9b220bf26 msgid "" "Supported images can be OCRed via their :ref:`Pixmap` which results in a " "1-page PDF with a text layer." msgstr "" -#: ../../../changes.txt:1218 e7fcaa52600f4764a2700eb3785bcc32 +#: ../../../changes.txt:1401 93277beffc8d4e4ea8e6cb1d3e17d5fd msgid "" "All supported document pages (i.e. not only PDFs), can be OCRed using " "specialized text extraction methods. The result is a mixture of standard " @@ -3344,7 +3869,7 @@ msgid "" "OCRing) that can be searched and extracted without restrictions." msgstr "" -#: ../../../changes.txt:1219 310e8d26e1ef40c9b0d8aa6694d1dfdf +#: ../../../changes.txt:1402 437b8793bf174ec09f0e61a513f7ae5c msgid "" "All this requires an independent installation of Tesseract. MuPDF " "actually (only) needs the location of Tesseract's ``\"tessdata\"`` " @@ -3352,7 +3877,7 @@ msgid "" " available as environment variable ``TESSDATA_PREFIX``." msgstr "" -#: ../../../changes.txt:1221 6ebe92db57ec4840b8dedf060c5ebae9 +#: ../../../changes.txt:1404 58c74a96eebf4d1b86e56b2ee6d2a3f5 msgid "" "A new MuPDF feature is **journalling PDF updates**, which is also " "supported by this PyMuPDF version. Changes may be logged, rolled back or " @@ -3361,14 +3886,14 @@ msgid "" "systems." msgstr "" -#: ../../../changes.txt:1223 116d206fd01042fa8dabc0e309210e72 +#: ../../../changes.txt:1406 e72da958f90a4f4f928ed1f01ea27c4e msgid "" "A third feature (unrelated to the new MuPDF version) includes the ability" " to detect when page **objects cover or hide each other**. It is now e.g." " possible to see that text is covered by a drawing or an image." msgstr "" -#: ../../../changes.txt:1225 ba0ab882b6c54bee86dde6b8b46f4073 +#: ../../../changes.txt:1408 6d5eac51058f4bb3ad540dc970f86972 msgid "" "**Changed** terminology and meaning of important geometry concepts: " "Rectangles are now characterized as *finite*, *valid* or *empty*, while " @@ -3378,7 +3903,7 @@ msgid "" "for details." msgstr "" -#: ../../../changes.txt:1227 78f054419b2047d4801fa8e3abba2f48 +#: ../../../changes.txt:1410 e66c5280cbc346db97e5bc2cb51a481e msgid "" "**Added** new parameter `\"no_new_id\"` to :meth:`Document.save` / " ":meth:`Document.tobytes` methods. Use it to suppress updating the second " @@ -3387,21 +3912,21 @@ msgid "" "one will be created either." msgstr "" -#: ../../../changes.txt:1229 06c3ee3d4c9a460391a54fb5c794addf +#: ../../../changes.txt:1412 643a0fe551704f0085d1632dda0eb045 msgid "" "**Added** a **journalling facility** for PDF updates. This allows logging" " changes, undoing or redoing them, or saving the journal for later use. " "Refer to :meth:`Document.journal_enable` and friends." msgstr "" -#: ../../../changes.txt:1231 e4df8711b7ed43308d6e76d1eb9f4aaa +#: ../../../changes.txt:1414 32a46f6e342a4279bd8a4f191436305f msgid "" "**Added** new :ref:`Pixmap` methods :meth:`Pixmap.pdfocr_save` and " ":meth:`Pixmap.pdfocr_tobytes`, which generate a 1-page PDF containing the" " pixmap as PNG image with OCR text layer." msgstr "" -#: ../../../changes.txt:1233 497f6df1ae9a4a2394b19cfcaabfd770 +#: ../../../changes.txt:1416 50b47cf3028d4b6f9a0251bddada736c msgid "" "**Added** :meth:`Page.get_textpage_ocr` which executes optical character " "recognition for the page, then extracts the results and stores them " @@ -3412,7 +3937,7 @@ msgid "" "item." msgstr "" -#: ../../../changes.txt:1235 8537620816af42d2b9eeffc3bb9b033c +#: ../../../changes.txt:1418 2b936644a8104ed2ab25a506e8b5b46b msgid "" "**Added** a new parameter ``textpage`` to text extraction and text search" " methods. This allows reuse of a previously created :ref:`TextPage` and " @@ -3421,7 +3946,7 @@ msgid "" "definitely also benefit." msgstr "" -#: ../../../changes.txt:1237 f15c5db6782f4de19bf71dda40ad4f92 +#: ../../../changes.txt:1420 b95af0c617f348d4865a12fd70f530ac msgid "" "**Added** :meth:`Page.get_texttrace`, a technical method delivering low-" "level text character properties. It was present before as a private " @@ -3430,7 +3955,7 @@ msgid "" " the page appearance build operation that painted the text." msgstr "" -#: ../../../changes.txt:1239 a23646d4f2e8437283cad130cb510b0c +#: ../../../changes.txt:1422 8a3cd2567e7a4b759f03aba3fd23125b msgid "" "**Added** :meth:`Page.get_bboxlog` which delivers the list of rectangles " "of page objects like text, images or drawings. Its significance lies in " @@ -3438,51 +3963,51 @@ msgid "" "covering or hiding them." msgstr "" -#: ../../../changes.txt:1241 67dd33f06fb64ecbbc36af02a6c0ac05 +#: ../../../changes.txt:1424 83ad39d6a98c45b6bd09d5f48dcacfcf msgid "" "**Changed** methods :meth:`Page.get_drawings` and " ":meth:`Page.get_cdrawings` to include a \"sequence number\" indicating " "the page appearance build operation that created the drawing." msgstr "" -#: ../../../changes.txt:1243 4db156b3f1e34e32a4635a42153facbf +#: ../../../changes.txt:1426 fa1ad871ec9d427ea5f9df835123d52c msgid "" "**Fixed** `#1311 `_. " "Field values in comboboxes should now be handled correctly." msgstr "" -#: ../../../changes.txt:1244 c9dbc7d01a024fcdbedac5910092acbc +#: ../../../changes.txt:1427 c46b51b2d3c642e79136b06435fb8cf0 msgid "" "**Fixed** `#1290 `_. " "Error was caused by incorrect rectangle emptiness check, which is fixed " "due to new geometry logic of this version." msgstr "" -#: ../../../changes.txt:1245 bfe5072023be421c81d16de1e21a7ac4 +#: ../../../changes.txt:1428 794465f2accd4fb08c078f0cb87d1a8e msgid "" "**Fixed** `#1286 `_. Text" " alignment for redact annotations is working again." msgstr "" -#: ../../../changes.txt:1246 e0d6bb8cd958424593657e44b820bdf3 +#: ../../../changes.txt:1429 c3b9aeb3854f4d568d13b78e55280dab msgid "" "**Fixed** `#1287 `_. " "Infinite loop issue for non-Windows systems when applying some redactions" " has been resolved." msgstr "" -#: ../../../changes.txt:1247 34f032c1bccd4614b842971ae7876fe0 +#: ../../../changes.txt:1430 1d16f03733fa4336b9cd573a649b5a64 msgid "" "**Fixed** `#1284 `_. Text" " layout destruction after applying redactions in some cases has been " "resolved." msgstr "" -#: ../../../changes.txt:1251 e797dff6364942ffbabaf986cfd98eec +#: ../../../changes.txt:1434 b4e90d51da6740738a7bbf5bf5908c72 msgid "**Changes in Version 1.18.18 / 1.18.19**" msgstr "" -#: ../../../changes.txt:1253 6c946675abe04b2b98d1b95ceaa54d52 +#: ../../../changes.txt:1436 ea65fa34b9b840bda29c89b8454401eb msgid "" "**Fixed** issue `#1266 " "`_. Failure to set " @@ -3490,28 +4015,28 @@ msgid "" "1.18.19." msgstr "" -#: ../../../changes.txt:1255 7ead9146cc02467c852910d39eb85794 +#: ../../../changes.txt:1438 b1f6621caf394c5c849f41d813270184 msgid "" "**Fixed** issue `#1257 " "`_. Removing the read-" "only flag from PDF fields is now possible." msgstr "" -#: ../../../changes.txt:1257 62a7da003e0448dfb7c3a7c617910a97 +#: ../../../changes.txt:1440 7777c7005097490aa8f13afc2b3f763e msgid "" "**Fixed** issue `#1252 " "`_. Now correctly " "specifying the ``zoom`` value for PDF link annotations." msgstr "" -#: ../../../changes.txt:1259 333f0855596547a888a6cbd6fcab2f42 +#: ../../../changes.txt:1442 ebff53e03b9d4eada63e89f4a78c2f90 msgid "" "**Fixed** issue `#1244 " "`_. Now correctly " "computing the transform matrix in :meth:`Page.get_image__bbox`." msgstr "" -#: ../../../changes.txt:1261 9a43ca3deef54746ad43fe22fd18d096 +#: ../../../changes.txt:1444 3cdecee723d1422093d7075523a3a643 msgid "" "**Fixed** issue `#1241 " "`_. Prevent returning " @@ -3519,7 +4044,7 @@ msgid "" "certain constellations." msgstr "" -#: ../../../changes.txt:1263 c10fc7627f9840a7958188b731c22a96 +#: ../../../changes.txt:1446 d49b6a1a79bf43b9a8c4d33277028a3e msgid "" "**Fixed** issue `#1234 " "`_. Avoid creating " @@ -3527,23 +4052,23 @@ msgid "" ":meth:`Page.get_cdrawings`." msgstr "" -#: ../../../changes.txt:1265 79896ee9fed342939cf8db8c9978a238 +#: ../../../changes.txt:1448 b03d9cc8f70348b3945451555a279408 msgid "" "**Added** test data and test scripts to the source PyPI source " "distribution." msgstr "" -#: ../../../changes.txt:1269 6423d4634aef44c689c7d9d3491d5b72 +#: ../../../changes.txt:1452 682e7863ee1b4712a34eb85b4c4e83d4 msgid "**Changes in Version 1.18.17**" msgstr "" -#: ../../../changes.txt:1271 863926ae430341b0a1b72153d23d8c36 +#: ../../../changes.txt:1454 5daa4029fb1949559b72014d79677738 msgid "" "Focus of this version are major performance improvements of selected " "functions." msgstr "" -#: ../../../changes.txt:1273 00461dd6fcc14e7689caf3e573eba942 +#: ../../../changes.txt:1456 a6b6181c27334dc1b28f017b27f36ffc msgid "" "**Fixed** issue `#1199 " "`_. Using a non-existing " @@ -3551,7 +4076,7 @@ msgid "" "longer lead to segfaults." msgstr "" -#: ../../../changes.txt:1275 7b2bac89e3fd4dfca301b11b7aee1508 +#: ../../../changes.txt:1458 db55fa540501479ab8d1db56b29e832d msgid "" "**Changed** :meth:`Page.get_drawings` to now differentiate between " "\"stroke\", \"fill\" and combined paths. Paths containing more than one " @@ -3559,30 +4084,30 @@ msgid "" "paths is now available as an option." msgstr "" -#: ../../../changes.txt:1277 e18d128c4c0a4340b64eb3290625152f +#: ../../../changes.txt:1460 f5051c27e4ff42d09099d4cf60648b84 msgid "" "**Added** :meth:`Page.get_cdrawings`, performance-optimized version of " ":meth:`Page.get_drawings`." msgstr "" -#: ../../../changes.txt:1279 f7474dea13fb4e2abe7bbc5847e018d2 +#: ../../../changes.txt:1462 73b510027cc649d682f21a347423c97f msgid "" "**Added** :attr:`Pixmap.samples_mv`, *memoryview* of a pixmap's pixel " "area. Does not copy and thus always accesses the current state of that " "area." msgstr "" -#: ../../../changes.txt:1281 7f1a8c801f4148cabad7cee88106c7ff +#: ../../../changes.txt:1464 131ccaf79bfe44a69e142c5f26094008 msgid "" "**Added** :attr:`Pixmap.samples_ptr`, Python \"pointer\" to a pixmap's " "pixel area. Allows much faster creation (factor 800+) of Qt images." msgstr "" -#: ../../../changes.txt:1287 1042cd7816404084b50c2e6c491a5ebd +#: ../../../changes.txt:1470 a8587ce933dc4affa83ff3eb08f32ec7 msgid "**Changes in Version 1.18.16**" msgstr "" -#: ../../../changes.txt:1289 0365629131394997b4afd615dc39126e +#: ../../../changes.txt:1472 f6b559aeab32422ab496db35ab545e06 msgid "" "**Fixed** issue `#1184 " "`_. Existing PDF widget " @@ -3590,47 +4115,47 @@ msgid "" "font)." msgstr "" -#: ../../../changes.txt:1291 752b1f90d3aa4af28f0916e51dbc9821 +#: ../../../changes.txt:1474 627e5b64fa8949468e59835f2a6a7e98 msgid "" "**Fixed** issue `#1154 " "`_. Text search hits " "should now be correct when ``clip`` is specified." msgstr "" -#: ../../../changes.txt:1293 4ef4aa1ec64645baa55f20452d76d9a7 +#: ../../../changes.txt:1476 ac9174121f3d4bdc801a1242201cf1d9 msgid "**Fixed** issue `#1152 `_." msgstr "" -#: ../../../changes.txt:1295 9c0208c89079472aa042d93d62b25809 +#: ../../../changes.txt:1478 402f9a650ab74b11bfdb6b5aca75922a msgid "**Fixed** issue `#1146 `_." msgstr "" -#: ../../../changes.txt:1297 5b91e4d970364540a57f58e1fc7cdb1e +#: ../../../changes.txt:1480 279a68255018450d8b7e27c38190fdf9 msgid "" "**Added** :attr:`Link.flags` and :meth:`Link.set_flags` to the " ":ref:`Link` class. Implements enhancement requests `#1187 " "`_." msgstr "" -#: ../../../changes.txt:1299 ad9336ec3a504680b99fceb89bb65b35 +#: ../../../changes.txt:1482 6a600251dd1d45ce9238a4813e74452e msgid "" "**Added** option to *simulate* :meth:`TextWriter.fill_textbox` output for" " predicting the number of lines, that a given text would occupy in the " "textbox." msgstr "" -#: ../../../changes.txt:1301 29442565b96f457da1e19193bdf8991f +#: ../../../changes.txt:1484 e904e722c5ea404086e0ae0361ed0b66 msgid "" "**Added** text output support as subcommand `gettext` to the ``fitz`` CLI" " module. Most importantly, original **physical text layout** reproduction" " is now supported." msgstr "" -#: ../../../changes.txt:1306 0d8be90bde95481b9ff1761eb37bd341 +#: ../../../changes.txt:1489 d8a5df41c3d047b9bec77b1c92b072de msgid "**Changes in Version 1.18.15**" msgstr "" -#: ../../../changes.txt:1308 d065e550b9754f1099bf29a4429692b5 +#: ../../../changes.txt:1491 a9f2620c404a491788eafdb4ad061f97 msgid "" "**Fixed** issue `#1088 " "`_. Removing an " @@ -3639,7 +4164,7 @@ msgid "" " in :meth:`Annot.set_colors`." msgstr "" -#: ../../../changes.txt:1310 b5af02cd103b45e79bda153dd474cf3b +#: ../../../changes.txt:1493 fbda096b20eb41b986e22ea248d4ddc8 msgid "" "**Fixed** issue `#1081 " "`_. " @@ -3647,7 +4172,7 @@ msgid "" "character widths for some fonts." msgstr "" -#: ../../../changes.txt:1312 41c633b9dd004379aadce874b2aa8ab0 +#: ../../../changes.txt:1495 f52eb399b9a542b2bc16df84ed9b48a0 msgid "" "**Fixed** issue `#1078 " "`_. :meth:`Page.get_text`" @@ -3656,39 +4181,39 @@ msgid "" ":data:`ligatures` are now preserved." msgstr "" -#: ../../../changes.txt:1314 21165160a0524efabfb5eb2bfc287a46 +#: ../../../changes.txt:1497 3e076c06c88b48b2ab97492fc0ef3366 msgid "" "**Fixed** issue `#1085 " "`_. The old *snake_cased*" " alias of ``fitz.detTextlength`` is now defined correctly." msgstr "" -#: ../../../changes.txt:1316 d2e0c99b14a745d695d6491da198def6 +#: ../../../changes.txt:1499 d005b102d62c4c49b15bb576cabd4189 msgid "" "**Changed** :meth:`Document.subset_fonts` will now correctly prefix font " "subsets with an appropriate six letter uppercase tag, complying with the " "PDF specification." msgstr "" -#: ../../../changes.txt:1318 067e696044d141638fc16b19ebfb94a6 +#: ../../../changes.txt:1501 e550e264b7d949249463ef766b4ccd3c msgid "" "**Added** new method :meth:`Widget.button_states` which returns the " "possible values that a button-type field can have when being set to " "\"on\" or \"off\"." msgstr "" -#: ../../../changes.txt:1320 93a047a747b648f1943a10e43b73c72f +#: ../../../changes.txt:1503 811db94932604f10be4c635ecd2c7001 msgid "" "**Added** support of text with **Small Capital** letters to the " ":ref:`Font` and :ref:`TextWriter` classes. This is reflected by an " "additional bool parameter ``small_caps`` in various of their methods." msgstr "" -#: ../../../changes.txt:1325 72633bdae63d45ed8a73ab2e289fa24c +#: ../../../changes.txt:1508 96033adec8824abdaa859944b30b9cbb msgid "**Changes in Version 1.18.14**" msgstr "" -#: ../../../changes.txt:1327 177de5a0ef8643c6ba443136ac159f5f +#: ../../../changes.txt:1510 0311a9d379ee4d52aff0d257ab2a9114 msgid "" "**Finished** implementing new, \"snake_cased\" names for methods and " "properties, that were \"camelCased\" and awkward in many aspects. At the " @@ -3696,7 +4221,7 @@ msgid "" "background and a mapping of old to new names." msgstr "" -#: ../../../changes.txt:1329 a752330bda2f4ffa8f8b8a7338bb8c85 +#: ../../../changes.txt:1512 8384d8ca12e2404d8a22fccdf28b4730 msgid "" "**Fixed** issue `#1053 " "`_. " @@ -3704,32 +4229,32 @@ msgid "" "computation." msgstr "" -#: ../../../changes.txt:1331 bd976821a9ba40d3b2f3e4ca615d9907 +#: ../../../changes.txt:1514 48fe45103dea418aa007745d19ec6150 msgid "" "**Fixed** issue `#1043 " "`_. Added " "``Pixmap.getPNGdata`` to the aliases of :meth:`Pixmap.tobytes`." msgstr "" -#: ../../../changes.txt:1333 4c453166835b4ea2978f6bf5788e597b +#: ../../../changes.txt:1516 3cb55c93f0014710955b68f707b9adbe msgid "" "**Fixed** an internal error when computing the enveloping rectangle of " "drawn paths as returned by :meth:`Page.get_drawings`." msgstr "" -#: ../../../changes.txt:1335 02f81e8d564341f6815cbf64cbf8b174 +#: ../../../changes.txt:1518 fc780f03d6984e9f8e7828db6e63f8d2 msgid "" "**Fixed** an internal error occasionally causing loops when outputting " "text via :meth:`TextWriter.fill_textbox`." msgstr "" -#: ../../../changes.txt:1337 2408a7c7d9c14c478aa64ffd65c4b5c0 +#: ../../../changes.txt:1520 79351fb9a4c140fa836fafa07d10f1ba msgid "" "**Added** :meth:`Font.char_lengths`, which returns a tuple of character " "widths of a string." msgstr "" -#: ../../../changes.txt:1339 a49025a0fc78414dabece9ebec0e6b1a +#: ../../../changes.txt:1522 5bbea453d3134f82b4e00715877f5d6a msgid "" "**Added** more ways to specify pages in :meth:`Document.delete_pages`. " "Now a sequence (list, tuple or range) can be specified, and the Python " @@ -3737,78 +4262,78 @@ msgid "" "also accepted." msgstr "" -#: ../../../changes.txt:1341 0e9dfe0e34534cc3918266e140f720cf +#: ../../../changes.txt:1524 b6407c1172a8423cbecdc6a48dc6fb11 msgid "" "**Changed** :meth:`Document.del_toc_item`, which disables a single item " "of the TOC: previously, the title text was removed. Instead, now the " "complete item will be shown grayed-out by supporting viewers." msgstr "" -#: ../../../changes.txt:1346 41aa2b9c979a48508bfc5314f7362902 +#: ../../../changes.txt:1529 7e33262c6b504f278e6ec5f30135a24b msgid "**Changes in Version 1.18.13**" msgstr "" -#: ../../../changes.txt:1348 500988b876094698bf9583d0847359a2 +#: ../../../changes.txt:1531 e331d7b0d02f455d897a482a2f066edf msgid "**Fixed** issue `#1014 `_." msgstr "" -#: ../../../changes.txt:1349 a1becfcc83c447db960aceb990c6d22a +#: ../../../changes.txt:1532 854d698bb76840259fb63ae04348b283 msgid "" "**Fixed** an internal memory leak when computing image bboxes -- " ":meth:`Page.get_image_bbox`." msgstr "" -#: ../../../changes.txt:1350 d70bb797fd694dbe838aaad22581ff46 +#: ../../../changes.txt:1533 1e050e2aba4240eba764296cc8f8f55b msgid "" "**Added** support for low-level access and modification of the PDF " "trailer. Applies to :meth:`Document.xref_get_keys`, " ":meth:`Document.xref_get_key`, and :meth:`Document.xref_set_key`." msgstr "" -#: ../../../changes.txt:1351 37380e9039e34c1cae5cc9ec0213cd2c +#: ../../../changes.txt:1534 f1d8388f983543a48cfa456ea3e4e24a msgid "**Added** documentation for maintaining private entries in PDF metadata." msgstr "" -#: ../../../changes.txt:1352 350d569102374bae82ff347a9c0cd524 +#: ../../../changes.txt:1535 b591b0f7756744eebd9f5851d773bde4 msgid "" "**Added** documentation for handling transparent image insertions, " ":meth:`Page.insert_image`." msgstr "" -#: ../../../changes.txt:1353 5763b14bdfce43328c177b7c7211414e +#: ../../../changes.txt:1536 12e66b2b1e86467980bdc6528ad951c7 msgid "" "**Added** :meth:`Page.get_image_rects`, an improved version of " ":meth:`Page.get_image_bbox`." msgstr "" -#: ../../../changes.txt:1354 f3b7ae17c38542eda9ff73687f9d99b8 +#: ../../../changes.txt:1537 ad5ef4e7afb64311a13fbdf82dc127e0 msgid "" "**Changed** :meth:`Document.delete_pages` to support various ways of " "specifying pages to delete. Implements `#1042 " "`_." msgstr "" -#: ../../../changes.txt:1355 5697badaac064e599e501c3c9f5886de +#: ../../../changes.txt:1538 bd0ff477799347a581c13deed3fc5521 msgid "" "**Changed** :meth:`Page.insert_image` to also accept the xref of an " "existing image in the file. This allows \"copying\" images between pages," " and extremely fast mutiple insertions." msgstr "" -#: ../../../changes.txt:1356 a2e8abb593c84eea9d95f166916b5f89 +#: ../../../changes.txt:1539 99264003b05242f99ceff055d109e640 msgid "" "**Changed** :meth:`Page.insert_image` to also accept the integer " "parameter ``alpha``. To be used for performance improvements." msgstr "" -#: ../../../changes.txt:1357 9125dbf5596d4524bcaf60db082b70d0 +#: ../../../changes.txt:1540 e202d5d349ea4d998926e379a3746669 msgid "" "**Changed** :meth:`Pixmap.set_alpha` to support new parameters for pre-" "multiplying colors with their alpha values and setting a specific color " "to fully transparent (e.g. white)." msgstr "" -#: ../../../changes.txt:1358 56d471dd74314a6cb371996da9ff610a +#: ../../../changes.txt:1541 5d2a77b721e94658bc7db8ea33ca5a54 msgid "" "**Changed** :meth:`Document.embfile_add` to automatically set creation " "and modification date-time. Correspondingly, :meth:`Document.embfile_upd`" @@ -3819,48 +4344,48 @@ msgid "" "applications." msgstr "" -#: ../../../changes.txt:1362 9bf20ef4019e4f48b8267ce479f15221 +#: ../../../changes.txt:1545 dd573ecd85b64c379dc198e1d848ca3d msgid "**Changes in Version 1.18.11 / 1.18.12**" msgstr "" -#: ../../../changes.txt:1364 96051fcf68544d318b053b93be0c43ca +#: ../../../changes.txt:1547 5bd355b2bd3e44ad812ec18e6e0a336b msgid "" "**Fixed** issue `#972 `_. " "Improved layout of source distribution material." msgstr "" -#: ../../../changes.txt:1365 b849a6d4a7c94fb4a15594fc006dbcb9 +#: ../../../changes.txt:1548 c2f29d093d80453b8c31e5db23bf4a71 msgid "" "**Fixed** issue `#962 `_. " "Stabilized Linux distribution detection for generating PyMuPDF from " "sources." msgstr "" -#: ../../../changes.txt:1366 1e69d41d28154545b018b37edb03d1b8 +#: ../../../changes.txt:1549 4e50a28935fe4d2eb05b3603759844d1 msgid "" "**Added:** :meth:`Page.get_xobjects` delivers the result of " ":meth:`Document.get_page_xobjects`." msgstr "" -#: ../../../changes.txt:1367 96efde21ace14d628738f9ca56329e90 +#: ../../../changes.txt:1550 3ab2760e98984dd6bad3034c039a0491 msgid "" "**Added:** :meth:`Page.get_image_info` delivers meta information for all " "images shown on the page." msgstr "" -#: ../../../changes.txt:1368 8217e7321cf34dad82005cb9f6d28a3f +#: ../../../changes.txt:1551 91b085ef27984b72ac72a962c7cbc977 msgid "" "**Added:** :meth:`Tools.mupdf_display_warnings` allows setting on / off " "the display of MuPDF-generated warnings. The default is off." msgstr "" -#: ../../../changes.txt:1369 1d1d78d3617147628e72421d2fecb2b2 +#: ../../../changes.txt:1552 a0960b5ab5974e588fde77393423500f msgid "" "**Added:** :meth:`Document.ez_save` convenience alias of " ":meth:`Document.save` with some different defaults." msgstr "" -#: ../../../changes.txt:1370 8bde87b0556b49a180ba61cf9f33e99f +#: ../../../changes.txt:1553 c6d910ded36b4aa5a130d05412bf8314 msgid "" "**Changed:** Image extractions of document pages now also contain the " "image's **transformation matrix**. This concerns " @@ -3868,65 +4393,65 @@ msgid "" "variants of :meth:`Page.get_text`." msgstr "" -#: ../../../changes.txt:1375 d075ccaed6d54a749e428c240695b236 +#: ../../../changes.txt:1558 d707ea216f4c4472aec2746cb96ddc20 msgid "**Changes in Version 1.18.10**" msgstr "" -#: ../../../changes.txt:1377 04411258bc164403b5b1aba1e74ac028 +#: ../../../changes.txt:1560 021a4ff32dbf42d5bdf2c63c62bbd4b9 msgid "" "**Fixed** issue `#941 `_. " "Added old aliases for :meth:`DisplayList.get_pixmap` and " ":meth:`DisplayList.get_textpage`." msgstr "" -#: ../../../changes.txt:1378 b481db8135d94c43b4d925c080838582 +#: ../../../changes.txt:1561 f31040d109554efba1c804e6b80b91c4 msgid "" "**Fixed** issue `#929 `_. " "Stabilized removal of JavaScript objects with :meth:`Document.scrub`." msgstr "" -#: ../../../changes.txt:1379 e59ccec1feae4552b2cee1ccd08845b2 +#: ../../../changes.txt:1562 d92283070ba648cf9313d1b486568d7c msgid "" "**Fixed** issue `#927 `_. " "Removed a loop in the reworked :meth:`TextWriter.fill_textbox`." msgstr "" -#: ../../../changes.txt:1380 717a9e20087b43e9a8bea9211d6d49fc +#: ../../../changes.txt:1563 ea7477a2bc8c42f2903d3e90d7de9b3d msgid "" "**Changed** :meth:`Document.xref_get_keys` and " ":meth:`Document.xref_get_key` to also allow accessing the PDF trailer " "dictionary. This can be done by using `-1` as the xref number argument." msgstr "" -#: ../../../changes.txt:1381 d0dc8030ab07405889acc1007ed54237 +#: ../../../changes.txt:1564 e32546c1b549420f8aa280a8c8ffa5dc msgid "" "**Added** a number of functions for reconstructing the quads for text " "lines, spans and characters extracted by :meth:`Page.get_text` options " "\"dict\" and \"rawdict\". See :meth:`recover_quad` and friends." msgstr "" -#: ../../../changes.txt:1382 034ea45e8a7f445991c9c9cf1790ad62 +#: ../../../changes.txt:1565 3776e3b2571d4e4e8918fe317cef44db msgid "" "**Added** :meth:`Tools.unset_quad_corrections` to suppress character quad" " corrections (occasionally required for erroneous fonts)." msgstr "" -#: ../../../changes.txt:1386 f8e0fbaa766f47479737663013917700 +#: ../../../changes.txt:1569 6d6c45b9b5874f949f0c148c475c8292 msgid "**Changes in Version 1.18.9**" msgstr "" -#: ../../../changes.txt:1389 71c767e362eb44f49e9f95ae475eec89 +#: ../../../changes.txt:1572 b664fe746c374845808f2345ae12ff4f msgid "" "**Fixed** issue `#888 `_. " "Removed ambiguous statements concerning PyMuPDF's license, which is now " "clearly stated to be GNU AGPL V3." msgstr "" -#: ../../../changes.txt:1390 44be316b97c94f8aa52d62ddc6f1f012 +#: ../../../changes.txt:1573 b7e8373ddaf241329fd07e8f62e14800 msgid "**Fixed** issue `#895 `_." msgstr "" -#: ../../../changes.txt:1391 254d1b9bf7d742c783049fd39e59ff9f +#: ../../../changes.txt:1574 c417db0238974740874e2a5b9766d1be msgid "" "**Fixed** issue `#896 `_. " "Since v1.17.6 PyMuPDF suppresses the font subset tags and only reports " @@ -3935,29 +4460,29 @@ msgid "" " behaviour, :meth:`Tools.set_subset_fontnames`." msgstr "" -#: ../../../changes.txt:1392 d9edf34d89104429b64531fc3549009e +#: ../../../changes.txt:1575 ce76ccfd8164412ea522a47f7446c8a1 msgid "" "**Fixed** issue `#885 `_. " "Pixmap creation now also works with filenames given as ``pathlib.Paths``." msgstr "" -#: ../../../changes.txt:1393 06c2a1bf21964db4aa82b817ca7e4e78 +#: ../../../changes.txt:1576 82bfe6b311ba448aae8c250a181e54ee msgid "" "**Changed** :meth:`Document.subset_fonts`: Text is **not rewritten** any " "more and should therefore **retain all its origial properties** -- like " "being hidden or being controlled by Optional Content mechanisms." msgstr "" -#: ../../../changes.txt:1394 bd6fa49af1e4400fbe9d593bf2e414e7 +#: ../../../changes.txt:1577 213d450a85124151959740a27e28b373 msgid "" "**Changed** :ref:`TextWriter` output to also accept text in right to left" " mode (Arabian, Hebrew): :meth:`TextWriter.fill_textbox`, " ":meth:`TextWriter.append`. These methods now accept a new boolean " -"parameter `right_to_left`, which is *False* by default. Implements `#897 " -"`_." +"parameter `right_to_left`, which is ``False`` by default. Implements " +"`#897 `_." msgstr "" -#: ../../../changes.txt:1395 1efe47c059c84ca796f7b5fc9c78922d +#: ../../../changes.txt:1578 ca7482f646c245a886e3f61aec2b433b msgid "" "**Changed** :meth:`TextWriter.fill_textbox` to return all lines of text, " "that did not fit in the given rectangle. Also changed the default of the " @@ -3965,7 +4490,7 @@ msgid "" "situations." msgstr "" -#: ../../../changes.txt:1396 52a21f2d29aa4793a0b6b52ef08c0cda +#: ../../../changes.txt:1579 71693cfa7586407d9eebceaa014cbc2d msgid "" "**Added** a utility function :meth:`recover_quad`, which computes the " "quadrilateral of a span. This function can be used for correctly marking " @@ -3973,55 +4498,55 @@ msgid "" ":meth:`Page.get_text`." msgstr "" -#: ../../../changes.txt:1400 2530e431dea74a5aae45b50a4914bb18 +#: ../../../changes.txt:1583 661b66c74542413aac35590b79ca38c9 msgid "**Changes in Version 1.18.8**" msgstr "" -#: ../../../changes.txt:1403 7a7ce9f5d3d948ab9a505a7cb911d705 +#: ../../../changes.txt:1586 2d0cbe8f762144909b59ca9a37f49f0e msgid "" "This is a bug fix version only. We are publishing early because of the " "potentially widely used functions." msgstr "" -#: ../../../changes.txt:1405 00420fdb06b74948a5413fc873dcd076 +#: ../../../changes.txt:1588 9bc66d4893594a18838a6bfb422a0453 msgid "" "**Fixed** issue `#881 `_. " "Fixed a memory leak in :meth:`Page.insert_image` when inserting images " "from files or memory." msgstr "" -#: ../../../changes.txt:1406 3b7ebd5758404ba4b625cd3af4af75e8 +#: ../../../changes.txt:1589 21c6b67d2342429aa43a89a1f386500a msgid "" "**Fixed** issue `#878 `_. " "``pathlib.Path`` objects should now correctly handle file path " "hierarchies." msgstr "" -#: ../../../changes.txt:1411 3d88c1ad8ff2438ca9561daac6e5c4c9 +#: ../../../changes.txt:1594 d62456f1fb3a4193aa61e1471de9d7d9 msgid "**Changes in Version 1.18.7**" msgstr "" -#: ../../../changes.txt:1414 959739325422406eae2187d214ed8242 +#: ../../../changes.txt:1597 b2f8f15da7ad4d4cb2f5c6775b47efcc msgid "" "**Added** an experimental :meth:`Document.subset_fonts` which reduces the" " size of eligible fonts based on their use by text in the PDF. Implements" " `#855 `_." msgstr "" -#: ../../../changes.txt:1415 707343b35dd74c69a61396effbf18a67 +#: ../../../changes.txt:1598 fb2d1980c9c64330b986cc526c756b3e msgid "" "**Implemented** request `#870 " "`_: " ":meth:`Document.convert_to_pdf` now also supports PDF documents." msgstr "" -#: ../../../changes.txt:1416 8c9449b4aa74462a88fb2cde5d3a48b3 +#: ../../../changes.txt:1599 c458d295a540457081cba8fe541b07d1 msgid "" "**Renamed** ``Document.write`` to :meth:`Document.tobytes` for greater " "clarity. But the deprecated name remains available for some time." msgstr "" -#: ../../../changes.txt:1417 a48c9c68795d4de78e22597c03021096 +#: ../../../changes.txt:1600 10e1725b4c934c378e0e845de2001938 msgid "" "**Implemented** request `#843 " "`_: " @@ -4031,41 +4556,41 @@ msgid "" "objects." msgstr "" -#: ../../../changes.txt:1418 7cbe86378cce42ef977c21d82bff6365 +#: ../../../changes.txt:1601 540893b1e4a6451182dda94e29ec91b7 msgid "**Fixed** issue `#844 `_." msgstr "" -#: ../../../changes.txt:1419 384843f1167e4000ab154e29cfd8d239 +#: ../../../changes.txt:1602 e6fe126b81c84c7d82fc23847cb030ad msgid "**Fixed** issue `#838 `_." msgstr "" -#: ../../../changes.txt:1420 03f42cee04c3447b968b97c53bc4ef27 +#: ../../../changes.txt:1603 ea6e976c20b34d6e82167c3b41020785 msgid "" "**Fixed** issue `#823 `_. " "More logic for better support of OCRed text output (Tesseract, ABBYY)." msgstr "" -#: ../../../changes.txt:1421 c9ab5bac66064a3683727eaca69b0d2d +#: ../../../changes.txt:1604 167e0fbd590b42fcadacf22770ab687e msgid "**Fixed** issue `#818 `_." msgstr "" -#: ../../../changes.txt:1422 1803c735eb2946829b3d24821ef29a05 +#: ../../../changes.txt:1605 9cddf1693df74c26b38a4f394617a9ef msgid "**Fixed** issue `#814 `_." msgstr "" -#: ../../../changes.txt:1423 0e91900ed48d4930b1a7601473647fdb +#: ../../../changes.txt:1606 1b6de14349784d92a4f891b1b418bac4 msgid "" "**Added** :meth:`Document.get_page_labels` which returns a list of page " "label definitions of a PDF." msgstr "" -#: ../../../changes.txt:1424 5fb4cf33cd7e45bb86a30d5616bee1fc +#: ../../../changes.txt:1607 84dd27744e884bab88cfeaa307ab4e6b msgid "" "**Added** :meth:`Document.has_annots` and :meth:`Document.has_links` to " "check whether these object types are present anywhere in a PDF." msgstr "" -#: ../../../changes.txt:1425 dd32ff5c88d146f682eb6c4006d83de5 +#: ../../../changes.txt:1608 ec36dbebe4c6426e99d446934e13d6b2 msgid "" "**Added** expert low-level functions to simplify inquiry and modification" " of PDF object sources: :meth:`Document.xref_get_keys` lists the keys of " @@ -4074,91 +4599,91 @@ msgid "" "value." msgstr "" -#: ../../../changes.txt:1426 2c3d5d0c45b7458c9f581436d16a27c8 +#: ../../../changes.txt:1609 51fd4d0216864e24b2dbd6b6e6249c77 msgid "" "**Added** parameter ``thumbnails`` to :meth:`Document.scrub` to also " "allow removing page thumbnail images." msgstr "" -#: ../../../changes.txt:1427 dfac8dd400f24cd5b475a7f200cbde28 +#: ../../../changes.txt:1610 896815586b2f4f29b687ef9f295a28d6 msgid "" "**Improved** documentation for how to add valid text marker annotations " "for non-horizontal text." msgstr "" -#: ../../../changes.txt:1429 b2dc4d2330ce4eee90198a6d5c6b24cc +#: ../../../changes.txt:1612 fa08553ca010466e89e85b03a58ae882 msgid "" "We continued the process of renaming methods and properties from " "*\"mixedCase\"* to *\"snake_case\"*. Documentation usually mentions the " "new names only, but old, deprecated names remain available for some time." msgstr "" -#: ../../../changes.txt:1435 1edb4c5ee8434e2a988177fe254d42c5 +#: ../../../changes.txt:1618 014081f152ea490994db6a97be4a5bb3 msgid "**Changes in Version 1.18.6**" msgstr "" -#: ../../../changes.txt:1437 1661be66f3f145d0bc7189a2de7364d6 +#: ../../../changes.txt:1620 1e5b5624067e4c48bafb8f9741730594 msgid "**Fixed** issue `#812 `_." msgstr "" -#: ../../../changes.txt:1438 d907a5eb9245499bb5541a6acf3753f8 +#: ../../../changes.txt:1621 3935acf37fb94d999894f69913635919 msgid "" "**Fixed** issue `#793 `_. " "Invalid document metadata previously prevented opening some documents at " "all. This error has been removed." msgstr "" -#: ../../../changes.txt:1439 14f6934b94714181883d28f622c2184b +#: ../../../changes.txt:1622 c14dd85c69234ec6af8586c3de5ea1b4 msgid "" "**Fixed** issue `#792 `_. " "Text search and text extraction will make no rectangle containment checks" " at all if the default ``clip=None`` is used." msgstr "" -#: ../../../changes.txt:1440 971e31d9a82b4ed5a9ad9ad2fb6e52a2 +#: ../../../changes.txt:1623 105f7f16d5e8432aba3b8e341b5ab533 msgid "**Fixed** issue `#785 `_." msgstr "" -#: ../../../changes.txt:1441 8c19da2adde64d8fb23bc3be3074b056 +#: ../../../changes.txt:1624 b1ca38ca3cad4eb0a99eaab0b79aa3f3 msgid "" "**Fixed** issue `#780 `_. " "Corrected a parameter check error." msgstr "" -#: ../../../changes.txt:1442 dbd9e0367a29449baa05c4d1b57ca1d0 +#: ../../../changes.txt:1625 c42692b91d9742218ca7a8cf99b936f0 msgid "" "**Fixed** issue `#779 `_. " "Fixed typo" msgstr "" -#: ../../../changes.txt:1443 49d220a8896547d7af7d15cf289b8dd7 +#: ../../../changes.txt:1626 5104c62d4a7e43b48a5e55ce45980f70 msgid "" "**Added** an option to set the desired line height for text boxes. " "Implements `#804 `_." msgstr "" -#: ../../../changes.txt:1444 db7af717bf8a4e28927b04d5c4e6818e +#: ../../../changes.txt:1627 2601095d28064734bb0369a235e90508 msgid "" "**Changed** text position retrieval to better cope with Tesseract's " "glyphless font. Implements `#803 " "`_." msgstr "" -#: ../../../changes.txt:1445 51a029d14680432b92c379cfa6f4e54e +#: ../../../changes.txt:1628 3589cb24a8264a83859f502be8212423 msgid "" "**Added** an option to choose the prefix of new annotations, fields and " "links for providing unique annotation ids. Implements request `#807 " "`_." msgstr "" -#: ../../../changes.txt:1446 7daba0127e9045aa816cacd9ca942d2f +#: ../../../changes.txt:1629 840ad19cb59a497e9bd9755fb4a0734b msgid "" "**Added** getting and setting color and text properties for Table of " "Contents items for PDFs. Implements `#779 " "`_." msgstr "" -#: ../../../changes.txt:1447 52360c717ae2493db64c4a413232531c +#: ../../../changes.txt:1630 0c739e4d3aba45b993b681b79ad3bca9 msgid "" "**Added** PDF page label handling: :meth:`Page.get_label()` returns the " "page label, :meth:`Document.get_page_numbers` return all page numbers " @@ -4166,7 +4691,7 @@ msgid "" "updates a PDF's page label definition." msgstr "" -#: ../../../changes.txt:1452 b82d50bb25df405382a4b90118e89e97 +#: ../../../changes.txt:1635 4e82d874d63246a0b485fb4fecb1cd08 msgid "" "This version introduces **Python type hinting**. The goal is to provide " "each parameter and the return value of all functions and methods with " @@ -4174,11 +4699,11 @@ msgid "" " functions has already been handled." msgstr "" -#: ../../../changes.txt:1457 92c9129646ad4cb8881712fa910e6c50 +#: ../../../changes.txt:1640 1be8b2db48b8416ea5fea50ed24a1e3d msgid "**Changes in Version 1.18.5**" msgstr "" -#: ../../../changes.txt:1459 686a25e40a344682a85a83aa10be894a +#: ../../../changes.txt:1642 6cf12425d10a48a6aecc144d81757c81 msgid "" "Apart from several fixes, this version also focusses on several minor, " "but important feature improvements. Among the latter is a more precise " @@ -4187,29 +4712,29 @@ msgid "" " are now taken from the font's properties." msgstr "" -#: ../../../changes.txt:1461 6633f019b0254033810c5540e62b7886 +#: ../../../changes.txt:1644 d03b677132f34061b38352314d9d8bac msgid "" "Also note that this is the first version which does no longer provide " "pregenerated wheels for Python versions older than 3.6. PIP also " "discontinues support for these by end of this year 2020." msgstr "" -#: ../../../changes.txt:1463 48105f2a5f264f0badb0d83694c96246 +#: ../../../changes.txt:1646 9c69b4298774494fa7be029e83ab311e msgid "" "**Fixed** issue `#771 `_. " "By using \"small glyph heights\" option, the full page text can be " "extracted." msgstr "" -#: ../../../changes.txt:1464 79ebe3c33b7a4a45ac324da98989ea4a +#: ../../../changes.txt:1647 b72c5e7d653942c395d80159dd81551c msgid "**Fixed** issue `#768 `_." msgstr "" -#: ../../../changes.txt:1465 bdbbde6923fc462e8b2b35962fc20789 +#: ../../../changes.txt:1648 85a78429d2614ee59bf6c3ac6482781e msgid "**Fixed** issue `#750 `_." msgstr "" -#: ../../../changes.txt:1466 bbc5978d8990475c813a892c8ec92362 +#: ../../../changes.txt:1649 3e0227cb7eaa468d9440c831d0c95d66 msgid "" "**Fixed** issue `#739 `_. " "The \"dict\", \"rawdict\" and corresponding JSON output variants now have" @@ -4224,7 +4749,7 @@ msgid "" "encountered in some fonts." msgstr "" -#: ../../../changes.txt:1467 c6830962bfd344fd871dc0f6d684d02d +#: ../../../changes.txt:1650 9c6d6c1f41164b168d157c6befcebe37 msgid "" "**Added** a new, experimental :meth:`Tools.set_small_glyph_heights` -- " "also in response to issue `#739 " @@ -4234,11 +4759,11 @@ msgid "" "returned rectangles, bboxes and quads with a smaller height." msgstr "" -#: ../../../changes.txt:1468 51c316decf064063ad5d343d3481f410 +#: ../../../changes.txt:1651 edea78523a1a416e894d68d2020d06e1 msgid "**Fixed** issue `#728 `_." msgstr "" -#: ../../../changes.txt:1469 cacabeda63214778bb4047f8ce5f5c04 +#: ../../../changes.txt:1652 6d63172dde3f4dd9a7be2e154ab868f7 msgid "" "**Changed** fill color logic of 'Polyline' annotations: this parameter " "now only pertains to line end symbols -- the annotation itself can no " @@ -4246,13 +4771,13 @@ msgid "" "`_." msgstr "" -#: ../../../changes.txt:1470 3d9c12bb513a44d39862158be8756eba +#: ../../../changes.txt:1653 bff7c018a8ea4a9ba93dd60a7ab9806e msgid "" "**Changed** :meth:`Page.getImageBbox` to also compute the bbox if the " "image is contained in an XObject." msgstr "" -#: ../../../changes.txt:1471 947ad8c0d363498dabb157af7a227e66 +#: ../../../changes.txt:1654 0b0af59d5d1043c48f87ac1a1b3b3bef msgid "" "**Changed** :meth:`Shape.insertTextbox`, resp. " ":meth:`Page.insertTextbox`, resp. :meth:`TextWriter.fillTextbox` to " @@ -4262,11 +4787,11 @@ msgid "" "specifics and used constant values instead." msgstr "" -#: ../../../changes.txt:1476 7ffabe7ffbfc42ecad32d5bbc04c8363 +#: ../../../changes.txt:1659 016cd54d9d24470db2db9b6aa1e9f531 msgid "**Changes in Version 1.18.4**" msgstr "" -#: ../../../changes.txt:1478 e3ebc2198adb4358a35193793039850b +#: ../../../changes.txt:1661 952b800709df4d808c2d6d95e7269956 msgid "" "This version adds several features to support PDF Optional Content. Among" " other things, this includes OCMDs (Optional Content Membership " @@ -4275,27 +4800,27 @@ msgid "" " drawings." msgstr "" -#: ../../../changes.txt:1480 1f27b0371ec34758b04c48e685c40058 +#: ../../../changes.txt:1663 44e02c90fe7341ce93f7b4d9eb205d59 msgid "" "**Fixed** issue `#727 `_. " "Freetext annotations now support an uncolored rectangle when " "``fill_color=None``." msgstr "" -#: ../../../changes.txt:1481 453f8fe1ba734638afd96807fcbc4c1f +#: ../../../changes.txt:1664 5ec24a657e804b77a217164637f5339b msgid "" "**Fixed** issue `#726 `_. " "UTF-8 encoding errors are now handled for HTML / XML :meth:`Page.getText`" " output." msgstr "" -#: ../../../changes.txt:1482 3cb2e709b4c94117bf7df3b677e99a35 +#: ../../../changes.txt:1665 8f57327a087c44de9cb5eeaac4814865 msgid "" "**Fixed** issue `#724 `_. " "Empty values are no longer stored in the PDF /Info metadata dictionary." msgstr "" -#: ../../../changes.txt:1483 0f8dacb60d9c4f7a9e9abe544a11d106 +#: ../../../changes.txt:1666 e9a88fac47b84e8398d092b81a8dc9bc msgid "" "**Added** new methods :meth:`Document.set_oc` and :meth:`Document.get_oc`" " to set or get optional content references for **existing** image and " @@ -4303,23 +4828,23 @@ msgid "" ":ref:`Annot`." msgstr "" -#: ../../../changes.txt:1484 c7aed512e6084a8aae8dc78cb226210d +#: ../../../changes.txt:1667 cf1cf7090a7a43c480269083a0c4b49c msgid "" "**Added** :meth:`Document.set_ocmd`, :meth:`Document.get_ocmd` for " "handling OCMDs." msgstr "" -#: ../../../changes.txt:1485 7001c55559644f3a81e467e83cdcc72e +#: ../../../changes.txt:1668 42c7e4582265428298876d83dc6ca43f msgid "**Added** **Optional Content** support for text insertion and drawing." msgstr "" -#: ../../../changes.txt:1486 b43fe073751046dd911fd9f402a7042f +#: ../../../changes.txt:1669 a9a1238c1ccb479cbdf733dd6051cee5 msgid "" "**Added** new method :meth:`Page.deleteWidget`, which deletes a form " "field from a page. This is analogous to deleting annotations." msgstr "" -#: ../../../changes.txt:1487 c1544afd18354dd9ac9f9572d38e271f +#: ../../../changes.txt:1670 4c07d363e6784cc49d63c6829e1d1f0d msgid "" "**Added** support for Popup annotations. This includes defining the Popup" " rectangle and setting the Popup to open or closed. Methods / attributes " @@ -4328,7 +4853,7 @@ msgid "" ":attr:`Annot.popup_xref`." msgstr "" -#: ../../../changes.txt:1491 c113336b7006418b9d4ac9ce36b871f1 +#: ../../../changes.txt:1674 e25d212c553240e9817f098fc4195950 msgid "" "The **naming of methods and attributes** in PyMuPDF is far from being " "satisfactory: we have *CamelCases*, *mixedCases* and " @@ -4338,44 +4863,44 @@ msgid "" "attributes while keeping UPPERCASE for the constants." msgstr "" -#: ../../../changes.txt:1493 d5210080076b4342a9417f1c9e84f664 +#: ../../../changes.txt:1676 96c07d5004c24b07b6c0fe9034806420 msgid "" "Old names will remain available to prevent code breaks, but they will no " "longer be mentioned in the documentation." msgstr "" -#: ../../../changes.txt:1494 f1421262754b422b89d04f92fcc4ce21 +#: ../../../changes.txt:1677 09372861df9d4a368a564d880fc93960 msgid "" "New methods and attributes of all classes will be named according to the " "new standard." msgstr "" -#: ../../../changes.txt:1498 626edc222d004ce7b478330988a1cab7 +#: ../../../changes.txt:1681 fcc79a27ddb0485d9f08d5e25bbd1c7a msgid "**Changes in Version 1.18.3**" msgstr "" -#: ../../../changes.txt:1500 cea9e3740b8646c289674861d556fb8a +#: ../../../changes.txt:1683 1a4bc2a8b28745e0ae1d5530a85453d5 msgid "" "As a major new feature, this version introduces support for PDF's " "**Optional Content** concept." msgstr "" -#: ../../../changes.txt:1502 fcba832e77764639a936db819d44afed +#: ../../../changes.txt:1685 1e0bcdfa4e21494ebf2479c1666fd238 msgid "**Fixed** issue `#714 `_." msgstr "" -#: ../../../changes.txt:1503 d44ed28558024dfd8589331bba23549e +#: ../../../changes.txt:1686 38a11c6f427542248a6517f5ee5ec5be msgid "**Fixed** issue `#711 `_." msgstr "" -#: ../../../changes.txt:1504 a2191c13846f43c794f88043b8be569f +#: ../../../changes.txt:1687 9980668a791e4a1682badb54b7d38d19 msgid "" "**Fixed** issue `#707 `_: " "if a PDF user password, but no owner password is supplied nor present, " "then the user password is also used as the owner password." msgstr "" -#: ../../../changes.txt:1505 2aef21031860492db0aef25063c2f4d6 +#: ../../../changes.txt:1688 0ea2b5d936aa45a8a835c8457d83d01e msgid "" "**Fixed** ``expand`` and ``deflate`` parameters of methods " ":meth:`Document.save` and :meth:`Document.write`. Individual image and " @@ -4383,7 +4908,7 @@ msgid "" "`_." msgstr "" -#: ../../../changes.txt:1506 28959bba8b8e4c3e8d7ffa725bd81a13 +#: ../../../changes.txt:1689 85d020f9bd664565a24c39da19dace4b msgid "" "**Added** a support of PDF optional content. This includes several new " ":ref:`Document` methods for inquiring and setting optional content status" @@ -4393,11 +4918,11 @@ msgid "" "`_." msgstr "" -#: ../../../changes.txt:1512 5329ac05874e4dc39aeaeb33205da27e +#: ../../../changes.txt:1695 1151785913404c1ba50777871c13b468 msgid "**Changes in Version 1.18.2**" msgstr "" -#: ../../../changes.txt:1514 c83e5e2e8e6c45059fd393c656323606 +#: ../../../changes.txt:1697 e66e0b3cbabe4b908e4777b6a2837f72 msgid "" "This version contains some interesting improvements for text searching: " "any number of search hits is now returned and the **hit_max** parameter " @@ -4406,7 +4931,7 @@ msgid "" "accordingly finds hyphenated words." msgstr "" -#: ../../../changes.txt:1516 70cf15b35002468ead2af368ccd59092 +#: ../../../changes.txt:1699 04aa0a6d98954691bf346583ea9b911b msgid "" "**Fixed** issue `#575 `_: " "if using ``quads=False`` in text searching, then overlapping rectangles " @@ -4415,62 +4940,62 @@ msgid "" "their own rectangle -- just as if occurring on separate lines." msgstr "" -#: ../../../changes.txt:1517 99dd819ee63941368ab3d42c135e4c2b +#: ../../../changes.txt:1700 5d7e1a3b11a94ddbba4fb265a57c322d msgid "" "**Added** :attr:`Document.isRepaired`, which is true if the PDF was " "repaired on open." msgstr "" -#: ../../../changes.txt:1518 f1fc6e749af44309a846e0d8f10a1b05 +#: ../../../changes.txt:1701 315a4d9dad15480c98ea149782969c19 msgid "" "**Added** :meth:`Document.setXmlMetadata` which either updates or creates" " PDF XML metadata. Implements issue `#691 " "`_." msgstr "" -#: ../../../changes.txt:1519 0b8db7381e0b49d8947caba7ee444f34 +#: ../../../changes.txt:1702 664e274feffc4b609d814ba94002fe32 msgid "**Added** :meth:`Document.getXmlMetadata` returns PDF XML metadata." msgstr "" -#: ../../../changes.txt:1520 09080f5a6dff4b1bbde244275b270a03 +#: ../../../changes.txt:1703 8c00f78e949b4270b42bbc2efcb32896 msgid "" "**Changed** creation of PDF documents: they will now always carry a PDF " "identification (``/ID`` field) in the document trailer. Implements issue " "`#691 `_." msgstr "" -#: ../../../changes.txt:1521 be6cdf5a33bf4abe92fa038001567335 +#: ../../../changes.txt:1704 275f081e7a634acb98452028e30637d6 msgid "" "**Changed** :meth:`Page.searchFor`: a new parameter ``clip`` is accepted " "to restrict the search to this rectangle. Correspondingly, the attribute " ":attr:`TextPage.rect` is now respected by :meth:`TextPage.search`." msgstr "" -#: ../../../changes.txt:1522 ee44784044014f0dab6d6148630e0040 +#: ../../../changes.txt:1705 4857267aa9ab4e629ddb8210b7c02e47 msgid "" "**Changed** parameter ``hit_max`` in :meth:`Page.searchFor` and " ":meth:`TextPage.search` is now obsolete: methods will return all hits." msgstr "" -#: ../../../changes.txt:1523 8e46f925cd1a48d29de952abf5548a1b +#: ../../../changes.txt:1706 8a0e2a5a95654e638fb0ad111274d37d msgid "" "**Changed** character **selection criteria** in :meth:`Page.getText`: a " "character is now considered to be part of a ``clip`` if its bbox is fully" " contained. Before this, a non-empty intersection was sufficient." msgstr "" -#: ../../../changes.txt:1524 1f4af1e985154ba3879cdd28d99b2e11 +#: ../../../changes.txt:1707 fac2f814dc6048feb69c2a41d979d176 msgid "" "**Changed** :meth:`Document.scrub` to support a new option " "`redact_images`. This addresses issue `#697 " "`_." msgstr "" -#: ../../../changes.txt:1529 f595a2faa2244f858a03805cb55b082f +#: ../../../changes.txt:1712 82c818c7c8024a51b8e88d348034b442 msgid "**Changes in Version 1.18.1**" msgstr "" -#: ../../../changes.txt:1531 a201e1914cc646a7a12689a6a231b332 +#: ../../../changes.txt:1714 e6d690752b9d4a59b7903c97be13b415 msgid "" "**Fixed** issue `#692 `_. " "PyMuPDF now detects and recovers from more cyclic resource dependencies " @@ -4478,11 +5003,11 @@ msgid "" "store." msgstr "" -#: ../../../changes.txt:1532 0645b820e6aa4d218721e2869a6ca927 +#: ../../../changes.txt:1715 bf94f3eed60f4c918293ba068082a554 msgid "**Fixed** issue `#686 `_." msgstr "" -#: ../../../changes.txt:1533 b48de51e80394f018f60ae861b90fec2 +#: ../../../changes.txt:1716 28489ac7467745b28158efdec835973a msgid "" "**Added** opacity options for the :ref:`Shape` class: Stroke and fill " "colors can now be set to some transparency value. This means that all " @@ -4492,88 +5017,88 @@ msgid "" " parameters: *stroke_opacity* and *fill_opacity*." msgstr "" -#: ../../../changes.txt:1534 c23f2096eab84b9bbaa8ee3a9e15094c +#: ../../../changes.txt:1717 5914ea8451fd488ab1c67e75b15b8c96 msgid "" "**Added** new parameter ``mask`` to :meth:`Page.insertImage` for " "optionally providing an external image mask. Resolves issue `#685 " "`_." msgstr "" -#: ../../../changes.txt:1535 6d7067b8086d43cb8b95e0f55e6c8f9f +#: ../../../changes.txt:1718 7486ce883d8741cfa9b3727848fd9911 msgid "" "**Added** :meth:`Annot.soundGet` for extracting the sound of an audio " "annotation." msgstr "" -#: ../../../changes.txt:1539 19ef6b72c32b4551acdbe1e1b14c0ae1 +#: ../../../changes.txt:1722 be51a07e23f047b89a1192a13cc1b37e msgid "**Changes in Version 1.18.0**" msgstr "" -#: ../../../changes.txt:1541 8fc7a04c019f4ab7aebc97269361bcbb +#: ../../../changes.txt:1724 ca6e909d126841fa957a5b0e4f1c66a7 msgid "" "This is the first PyMuPDF version supporting MuPDF v1.18. The focus here " "is on extending PyMuPDF's own functionality -- apart from bug fixing. " "Subsequent PyMuPDF patches may address features new in MuPDF." msgstr "" -#: ../../../changes.txt:1543 25c1360dab0c49099eb7cdead724e211 +#: ../../../changes.txt:1726 f43bfd57701946f2b107c133bcd8bd88 msgid "" "**Fixed** issue `#519 `_. " "This upstream bug occurred occasionally for some pages only and seems to " "be fixed now: page layout should no longer be ruined in these cases." msgstr "" -#: ../../../changes.txt:1545 422afa1dc6a347918131cb89d7419354 +#: ../../../changes.txt:1728 51a6ec75218f496e8437b853311cb4b0 msgid "**Fixed** issue `#675 `_." msgstr "" -#: ../../../changes.txt:1547 f1112177eb0d413cab605f8fd84cefa0 +#: ../../../changes.txt:1730 08e2eed983684354963f255ea517142f msgid "" "Unsuccessful storage allocations should now always lead to exceptions " "(circumvention of an upstream bug intermittently crashing the " "interpreter)." msgstr "" -#: ../../../changes.txt:1548 10ea6e2fda8b4ea1a94bbbcc410254a5 +#: ../../../changes.txt:1731 df1a808605e74e8cb20f1019033064f5 msgid "" ":ref:`Pixmap` size is now based on ``size_t`` instead of ``int`` in C and" " should be correct even for extremely large pixmaps." msgstr "" -#: ../../../changes.txt:1550 16f27169768848139d0ea16db2e814c8 +#: ../../../changes.txt:1733 7dc80f3c8ab6454a946ca7de5037b618 msgid "" "**Fixed** issue `#668 `_. " "Specification of dashes for PDF drawing insertion should now correctly " "reflect the PDF spec." msgstr "" -#: ../../../changes.txt:1551 0f31b3eabf9a4731af32eb845f2f24b4 +#: ../../../changes.txt:1734 859ac4fd8573486696af807d849195ea msgid "" "**Fixed** issue `#669 `_. " "A major source of memory leakage in :meth:`Page.insert_pdf` has been " "removed." msgstr "" -#: ../../../changes.txt:1552 e8c2120c3ec24cacbdcc76c1dbea7f42 +#: ../../../changes.txt:1735 f5e9f0bbc04844988d42074b2ac82383 msgid "" "**Added** keyword *\"images\"* to :meth:`Page.apply_redactions` for fine-" "controlling the handling of images." msgstr "" -#: ../../../changes.txt:1553 2469b50c853849faab989b76dddfd852 +#: ../../../changes.txt:1736 66320728177e4eafbd8eb21f481921df msgid "" "**Added** :meth:`Annot.getText` and :meth:`Annot.getTextbox`, which offer" " the same functionality as the :ref:`Page` versions." msgstr "" -#: ../../../changes.txt:1554 f5e6536a27d3460e9ae31283104f579f +#: ../../../changes.txt:1737 d554a335a98240e4836322e6f168e6f3 msgid "" "**Added** key *\"number\"* to the block dictionaries of " ":meth:`Page.getText` / :meth:`Annot.getText` for options \"dict\" and " "\"rawdict\"." msgstr "" -#: ../../../changes.txt:1555 35fe3dcf66974615882769bad1c8c4da +#: ../../../changes.txt:1738 3bb9fd8512c9457cb9dc3f9ddee1efcf msgid "" "**Added** :meth:`glyph_name_to_unicode` and " ":meth:`unicode_to_glyph_name`. Both functions do not really connect to a " @@ -4582,19 +5107,19 @@ msgid "" "aglfn/blob/master/glyphlist.txt>`_." msgstr "" -#: ../../../changes.txt:1556 b54cffdfc8884237b29dd8add6e1c2df +#: ../../../changes.txt:1739 c1d9f18ac2804a76b70e0fdd07591795 msgid "" "**Added** convenience functions :meth:`adobe_glyph_names` and " ":meth:`adobe_glyph_unicodes` which return the respective available data." msgstr "" -#: ../../../changes.txt:1557 9f5493116f3b41df87f02dc5f5b471f3 +#: ../../../changes.txt:1740 e9161904b5794f6585c7711040efd5f8 msgid "" "**Added** :meth:`Page.getDrawings` which returns details of drawing " "operations on a document page. Works for all document types." msgstr "" -#: ../../../changes.txt:1558 0a1eeaf6c88f4ede88a32fc4f6fe32f1 +#: ../../../changes.txt:1741 ca31aa036d664d679b8c449c655681aa msgid "" "Improved performance of :meth:`Document.insert_pdf`. Multiple object " "copies are now also suppressed across multiple separate insertions from " @@ -4604,18 +5129,18 @@ msgid "" "*final=1*, which is the default." msgstr "" -#: ../../../changes.txt:1559 3284d04b82af44dca48fa535c8024f4a +#: ../../../changes.txt:1742 ee8ce55f44ff4207afcba82cda95520c msgid "" "For PNG images created from pixmaps, the resolution (dpi) is now " "automatically set from the respective :attr:`Pixmap.xres` and " ":attr:`Pixmap.yres` values." msgstr "" -#: ../../../changes.txt:1564 0ee88d2ae4874295b1da243cf8d60c2c +#: ../../../changes.txt:1747 ba946a3911f94154a0ff39d42896b15c msgid "**Changes in Version 1.17.7**" msgstr "" -#: ../../../changes.txt:1566 a1a6ca5d555245b9abd0619496490244 +#: ../../../changes.txt:1749 a41bb96a21bc45978ba315fc05cd772d msgid "" "**Fixed** issue `#651 `_. " "An upstream bug causing interpreter crashes in corner case redaction " @@ -4623,20 +5148,20 @@ msgid "" " repo." msgstr "" -#: ../../../changes.txt:1567 75dcdbfd1f504185ba81262409a002b5 +#: ../../../changes.txt:1750 f8d00207d87a47a2b7be0a7ae7824291 msgid "" "**Fixed** issue `#645 `_. " "Pixmap top-left coordinates can be set (again) by their own method, " ":meth:`Pixmap.set_origin`." msgstr "" -#: ../../../changes.txt:1568 700aac3711d7416695983b0311d820bf +#: ../../../changes.txt:1751 a858dc52d5d648d4af0b2bb212397e60 msgid "" "**Fixed** issue `#622 `_. " ":meth:`Page.insertImage` again accepts a :data:`rect_like` parameter." msgstr "" -#: ../../../changes.txt:1569 3967ddd3dbea4d93b1cb6cb19baed857 +#: ../../../changes.txt:1752 ed11bd0035ed4478905c0d60c8ba2a8f msgid "" "**Added** severeal new methods to improve and speed-up table of contents " "(TOC) handling. Among other things, TOC items can now changed or deleted " @@ -4646,258 +5171,258 @@ msgid "" "performance of TOC manipulation." msgstr "" -#: ../../../changes.txt:1570 da7681c40d1f4422a1a26531e1e517ca +#: ../../../changes.txt:1753 25093ac3f49748ed823bbf337c97d5a5 msgid "" "**Added** an option to :meth:`Document.insert_pdf` which allows " "displaying progress messages. Adresses `#640 " "`_." msgstr "" -#: ../../../changes.txt:1571 e8cdc0925a2a4d1b82ed4511fffdab06 +#: ../../../changes.txt:1754 42c40396212a4b5f92fce691a8a4bcef msgid "" "**Added** :meth:`Page.getTextbox` which extracts text contained in a " "rectangle. In many cases, this should obsolete writing your own script " "for this type of thing." msgstr "" -#: ../../../changes.txt:1572 b45cc78fbd9e4773a771cac79de54121 +#: ../../../changes.txt:1755 f58cac906e164403aa5e0fcce67c8e21 msgid "" "**Added** new ``clip`` parameter to :meth:`Page.getText` to simplify and " "speed up text extraction of page sub areas." msgstr "" -#: ../../../changes.txt:1573 5f6aad17d88345b48ff4d8431620ae56 +#: ../../../changes.txt:1756 a5ea759836cf4cd3851d99d987d72630 msgid "" "**Added** :meth:`TextWriter.appendv` to add text in **vertical write " "mode**. Addresses issue `#653 " "`_" msgstr "" -#: ../../../changes.txt:1578 bf8a901e8c094edaa077fcc175eca7ec +#: ../../../changes.txt:1761 8543b67efb064fbf948a80e1dbef272d msgid "**Changes in Version 1.17.6**" msgstr "" -#: ../../../changes.txt:1580 1b9d001a450b4b988a6e71f78b7ff963 +#: ../../../changes.txt:1763 fd6d1684e04348b5aae2cd5b472cdab9 msgid "**Fixed** issue `#605 `_" msgstr "" -#: ../../../changes.txt:1581 05ab832027bc4f069355b412e1b543a3 +#: ../../../changes.txt:1764 7b4378d373954f788448dd5a30112ac6 msgid "" "**Fixed** issue `#600 `_ " "-- text should now be correctly positioned also for pages with a CropBox " "smaller than MediaBox." msgstr "" -#: ../../../changes.txt:1582 cc7d90f4378e4c86890a3b7c3e5b69c7 +#: ../../../changes.txt:1765 f02f2531ae134e728e35b2ba1348257a msgid "" "**Added** text span dictionary key ``origin`` which contains the lower " "left coordinate of the first character in that span." msgstr "" -#: ../../../changes.txt:1583 f0f500f4f0fc41dc8ca3241073d72515 +#: ../../../changes.txt:1766 bf078edb7bf14cf8ae624a2c2ae5b621 msgid "**Added** attribute :attr:`Font.buffer`, a *bytes* copy of the font file." msgstr "" -#: ../../../changes.txt:1584 51ce7ca726b94cb8b48308bded6f3ab8 +#: ../../../changes.txt:1767 dc92466b657d488f8a12484321ee008e msgid "" "**Added** parameter *sanitize* to :meth:`Page.cleanContents`. Allows " "switching of sanitization, so only syntax cleaning will be done." msgstr "" -#: ../../../changes.txt:1588 fc02f8c5a5744951bb208ac33e0b243b +#: ../../../changes.txt:1771 2ae9a785b9bf4bbeb0558dfe1a4bdb9f msgid "**Changes in Version 1.17.5**" msgstr "" -#: ../../../changes.txt:1590 76efca2462ad464aa9eb0754f116ca10 +#: ../../../changes.txt:1773 049d1da0f7274c66b958db83e3dfafcd msgid "" "**Fixed** issue `#561 `_ " "-- second go: certain :ref:`TextWriter` usages with many alternating " "fonts did not work correctly." msgstr "" -#: ../../../changes.txt:1591 5275508174514c09b598d42ba39536f6 +#: ../../../changes.txt:1774 e73316fa7e084e5791aab2bd991e374e msgid "**Fixed** issue `#566 `_." msgstr "" -#: ../../../changes.txt:1592 7e66d97716514754ba7ea2e8130dbc8d +#: ../../../changes.txt:1775 35847dda64994ecf8aa83c2c1c13e237 msgid "**Fixed** issue `#568 `_." msgstr "" -#: ../../../changes.txt:1593 cf35f9e29c09425fa50de3561ec6686e +#: ../../../changes.txt:1776 9a33ee1625de4f83a82008bc750e99db msgid "" "**Fixed** -- opacity is now correctly taken from the :ref:`TextWriter` " "object, if not given in :meth:`TextWriter.writeText`." msgstr "" -#: ../../../changes.txt:1594 fdc4b4b37a3b4096b3df5c846f1da5eb +#: ../../../changes.txt:1777 441f11e9afad487c9103785fe1e8886b msgid "" "**Added** a new global attribute :attr:`fitz_fontdescriptors`. Contains " "information about usable fonts from repository `pymupdf-fonts " "`_." msgstr "" -#: ../../../changes.txt:1595 0fc27778d09348c7a2fc80300af72cf2 +#: ../../../changes.txt:1778 69596840785c476fac4cd007507c65e1 msgid "" "**Added** :meth:`Font.valid_codepoints` which returns an array of unicode" " codepoints for which the font has a glyph." msgstr "" -#: ../../../changes.txt:1596 0939dbf0a7814997b3974d0fbb1ddc6a +#: ../../../changes.txt:1779 8d09e945e9fc4491ae8c1f6774ad9604 msgid "" "**Added** option ``text_as_path`` to :meth:`Page.getSVGimage`. this " "implements `#580 `_. " -"Generates much smaller SVG files with parseable text if set to *False*." +"Generates much smaller SVG files with parseable text if set to ``False``." msgstr "" -#: ../../../changes.txt:1601 792be4fc23c94eb8944154ea18481a5f +#: ../../../changes.txt:1784 9e7d00a285dd438a9930b3426bd86c37 msgid "**Changes in Version 1.17.4**" msgstr "" -#: ../../../changes.txt:1603 6aab000d255f4ca8b13cd8d2fdad9bf7 +#: ../../../changes.txt:1786 aa309edb110e49268aa32ab0b31f24f8 msgid "" "**Fixed** issue `#561 `_. " "Handling of more than 10 :ref:`Font` objects on one page should now work " "correctly." msgstr "" -#: ../../../changes.txt:1604 b6e18482af4248b0b97823ee6512696f +#: ../../../changes.txt:1787 c70048adb62e4ed089fb3d9296329ef3 msgid "" "**Fixed** issue `#562 `_. " "Annotation pixmaps are no longer derived from the page pixmap, thus " "avoiding unintended inclusion of page content." msgstr "" -#: ../../../changes.txt:1605 14e584213d344a629549253c6bbd371d +#: ../../../changes.txt:1788 c035b1e664d14003b2a7c98a76c12cdb msgid "" "**Fixed** issue `#559 `_. " -"This **MuPDF** bug is being temporarily fixed with a pre-version of " -"MuPDF's next release." +"This |MuPDF| bug is being temporarily fixed with a pre-version of MuPDF's" +" next release." msgstr "" -#: ../../../changes.txt:1606 3eb2198046474d3e881aa8b73ddc5614 +#: ../../../changes.txt:1789 0f4ce78d82aa4ad784b0d94ddd0a20c3 msgid "" "**Added** utility function :meth:`repair_mono_font` for correcting " "displayed character spacing for some mono-spaced fonts." msgstr "" -#: ../../../changes.txt:1607 858b0b2a05d047999fb9a4cd68669296 +#: ../../../changes.txt:1790 7409c09d614e42e49ac2021d3200f46f msgid "" "**Added** utility method :meth:`Document.need_appearances` for fine-" "controlling Form PDF behavior. Addresses issue `#563 " "`_." msgstr "" -#: ../../../changes.txt:1608 798a0787048a4fd2b391fb22200cf07c +#: ../../../changes.txt:1791 ec66d102d47c44328d4ad9453574409c msgid "" "**Added** utility function :meth:`sRGB_to_pdf` to recover the PDF color " "triple for a given color integer in sRGB format." msgstr "" -#: ../../../changes.txt:1609 461da54315d44cacbd1b84aeae9cc3a7 +#: ../../../changes.txt:1792 85a9501591b449f9a28e5839f61d8736 msgid "" "**Added** utility function :meth:`sRGB_to_rgb` to recover the (R, G, B) " "color triple for a given color integer in sRGB format." msgstr "" -#: ../../../changes.txt:1610 ab29694b54d24023b123fe03023ab710 +#: ../../../changes.txt:1793 528e7fa8db3d4134afcd2783f1fa71ef msgid "" "**Added** utility function :meth:`make_table` which delivers table cells " "for a given rectangle and desired numbers of columns and rows." msgstr "" -#: ../../../changes.txt:1611 8b407cadc91342d1b382210d99dff2b4 +#: ../../../changes.txt:1794 ac2a95ed4e70477d93cc3770ab97fa46 msgid "" "**Added** support for optional fonts in repository `pymupdf-fonts " "`_." msgstr "" -#: ../../../changes.txt:1615 ab791a67be644fac81a9981e9d25e7e4 +#: ../../../changes.txt:1798 02bb099ea49246638ca691b6aa100f12 msgid "**Changes in Version 1.17.3**" msgstr "" -#: ../../../changes.txt:1617 4217354c24c24ca0895fedbf7f82aec0 +#: ../../../changes.txt:1800 48cc27fbc35c4cf182487f6578237379 msgid "" "**Fixed** an undocumented issue, which prevented fully cleaning a PDF " "page when using :meth:`Page.cleanContents`." msgstr "" -#: ../../../changes.txt:1618 c69cedf1a715409cabaf0f2687479a95 +#: ../../../changes.txt:1801 3c216e2a5fb34b76a331155626b1fc8a msgid "" "**Fixed** issue `#540 `_. " "Text extraction for EPUB should again work correctly." msgstr "" -#: ../../../changes.txt:1619 fffc43f4766e4354a2ecf26c265e5ab1 +#: ../../../changes.txt:1802 d90075a4b2724dc89c3fbf6b6a1002d0 msgid "" "**Fixed** issue `#548 `_. " "Documentation now includes ``LINK_NAMED``." msgstr "" -#: ../../../changes.txt:1620 7f39620d38bd4961b9415373edea2dfc +#: ../../../changes.txt:1803 4e418ace6afa452a96f9b1df1f94fb78 msgid "" "**Added** new parameter to control start of text in " ":meth:`TextWriter.fillTextbox`. Implements `#549 " "`_." msgstr "" -#: ../../../changes.txt:1621 f2214f2461964b97afb84422c4cb7d38 +#: ../../../changes.txt:1804 e850089b98914a46ba7a2e17db85a0ef msgid "" "**Changed** documentation of :meth:`Page.add_redact_annot` to explain the" " usage of non-builtin fonts." msgstr "" -#: ../../../changes.txt:1625 5144e6b32cb8418cbe10dea59303faff +#: ../../../changes.txt:1808 fa17b746b88147d48dd1cc58bffc4bdc msgid "**Changes in Version 1.17.2**" msgstr "" -#: ../../../changes.txt:1627 fc7485651046432fbde6c6cfbc9ca936 +#: ../../../changes.txt:1810 5e97b9fac703475585e31183172a8923 msgid "**Fixed** issue `#533 `_." msgstr "" -#: ../../../changes.txt:1628 c395119c27824e10852edc909b4a4da2 +#: ../../../changes.txt:1811 cc0199c5b1904c968be859f9274efb9e msgid "" "**Added** options to modify 'Redact' annotation appearance. Implements " "`#535 `_." msgstr "" -#: ../../../changes.txt:1633 69b4c80ce83240d5b236374e646b6c16 +#: ../../../changes.txt:1816 4ca10fdd3ed14d619d39d2cc49115149 msgid "**Changes in Version 1.17.1**" msgstr "" -#: ../../../changes.txt:1635 302a7374c12549958e3c5303039fc12e +#: ../../../changes.txt:1818 d60f94eed73a49a79ad0f768219878de msgid "**Fixed** issue `#520 `_." msgstr "" -#: ../../../changes.txt:1636 82ab02311e0e49bc8b3b9f8bde3400b4 +#: ../../../changes.txt:1819 f6a87834529647a58444b15124ce2017 msgid "" "**Fixed** issue `#525 `_. " "Vertices for 'Ink' annots should now be correct." msgstr "" -#: ../../../changes.txt:1637 9855e8b262854a6b9e26f2d1f570ee52 +#: ../../../changes.txt:1820 139f957349344d179cacb065c1d23d8a msgid "" "**Fixed** issue `#524 `_. " "It is now possible to query and set rotation for applicable annotation " "types." msgstr "" -#: ../../../changes.txt:1639 c5ff5d921afc4c56b02bc799676ee2d4 +#: ../../../changes.txt:1822 47cd3a2f11fd4ba3bd66d2558fbe09ce msgid "" "Also significantly improved inline documentation for better support of " "interactive help." msgstr "" -#: ../../../changes.txt:1643 3b2b93a331b54689bd7fadbf6cf27c14 +#: ../../../changes.txt:1826 3a1a2b6f17564377ba21ce37204ab311 msgid "**Changes in Version 1.17.0**" msgstr "" -#: ../../../changes.txt:1645 ce4d4881b7514d2794fa5d9ff4802f32 +#: ../../../changes.txt:1828 8dfe85750d954a448005365db34cfe34 msgid "" "This version is based on MuPDF v1.17. Following are highlights of new and" " changed features:" msgstr "" -#: ../../../changes.txt:1647 cacfbc0481b94f92ad4bd2575e5e190d +#: ../../../changes.txt:1830 e9f0a490a63845bba721ca403ef8a07b msgid "" "**Added** extended language support for annotations and widgets: a " "mixture of Latin, Greece, Russian, Chinese, Japanese and Korean " @@ -4905,7 +5430,7 @@ msgid "" " special arrangement is required to use it." msgstr "" -#: ../../../changes.txt:1649 482421fa92fb493aa3713a601814f467 +#: ../../../changes.txt:1832 012da2fb91e54769a61b78e6b779cae9 msgid "" "Faster page access is implemented for documents supporting a \"chapter\" " "structure. This applies to EPUB documents currently. This comes with " @@ -4915,7 +5440,7 @@ msgid "" "can be specified to identify the desired page." msgstr "" -#: ../../../changes.txt:1651 7d476766a63647d0ab97ffa09c8ec047 +#: ../../../changes.txt:1834 251cb3bc65c9462f8db80d29fe71b1c7 msgid "" "**Changed:** Improved support of redaction annotations: images overlapped" " by redactions are **permanantly modified** by erasing the overlap areas." @@ -4923,42 +5448,42 @@ msgid "" " sync with PDF specifications." msgstr "" -#: ../../../changes.txt:1655 4c6f1416e71743c29bb58dddf2ea84dd +#: ../../../changes.txt:1838 c2a181bba8964ee7a4206865bd7fbdd4 msgid "" "**Changed** :meth:`TextWriter.writeText` to support the *\"morph\"* " "parameter." msgstr "" -#: ../../../changes.txt:1656 a613918019c84d46bab47d96efc3d64c +#: ../../../changes.txt:1839 7b086fcac17b41ff8669913a8bf6203a msgid "" "**Added** methods :meth:`Rect.morph`, :meth:`IRect.morph`, and " ":meth:`Quad.morph`, which return a new :ref:`Quad`." msgstr "" -#: ../../../changes.txt:1657 7381b6749e14414d8d2bfe9188aac7ef +#: ../../../changes.txt:1840 ce27ddb3979c4d0f98802306945bd005 msgid "" "**Changed** :meth:`Page.add_freetext_annot` to support text alignment via" " a new *\"align\"* parameter." msgstr "" -#: ../../../changes.txt:1658 1c4e0e7122624ddca9fe76bd4e05b82c +#: ../../../changes.txt:1841 9b91ce0c8efc4d218974462abdebd5b6 msgid "" "**Fixed** issue `#508 `_. " "Improved image rectangle calculation to hopefully deliver correct values " "in most if not all cases." msgstr "" -#: ../../../changes.txt:1659 bbc4f648d9dd40e79b0a7e94727ef735 +#: ../../../changes.txt:1842 5e30ead0e5e642a1b5b6c3f0fcb44b67 msgid "**Fixed** issue `#502 `_." msgstr "" -#: ../../../changes.txt:1660 e77e4fd55e7742b8bea54714ad185074 +#: ../../../changes.txt:1843 6e065185286f4284b4507f0de2aecaf8 msgid "" "**Fixed** issue `#500 `_. " ":meth:`Document.convertToPDF` should no longer cause memory leaks." msgstr "" -#: ../../../changes.txt:1661 05fa242572c64b69b975d16163ad6517 +#: ../../../changes.txt:1844 ee1a61df509e4cb1a7abac6012a30011 msgid "" "**Fixed** issue `#496 `_. " "Annotations and widgets / fields are now added or modified using the " @@ -4966,35 +5491,35 @@ msgid "" "other methods modifying PDF pages." msgstr "" -#: ../../../changes.txt:1662 91a881d933e74683b12d9727c589f8f2 +#: ../../../changes.txt:1845 7ac05926bfd94e21bfe11b7b8826b143 msgid "" "**Added** :attr:`Page.rotationMatrix` and :attr:`Page.derotationMatrix` " "to support coordinate transformations between the rotated and the " "original versions of a PDF page." msgstr "" -#: ../../../changes.txt:1664 8b4fcf81cc1e4233ad3a0e643167e315 +#: ../../../changes.txt:1847 b9269ae8b60b40caa94721f4126393ae msgid "Potential code breaking changes:" msgstr "" -#: ../../../changes.txt:1666 6b607d40ca8140159a67e7c3bd4e85c1 +#: ../../../changes.txt:1849 28f81d1b42d748fbb706c75fceb62c00 msgid "" "The private method ``Page._getTransformation()`` has been removed. Use " "the public :attr:`Page.transformationMattrix` instead." msgstr "" -#: ../../../changes.txt:1671 eafa98a2fe7149048ed654649cbd6724 +#: ../../../changes.txt:1854 06eddc593f294b88bdb6dfdd2369d1c1 msgid "**Changes in Version 1.16.18**" msgstr "" -#: ../../../changes.txt:1673 325c4122056e413692002ca13af6db13 +#: ../../../changes.txt:1856 e4884ae592db424f88025aec2e1a97e3 msgid "" "This version introduces several new features around PDF text output. The " "motivation is to simplify this task, while at the same time offering " "extending features." msgstr "" -#: ../../../changes.txt:1675 dc6055ff6991414bbf2d52a5e0722b27 +#: ../../../changes.txt:1858 fd34580fc1464f1c81d06f426d07a778 msgid "" "One major achievement is using MuPDF's capabilities to dynamically " "choosing fallback fonts whenever a character cannot be found in the " @@ -5004,40 +5529,40 @@ msgid "" "Korean languages." msgstr "" -#: ../../../changes.txt:1677 2b4c753eea534993bed558366c4a8bf9 +#: ../../../changes.txt:1860 a99effd7cbe546f989e59f9b483fb232 msgid "" "**Fixed** issue `#493 `_. " "``Pixmap(doc, xref)`` should now again correctly resemble the loaded " "image object." msgstr "" -#: ../../../changes.txt:1678 ae6919da04f04533a2c2e384eecb6baa +#: ../../../changes.txt:1861 f11ea8321f33403084633958bcc22980 msgid "" "**Fixed** issue `#488 `_. " "Widget names are now modifiable." msgstr "" -#: ../../../changes.txt:1679 b5fcd55d22bc4ad0b31ad353063771a6 +#: ../../../changes.txt:1862 0972bab5863f47e8a0ed54efe4d45dbd msgid "**Added** new class :ref:`Font` which represents a font." msgstr "" -#: ../../../changes.txt:1680 f89e7a7476ec4d49ad02b781a2b3b8df +#: ../../../changes.txt:1863 a400f40fbc59428796fdee5a2db49109 msgid "" "**Added** new class :ref:`TextWriter` which serves as a container for " "text to be written on a page." msgstr "" -#: ../../../changes.txt:1681 d3d0a34d5adb407e994674c647b29be7 +#: ../../../changes.txt:1864 18ae7ce08b1340c38ebe9e58381eddd0 msgid "" "**Added** :meth:`Page.writeText` to write one or more :ref:`TextWriter` " "objects to the page." msgstr "" -#: ../../../changes.txt:1686 51f6fe0d5070461499443ca3d4fcabfb +#: ../../../changes.txt:1869 906be9a3eae245f780b2b4938f85d6be msgid "**Changes in Version 1.16.17**" msgstr "" -#: ../../../changes.txt:1689 f33ede69005840e2bf7cfd5b70aa1cde +#: ../../../changes.txt:1872 9ab44ff63bed416f8570d43ce05a2730 msgid "" "**Fixed** issue `#479 `_. " "PyMuPDF should now more correctly report image resolutions. This applies " @@ -5045,99 +5570,99 @@ msgid "" "documents) and pixmaps created from images." msgstr "" -#: ../../../changes.txt:1690 c55b5522ddf344e8912e609153bf33c3 +#: ../../../changes.txt:1873 f6150fb465494bfdab764c5be6a7d39f msgid "" "**Added** :meth:`Pixmap.set_dpi` which sets the image resolution in x and" " y directions." msgstr "" -#: ../../../changes.txt:1694 e2f8f9d30cc14bc585e7968bb9fe106d +#: ../../../changes.txt:1877 5f591a8832cc4723ba08ad68dda41ffe msgid "**Changes in Version 1.16.16**" msgstr "" -#: ../../../changes.txt:1697 b630aadc968749d6bbb6b5b190fbc612 +#: ../../../changes.txt:1880 68e35dadf7bb47feb20698f3a7079c1f msgid "**Fixed** issue `#477 `_." msgstr "" -#: ../../../changes.txt:1698 99bbb02301da4df79ca5e93998d54959 +#: ../../../changes.txt:1881 b5a248121553493e9847869e3904c948 msgid "**Fixed** issue `#476 `_." msgstr "" -#: ../../../changes.txt:1699 a5716aef357b436aa52df3d3f4d56970 +#: ../../../changes.txt:1882 40380d7dd6e449cb82d11a3ab8293127 msgid "" "**Changed** annotation line end symbol coloring and fixed an error " "coloring the interior of 'Polyline' /'Polygon' annotations." msgstr "" -#: ../../../changes.txt:1703 a028fbfbcff747ec979ae30318aa22e7 +#: ../../../changes.txt:1886 76f99a33a85d4eca9407eb5295343aec msgid "**Changes in Version 1.16.14**" msgstr "" -#: ../../../changes.txt:1706 0b4b232aef264813962cf20681b6a4b3 +#: ../../../changes.txt:1889 01ec2719c2f4429b97eb0a71a3b527ae msgid "" "**Changed** text marker annotations to accept parameters beyond just " "quadrilaterals such that now **text lines between two given points can be" " marked**." msgstr "" -#: ../../../changes.txt:1708 583a519fe521451699e30707f5383d81 +#: ../../../changes.txt:1891 ceafcbb56ef344abbf5624cfe164ae02 msgid "" "**Added** :meth:`Document.scrub` which **removes potentially sensitive " "data** from a PDF. Implements `#453 " "`_." msgstr "" -#: ../../../changes.txt:1710 6b57327e8b8e421ca59d3fafdee3d23c +#: ../../../changes.txt:1893 de2d1b57b55b48d5b70e26d41a679763 msgid "" "**Added** :meth:`Annot.blendMode` which returns the **blend mode** of " "annotations." msgstr "" -#: ../../../changes.txt:1712 2ae36c42b54646bd850a032cbfcb0dd6 +#: ../../../changes.txt:1895 27e96fc2e3254412a9af7c240106824e msgid "" "**Added** :meth:`Annot.setBlendMode` to set the annotation's blend mode. " "This resolves issue `#416 " "`_." msgstr "" -#: ../../../changes.txt:1713 995590b758394fe7a18095401658ad52 +#: ../../../changes.txt:1896 20eeb00060ba4ac6b6666e571d2e5d75 msgid "" "**Changed** :meth:`Annot.update` to accept additional parameters for " "setting blend mode and opacity." msgstr "" -#: ../../../changes.txt:1714 d9a65cb4f93e4e0593f550d314e28f0b +#: ../../../changes.txt:1897 9c48b18d08cb4bf69b967a567749155f msgid "" "**Added** advanced graphics features to **control the anti-aliasing " "values**, :meth:`Tools.set_aa_level`. Resolves `#467 " "`_" msgstr "" -#: ../../../changes.txt:1716 6af1cd49ffcf4661a967d4abe9d05125 +#: ../../../changes.txt:1899 e8e7e423f4dd4a48b63d582e7ab631e8 msgid "**Fixed** issue `#474 `_." msgstr "" -#: ../../../changes.txt:1717 e572c05a2293401dbc837f77fb4c8184 +#: ../../../changes.txt:1900 595ebd3ce6e2430da70b5c7885f3918a msgid "**Fixed** issue `#466 `_." msgstr "" -#: ../../../changes.txt:1723 fc8fb34a123640f1a35526e36d005383 +#: ../../../changes.txt:1906 cc058930574c459ab2ddce625ffa9ccf msgid "**Changes in Version 1.16.13**" msgstr "" -#: ../../../changes.txt:1726 e071196781fd4fd7a2142c8aee2472f0 +#: ../../../changes.txt:1909 50e20743a9084111ae7c001dbe4f8b62 msgid "" "**Added** :meth:`Document.getPageXObjectList` which returns a list of " "**Form XObjects** of the page." msgstr "" -#: ../../../changes.txt:1727 5199472cb6fd4be3bd28c216009b47fa +#: ../../../changes.txt:1910 c3c2bb5c9c6843c3830b39a7c0b31b37 msgid "" "**Added** :meth:`Page.setMediaBox` for changing the physical PDF page " "size." msgstr "" -#: ../../../changes.txt:1728 c8a28b3b160249978d40667e42224dda +#: ../../../changes.txt:1911 eff993e6b1eb4774acd0c05308fd1e8a msgid "" "**Added** :ref:`Page` methods which have been internal before: " ":meth:`Page.cleanContents` (= :meth:`Page._cleanContents`), " @@ -5145,46 +5670,46 @@ msgid "" ":meth:`Page.getTransformation` (= :meth:`Page._getTransformation`)." msgstr "" -#: ../../../changes.txt:1734 e6ca57c7ff3241539242e9aa6bd0b19d +#: ../../../changes.txt:1917 8675947ea2c347a489c499af3d4fa06d msgid "**Changes in Version 1.16.12**" msgstr "" -#: ../../../changes.txt:1736 1962fd215c2744d990fc15e46d19bdac +#: ../../../changes.txt:1919 af794db2704a4b0cbabb81f9299983fe msgid "**Fixed** issue `#447 `_" msgstr "" -#: ../../../changes.txt:1737 782ba6a205b5433ea37d0ff8a1f9c7f8 +#: ../../../changes.txt:1920 129d68489e594bea97a5ce52a78d206a msgid "**Fixed** issue `#461 `_." msgstr "" -#: ../../../changes.txt:1738 bc2178db444e446c8a7a9128720617b9 +#: ../../../changes.txt:1921 03a80ef0f419466495ad147a3dfeaeb2 msgid "**Fixed** issue `#397 `_." msgstr "" -#: ../../../changes.txt:1739 b4f2cbc0c2514c069f91ba65c8ccce5f +#: ../../../changes.txt:1922 a2bcd3fec32245f0a2327ad77f1b5445 msgid "**Fixed** issue `#463 `_." msgstr "" -#: ../../../changes.txt:1740 21866ae0e9804f9d8476eac0cdb81981 +#: ../../../changes.txt:1923 64d4847e1a744dac89ad213ab71556fb msgid "" "**Added** JavaScript support to PDF form fields, thereby fixing `#454 " "`_." msgstr "" -#: ../../../changes.txt:1741 111739e561734bde9ef24e2f38829699 +#: ../../../changes.txt:1924 49a4d22efbdc4a84915905ff1104bb9b msgid "" "**Added** a new annotation method :meth:`Annot.delete_responses`, which " "removes 'Popup' and response annotations referring to the current one. " "Mainly serves data protection purposes." msgstr "" -#: ../../../changes.txt:1742 58d0f1ca542b48d09e9aac01854f825f +#: ../../../changes.txt:1925 421bc43eeb1b4c0fa3d1de9ac93c7f27 msgid "" "**Added** a new form field method :meth:`Widget.reset`, which resets the " "field value to its default." msgstr "" -#: ../../../changes.txt:1743 71b67420d97d4b3091f6d30dcfd97088 +#: ../../../changes.txt:1926 fa9378cf2f35445eb096fb461328f8b8 msgid "" "**Changed** and extended handling of redactions: images and XObjects are " "removed if *contained* in a redaction rectangle. Any partial only " @@ -5194,113 +5719,113 @@ msgid "" "`_." msgstr "" -#: ../../../changes.txt:1747 336aed1ebb2d430fa578bf4d42408bf3 +#: ../../../changes.txt:1930 27b4c0399f754bfeb0d932b75262c480 msgid "**Changes in Version 1.16.11**" msgstr "" -#: ../../../changes.txt:1749 dccc519594f648109e248705bd851006 +#: ../../../changes.txt:1932 21c52a1b60b84b448d79a9c6f5ad1f76 msgid "" "**Added** Support for redaction annotations via method " ":meth:`Page.add_redact_annot` and :meth:`Page.apply_redactions`." msgstr "" -#: ../../../changes.txt:1750 d936e16bdd904076bb643b3f361c2ac1 +#: ../../../changes.txt:1933 ddddf21cb7db45cdbd5b0faf124675f8 msgid "**Fixed** issue #426 (\"PolygonAnnotation in 1.16.10 version\")." msgstr "" -#: ../../../changes.txt:1751 8d9e440b6daa463f8f206f651e3d6409 +#: ../../../changes.txt:1934 f1c946b998214501be7ed959f8951035 msgid "" "**Fixed** documentation only issues `#443 " "`_ and `#444 " "`_." msgstr "" -#: ../../../changes.txt:1755 e268ace10ee94e43a42197c001265fd6 +#: ../../../changes.txt:1938 b7965a894cf84ec19349ae08a3c7877c msgid "**Changes in Version 1.16.10**" msgstr "" -#: ../../../changes.txt:1757 a8f723d5a6d04fce89f43be3f76e4604 +#: ../../../changes.txt:1940 184d2f584f92410d9f61c98b4431a698 msgid "" "**Fixed** issue #421 (\"annot.set_rect(rect) has no effect on text " "Annotation\")" msgstr "" -#: ../../../changes.txt:1758 81dd30d614aa425a8d014e509f6f2228 +#: ../../../changes.txt:1941 9d3c664392cd4c52882997e43c5cee78 msgid "" "**Fixed** issue #417 (\"Strange behavior for page.deleteAnnot on 1.16.9 " "compare to 1.13.20\")" msgstr "" -#: ../../../changes.txt:1759 dabcb75b7dcd44f2bc082292049c6991 +#: ../../../changes.txt:1942 361940c4c44d43cda4dfb1e36b1f8c6d msgid "**Fixed** issue #415 (\"Annot.setOpacity throws mupdf warnings\")" msgstr "" -#: ../../../changes.txt:1760 e0781e80702b453485df8d287a7a7c65 +#: ../../../changes.txt:1943 ba8b4c6c823c478291a738c30877848b msgid "" "**Changed** all \"add annotation / widget\" methods to store a unique " "name in the */NM* PDF key." msgstr "" -#: ../../../changes.txt:1761 0d1a57104b71400f953c3ba88e372c89 +#: ../../../changes.txt:1944 bf79ca3ca50b4251bf44decca21a7782 msgid "" "**Changed** :meth:`Annot.setInfo` to also accept direct parameters in " "addition to a dictionary." msgstr "" -#: ../../../changes.txt:1762 f0afdf43ff8147278f9ca098bcb32b2d +#: ../../../changes.txt:1945 dbcae6b36c194c189b19c369912641ec msgid "" "**Changed** :attr:`Annot.info` to now also show the annotation's unique " "id (*/NM* PDF key) if present." msgstr "" -#: ../../../changes.txt:1763 ced2760492b74e2d82456b07f2c46df1 +#: ../../../changes.txt:1946 fe75d886aff24d2e8bf7e3925a83366e msgid "" "**Added** :meth:`Page.annot_names` which returns a list of all annotation" " names (*/NM* keys)." msgstr "" -#: ../../../changes.txt:1764 6425c052c0db440aa3044c7a036f1d52 +#: ../../../changes.txt:1947 4dcf529b87cc49f0bd1af4d4320cfde7 msgid "" "**Added** :meth:`Page.load_annot` which loads an annotation given its " "unique id (*/NM* key)." msgstr "" -#: ../../../changes.txt:1765 014892e0db404dfd9f550f7f8b283b50 +#: ../../../changes.txt:1948 fa03b37404f14d939921bf8a87c9c6da msgid "" "**Added** :meth:`Document.reload_page` which provides a new copy of a " "page after finishing any pending updates to it." msgstr "" -#: ../../../changes.txt:1770 f22ffe58d93747c791a3e67c662bb7f7 +#: ../../../changes.txt:1953 fae1066fa12546dd98bf65e5b543b86b msgid "**Changes in Version 1.16.9**" msgstr "" -#: ../../../changes.txt:1772 0c7ce87dee3b48038b3c09b36a415174 +#: ../../../changes.txt:1955 d5df52286a6e4ec892a3e40c04b39aca msgid "" "**Fixed** #412 (\"Feature Request: Allow controlling whether TOC entries " "should be collapsed\")" msgstr "" -#: ../../../changes.txt:1773 ebfe225b3ef84e5298c9c11fd2fd1260 +#: ../../../changes.txt:1956 a16b04b1deb14236a8376570855cba40 msgid "**Fixed** #411 (\"Seg Fault with page.firstWidget\")" msgstr "" -#: ../../../changes.txt:1774 b28154f80fd54f4a845af28e393e0e3f +#: ../../../changes.txt:1957 0f681ad7e7484754bc9bc618f6ffe11d msgid "**Fixed** #407 (\"Annot.setOpacity trouble\")" msgstr "" -#: ../../../changes.txt:1775 d910d001a8c24b058f497223ef2c6ff5 +#: ../../../changes.txt:1958 2a3d2e24c8374c9b91262b8488f64708 msgid "" "**Changed** methods :meth:`Annot.setBorder`, :meth:`Annot.setColors`, " ":meth:`Link.setBorder`, and :meth:`Link.setColors` to also accept direct " "parameters, and not just cumbersome dictionaries." msgstr "" -#: ../../../changes.txt:1779 1a52b20100924bc2a1f546966a17cfef +#: ../../../changes.txt:1962 92378a229b934ccc949e112406645afd msgid "**Changes in Version 1.16.8**" msgstr "" -#: ../../../changes.txt:1781 0c68f1993f6e4e6a957d767cfde0bd26 +#: ../../../changes.txt:1964 ecd0931d663f451c912766dde614088a msgid "" "**Added** several new methods to the :ref:`Document` class, which make " "dealing with PDF low-level structures easier. I also decided to provide " @@ -5312,13 +5837,13 @@ msgid "" ":meth:`Document.updateStream`." msgstr "" -#: ../../../changes.txt:1782 9d575035965d4bb89fd8ec5007d12ab3 +#: ../../../changes.txt:1965 33164656aa7f427ca8595491bc0f2e01 msgid "" "**Added** :meth:`Tools.mupdf_disply_errors` which sets the display of " "mupdf errors on *sys.stderr*." msgstr "" -#: ../../../changes.txt:1783 74bd0139b71348fd8501606c1921fc33 +#: ../../../changes.txt:1966 b81b74ebdb3d4ecd8c8e3ef522482092 msgid "" "**Added** a commandline facility. This a major new feature: you can now " "invoke several utility functions via *\"python -m fitz ...\"*. It should " @@ -5326,57 +5851,57 @@ msgid "" ":ref:`Module`." msgstr "" -#: ../../../changes.txt:1788 b4ceb804f0ba498aa833b785c619fc60 +#: ../../../changes.txt:1971 b1d2c1ae250049228d3d7121fe3edd5b msgid "**Changes in Version 1.16.7**" msgstr "" -#: ../../../changes.txt:1790 4859b38c88c94b58aba62b0675e02ffc +#: ../../../changes.txt:1973 e443ab65459f4b8683472209275745d8 msgid "" "Minor changes to better synchronize the binary image streams of " ":ref:`TextPage` image blocks and :meth:`Document.extractImage` images." msgstr "" -#: ../../../changes.txt:1792 dc3f4b969d5b4ef3a272f66cffee23a0 +#: ../../../changes.txt:1975 97a1e113f9104b99b9faf259fdfa8d86 msgid "" "**Fixed** issue #394 (\"PyMuPDF Segfaults when using " "TOOLS.mupdf_warnings()\")." msgstr "" -#: ../../../changes.txt:1793 67ef115c08854f818aea0f52a34b5ab1 +#: ../../../changes.txt:1976 97a62c243ff44c2cab6b73aac0ef7d9c msgid "" "**Changed** redirection of MuPDF error messages: apart from writing them " "to Python *sys.stderr*, they are now also stored with the MuPDF warnings." msgstr "" -#: ../../../changes.txt:1794 ea765a681d244e1c81d5cd7a96817854 +#: ../../../changes.txt:1977 4df4ed3f1c42469f8346eb289f1480cb msgid "" "**Changed** :meth:`Tools.mupdf_warnings` to automatically empty the store" " (if not deactivated via a parameter)." msgstr "" -#: ../../../changes.txt:1795 ed5ba6d95c894015962c4f4d43ff82dc +#: ../../../changes.txt:1978 8790e37e72154436b6624c8bad06f7cb msgid "" "**Changed** :meth:`Page.getImageBbox` to return an **infinite rectangle**" " if the image could not be located on the page -- instead of raising an " "exception." msgstr "" -#: ../../../changes.txt:1800 9a50aa4fc9174ddbb2ac39e5e271562e +#: ../../../changes.txt:1983 5e2929d554794f158d99d3d095fdde32 msgid "**Changes in Version 1.16.6**" msgstr "" -#: ../../../changes.txt:1802 cd89f15023fd4706bda7d8cd9386a346 +#: ../../../changes.txt:1985 599d24845c774f4db0e7d17e2324090b msgid "**Fixed** issue #390 (\"Incomplete deletion of annotations\")." msgstr "" -#: ../../../changes.txt:1803 d4e113802c3c468999dca99be1f9999d +#: ../../../changes.txt:1986 8cd77dff6c2a4774a7722f9b37a3bec9 msgid "" "**Changed** :meth:`Page.searchFor` / :meth:`Document.searchPageFor` to " "also support the *flags* parameter, which controls the data included in a" " :ref:`TextPage`." msgstr "" -#: ../../../changes.txt:1804 2c27f4748c654f338de2a1dfd705419b +#: ../../../changes.txt:1987 f199177e91d241f296d12df70a9732ae msgid "" "**Changed** :meth:`Document.getPageImageList`, " ":meth:`Document.getPageFontList` and their :ref:`Page` counterparts to " @@ -5385,19 +5910,19 @@ msgid "" "referenced." msgstr "" -#: ../../../changes.txt:1808 37c70212ca95451bb4a4a3666b2be581 +#: ../../../changes.txt:1991 ad6179b247884db79ba6045ef43a1385 msgid "**Changes in Version 1.16.5**" msgstr "" -#: ../../../changes.txt:1810 825b4adfb918477b8fa0bc027bc9dc65 +#: ../../../changes.txt:1993 6460a7d5fe33486c8185d7400a14443e msgid "More performance improvements for text extraction." msgstr "" -#: ../../../changes.txt:1812 d3e517870d6d4891a21e5cd89b840b82 +#: ../../../changes.txt:1995 d2c0600b030740ccbca12e0156f1a909 msgid "**Fixed** second part of issue #381 (see item in v1.16.4)." msgstr "" -#: ../../../changes.txt:1813 e1cb087d138a47439af865c03bbea119 +#: ../../../changes.txt:1996 1a90cd0a5238441a8e9dcf1ef823b0bf msgid "" "**Added** :meth:`Page.getTextPage`, so it is no longer required to create" " an intermediate display list for text extractions. Page level wrappers " @@ -5405,51 +5930,51 @@ msgid "" "should improve performance by ca. 5%." msgstr "" -#: ../../../changes.txt:1817 0fcd0a91651047568efc097e71614e23 +#: ../../../changes.txt:2000 87308a30d9614d12a56898d0afca438e msgid "**Changes in Version 1.16.4**" msgstr "" -#: ../../../changes.txt:1820 45f87750499545f2ba75d1f8099ef24f +#: ../../../changes.txt:2003 3861d98bb52f4ff9beec775ce41a56d0 msgid "" "**Fixed** issue #381 (\"TextPage.extractDICT ... failed ... after " "upgrading ... to 1.16.3\")" msgstr "" -#: ../../../changes.txt:1821 db2bd690ec6249a18317bf377594b666 +#: ../../../changes.txt:2004 ca4d38f09aa249f39d8bdf75e2930d93 msgid "" "**Added** method :meth:`Document.pages` which delivers a generator " "iterator over a page range." msgstr "" -#: ../../../changes.txt:1822 b9b03dc832ea4103b787a1e2dca42990 +#: ../../../changes.txt:2005 c10d16381a4b4386bd41822dc259e62c msgid "" "**Added** method :meth:`Page.links` which delivers a generator iterator " "over the links of a page." msgstr "" -#: ../../../changes.txt:1823 41f4e116aa5744ba842ff3839a2082b8 +#: ../../../changes.txt:2006 325a170f3f8741e29e0ac263081297a0 msgid "" "**Added** method :meth:`Page.annots` which delivers a generator iterator " "over the annotations of a page." msgstr "" -#: ../../../changes.txt:1824 fd0ab6951c224b41b1c1ed4b8c5ccbf0 +#: ../../../changes.txt:2007 facf7023e6e347079584df6e97f7c0d6 msgid "" "**Added** method :meth:`Page.widgets` which delivers a generator iterator" " over the form fields of a page." msgstr "" -#: ../../../changes.txt:1825 9a3419df3cb14885adf9c518f079784c +#: ../../../changes.txt:2008 5600da0f54e4453caafc2f3bb6fae938 msgid "" "**Changed** :attr:`Document.is_form_pdf` to now contain the number of " -"widgets, and *False* if not a PDF or this number is zero." +"widgets, and ``False`` if not a PDF or this number is zero." msgstr "" -#: ../../../changes.txt:1830 fb4ff43aac784ba89fc936513f6919d2 +#: ../../../changes.txt:2013 defabc6d60e541a3876a173e5b67ed2f msgid "**Changes in Version 1.16.3**" msgstr "" -#: ../../../changes.txt:1832 92972f3b37104f528250d2436f5ac74a +#: ../../../changes.txt:2015 b1dc046ead24444bba8246655fa172f6 msgid "" "Minor changes compared to version 1.16.2. The code of the \"dict\" and " "\"rawdict\" variants of :meth:`Page.getText` has been ported to C which " @@ -5458,13 +5983,13 @@ msgid "" "almost two times faster." msgstr "" -#: ../../../changes.txt:1834 5d70580e15ca406a86aa159b1954a01a +#: ../../../changes.txt:2017 d83f278ce36346cf826935d8c8a55ed2 msgid "" "**Fixed** issue #369 (\"mupdf: cmsCreateTransform failed\") by removing " "ICC colorspace support." msgstr "" -#: ../../../changes.txt:1835 e078518d1ba8479994f5077beb645107 +#: ../../../changes.txt:2018 fdc7d313bad44fa88425c3e5c850a645 msgid "" "**Changed** :meth:`Page.getText` to accept additional keywords \"blocks\"" " and \"words\". These will deliver the results of " @@ -5474,51 +5999,51 @@ msgid "" " and :meth:`TextPage.extractWords`." msgstr "" -#: ../../../changes.txt:1836 2c3a3fe32daf47cdb4ac4611b028e814 +#: ../../../changes.txt:2019 3fca663f69c6497fa3c6a7ad2adb2450 msgid "" "**Changed** :meth:`Page.getText` to default bit indicator " "*TEXT_INHIBIT_SPACES* to **off**. Insertion of additional spaces is **not" " suppressed** by default." msgstr "" -#: ../../../changes.txt:1840 b8bec51e46764c83a094a7a36de21495 +#: ../../../changes.txt:2023 f0e8a9a697d545e2aa558945e286c755 msgid "**Changes in Version 1.16.2**" msgstr "" -#: ../../../changes.txt:1842 873a66621814473ca5bfc4e885d82f21 +#: ../../../changes.txt:2025 244003fcd5e442408c7c59ff86a18348 msgid "" "**Changed** text extraction methods of :ref:`Page` to allow detail " "control of the amount of extracted data." msgstr "" -#: ../../../changes.txt:1843 79ef6a58c6da48a894ed1bce34b4c33e +#: ../../../changes.txt:2026 96ffbb66826344c0abebab9c361f16e7 msgid "" "**Added** :meth:`planish_line` which maps a given line (defined as a pair" " of points) to the x-axis." msgstr "" -#: ../../../changes.txt:1844 9742ba98ce96475f900dc424ec6c9421 +#: ../../../changes.txt:2027 4459642dc0264674becb06363fab528b msgid "" "**Fixed** an issue (w/o Github number) which brought down the interpreter" " when encountering certain non-UTF-8 encodable characters while using " ":meth:`Page.getText` with te \"dict\" option." msgstr "" -#: ../../../changes.txt:1845 52350ff8df89457fbf2e3d5c910f24b7 +#: ../../../changes.txt:2028 69518c711a8c4719b36e078a17fa77cf msgid "**Fixed** issue #362 (\"Memory Leak with getText('rawDICT')\")." msgstr "" -#: ../../../changes.txt:1849 452b5bdac5c4469c82c567954a1b9503 +#: ../../../changes.txt:2032 b793bdf7e6c742a1a840e24b28cc9d09 msgid "**Changes in Version 1.16.1**" msgstr "" -#: ../../../changes.txt:1851 fa2b018c03bc4de6a7eeecacb9361d09 +#: ../../../changes.txt:2034 2141dc782ed3451b88a2f81567116dc2 msgid "" "**Added** property :attr:`Quad.is_convex` which checks whether a line is " "contained in the quad if it connects two points of it." msgstr "" -#: ../../../changes.txt:1852 be04499ea2e242cf8992e18ca3265def +#: ../../../changes.txt:2035 63eca3d8920e45b1abad5ec6df745db7 msgid "" "**Changed** :meth:`Document.insert_pdf` to now allow dropping or " "including links and annotations independently during the copy. Fixes " @@ -5526,51 +6051,51 @@ msgid "" " occur when using the method for some problematic PDF files." msgstr "" -#: ../../../changes.txt:1853 0f2d14fcbf53494aa97a9cec566735ed +#: ../../../changes.txt:2036 c7544beddb164c228c7bc9f680ab7e70 msgid "" "**Fixed** a bug which, in matrix division using the syntax *\"m1/m2\"*, " "caused matrix *\"m1\"* to be **replaced** by the result instead of " "delivering a new matrix." msgstr "" -#: ../../../changes.txt:1854 2a5f2a345f534cacbb24359c308edefa +#: ../../../changes.txt:2037 6d5a1ed42ec94b869a923337b5e3f8f6 msgid "" "**Fixed** issue #354 (\"SyntaxWarning with Python 3.8\"). We now always " "use *\"==\"* for literals (instead of the *\"is\"* Python keyword)." msgstr "" -#: ../../../changes.txt:1855 3ba507adc067447cb329494fd5574ca9 +#: ../../../changes.txt:2038 8cdcf5b48aae49c789c3f25284c44087 msgid "" "**Fixed** issue #353 (\"mupdf version check\"), to no longer refuse the " "import when there are only patch level deviations from MuPDF." msgstr "" -#: ../../../changes.txt:1861 80dc171762b543a3b73ac11a04851948 +#: ../../../changes.txt:2044 6bedc075ffe3480e8f7206bcc0ff2112 msgid "**Changes in Version 1.16.0**" msgstr "" -#: ../../../changes.txt:1863 a00914660840427ab0ad1190dea8f17e +#: ../../../changes.txt:2046 4328810aa9a64eb0bcc336044e7a2576 msgid "" "This major new version of MuPDF comes with several nice new or changed " "features. Some of them imply programming API changes, however. This is a " "synopsis of what has changed:" msgstr "" -#: ../../../changes.txt:1865 d2cbda22e3644be8bbc1872987ea5825 +#: ../../../changes.txt:2048 a760e7e0b517454a9fd80d87f5a5c043 msgid "" "PDF document encryption and decryption is now **fully supported**. This " "includes setting **permissions**, **passwords** (user and owner " "passwords) and the desired encryption method." msgstr "" -#: ../../../changes.txt:1866 f99a3924f9c241b4b055af0be94c6f74 +#: ../../../changes.txt:2049 0ac3db53497d4789a51fbaae5532e2cc msgid "" "In response to the new encryption features, PyMuPDF returns an integer " "(ie. a combination of bits) for document permissions, and no longer a " "dictionary." msgstr "" -#: ../../../changes.txt:1867 b002dcde4bc949c49c477916071d26a7 +#: ../../../changes.txt:2050 1ba4256335a74714ad2a964147508a53 msgid "" "Redirection of MuPDF errors and warnings is now natively supported. " "PyMuPDF redirects error messages from MuPDF to *sys.stderr* and no longer" @@ -5578,11 +6103,11 @@ msgid "" "displayed. Functions exist to access and reset the warnings buffer." msgstr "" -#: ../../../changes.txt:1868 1c000868108246bd9d4fccce1febe737 +#: ../../../changes.txt:2051 f88afc96b7934797a998f8f1ea458c18 msgid "Annotations are now **only supported for PDF**." msgstr "" -#: ../../../changes.txt:1869 0fc73ad3efb3427bb38b4aa20c1a58f6 +#: ../../../changes.txt:2052 c96da7bcdf2f46ee9426f5df7fba34b3 msgid "" "Annotations and widgets (form fields) are now **separate object chains** " "on a page (although widgets technically still **are** PDF annotations). " @@ -5591,62 +6116,62 @@ msgid "" ":attr:`Page.firstWidget` and :meth:`Widget.next` to access form fields." msgstr "" -#: ../../../changes.txt:1870 19db530625a74ff183dee9accf6efec6 +#: ../../../changes.txt:2053 dd0eec567c304bafa665a9761b9d1beb msgid "" "As part of MuPDF's changes regarding widgets, only the following four " "fonts are supported, when **adding** or **changing** form fields: " "**Courier, Helvetica, Times-Roman** and **ZapfDingBats**." msgstr "" -#: ../../../changes.txt:1872 9df29e138c904b7c8e51bf0882ad68ac +#: ../../../changes.txt:2055 ba377b66c80c4815bc4d4909a93a2fa0 msgid "List of change details:" msgstr "" -#: ../../../changes.txt:1874 72fb8ed4e1c14c16955040f035215cb0 +#: ../../../changes.txt:2057 3dbe328d1c8f4a6586e283c0353288ca msgid "" "**Added** :meth:`Document.can_save_incrementally` which checks conditions" " that are preventing use of option *incremental=True* of " ":meth:`Document.save`." msgstr "" -#: ../../../changes.txt:1875 c62ccef7b25446d2ab4d08e0ecbd39d1 +#: ../../../changes.txt:2058 dfba798e391e49969a75c38421999aba msgid "" "**Added** :attr:`Page.firstWidget` which points to the first field on a " "page." msgstr "" -#: ../../../changes.txt:1876 10b2f360998e47f4a2bca170f32d8a64 +#: ../../../changes.txt:2059 70ec756e3fde41a58f61257712f68175 msgid "" "**Added** :meth:`Page.getImageBbox` which returns the rectangle occupied " "by an image shown on the page." msgstr "" -#: ../../../changes.txt:1877 0de4e619a98043a282bce528ba10e567 +#: ../../../changes.txt:2060 52cdd784572345b8b494754d2d47e06a msgid "" "**Added** :meth:`Annot.setName` which lets you change the (icon) name " "field." msgstr "" -#: ../../../changes.txt:1878 a6dfa51eb32c45568e6007eb4f9dd455 +#: ../../../changes.txt:2061 6609b86145064db79dc97436d04f1a9e msgid "" "**Added** outputting the text color in :meth:`Page.getText`: the " "*\"dict\"*, *\"rawdict\"* and *\"xml\"* options now also show the color " "in sRGB format." msgstr "" -#: ../../../changes.txt:1879 a693be3fcfd04d93ae83e71865895e37 +#: ../../../changes.txt:2062 74730827e0a64061a1e3e47286823bcf msgid "" "**Changed** :attr:`Document.permissions` to now contain an integer of " "bool indicators -- was a dictionary before." msgstr "" -#: ../../../changes.txt:1880 dcc0294016824859bd5aa7e9b665ff82 +#: ../../../changes.txt:2063 4126d540220b444d96835814920f8fe3 msgid "" "**Changed** :meth:`Document.save`, :meth:`Document.write`, which now " "fully support password-based decryption and encryption of PDF files." msgstr "" -#: ../../../changes.txt:1881 0dbdf219f8814dd5b99f87db69276df0 +#: ../../../changes.txt:2064 5b6524742b4e411fb6f211d717e9a10d msgid "" "**Changed the names of all Python constants** related to annotations and " "widgets. Please make sure to consult the **Constants and Enumerations** " @@ -5656,7 +6181,7 @@ msgid "" "deprecated synonyms." msgstr "" -#: ../../../changes.txt:1882 e55f1f948dbd4bf494c862ff11e7b286 +#: ../../../changes.txt:2065 d682ef7a26f44a1ebb180063ad5744ac msgid "" "**Changed** font support for widgets: only *Cour* (Courier), *Helv* " "(Helvetica, default), *TiRo* (Times-Roman) and *ZaDb* (ZapfDingBats) are " @@ -5665,55 +6190,55 @@ msgid "" "widgets, however will show its original font." msgstr "" -#: ../../../changes.txt:1883 97b53bc479d9456c9a95771299208459 +#: ../../../changes.txt:2066 4cdf4f75df404138b707cec59ae070fb msgid "" "**Changed** the name of the warnings buffer to " ":meth:`Tools.mupdf_warnings` and the function to empty this buffer is now" " called :meth:`Tools.reset_mupdf_warnings`." msgstr "" -#: ../../../changes.txt:1884 f58110940dcd43ffbcb2089dbf5c3525 +#: ../../../changes.txt:2067 1d07282579fc4e26bbff7ed1ba846e1b msgid "" "**Changed** :meth:`Page.getPixmap`, :meth:`Document.get_page_pixmap`: a " "new bool argument *annots* can now be used to **suppress the rendering of" " annotations** on the page." msgstr "" -#: ../../../changes.txt:1885 d660e22a82d1404bab2ce18b52903e64 +#: ../../../changes.txt:2068 dd6323f156064fa4aeb65edcfcb24717 msgid "" "**Changed** :meth:`Page.add_file_annot` and :meth:`Page.add_text_annot` " "to enable setting an icon." msgstr "" -#: ../../../changes.txt:1886 0fb475ae52f641598f652c14a9bc4336 +#: ../../../changes.txt:2069 a6723eca6bfd4546b5422272e17f0b98 msgid "" "**Removed** widget-related methods and attributes from the :ref:`Annot` " "object." msgstr "" -#: ../../../changes.txt:1887 f6ca95e30fa34afa9dcf3a1141dcfb19 +#: ../../../changes.txt:2070 2cc0b6ee238c4721b919cad0d784b5d9 msgid "" "**Removed** :ref:`Document` attributes *openErrCode*, *openErrMsg*, and " ":ref:`Tools` attributes / methods *stderr*, *reset_stderr*, *stdout*, and" " *reset_stdout*." msgstr "" -#: ../../../changes.txt:1888 089d4f627a7e4c1c9681fa7851992cb7 +#: ../../../changes.txt:2071 123bc0d89f13409bb11cc1936b963528 msgid "" "**Removed** **thirdparty zlib** dependency in PyMuPDF: there are now " "compression functions available in MuPDF. Source installers of PyMuPDF " "may now omit this extra installation step." msgstr "" -#: ../../../changes.txt:1890 e151dfe14d154c139487229115ca0057 +#: ../../../changes.txt:2073 31cbdf932b5843e09f7d2e015d6d6880 msgid "**No version published for MuPDF v1.15.0**" msgstr "" -#: ../../../changes.txt:1895 8767b5d3b51a4177b389f967d612ca62 +#: ../../../changes.txt:2078 09197a04e8324668bbdc9f0fded15060 msgid "**Changes in Version 1.14.20 / 1.14.21**" msgstr "" -#: ../../../changes.txt:1897 5c25cbde72304e658a436ee09c9efbe4 +#: ../../../changes.txt:2080 01c834c97dd4498bb948ae249f083173 msgid "" "**Changed** text marker annotations to support multiple rectangles / " "quadrilaterals. This fixes issue #341 (\"Question : How to addhighlight " @@ -5721,80 +6246,80 @@ msgid "" "highlight?\") and similar (#285)." msgstr "" -#: ../../../changes.txt:1898 6241fc69cc3d4c78be6da663ac429f92 +#: ../../../changes.txt:2081 1ea43a8c786d4aad8056045e35f0bec8 msgid "" "**Fixed** issue #331 (\"Importing PyMuPDF changes warning filtering " "behaviour globally\")." msgstr "" -#: ../../../changes.txt:1903 9e611ecde4174c0eab0ac4a9ddd45cc8 +#: ../../../changes.txt:2086 df7eb99eeee242edad81168e9683bba0 msgid "**Changes in Version 1.14.19**" msgstr "" -#: ../../../changes.txt:1905 8bf2daf2e79a4b5298dcf6f1158a281c +#: ../../../changes.txt:2088 c712710865084b4987b9d1986582510d msgid "**Fixed** issue #319 (\"InsertText function error when use custom font\")." msgstr "" -#: ../../../changes.txt:1906 8197c5144dfe4c92b2dd8723d51afc5b +#: ../../../changes.txt:2089 04153b8b52dd42e0b65ae0b0198aa82e msgid "" "**Added** new method :meth:`Document.get_sigflags` which returns " "information on whether a PDF is signed. Resolves issue #326 (\"How to " "detect signature in a form pdf?\")." msgstr "" -#: ../../../changes.txt:1911 ddb20f215fcf41c58184e5e7ad55491b +#: ../../../changes.txt:2094 05872f2eea2f414b929a8c63193bc83b msgid "**Changes in Version 1.14.17**" msgstr "" -#: ../../../changes.txt:1913 52d127bd71a445bc9e679dbbf5b81bd3 +#: ../../../changes.txt:2096 b7f49499026840c2b5e1b475b6856ee0 msgid "" "**Added** :meth:`Document.fullcopyPage` to make full page copies within a" " PDF (not just copied references as :meth:`Document.copyPage` does)." msgstr "" -#: ../../../changes.txt:1914 99d484b79ec647caabd4be46e3da9de5 +#: ../../../changes.txt:2097 ebe1f2886ed645babed59a2d3a3d699b msgid "" "**Changed** :meth:`Page.getPixmap`, :meth:`Document.get_page_pixmap` now " "use *alpha=False* as default." msgstr "" -#: ../../../changes.txt:1915 6f8893e8730140e2825467d35c6b79b0 +#: ../../../changes.txt:2098 98d3957628a945909abf5fa6c6461ec5 msgid "" "**Changed** text extraction: the span dictionary now (again) contains its" " rectangle under the *bbox* key." msgstr "" -#: ../../../changes.txt:1916 948ed38497fc4fcf8f3410cb5ea8d1d1 +#: ../../../changes.txt:2099 b1da104141564ec18ab3fe3dd6c73c05 msgid "" "**Changed** :meth:`Document.movePage` and :meth:`Document.copyPage` to " "use direct functions instead of wrapping :meth:`Document.select` -- " "similar to :meth:`Document.delete_page` in v1.14.16." msgstr "" -#: ../../../changes.txt:1920 b562b1a7cbc04a9887c88cd9be32859b +#: ../../../changes.txt:2103 934aedea3ab342b492d489b3d257e15a msgid "**Changes in Version 1.14.16**" msgstr "" -#: ../../../changes.txt:1922 94d869627b734cfc8f06ed546eed266f +#: ../../../changes.txt:2105 40e0ee3010c0479fa6c31763023c4c4f msgid "" "**Changed** :ref:`Document` methods around PDF */EmbeddedFiles* to no " "longer use MuPDF's \"portfolio\" functions. That support will be dropped " "in MuPDF v1.15 -- therefore another solution was required." msgstr "" -#: ../../../changes.txt:1923 18f92669612f46ceaff75c171352c255 +#: ../../../changes.txt:2106 0805a835853d4a9a80bd9202aacdfd52 msgid "" "**Changed** :meth:`Document.embfile_Count` to be a function (was an " "attribute)." msgstr "" -#: ../../../changes.txt:1924 788df4d12879416abd3543cf10c2c94c +#: ../../../changes.txt:2107 06849828882d49dea4600975cc5f48c4 msgid "" "**Added** new method :meth:`Document.embfile_Names` which returns a list " "of names of embedded files." msgstr "" -#: ../../../changes.txt:1925 51db39c0c7784392bed127230e5f0f8e +#: ../../../changes.txt:2108 92418dcf2837409c8f097be2fd0db7d3 msgid "" "**Changed** :meth:`Document.delete_page` and " ":meth:`Document.delete_pages` to internally no longer use " @@ -5804,11 +6329,11 @@ msgid "" "PDFs and sophisticated use of annotations." msgstr "" -#: ../../../changes.txt:1930 2805e37daeb243daae39b8a3c2514012 +#: ../../../changes.txt:2113 7be1be7e14e348659ee4570c1e7a904a msgid "**Changes in Version 1.14.15**" msgstr "" -#: ../../../changes.txt:1932 d618fd33820543b49dacf0e3dfc0ad76 +#: ../../../changes.txt:2115 f4cc678f1e12459d8c3f0eeb4b1d64ab msgid "" "**Fixed** issues #301 (\"Line cap and Line join\"), #300 (\"How to draw a" " shape without outlines\") and #298 (\"utils.updateRect exception\"). " @@ -5820,41 +6345,41 @@ msgid "" "the next release." msgstr "" -#: ../../../changes.txt:1933 de1ba1ffb2df46969794ecc251f155e9 +#: ../../../changes.txt:2116 ff98970f7cad47ed8fac68f3688fffc8 msgid "" "**Fixed** issue #290 (\"Memory Leak with getText('rawDICT')\"). This bug " "caused memory not being (completely) freed after invoking the \"dict\", " "\"rawdict\" and \"json\" versions of :meth:`Page.getText`." msgstr "" -#: ../../../changes.txt:1938 15a46f4dd1404300b75876565b80eb14 +#: ../../../changes.txt:2121 11d8b202851c430e8381a3c1c21e80d6 msgid "**Changes in Version 1.14.14**" msgstr "" -#: ../../../changes.txt:1940 247acc6f0f064ab3acf29b30a5abb7ff +#: ../../../changes.txt:2123 340485a50d694bc9accb9f986fa0bf58 msgid "" "**Added** new low-level function :meth:`ImageProperties` to determine a " "number of characteristics for an image." msgstr "" -#: ../../../changes.txt:1941 74e34e076d4b4ad8867443d9e6e2541a +#: ../../../changes.txt:2124 5453a7f953c34bedbca1791479b5714d msgid "" "**Added** new low-level function :meth:`Document.is_stream`, which checks" " whether an object is of stream type." msgstr "" -#: ../../../changes.txt:1942 77275e4258874b4e81332396d8135aa3 +#: ../../../changes.txt:2125 ec1a8c46ebca48eebbf3d5827c12d214 msgid "" "**Changed** low-level functions :meth:`Document._getXrefString` and " ":meth:`Document._getTrailerString` now by default return object " "definitions in a formatted form which makes parsing easy." msgstr "" -#: ../../../changes.txt:1946 f1f8d767c4bb4a1581dd520c2be23686 +#: ../../../changes.txt:2129 d23a665652534b489f1ca082bda099dd msgid "**Changes in Version 1.14.13**" msgstr "" -#: ../../../changes.txt:1948 4206148f37ca4b7182ab77ca2de65e81 +#: ../../../changes.txt:2131 4861a2a0e1c943a19adbe349309a159f msgid "" "**Changed** methods working with binary input: while ever supporting " "bytes and bytearray objects, they now also accept *io.BytesIO* input, " @@ -5864,17 +6389,17 @@ msgid "" "insertImage\")." msgstr "" -#: ../../../changes.txt:1949 45dbb59d2bf64ab0848e696eedb71ffc +#: ../../../changes.txt:2132 7da722ec959a4b7a9a2b74690d0d5a18 msgid "" "**Fixed** issue #278 (\"Is insertImage(keep_proportion=True) broken?\"). " "Images are now correctly presented when keeping aspect ratio." msgstr "" -#: ../../../changes.txt:1954 40a485a7d7dd422dbcf038461ba3be34 +#: ../../../changes.txt:2137 966095679d2e4a2ba13407749072fe18 msgid "**Changes in Version 1.14.12**" msgstr "" -#: ../../../changes.txt:1956 5696d1823f694b7eb9e77d049b253f20 +#: ../../../changes.txt:2139 a5eb02c774cc4752bb4d914ad3a75c04 msgid "" "**Changed** the draw methods of :ref:`Page` and :ref:`Shape` to support " "not only RGB, but also GRAY and CMYK colorspaces. This solves issue #270 " @@ -5882,18 +6407,18 @@ msgid "" "applies to text insertion methods of :ref:`Shape`, resp. :ref:`Page`." msgstr "" -#: ../../../changes.txt:1957 d547de8c48e74d038d2bf91c56b4faf5 +#: ../../../changes.txt:2140 5b6a9f0eb247493aadab10072b4ba869 msgid "" "**Fixed** issue #269 (\"AttributeError in Document.insert_page()\"), " "which occurred when using :meth:`Document.insert_page` with text " "insertion." msgstr "" -#: ../../../changes.txt:1962 9e7483a1c52340418c002f6636de8a90 +#: ../../../changes.txt:2145 9e30f11242644851b3b3b29662fa6746 msgid "**Changes in Version 1.14.11**" msgstr "" -#: ../../../changes.txt:1964 b5201e43635f41428b860c54c8c7a43a +#: ../../../changes.txt:2147 cc8e088ee81e46559947186dff3f70d6 msgid "" "**Changed** :meth:`Page.show_pdf_page` to always position the source " "rectangle centered in the target. This method now also supports " @@ -5901,41 +6426,41 @@ msgid "" "deprecated: prevention of duplicates is now **handled internally**." msgstr "" -#: ../../../changes.txt:1965 18ea733ec5624362a6e9dffd5ea4901c +#: ../../../changes.txt:2148 520e83b843e9431a808601e837226257 msgid "" "**Changed** :meth:`Page.insertImage` to support rotated display of the " "image and keeping the aspect ratio. Only rotations by multiples of 90 " "degrees are supported here." msgstr "" -#: ../../../changes.txt:1966 cabe34f5943343d9979411a408ed0211 +#: ../../../changes.txt:2149 b296d98ca9844bdb9424bea2f7c16e7c msgid "" "**Fixed** issue #265 (\"TypeError: insertText() got an unexpected keyword" " argument 'idx'\"). This issue only occurred when using " ":meth:`Document.insert_page` with also inserting text." msgstr "" -#: ../../../changes.txt:1970 d7dec01eb92f437cbabaa874b152508f +#: ../../../changes.txt:2153 c840f78999bc4bcf800e3ee3864f9528 msgid "**Changes in Version 1.14.10**" msgstr "" -#: ../../../changes.txt:1972 6fc6190b77dd439b85bad2d2e9a9c636 +#: ../../../changes.txt:2155 9bd1d3e0020e4cd792e1526ac4faedec msgid "" "**Changed** :meth:`Page.show_pdf_page` to support rotation of the source " "rectangle. Fixes #261 (\"Cannot rotate insterted pages\")." msgstr "" -#: ../../../changes.txt:1973 c96a51b62159478ba6115247bb0ae562 +#: ../../../changes.txt:2156 4b154a05a7a8473098ebfcd373d5a56e msgid "" "**Fixed** a bug in :meth:`Page.insertImage` which prevented insertion of " "multiple images provided as streams." msgstr "" -#: ../../../changes.txt:1978 d8f641751fa94898a64b31966752effd +#: ../../../changes.txt:2161 30c68c097ab74de2af491451fdb43ed6 msgid "**Changes in Version 1.14.9**" msgstr "" -#: ../../../changes.txt:1980 d15019ee470e44188b3144dc9b0bf511 +#: ../../../changes.txt:2163 ca7e6b3fa698461d9329bd534d283f30 msgid "" "**Added** new low-level method :meth:`Document._getTrailerString`, which " "returns the trailer object of a PDF. This is much like " @@ -5943,7 +6468,7 @@ msgid "" "needs no :data:`xref` to identify it." msgstr "" -#: ../../../changes.txt:1981 a6abe71d5c88416f8c05997dd4c9f07d +#: ../../../changes.txt:2164 eabe1cf906764e1abe1f72302297c36b msgid "" "**Added** new parameters for text insertion methods. You can now set " "stroke and fill colors of glyphs (text characters) independently, as well" @@ -5952,7 +6477,7 @@ msgid "" "at all." msgstr "" -#: ../../../changes.txt:1982 7a38067c38c24ce59284dc4376d03d1f +#: ../../../changes.txt:2165 9c65a08c28ae409c97803bd1cf7a0846 msgid "" "**Fixed** issue #258 (\"Copying image streams to new PDF without size " "increase\"): For JPX images embedded in a PDF, " @@ -5961,146 +6486,146 @@ msgid "" "in PNG format (entailing a massive size increase)." msgstr "" -#: ../../../changes.txt:1983 c8b28c4defd04d7285b9b5d1d0c97aa3 +#: ../../../changes.txt:2166 27248cd680b44b3ab3bc08cd324c5432 msgid "" "**Fixed** issue #259 (\"Morphing text to fit inside rect\"). Clarified " "use of :meth:`get_text_length` and removed extra line breaks for long " "words." msgstr "" -#: ../../../changes.txt:1987 a30bc124c31e42a0bcadc59dbb9d3005 +#: ../../../changes.txt:2170 b11b3a86f9764bc19a57f063fe13532c msgid "**Changes in Version 1.14.8**" msgstr "" -#: ../../../changes.txt:1989 735e968ab45e4dad998bddbed544f27a +#: ../../../changes.txt:2172 82d7526204c549a1858994a428b8a8d4 msgid "" "**Added** :meth:`Pixmap.set_rect` to change the pixel values in a " "rectangle. This is also an alternative to setting the color of a complete" " pixmap (:meth:`Pixmap.clear_with`)." msgstr "" -#: ../../../changes.txt:1990 a49a3ce1d2464739a6e17c807eb0053d +#: ../../../changes.txt:2173 ea602f5ff6e2498a92e5f4d0bbdc1702 msgid "" "**Fixed** an image extraction issue with JBIG2 (monochrome) encoded PDF " "images. The issue occurred in :meth:`Page.getText` (parameters \"dict\" " "and \"rawdict\") and in :meth:`Document.extractImage` methods." msgstr "" -#: ../../../changes.txt:1991 08d6165c30824dec9da67a2ff50a6902 +#: ../../../changes.txt:2174 c402b7e623ea4c139cc88be9cac4e36c msgid "" "**Fixed** an issue with not correctly clearing a non-alpha :ref:`Pixmap` " "(:meth:`Pixmap.clear_with`)." msgstr "" -#: ../../../changes.txt:1992 3020a2d41e414791a02730ad0c529682 +#: ../../../changes.txt:2175 9c2d1b085a384b24a5db1fd8090d8a67 msgid "" "**Fixed** an issue with not correctly inverting colors of a non-alpha " ":ref:`Pixmap` (:meth:`Pixmap.invert_irect`)." msgstr "" -#: ../../../changes.txt:1996 8afeac30d6c04990ba6b09f483e9e03f +#: ../../../changes.txt:2179 ab4fbd78e984463abd686a605884ddda msgid "**Changes in Version 1.14.7**" msgstr "" -#: ../../../changes.txt:1998 084c11f85fab4ce88aa606ea7cc4c456 +#: ../../../changes.txt:2181 16cd5e507c2b40248d6af093b2a8eacb msgid "**Added** :meth:`Pixmap.set_pixel` to change one pixel value." msgstr "" -#: ../../../changes.txt:1999 81883b039c9c4d21ad3a65110431ad6f +#: ../../../changes.txt:2182 7037f2e88d0b4768b0578ec2c4572f9b msgid "**Added** documentation for image conversion in the :ref:`FAQ`." msgstr "" -#: ../../../changes.txt:2000 12ca9fbc87c2411da9788108cad2c064 +#: ../../../changes.txt:2183 41aa04fff22c4bc9b2ffe561f734d15e msgid "" "**Added** new function :meth:`get_text_length` to determine the string " "length for a given font." msgstr "" -#: ../../../changes.txt:2001 07bc584c92df4730814ee2b1451bfb74 +#: ../../../changes.txt:2184 7ade45e65078489394e7c8ba14ae98f4 msgid "" "**Added** Postscript image output (changed :meth:`Pixmap.save` and " ":meth:`Pixmap.tobytes`)." msgstr "" -#: ../../../changes.txt:2002 0f2a7e6b77454f409925d1a398203099 +#: ../../../changes.txt:2185 ab6d907cbfcc4f708913a797f2f1fb16 msgid "" "**Changed** :meth:`Pixmap.save` and :meth:`Pixmap.tobytes` to ensure " "valid combinations of colorspace, alpha and output format." msgstr "" -#: ../../../changes.txt:2003 8c6af4b33c454cacaf3bf2e46fd29b5b +#: ../../../changes.txt:2186 063494697f8e43318d31d30f940c3481 msgid "" "**Changed** :meth:`Pixmap.save`: the desired format is now inferred from " "the filename." msgstr "" -#: ../../../changes.txt:2004 9b9b86aab9d84db1a4cea603c7123445 +#: ../../../changes.txt:2187 ede0fa8b74574050b048e88fc24f1fc6 msgid "" "**Changed** FreeText annotations can now have a transparent background - " "see :meth:`Annot.update`." msgstr "" -#: ../../../changes.txt:2008 dc88dcf8877b426a92429b19d4c5f8c5 +#: ../../../changes.txt:2191 a6af2b7087ff4f87a3d94a14f6bdae06 msgid "**Changes in Version 1.14.5**" msgstr "" -#: ../../../changes.txt:2010 4b954c226c064ba7801f23bf963c1209 +#: ../../../changes.txt:2193 018e32d9c25047af810c2a84b70970b9 msgid "" "**Changed:** :ref:`Shape` methods now strictly use the transformation " "matrix of the :ref:`Page` -- instead of \"manually\" calculating " "locations." msgstr "" -#: ../../../changes.txt:2011 4e97edfa1a5444e39738bf1fbb08d7a8 +#: ../../../changes.txt:2194 54bc4b2d86e14789b40419fac12f97d7 msgid "" "**Added** method :meth:`Pixmap.pixel` which returns the pixel value (a " "list) for given pixel coordinates." msgstr "" -#: ../../../changes.txt:2012 a5b601dc5a4947c096cb9076ddb10846 +#: ../../../changes.txt:2195 857bf92e13484c7cb3693e7335a772f6 msgid "" "**Added** method :meth:`Pixmap.tobytes` which returns a bytes object " "representing the pixmap in a variety of formats. Previously, this could " "be done for PNG outputs only (:meth:`Pixmap.tobytes`)." msgstr "" -#: ../../../changes.txt:2013 d90848799e014696a679cce0180c364c +#: ../../../changes.txt:2196 f67fb06ac693416fbc7c8aa65f7bd7d4 msgid "" "**Changed:** output of methods :meth:`Pixmap.save` and (the new) " ":meth:`Pixmap.tobytes` may now also be PSD (Adobe Photoshop Document)." msgstr "" -#: ../../../changes.txt:2014 496182847d3a4d48bdcf332029cb9b6e +#: ../../../changes.txt:2197 f125017e6376447793ab5cfac68cd949 msgid "" "**Added** method :meth:`Shape.drawQuad` which draws a :ref:`Quad`. This " "actually is a shorthand for a :meth:`Shape.drawPolyline` with the edges " "of the quad." msgstr "" -#: ../../../changes.txt:2015 d4a4ae86a0d24ec5a174e9cb29e85142 +#: ../../../changes.txt:2198 53b30bdb598d4653ac927d8cce460309 msgid "" "**Changed** method :meth:`Shape.drawOval`: the argument can now be " "**either** a rectangle (:data:`rect_like`) **or** a quadrilateral " "(:data:`quad_like`)." msgstr "" -#: ../../../changes.txt:2019 a4c2746fa7a44047b0f2698aa979bef0 +#: ../../../changes.txt:2202 f1dc893234d245e9830179a93f629dee msgid "**Changes in Version 1.14.4**" msgstr "" -#: ../../../changes.txt:2021 0f37e9c472d14cff8c05176bbeca6036 +#: ../../../changes.txt:2204 e420fa40704f4a8186c084fd1142a269 msgid "**Fixes** issue #239 \"Annotation coordinate consistency\"." msgstr "" -#: ../../../changes.txt:2026 4c5f51f4a77d4525b4079d3d5ec20604 +#: ../../../changes.txt:2209 72e6ad3f521a42b8bace87e106ee6ede msgid "**Changes in Version 1.14.3**" msgstr "" -#: ../../../changes.txt:2028 b489cc7ab8f34f6c82d2f7befe57bba9 +#: ../../../changes.txt:2211 991373ab5ac7471a838bc8249d4d5514 msgid "This patch version contains minor bug fixes and CJK font output support." msgstr "" -#: ../../../changes.txt:2030 b85ed09c2d9f42fbac809471bae50fdc +#: ../../../changes.txt:2213 f1c4a04f6dcf43eeb95899dfb02e27c9 msgid "" "**Added** support for the four CJK fonts as PyMuPDF generated text " "output. This pertains to methods :meth:`Page.insertFont`, " @@ -6110,35 +6635,35 @@ msgid "" "Chinese), \"japan\" (Japanese), and \"korea\" (Korean)." msgstr "" -#: ../../../changes.txt:2031 cb7b0aefa586494fa1190cfa304e23e5 +#: ../../../changes.txt:2214 73ef513029a141df8449b5146d0253fe msgid "**Added** full support for the built-in fonts 'Symbol' and 'Zapfdingbats'." msgstr "" -#: ../../../changes.txt:2032 9a04148bfd69475e863a5ae689110f0e +#: ../../../changes.txt:2215 76f60cd573e245f991db0d4cd24a974a msgid "" "**Changed:** The 14 standard fonts can now each be referenced by a " "4-letter abbreviation." msgstr "" -#: ../../../changes.txt:2036 91c1723c4b3c4ddab17d51a9b861e437 +#: ../../../changes.txt:2219 aa2af09fdf5042b4ba0a256c100e7b9b msgid "**Changes in Version 1.14.1**" msgstr "" -#: ../../../changes.txt:2038 85326a9bf2944c93a7ef6af1f7d01f0d +#: ../../../changes.txt:2221 b445b39bd77c4a67bd6f0167e0f9a803 msgid "This patch version contains minor performance improvements." msgstr "" -#: ../../../changes.txt:2040 867937c084924bca8e962e972061ded7 +#: ../../../changes.txt:2223 3b1145c0fba44f50840286c3e778fbd5 msgid "" "**Added** support for :ref:`Document` filenames given as *pathlib* object" " by using the Python *str()* function." msgstr "" -#: ../../../changes.txt:2045 1538ddd3aa4b45788af0e254b976f122 +#: ../../../changes.txt:2228 6af72592640445ada360fa165a69c74f msgid "**Changes in Version 1.14.0**" msgstr "" -#: ../../../changes.txt:2047 92e8097c5d214df78745f474cee43c50 +#: ../../../changes.txt:2230 b0a9f2e6d3084680b1d3d8709b899e46 msgid "" "To support MuPDF v1.14.0, massive changes were required in PyMuPDF -- " "most of them purely technical, with little visibility to developers. But " @@ -6146,19 +6671,19 @@ msgid "" "Following are the details:" msgstr "" -#: ../../../changes.txt:2049 8c52fe634acf4bdc92e67a3f88ec9d06 +#: ../../../changes.txt:2232 b8f5ef7656d84770b030771baf1d633e msgid "**Added** \"ink\" annotation." msgstr "" -#: ../../../changes.txt:2050 0fe757d8d6ef47a7959c21626d52d552 +#: ../../../changes.txt:2233 dc24c4b8f4b545d89982ba04c9c9fc54 msgid "**Added** \"rubber stamp\" annotation." msgstr "" -#: ../../../changes.txt:2051 61bff6b60bbf480fb6a328cb6ca0fb6f +#: ../../../changes.txt:2234 088c207ca84b4af885053800fc1c6abf msgid "**Added** \"squiggly\" text marker annotation." msgstr "" -#: ../../../changes.txt:2052 f3db29e6a1e847ec99b7f0c39b8b0b65 +#: ../../../changes.txt:2235 9ee51087241e47a9a885c4c50006ac45 msgid "" "**Added** new class :ref:`Quad` (quadrilateral or tetragon) -- which " "represents a general four-sided shape in the plane. The special subtype " @@ -6166,67 +6691,67 @@ msgid "" "and as returned objects in text search methods." msgstr "" -#: ../../../changes.txt:2053 486cee4ddc714d2a9bd13f4815e17265 +#: ../../../changes.txt:2236 82b93415181e4426b4fe3395a7da036b msgid "" "**Added** a new option \"decrypt\" to :meth:`Document.save` and " ":meth:`Document.write`. Now you can **keep encryption** when saving a " "password protected PDF." msgstr "" -#: ../../../changes.txt:2054 d29780516e044ac6ab901e6d8201db24 +#: ../../../changes.txt:2237 db071be165374c34a62b140f8d12defb msgid "" "**Added** suppression and redirection of unsolicited messages issued by " "the underlying C-library MuPDF. Consult :ref:`RedirectMessages` for " "details." msgstr "" -#: ../../../changes.txt:2055 a24fb0baacd74000913b14d16dfdecb4 +#: ../../../changes.txt:2238 d98596ed75d443fbb4b3117a82102898 msgid "" "**Changed:** Changes to annotations now **always require** " ":meth:`Annot.update` to become effective." msgstr "" -#: ../../../changes.txt:2056 7eb861ce36874d8ab13b7c3e6486fc34 +#: ../../../changes.txt:2239 c44c9272aa294fec800c9996f97c2a47 msgid "" "**Changed** free text annotations to support the full Latin character set" " and range of appearance options." msgstr "" -#: ../../../changes.txt:2057 945237f1cbc347e8a50446e1aa3c5eea +#: ../../../changes.txt:2240 aeb18ad0c68c4c259659020be5574a12 msgid "" "**Changed** text searching, :meth:`Page.searchFor`, to optionally return " ":ref:`Quad` instead :ref:`Rect` objects surrounding each search hit." msgstr "" -#: ../../../changes.txt:2058 de51241265274a72a1a5cb83e8d8cd31 +#: ../../../changes.txt:2241 0eae45181d5b44df80c66a945b388467 msgid "" "**Changed** plain text output: we now add a *\\n* to each line if it does" " not itself end with this character." msgstr "" -#: ../../../changes.txt:2059 d92c8a28141e4d7d9314cc590f8b281d +#: ../../../changes.txt:2242 89a4c15cea29455abdffa4509aa7c012 msgid "**Fixed** issue 211 (\"Something wrong in the doc\")." msgstr "" -#: ../../../changes.txt:2060 be398def6bef47c6a309bb8417d5145c +#: ../../../changes.txt:2243 24f3fb3bfb2741e8ac3dd74649331e57 msgid "" "**Fixed** issue 213 (\"Rewritten outline is displayed only by mupdf-based" " applications\")." msgstr "" -#: ../../../changes.txt:2061 50232a19a05644f48745ed453350ada5 +#: ../../../changes.txt:2244 946d6b5d44d6492c92f79cddf8724236 msgid "**Fixed** issue 214 (\"PDF decryption GONE!\")." msgstr "" -#: ../../../changes.txt:2062 4c49bdf18e1946e5be21a3550a9ba286 +#: ../../../changes.txt:2245 972d52791c01402891dcf5c8aa874517 msgid "**Fixed** issue 215 (\"Formatting of links added with pyMuPDF\")." msgstr "" -#: ../../../changes.txt:2063 85f6f4ce14c04bdd973aa4172a3a22bf +#: ../../../changes.txt:2246 ec35920e96a248b792b7359b83e0e806 msgid "**Fixed** issue 217 (\"extraction through json is failing for my pdf\")." msgstr "" -#: ../../../changes.txt:2065 e12667b4f56b4df294f19c970a9c0633 +#: ../../../changes.txt:2248 9d2784d5d5bb494b99f6009662588af4 msgid "" "Behind the curtain, we have changed the implementation of geometry " "objects: they now purely exist in Python and no longer have \"shadow\" " @@ -6234,7 +6759,7 @@ msgid "" "that area by more than a factor of two." msgstr "" -#: ../../../changes.txt:2067 b3bf99ac75a6413b83dd381be69ded2f +#: ../../../changes.txt:2250 ea4731de39514f5cacdbfe20993679c4 msgid "" "Because of the same reason, most methods involving geometry parameters " "now also accept the corresponding Python sequence. For example, in method" @@ -6242,23 +6767,23 @@ msgid "" ":data:`rect_like` sequence." msgstr "" -#: ../../../changes.txt:2069 09c1016b9bd541aa9853aca09d61f131 +#: ../../../changes.txt:2252 3e2d3f1fb7cb4cff97d5076e2c0789b1 msgid "" "We also invested considerable effort to further extend and improve the " ":ref:`FAQ` chapter." msgstr "" -#: ../../../changes.txt:2074 018256446e024ce2994716e658988496 +#: ../../../changes.txt:2257 04dc59fccc1f4cb08c810e3aa3ddd24f msgid "**Changes in Version 1.13.19**" msgstr "" -#: ../../../changes.txt:2076 48bd18f49ab649229fc5d2f993612637 +#: ../../../changes.txt:2259 ac830b2aba964a00af50503281c9ad40 msgid "" "This version contains some technical / performance improvements and bug " "fixes." msgstr "" -#: ../../../changes.txt:2078 b5824311fabc4cb481606959ed008614 +#: ../../../changes.txt:2261 d4e8a437b8634e2ebefb07b91b1ca5f3 #, python-format msgid "" "**Changed** memory management: for Python 3 builds, Python memory " @@ -6269,28 +6794,28 @@ msgid "" " (on Windows machines only to date)." msgstr "" -#: ../../../changes.txt:2079 437e31b212c0419097f460af8c474d18 +#: ../../../changes.txt:2262 66b6b824d6ff411aa7a516457cd7dfc1 msgid "" "**Fixed** an error occurring in Python 2.7, which crashed the interpreter" " when using :meth:`TextPage.extractRAWDICT` (= " "*Page.getText(\"rawdict\")*)." msgstr "" -#: ../../../changes.txt:2080 35c45f934b804b46a176a029dea5f311 +#: ../../../changes.txt:2263 dbbd352318fa4bdab10496e4c123fd45 msgid "" "**Fixed** an error occurring in Python 2.7, when creating link " "destinations." msgstr "" -#: ../../../changes.txt:2081 6b9303d29a1e421687cab7cd70365afd +#: ../../../changes.txt:2264 a539ed90455049c1a4fb83a3421f871b msgid "**Extended** the :ref:`FAQ` chapter with more examples." msgstr "" -#: ../../../changes.txt:2085 64ebabb75b314934a876d00424e21bd7 +#: ../../../changes.txt:2268 f7a59a8c7ef94dd897e7aaf8068e48cb msgid "**Changes in Version 1.13.18**" msgstr "" -#: ../../../changes.txt:2087 3435003edd604bc29976eb6a0baa8caa +#: ../../../changes.txt:2270 43bbf6e1968c4e85870a1a74cbb89f71 msgid "" "**Added** method :meth:`TextPage.extractRAWDICT`, and a corresponding new" " string parameter \"rawdict\" to method :meth:`Page.getText`. It extracts" @@ -6300,18 +6825,18 @@ msgid "" "single character." msgstr "" -#: ../../../changes.txt:2091 6528960f806041a98b450825c3e54511 +#: ../../../changes.txt:2274 550b7eeff5ce4f7a87b0f090fc851031 msgid "**Changes in Version 1.13.17**" msgstr "" -#: ../../../changes.txt:2093 98bfda8bd0d840e780ff4a53cc7e1170 +#: ../../../changes.txt:2276 0aae2b940513466da0740808136e1c25 msgid "" "**Fixed** an error that intermittently caused an exception in " ":meth:`Page.show_pdf_page`, when pages from many different source PDFs " "were shown." msgstr "" -#: ../../../changes.txt:2094 f6fda8d3e0394c69a77841bc80fec09a +#: ../../../changes.txt:2277 8eb6e43d098c4499ae042f34979ce16a msgid "" "**Changed** method :meth:`Document.extractImage` to now return more meta " "information about the extracted imgage. Also, its performance has been " @@ -6319,57 +6844,58 @@ msgid "" "this method." msgstr "" -#: ../../../changes.txt:2095 cdd6013beed14094a1095bee6ea4f49d +#: ../../../changes.txt:2278 b4dd712416a74448a2beceebcc6588d4 msgid "" -"**Changed** method :meth:`Document._getXrefStream` to now return *None* " -"if the object is no stream and no longer raise an exception if otherwise." +"**Changed** method :meth:`Document._getXrefStream` to now return ``None``" +" if the object is no stream and no longer raise an exception if " +"otherwise." msgstr "" -#: ../../../changes.txt:2096 95ce466670cc403dbd63b8136aaccc66 +#: ../../../changes.txt:2279 793d97c12403403b93395d171befee80 msgid "" "**Added** method :meth:`Document._deleteObject` which deletes a PDF " "object identified by its :data:`xref`. Only to be used by the experienced" " PDF expert." msgstr "" -#: ../../../changes.txt:2097 0926186f48d540bbb4d43695418e30c3 +#: ../../../changes.txt:2280 ef87bb386e9d416dacabbace0deeb487 msgid "" "**Added** a method :meth:`paper_rect` which returns a :ref:`Rect` for a " "supplied paper format string. Example: *fitz.paper_rect(\"letter\") = " "fitz.Rect(0.0, 0.0, 612.0, 792.0)*." msgstr "" -#: ../../../changes.txt:2098 e5358530e2994a5b925d9af952f2cab4 +#: ../../../changes.txt:2281 84216f6fce5c4e17b9b6b285d8ce3ca7 msgid "**Added** a :ref:`FAQ` chapter to this document." msgstr "" -#: ../../../changes.txt:2102 75c28bdf71e54ec197ef00518a8394db +#: ../../../changes.txt:2285 dcb3ebafdc1c4b969e427c36de3d6f5b msgid "**Changes in Version 1.13.16**" msgstr "" -#: ../../../changes.txt:2104 a00cc779dce243a694199948ab3e4adf +#: ../../../changes.txt:2287 0404f4f99ccc47bfb344cc3c765aa9fd msgid "" "**Added** support for correctly setting transparency (opacity) for " "certain annotation types." msgstr "" -#: ../../../changes.txt:2105 f4d83855e066469991c9be2a03ee03fc +#: ../../../changes.txt:2288 fa36c556f0ab43b5aa6974b0b480b1f2 msgid "" "**Added** a tool property (:attr:`Tools.fitz_config`) showing the " "configuration of this PyMuPDF version." msgstr "" -#: ../../../changes.txt:2106 36332d2def6145afb3f67e21de54ead4 +#: ../../../changes.txt:2289 37008e7403de4fba890a2d19d5bd0c3b msgid "" "**Fixed** issue #193 ('insertText(overlay=False) gives \"cannot resize a " "buffer with shared storage\" error') by avoiding read-only buffers." msgstr "" -#: ../../../changes.txt:2110 9e17f2dd37c849f8afa62f64bd3bbb33 +#: ../../../changes.txt:2293 cd6f672a6bd9458f9aa9e92509de85b7 msgid "**Changes in Version 1.13.15**" msgstr "" -#: ../../../changes.txt:2112 45122602edfd4fb4b41e92e17b6787fe +#: ../../../changes.txt:2295 316a3c060926436ab657de6a4b5b7204 msgid "" "**Fixed** issue #189 (\"cannot find builtin CJK font\"), so we are " "supporting builtin CJK fonts now (CJK = China, Japan, Korea). This should" @@ -6378,39 +6904,39 @@ msgid "" " between 8 and 10 MB, depending on the OS." msgstr "" -#: ../../../changes.txt:2113 e7bed0bfdaaf41d7a53ced3ba277f954 +#: ../../../changes.txt:2296 7d9dc52bf7494845b113b4b655b1570a msgid "" "**Fixed** issue #191 (\"Jupyter notebook kernel dies after ca. 40 " "pages\"), which occurred when modifying the contents of an annotation." msgstr "" -#: ../../../changes.txt:2117 ac025c5e6f27468282c778df531a0840 +#: ../../../changes.txt:2300 d874cbbdb7ff40659df936702f7f04c2 msgid "**Changes in Version 1.13.14**" msgstr "" -#: ../../../changes.txt:2119 897215101a8841bf96b45fe4d3680872 +#: ../../../changes.txt:2302 a4459868b07e4a85a30a28ce5a45cc14 msgid "This patch version contains several improvements, mainly for annotations." msgstr "" -#: ../../../changes.txt:2121 8376e49409f14d34b3c4872f8a7cdfa0 +#: ../../../changes.txt:2304 fb74830b41da4ccea9eee9c618becaac msgid "" "**Changed** :attr:`Annot.lineEnds` is now a list of two integers " "representing the line end symbols. Previously was a *dict* of strings." msgstr "" -#: ../../../changes.txt:2122 c52667de60784abcbe0ee23339fbfefd +#: ../../../changes.txt:2305 0f2491593bd142b6abbc471b7999f395 msgid "" "**Added** support of line end symbols for applicable annotations. PyMuPDF" " now can generate these annotations including the line end symbols." msgstr "" -#: ../../../changes.txt:2123 c5ef3b7c1fbb4e39bf4c76976932fc42 +#: ../../../changes.txt:2306 e184151c6e4a4e5e806c9c0b3c4927ef msgid "" "**Added** :meth:`Annot.setLineEnds` adds line end symbols to applicable " "annotation types ('Line', 'PolyLine', 'Polygon')." msgstr "" -#: ../../../changes.txt:2124 7d218d6d0ea6422db0abaef8d0018c94 +#: ../../../changes.txt:2307 2fcf671317634df984317a62c5835924 msgid "" "**Changed** technical implementation of :meth:`Page.insertImage` and " ":meth:`Page.show_pdf_page`: they now create there own contents objects, " @@ -6419,17 +6945,17 @@ msgid "" "incremental updates." msgstr "" -#: ../../../changes.txt:2128 0186f83ad55e4bc4aa9be3a81a7800b2 +#: ../../../changes.txt:2311 a0286875157d46249f9bb3108b95ce75 msgid "**Changes in Version 1.13.13**" msgstr "" -#: ../../../changes.txt:2130 13210d202d7c4a21a844b5070d21cd40 +#: ../../../changes.txt:2313 4833f89ddc274e9e849c017c5f1875bc msgid "" "This patch version contains several improvements for embedded files and " "file attachment annotations." msgstr "" -#: ../../../changes.txt:2132 19e0b7af4b504404bc1aca3e5e0c25cf +#: ../../../changes.txt:2315 076f1140d17f43b18fa6eed621773df3 msgid "" "**Added** :meth:`Document.embfile_Upd` which allows changing **file " "content and metadata** of an embedded file. It supersedes the old method " @@ -6438,33 +6964,33 @@ msgid "" "unicode." msgstr "" -#: ../../../changes.txt:2133 e0d1cb48a72b4916bcec2576db7929f2 +#: ../../../changes.txt:2316 b4d0ad5ed9554ceda18aed73d3d04ab6 msgid "" "**Changed** :meth:`Document.embfile_Add` to now automatically compress " "file content. Accompanying metadata can now be unicode (had to be ASCII " "in the past)." msgstr "" -#: ../../../changes.txt:2134 5a5c83abcc3b4a02b2095d6a8ef4c509 +#: ../../../changes.txt:2317 158d0b3898064454a33abac94aac2f19 msgid "" "**Changed** :meth:`Document.embfile_Del` to now automatically delete " "**all entries** having the supplied identifying name. The return code is " -"now an integer count of the removed entries (was *None* previously)." +"now an integer count of the removed entries (was ``None`` previously)." msgstr "" -#: ../../../changes.txt:2135 355a26af349249f4a9bffb30be85884d +#: ../../../changes.txt:2318 3a95121e687b445d9fe8686b06fec070 msgid "" "**Changed** embedded file methods to now also accept or show the PDF " "unicode filename as additional parameter *ufilename*." msgstr "" -#: ../../../changes.txt:2136 6906dc222d9f4a4bac6be5680c34213e +#: ../../../changes.txt:2319 fdb4309dc07f4fb4a1d07f5da90aba8a msgid "" "**Added** :meth:`Page.add_file_annot` which adds a new file attachment " "annotation." msgstr "" -#: ../../../changes.txt:2137 8ec18292b93a4486b6efe84df0602e03 +#: ../../../changes.txt:2320 831e22f310f84fcea93160f4434afc33 msgid "" "**Changed** :meth:`Annot.fileUpd` (file attachment annot) to now also " "accept the PDF unicode *ufilename* parameter. The description parameter " @@ -6473,19 +6999,19 @@ msgid "" "content." msgstr "" -#: ../../../changes.txt:2138 589156f80fed4ef1a4d4576be36ed42d +#: ../../../changes.txt:2321 dcae1cfbe1f943179f312c444c9fd1d0 msgid "" "**Changed** :meth:`Annot.fileInfo` (file attachment annot) to now also " "show the PDF unicode filename as parameter *ufilename*." msgstr "" -#: ../../../changes.txt:2139 0b461dbe6ec944d2a08fe5427b10cda9 +#: ../../../changes.txt:2322 a5cb289e23b949048d4ed3d4937ef181 msgid "" "**Fixed** issue #180 (\"page.getText(output='dict') return invalid " "bbox\") to now also work for vertical text." msgstr "" -#: ../../../changes.txt:2140 7b89426bfe4640129032a978f6be33cf +#: ../../../changes.txt:2323 546f1a5c95ef4d538df52b7648d3b364 msgid "" "**Fixed** issue #185 (\"Can't render the annotations created by " "PyMuPDF\"). The issue's cause was the minimalistic MuPDF approach when " @@ -6497,11 +7023,11 @@ msgid "" " end styles." msgstr "" -#: ../../../changes.txt:2144 c84daf15e9ed4246b2f59e168ab8f3ce +#: ../../../changes.txt:2327 5bc5acd39391430e8507d2fe02b64686 msgid "**Changes in Version 1.13.12**" msgstr "" -#: ../../../changes.txt:2146 1240d1b3afe44e18a0814b97dd9dff5d +#: ../../../changes.txt:2329 e50fc34357eb4bdd92d1a2c52c118d8f msgid "" "**Fixed** issue #180 (\"page.getText(output='dict') return invalid " "bbox\"). Note that this is a circumvention of an MuPDF error, which " @@ -6509,13 +7035,13 @@ msgid "" "happens, this fix ensures a bbox height of at least fontsize." msgstr "" -#: ../../../changes.txt:2147 4efec45590474067998902e7d9194fb7 +#: ../../../changes.txt:2330 8ea6cf5d670244559e3f3e7ba10c7b0c msgid "" "**Changed** for ListBox and ComboBox widgets, the attribute list of " "selectable values has been renamed to :attr:`Widget.choice_values`." msgstr "" -#: ../../../changes.txt:2148 95b9018d06674223a7b6b2cab78f9120 +#: ../../../changes.txt:2331 780189986d414a6a9f66d2c3d0e05803 msgid "" "**Changed** when adding widgets, any missing of the :ref:`Base-14-Fonts` " "is automatically added to the PDF. Widget text fonts can now also be " @@ -6523,23 +7049,23 @@ msgid "" "honored and lead to a field with a preset value." msgstr "" -#: ../../../changes.txt:2149 5eb55555cca64cbf9b81429f76b7c2d7 +#: ../../../changes.txt:2332 75697589207f4648866d8377fbc97421 msgid "" "**Added** :meth:`Annot.updateWidget` which allows changing existing form " "fields -- including the field value." msgstr "" -#: ../../../changes.txt:2153 8db44a5ee7d44af29324e4298ae867b0 +#: ../../../changes.txt:2336 a1b51790ace74e5abd3390c43ce546f9 msgid "**Changes in Version 1.13.11**" msgstr "" -#: ../../../changes.txt:2155 27ca9192ac894436975f1fb9e05210da +#: ../../../changes.txt:2338 a4cacb4e59354d3bac560dd65aa0fa34 msgid "" "While the preceeding patch subversions only contained various fixes, this" " version again introduces major new features:" msgstr "" -#: ../../../changes.txt:2157 d481e0e6c5c3452a9429bd4b3da3bb20 +#: ../../../changes.txt:2340 42f2139dcdd441898f1d13176501b1a8 msgid "" "**Added** basic support for PDF widget annotations. You can now add PDF " "form fields of types Text, CheckBox, ListBox and ComboBox. Where " @@ -6547,18 +7073,18 @@ msgid "" "widget." msgstr "" -#: ../../../changes.txt:2158 e52feff905c4460ebccd58356053dc3f +#: ../../../changes.txt:2341 72a98d2ee0394cd3a2ea9f7ade45fdde msgid "" "**Fixed** issues #176 (\"wrong file embedding\"), #177 (\"segment fault " "when invoking page.getText()\")and #179 (\"Segmentation fault using " "page.getLinks() on encrypted PDF\")." msgstr "" -#: ../../../changes.txt:2163 e98d895e381f4c52bad37f638f876ca3 +#: ../../../changes.txt:2346 b2db781fbac94fce9568b767814a017e msgid "**Changes in Version 1.13.7**" msgstr "" -#: ../../../changes.txt:2165 8fa947d582684891bcb9ac82e8724d84 +#: ../../../changes.txt:2348 07e1086fd4224f2782b0f9aba9227446 msgid "" "**Added** support of variable page sizes for reflowable documents " "(e-books, HTML, etc.): new parameters *rect* and *fontsize* in " @@ -6566,107 +7092,107 @@ msgid "" ":meth:`Document.layout`." msgstr "" -#: ../../../changes.txt:2166 37ff2031563843e4a22e12902d361ad6 +#: ../../../changes.txt:2349 4fe572e6632949ec8bf12d0193680640 msgid "" "**Added** :ref:`Annot` creation of many annotations types: sticky notes, " "free text, circle, rectangle, line, polygon, polyline and text markers." msgstr "" -#: ../../../changes.txt:2167 9d705ff1a24042548d08501db25234a3 +#: ../../../changes.txt:2350 d4ceb9bbde2b46fa98dc5df623827a25 msgid "" "**Added** support of annotation transparency (:attr:`Annot.opacity`, " ":meth:`Annot.setOpacity`)." msgstr "" -#: ../../../changes.txt:2168 a249d7e18af0473abab53b07d3db3445 +#: ../../../changes.txt:2351 c4461424a48a4ceb80c674b3e52bd4e9 msgid "" "**Changed** :attr:`Annot.vertices`: point coordinates are now grouped as " "pairs of floats (no longer as separate floats)." msgstr "" -#: ../../../changes.txt:2169 947670fb48f74466845857a767f6d84a +#: ../../../changes.txt:2352 4274f5155af843c4b5df0186ad8c1a88 msgid "" "**Changed** annotation colors dictionary: the two keys are now named " "*\"stroke\"* (formerly *\"common\"*) and *\"fill\"*." msgstr "" -#: ../../../changes.txt:2170 142f04c6f0f04253980bd752c29c6516 +#: ../../../changes.txt:2353 b9c6b2b2fe4a4de29a361a128a74ca35 msgid "" -"**Added** :attr:`Document.isDirty` which is *True* if a PDF has been " -"changed in this session. Reset to *False* on each :meth:`Document.save` " -"or :meth:`Document.write`." +"**Added** :attr:`Document.isDirty` which is ``True`` if a PDF has been " +"changed in this session. Reset to ``False`` on each :meth:`Document.save`" +" or :meth:`Document.write`." msgstr "" -#: ../../../changes.txt:2174 4d011f7b9fca45e68f11d94e9e20d6d9 +#: ../../../changes.txt:2357 587eee0c54da419abaf95aa36b3786f9 msgid "**Changes in Version 1.13.6**" msgstr "" -#: ../../../changes.txt:2176 0d2ef2a8b6e5443ba5b9ed1d158b7c45 +#: ../../../changes.txt:2359 7630c3d98438465fa2ac21f7de572a2d msgid "" "Fix #173: for memory-resident documents, ensure the stream object will " "not be garbage-collected by Python before document is closed." msgstr "" -#: ../../../changes.txt:2180 d2bfdad9fd4846e2b8af248cc34ceb3d +#: ../../../changes.txt:2363 a3e3d3dceb794bf5827f9fe31fdf1bae msgid "**Changes in Version 1.13.5**" msgstr "" -#: ../../../changes.txt:2182 effdeb85ecda48148904bcb619f3a02e +#: ../../../changes.txt:2365 2b8ae3453e1e4169b25f4de75e80145b msgid "" "New low-level method :meth:`Page._setContents` defines an object given by" " its :data:`xref` to serve as the :data:`contents` object." msgstr "" -#: ../../../changes.txt:2183 fad57a90e6214b96abac28e00811e702 +#: ../../../changes.txt:2366 b9cb68e98a444f29b95cf50c4b846b89 msgid "" "Changed and extended PDF form field support: the attribute *widget_text* " "has been renamed to :attr:`Annot.widget_value`. Values of all form field " "types (except signatures) are now supported. A new attribute " ":attr:`Annot.widget_choices` contains the selectable values of listboxes " -"and comboboxes. All these attributes now contain *None* if no value is " +"and comboboxes. All these attributes now contain ``None`` if no value is " "present." msgstr "" -#: ../../../changes.txt:2187 f2dd65ed9c3f477491ed575094bae51e +#: ../../../changes.txt:2370 4d6cf91c2cab4adeb182b503663811d7 msgid "**Changes in Version 1.13.4**" msgstr "" -#: ../../../changes.txt:2189 03ba144d2e534ec2a58dfa53b6b036c0 +#: ../../../changes.txt:2372 c530d2c8ae88418aab6b9f79a27ada89 msgid "" ":meth:`Document.convertToPDF` now supports page ranges, reverted page " "sequences and page rotation. If the document already is a PDF, an " "exception is raised." msgstr "" -#: ../../../changes.txt:2190 b73b82ee1cae4509bb85228c73ce2e44 +#: ../../../changes.txt:2373 3c04284022fd4ac7a6e7a1acd8b93f41 msgid "" "Fixed a bug (introduced with v1.13.0) that prevented " ":meth:`Page.insertImage` for transparent images." msgstr "" -#: ../../../changes.txt:2194 37f4c0ae02214c5bb697399f91db7039 +#: ../../../changes.txt:2377 21bd2382d72444caacf5ff2daa4ed26e msgid "**Changes in Version 1.13.3**" msgstr "" -#: ../../../changes.txt:2196 7f8ad1c0a09f4ee29262e1dc883359a8 +#: ../../../changes.txt:2379 bc3c8bf546984d6b837e58506e06ae2a msgid "" "Introduces a way to convert **any MuPDF supported document** to a PDF. If" " you ever wanted PDF versions of your XPS, EPUB, CBZ or FB2 files -- here" " is a way to do this." msgstr "" -#: ../../../changes.txt:2198 491f4e8a49154a04a470f5794a4b77fe +#: ../../../changes.txt:2381 af0f82b656ec4a05af65e1426e6dd1c8 msgid "" ":meth:`Document.convertToPDF` returns a Python *bytes* object in PDF " "format. Can be opened like normal in PyMuPDF, or be written to disk with " "the *\".pdf\"* extension." msgstr "" -#: ../../../changes.txt:2202 763c6ea23bb34f9a92517829c466633e +#: ../../../changes.txt:2385 585c752c6c56413a92faaa286cd0aecf msgid "**Changes in Version 1.13.2**" msgstr "" -#: ../../../changes.txt:2204 5a2a691c2e664b9c9c3a31b5b21f2e42 +#: ../../../changes.txt:2387 74a8e2c87f8b4eb09bfe07e9ebabc8b4 msgid "" "The major enhancement is PDF form field support. Form fields are " "annotations of type *(19, 'Widget')*. There is a new document method to " @@ -6674,24 +7200,24 @@ msgid "" "describing field details." msgstr "" -#: ../../../changes.txt:2206 c2400832604146b497c26863dd2db4a1 +#: ../../../changes.txt:2389 8201f05c61da41b9b38389a76b118d1d msgid "" ":attr:`Document.is_form_pdf` is true if object type */AcroForm* and at " "least one form field exists." msgstr "" -#: ../../../changes.txt:2207 faf5df0a4e454401a44b7c79a28a0479 +#: ../../../changes.txt:2390 605228181363474ea1907637ee7efffa msgid "" ":attr:`Annot.widget_type`, :attr:`Annot.widget_text` and " ":attr:`Annot.widget_name` contain the details of a form field (i.e. a " "\"Widget\" annotation)." msgstr "" -#: ../../../changes.txt:2211 f476850fb3bd4ce79a79e94b4a7f5919 +#: ../../../changes.txt:2394 43c08ba9202844e381f8695f5869c0d1 msgid "**Changes in Version 1.13.1**" msgstr "" -#: ../../../changes.txt:2213 048cd16cdf224440abc59c0dd65feee8 +#: ../../../changes.txt:2396 c17a528c4acf47d9a22f7bab42a4f49d msgid "" ":meth:`TextPage.extractDICT` is a new method to extract the contents of a" " document page (text and images). All document types are supported as " @@ -6705,35 +7231,35 @@ msgid "" "original **binary format** -- they need not be base64-decoded." msgstr "" -#: ../../../changes.txt:2214 4750bfde953140e998621eb43121a504 +#: ../../../changes.txt:2397 fc905731743f43948a641768f4657450 msgid "" ":meth:`Page.getText` correspondingly supports the new parameter value " "*\"dict\"* to invoke the above method." msgstr "" -#: ../../../changes.txt:2215 a43fe244198d4715a29c8d91960dae4d +#: ../../../changes.txt:2398 11f441a8459a441594dbb2b5319f862c msgid "" ":meth:`TextPage.extractJSON` (resp. *Page.getText(\"json\")*) is still " "supported for convenience, but its use is expected to decline." msgstr "" -#: ../../../changes.txt:2219 f99cd6ea1f824f89bacb0035e57bcdcb +#: ../../../changes.txt:2402 cb61eefa292c4d10bd084337eda8c38a msgid "**Changes in Version 1.13.0**" msgstr "" -#: ../../../changes.txt:2221 67b2ef00fa254ecf9c50df8e4b0eb09f +#: ../../../changes.txt:2404 3484ec3852674cb991bd7e63f53ddeda msgid "" "This version is based on MuPDF v1.13.0. This release is \"primarily a bug" " fix release\"." msgstr "" -#: ../../../changes.txt:2223 b5a630ed976349ddbc85810db5e31c6c +#: ../../../changes.txt:2406 5905b20f41b3436baa07f1d61121cf37 msgid "" "In PyMuPDF, we are also doing some bug fixes while introducing minor " "enhancements. There only very minimal changes to the user's API." msgstr "" -#: ../../../changes.txt:2225 b2b739d3f457486395f347afa1f5b2b2 +#: ../../../changes.txt:2408 21683ebfff7446fb868d3fdf766b60f6 msgid "" ":ref:`Document` construction is more flexible: the new *filetype* " "parameter allows setting the document type. If specified, any extension " @@ -6742,22 +7268,22 @@ msgid "" "documentation has been reworked." msgstr "" -#: ../../../changes.txt:2229 86a10b3f44ea4861bb45b1c8dcb7c055 +#: ../../../changes.txt:2412 0a223b29ef9a491892bee74025cc8dc0 msgid "Changes to :ref:`Pixmap` constructors:" msgstr "" -#: ../../../changes.txt:2228 6bae0da1bbd74583a5e25fb50bb8947f +#: ../../../changes.txt:2411 26d2f125201f46e2871d3373d24c7c2d msgid "" "Colorspace conversion no longer allows dropping the alpha channel: source" " and target **alpha will now always be the same**. We have seen " "exceptions and even interpreter crashes when using *alpha = 0*." msgstr "" -#: ../../../changes.txt:2229 29a377ade07845989d5ad43332b4fc60 +#: ../../../changes.txt:2412 a0a9760c471644a2bcdaa217255354b1 msgid "As a replacement, the simple pixmap copy lets you choose the target alpha." msgstr "" -#: ../../../changes.txt:2231 571397362f1548db8f5a2b4ea0f5a151 +#: ../../../changes.txt:2414 1db34238940441e2bcf3df96bd2c6c24 msgid "" ":meth:`Document.save` again offers the full garbage collection range 0 " "thru 4. Because of a bug in :data:`xref` maintenance, we had to " @@ -6765,33 +7291,33 @@ msgid "" "`_." msgstr "" -#: ../../../changes.txt:2233 f16d94c9986e45cbae644df2c1e2418a +#: ../../../changes.txt:2416 7150cb564a9c4319902b18edae926f61 msgid "" ":meth:`Document.save` now offers to \"prettify\" PDF source via an " "additional argument." msgstr "" -#: ../../../changes.txt:2234 32dda245ec2f45218923a823159ed3a8 +#: ../../../changes.txt:2417 07d4829283b74797837f2d5f11782d43 msgid "" ":meth:`Page.insertImage` has the additional *stream* \\-parameter, " "specifying a memory area holding an image." msgstr "" -#: ../../../changes.txt:2236 9929df14d3eb4f45abe4d8fae40251c6 +#: ../../../changes.txt:2419 f15b5c730fba4aa2bc6f76700fd8b7d2 msgid "" "Issue with garbled PNGs on Linux systems has been resolved (`\"Problem " "writing PNG\" #133) `_." msgstr "" -#: ../../../changes.txt:2241 08cbaa20102d4e0b8450290336437348 +#: ../../../changes.txt:2424 cc8fc0779a8642d4ba85dc4bd4643b78 msgid "**Changes in Version 1.12.4**" msgstr "" -#: ../../../changes.txt:2243 5fb7e77f10a24be5a76b40bcbac3bb52 +#: ../../../changes.txt:2426 9781c9f86ccd46df8a11c97071c8e53f msgid "This is an extension of 1.12.3." msgstr "" -#: ../../../changes.txt:2245 715dc8192f574998902b803bf47e16f9 +#: ../../../changes.txt:2428 bfe55e79b5054c5eb3881d0869cf1236 msgid "" "Fix of `issue #147 `_: " "methods :meth:`Document.getPageFontlist` and " @@ -6799,7 +7325,7 @@ msgid "" "contained in :data:`resources` nested via \"Form XObjects\"." msgstr "" -#: ../../../changes.txt:2246 16cc88cd6cab4e6cb5b08a166c0bb51d +#: ../../../changes.txt:2429 c4eab138d6734344a7bed77512b23a10 msgid "" "Temporary fix of `issue #148 " "`_: Saving to new PDF " @@ -6808,77 +7334,77 @@ msgid "" "will remove this circumvention." msgstr "" -#: ../../../changes.txt:2247 4fc0e7931ed347958c6b350cee37ea77 +#: ../../../changes.txt:2430 cbbd705645ed41d3a51592564e68d3c2 msgid "" "Preventive fix of illegally using stencil / image mask pixmaps in some " "methods." msgstr "" -#: ../../../changes.txt:2248 9afe6acd566148edbd449a1b75cbb0d8 +#: ../../../changes.txt:2431 186d7bac6ae54348b445f7891263fca6 msgid "" "Method :meth:`Document.getPageFontlist` now includes the encoding name " "for each font in the list." msgstr "" -#: ../../../changes.txt:2249 1fd9c4248bb14d35b46621760b0499f6 +#: ../../../changes.txt:2432 0aaf9f75b8264c99881cf89a9ad29f43 msgid "" "Method :meth:`Document.getPageImagelist` now includes the decode method " "name for each image in the list." msgstr "" -#: ../../../changes.txt:2253 e9d1160ab76c497197b2bc903e60cac5 +#: ../../../changes.txt:2436 ef66b620ed484120874575679c4f5817 msgid "**Changes in Version 1.12.3**" msgstr "" -#: ../../../changes.txt:2255 723304346bf64faeb21634278576c123 +#: ../../../changes.txt:2438 1896f885d6c548939d8c638fac1ac455 msgid "This is an extension of 1.12.2." msgstr "" -#: ../../../changes.txt:2257 67c3392ac3b442b883d8ba634255f1f5 +#: ../../../changes.txt:2440 6d0eaef14cb84c06bb422e66fceea719 msgid "" -"Many functions now return *None* instead of *0*, if the result has no " +"Many functions now return ``None`` instead of *0*, if the result has no " "other meaning than just indicating successful execution " "(:meth:`Document.close`, :meth:`Document.save`, :meth:`Document.select`, " ":meth:`Pixmap.save` and many others)." msgstr "" -#: ../../../changes.txt:2261 b54c6dc63bc94375b2cb7eba7b680086 +#: ../../../changes.txt:2444 d99b5cfb9c664823b992dd7076b0299f msgid "**Changes in Version 1.12.2**" msgstr "" -#: ../../../changes.txt:2263 b7db98a666e14146a6f1605e7ff53fce +#: ../../../changes.txt:2446 86f952c5348148efb4c098ab52be0c38 msgid "This is an extension of 1.12.1." msgstr "" -#: ../../../changes.txt:2265 a40b77fd7a9d418bb1e182e64803f273 +#: ../../../changes.txt:2448 b87afbe85cd348b28a7252a5af6d2b42 msgid "" "Method :meth:`Page.show_pdf_page` now accepts the new *clip* argument. " "This specifies an area of the source page to which the display should be " "restricted." msgstr "" -#: ../../../changes.txt:2267 ae971d31a1ed4ed8aacaeed93690c0b5 +#: ../../../changes.txt:2450 5340966b63d4493782e410edcd088234 msgid "" "New :attr:`Page.CropBox` and :attr:`Page.MediaBox` have been included for" " convenience." msgstr "" -#: ../../../changes.txt:2272 a307d666ee9c4895a69cf103ab604261 +#: ../../../changes.txt:2455 4b31fc60a15e42e7b7de95b0858ddb3d msgid "**Changes in Version 1.12.1**" msgstr "" -#: ../../../changes.txt:2274 3a6e5cd0e73b4076a6995a0273e23eaa +#: ../../../changes.txt:2457 24fdd844d5ed4490b5ecfc723d6be137 msgid "This is an extension of version 1.12.0." msgstr "" -#: ../../../changes.txt:2276 1a844445aa594508953f14fcbdec52ae +#: ../../../changes.txt:2459 a1b26c6d81944f33a89ba1f736b09015 msgid "" "New method :meth:`Page.show_pdf_page` displays another's PDF page. This " "is a **vector** image and therefore remains precise across zooming. Both " "involved documents must be PDF." msgstr "" -#: ../../../changes.txt:2278 b3c6fad5ac554428899e5a56e2e431ef +#: ../../../changes.txt:2461 0c38f0be178b4788974741252fed5612 msgid "" "New method :meth:`Page.getSVGimage` creates an SVG image from the page. " "In contrast to the raster image of a pixmap, this is a vector image " @@ -6886,7 +7412,7 @@ msgid "" "*.svg* file." msgstr "" -#: ../../../changes.txt:2280 85bd390f87ee455f85d33b40f1adb807 +#: ../../../changes.txt:2463 111f56b16f954371b924cbfc90c6dfb2 msgid "" "Method :meth:`Page.getTextBlocks` now accepts an additional bool " "parameter \"images\". If set to true (default is false), image blocks " @@ -6894,18 +7420,18 @@ msgid "" "detecting areas with rendered images." msgstr "" -#: ../../../changes.txt:2282 88fca74b7a04433d99c6fba509278f1b +#: ../../../changes.txt:2465 92b482e4cf134723943122871ada66c2 msgid "Minor bug fixes." msgstr "" -#: ../../../changes.txt:2284 3db64e96ab144b41b3effade07a38a79 +#: ../../../changes.txt:2467 1b1d537477854a9599a2a769bc05ba3a msgid "" "\"text\" result of :meth:`Page.getText` concatenates all lines within a " "block using a single space character. MuPDF's original uses \"\\\\n\" " "instead, producing a rather ragged output." msgstr "" -#: ../../../changes.txt:2286 4656093e78034a77b4a1955026583c38 +#: ../../../changes.txt:2469 7c54bc39f79b4cb1aed6b2f722e28eaf msgid "" "New properties of :ref:`Page` objects :attr:`Page.MediaBoxSize` and " ":attr:`Page.CropBoxPosition` provide more information about a page's " @@ -6915,18 +7441,18 @@ msgid "" "them to correctly position its items." msgstr "" -#: ../../../changes.txt:2290 b353b3ccfa6b40c0af6337399a11e962 +#: ../../../changes.txt:2473 3d6a9151396640b1bd9d151bc7b5b41b msgid "**Changes in Version 1.12.0**" msgstr "" -#: ../../../changes.txt:2292 d0aa5ebc58354271b16ba3f36ee86c64 +#: ../../../changes.txt:2475 c6c7d1a9e63046158d23f86083949ae0 msgid "" "This version is based on and requires MuPDF v1.12.0. The new MuPDF " "version contains quite a number of changes -- most of them around text " "extraction. Some of the changes impact the programmer's API." msgstr "" -#: ../../../changes.txt:2294 7b370d43844040329bf200f23dd98a2d +#: ../../../changes.txt:2477 94500a94302a432a91cdb0a323d3d9d2 msgid "" ":meth:`Outline.saveText` and :meth:`Outline.saveXML` have been deleted " "without replacement. You probably haven't used them much anyway. But if " @@ -6934,11 +7460,11 @@ msgid "" " can easily be used to produce something equivalent." msgstr "" -#: ../../../changes.txt:2296 0c9e527ae59c4f6e8a04329d019d7748 +#: ../../../changes.txt:2479 71d854025faf423d98dea6297385f8d8 msgid "Class *TextSheet* does no longer exist." msgstr "" -#: ../../../changes.txt:2298 790c45fc3bb9469792b2685a516634fa +#: ../../../changes.txt:2481 f55954801979410dbc03c43a2b504234 msgid "" "Text \"spans\" (one of the hierarchy levels of :ref:`TextPage`) no longer" " contain positioning information (i.e. no \"bbox\" key). Instead, spans " @@ -6946,21 +7472,21 @@ msgid "" "output variant." msgstr "" -#: ../../../changes.txt:2300 b37f95d1c3fd48d8a765f358069602e5 +#: ../../../changes.txt:2483 172a43be11f04ae4a73aa78b3386513c msgid "" "HTML output has improved very much: it now creates valid documents which " "can be displayed by browsers to produce a similar view as the original " "document." msgstr "" -#: ../../../changes.txt:2302 0658142b41ec4aca89b5305d6647742c +#: ../../../changes.txt:2485 fa92d836768e4d5981bd27101b1864a0 msgid "" "There is a new output format XHTML, which provides text and images in a " "browser-readable format. The difference to HTML output is, that no effort" " is made to reproduce the original layout." msgstr "" -#: ../../../changes.txt:2304 445903df391f42e9a283a734dd438472 +#: ../../../changes.txt:2487 7c6662c121e84549abb98ed38a0ca9ac msgid "" "All output formats of :meth:`Page.getText` now support creating complete," " valid documents, by wrapping them with appropriate header and trailer " @@ -6968,7 +7494,7 @@ msgid "" "sure to read :ref:`HTMLQuality`." msgstr "" -#: ../../../changes.txt:2306 0eac76c4478b49b6ad6d0506f8370da2 +#: ../../../changes.txt:2489 926774a89ac74674a7fa858d989bc1a9 msgid "" "To support finding text positions, we have added special methods that " "don't need detours like :meth:`TextPage.extractJSON` or " @@ -6979,27 +7505,27 @@ msgid "" "additional packages for interpreting their output." msgstr "" -#: ../../../changes.txt:2311 6aabf47253504d57b27c7f4e23a1d6a3 +#: ../../../changes.txt:2494 df0286dbaf204c268372f6ad5af5380c msgid "**Changes in Version 1.11.2**" msgstr "" -#: ../../../changes.txt:2313 4ed7039c2a924b99b5b2304d34720c82 +#: ../../../changes.txt:2496 0a552555ced74faaac228b9fe50dafb6 msgid "This is an extension of v1.11.1." msgstr "" -#: ../../../changes.txt:2315 09816ef25e8f4c6d9b9e38a36ddf0aab +#: ../../../changes.txt:2498 75bbf382a21041899e41482491192e27 msgid "" "New :meth:`Page.insertFont` creates a PDF */Font* object and returns its " "object number." msgstr "" -#: ../../../changes.txt:2317 910cfdf5496945adab9ba9596fd2e37e +#: ../../../changes.txt:2500 2c5953555ce344018ad92ff2697776eb msgid "" "New :meth:`Document.extractFont` extracts the content of an embedded font" " given its object number." msgstr "" -#: ../../../changes.txt:2319 404c852372014015918b1e0362e387dc +#: ../../../changes.txt:2502 86b03154bde6488b90de8b57cd8b393f msgid "" "Methods **FontList(...)** items no longer contain the PDF generation " "number. This value never had any significance. Instead, the font file " @@ -7007,33 +7533,33 @@ msgid "" " which is more valuable information." msgstr "" -#: ../../../changes.txt:2321 2f13ad96b00342919f407de6eb2e10bf +#: ../../../changes.txt:2504 555ad5d9b2104b1ba89fad9cff3a8180 msgid "Fonts other than \"simple fonts\" (Type1) are now also supported." msgstr "" -#: ../../../changes.txt:2323 a328d55106e041c8a404d55ec50766bc +#: ../../../changes.txt:2506 2c2b24363fd846f6863381fb32049658 msgid "New options to change :ref:`Pixmap` size:" msgstr "" -#: ../../../changes.txt:2325 bb9b8a86ef6d412d87a2ecdb258914ab +#: ../../../changes.txt:2508 cdb4cbcd769649f1a58fbaa0866218e3 msgid "Method :meth:`Pixmap.shrink` reduces the pixmap proportionally in place." msgstr "" -#: ../../../changes.txt:2327 c1a9f1d1f2c3435497ce2a4ade3ad21e +#: ../../../changes.txt:2510 42a286d35ccb4b0eac31df32ad72ecc5 msgid "" "A new :ref:`Pixmap` copy constructor allows scaling via setting target " "width and height." msgstr "" -#: ../../../changes.txt:2332 b8b1a64aaaf04a6ca50e23643114ed51 +#: ../../../changes.txt:2515 79676f1b970e4733b67e4b8a4747d0ef msgid "**Changes in Version 1.11.1**" msgstr "" -#: ../../../changes.txt:2334 ae3ec9bb9bf14e5db016ee5f4338677a +#: ../../../changes.txt:2517 967ccbb071be4c19abe9b7ac083697d5 msgid "This is an extension of v1.11.0." msgstr "" -#: ../../../changes.txt:2336 c31d472cf4e24020a1f7bb8c0fe3d004 +#: ../../../changes.txt:2519 dc87c625689f42b0b5880ed5d452bd23 msgid "" "New class *Shape*. It facilitates and extends the creation of image " "shapes on PDF pages. It contains multiple methods for creating elementary" @@ -7045,25 +7571,25 @@ msgid "" "number of updates to the page's :data:`contents` object." msgstr "" -#: ../../../changes.txt:2338 087c84c38c2b412da451a9c94b156fe9 +#: ../../../changes.txt:2521 f8dc912de95e4c2fba7010f2f990f7ae msgid "All *Page* draw methods now use the new *Shape* class." msgstr "" -#: ../../../changes.txt:2340 f6df9f4894bc4cc4893cf067e793520c +#: ../../../changes.txt:2523 fdf3b41e3dc14fbba8b618bcf7691c39 msgid "" "Text insertion methods *insertText()* and *insertTextBox()* now support " "morphing in addition to text rotation. They have become part of the " "*Shape* class and thus allow text to be freely combined with graphics." msgstr "" -#: ../../../changes.txt:2342 f32fc6d22ccb4e6e96165c07a54a6273 +#: ../../../changes.txt:2525 b736ba135e344197947ef466b4c08139 msgid "" -"A new *Pixmap* constructor allows creating pixmap copies with an added " +"A new ``Pixmap`` constructor allows creating pixmap copies with an added " "alpha channel. A new method also allows directly manipulating alpha " "values." msgstr "" -#: ../../../changes.txt:2344 4535ac0fe99c46b5997162dc96d56667 +#: ../../../changes.txt:2527 615cf47c44ae436db26693965eefe818 msgid "" "Binary algebraic operations with geometry objects (matrices, rectangles " "and points) now generally also support lists or tuples as the second " @@ -7072,7 +7598,7 @@ msgid "" ":data:`matrix_like`, :data:`rect_like`)." msgstr "" -#: ../../../changes.txt:2346 0c674005c51844f6ad4344c6fa79f6fd +#: ../../../changes.txt:2529 1f318316e89344309399e272f4160705 msgid "" "Geometry objects now fully support in-place operators. For example, *p /=" " m* replaces point p with *p * 1/m* for a number, or *p * ~m* for a " @@ -7081,15 +7607,15 @@ msgid "" "and *r &= (1, 2, 3, 4)* is its intersection with *fitz.Rect(1, 2, 3, 4)*." msgstr "" -#: ../../../changes.txt:2350 4aa44c70eb3f48e6a20c7e9dba72795e +#: ../../../changes.txt:2533 09f4d2a2e7f242adbd66efe7051225bf msgid "**Changes in Version 1.11.0**" msgstr "" -#: ../../../changes.txt:2352 7b959d3616db4d45b31cbec6fb5b3555 +#: ../../../changes.txt:2535 eb957530b2594c15ac89ca754855c1e0 msgid "This version is based on and requires MuPDF v1.11." msgstr "" -#: ../../../changes.txt:2354 45d985f077874ccdaa4829097a8e25d9 +#: ../../../changes.txt:2537 f9922487c5ee43d38c25f38a9a5db1c1 msgid "" "Though MuPDF has declared it as being mostly a bug fix version, one major" " new feature is indeed contained: support of embedded files -- also " @@ -7098,13 +7624,13 @@ msgid "" " as follows." msgstr "" -#: ../../../changes.txt:2356 337115c11cfa4344b00d04c3354a5345 +#: ../../../changes.txt:2539 3898f08551584cb79a7289e30f2a31f1 msgid "" "The *Document* class now support embedded files with several new methods " "and one new property:" msgstr "" -#: ../../../changes.txt:2358 c7ca683961ab463897fcd2825375b779 +#: ../../../changes.txt:2541 0d19acbd00e04282be89675fd317524d msgid "" "*embfile_Info()* returns metadata information about an entry in the list " "of embedded files. This is more than *mutool* currently provides: it " @@ -7112,36 +7638,36 @@ msgid "" "entry's name)." msgstr "" -#: ../../../changes.txt:2359 d6e7d81fcd3046bc85c04eea7a42baca +#: ../../../changes.txt:2542 22e0cfadd1324dd2a59e2d37345d0121 msgid "" "*embfile_Get()* retrieves the (decompressed) content of an entry into a " "*bytes* buffer." msgstr "" -#: ../../../changes.txt:2360 f32ba7ad85b94b51818178c18c95412f +#: ../../../changes.txt:2543 ccff8ac168cd4341ba6fa4e78d324b0c msgid "" "*embfile_Add(...)* inserts new content into the PDF portfolio. We (in " "contrast to *mutool*) **restrict** this to entries with a **new name** " "(no duplicate names allowed)." msgstr "" -#: ../../../changes.txt:2361 fd69c4c56761446db4b62d56e5cbbfcc +#: ../../../changes.txt:2544 b160b18bf4824ea69b770b5a1eefdc97 msgid "" "*embfile_Del(...)* deletes an entry from the portfolio (function not " "offered in MuPDF)." msgstr "" -#: ../../../changes.txt:2362 71c89a18c48947cabc216fcf7660cc34 +#: ../../../changes.txt:2545 0e6a82cc60b14ca1afc3e1af5ae4b73d msgid "" "*embfile_SetInfo()* -- changes filename or description of an embedded " "file." msgstr "" -#: ../../../changes.txt:2363 83aa6b34554d4411b1d088d5cf9d77cf +#: ../../../changes.txt:2546 a31473118d0e40b38e01fe689c228d5a msgid "*embfile_Count* -- contains the number of embedded files." msgstr "" -#: ../../../changes.txt:2365 22eed45143314e1a9a9632b240462086 +#: ../../../changes.txt:2548 ad63da41b4eb4881bff53f7c6d68b179 msgid "" "Several enhancements deal with streamlining geometry objects. These are " "not connected to the new MuPDF version and most of them are also " @@ -7153,52 +7679,52 @@ msgid "" "*rect.contains(x)*." msgstr "" -#: ../../../changes.txt:2367 57fb75bfba204da4b153293928109681 +#: ../../../changes.txt:2550 1cecbb5f36bc4c8ab01561d1f056652d msgid "" "The :ref:`Rect` chapter now has more background on empty amd infinite " "rectangles and how we handle them. The handling itself was also updated " "for more consistency in this area." msgstr "" -#: ../../../changes.txt:2369 afd9cdfe44894ab1b16146fe58e21501 +#: ../../../changes.txt:2552 ae831c92b6504e48bc462932ef9b07f1 msgid "We have started basic support for **generation** of PDF content:" msgstr "" -#: ../../../changes.txt:2371 09ba52f6ff314e21b33764277e5359d4 +#: ../../../changes.txt:2554 cc52bd38881941b5b6fce1a7a00299f0 msgid "" "*Document.insert_page()* adds a new page into a PDF, optionally " "containing some text." msgstr "" -#: ../../../changes.txt:2372 5e76f30b5e1048e88b0efe5dbdfdc5d3 +#: ../../../changes.txt:2555 85a7a921467f4433bb0ea0413fea4b7e msgid "*Page.insertImage()* places a new image on a PDF page." msgstr "" -#: ../../../changes.txt:2373 7f4f5543642a4da4b12586eee1f62ed0 +#: ../../../changes.txt:2556 01c1a6aca699490bb684774048689320 msgid "*Page.insertText()* puts new text on an existing page" msgstr "" -#: ../../../changes.txt:2375 1dfa5116cfe449c8820ee678989f1e87 +#: ../../../changes.txt:2558 7ddb621738ec4c0dbe41e01033d8bfe1 msgid "" "For **FileAttachment** annotations, content and name of the attached file" " can extracted and changed." msgstr "" -#: ../../../changes.txt:2379 17465f592d5f4c92bb416671d1ae3a67 +#: ../../../changes.txt:2562 3bec344b93fc4f8faf35093b73cdc9fc msgid "**Changes in Version 1.10.0**" msgstr "" -#: ../../../changes.txt:2381 4c7dd47b7c0d4573beedc85fc1eac8dd +#: ../../../changes.txt:2564 feb11f01562a493d8e023a2182b14f50 msgid "**MuPDF v1.10 Impact**" msgstr "" -#: ../../../changes.txt:2383 7299014a356d4e7abeced36cdf78e480 +#: ../../../changes.txt:2566 c091ff823b584bd2a97c354d5cfec071 msgid "" "MuPDF version 1.10 has a significant impact on our bindings. Some of the " "changes also affect the API -- in other words, **you** as a PyMuPDF user." msgstr "" -#: ../../../changes.txt:2385 7dd42290478148eb99b3276ea93559cf +#: ../../../changes.txt:2568 4f068889e650415bbda512d4b796394e msgid "" "Link destination information has been reduced. Several properties of the " "*linkDest* class no longer contain valuable information. In fact, this " @@ -7206,13 +7732,13 @@ msgid "" "only maintain it to provide compatibilty to existing code." msgstr "" -#: ../../../changes.txt:2387 44f955538bcd4fd19b8aeea83fb6632e +#: ../../../changes.txt:2570 665fcb454ef0415c92eae6cfc5927c1a msgid "" "In an effort to minimize memory requirements, several improvements have " "been built into MuPDF v1.10:" msgstr "" -#: ../../../changes.txt:2389 e7c4764df220484dada4e84dafb26fd9 +#: ../../../changes.txt:2572 9f2418fa2e244d98b86f329845a70f9e msgid "" "A new *config.h* file can be used to de-select unwanted features in the C" " base code. Using this feature we have been able to reduce the size of " @@ -7221,22 +7747,22 @@ msgid "" "MB." msgstr "" -#: ../../../changes.txt:2391 de34f08ad62e434e9ac8a893a7ba59a4 +#: ../../../changes.txt:2574 3d01f6167b3c4481be84e2f491a62f71 msgid "" "The alpha (transparency) channel for pixmaps is now optional. Letting " -"alpha default to *False* significantly reduces pixmap sizes (by 20% -- " -"CMYK, 25% -- RGB, 50% -- GRAY). Many *Pixmap* constructors therefore now " -"accept an *alpha* boolean to control inclusion of this channel. Other " -"pixmap constructors (e.g. those for file and image input) create pixmaps " -"with no alpha alltogether. On the downside, save methods for pixmaps no " +"alpha default to ``False`` significantly reduces pixmap sizes (by 20% -- " +"CMYK, 25% -- RGB, 50% -- GRAY). Many ``Pixmap`` constructors therefore " +"now accept an *alpha* boolean to control inclusion of this channel. Other" +" pixmap constructors (e.g. those for file and image input) create pixmaps" +" with no alpha alltogether. On the downside, save methods for pixmaps no " "longer accept a *savealpha* option: this channel will always be saved " "when present. To minimize code breaks, we have left this parameter in the" " call patterns -- it will just be ignored." msgstr "" -#: ../../../changes.txt:2393 494fe3d1a36742b7a43cdd3beb181d86 +#: ../../../changes.txt:2576 f351b44858f4486388b18583eca79166 msgid "" -"*DisplayList* and *TextPage* class constructors now **require the " +"``DisplayList`` and ``TextPage`` class constructors now **require the " "mediabox** of the page they are referring to (i.e. the *page.bound()* " "rectangle). There is no way to construct this information from other " "sources, therefore a source code change cannot be avoided in these cases." @@ -7245,41 +7771,41 @@ msgid "" " be minor." msgstr "" -#: ../../../changes.txt:2395 51e5615dfbe7419c8b8daf06bfe31994 +#: ../../../changes.txt:2578 67793c99d670479286b459b318537565 msgid "**Other Changes compared to Version 1.9.3**" msgstr "" -#: ../../../changes.txt:2397 afcaca70de6c4029b954224e66953846 +#: ../../../changes.txt:2580 7d8ac7a4fa2149d4995bd6536d50c8ed msgid "" "The new :ref:`Document` method *write()* writes an opened PDF to memory " "(as opposed to a file, like *save()* does)." msgstr "" -#: ../../../changes.txt:2398 b08ca38d672b4e11851d00252ced946a +#: ../../../changes.txt:2581 30175d0eb5284676b1bd1fc00310374c msgid "" "An annotation can now be scaled and moved around on its page. This is " "done by modifying its rectangle." msgstr "" -#: ../../../changes.txt:2399 eee6e138debb49549187b91c69c91435 +#: ../../../changes.txt:2582 47028729c9cb426f85efb8fd7a360f15 msgid "" "Annotations can now be deleted. :ref:`Page` contains the new method " "*deleteAnnot()*." msgstr "" -#: ../../../changes.txt:2400 340c11be2f7e4b83accdfceb6a3f8ae1 +#: ../../../changes.txt:2583 99e52edc3ad14227aa8212b59b158eeb msgid "" "Various annotation attributes can now be modified, e.g. content, dates, " "title (= author), border, colors." msgstr "" -#: ../../../changes.txt:2401 261c973642f64ac2965ccdc7d1c7956e +#: ../../../changes.txt:2584 41e889d52a094b7d84188d17bfa360e2 msgid "" "Method *Document.insert_pdf()* now also copies annotations of source " "pages." msgstr "" -#: ../../../changes.txt:2402 374ed7a7e8b2490497fee3bef8d0f90f +#: ../../../changes.txt:2585 fe06bf31dc44494ba788c7e278b979b3 msgid "" "The *Pages* class has been deleted. As documents can now be accessed with" " page numbers as indices (like *doc[n] = doc.loadPage(n)*), and document " @@ -7287,34 +7813,34 @@ msgid "" " maintain it. See the following comments." msgstr "" -#: ../../../changes.txt:2403 b6ba6074c2f24464a8849c6722d5a3d3 +#: ../../../changes.txt:2586 b1d8e938e5d14cc7bebb91d64c18cf05 msgid "" "*loadPage(n)* / *doc[n]* now accept arbitrary integers to specify a page " "number, as long as *n < pageCount*. So, e.g. *doc[-500]* is always valid " "and will load page *(-500) % pageCount*." msgstr "" -#: ../../../changes.txt:2404 62dfb297cae6445daf448eaf0d6d02e1 +#: ../../../changes.txt:2587 bdfbc80ad6854d6ca563e3d4501039ef msgid "" "A document can now also be used as an iterator like this: *for page in " "doc: ... ...*. This will yield all pages of " "*doc* as *page*." msgstr "" -#: ../../../changes.txt:2405 bde6e3ae39954e68acf97052a857f7cd +#: ../../../changes.txt:2588 5d98777946264eed939290f140ba07d4 msgid "" "The :ref:`Pixmap` method *getSize()* has been replaced with property " "*size*. As before *Pixmap.size == len(Pixmap)* is true." msgstr "" -#: ../../../changes.txt:2406 3b484eb82b9544b5b715e5dcacf32eb5 +#: ../../../changes.txt:2589 89d95b558a8d40baaf6caa0218148650 msgid "" "In response to transparency (alpha) being optional, several new " "parameters and properties have been added to :ref:`Pixmap` and " ":ref:`Colorspace` classes to support determining their characteristics." msgstr "" -#: ../../../changes.txt:2407 6ddd2cbfa99e4cc3a43444610721a8a5 +#: ../../../changes.txt:2590 71e327689c924881aaf4e00495ab3a5e msgid "" "The :ref:`Page` class now contains new properties *firstAnnot* and " "*firstLink* to provide starting points to the respective class chains, " @@ -7323,72 +7849,72 @@ msgid "" " for method *bound()*, which also continues to exist." msgstr "" -#: ../../../changes.txt:2408 0347269209c04e8fbda0e5d1ecaae972 +#: ../../../changes.txt:2591 52e1209684e443469ab42da7e0f3cdd1 msgid "" ":ref:`Pixmap` methods *samplesRGB()* and *samplesAlpha()* have been " "deleted because pixmaps can now be created without transparency." msgstr "" -#: ../../../changes.txt:2409 a06b568638fd431eb2fd2f7b75909b5e +#: ../../../changes.txt:2592 08675dfe98d3450988cbaded9800e597 msgid "" ":ref:`Rect` now has a property *irect* which is a synonym of method " "*round()*. Likewise, :ref:`IRect` now has property *rect* to deliver a " ":ref:`Rect` which has the same coordinates as floats values." msgstr "" -#: ../../../changes.txt:2410 dca62888919c446784f0425f75daa60a +#: ../../../changes.txt:2593 0c6e4750a9244bdfaad3fadda40994ae msgid "" "Document has the new method *searchPageFor()* to search for a text " "string. It works exactly like the corresponding *Page.searchFor()* with " "page number as additional parameter." msgstr "" -#: ../../../changes.txt:2415 cfc7ff8294924215a00eaf0164d34b33 +#: ../../../changes.txt:2598 32d6aa7229224c54aa2f77ec92e477bb msgid "**Changes in Version 1.9.3**" msgstr "" -#: ../../../changes.txt:2417 fac354b1e63b489090505def7ede27b1 +#: ../../../changes.txt:2600 7a1d9bfb735c4479bbbf4dafdbfe0a5a msgid "" "This version is also based on MuPDF v1.9a. Changes compared to version " "1.9.2:" msgstr "" -#: ../../../changes.txt:2419 7142d3cbb4e440cf88bdb60f8ef6dbb2 +#: ../../../changes.txt:2602 ef12802e55f346d5a87f9850ddf6676a msgid "" "As a major enhancement, annotations are now supported in a similar way as" " links. Annotations can be displayed (as pixmaps) and their properties " "can be accessed." msgstr "" -#: ../../../changes.txt:2420 51b6a983d3fe4e0691453a462a7f9d48 +#: ../../../changes.txt:2603 350dfa5815a14a26babff12ee9ff57f7 msgid "" "In addition to the document *select()* method, some simpler methods can " "now be used to manipulate a PDF:" msgstr "" -#: ../../../changes.txt:2422 429aa1f3cda5408f8654f30d3be83dcc +#: ../../../changes.txt:2605 3bdb6e23f5484918a7b3eb0b76acfe59 msgid "*copyPage()* copies a page within a document." msgstr "" -#: ../../../changes.txt:2423 06161f49dd6348cc80a02f2214276c8a +#: ../../../changes.txt:2606 2e4f63fb375140e6965dcf773cc3dcb0 msgid "*movePage()* is similar, but deletes the original." msgstr "" -#: ../../../changes.txt:2424 4501d4f3ee5840b4a428a1cd335c6147 +#: ../../../changes.txt:2607 5e96661d219b410aacdb6c369900c20e msgid "*delete_page()* deletes a page" msgstr "" -#: ../../../changes.txt:2425 761b182ead7949cfa4a2104674d29b36 +#: ../../../changes.txt:2608 6e795d710ad04d208bbf3c6891d8c429 msgid "*delete_pages()* deletes a page range" msgstr "" -#: ../../../changes.txt:2427 8a4f6c78d06d4e9a8f57ea8016441098 +#: ../../../changes.txt:2610 10906bbce5334284a869abbfaae9cb9b msgid "" "*rotation* or *setRotation()* access or change a PDF page's rotation, " "respectively." msgstr "" -#: ../../../changes.txt:2428 68edac1e13fe4512839cfe1d543d6287 +#: ../../../changes.txt:2611 ebfec7fd3c814436b6ca05f48c05e3e1 msgid "" "Available but undocumented before, :ref:`IRect`, :ref:`Rect`, " ":ref:`Point` and :ref:`Matrix` support the *len()* method and their " @@ -7396,138 +7922,138 @@ msgid "" "IRect[2]*." msgstr "" -#: ../../../changes.txt:2429 be3d2ec2216c47c7849ab786de0ad11e +#: ../../../changes.txt:2612 163e3e57f4b04a4c94b6fa9e56c40f86 msgid "" "For convenience, documents now support simple indexing: *doc.loadPage(n) " "== doc[n]*. The index may however be in range *-pageCount < n < " "pageCount*, such that *doc[-1]* is the last page of the document." msgstr "" -#: ../../../changes.txt:2433 a98363d67a8243a397d8866d0c52613b +#: ../../../changes.txt:2616 f205bdf79fec4a8588d0303bc52e3d26 msgid "**Changes in Version 1.9.2**" msgstr "" -#: ../../../changes.txt:2435 39ac73c9ab2e4ddca999dd5e908267f2 +#: ../../../changes.txt:2618 46300de29d1d4f369fd37e5f7b81fc3d msgid "" "This version is also based on MuPDF v1.9a. Changes compared to version " "1.9.1:" msgstr "" -#: ../../../changes.txt:2437 455ac763e0be40b9932300ed0ce93fe2 +#: ../../../changes.txt:2620 4524f8edbc0b40acb7151be3de5d91c4 msgid "" -"*fitz.open()* (no parameters) creates a new empty **PDF** document, i.e. " -"if saved afterwards, it must be given a *.pdf* extension." +"*fitz.open()* (no parameters) creates a new empty |PDF| document, i.e. if" +" saved afterwards, it must be given a *.pdf* extension." msgstr "" -#: ../../../changes.txt:2438 d58b424dbcc94c2db60f3ab6c664e625 +#: ../../../changes.txt:2621 19063a4b34714531a4904246782340ab msgid "" ":ref:`Document` now accepts all of the following formats (*Document* and " "*open* are synonyms):" msgstr "" -#: ../../../changes.txt:2440 eac9492219c849c0a827155b3f1dd2c5 +#: ../../../changes.txt:2623 2ea0067410a1444fa304ca4dd05e03db msgid "*open()*," msgstr "" -#: ../../../changes.txt:2441 3ed71025958e4fdabef2c526386a1b6f +#: ../../../changes.txt:2624 abdad6059ca245e39cbd318f80543f9c msgid "*open(filename)* (equivalent to *open(filename, None)*)," msgstr "" -#: ../../../changes.txt:2442 4d42bffb0b3a4a49955e065c9e743fbc +#: ../../../changes.txt:2625 1570421beac349d590be8dde6e98d39b msgid "*open(filetype, area)* (equivalent to *open(filetype, stream = area)*)." msgstr "" -#: ../../../changes.txt:2444 a02b772c22324d49b9a9acb585fb5593 +#: ../../../changes.txt:2627 87cd65eb52fc4ceba03e9708190a06bd msgid "" "Type of memory area *stream* may be *bytes* or *bytearray*. Thus, e.g. " "*area = open(\"file.pdf\", \"rb\").read()* may be used directly (without " "first converting it to bytearray)." msgstr "" -#: ../../../changes.txt:2445 7991024db8bf4bd6b19f59104c382373 +#: ../../../changes.txt:2628 0195ab65cf4f4d84b0a344bc8058bacb msgid "" "New method *Document.insert_pdf()* (PDFs only) inserts a range of pages " "from another PDF." msgstr "" -#: ../../../changes.txt:2446 df2c9d6f9b8d4379a7fa0bb49fcef8d3 +#: ../../../changes.txt:2629 ce60f25ee293401ab15978a90001d58b msgid "" "*Document* objects doc now support the *len()* function: ``len(doc) == " "doc.pageCount``." msgstr "" -#: ../../../changes.txt:2447 ed81c13c49814c8ea4016de170c56d11 +#: ../../../changes.txt:2630 f4cdb4a434c948f1aca1c4c8bc7d39da msgid "" "New method *Document.getPageImageList()* creates a list of images used on" " a page." msgstr "" -#: ../../../changes.txt:2448 4791697c21214d09b1789a08a90b28ad +#: ../../../changes.txt:2631 1377372b76d14efd85dc025d6b047374 msgid "" "New method *Document.getPageFontList()* creates a list of fonts " "referenced by a page." msgstr "" -#: ../../../changes.txt:2449 5b37b0023728482eba33d6f274a3482a +#: ../../../changes.txt:2632 3947dd92b80e44e28f7625984956795d msgid "" "New pixmap constructor *fitz.Pixmap(doc, xref)* creates a pixmap based on" " an opened PDF document and an :data:`xref` number of the image." msgstr "" -#: ../../../changes.txt:2450 f7052a63899e4fe286086b070eb07a72 +#: ../../../changes.txt:2633 e4626fdd13f94ea2b479c0ffbd7adbce msgid "" "New pixmap constructor *fitz.Pixmap(cspace, spix)* creates a pixmap as a " "copy of another one *spix* with the colorspace converted to *cspace*. " "This works for all colorspace combinations." msgstr "" -#: ../../../changes.txt:2451 fe7e3d3fc5ea4f2abf7a2ce81993ccf5 +#: ../../../changes.txt:2634 303ea21711234a9c8361936a8f6445bd msgid "" "Pixmap constructor *fitz.Pixmap(colorspace, width, height, samples)* now " "allows *samples* to also be *bytes*, not only *bytearray*." msgstr "" -#: ../../../changes.txt:2456 5dd4fb37148447a4bd9b5ad4d0c774cc +#: ../../../changes.txt:2639 a756be7d6b5b4ecfa20f9a73024d90a0 msgid "**Changes in Version 1.9.1**" msgstr "" -#: ../../../changes.txt:2458 02b0e93e7d754e87aaaec2e0b0de767e +#: ../../../changes.txt:2641 7f7cc713c0b245efbed63364fd8059eb msgid "" "This version of PyMuPDF is based on MuPDF library source code version " "1.9a published on April 21, 2016." msgstr "" -#: ../../../changes.txt:2460 e5edceec22d04b4490b7c503be4ce8c2 +#: ../../../changes.txt:2643 65ca3396f570490fbd27b7ab37d18ce7 msgid "" "Please have a look at MuPDF's website to see which changes and " "enhancements are contained herein." msgstr "" -#: ../../../changes.txt:2462 e4772f272475470bb466e23adf9b8634 +#: ../../../changes.txt:2645 23fc5187b90a4f869fbc4dffe7c698ee msgid "Changes in version 1.9.1 compared to version 1.8.0 are the following:" msgstr "" -#: ../../../changes.txt:2464 5bf1e4a79c8c4df4a7d2c0308d548a6e +#: ../../../changes.txt:2647 3674e1b43a73413e80031d439f55aaf3 msgid "New methods *get_area()* for both *fitz.Rect* and *fitz.IRect*" msgstr "" -#: ../../../changes.txt:2465 b564cab1ddfa45d69c39c2df42da5c5d +#: ../../../changes.txt:2648 0862079db4cd4a8ab5c62fb650c99bc3 msgid "" "Pixmaps can now be created directly from files using the new constructor " "*fitz.Pixmap(filename)*." msgstr "" -#: ../../../changes.txt:2466 7f1aeb5ac4c34ada86883acb2b8d75e0 +#: ../../../changes.txt:2649 ba7aa343f0af464b8d0132883b1aabc0 msgid "The Pixmap constructor *fitz.Pixmap(image)* has been extended accordingly." msgstr "" -#: ../../../changes.txt:2467 726578f7ec0a44e8916fc0952c8eeb5b +#: ../../../changes.txt:2650 394f7d1fe2084d338c50b78b8842ba51 msgid "" "*fitz.Rect* can now be created with all possible combinations of points " "and coordinates." msgstr "" -#: ../../../changes.txt:2468 80dcf3e284414dc18da8b5cbb962d948 +#: ../../../changes.txt:2651 4931c3a586304468b98266fb84c9142a msgid "" "PyMuPDF classes and methods now all contain __doc__ strings, most of " "them created by SWIG automatically. While the PyMuPDF documentation " @@ -7535,25 +8061,25 @@ msgid "" "programming in Python-aware IDEs." msgstr "" -#: ../../../changes.txt:2469 4db90eb2bbe24b0cb1fc6fe3c7c34cc3 +#: ../../../changes.txt:2652 7fbf8997aa274c1baf0c785f58826183 msgid "" "A new document method of *getPermits()* returns the permissions " "associated with the current access to the document (print, edit, " "annotate, copy), as a Python dictionary." msgstr "" -#: ../../../changes.txt:2470 763ff333d2e64051b495596e28c9b45a +#: ../../../changes.txt:2653 56318f7975d34ae89ec4b7af9193f864 msgid "The identity matrix *fitz.Identity* is now **immutable**." msgstr "" -#: ../../../changes.txt:2471 632644609c5944f19bffd20f3a2d699e +#: ../../../changes.txt:2654 af8644e1ad8f4858814c0a14874e9418 msgid "" "The new document method *select(list)* removes all pages from a document " "that are not contained in the list. Pages can also be duplicated and re-" "arranged." msgstr "" -#: ../../../changes.txt:2472 4de7d139a90d4fcc8ad8dd9131092254 +#: ../../../changes.txt:2655 e2c4b887798e425f8ef1ba145db8e959 msgid "" "Various improvements and new members in our demo and examples " "collections. Perhaps most prominently: *PDF_display* now supports " @@ -7562,45 +8088,45 @@ msgid "" "data in documents." msgstr "" -#: ../../../changes.txt:2473 0362edad9cf848caac9ec64b991302cc +#: ../../../changes.txt:2656 0d2c41ce644b422b89071bc46be38b5b msgid "*fitz.open()* is now an alias of *fitz.Document()*." msgstr "" -#: ../../../changes.txt:2474 4c26b5d8c7ad4a85ad04066413b9c92b +#: ../../../changes.txt:2657 d3388aa72d8a4d57911fdf4dceadd443 msgid "" "New pixmap method *tobytes()* which will return a bytearray formatted as " "a PNG image of the pixmap." msgstr "" -#: ../../../changes.txt:2475 21ee517bdb8043c3adf27162459b9abd +#: ../../../changes.txt:2658 112d8c2f5eb34860be8e69518bebef01 msgid "" "New pixmap method *samplesRGB()* providing a *samples* version with alpha" " bytes stripped off (RGB colorspaces only)." msgstr "" -#: ../../../changes.txt:2476 d5e2225ef6c94646a566019da5e24963 +#: ../../../changes.txt:2659 50b4f449559743fd91fc9f64829c520c msgid "" "New pixmap method *samplesAlpha()* providing the alpha bytes only of the " "*samples* area." msgstr "" -#: ../../../changes.txt:2477 62d41673ce384846bd21db3300da9691 +#: ../../../changes.txt:2660 a48ba5ae44ec42d6b1072b3a38da931c msgid "New iterator *fitz.Pages(doc)* over a document's set of pages." msgstr "" -#: ../../../changes.txt:2478 7710ea1d9f4447d4b37be01935ff4593 +#: ../../../changes.txt:2661 fe060ee8237b49569b7d751a560b714d msgid "" "New matrix methods *invert()* (calculate inverted matrix), *concat()* " "(calculate matrix product), *pretranslate()* (perform a shift operation)." msgstr "" -#: ../../../changes.txt:2479 c9ffa54cd7114a308a182f0ff8d25eb8 +#: ../../../changes.txt:2662 96b8f12d6a154ce8b2929131e6133492 msgid "" "New *IRect* methods *intersect()* (intersection with another rectangle), " "*translate()* (perform a shift operation)." msgstr "" -#: ../../../changes.txt:2480 73cb7c7d709946729de4703cdcb33763 +#: ../../../changes.txt:2663 de74fa1695ba4f2cb8aec322869f17f2 msgid "" "New *Rect* methods *intersect()* (intersection with another rectangle), " "*transform()* (transformation with a matrix), *include_point()* (enlarge " @@ -7608,43 +8134,39 @@ msgid "" "to also contain another one)." msgstr "" -#: ../../../changes.txt:2481 1b1b5c2aa0a3424881dfca963d15c1a1 +#: ../../../changes.txt:2664 9d1082f2ab5c4eb4882b2e9f31b89b24 msgid "Documented *Point.transform()* (transform a point with a matrix)." msgstr "" -#: ../../../changes.txt:2482 0d76f81adb7b4b2da1a37b07a2ff4045 +#: ../../../changes.txt:2665 81e75991b8fd4651be894bdf57224e29 msgid "" "*Matrix*, *IRect*, *Rect* and *Point* classes now support compact, " "algebraic formulations for manipulating such objects." msgstr "" -#: ../../../changes.txt:2483 35206014b0664e6bb5b69e0cb92c6fd0 +#: ../../../changes.txt:2666 8aa17130b3724609adc6873d480bab1a msgid "" "Incremental saves for changes are possible now using the call pattern " "*doc.save(doc.name, incremental=True)*." msgstr "" -#: ../../../changes.txt:2484 8798a6596ebd481f9e62b502edf2d440 +#: ../../../changes.txt:2667 85e1d074eda8470e952eac33c7fca480 msgid "" "A PDF's metadata can now be deleted, set or changed by document method " "*set_metadata()*. Supports incremental saves." msgstr "" -#: ../../../changes.txt:2485 aa54d0f62a054e289f9b01042c0d4222 +#: ../../../changes.txt:2668 405109fca6bb44be8031fd6091b7f975 msgid "" "A PDF's bookmarks (or table of contents) can now be deleted, set or " "changed with the entries of a list using document method *set_toc(list)*." " Supports incremental saves." msgstr "" -#: ../../footer.rst:60 560fe50b78024b669d63d620a52c62ba +#: ../../footer.rst:60 04ec74847748455e856ddafa9e759e2b msgid "This documentation covers all versions up to |version|." msgstr "" -#: ../../footer.rst:-1 e335896c39854beab6cab2af0ec5b04d -msgid "Discord logo" -msgstr "" - #~ msgid "**Changes in version 1.23.0rc1 (2023-08-10)**" #~ msgstr "" @@ -7806,7 +8328,7 @@ msgstr "" #~ msgid "" #~ "*pymupdf.open()* (no parameters) creates a " -#~ "new empty **PDF** document, i.e. if " +#~ "new empty |PDF| document, i.e. if " #~ "saved afterwards, it must be given " #~ "a *.pdf* extension." #~ msgstr "" @@ -7862,3 +8384,6 @@ msgstr "" #~ msgid "New iterator *pymupdf.Pages(doc)* over a document's set of pages." #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/classes.mo b/docs/locales/ja/LC_MESSAGES/classes.mo index 629a192a7..7a52204fc 100644 Binary files a/docs/locales/ja/LC_MESSAGES/classes.mo and b/docs/locales/ja/LC_MESSAGES/classes.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/classes.po b/docs/locales/ja/LC_MESSAGES/classes.po index 04fdfed0e..b3a6ff0c5 100644 --- a/docs/locales/ja/LC_MESSAGES/classes.po +++ b/docs/locales/ja/LC_MESSAGES/classes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: ja\n" @@ -19,31 +19,30 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 adbacc4f1fa84f809ad0d5ded005194b +#: ../../header.rst:-1 2a3afd4ee887482197b760f562ffccc4 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 0bb2f5f3419a4930b635df22e6612657 +#: ../../header.rst:-1 88c2fb74c3264e88ab5b351998d6487c msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 3b59b627c33a41e2b64713599774961e +#: ../../header.rst:-1 704d5cb7888e4240b2b40aab099a2c07 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../classes.rst:5 df563389c30d4856b0e46b103bfe74b7 +#: ../../classes.rst:5 7c00ecb7e10b4a23a407ab80742606b5 msgid "Classes" msgstr "" -#: ../../footer.rst:71 257ebe8dac0244a2b1d76e291dc80f4a +#: ../../footer.rst:60 3cc655b31f5a4c8c856c90f57dbc49cf msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 aa67d24229f54a36a45116b888836dff -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/colors.mo b/docs/locales/ja/LC_MESSAGES/colors.mo index b5e1e5ca1..ff5244d26 100644 Binary files a/docs/locales/ja/LC_MESSAGES/colors.mo and b/docs/locales/ja/LC_MESSAGES/colors.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/colors.po b/docs/locales/ja/LC_MESSAGES/colors.po index bec32ed27..4d765bba4 100644 --- a/docs/locales/ja/LC_MESSAGES/colors.po +++ b/docs/locales/ja/LC_MESSAGES/colors.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 da174f1e5a4f45a1ba5721662af06e3d +#: ../../header.rst:-1 35fb650a253a4f3b8498a5be6524cf11 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 ece443183ab64d7ca1518085ffb4677b +#: ../../header.rst:-1 82dc5bc568734b99a2d2f57e0a4da5d0 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 a3f73a734d71409e8ad66dec06e27981 +#: ../../header.rst:-1 546a16c6fc534b38a0db66fe761c1c61 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../colors.rst:7 325d2185ec754fdaab22afe08eda9511 +#: ../../colors.rst:7 248d0e17c78b4f6fa1b57235e07bb572 msgid "Color Database" msgstr "カラーデータベース" -#: ../../colors.rst:8 35fb2edf7c6743e2928bc9bcb89419da +#: ../../colors.rst:8 866762e2283b43a5a605f529de6310df msgid "" "Since the introduction of methods involving colors (like " ":meth:`Page.draw_circle`), a requirement may be to have access to " @@ -48,7 +48,7 @@ msgstr "" ":meth:`Page.draw_circle`) " "のような色を含むメソッドが導入されて以来、事前定義された色にアクセスする必要があるかもしれません。)" -#: ../../colors.rst:10 73a9051271e54660bed3d1038dfeea3f +#: ../../colors.rst:10 03afc088d6e34acc9076fc34915e9064 msgid "" "The fabulous GUI package `wxPython `_ has a " "database of over 540 predefined RGB colors, which are given more or less " @@ -59,7 +59,7 @@ msgstr "" "素晴らしいGUIパッケージ `wxPython `_ " "には、記憶しやすい名前が与えられた540以上の事前定義されたRGBカラーのデータベースがあります。その中には「green」や「blue」のような標準的な名前だけでなく、「turquoise」や「skyblue」、「gray」の100のシェードなどが含まれています(50だけでなく…)。" -#: ../../colors.rst:12 474c1f05f3ee4027840d7137e563557a +#: ../../colors.rst:12 7ff92a944ea44490b292556c69b2273b msgid "" "We have taken the liberty to copy this database (a list of tuples) " "modified into PyMuPDF and make its colors available as PDF compatible " @@ -71,21 +71,21 @@ msgstr "" " 255, 255, 255)は(1, 1, 1)として返され、これは *直接色* や *塗りつぶし* " "のパラメータとして使用できます。また、「wHiTe」といった大小文字の組み合わせも受け入れます。" -#: ../../colors.rst:15 fa8615fbed014a96afc4b6445b5c63f6 +#: ../../colors.rst:15 e54f7361ac594e49854f711406c08592 msgid "Function *getColor()*" msgstr "関数 *getColor()* " -#: ../../colors.rst:16 5586d63c620b479a9de9959057416f0e +#: ../../colors.rst:16 2f1966c2184a4746af35dea0735b144d msgid "" "As the color database may not be needed very often, one additional import" " statement seems acceptable to get access to it::" msgstr "カラーデータベースはあまり頻繁に必要ないかもしれないため、アクセスするために1つの追加のインポート文は受け入れられると思われます。" -#: ../../colors.rst:41 428baa5642dc47319be1f85c5b9fe540 +#: ../../colors.rst:41 7d1b6378ac6440948098bc91a988cb05 msgid "Printing the Color Database" msgstr "カラーデータベースの印刷" -#: ../../colors.rst:42 0e36f21290204777979dc4d9c2ac8de6 +#: ../../colors.rst:42 a5973aca56984f88bf0fe7e9e3c52644 msgid "" "If you want to actually see how the many available colors look like, use " "scripts `print by RGB \n" "Language: ja\n" @@ -19,43 +19,43 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 6bf4a00703fa43b6b66051625852c252 +#: ../../header.rst:-1 4d4488c4917748bd91bcc3dd579d4cd8 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 dfd590df5c93401ca16e8c5de3251219 +#: ../../header.rst:-1 806d51d5b25e4c2dbf32c0b904cf8d32 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 071e5970c82b4290b21ca8ebfa419508 +#: ../../header.rst:-1 7c1c6b7e76d04443adc894e153404331 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../colorspace.rst:7 d4e2db1236594db6a139c15571ae0f84 +#: ../../colorspace.rst:7 9117f6e8aa1a4dc0a4d17d89aa5543d1 msgid "Colorspace" msgstr "Colorspace (カラースペース)" -#: ../../colorspace.rst:9 0851a516bea5415da17d47f3989d5ffd +#: ../../colorspace.rst:9 9ff1e9e9281248fbbe713af3f44fa1a1 msgid "Represents the color space of a :ref:`Pixmap`." msgstr ":ref:`Pixmap` のカラースペースを表します。" -#: ../../colorspace.rst:12 d40055ffed0c4ac5b0a36f7e9e4a5f80 +#: ../../colorspace.rst:12 b21c879680e34acdbd48605116e91b1a msgid "**Class API**" msgstr "**クラス API** " -#: ../../colorspace.rst:18 81989e1130934dc3977b648fc201c8e1 +#: ../../colorspace.rst:18 728f2df68cff450fba89dc0e2961d0fd msgid "Constructor" msgstr "コンストラクタ" -#: ../../colorspace.rst c15938eb144b4df28c85b4b01c294094 +#: ../../colorspace.rst 89cae8192bc741d38d655d66d7b02a2c msgid "Parameters" msgstr "パラメータ:" -#: ../../colorspace.rst:20 7261646e29e94013b8c391592e47a4a5 +#: ../../colorspace.rst:20 9ca03de683124137b4c31d0d8cedbbb3 msgid "" "A number identifying the colorspace. Possible values are :data:`CS_RGB`, " ":data:`CS_GRAY` and :data:`CS_CMYK`." @@ -63,64 +63,63 @@ msgstr "" "カラースペースを識別する番号。可能な値は :data:`CS_RGB` 、:data:`CS_GRAY` 、および :data:`CS_CMYK`" " です。" -#: ../../colorspace.rst:24 0efd4e21a8454614bc95d7d0a6b56de9 +#: ../../colorspace.rst:24 ee0b34b3c30b495c99bb627cad25b1df msgid "" "The name identifying the colorspace. Example: *pymupdf.csCMYK.name = " "'DeviceCMYK'*." msgstr "カラースペースを識別する名前です。例: *pymupdf.csCMYK.name = 'DeviceCMYK'* 。" -#: ../../colorspace.rst 0a6b8f0cac194572ac4d4ab6386a4e59 -#: 810a7ea03fc64c1cb9b3ba9e95f4dc18 +#: ../../colorspace.rst 1dec254d03ca404d997d0b3d10053f1d +#: 57ea4a70ca2340d6aa71a8e9824e03a8 msgid "type" msgstr "型:" -#: ../../colorspace.rst:26 c390d03f196941bb849489c7a1db7065 +#: ../../colorspace.rst:26 0a4657c57f1d49e39feed5228f4c5d25 msgid "str" msgstr "" -#: ../../colorspace.rst:30 cb63570c110a492b878525c422a40f25 +#: ../../colorspace.rst:30 b3000e3e34554cb5b72ca9feabc9711c msgid "" "The number of bytes required to define the color of one pixel. Example: " "*pymupdf.csCMYK.n == 4*." msgstr "1ピクセルの色を定義するのに必要なバイト数です。例: *pymupdf.csCMYK.n == 4* 。" -#: ../../colorspace.rst:32 8ca7bac3bbad4687b2f22e2fe7a41b4e +#: ../../colorspace.rst:32 09c02be8130e4c67b7e790e38c19788f msgid "int" msgstr "" -#: ../../colorspace.rst:35 2df85c9fd0874b7784d94294655ae482 +#: ../../colorspace.rst:35 305216fe8af54e58abf2e1fce4d6f78a msgid "**Predefined Colorspaces**" msgstr "**事前定義済みのカラースペース** " -#: ../../colorspace.rst:37 f4d1ac3874af4b64bf8578c7b667f6d0 +#: ../../colorspace.rst:37 2a6d64970b50414ca57b9df4b896c7d6 msgid "" "For saving some typing effort, there exist predefined colorspace objects " "for the three available cases." msgstr "入力を簡略化するために、三つの利用可能なケースのための事前定義されたカラースペースオブジェクトが存在します。" -#: ../../colorspace.rst:39 85849d931ad640c3a3ba1148485edcc6 +#: ../../colorspace.rst:39 acc3013bd78b41dc8fddea9d4ee301a5 msgid ":data:`csRGB` = *pymupdf.Colorspace(pymupdf.CS_RGB)*" msgstr "" -#: ../../colorspace.rst:40 690779c80da24f15aaac19325a782c63 +#: ../../colorspace.rst:40 5813b3b4dcbf437f8815044834076e72 msgid ":data:`csGRAY` = *pymupdf.Colorspace(pymupdf.CS_GRAY)*" msgstr "" -#: ../../colorspace.rst:41 3c0dd4d40df84d6591e785a9a4bc0cdc +#: ../../colorspace.rst:41 57fef72a75814b848806cf016b2c1baf msgid ":data:`csCMYK` = *pymupdf.Colorspace(pymupdf.CS_CMYK)*" msgstr "" -#: ../../footer.rst:71 9adc881254754272972b355fca42fd63 +#: ../../footer.rst:60 e39ad3f11f894208aed37df423e4558e msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 d9184d5dd74c4d1ab380b4bb26aeea3b -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/coop_low.mo b/docs/locales/ja/LC_MESSAGES/coop_low.mo index 0419f3d50..da53def06 100644 Binary files a/docs/locales/ja/LC_MESSAGES/coop_low.mo and b/docs/locales/ja/LC_MESSAGES/coop_low.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/coop_low.po b/docs/locales/ja/LC_MESSAGES/coop_low.po index 59f3a9a1e..07788bbd4 100644 --- a/docs/locales/ja/LC_MESSAGES/coop_low.po +++ b/docs/locales/ja/LC_MESSAGES/coop_low.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,41 +19,41 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 29949a59aa814bf4bde231fdc83041ca +#: ../../header.rst:-1 5a355454a0e14f23a63b8a2e7ce669e8 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 e7709e7c0eb842188250eb9e2abb798c +#: ../../header.rst:-1 09967d10ba634cb1bff385ff21b01dde msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 6b6cf086d983411a8f1a2400bbf1ae57 +#: ../../header.rst:-1 d1d359d0d40748de8b9c0d01760f6668 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../coop_low.rst:7 e6528ff2eb4d415d9d55fab93f7e50df +#: ../../coop_low.rst:7 bdf9ff13324144f3aea1e6e6fb99a106 msgid "Working together: DisplayList and TextPage" msgstr "共同作業:DisplayList と TextPage" -#: ../../coop_low.rst:8 6fa05740e1564b2abbed44732e674874 +#: ../../coop_low.rst:8 f4bd6483319f4150b1c8bb96b8e13933 msgid "Here are some instructions on how to use these classes together." msgstr "これらのクラスを一緒に使用する方法に関するいくつかの手順があります。" -#: ../../coop_low.rst:10 2f6a38ce5a9841d3a186cb2bb76d9410 +#: ../../coop_low.rst:10 ed7509d3a4e1434498829a99374f641b msgid "" "In some situations, performance improvements may be achievable, when you " "fall back to the detail level explained here." msgstr "一部の状況では、ここで説明されている詳細レベルに戻ると、パフォーマンスの向上が可能かもしれません。" -#: ../../coop_low.rst:13 9cf9b3f10cfc40249a77a7455ae1deb1 +#: ../../coop_low.rst:13 cd9e800e616545078dedc61814a029c7 msgid "Create a DisplayList" msgstr "DisplayList の作成" -#: ../../coop_low.rst:14 d444f93244ac4501971da9e3e48e739c +#: ../../coop_low.rst:14 c3a4cb6ce3974be5af359b73bd3b8d71 msgid "" "A :ref:`DisplayList` represents an interpreted document page. Methods for" " pixmap creation, text extraction and text search are -- behind the " @@ -66,14 +66,14 @@ msgstr "" ":ref:`DisplayList` " "は解釈された文書ページを表します。ピクセルマップの作成、テキスト抽出、およびテキスト検索のメソッドは、幕の内側で、それぞれのタスクを実行するためにページの表示リストを使用しています。ページを複数回描画する必要がある場合(ズームレベルが変更されたためなど)、またはテキストの検索とテキストの抽出の両方を実行する必要がある場合、表示リストは一度だけ作成し、その後のすべてのタスクに使用すると、オーバーヘッドを節約できます。" -#: ../../coop_low.rst:18 929ee3ff88794302aacf23297730dfbb +#: ../../coop_low.rst:18 4a46c1c8dddf48029189e3b15bc68591 msgid "" "You can also create display lists for many pages \"on stack\" (in a " "list), may be during document open, during idling times, or you store it " "when a page is visited for the first time (e.g. in GUI scripts)." msgstr "ディスプレイリストを多くのページに対して「スタック上」(リスト内)で作成することもできます。これはドキュメントを開いている間、アイドリング時間中、またはページが初めて訪れられたとき(GUIスクリプトなど)に行うことができます。" -#: ../../coop_low.rst:20 9441e94d1f2b4c368e93c1b1c3b86140 +#: ../../coop_low.rst:20 2f2b49df380e40cea8dba1b11f5ee9a8 msgid "" "Note, that for everything what follows, only the display list is needed " "-- the corresponding :ref:`Page` object could have been deleted." @@ -81,11 +81,11 @@ msgstr "" "注意:以下のすべてのことについて、ディスプレイリストのみが必要です - 対応する :ref:`Page` " "オブジェクトは削除されている可能性があります。" -#: ../../coop_low.rst:23 d51ef39c5fbf4f268cae9266cec1a0e8 +#: ../../coop_low.rst:23 aebfe0ed572842b9ba5b11a8d1aab0d2 msgid "Generate Pixmap" msgstr "ピクセルマップの生成" -#: ../../coop_low.rst:24 0393259f8e124f208bb3998da7050f30 +#: ../../coop_low.rst:24 7dd16880b19c48e9837fd5dc2c621515 msgid "" "The following creates a Pixmap from a :ref:`DisplayList`. Parameters are " "the same as for :meth:`Page.get_pixmap`." @@ -93,36 +93,36 @@ msgstr "" "以下は、:ref:`DisplayList` からピクセルマップを生成するものです。パラメータは :meth:`Page.get_pixmap` " "と同じです。" -#: ../../coop_low.rst:28 349d8408ccb34c548ed0ada4c0d1ddcb +#: ../../coop_low.rst:28 e89f1e9ef8d649f4a06985425cfa62a4 #, python-format msgid "" "The execution time of this statement may be up to 50% shorter than that " "of :meth:`Page.get_pixmap`." msgstr "この文の実行時間は、:meth:`Page.get_pixmap` の実行時間よりも最大50%短くなる可能性があります。" -#: ../../coop_low.rst:31 cd3d2fc8b9da474da58be406777a28e2 +#: ../../coop_low.rst:31 d7fa50d37ba94e5cb71679b146596aa3 msgid "Perform Text Search" msgstr "テキスト検索を実行" -#: ../../coop_low.rst:32 20af762b1df24cf6b6dfe6be11fcfc38 +#: ../../coop_low.rst:32 883c1b8167124e3c87bee02cb540ebbb msgid "With the display list from above, we can also search for text." msgstr "上記のディスプレイリストを使用して、テキストを検索することもできます。" -#: ../../coop_low.rst:34 13f68e05989c4a4cbe1b9f4eb33de695 +#: ../../coop_low.rst:34 dffc2a72113945cbbce0613fb18a4903 msgid "For this we need to create a :ref:`TextPage`." msgstr "これには、:ref:`TextPage` を作成する必要があります。" -#: ../../coop_low.rst:42 36a87432c55c4daf89428ed92203cd24 +#: ../../coop_low.rst:42 268c3ac74027425381db0e5a5b1beeec msgid "Extract Text" msgstr "テキストの抽出" -#: ../../coop_low.rst:43 d9e4d6677c624942a98b9eacd9f5bcdb +#: ../../coop_low.rst:43 499d4763043d407c8815a5ff4c386e37 msgid "" "With the same :ref:`TextPage` object from above, we can now immediately " "use any or all of the 5 text extraction methods." msgstr "前述の :ref:`TextPage` オブジェクトを使用することで、今すぐに5つのテキスト抽出メソッドのいずれかまたはすべてを使用できます。" -#: ../../coop_low.rst:45 19fbac6556ef4b8bbf20a554365a477f +#: ../../coop_low.rst:45 6f1b9f5de2eb487c9502d14d7e74597c msgid "" "Above, we have created our text page without argument. This leads to a " "default argument of 3 (:data:`ligatures` and white-space are preserved), " @@ -131,19 +131,19 @@ msgstr "" "前述のように、テキストページを引数なしで作成しました。これにより、デフォルトの引数3(合字と空白が保持されます)が適用されます。つまり、画像は抽出" " **されません** - 以下を参照してください。" -#: ../../coop_low.rst:54 40f284b37b5c4921b9e543451b7f56f2 +#: ../../coop_low.rst:54 ab9774b34e1845db917cc426db636fd8 msgid "Further Performance improvements" msgstr "さらなるパフォーマンスの向上" -#: ../../coop_low.rst:56 21be928b3b2144fba95e1492d058b4a7 +#: ../../coop_low.rst:56 8aa6869464d643f1b386fb7323425982 msgid "Pixmap" msgstr "" -#: ../../coop_low.rst:57 0a80a0e30c1e42d293a785bfc04495c9 +#: ../../coop_low.rst:57 d58917690b86432a8db25b4e290c8aab msgid "As explained in the :ref:`Page` chapter:" msgstr "ページの章で説明されているように:" -#: ../../coop_low.rst:59 42215fe7b2cf4d548de369b17b1d15a8 +#: ../../coop_low.rst:59 5f452558de7e46d1a6bb4d407940f71d #, python-format msgid "" "If you do not need transparency set *alpha = 0* when creating pixmaps. " @@ -153,17 +153,17 @@ msgstr "" "透明度が不要な場合は、ピクスマップを作成する際に alpha = 0 " "に設定します。これにより、メモリが25%節約されます(RGBの場合、最も一般的なケース)し、GUIソフトウェアに依存して実行時間が5%削減される可能性があります。" -#: ../../coop_low.rst:62 dfd4e09f6dc445e9a899cbc6c1c078d1 +#: ../../coop_low.rst:62 75cc3ebbf8db48479d9f9b81f89a5254 msgid "TextPage" msgstr "" -#: ../../coop_low.rst:63 7c4cb1b416394362b7f92158fa313cb0 +#: ../../coop_low.rst:63 08ee726963904764a54737759d3c18d6 msgid "" "If you do not need images extracted alongside the text of a page, you can" " set the following option:" msgstr "ページのテキストと一緒に画像を抽出する必要がない場合、以下のオプションを設定できます:" -#: ../../coop_low.rst:68 940d4e2e14e04a60a2aa2cf95d88c48e +#: ../../coop_low.rst:68 4251f3ef7f5f4ac69038ff012e1254c6 #, python-format msgid "" "This will save ca. 25% overall execution time for the HTML, XHTML and " @@ -173,21 +173,20 @@ msgstr "" "これにより、HTML、XHTML、およびJSONのテキスト抽出全体の実行時間が約25%節約され、ドキュメントがグラフィックス志向である場合、ストレージ(メモリとディスクスペースの両方)の量が" " **大幅に** 削減されます。" -#: ../../coop_low.rst:70 5abd0a1857f54e0f80fcbd85b8113e66 +#: ../../coop_low.rst:70 bbd6a64180374797a986afa4351f7218 msgid "If you however do need images, use a value of 7 for flags:" msgstr "ただし、画像が必要な場合は、フラグに7の値を使用してください:" -#: ../../footer.rst:71 97ea483388bb4aadafdb8b1b8968722f +#: ../../footer.rst:60 ef9f02956d6945e086760c64e2387362 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 f9bba11a1afb430db51ac28c6c1d846a -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/device.mo b/docs/locales/ja/LC_MESSAGES/device.mo index 70cd78091..d113a5316 100644 Binary files a/docs/locales/ja/LC_MESSAGES/device.mo and b/docs/locales/ja/LC_MESSAGES/device.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/device.po b/docs/locales/ja/LC_MESSAGES/device.po index a27c99477..8059dab66 100644 --- a/docs/locales/ja/LC_MESSAGES/device.po +++ b/docs/locales/ja/LC_MESSAGES/device.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 fe2576242c254689a9b200669a2eaa35 +#: ../../header.rst:-1 55167d0c5e4948eabf41a2e0ad7fff8a msgid "Artifex" msgstr "" -#: ../../header.rst:-1 3e6a1d7d9528466eb9edcc50308a904e +#: ../../header.rst:-1 d1afc8b9b26740989ade65fddf4c784c msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 c6dcb0755d9b4cd19d3d75e773df4bae +#: ../../header.rst:-1 fc4a52fdadd6458e894b792b0f04f4d1 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../device.rst:7 8ba05fc3c3054d698fdbdec5e880c8d4 +#: ../../device.rst:7 e5be8af0be364d21a95eff2daec5e5d1 msgid "Device" msgstr "Device (デバイス)" -#: ../../device.rst:9 8b9300098c7f4c95b0db78843d8e629b +#: ../../device.rst:9 c79f0e0250fc4ea296a521429e0863db msgid "" "The different format handlers (pdf, xps, etc.) interpret pages to a " "\"device\". Devices are the basis for everything that can be done with a " @@ -49,54 +49,53 @@ msgstr "" "異なるフォーマットハンドラ(pdf、xps " "など)はページを「デバイス」に解釈します。デバイスはページで行うすべてのことの基盤であり、レンダリング、テキスト抽出、検索などが行えます。デバイスのタイプは選択した構築方法によって決まります。" -#: ../../device.rst:11 c777f81e0620421992bf3f79a0cc917d +#: ../../device.rst:11 e1ec859236f84532835550a8d0d4f793 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../device.rst:17 66461b451d6a4de28a40d793d0316425 +#: ../../device.rst:17 bdb2f8e55f6f4e9582764fb173e2584e msgid "Constructor for either a pixel map or a display list device." msgstr "ピクセルマップまたは表示リストデバイスのコンストラクタ。" -#: ../../device.rst 1c17c09f077b4fd6bbd49145369888a4 -#: e8161768bf99436f8520d4810bc899a4 +#: ../../device.rst 25de13f5cdbc4f6fac5f18832215e384 +#: 543e28e5ab6b4c8db6ae54916f8223e5 msgid "Parameters" msgstr "" -#: ../../device.rst:19 318bafa96d164867857828ab66d99dd4 -msgid "either a *Pixmap* or a *DisplayList*." -msgstr "*Pixmap* または *DisplayList* のいずれか。" +#: ../../device.rst:19 df3b8b3f3fda4ed685d15456fcbbc98b +msgid "either a ``Pixmap`` or a ``DisplayList``." +msgstr "``Pixmap`` または ``DisplayList`` のいずれか。" -#: ../../device.rst:22 3ab538117d9d4cbf96f449fcdafb0260 +#: ../../device.rst:22 21adb78e90cf4d948936ecce99c0f28e msgid "" -"An optional `IRect` for *Pixmap* devices to restrict rendering to a " +"An optional `IRect` for ``Pixmap`` devices to restrict rendering to a " "certain area of the page. If the complete page is required, specify " -"*None*. For display list devices, this parameter must be omitted." +"``None``. For display list devices, this parameter must be omitted." msgstr "" -"*Pixmap* デバイス用の任意の `IRect` " -"で、ページの特定の領域にレンダリングを制限するためのものです。完全なページが必要な場合は、*None* " +"``Pixmap`` デバイス用の任意の `IRect` " +"で、ページの特定の領域にレンダリングを制限するためのものです。完全なページが必要な場合は、``None`` " "を指定してください。表示リストデバイスの場合、このパラメータは省略する必要があります。" -#: ../../device.rst:27 33861c8084374c259e3c6708aea00c10 +#: ../../device.rst:27 455c165a85814a96b91272c070f1afcc msgid "Constructor for a text page device." msgstr "テキストページデバイスのコンストラクタ。" -#: ../../device.rst:29 a30cf7e99efa4409a4adc2930b18db5e -msgid "*TextPage* object" +#: ../../device.rst:29 5a36c4d50ef34335b590bbe855dda21d +msgid "``TextPage`` object" msgstr "TextPageオブジェクト" -#: ../../device.rst:32 8db2aa5e40654497b061f9aa49f766b8 +#: ../../device.rst:32 fb3e0d3553a54959b420fe3c83ce17a0 msgid "" "control the way how text is parsed into the text page. Currently 3 " "options can be coded into this parameter, see :ref:`TextPreserve`. To set" -" these options use something like *flags=0 | TEXT_PRESERVE_LIGATURES | " -"...*." +" these options use something like ``flags=0 | TEXT_PRESERVE_LIGATURES | " +"...``." msgstr "テキストがテキストページに解析される方法を制御するフラグです" -#: ../../footer.rst:71 6297032dce7e4a4d9dbbda9cf45cbe4c +#: ../../footer.rst:60 ade0e54ff3ee44398c800affaa5a276f msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 0ed39d0ad0c04da4b8617222101d3e6f -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/displaylist.mo b/docs/locales/ja/LC_MESSAGES/displaylist.mo index 9a8f2852c..f59b5b8c7 100644 Binary files a/docs/locales/ja/LC_MESSAGES/displaylist.mo and b/docs/locales/ja/LC_MESSAGES/displaylist.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/displaylist.po b/docs/locales/ja/LC_MESSAGES/displaylist.po index 046793cf9..32d5242cd 100644 --- a/docs/locales/ja/LC_MESSAGES/displaylist.po +++ b/docs/locales/ja/LC_MESSAGES/displaylist.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,44 +19,44 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 944378c59c084f86b451fd22c40e5953 +#: ../../header.rst:-1 85ee81383b5446bab311d8f7b3c8fcac msgid "Artifex" msgstr "" -#: ../../header.rst:-1 b26e2dc828a44d638fa2cb351235fd9c +#: ../../header.rst:-1 2aadbeed28004bc5b1af3cafca54cd49 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 6f1aaa8070494bcca68b1839ef8d2a85 +#: ../../header.rst:-1 5f03ea6228c540d490e7e21dbe7a682e msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../displaylist.rst:7 4d10c27b26254e168757dc1862d36e49 +#: ../../displaylist.rst:7 ffd953b6fbc64a39866787a0edce72c2 msgid "DisplayList" msgstr "DisplayList(ディスプレイリスト)" -#: ../../displaylist.rst:9 6536e01b702f4844a861577dd76d5278 +#: ../../displaylist.rst:9 a98bdb15facb45eca03a302e65321649 msgid "" "DisplayList is a list containing drawing commands (text, images, etc.). " "The intent is two-fold:" msgstr "DisplayListは、描画コマンド(テキスト、画像など)を含むリストです。その目的は二つあります:" -#: ../../displaylist.rst:11 23357c37810a4c7aadd9e09f16992832 +#: ../../displaylist.rst:11 f34b2f44389140eca2d21b0d7c566835 msgid "as a caching-mechanism to reduce parsing of a page" msgstr "ページのパースを削減するためのキャッシュメカニズムとして" -#: ../../displaylist.rst:12 81240d8bcc2344d1b9be73484aab8387 +#: ../../displaylist.rst:12 11fd7eeaa74c41e38f44f93fe53f799d msgid "" "as a data structure in multi-threading setups, where one thread parses " "the page and another one renders pages. This aspect is currently not " "supported by PyMuPDF." msgstr "ページをパースするスレッドとページをレンダリングする別のスレッドでのデータ構造として。この側面は現在、PyMuPDFではサポートされていません。" -#: ../../displaylist.rst:14 e1388013187c4569b4d521322182432d +#: ../../displaylist.rst:14 f47fc55997964be8872823d0d68a9434 msgid "" "A display list is populated with objects from a page, usually by " "executing :meth:`Page.get_displaylist`. There also exists an independent " @@ -65,7 +65,7 @@ msgstr "" "ディスプレイリストは通常、:meth:`Page.get_displaylist` " "を実行することによってページからオブジェクトで満たされます。また、独立したコンストラクタも存在します。" -#: ../../displaylist.rst:16 d41641b534514b90b212f905ab32b3fd +#: ../../displaylist.rst:16 478941b4f0a74dd5ac00af8a2e5de8e0 msgid "" "\"Replay\" the list (once or many times) by invoking one of its methods " ":meth:`~DisplayList.run`, :meth:`~DisplayList.get_pixmap` or " @@ -75,74 +75,74 @@ msgstr "" "、:meth:`~DisplayList.get_pixmap` 、または :meth:`~DisplayList.get_textpage` " "です。" -#: ../../displaylist.rst:20 06138c12dd0d4c169ed72d5d03f96b6d +#: ../../displaylist.rst:20 b035d30ab932458c89921fc2091ca6ed msgid "**Method**" msgstr "**メソッド** " -#: ../../displaylist.rst:20 e82f9afe6d28487daa01d5c3fac1918d +#: ../../displaylist.rst:20 9ec33062cfa84f33adb5ca985df1b62a msgid "**Short Description**" msgstr "**短い説明** " -#: ../../displaylist.rst:22 927fdda153ae4707a06b01810a7f93b3 +#: ../../displaylist.rst:22 f063e9c7368a4d1bb4efbf9e02d9a7b0 msgid ":meth:`~DisplayList.run`" msgstr "" -#: ../../displaylist.rst:22 dc7eb9ba3a7b450eba9f704a1ae82b5b +#: ../../displaylist.rst:22 916c809bdfae4d9b912c30cda33c7d3b msgid "Run a display list through a device." msgstr "ディスプレイリストをデバイスを介して実行します。" -#: ../../displaylist.rst:23 9d60bff59928431080ec4efc088e3909 +#: ../../displaylist.rst:23 a412fe84e6a943109a82c9872dc2a953 msgid ":meth:`~DisplayList.get_pixmap`" msgstr "" -#: ../../displaylist.rst:23 44b3f0f7fba849c5a7f3a361addd0f1e +#: ../../displaylist.rst:23 b2523139914a4541a0c3f79442bf5c6f msgid "generate a pixmap" msgstr "ピクスマップを生成します。" -#: ../../displaylist.rst:24 ba2d0c6bc3a140cfa9c9d0e5fb692dd2 +#: ../../displaylist.rst:24 5bfdb590999b469981c332ada5769bbf msgid ":meth:`~DisplayList.get_textpage`" msgstr "" -#: ../../displaylist.rst:24 306ad96e67374ea795cc3244cb2696b3 +#: ../../displaylist.rst:24 24b92e98327b4214865e137898c355c1 msgid "generate a text page" msgstr "テキストページを生成します。" -#: ../../displaylist.rst:25 ad0a3d34d5354aa2a5cd9fb05596d874 +#: ../../displaylist.rst:25 758211c051284705afa9e186fdea6e54 msgid ":attr:`~DisplayList.rect`" msgstr "" -#: ../../displaylist.rst:25 025b7d5a9d824d3e9d1bb871bcef3b64 +#: ../../displaylist.rst:25 8247482dba784fabb5f89ce11f17a64c msgid "mediabox of the display list" msgstr "ディスプレイリストのメディアボックス(表示領域)です。" -#: ../../displaylist.rst:29 1d4d2339fc734a639caf1d9d8a167d3d +#: ../../displaylist.rst:29 879da44f5b924a8299e2cdf2daa64852 msgid "**Class API**" msgstr "**Class API(クラスAPI)** " -#: ../../displaylist.rst:35 83e6dd7ec4de48ad8f02067431fdfe57 +#: ../../displaylist.rst:35 7024f17715094e0bac4657dc96d778fe msgid "Create a new display list." msgstr "新しいディスプレイリストを作成します。" -#: ../../displaylist.rst 333c7cf2973d4457b65766520caeac2e -#: 53b4b3d738624a6e818842a86940a073 a7761be00d83428689eaf9fffc3c386d -#: c50d9b953e23436abaa92e4f98a827c1 +#: ../../displaylist.rst 368347bd6e354c7286c6d761323614c6 +#: 5cffa7e1860f48d2b2b02af84396e8b7 a68f36c6fdbd4638841bd4b5d14e01c5 +#: fbf69acf127c475684179bebec45b555 msgid "Parameters" msgstr "パラメーター" -#: ../../displaylist.rst:37 6a02360a72a7489fa4799481f62878f9 +#: ../../displaylist.rst:37 1a15f2e868934ebfbb706101234b942c msgid "The page's rectangle." msgstr "ページの矩形。" -#: ../../displaylist.rst 0d7713bedb684a4290dae1c89412b904 -#: 250324b2d7194437ac6ba56e6223e956 38a587c7263c4f64ae830729dd784fae +#: ../../displaylist.rst 4aa7e95bfb304eb786873dc128080192 +#: 9628266c652c43e397ab17aff7b09d9a fdc8f4060e4044a4bba226ce56c05efe msgid "Return type" msgstr "戻り値の型" -#: ../../displaylist.rst:40 ba7135f3972943969dd0a672a419ae77 -msgid "*DisplayList*" +#: ../../displaylist.rst:40 136f549e2738445d8d830e101523615c +msgid "``DisplayList``" msgstr "" -#: ../../displaylist.rst:44 66233325346e48dcac5eeb77f20f84ec +#: ../../displaylist.rst:44 a708030e4a714162a183122ff845f300 msgid "" "Run the display list through a device. The device will populate the " "display list with its \"commands\" (i.e. text extraction or image " @@ -150,7 +150,7 @@ msgid "" "times without having to re-interpret it from the document file." msgstr "デバイスを介してディスプレイリストを実行します。デバイスはディスプレイリストをその「コマンド」(つまりテキストの抽出または画像の作成)で満たします。ディスプレイリストは後で文書ファイルから再解釈することなく、ページを多くの回数「読む」ために使用できます。" -#: ../../displaylist.rst:46 9443510631b14852b645bac95629c482 +#: ../../displaylist.rst:46 4c8291909a844ff4a2f2ab416252270b msgid "" "You will most probably instead use one of the specialized run methods " "below -- :meth:`get_pixmap` or :meth:`get_textpage`." @@ -158,60 +158,60 @@ msgstr "" "おそらく、以下の専門の実行メソッドの1つを代わりに使用するでしょう - :meth:`get_pixmap` または " ":meth:`get_textpage` 。" -#: ../../displaylist.rst:48 1422004835c948a482f2f8ccde589383 +#: ../../displaylist.rst:48 4f7a4933e8924fe0b4bf3ba52b68b918 msgid "Device" msgstr "デバイス" -#: ../../displaylist.rst:51 ab73ef3a9828418fae573bdbfdf972cc +#: ../../displaylist.rst:51 c7fc73de742e46aaa1a3bfac323ffe52 msgid "Transformation matrix to apply to the display list contents." msgstr "ディスプレイリストのコンテンツに適用する変換行列。" -#: ../../displaylist.rst:54 c62c1271a7e6471fadfe0d5eb60e37c3 +#: ../../displaylist.rst:54 8d876f1c867a4ba9aab91aa8844f11ed msgid "" "Only the part visible within this area will be considered when the list " "is run through the device." msgstr "デバイスを介してリストを実行する際にこの領域内で可視部分のみが考慮されます。" -#: ../../displaylist.rst:65 032b9fb11b9843c3948bf6cf7c6f91d0 +#: ../../displaylist.rst:65 4cd71203402f42c084c05537b4069b8e msgid "Run the display list through a draw device and return a pixmap." msgstr "ディスプレイリストを描画デバイスを介して実行し、ピクスマップを返します。" -#: ../../displaylist.rst:67 726df96ae6314142b132b655caae7d1b +#: ../../displaylist.rst:67 40ffabb8733d4c159fb9c1bf5f123b7a msgid "matrix to use. Default is the identity matrix." msgstr "使用する行列。デフォルトは単位行列です。" -#: ../../displaylist.rst:70 d0f66d04c73a432ba973872a4dff3572 +#: ../../displaylist.rst:70 9f80e04939df4e869a6aae307600f9b9 msgid "the desired colorspace. Default is RGB." msgstr "望ましいカラースペース。デフォルトはRGBです。" -#: ../../displaylist.rst:73 aa3a69d03f8348718711f3173a0e2d99 +#: ../../displaylist.rst:73 004942119bb548268104bdbf345c6626 msgid "determine whether or not (0, default) to include a transparency channel." msgstr "透明チャネルを含めるかどうかを決定します(0、デフォルトは含めない)。" -#: ../../displaylist.rst:75 ffd8e0f52d4f4d15ae632cdd98ae3e16 +#: ../../displaylist.rst:75 63499de6adb349218d9c228d37571c9b msgid "" "restrict rendering to the intersection of this area with " ":attr:`DisplayList.rect`." msgstr ":attr:`DisplayList.rect` との交差部分にレンダリングを制限します。" -#: ../../displaylist.rst:77 49ce4f671479441caf6e81937136f652 +#: ../../displaylist.rst:77 2b4519ceb62d4ff5aaf26469b6ad27e7 msgid ":ref:`Pixmap`" msgstr "" -#: ../../displaylist.rst 66788579f982415c964cb1a262e1ea87 -#: a019e33b9bb3447f93e94d8c02a04754 +#: ../../displaylist.rst 9e12b4a400bd4f28a64154727e1341e8 +#: dfd4f14a1c4c40b4b4593b30d2801610 msgid "Returns" msgstr "戻り値" -#: ../../displaylist.rst:78 2db8d119b3414d33bd7fd32e5a05cbe4 +#: ../../displaylist.rst:78 4d9e816a554e498f8b4ced5ead7fae63 msgid "pixmap of the display list." msgstr "ディスプレイリストのピクスマップ。" -#: ../../displaylist.rst:82 462032363de14380881c0fcf639702dc +#: ../../displaylist.rst:82 d201e153d5a74b6286a3f24dd07771e4 msgid "Run the display list through a text device and return a text page." msgstr "ディスプレイリストをテキストデバイスを介して実行し、テキストページを返します。" -#: ../../displaylist.rst:84 14efc02b018f47f4aed8db549e21810c +#: ../../displaylist.rst:84 f7168bc2140948b1b23ee9a6555aa19c msgid "" "control which information is parsed into a text page. Default value in " "PyMuPDF is `3 = TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE`, i.e." @@ -223,15 +223,15 @@ msgstr "" "TEXT_PRESERVE_WHITESPACE` です。つまり、:data:`ligatures` はそのまま **通過** し、空白はそのまま" " **通過** します(スペースに変換されません)、画像は **含まれません** 。:ref:`TextPreserve` を参照してください。" -#: ../../displaylist.rst:86 73317bb4d12842b5a43a8f84a327fb99 +#: ../../displaylist.rst:86 331d9ffb9e2c41b2a7aa918985944d03 msgid ":ref:`TextPage`" msgstr "" -#: ../../displaylist.rst:87 5979e27dec734605ac7be3a6ceaca5c7 +#: ../../displaylist.rst:87 9a3d633bb3b9470e9633979dc60e32db msgid "text page of the display list." msgstr "ディスプレイリストのテキストページ。" -#: ../../displaylist.rst:91 0ed22232434c4abc96d0bee49268a80b +#: ../../displaylist.rst:91 a0532ee2b43e4881966b65e83c28a1f5 msgid "" "Contains the display list's mediabox. This will equal the page's " "rectangle if it was created via :meth:`Page.get_displaylist`." @@ -239,25 +239,24 @@ msgstr "" "ディスプレイリストのmediaboxを含みます。これは、:meth:`Page.get_displaylist` " "を介して作成された場合、ページの矩形と等しいです。" -#: ../../displaylist.rst c359a6b4210a4c708f0594f5663c1232 +#: ../../displaylist.rst 027bab9cbfe6488eb3f5cf5818313a0e msgid "type" msgstr "" -#: ../../displaylist.rst:93 00e47309b4d947148118e8107d3adc94 +#: ../../displaylist.rst:93 3a0e088ac75d4a128417cd79855b6777 msgid ":ref:`Rect`" msgstr "" -#: ../../footer.rst:71 df03f1070dd943619e9f3dadad565ac3 +#: ../../footer.rst:60 5f7c2ee2445b4bd69c561fa6fb3cf797 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 50d84d633178419fb817267b0caa4bd1 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/document-writer-class.mo b/docs/locales/ja/LC_MESSAGES/document-writer-class.mo index 7158e4af4..e75a9a871 100644 Binary files a/docs/locales/ja/LC_MESSAGES/document-writer-class.mo and b/docs/locales/ja/LC_MESSAGES/document-writer-class.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/document-writer-class.po b/docs/locales/ja/LC_MESSAGES/document-writer-class.po index 6ed63d666..e02bb16a7 100644 --- a/docs/locales/ja/LC_MESSAGES/document-writer-class.po +++ b/docs/locales/ja/LC_MESSAGES/document-writer-class.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,35 +19,35 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 6cc0e8ac5f244cbd97f5d029b9eb74fb +#: ../../header.rst:-1 a8b3ae3a5d614d1e8729320973185b23 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 eb0773dccb00411891fdafad458c83f8 +#: ../../header.rst:-1 fdd48e8301e84183b56ee383e825d1d8 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 90875fdb13024fb0ab3fe33ce6e1be5c +#: ../../header.rst:-1 ee68e630d503448088146398fe92de3e msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../document-writer-class.rst:7 6dda096b4a85494193b56118ea46e3d2 +#: ../../document-writer-class.rst:7 2e25f1ee520c42cd915962f032064cf1 msgid "DocumentWriter" msgstr "DocumentWriter(ドキュメントライター)" -#: ../../document-writer-class.rst:9 1b905e1faf1945c08252fa15ff219b68 +#: ../../document-writer-class.rst:9 9c9bc94001de467cb49c9bf4b7b82cfc msgid "|pdf_only_class|" msgstr "PDFのみ。" -#: ../../document-writer-class.rst:12 9841d5f1ad984b92b338bf5cd3fcc4ab +#: ../../document-writer-class.rst:12 0d6e81eab559420a9cb87ac6aab3fea5 msgid "New in v1.21.0" msgstr "バージョン1.21.0で導入" -#: ../../document-writer-class.rst:14 d513a48f2d3946f08c15008eb4bc8a12 +#: ../../document-writer-class.rst:14 b10e3b014d11420d87f829cd717b0cd1 msgid "" "This class represents a utility which can output various :ref:`document " "types supported by PyMuPDF`." @@ -55,7 +55,7 @@ msgstr "" "このクラスは、MuPDFで :ref:`サポートされている ` " "さまざまなドキュメントタイプを出力できるユーティリティを表します。" -#: ../../document-writer-class.rst:16 370a84d838374222b2e29e34c46b1a2f +#: ../../document-writer-class.rst:16 9c4bec500209410f8b4cbcf2371d35db msgid "" "In |PyMuPDF| only used for outputting PDF documents whose pages are " "populated by :ref:`Story` DOMs." @@ -63,64 +63,64 @@ msgstr "" "PyMuPDFでは、:ref:`Story` " "DOM(ドキュメントオブジェクトモデル)でページが埋められたPDFドキュメントを出力するためにのみ使用されます。" -#: ../../document-writer-class.rst:18 ef4acc25ff334d7994d964ccee0aa08f +#: ../../document-writer-class.rst:18 9871fdeac3864a2da5273e4540a0a267 msgid "" "Using DocumentWriter_ also for other document types might happen in the " "future." msgstr "将来的には、DocumentWriter_ を他のドキュメントタイプにも使用することがあるかもしれません。" -#: ../../document-writer-class.rst:21 a21200170df9414aaa92e1c2ca7b9c2e +#: ../../document-writer-class.rst:21 9968d643215c4572b41cf341313b8f65 msgid "**Method / Attribute**" msgstr "**メソッド/属性** " -#: ../../document-writer-class.rst:21 fe81a17aa0794a23a048e256d138db9e +#: ../../document-writer-class.rst:21 606c7ae0f2594eddbe42178bb8644d9a msgid "**Short Description**" msgstr "**簡単な説明** " -#: ../../document-writer-class.rst:23 bd02f6e6f251410cbe67d2ebf7ba6c86 +#: ../../document-writer-class.rst:23 50c0babb7b8840198f03c08d30e9d3c5 msgid ":meth:`DocumentWriter.begin_page`" msgstr "" -#: ../../document-writer-class.rst:23 8de7c7895315442d97757c6be40b055b +#: ../../document-writer-class.rst:23 3bb196d61c3a4aa0b7994d563be77f25 msgid "start a new output page" msgstr "新しい出力ページを開始します。" -#: ../../document-writer-class.rst:24 ae7af0e374c04a77b26379e15a0067e4 +#: ../../document-writer-class.rst:24 1f63440a5b0e4d6ea6e75dda50dddea3 msgid ":meth:`DocumentWriter.end_page`" msgstr "" -#: ../../document-writer-class.rst:24 8406b60abb4045a795dd82e6c968ecda +#: ../../document-writer-class.rst:24 10f5e50934fe4657a5d2600346ceafcf msgid "finish the current output page" msgstr "現在の出力ページを終了します。" -#: ../../document-writer-class.rst:25 5254e5e8236743ac966c9f80723ea45b +#: ../../document-writer-class.rst:25 b0dad4d0d79645819b89624337d71ac9 msgid ":meth:`DocumentWriter.close`" msgstr "" -#: ../../document-writer-class.rst:25 2f8e5713b38e40e69cadc2ddf2c86ae7 +#: ../../document-writer-class.rst:25 7fbb29ccb4b845ec90dd86ccb30df13f msgid "flush pending output and close the file" msgstr "保留中の出力をフラッシュし、ファイルを閉じます。" -#: ../../document-writer-class.rst:28 2be66733df524f5595aed0c767a9ee40 +#: ../../document-writer-class.rst:28 1c4c83c4a8944dd48400b056f6f197d2 msgid "**Class API**" msgstr "**クラスAPI** " -#: ../../document-writer-class.rst:34 45f9cffaa469418a9a004aa79c8b3ec9 +#: ../../document-writer-class.rst:34 b3f94e8ec90e4ea783dc2ad85b3a4c37 msgid "" "Create a document writer object, passing a Python file pointer or a file " "path. Options to use when saving the file may also be passed." msgstr "Pythonファイルポインタまたはファイルパスを渡してドキュメントライターオブジェクトを作成します。ファイルを保存する際に使用するオプションも渡すことができます。" -#: ../../document-writer-class.rst:36 6825fcfe6f4f42bb9a077f5d41a59a9d +#: ../../document-writer-class.rst:36 8c30ef19be644ae4acdc8aa962a11f4b msgid "This class can also be used as a Python context manager." msgstr "このクラスはPythonのコンテキストマネージャとしても使用できます。" -#: ../../document-writer-class.rst 3efd206bd9d946b8a7a7cf661d060281 -#: 9c5921ffd7d74ff393de9353a515debf +#: ../../document-writer-class.rst 269746a16d004bdba23418807f5f2e30 +#: d6b77987b178432f8bf67e15280f52aa msgid "Parameters" msgstr "" -#: ../../document-writer-class.rst:38 1d014c5d6b4c4f789506f5670704105b +#: ../../document-writer-class.rst:38 397489f724624b7e9532d6d269dd6670 msgid "" "the output file. This may be a string file name, or any Python file " "pointer. .. note:: By using a `io.BytesIO()` object as file pointer, a " @@ -129,13 +129,13 @@ msgid "" "by several example scripts in :ref:`Stories recipes`." msgstr "" -#: ../../document-writer-class.rst:38 f49cab779a194d72b45f4bc9be98a508 +#: ../../document-writer-class.rst:38 05e9879e1f4b4ae59a5e41c552e922db msgid "" "the output file. This may be a string file name, or any Python file " "pointer." msgstr "出力ファイル。これは文字列のファイル名またはPythonファイルポインタのいずれかです。" -#: ../../document-writer-class.rst:40 1ac9cb0802384ff4a5c0ddc688089790 +#: ../../document-writer-class.rst:40 37022195f8fe44c0806b5b19a88bcd4c msgid "" "By using a `io.BytesIO()` object as file pointer, a document writer can " "create a PDF in memory. Subsequently, this PDF can be re-opened for input" @@ -146,7 +146,7 @@ msgstr "" "オブジェクトをファイルポインタとして使用することで、ドキュメントライターはメモリ内にPDFを作成できます。その後、このPDFは入力用に再オープンしてさらに操作できます。これは、:ref:`Storiesレシピ`" " のいくつかのサンプルスクリプトで使用されています。" -#: ../../document-writer-class.rst:42 6ff507a3ad0445edb1b74aba580058ca +#: ../../document-writer-class.rst:42 76a68fdef51c4889b0ad25785985c8b1 msgid "" "specify saving options for the output PDF. Typical are \"compress\" or " "\"clean\". More possible values may be taken from help output of the " @@ -155,43 +155,42 @@ msgstr "" "出力PDFの保存オプションを指定します。一般的なものは「compress」や「clean」です。その他の可能な値は、`mutool " "convert` CLI ユーティリティのヘルプ出力から取得できます。" -#: ../../document-writer-class.rst:46 814a76ca3f4c419aa16e9e420d73243b +#: ../../document-writer-class.rst:46 26994c9b27a84276951802359dd085d9 msgid "Start a new output page of a given dimension." msgstr "指定された寸法の新しい出力ページを開始します。" -#: ../../document-writer-class.rst:48 80d9e598e0a64e2085faeae656892f2c +#: ../../document-writer-class.rst:48 76ed5effaf3f494e924c1e4409c325a4 msgid "" "a rectangle specifying the page size. After this method, output " "operations may write content to the page." msgstr "ページサイズを指定する矩形。このメソッドの後、出力操作はページにコンテンツを書き込むことができます。" -#: ../../document-writer-class.rst:52 1e03e3c19f7748caa9921fbb1646f8ea +#: ../../document-writer-class.rst:52 3ea8959411e545e6b5a8f32498bf303e msgid "" "Finish a page. This flushes any pending data and appends the page to the " "output document." msgstr "ページを終了します。保留中のデータをフラッシュし、ページを出力ドキュメントに追加します。" -#: ../../document-writer-class.rst:56 3304aed654d649a99208f101faee2b5c +#: ../../document-writer-class.rst:56 444a43febca543608815926d8f431a3e msgid "" "Close the output file. This method is required for writing any pending " "data." msgstr "出力ファイルを閉じます。保留中のデータを書き込むためにこのメソッドが必要です。" -#: ../../document-writer-class.rst:58 995b4369be52479caaff2b3bc98b2b3d +#: ../../document-writer-class.rst:58 6f307923a0ba47a5a19b6b9a85f7bdc9 msgid "For usage examples consult the section of :ref:`Story`." msgstr "使用例については、:ref:`Story` のセクションを参照してください。" -#: ../../footer.rst:60 eaff185422424f1785993d42eb40b396 +#: ../../footer.rst:60 0ad0cba35bcc45868f1d5640bc7e226b msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 79731ce52c80478c95271c1d455e4cbc -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/document.mo b/docs/locales/ja/LC_MESSAGES/document.mo index ab20a24a8..7d5f68cac 100644 Binary files a/docs/locales/ja/LC_MESSAGES/document.mo and b/docs/locales/ja/LC_MESSAGES/document.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/document.po b/docs/locales/ja/LC_MESSAGES/document.po index 728693a98..cb7f9dbc1 100644 --- a/docs/locales/ja/LC_MESSAGES/document.po +++ b/docs/locales/ja/LC_MESSAGES/document.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,33 +19,33 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 e08c8e42455145459aa926d61201dd5e +#: ../../header.rst:-1 98ab536d639d43b3acc623a987a0f047 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 758e28de507d432ea9fe4cc8f28c1380 +#: ../../header.rst:-1 f7af9c3d1ef640149349d799451b6946 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 b82e683a77c04179aa015acaadc45ec7 +#: ../../header.rst:-1 2aadb102c464428888e2574393e9f1cd msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../document.rst:7 6f5de1250fcf4b73be2eb5a7f4448e25 +#: ../../document.rst:7 91ed63d1daa94a11bb6e9e3d2e263b47 msgid "Document" msgstr "Document (ドキュメント)" -#: ../../document.rst:11 762169eed98d48a6aa51d2d95b703bda +#: ../../document.rst:11 9f3d3e5cbffc4fa9b669d55af51adf35 msgid "" "This class represents a document. It can be constructed from a file or " "from memory." msgstr "このクラスはドキュメントを表します。ファイルまたはメモリから構築することができます。" -#: ../../document.rst:13 8b8d68bfe7dc481d94dba81c8b488634 +#: ../../document.rst:13 fc5a69fcc5e04dcbb95118c5e0848aac msgid "" "There exists the alias *open* for this class, i.e. " "`pymupdf.Document(...)` and `pymupdf.open(...)` do exactly the same " @@ -54,11 +54,11 @@ msgstr "" "このクラスには *「open」* というエイリアスが存在し、つまり、 `pymupdf.Document(...)` と " "`pymupdf.open(...)` はまったく同じことを行います。" -#: ../../document.rst:15 84c3f9810c0048ab800e4486a604cb69 +#: ../../document.rst:15 48be984cc280465dba5b9ad59ee8f6f8 msgid "For details on **embedded files** refer to Appendix 3." msgstr "**埋め込まれたファイル** の詳細については、付録3を参照してください。" -#: ../../document.rst:19 143dfd6eb2db4571b15f6dba1c2fa876 +#: ../../document.rst:19 bae151c2e8724244a9554194cbdc2ba4 msgid "" "Starting with v1.17.0, a new page addressing mechanism for **EPUB files " "only** is supported. This document type is internally organized in " @@ -71,7 +71,7 @@ msgstr "" "の新しいページアドレッシングメカニズムがサポートされています。このドキュメントタイプは、ページがその「場所」によって最も効率的に見つけられるように、章ごとに内部的に組織されています。場所は" " *(章、pno)* というタプルで構成され、章番号と **その章の中** のページ番号を指します。どちらの番号もゼロベースです。" -#: ../../document.rst:21 6920e4a9afec4b6598da82bb515452de +#: ../../document.rst:21 50766760714f494fbac95f548cf5b87f msgid "" "While it is still possible to locate a page via its (absolute) number, " "doing so may mean that the complete EPUB document must be laid out before" @@ -82,7 +82,7 @@ msgstr "" "依然として(絶対的な)番号を使用してページを見つけることは可能ですが、これを行うとページにアクセスする前に完全なEPUBドキュメントをレイアウトする必要があるかもしれません。これはドキュメントが非常に大きい場合、重要なパフォーマンスの影響を持つ可能性があります。ページの" " *(章、pno)* を使用することで、これを防ぐことができます。" -#: ../../document.rst:23 c63ced38bea9491b99463c60f6e3a2f5 +#: ../../document.rst:23 2c02a7c9f16f4727850836322bf68e47 msgid "" "To maintain a consistent API, PyMuPDF supports the page *location* syntax" " for **all file types** -- documents without this feature simply have " @@ -93,7 +93,7 @@ msgstr "" "この機能のないドキュメントは単に1つの章を持っています。:meth:`Document.load_page` および同等のインデックスアクセスも " "*場所* 引数をサポートしています。" -#: ../../document.rst:25 5942100229a84b98820f7b20f6deac6b +#: ../../document.rst:25 9ba193b74a5a49169207809d41c71a5b msgid "" "There are a number of methods for converting between page numbers and " "locations, for determining the chapter count, the page count per chapter," @@ -101,977 +101,985 @@ msgid "" "location of a document." msgstr "ページ番号と場所の間で変換するためのいくつかのメソッドがあり、章の数を決定するためのメソッド、章ごとのページ数を決定するためのメソッド、次の場所と前の場所を計算するためのメソッド、およびドキュメントの最後のページの場所を計算するためのメソッドがあります。" -#: ../../document.rst:28 e3824d2bedc04de48393898445d4aab9 +#: ../../document.rst:28 101d535d2aa7406997700ef159b35072 msgid "**Method / Attribute**" msgstr "**メソッド / 属性** " -#: ../../document.rst:28 9879da6661114d05972130be75da5cb9 +#: ../../document.rst:28 e591cb1507ca46bdb0b159d377b5646e msgid "**Short Description**" msgstr "**短い説明** " -#: ../../document.rst:30 e911f2c784464f7cba7716ba494493d4 +#: ../../document.rst:30 eab995d9258c4b96889775bd41ac9837 msgid ":meth:`Document.add_layer`" msgstr "" -#: ../../document.rst:30 15d9ff16ab144e5786a871444f83ae31 +#: ../../document.rst:30 ec69b29cdf7d42fe874dcbe3cf954624 msgid "PDF only: make new optional content configuration" msgstr "PDFのみ:新しいオプションコンテンツ設定を作成" -#: ../../document.rst:31 1f4f9304644943d3bb03d00134277cb3 +#: ../../document.rst:31 b32c6489722044d6bb04d9ca99eb56bd msgid ":meth:`Document.add_ocg`" msgstr "" -#: ../../document.rst:31 c61f34fcd3fb48d3b6da887f995a6936 +#: ../../document.rst:31 603f2cfc649a4452b0c4487a39e4ddcf msgid "PDF only: add new optional content group" msgstr "PDFのみ:新しいオプションコンテンツグループを追加" -#: ../../document.rst:32 a14eb6cb7b9741c790beb659909a29cc +#: ../../document.rst:32 66c21ebcefc24dfd9bbc44c2e661b231 msgid ":meth:`Document.authenticate`" msgstr "" -#: ../../document.rst:32 a324cdead7d14cbc99ea63effb0a575b +#: ../../document.rst:32 b6f6506ad5a348559982cfec77798887 msgid "gain access to an encrypted document" msgstr "暗号化されたドキュメントへのアクセスを取得" -#: ../../document.rst:33 eac1dc3cfe2240e19e432e2b5fffa024 +#: ../../document.rst:33 12e2f803568b424e8a90ce4141036d08 #, fuzzy msgid ":meth:`Document.bake`" msgstr ":meth:`Document.make_bookmark` によって作成されたもの。" -#: ../../document.rst:33 40dcc041346349da9dcc55f454786dfb +#: ../../document.rst:33 401b0220462942d0a1dfee34da205ed0 msgid "PDF only: make annotations / fields permanent content" -msgstr "" +msgstr "PDFのみ:注釈やフォームフィールドを永続的なコンテンツに変換します" -#: ../../document.rst:34 f3daa255900245568e583bf0c64a0291 +#: ../../document.rst:34 dd50f99a786e41ebbd68cd9fb8ca64c1 msgid ":meth:`Document.can_save_incrementally`" msgstr "" -#: ../../document.rst:34 9fc6062c3a7643d995e0886474a7152f +#: ../../document.rst:34 f6350528b09d43a7a0d13ebd1dcbaa8c msgid "check if incremental save is possible" msgstr "インクリメンタルセーブが可能かどうかを確認" -#: ../../document.rst:35 c79cbac6f0f24edcaceaaee61a2d7312 +#: ../../document.rst:35 699412e9b737479aa96a155d07f5288f msgid ":meth:`Document.chapter_page_count`" msgstr "" -#: ../../document.rst:35 4a711a2da5904b00b1eeb8d6031aa03a +#: ../../document.rst:35 0b0be59b6e7e484a9d0c7452df811b16 msgid "number of pages in chapter" msgstr "章内のページ数" -#: ../../document.rst:36 ef393d65c89a483abe14e4a61cd3d7f4 +#: ../../document.rst:36 102487c46b774d30a292cf28495c812c msgid ":meth:`Document.close`" msgstr "" -#: ../../document.rst:36 b66788d9c80b444a8f9b2f812ca5ce3f +#: ../../document.rst:36 70aa8cb1d13540378325fc97d4425de1 msgid "close the document" msgstr "ドキュメントを閉じる" -#: ../../document.rst:37 57a5df923d00498e879da53c6f412692 +#: ../../document.rst:37 655a998dd4b244e9bbd5b37980161f2a msgid ":meth:`Document.convert_to_pdf`" msgstr "" -#: ../../document.rst:37 6125025d3de148aea47884be4421e123 +#: ../../document.rst:37 ab3b992bbb8f4642929774c741a037c3 msgid "write a PDF version to memory" msgstr "PDFバージョンをメモリに書き込む" -#: ../../document.rst:38 654d46f8153049268b66c10b5bc31ec0 +#: ../../document.rst:38 ca3640236b37479ab5c9e8b2ec3dc1b9 msgid ":meth:`Document.copy_page`" msgstr "" -#: ../../document.rst:38 266f964f4daa4efb931274a054a7dea3 +#: ../../document.rst:38 448a7ecc912642419a75151501593012 msgid "PDF only: copy a page reference" msgstr "PDFのみ:ページの参照をコピー" -#: ../../document.rst:39 8d74eef48b7a44878d27061f5e08d6f5 +#: ../../document.rst:39 69eee92a9eb944568380ed7b71683ec4 msgid ":meth:`Document.del_toc_item`" msgstr "" -#: ../../document.rst:39 d059ab4f20734a289950142207bfb381 +#: ../../document.rst:39 66b8afea9df7476d80d2c062415dec73 msgid "PDF only: remove a single TOC item" msgstr "PDFのみ:単一のTOCアイテムを削除" -#: ../../document.rst:40 209e0eff420f47bca7c5746d4f3f7dc0 +#: ../../document.rst:40 3886de667ca24e39a76c448e8fc25248 msgid ":meth:`Document.delete_page`" msgstr "" -#: ../../document.rst:40 3e12c52320b54c2081a628acafc5650f +#: ../../document.rst:40 b8617e651a684f0dbf65fb708b8ed404 msgid "PDF only: delete a page" msgstr "PDFのみ:ページを削除" -#: ../../document.rst:41 f7d0106dd9bc45c4b7d53aa44c7e6a5c +#: ../../document.rst:41 8d7d194ed7644002b844a1c2bd69d45b msgid ":meth:`Document.delete_pages`" msgstr "" -#: ../../document.rst:41 baca7a036a2d491b863b4e812767b55f +#: ../../document.rst:41 6f1a4f2ce41445918429ec201d106bad msgid "PDF only: delete multiple pages" msgstr "PDFのみ:複数のページを削除" -#: ../../document.rst:42 f4ef57929a3547bab684ab3ff27f1c4f +#: ../../document.rst:42 e4152c296d094c5c87aaeb21236efc3b msgid ":meth:`Document.embfile_add`" msgstr "" -#: ../../document.rst:42 e2191143acf34a659992c45d08e15547 +#: ../../document.rst:42 d11fa614b1cf449893e4d4ab9e012cfd msgid "PDF only: add a new embedded file from buffer" msgstr "PDFのみ:バッファから新しい埋め込みファイルを追加" -#: ../../document.rst:43 bef353a110874180bdff64ceba0ec348 +#: ../../document.rst:43 988a9e7c75c042d5a2f905574053e033 msgid ":meth:`Document.embfile_count`" msgstr "" -#: ../../document.rst:43 4d8392ca3afd4f58b1021e0042f15519 +#: ../../document.rst:43 748a5953ba754e8ca862b037d4d302aa msgid "PDF only: number of embedded files" msgstr "PDFのみ:埋め込みファイルの数" -#: ../../document.rst:44 68a63f527eca4bbe80e62213f82f8569 +#: ../../document.rst:44 f25fa2c51c3e4be093367edee0a6917e msgid ":meth:`Document.embfile_del`" msgstr "" -#: ../../document.rst:44 6438d7b1ffa34ee882c0820610ad1779 +#: ../../document.rst:44 77af58e470c84741aad17647af48762d msgid "PDF only: delete an embedded file entry" msgstr "PDFのみ:埋め込みファイルエントリを削除" -#: ../../document.rst:45 1f84b8ce75ce44228415785e2eb93dbf +#: ../../document.rst:45 a9fded50fc1f4d7a9a5aa3de403dc9d0 msgid ":meth:`Document.embfile_get`" msgstr "" -#: ../../document.rst:45 1aec91a94a144257a332cc88b12d850c +#: ../../document.rst:45 996e583127cb46e0aae26829538d18ed msgid "PDF only: extract an embedded file buffer" msgstr "PDFのみ:埋め込みファイルバッファを抽出" -#: ../../document.rst:46 48c237e906d44bba8309c6b6fefa6e2e +#: ../../document.rst:46 dc64a6f81f6f45a3adac7fb1562bfe69 msgid ":meth:`Document.embfile_info`" msgstr "" -#: ../../document.rst:46 8b52ba8d569a4d2db4b38c8a88c58aa0 +#: ../../document.rst:46 992bfccef1144733b132d3186109594a msgid "PDF only: metadata of an embedded file" msgstr "PDFのみ:埋め込みファイルのメタデータ" -#: ../../document.rst:47 ace7094b5ce24a0d90f229edcba31528 +#: ../../document.rst:47 eddf644557f44c1a8501bd84440647a2 msgid ":meth:`Document.embfile_names`" msgstr "" -#: ../../document.rst:47 3c44fa9dad4e4430baeda8b21528c5db +#: ../../document.rst:47 f76de0f95e48441ea3e7515269ae8c92 msgid "PDF only: list of embedded files" msgstr "PDFのみ:埋め込みファイルのリスト" -#: ../../document.rst:48 0f3d758e15514ef09a9e74e3a2890d28 +#: ../../document.rst:48 8331588255db4e3e8a3dab614ae120e7 msgid ":meth:`Document.embfile_upd`" msgstr "" -#: ../../document.rst:48 fa80eaa1cad64530a4e18b4448262d2d +#: ../../document.rst:48 5ae51b3f54064cf182e546ae5e44d7d1 msgid "PDF only: change an embedded file" msgstr "PDFのみ:埋め込みファイルを変更" -#: ../../document.rst:49 407fd0954a464a989162a3adb3eec14d +#: ../../document.rst:49 1c2742d215a54f68a0a1f16644a2a6db msgid ":meth:`Document.extract_font`" msgstr "" -#: ../../document.rst:49 a4e909a345114fd9851ee36dd645bbb2 +#: ../../document.rst:49 310f24e31cdd4a2cb66bfebaabf27431 msgid "PDF only: extract a font by :data:`xref`" msgstr "PDFのみ: :data:`xref` によるフォントの抽出" -#: ../../document.rst:50 1633687ae093470a9cb947b9a75ccac5 +#: ../../document.rst:50 8c856cf6518e49398c7f76a36e95dfd9 msgid ":meth:`Document.extract_image`" msgstr "" -#: ../../document.rst:50 c0aec7cef1de464d81d00ef649613a81 +#: ../../document.rst:50 a0a3ca83952a4c8bac3bb40a1e11eb46 msgid "PDF only: extract an embedded image by :data:`xref`" msgstr "PDFのみ: :data:`xref` による埋め込み画像の抽出" -#: ../../document.rst:51 f6b5ea3fe1f845b08f6ecbba6bc9cd3c +#: ../../document.rst:51 ad16d5d64d0a4092bc34738d3139b218 msgid ":meth:`Document.ez_save`" msgstr "" -#: ../../document.rst:51 831c558654784cb59bd1292e50a63d2b +#: ../../document.rst:51 94a8bbd646c74dbe973c5fb9c12e0e14 msgid "PDF only: :meth:`Document.save` with different defaults" msgstr "PDFのみ:異なるデフォルト値で :meth:`Document.save` を実行" -#: ../../document.rst:52 48957e3354ef4f1f9a42e8e703fb5b5e +#: ../../document.rst:52 6208bc9fd0704a379ae5a114b79b1f56 msgid ":meth:`Document.find_bookmark`" msgstr "" -#: ../../document.rst:52 1e53be1cd3194566b7adfdde8a23ef3e +#: ../../document.rst:52 fe4449f51f9b40bb97e1199450d8face msgid "retrieve page location after laid out document" msgstr "レイアウトされたドキュメント後のページ位置を取得" -#: ../../document.rst:53 fa4213c3e3e240caa890b3ba4a59861e +#: ../../document.rst:53 7c0242efa90849c5b0ce401b8cbb9949 msgid ":meth:`Document.fullcopy_page`" msgstr "" -#: ../../document.rst:53 6da9e19b0a22427ba2b2b4c61c6e6102 +#: ../../document.rst:53 b2e7d5ed0d62420ca6cc2fa6d2244514 msgid "PDF only: duplicate a page" msgstr "PDFのみ:ページの複製" -#: ../../document.rst:54 0b2af391fe164b86a0416dd16ab7d7dc +#: ../../document.rst:54 5b80ea3741bb4f898d03fa67f6ae3a34 msgid ":meth:`Document.get_layer`" msgstr "" -#: ../../document.rst:54 6212285594404748bf995d800771068f +#: ../../document.rst:54 a7706b707989466cb4383d64cadadb13 msgid "PDF only: lists of OCGs in ON, OFF, RBGroups" msgstr "PDFのみ:ON、OFF、RBGroups内のOCGのリスト" -#: ../../document.rst:55 dae7cb37984546fa8424b117073bba0a +#: ../../document.rst:55 acdbc4e25e18460499b5e12cf6808a32 msgid ":meth:`Document.get_layers`" msgstr "" -#: ../../document.rst:55 5997a51cbd64483b97b8bff0160969e3 +#: ../../document.rst:55 eea448604cdc4bd9a737f7b0c22c84cd msgid "PDF only: list of optional content configurations" msgstr "PDFのみ:オプションコンテンツ設定のリスト" -#: ../../document.rst:56 ff678b989afa4972ab808e2f3da689f8 +#: ../../document.rst:56 8d6c3f3828cc4e60b7ce7780cd5c87f2 msgid ":meth:`Document.get_oc`" msgstr "" -#: ../../document.rst:56 cea8262d2fce4f2a953bd4735e26b2bd +#: ../../document.rst:56 444960953f2c46d98b04eba21fb3db06 msgid "PDF only: get OCG /OCMD xref of image / form xobject" msgstr "PDFのみ:画像/フォームオブジェクトのOCG / OCMD xrefを取得" -#: ../../document.rst:57 e08ffd7dad524d4bb257f058735c74eb +#: ../../document.rst:57 e2e7d707a6344fb292edcbd1208cac47 msgid ":meth:`Document.get_ocgs`" msgstr "" -#: ../../document.rst:57 fc77df7e0920446b85c9ce0e64183080 +#: ../../document.rst:57 0bf8c1b011ef4121b2d67a5f2c2f65f2 msgid "PDF only: info on all optional content groups" msgstr "PDFのみ:すべてのオプションコンテンツグループの情報" -#: ../../document.rst:58 346a69832bcd4b15874a5b259d21a185 +#: ../../document.rst:58 4557616c5e13460c8b6e717bc9e81f9b msgid ":meth:`Document.get_ocmd`" msgstr "" -#: ../../document.rst:58 e2e02d856a7b4c97aa5bab7c4b330ec8 +#: ../../document.rst:58 d1f76d8b9b514eb9baac040bc8ded891 msgid "PDF only: retrieve definition of an :data:`OCMD`" msgstr "PDFのみ: :data:`OCMD` の定義を取得" -#: ../../document.rst:59 8cb0ce951ff14d9badf40a8674108556 +#: ../../document.rst:59 a5a109993ee248f4a5d11f965d1d664a msgid ":meth:`Document.get_page_fonts`" msgstr "" -#: ../../document.rst:59 7012d925bc66477a9eab2fd218211ce4 +#: ../../document.rst:59 804a7b3ca19241aab72f12dd6a7b82a8 msgid "PDF only: list of fonts referenced by a page" msgstr "PDFのみ:ページで参照されるフォントのリスト" -#: ../../document.rst:60 1605111f0c284ae29850ae9a3a906fae +#: ../../document.rst:60 756196df77ba4196b51697d3086cddfe msgid ":meth:`Document.get_page_images`" msgstr "" -#: ../../document.rst:60 4761a4ac7d8b4c87bcb4afe1c3099bd6 +#: ../../document.rst:60 aed2189676e14abf9889bfa19f732e4c msgid "PDF only: list of images referenced by a page" msgstr "PDFのみ:ページで参照される画像のリスト" -#: ../../document.rst:61 7b52e7e756d04b71afc69304198b2843 +#: ../../document.rst:61 ca1b48537c664584843d36787fd2cc0c msgid ":meth:`Document.get_page_labels`" msgstr "" -#: ../../document.rst:61 31034fd8a5634a2b88044ef09b61b470 +#: ../../document.rst:61 7e0edb35b8d24533a094d32b40609986 msgid "PDF only: list of page label definitions" msgstr "PDFのみ:ページラベルの定義のリスト" -#: ../../document.rst:62 da98cf542aa649f99ea8c39904aae7d3 +#: ../../document.rst:62 f137fd86eb1d4427924ba25cb7174235 msgid ":meth:`Document.get_page_numbers`" msgstr "" -#: ../../document.rst:62 6b06f19277b146879f5bb331aef4c78b +#: ../../document.rst:62 cb23b05728334b81888952a1f04cddee msgid "PDF only: get page numbers having a given label" msgstr "PDFのみ:指定されたラベルを持つページ番号を取得" -#: ../../document.rst:63 b6da3f18e309408482b1dd51f4f48ce1 +#: ../../document.rst:63 f9b524b5add743f28aee3840c0912855 msgid ":meth:`Document.get_page_pixmap`" msgstr "" -#: ../../document.rst:63 7f11ae5252484567a64dcfdc0c95abfb +#: ../../document.rst:63 869e93413cee426dbb502720bc9313ae msgid "create a pixmap of a page by page number" msgstr "ページ番号によるページのピクスマップの作成" -#: ../../document.rst:64 aa0b16ea2d3b4fc5a1a507912b51ed3d +#: ../../document.rst:64 53b7e4d2648e439297d2c85812a5b802 msgid ":meth:`Document.get_page_text`" msgstr "" -#: ../../document.rst:64 d3f499edf22b47e5836a84083e661741 +#: ../../document.rst:64 1f7da7792ddd430fa0c718b83a5c7f99 msgid "extract the text of a page by page number" msgstr "ページ番号によるページのテキストの抽出" -#: ../../document.rst:65 48d3ee1e8112402f92a2983b7414aa10 +#: ../../document.rst:65 1b104a47ab3942528dc1e4aea861cfe4 msgid ":meth:`Document.get_page_xobjects`" msgstr "" -#: ../../document.rst:65 b0e68187562c485da473617cf8772fc3 +#: ../../document.rst:65 aa52803a2c63433db60e2cce48c22766 msgid "PDF only: list of XObjects referenced by a page" msgstr "PDFのみ:ページで参照されるXObjectのリスト" -#: ../../document.rst:66 0874e0e2d4bc4dd3b8d5da8f5e381dd8 +#: ../../document.rst:66 ca303e88911644c4a131146214f643d7 msgid ":meth:`Document.get_sigflags`" msgstr "" -#: ../../document.rst:66 7d11b632cd454ebd832e1bf19d4ab3f9 +#: ../../document.rst:66 79de646a9e854a00acca4ea4f8460071 msgid "PDF only: determine signature state" msgstr "PDFのみ:署名状態を確認" -#: ../../document.rst:67 c9655e9c2db647ae900f1842fd96ac10 +#: ../../document.rst:67 7afcaf2f8a1148e2a7fbf39b2cf5cc21 msgid ":meth:`Document.get_toc`" msgstr "" -#: ../../document.rst:67 1b17f4e0b6954239b113ecff52c5aa2e +#: ../../document.rst:67 af1837052c6f4040b800b893256abff5 msgid "extract the table of contents" msgstr "目次を抽出" -#: ../../document.rst:68 f0b3b4f156b844fab1484369ba2adbb7 +#: ../../document.rst:68 98ea1f995fc14171b885e0993bcfe717 msgid ":meth:`Document.get_xml_metadata`" msgstr "" -#: ../../document.rst:68 d75d24a146a84d2e8978463b0fab64a3 +#: ../../document.rst:68 e31f72febe2548a086cf164f57dcc6aa msgid "PDF only: read the XML metadata" msgstr "PDFのみ:XMLメタデータを読み込む" -#: ../../document.rst:69 49fa026b8b064c9f8d558bad37464b3e +#: ../../document.rst:69 1532f2bf38714ad893ba5421b5a9dfeb msgid ":meth:`Document.has_annots`" msgstr "" -#: ../../document.rst:69 c0f709dc69e948a797de09047d46a95f +#: ../../document.rst:69 f94f14927d3b441891a3888a7a181505 msgid "PDF only: check if PDF contains any annots" msgstr "PDFのみ:PDFに注釈が含まれているかを確認" -#: ../../document.rst:70 3968a34e9a064de79c0c257a0dbc2569 +#: ../../document.rst:70 4142700081b942d4adff9318c2df9fb0 msgid ":meth:`Document.has_links`" msgstr "" -#: ../../document.rst:70 1d1320b54f2c4c8abb3aa7a81a84b41f +#: ../../document.rst:70 2969def0330446c29aa7b0da7e59a20e msgid "PDF only: check if PDF contains any links" msgstr "PDFのみ:PDFにリンクが含まれているかを確認" -#: ../../document.rst:71 4b58c0e9439b47a4b58951203fd4078e +#: ../../document.rst:71 f694e20f753d474bbc341264ff9b801c msgid ":meth:`Document.insert_page`" msgstr "" -#: ../../document.rst:71 ee496ed23fd54dd9bf0033e5f1cad08c +#: ../../document.rst:71 3ce06a744bc54da381c0cef76fb9c971 msgid "PDF only: insert a new page" msgstr "PDFのみ:新しいページを挿入" -#: ../../document.rst:72 f7d9bd26e34b49b6b0bf4b10ba85104f +#: ../../document.rst:72 3f0d3139b0ca48b5bbc63cca2e46d0aa msgid ":meth:`Document.insert_pdf`" msgstr "" -#: ../../document.rst:72 5b2b7b0d19a249b4b57ef9d5e13ee193 +#: ../../document.rst:72 734c32398f73447fb4f1a7c203e910a2 msgid "PDF only: insert pages from another PDF" msgstr "PDFのみ:別のPDFからページを挿入" -#: ../../document.rst:73 da19b5e12fc042b88a4b99268189dbd2 +#: ../../document.rst:73 bf568ebd79e244b79ebe84d50ceaaef7 msgid ":meth:`Document.insert_file`" msgstr "" -#: ../../document.rst:73 c111b1b3f9c340558b7bea1fc3c6c965 +#: ../../document.rst:73 2bff6082f5bf4f8a8d5dd5e999b9c074 msgid "PDF only: insert pages from arbitrary document" msgstr "PDFのみ:任意のドキュメントからページを挿入" -#: ../../document.rst:74 2913d3a92a3a4b23b8226fa0f8b2adf5 +#: ../../document.rst:74 f36ab9a883434e47bb27b5f7d6820181 msgid ":meth:`Document.journal_can_do`" msgstr "" -#: ../../document.rst:74 66614d1f54b846cb83aad21ba369b166 +#: ../../document.rst:74 e6eeec9eb2fa440886315cfddc27cecf msgid "PDF only: which journal actions are possible" msgstr "PDFのみ:どのジャーナルアクションが可能か" -#: ../../document.rst:75 d0b3b9ac33ce45c9a85c92c9e4a34124 +#: ../../document.rst:75 b8520aa73224496f84431ef46857f333 msgid ":meth:`Document.journal_enable`" msgstr "" -#: ../../document.rst:75 eae298208bef44d09f98331a7af43de8 +#: ../../document.rst:75 8c9eaf187688493da5404862ecebe535 msgid "PDF only: enables journalling for the document" msgstr "PDFのみ:ドキュメントのジャーナルを有効にする" -#: ../../document.rst:76 9923f89648d54088820a2ff4383baae1 +#: ../../document.rst:76 acfc3684bf71420f9c3bb2f249aa47e1 msgid ":meth:`Document.journal_load`" msgstr "" -#: ../../document.rst:76 620ba5fd1aed432fb20968dc8ce6c511 +#: ../../document.rst:76 851b0af1028f4f438b26a8f62dde1189 msgid "PDF only: load journal from a file" msgstr "PDFのみ:ファイルからジャーナルを読み込む" -#: ../../document.rst:77 1436e5d2c80d47b198e31fa60f4a44cc +#: ../../document.rst:77 16502c8afb224cb4895b301405e470de msgid ":meth:`Document.journal_op_name`" msgstr "" -#: ../../document.rst:77 38bde91ad4b345f9ba96b7ce63192d3c +#: ../../document.rst:77 ab7eabee94034ea2b6cbbc5653b06f13 msgid "PDF only: return name of a journalling step" msgstr "PDFのみ:ジャーナルステップの名前を返す" -#: ../../document.rst:78 ae20f83a05cc45e490fd7a379dc6e8e5 +#: ../../document.rst:78 19861328e93546d7922dddc5463b6662 msgid ":meth:`Document.journal_position`" msgstr "" -#: ../../document.rst:78 3df896c9990a4a5aa3f4abb3d5807883 +#: ../../document.rst:78 71d240ca35334b74bb905184ae7d52bd msgid "PDF only: return journalling status" msgstr "PDFのみ:ジャーナリングステータスを返す" -#: ../../document.rst:79 4dd0191582464ae8a8515d6ecaab332b +#: ../../document.rst:79 9cf39978bcdd428eb4f5d6c8e8658908 msgid ":meth:`Document.journal_redo`" msgstr "" -#: ../../document.rst:79 ff6f0b4fe13546d39762812b0c1aab0d +#: ../../document.rst:79 a9a683239adb45aaaefae5a648ac8ec1 msgid "PDF only: redo current operation" msgstr "PDFのみ:現在の操作をやり直す" -#: ../../document.rst:80 593eee3e98724b43a15a37d3b6f253fd +#: ../../document.rst:80 fdf2acdab0394fb5bb1ee5e0c32089ff msgid ":meth:`Document.journal_save`" msgstr "" -#: ../../document.rst:80 754f508ed31b4170b140da599b300bd0 +#: ../../document.rst:80 3ba31d5b0940484fa9fd230fc404e0e6 msgid "PDF only: save journal to a file" msgstr "PDFのみ:ジャーナルをファイルに保存" -#: ../../document.rst:81 973055885aa94370920a18b53a3710f3 +#: ../../document.rst:81 7e005e29d5d94997b3b3eb46a32f9317 msgid ":meth:`Document.journal_start_op`" msgstr "" -#: ../../document.rst:81 1247ea9f77024d069809e7509dc882c5 +#: ../../document.rst:81 82fad559780a4d2984cfcf94f13ea758 msgid "PDF only: start an \"operation\" giving it a name" msgstr "PDFのみ:名前を付けて「操作」を開始" -#: ../../document.rst:82 571c166d2e5d4eb68a8a39c59f6189f2 +#: ../../document.rst:82 eaf56262c7a64fb7ad21b3c269a0da50 msgid ":meth:`Document.journal_stop_op`" msgstr "" -#: ../../document.rst:82 c82bcb6dd55b45e980b4fe94bb8de356 +#: ../../document.rst:82 579541e1f64349eea6781fbcae25f23b msgid "PDF only: end current operation" msgstr "PDFのみ:現在の操作を終了" -#: ../../document.rst:83 133e0bd451694f8ca1f2b6a64ceb1e68 +#: ../../document.rst:83 d5ad2d3e28f84d1dad8c3636bcd96068 msgid ":meth:`Document.journal_undo`" msgstr "" -#: ../../document.rst:83 12ad1e74f27f484c8c56ad30708bbd8c +#: ../../document.rst:83 6e4da9715d7146e1aa6af075bf79afa7 msgid "PDF only: undo current operation" msgstr "PDFのみ:現在の操作を元に戻す" -#: ../../document.rst:84 0dcc45e930f940e5b0131d5cb1ee05fa +#: ../../document.rst:84 0ed2ea08b8f543f19c5f6208ad0883d6 msgid ":meth:`Document.layer_ui_configs`" msgstr "" -#: ../../document.rst:84 438c8a0acb8546d4a8b27f057157623b +#: ../../document.rst:84 eb101d7c6a27466884fbf40cf689f453 msgid "PDF only: list of optional content intents" msgstr "PDFのみ:オプションコンテンツインテントのリスト" -#: ../../document.rst:85 ec234f558a4b4b1590932c42f9463d58 +#: ../../document.rst:85 d76005cf42af4d37a6095588afe048e9 msgid ":meth:`Document.layout`" msgstr "" -#: ../../document.rst:85 fe8c1a83fbc943f0a09304d216833cfb +#: ../../document.rst:85 3f774a0f57124a15b684a9e2c01dc470 msgid "re-paginate the document (if supported)" msgstr "ドキュメントを再ページ化(サポートされている場合)" -#: ../../document.rst:86 f575b3b2410d4661ad2f346e7e45a8e3 +#: ../../document.rst:86 98c2ca1a60cd433bb8dc14a182819bf1 msgid ":meth:`Document.load_page`" msgstr "" -#: ../../document.rst:86 bd8dbbf0491a48ceb56228b8d74d9d05 +#: ../../document.rst:86 b522c2c4ac954d99a904f5ed4288a427 msgid "read a page" msgstr "ページを読み込む" -#: ../../document.rst:87 797d373ed11f4db2967b9514fabba6b3 +#: ../../document.rst:87 d09a13f7a9b543869281fc5835fcf910 msgid ":meth:`Document.make_bookmark`" msgstr "" -#: ../../document.rst:87 f5ac10e1a3df4c98ab3ee0d8e3f1e543 +#: ../../document.rst:87 c96cb50dda404fee9009d63b28b6f347 msgid "create a page pointer in reflowable documents" msgstr "リフローアブルドキュメント内でページポインタを作成" -#: ../../document.rst:88 fa2d576bac81481d92b7d302170dabf4 +#: ../../document.rst:88 a1f04d3cc46f449eac455e55b1702455 msgid ":meth:`Document.move_page`" msgstr "" -#: ../../document.rst:88 e6e93ebab99a489b813fba3c577e191f +#: ../../document.rst:88 86c2a62fc967429aa1db1ce5c33effb0 msgid "PDF only: move a page to different location in doc" msgstr "PDFのみ:ページをドキュメント内の異なる場所に移動" -#: ../../document.rst:89 b2d752f46fbd47058e82894697654895 +#: ../../document.rst:89 f00729c3537d477d91a79740c0987720 msgid ":meth:`Document.need_appearances`" msgstr "" -#: ../../document.rst:89 251477ab75bd47ff86b0593f7d62a323 +#: ../../document.rst:89 ede3c937486f4d33ab642efff2fc6f2d msgid "PDF only: get/set `/NeedAppearances` property" msgstr "PDFのみ: `/NeedAppearances` プロパティを取得/設定" -#: ../../document.rst:90 45ba6eb8b62d4ce89bdf67da23ccd980 +#: ../../document.rst:90 acb1170c62cf4a8cbb13e217bf3d5863 msgid ":meth:`Document.new_page`" msgstr "" -#: ../../document.rst:90 8ee57cbc04284ad9800247197362dcec +#: ../../document.rst:90 222ef3b17cbb4737ba82eacfb6a26d4a msgid "PDF only: insert a new empty page" msgstr "PDFのみ:新しい空白ページを挿入" -#: ../../document.rst:91 e6a19fd712ca406a82fbfcbf53d13835 +#: ../../document.rst:91 bae0b773a03d47ff823a6c000f56b9ec msgid ":meth:`Document.next_location`" msgstr "" -#: ../../document.rst:91 53f56e95a99c4689aedca4cb094ea148 +#: ../../document.rst:91 ca665637d3844075b0dc5dd4174a44db msgid "return (chapter, pno) of following page" msgstr "次のページの(章、pno)" -#: ../../document.rst:92 6bab4ebd27334933b0c3aa734162d3ad +#: ../../document.rst:92 a4959b83048c49a59f3e57e3aa9ab69d msgid ":meth:`Document.outline_xref`" msgstr "" -#: ../../document.rst:92 ffc6aac18acd46388dd16a8e4adca143 +#: ../../document.rst:92 26d12fcc9a2f424a8af7349a7b8783a9 msgid "PDF only: :data:`xref` a TOC item" msgstr "PDFのみ:TOCアイテムを :data:`xref` " -#: ../../document.rst:93 a35005a5f7814f5b80ab796214732b06 +#: ../../document.rst:93 13ccab21d94f4a5e97a2e2bd614097bc msgid ":meth:`Document.page_cropbox`" msgstr "" -#: ../../document.rst:93 5fe0d8d0280f42f5994ddecbf45b8a0d +#: ../../document.rst:93 0bce11acc6e6405083a654972d690499 msgid "PDF only: the unrotated page rectangle" msgstr "PDFのみ:回転していないページの矩形" -#: ../../document.rst:94 7947df8c4a3946feb1fb96c7cf997e46 +#: ../../document.rst:94 280be10fb5464b8fa611b4618447c111 msgid ":meth:`Document.page_xref`" msgstr "" -#: ../../document.rst:94 199f13363313409db98d2bb2136aefe1 +#: ../../document.rst:94 a6dab1c0c1b94e1982c4b5603cf78b4f msgid "PDF only: :data:`xref` of a page number" msgstr "PDFのみ:ページ番号の :data:`xref`" -#: ../../document.rst:95 9233cb6b739545a3aed4dd922ea4ac93 +#: ../../document.rst:95 740c31de378c453f962f41a1f8e2e018 msgid ":meth:`Document.pages`" msgstr "" -#: ../../document.rst:95 e56445be760a4df5ba43553822240d05 +#: ../../document.rst:95 dd9645ad29944deeb4aae5cc82d2c862 msgid "iterator over a page range" msgstr "ページ範囲のイテレータ" -#: ../../document.rst:96 f3bd07aed4f145c7bc9a035605522bda +#: ../../document.rst:96 f728fe24614647ab9badda0fc88bc1dc msgid ":meth:`Document.pdf_catalog`" msgstr "" -#: ../../document.rst:96 41cec6200fcf494f9535c1d248fea74d +#: ../../document.rst:96 459ef0598a31446694bf4c8516fa3acb msgid "PDF only: :data:`xref` of catalog (root)" msgstr "PDFのみ:カタログ(ルート)の :data:`xref` " -#: ../../document.rst:97 da73adb9b17b45f0ac935011ea70e8b2 +#: ../../document.rst:97 4fc0c49ad16a46fbb5677870f976f9fe msgid ":meth:`Document.pdf_trailer`" msgstr "" -#: ../../document.rst:97 0291457310a44b29aff6eebd1c9d3d70 +#: ../../document.rst:97 ae19b55dcead4271b9ef4673a6f487e0 msgid "PDF only: trailer source" msgstr "PDFのみ:トレイラーソース" -#: ../../document.rst:98 fa66fe3d14e14f59bcfa059284ec7e05 +#: ../../document.rst:98 7f3c95701b3249bcbd665c8f7060e0a6 msgid ":meth:`Document.prev_location`" msgstr "" -#: ../../document.rst:98 ef4720dd852d4b17aff8d0c754805185 +#: ../../document.rst:98 62dc836188774b84bd191037f02f29ed msgid "return (chapter, pno) of preceding page" msgstr "前のページの(章、pno)を返す" -#: ../../document.rst:99 5a82dcfe315f47ccb657a8445aa22993 +#: ../../document.rst:99 e62775f8eb9e44b9af6fc9edb21f904c +#, fuzzy +msgid ":meth:`Document.recolor`" +msgstr ":meth:`Document.make_bookmark` によって作成されたもの。" + +#: ../../document.rst:99 75788361bf0e490794958cd6a8d7237a +msgid "PDF only: execute :meth:`Page.recolor` for all pages" +msgstr "" + +#: ../../document.rst:100 eefda64ea8434c289242bbf8b59b5a5b msgid ":meth:`Document.reload_page`" msgstr "" -#: ../../document.rst:99 bf663c4b2d1d494f8b0ed141620fa56e +#: ../../document.rst:100 62d8e789a0f743b4a8288f88f271796d msgid "PDF only: provide a new copy of a page" msgstr "PDFのみ:ページの新しいコピーを提供" -#: ../../document.rst:100 cd243cc0418d4ebdae0fee9fca0b6aee +#: ../../document.rst:101 9fe05ae6fcc549d58be039c5feb766a1 msgid ":meth:`Document.resolve_names`" msgstr "" -#: ../../document.rst:100 5fe971880aaf46c5869498598532f690 -#, fuzzy +#: ../../document.rst:101 e77f3de589b548a1a2ea07c794ac264d msgid "PDF only: Convert destination names into a Python dict" msgstr "PDFのみ: ページの目的地名をPythonの辞書に変換します" -#: ../../document.rst:101 731a65d16bf34178bcdcc07ee174b3fa +#: ../../document.rst:102 a4a3b0c33b5441ae9537c01d4c44182e msgid ":meth:`Document.save`" msgstr "" -#: ../../document.rst:101 8ba0d3dd25e840dea06fbe4541b084d2 +#: ../../document.rst:102 2381f21b7ba446ee9d07de4a5042a777 msgid "PDF only: save the document" msgstr "PDFのみ:ドキュメントを保存" -#: ../../document.rst:102 20f7f8bd745c44a6a1a4547cee792421 +#: ../../document.rst:103 22e9feec64e04cebb9fe260965cba18c msgid ":meth:`Document.saveIncr`" msgstr "" -#: ../../document.rst:102 5102152a8cbd46b88d8e0e893b96a370 +#: ../../document.rst:103 6020023bd82a423083306e9a4ee1d666 msgid "PDF only: save the document incrementally" msgstr "PDFのみ:ドキュメントを増分保存" -#: ../../document.rst:103 3e098d35bc3b4844ae6db4a76711e1c7 +#: ../../document.rst:104 0bbdb390769b460eabab8ce497be52a3 msgid ":meth:`Document.scrub`" msgstr "" -#: ../../document.rst:103 bbfc3f5783c542cd81f2374d777b9d04 +#: ../../document.rst:104 aef6e70714864cf4b67ff4e403f02abc msgid "PDF only: remove sensitive data" msgstr "PDFのみ:機密データを削除" -#: ../../document.rst:104 00725edf146544f68042f8ca6fa3b35f +#: ../../document.rst:105 c47e007413e74a7d821f322d11acc7c4 msgid ":meth:`Document.search_page_for`" msgstr "" -#: ../../document.rst:104 40589b5f45ae433cbbad3e71d10a5de3 +#: ../../document.rst:105 14f84e3da71b48c2a311bc02648690ff msgid "search for a string on a page" msgstr "ページ上で文字列を検索" -#: ../../document.rst:105 eb931ce8f1ab4b179b63bdd3628348b5 +#: ../../document.rst:106 95cddc5e5594416f9ec6e21277a5b29c msgid ":meth:`Document.select`" msgstr "" -#: ../../document.rst:105 4e2ebafa0ca54fd98fd4800489437993 +#: ../../document.rst:106 d8d09032311747edaaa7645430822eab msgid "PDF only: select a subset of pages" msgstr "PDFのみ:ページのサブセットを選択" -#: ../../document.rst:106 97d863769a1b40c2b3e9828b3899c763 +#: ../../document.rst:107 3819c9e9ac8e43039b32be9d79ac86cc msgid ":meth:`Document.set_layer_ui_config`" msgstr "" -#: ../../document.rst:106 317b4e62884a41f68f724455b1dc7cea +#: ../../document.rst:107 5c70440924d84e419361c5d09b378663 msgid "PDF only: set OCG visibility temporarily" msgstr "PDFのみ:一時的にOCGの表示を設定" -#: ../../document.rst:107 43d2296fe63044a288a74d8803ebe8a6 +#: ../../document.rst:108 672520376dd241eeb303626ec81b1cfb msgid ":meth:`Document.set_layer`" msgstr "" -#: ../../document.rst:107 b3e197529ac34be68e8fc1c9a1753e40 +#: ../../document.rst:108 276c6b9b34fa43c9bd1e652c4ea30a2a msgid "PDF only: mass changing OCG states" msgstr "PDFのみ:OCGステータスを一括変更" -#: ../../document.rst:108 e8377363282a4dbbba579d6dcc08cc7d +#: ../../document.rst:109 00eeb62d0c454681bedac3fe485f088a msgid ":meth:`Document.set_markinfo`" msgstr "" -#: ../../document.rst:108 2c8d4410f59147ba9dfd33ae72378e68 +#: ../../document.rst:109 99b60ae09a654f56b55a4ad36936b7d3 msgid "PDF only: set the MarkInfo values" msgstr "PDFのみ:MarkInfoの値を設定" -#: ../../document.rst:109 c21bf1470b784d64b2511c98d4fa1912 +#: ../../document.rst:110 676fe5ab018c4804be2aaa38b1e204f9 msgid ":meth:`Document.set_metadata`" msgstr "" -#: ../../document.rst:109 23f390a5d6ab4499afe82c95e9dd8b60 +#: ../../document.rst:110 ae151ad30546419494fc89573935ccf8 msgid "PDF only: set the metadata" msgstr "PDFのみ:メタデータを設定" -#: ../../document.rst:110 274acdb8134e4690b850fb52d58fd474 +#: ../../document.rst:111 4f71e258fbbc487499c898f7f47bb6ad msgid ":meth:`Document.set_oc`" msgstr "" -#: ../../document.rst:110 8824a2f867404d7bbe14a4a205186da9 +#: ../../document.rst:111 c7e1976d016c4281b4ab331ae8e31835 msgid "PDF only: attach OCG/OCMD to image / form xobject" msgstr "PDFのみ:画像/フォームオブジェクトにOCG/OCMDを添付" -#: ../../document.rst:111 058cb1a1f7514cb094911ef1d19ca1de +#: ../../document.rst:112 bd0743fc6a3b4a12888fa5410dad247f msgid ":meth:`Document.set_ocmd`" msgstr "" -#: ../../document.rst:111 340a8644beb14e989f71494c63ae8508 +#: ../../document.rst:112 0b6eea3df4e4463f9dfc7363dbf1c750 msgid "PDF only: create or update an :data:`OCMD`" msgstr "PDFのみ::data:`OCMD` を作成または更新" -#: ../../document.rst:112 ea7b14f8269446309cb5b0b92f089760 +#: ../../document.rst:113 9b289030e6ba4a408f9b6885bc7d6084 msgid ":meth:`Document.set_page_labels`" msgstr "" -#: ../../document.rst:112 37b47ec45e7b4768b83ec1ca80faceb1 +#: ../../document.rst:113 c182346afcb443298f9f547a73aed953 msgid "PDF only: add/update page label definitions" msgstr "PDFのみ:ページラベルの定義を追加/更新" -#: ../../document.rst:113 5520b88443064dcf8aa208fd8553be09 +#: ../../document.rst:114 8351d97b0f314b2796f9f5d44bc02fe7 msgid ":meth:`Document.set_pagemode`" msgstr "" -#: ../../document.rst:113 21137b85317b4d918f5c3475b606f3cd +#: ../../document.rst:114 bbf2b36051ed4d15a1b73d46f03a8bd8 msgid "PDF only: set the PageMode" msgstr "PDFのみ:PageModeを設定" -#: ../../document.rst:114 9218da4668d5445c8310c4fe1f00ca53 +#: ../../document.rst:115 c9fb88a8b924411abf8880bdd70abff2 msgid ":meth:`Document.set_pagelayout`" msgstr "" -#: ../../document.rst:114 27cd89d6e5614a8c96735eb5a1e19642 +#: ../../document.rst:115 e52062324a8c45e58473a760fed17728 msgid "PDF only: set the PageLayout" msgstr "PDFのみ:PageLayoutを設定" -#: ../../document.rst:115 53f1a2cf999b48dbaec40ca96fb35f73 +#: ../../document.rst:116 5d017c37c2e64190b5afb244aa0a482d msgid ":meth:`Document.set_toc_item`" msgstr "" -#: ../../document.rst:115 1159265a2514499ea971cdaefdca6ccd +#: ../../document.rst:116 1e5474262af7458b95cee8ccb84f9f75 msgid "PDF only: change a single TOC item" msgstr "PDFのみ:単一のTOCアイテムを変更" -#: ../../document.rst:116 fa67ee56adca4d2bb365d5aac39e7a64 +#: ../../document.rst:117 d0972372c4e946188408fc234abf4e85 msgid ":meth:`Document.set_toc`" msgstr "" -#: ../../document.rst:116 9ac6036fe0914a91a315af745613ffca +#: ../../document.rst:117 7ef8ccdc56bb4c8a82ed20f39637353d msgid "PDF only: set the table of contents (TOC)" msgstr "PDFのみ:目次(TOC)を設定" -#: ../../document.rst:117 8e52a933110343d893ce3dbd5375f5ab +#: ../../document.rst:118 e0944240454d494d918b26f2999d717c msgid ":meth:`Document.set_xml_metadata`" msgstr "" -#: ../../document.rst:117 da10fd421798469c9c3beed4f17ba39a +#: ../../document.rst:118 23fbf8dfa547489fa1108c1f7197ec90 msgid "PDF only: create or update document XML metadata" msgstr "PDFのみ:ドキュメントXMLメタデータを作成または更新" -#: ../../document.rst:118 425c20a9f2a740708efe1611da13c906 +#: ../../document.rst:119 90fa077517cb4f5faaf602d56fe4b452 msgid ":meth:`Document.subset_fonts`" msgstr "" -#: ../../document.rst:118 898adc406ac440c28a0a2d26b48aea94 +#: ../../document.rst:119 70abbf122fb64339a4a88cc0c65664ef msgid "PDF only: create font subsets" msgstr "PDFのみ:フォントのサブセットを作成" -#: ../../document.rst:119 0ac850c64c2d4191837d195626311f03 +#: ../../document.rst:120 d03dc93f0c7f40818a912b5cc28921ca msgid ":meth:`Document.switch_layer`" msgstr "" -#: ../../document.rst:119 c1e8d34877e4467b8dc6497ad2efcf6d +#: ../../document.rst:120 05ae17c693174be8bdcb476bbc15ee2b msgid "PDF only: activate OC configuration" msgstr "PDFのみ:OC設定をアクティブ化" -#: ../../document.rst:120 3a5c8fb7f48a4d448efb2590e05417cd +#: ../../document.rst:121 e86f0f3639d841c783d823849d5a3510 msgid ":meth:`Document.tobytes`" msgstr "" -#: ../../document.rst:120 8dff780390d04e0493006189394ef5f6 +#: ../../document.rst:121 c43b005dc4d74cccaaaa2ebe30ef6f36 msgid "PDF only: writes document to memory" msgstr "PDFのみ:ドキュメントをメモリに書き込む" -#: ../../document.rst:121 5a7418d2d1884e85a662823e64f7315c +#: ../../document.rst:122 7bbdaa6e17604b1aa022868ede6e58ed msgid ":meth:`Document.xref_copy`" msgstr "" -#: ../../document.rst:121 af4b273c884d4743bb9a69d7fd0e609f +#: ../../document.rst:122 0782cc7d4ffa48ee978c13d8cac66a78 msgid "PDF only: copy a PDF dictionary to another :data:`xref`" msgstr "PDFのみ:PDF辞書を別の :data:`xref` にコピー" -#: ../../document.rst:122 8ceeb38e0f0b49eda0a25fd905eda7a3 +#: ../../document.rst:123 1791d70719634cce80f3ebab218a636a msgid ":meth:`Document.xref_get_key`" msgstr "" -#: ../../document.rst:122 3f474789dece44df9b9d6c367efb89de +#: ../../document.rst:123 98454fe4dea24c888a3a52a7c8ae39d3 msgid "PDF only: get the value of a dictionary key" msgstr "PDFのみ:辞書キーの値を取得" -#: ../../document.rst:123 37cb3a44123e46548bea6121c3ea7fc4 +#: ../../document.rst:124 44517590b7b34f6f9ac105b17238c6b9 msgid ":meth:`Document.xref_get_keys`" msgstr "" -#: ../../document.rst:123 ef1fdc8573cf455a9a75d5611bf40398 +#: ../../document.rst:124 0f586fe39fc348849f963a2f4e32fd55 msgid "PDF only: list the keys of object at :data:`xref`" msgstr "PDFのみ: :data:`xref` のオブジェクトのキーをリスト" -#: ../../document.rst:124 0a9988c7e9ae43e8b6b6d2f70964c43c +#: ../../document.rst:125 e357bb4599284e0ba6461f21fc148392 msgid ":meth:`Document.xref_object`" msgstr "" -#: ../../document.rst:124 561debcf05c141b587f0f87b5066aca4 +#: ../../document.rst:125 32d9ce181e194d9e80b2730b7d06abde msgid "PDF only: get the definition source of :data:`xref`" msgstr "PDFのみ::data:`xref` の定義ソースを取得" -#: ../../document.rst:125 dfcdb555f92c44f3a974bc385102e1c4 +#: ../../document.rst:126 83b882f9fa3d4cf99250d57ea0665bd4 msgid ":meth:`Document.xref_set_key`" msgstr "" -#: ../../document.rst:125 23e3a59a085346e48fd0d9ddb346dadb +#: ../../document.rst:126 0a9d823219d14cfe804d4ea413f6bc9f msgid "PDF only: set the value of a dictionary key" msgstr "PDFのみ:辞書キーの値を設定" -#: ../../document.rst:126 37b90bb78b0241b8b7800b80bdb3f12e +#: ../../document.rst:127 a37b06e1bd5b4229bdef88d32cbeac18 msgid ":meth:`Document.xref_stream_raw`" msgstr "" -#: ../../document.rst:126 77ed5835bf134363ae36dbf871350d6e +#: ../../document.rst:127 3a9d569e447547cca4d20e0a94cba236 msgid "PDF only: raw stream source at :data:`xref`" msgstr "PDFのみ: :data:`xref` での生のストリームソース" -#: ../../document.rst:127 e96b256c5cc544a796ff911f174150e8 +#: ../../document.rst:128 b3cc5166877a4acca3e0ffbc761e65e0 msgid ":meth:`Document.xref_xml_metadata`" msgstr "" -#: ../../document.rst:127 9ecc82720183421794b369577b5e71c7 +#: ../../document.rst:128 71e96c67b1ba496d8defc3f57c4df773 msgid "PDF only: :data:`xref` of XML metadata" msgstr "PDFのみ: XMLメタデータの :data:`xref` " -#: ../../document.rst:128 0d4233222bc14dd091094bced743c7d8 +#: ../../document.rst:129 bfd0316e4e03467e83a38140df621535 msgid ":attr:`Document.chapter_count`" msgstr "" -#: ../../document.rst:128 11ba9c80a2b94576b70c12eebfde6da1 +#: ../../document.rst:129 088a1ba017424a9db0042551297143af msgid "number of chapters" msgstr "章の数" -#: ../../document.rst:129 f0301ba9f4bb4810a43b95beb2fd0036 +#: ../../document.rst:130 51b6ce42e0a442739c5b4408d080f8ca msgid ":attr:`Document.FormFonts`" msgstr "" -#: ../../document.rst:129 248ac1f69b3f451392bf521cc782605a +#: ../../document.rst:130 4aed85b9c56045bab5c192da76510387 msgid "PDF only: list of global widget fonts" msgstr "PDFのみ:グローバルウィジェットフォントのリスト" -#: ../../document.rst:130 8cf19bea63964acb965ab8f188416bad +#: ../../document.rst:131 3837c6499d9d4fa69e6a2e000ac17736 msgid ":attr:`Document.is_closed`" msgstr "" -#: ../../document.rst:130 c84bbf455632418dbb5e5c3456114b6a +#: ../../document.rst:131 99c24a73b4a242c891763e488e795fc3 msgid "has document been closed?" msgstr "ドキュメントが閉じられていますか?" -#: ../../document.rst:131 e97a52ce28d24af39815524f3430f111 +#: ../../document.rst:132 ba745f36d2144eadad4749b56a142f67 msgid ":attr:`Document.is_dirty`" msgstr "" -#: ../../document.rst:131 0baa445ae11a46f2924e20ac2d861c21 +#: ../../document.rst:132 025cc91b138c4f0eb040a19effe7dc8e msgid "PDF only: has document been changed yet?" msgstr "PDFのみ:ドキュメントは変更されましたか?" -#: ../../document.rst:132 3596a341dbb04d489ba2de3a7ef69085 +#: ../../document.rst:133 a912e0d667f24bae89113efab3188e8d msgid ":attr:`Document.is_encrypted`" msgstr "" -#: ../../document.rst:132 3253e4cadd24491f9e511ffc9929e3fb +#: ../../document.rst:133 717818c95e734be4b274062bcfa42492 msgid "document (still) encrypted?" msgstr "ドキュメントは(まだ)暗号化されていますか?" -#: ../../document.rst:133 5cd981a001c94833943787e6e2093ce0 +#: ../../document.rst:134 8013e4a7f7114d7cbd33b4f23e024b66 msgid ":attr:`Document.is_fast_webaccess`" msgstr "" -#: ../../document.rst:133 45e45435eb514f4cbd51e47d52e44b86 +#: ../../document.rst:134 ada7b0267fcb4090868a8ee233a2b0c0 msgid "is PDF linearized?" msgstr "PDFは線形化されていますか?" -#: ../../document.rst:134 c474388d081644d0a28d405b5d392b46 +#: ../../document.rst:135 d414ece359ec44aebc0d5eb43f9bdde5 msgid ":attr:`Document.is_form_pdf`" msgstr "" -#: ../../document.rst:134 0d4ccbb7f40d495fba17db49f0becd95 +#: ../../document.rst:135 dccb6d66877a4efb8020aefd510b49c9 msgid "is this a Form PDF?" msgstr "これはフォームPDFですか?" -#: ../../document.rst:135 278c77f95ba6412bb32d03c42ba9e974 +#: ../../document.rst:136 b9c1714543584987893f0bf7edd6e3f1 msgid ":attr:`Document.is_pdf`" msgstr "" -#: ../../document.rst:135 71712b3746d443a99be6b066cf7ecb86 +#: ../../document.rst:136 d358fbd9f9284cd89a851b1a627998ac msgid "is this a PDF?" msgstr "これはPDFですか?" -#: ../../document.rst:136 226055554df444b69eb59620e71378d7 +#: ../../document.rst:137 faf59fd9a8714ab4a3644e04735758ca msgid ":attr:`Document.is_reflowable`" msgstr "" -#: ../../document.rst:136 e5597c0da2144a90b877a86b2fe8a77b +#: ../../document.rst:137 43005e90fb534126849acc8ada1fa6f4 msgid "is this a reflowable document?" msgstr "これはリフローアブルドキュメントですか?" -#: ../../document.rst:137 c3598bc621554280a87821a6272d42ca +#: ../../document.rst:138 073c5717af6e43d5b64ae18539d151bb msgid ":attr:`Document.is_repaired`" msgstr "" -#: ../../document.rst:137 94dc5a4ae86043b4b2ee071e7c156b80 +#: ../../document.rst:138 9b833a63b555494399f9abe110658a58 msgid "PDF only: has this PDF been repaired during open?" msgstr "PDFのみ:このPDFは開いている間に修復されましたか?" -#: ../../document.rst:138 1865ffbb0c6d4176a4ab6131e942efc9 +#: ../../document.rst:139 ed52f62f7fa541f88c0fb68da623952e msgid ":attr:`Document.last_location`" msgstr "" -#: ../../document.rst:138 4b48a2d803af44a684f79b39238ed3af +#: ../../document.rst:139 35bf606a3272441597d7fb24393a1a19 msgid "(chapter, pno) of last page" msgstr "最後のページの(章、pno)" -#: ../../document.rst:139 5892bb69129e43fc9946bf4ae4ad738b +#: ../../document.rst:140 21058c5563f64f569a0bba2db35afcc8 msgid ":attr:`Document.metadata`" msgstr "" -#: ../../document.rst:139 1878cf2314944c998606de7b1892590a +#: ../../document.rst:140 2d1a686f0de14e1fbeaaecd2251b8c41 msgid "metadata" msgstr "メタデータ" -#: ../../document.rst:140 1810ce8e1e62417e9575b069b43e88c1 +#: ../../document.rst:141 8e3e0aae2b0642a2ba808fae85ba8da8 msgid ":attr:`Document.markinfo`" msgstr "" -#: ../../document.rst:140 a41d17471f1a4324a9660d5b2c6faf4d +#: ../../document.rst:141 d614147561964dd6b6edd08df4ffedc1 msgid "PDF MarkInfo value" msgstr "PDF MarkInfoの値" -#: ../../document.rst:141 1d529c8710a449bd96f2f69b087bd68d +#: ../../document.rst:142 83722d1eaa87405ea91a811791d95b56 msgid ":attr:`Document.name`" msgstr "" -#: ../../document.rst:141 d6b9ec63e00b4cfc91bef4bc1274c83f +#: ../../document.rst:142 82012043d2d34b3882dd16bfc94886ff msgid "filename of document" msgstr "ドキュメントのファイル名" -#: ../../document.rst:142 7ff1bf8d36b946379e34d73af8ac9b17 +#: ../../document.rst:143 7bcb74efd387441792f2140fb9bb474f msgid ":attr:`Document.needs_pass`" msgstr "" -#: ../../document.rst:142 a08bdd6ee0d843329db4452b0dcb0f24 +#: ../../document.rst:143 4f4aec9256394a34982cbfcc59c44209 msgid "require password to access data?" msgstr "データにアクセスするにはパスワードが必要ですか?" -#: ../../document.rst:143 eea92ff513184fbda5f3927f0634e07e +#: ../../document.rst:144 7d539505cdb84ca9bdec8258464eb4e6 msgid ":attr:`Document.outline`" msgstr "" -#: ../../document.rst:143 c578ffe86ba549afa600bc9253519b0f +#: ../../document.rst:144 9dba8b97f25a4e53af0632141b0e9193 msgid "first `Outline` item" msgstr "最初のアウトラインアイテム" -#: ../../document.rst:144 6ac5f8f83ce24ef1b8ff15d25cb3e618 +#: ../../document.rst:145 640253eb6de14de6b93e3aa96d705306 msgid ":attr:`Document.page_count`" msgstr "" -#: ../../document.rst:144 b41aa5f33b2e42a0bd8234015189e1f1 +#: ../../document.rst:145 649e78a0c36841659c5924efe7fb70d9 msgid "number of pages" msgstr "ページ数" -#: ../../document.rst:145 560f59fd1c894bb785ecdc0c57eda228 +#: ../../document.rst:146 a761dddfb5a543a4a6087cfa3f42f7e3 msgid ":attr:`Document.permissions`" msgstr "" -#: ../../document.rst:145 38c8bce7648d455eb52d8853b369a13c +#: ../../document.rst:146 15566e532007445b97fd6d9f7cce06f2 msgid "permissions to access the document" msgstr "ドキュメントへのアクセス権限" -#: ../../document.rst:146 ed1edc33c6064bd99a81c70afcdbb3d6 +#: ../../document.rst:147 2267f744a8c44b51a7a7aee4e957a6f3 msgid ":attr:`Document.pagemode`" msgstr "" -#: ../../document.rst:146 fa01cfbb0bf047a9af47fc17d97f70cb +#: ../../document.rst:147 d18b418186ce41e1a5987e00cbca7b5a msgid "PDF PageMode value" msgstr "PDF PageModeの値" -#: ../../document.rst:147 acdf8411e61c427aa1b02065b9b7b766 +#: ../../document.rst:148 5b93d429d9434d0ab688003e27e28302 msgid ":attr:`Document.pagelayout`" msgstr "" -#: ../../document.rst:147 ef3c2d2bb7a3492ebbf630591f1a2a62 +#: ../../document.rst:148 112638dcb6e54e839ae4b68703fa8568 msgid "PDF PageLayout value" msgstr "PDF PageLayoutの値" -#: ../../document.rst:148 660d54b01cbd46b9ac78d3d185b1510d +#: ../../document.rst:149 52e94e9c5815485b8b55620442fc2abc msgid ":attr:`Document.version_count`" msgstr "" -#: ../../document.rst:148 a799fd661705442ba00c4651e1b43781 +#: ../../document.rst:149 ba864d474c3949e3b088dafc28abacd7 msgid "PDF count of versions" msgstr "PDFバージョンの数" -#: ../../document.rst:151 b007271f24574cd9a76e8fcaa30056ac +#: ../../document.rst:152 bf54a791d9c948b59738a99781e0cec1 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../document.rst:172 e6ab728cb0794092b2855a932da480dd +#: ../../document.rst:173 1f4b30f1da9a4efa92e5c69516f674e4 msgid "Changed in v1.14.13: support `io.BytesIO` for memory documents." msgstr "v1.14.13 で変更: メモリドキュメント用に `io.BytesIO` をサポート。" -#: ../../document.rst:173 9f2a22a73c594d43837b9816e02d73a2 +#: ../../document.rst:174 f63f565c15b54d82957aabb3bbf3343e msgid "" "Changed in v1.19.6: Clearer, shorter and more consistent exception " "messages. File type \"pdf\" is always assumed if not specified. Empty " @@ -1080,15 +1088,15 @@ msgstr "" "v1.19.6 で変更: より明確で短く、一貫性のある例外メッセージ。ファイルタイプが指定されていない場合、常にファイルタイプ \"pdf\" " "が仮定されます。空のファイルとメモリ領域は常に例外を発生させます。" -#: ../../document.rst:175 45954573734347839759b3a16e161d31 +#: ../../document.rst:176 78a8e1b559ae4990978f6e91655bd5b4 msgid "Creates a *Document* object." msgstr "*Document* オブジェクトを作成します。" -#: ../../document.rst:177 d735dc9cda4c48fdbb936316c8a916bb +#: ../../document.rst:178 a6fc1bf94cb3436ab361c7d2304a872e msgid "With default parameters, a **new empty PDF** document will be created." msgstr "デフォルトのパラメータを使用すると、**新しい空の PDF** ドキュメントが作成されます。" -#: ../../document.rst:178 dab123d41bd24293a8c306a7bd253ea3 +#: ../../document.rst:179 35f9397e7eaa42f786dbe923a8ea01ec msgid "" "If *stream* is given, then the document is created from memory and, if " "not a PDF, either *filename* or *filetype* must indicate its type." @@ -1096,7 +1104,7 @@ msgstr "" "*stream* が指定されている場合、ドキュメントはメモリから作成され、PDF でない場合は *filename* または *filetype*" " のいずれかがそのタイプを示さなければなりません。" -#: ../../document.rst:179 8a0a3806913e455bb3e7c822d64e7347 +#: ../../document.rst:180 ab8bbaf8a97c478fa108f84b9541a47f msgid "" "If *stream* is `None`, then a document is created from the file given by " "*filename*. Its type is inferred from the extension. This can be " @@ -1105,46 +1113,47 @@ msgstr "" "*stream* が `None` の場合、*filename* " "で指定されたファイルからドキュメントが作成されます。そのタイプは拡張子から推測されます。これは *filetype* によって上書きできます。" -#: ../../document.rst 0884bd8108814b49add30f8005a40620 -#: 0d21e714a42a452097f69494b8bb0900 0e4d5be4392643908fd0ee08b3405eb1 -#: 0e641daad1214a68a870b5415f95e72c 10e62a0effd04e85bcbdd6b317e2e3a9 -#: 1311601675584dd58104dfbe9019ee47 134cf9cb7cab4fc3b6ca90da24a918bb -#: 1442e057bef047d9adecfcf24cd3868f 16ef5066a5c848de9b961738bd948d0c -#: 31c41a37104a435885ad1d01c056f81f 37e552f9889540e1aa722f3cb14dd8c5 -#: 3b79d5c0b849400999bb585850e3e531 3c86bdc708764bd59bcd5e458170361c -#: 3e7c4d8ed0e646ab91fdb279623fd6d8 3f016c56e13b472a9b127e5ae61bbe4e -#: 484f794d2f2e434db614bf9b3a955434 4a2bf2b7e4ae45ee9bfe5d4f614cacb4 -#: 4d281515b0404d1da1f1ce9df5dbc8d8 501c6f79fa104d6c86f2b97ba307fdc2 -#: 50e276333e094438922127a6dd29e1a6 56199fc34ede48009a34980672d5d0db -#: 56b23d2e6c1a4cfcbb0821ee1e4c1929 6101b3a15fc749b895eaf982743af4c7 -#: 61c712b965844c52a825770363c05b31 6625318aab6e4dba903d12430bb5ff18 -#: 676dd6abc0b0455d99b560e98dee7e39 6792e4fe44694993b38488b00c0e615e -#: 680a0d133ae54a9ba7c4e3ad79caa9ea 6afe2ed2f25d4838b912e80ebd4ed147 -#: 6cbca4b323c64c2cbef2e6fa9079510d 700d075b614c4cd9ab3716b68971b692 -#: 7019a601abd24365be719bb85b4635ab 74eb76d26cec4b498c931e74e020200a -#: 78c1b3b6064d45ea99068fdba81c7313 78df60dfcf8b434d9cef669116d6dabc -#: 7c9465ff3ab14aa6b40ce28fae6c4fbb 8487c930755d42a28fc124b1b1f585ae -#: 86bf7def2ae541eeb4c0807658151379 904e766e31be4fda97f7739bb0a7603d -#: 9065e4768ae84ed9b1e76da52d7ed712 979b0948759444668087dd99df3366b7 -#: 98125f942f1249aa930241cd3d9feb5c 9d5e30738d8044d19800851fdc326897 -#: a06f6753af6448b79b9bdae5f37f3170 a79187561d784bd5a332abb1a7a1d6f3 -#: a93e8cd218094d2aabcdfb91230595bf aa51d5f8da1f4e21a64a5e9cca662753 -#: aa5fe02565c845069fd9b7924c58fc19 ab13c427c3ac4f0897513b789d341b42 -#: ab68e1abe64b4c8cacc8cd59a757c77f ac3d7def914f4ce783a35db71fab803f -#: acf0a93cd018438698a3b867173c8cef b1824ff1770b41cc87f42eb030d25c71 -#: b4601421487d4c01a79508d0db85761c beb4262b82124bc3aa92a6652f1f5880 -#: beedf042881446108cf852a2d1657e0c c7df85534d1c49e6928f4212ffa3f78f -#: c934603669ef4e3cb6479f2b033571a5 cb3d15ba0f17459d84a1a71d44e7b316 -#: cc77b8ceabf64bcdaa620129e8aa4c6f ce0122cf026e4abc8e59a47fb31c908a -#: ce16c731b9304e5a8381614a99037b5d cf2878ff7f574138b7f2c512031a099c -#: d246a5f92f8e4072a4d16bab8461abd5 def631711cd048d9b68cd007ba3f6016 -#: e56fbd87ab25495bacbe95ab254c1441 e7b282b831154f348677bffcfa0c9990 -#: efb19eeccfa24600825f82a78eeba4b6 faec769ae1024c4ca9b5e41cbe6fcc9d -#: fb0de4529a2d428091fc5f8a79f59397 ffb11008c25348e5a5a85ff007c0521d +#: ../../document.rst 0286c3f0d5e84dc0abde96c41bd52a3a +#: 03c52ff1d7244706b2337b67fe3dfe51 046f7416d0904cff92295cf2459c8064 +#: 05c6720240e5464b8fb9a280f236107b 0783792c6ba8468dbd7135877c6b6aab +#: 07d21a6f3dce491e991ed06a5b8d8826 0f6085818f6f48cfac79132465bd2f7b +#: 16028dfa956e4a7da0a9fd70653cb766 1843dd57c01648b781ea599eb3412fac +#: 18833d694856455f9fe47e8af27c04fd 1ad1d883c5d5414c8f7446a934af47e3 +#: 2044fc5e6a8f40bdb867c725a1ebdddf 20ebdee863ae4cd182b5fb01f853dd8d +#: 210be495f1cc49bd85f94147ad4327f5 25faf31b63324891bb29150f5c0b509b +#: 27165bf78ca74339b208810610c0b7d2 2779f42946714b57a46bcbc9c2f19e3c +#: 31dc907616304bd3a410bc5e2420c063 383b9ccb35d841eaada8319646ee508f +#: 3893062e45544cb6bfdedb797aafc8b7 3d1aca1483374e8f91f61cdca30e5152 +#: 3fc4da2cda624ab0a1764081fbae174a 42a1bc85bd0949f69cc4ed5e6afd4462 +#: 42b2aa4de02f49f9b0fb88861ec788f0 473dd8ff1d234cbabb07e5d566f918e9 +#: 4a792f49277346b5a0d37cb4c5055737 4e187b3f083347ca946ce1cdff4f2b43 +#: 4f50297466694f2e8ef61164c9841b62 580d4930f51e4238aa065d8cb31e1a4d +#: 64150e7cbaff4d32b37ac31e23f577cd 6635bc28dbb64d098db6f12ba2798faa +#: 6db5fc653bd44f1189830521732e3a6e 6e1e830f79e740ab8497aa151a2a9190 +#: 74183e1a350940d9a155ce5fe51f4fcd 74c5f688a7644e7ba75184a498d70817 +#: 7536230b40a340318d057951aecf8b52 793fa2b077344e8fa6dca7dd619697fa +#: 7ba92ea60d7b415fb150a5599ae9a877 7fca962a57db4d0b9ee43eda5678c2e2 +#: 825aba59da734c128826477a5d9095c9 83bea4e9983e4e99a40f705f2df1fe08 +#: 85f0c817bfd9431ca56c14c7045c5ee5 8d4a54ff783d4c3ab2726512cd950443 +#: 8db92fb7354a4a3b9c87b418c6194dda 8ef8c1cab5a24bcc887442fbc68f44bf +#: 94d85eed3e0648048f19158c6e7baf02 993d96dcd1674abb92525ea003e45f41 +#: 9a7f2a3c8e8d410b974e7bf35a7399f6 a16681604e7649d39e7d719872db8910 +#: a46ef47c4a2b4dc8b6937e85953c9ff7 b385ef7af10a425cb416760f914fe9a2 +#: b3d26df75b6f42e59c2da00c103f2827 bf00aaf2cbe3411ebb820550fe340d7d +#: c4a5136b5094487a8fcd9966b690e1bb c60c5c4a2b8f4d82b7c18f4467fe46fa +#: c73d7869c84c488d868f3d02af62e2a8 c891f3d191ec4631b87e3a1f75e14fd8 +#: ca447ff8ec1246c5a82352eb5124ea89 cb848cc262904393890303a4be62b558 +#: cf7269d90a0042b1a7629cbcc163ca62 d657794be3de4385801678d52afd3d9e +#: e18cd7ece71341edbb4979e84e45339d e249c9403d6a4aeaa4b0a4e9ea7bfa1e +#: e2f0a2c12d494d8987b1daaa22024fec e67af000efde4b9bada19c349f11ef52 +#: eab0a13856ee4ce1b00da5297ce19c05 f02c7057b2764519b7dae97665ded230 +#: f2388a7f8a4546a68df9ab388b27a1a3 f38d711608c54c70888aecfc35eab7e0 +#: f4c7dbd9ec9a47cf8ea2c996d477e4b3 f7bdd9f4f7b74944b93b55fc99703970 +#: f870de0e2c86425687f2b627ea2fcd45 fdbecc7eef214601b8cfd13ce905cb14 msgid "Parameters" msgstr "パラメータ" -#: ../../document.rst:181 5e59c6977c094603ad46b17b9b074ec9 +#: ../../document.rst:182 344cd30ffab94080bb6edc5d83b91982 msgid "" "A UTF-8 string or *pathlib* object containing a file path. The document " "type is inferred from the filename extension. If not present or not " @@ -1157,7 +1166,7 @@ msgstr "" " ないタイプに一致しない場合、PDF ドキュメントが仮定されます。メモリドキュメントの場合、`filetype` " "の代わりにこの引数を使用できます。詳細は以下を参照してください。" -#: ../../document.rst:183 aca1f93afa1c4d9586b9fd9cfc8773b8 +#: ../../document.rst:184 3c0f27937357412297565715d47494e5 msgid "" "A memory area containing a supported document. If not a PDF, its type " "**must** be specified by either `filename` or `filetype`." @@ -1166,7 +1175,7 @@ msgstr "" "ドキュメントを含むメモリ領域。PDF でない場合、そのタイプは `filename` または `filetype` のいずれかによって指定 " "**しなければなりません** 。" -#: ../../document.rst:185 f9686605a3a343aa9bf63fedec8bd610 +#: ../../document.rst:186 379a0be077fb4537ac23aaf3578475a5 msgid "" "A string specifying the type of document. This may be anything looking " "like a filename (e.g. \"x.pdf\"), in which case MuPDF uses the extension " @@ -1180,7 +1189,7 @@ msgstr "" "\".pdf\" のような文字列を使用することもできます。PDF ドキュメントの場合、省略可能であり、それ以外の場合は " ":ref:`サポートされている` ドキュメントタイプに一致しなければなりません。" -#: ../../document.rst:187 5fb75ede722c466a9fb7429d0413a286 +#: ../../document.rst:188 3d424ff6e21346d28c153e69067e9ce0 msgid "" "a rectangle specifying the desired page size. This parameter is only " "meaningful for documents with a variable page layout (\"reflowable\" " @@ -1193,43 +1202,43 @@ msgstr "" " HTML のようなもの)にのみ意味があり、それ以外の場合は無視されます。指定される場合、非空で有限な矩形で、左上座標 (0, 0) " "を持っていなければなりません。*fontsize* パラメータと一緒に、各ページのレイアウトが適切に行われ、したがってページ数も決定されます。" -#: ../../document.rst:189 22ab15593f164121aa3e60c5545839dc +#: ../../document.rst:190 0fe87d9dfe03401083c99ff847b81951 msgid "" -"may used together with *height* as an alternative to *rect* to specify " +"may used together with ``height`` as an alternative to ``rect`` to specify " "layout information." -msgstr "レイアウト情報を指定するための *rect* の代替として、*height* と一緒に使用できます。" +msgstr "レイアウト情報を指定するための ``rect`` の代替として、 ``height`` と一緒に使用できます。" -#: ../../document.rst:191 e99980b174a04ec5bb76dfc19e15a184 +#: ../../document.rst:192 f416d1dd95eb4a53a918ba5ba81f5216 msgid "" -"may used together with *width* as an alternative to *rect* to specify " +"may used together with ``width`` as an alternative to ``rect`` to specify " "layout information." -msgstr "レイアウト情報を指定するための *rect* の代替として、*width* と一緒に使用できます。" +msgstr "レイアウト情報を指定するための ``rect`` の代替として、 ``width`` と一緒に使用できます。" -#: ../../document.rst:193 fe581a21474644d082d88c5f551d92bc +#: ../../document.rst:194 dd1d7138ed3e4c2d9eaa21674b14f35b msgid "" "the default :data:`fontsize` for reflowable document types. This " -"parameter is ignored if none of the parameters *rect* or *width* and " -"*height* are specified. Will be used to calculate the page layout." +"parameter is ignored if none of the parameters ``rect`` or ``width`` and " +"``height`` are specified. Will be used to calculate the page layout." msgstr "" -"可変ページドキュメントタイプのデフォルト :data:`fontsize`。*rect* または *width* と *height* " +"可変ページドキュメントタイプのデフォルト :data:`fontsize`。 ``rect`` または ``width`` と ``height`` " "のいずれのパラメータも指定されていない場合、このパラメータは無視されます。ページレイアウトを計算するために使用されます。" -#: ../../document.rst b851b7726e624e8aad666b2486b19eac -#: d6fc4a37e9d9442b81c0636e54893ca1 +#: ../../document.rst 45cc1324293c427382027b70b78e7c0b +#: bb4a3e5c2a9d40fb8236630a23be1df8 msgid "Raises" msgstr "" -#: ../../document.rst:195 15e832bc97724ae6bdfaef24e7842982 +#: ../../document.rst:196 bd848d5064054375b5d7a8697b9abaf3 msgid "if the *type* of any parameter does not conform." msgstr "任意のパラメータの *型* が準拠していない場合。" -#: ../../document.rst:196 10cb565d66a74086a3d5730d7e96b51f +#: ../../document.rst:197 f5ecd504e9b945bfb5f6859484d5d7cd msgid "" "if the file / path cannot be found. Re-implemented as subclass of " "`RuntimeError`." msgstr "ファイル/パスが見つからない場合。`RuntimeError` のサブクラスとして再実装されました。" -#: ../../document.rst:197 cf991b0ea78c4a37ad2d6d7adcf7553a +#: ../../document.rst:198 5b186861f3ac4071949004ebfdbec056 msgid "" "if the file / path is empty or the `bytes` object in memory has zero " "length. A subclass of `FileDataError` and `RuntimeError`." @@ -1237,11 +1246,11 @@ msgstr "" "ファイル/パスが空であるか、メモリ内の `bytes` オブジェクトの長さがゼロの場合。`FileDataError` および " "`RuntimeError` のサブクラス。" -#: ../../document.rst:198 7edab72e9d574cf987b6df0c0a7d669e +#: ../../document.rst:199 8c783cf4e1c84cfaab2b8a5416ddeaa5 msgid "if an unknown file type is explicitly specified." msgstr "明示的に未知のファイルタイプが指定された場合。" -#: ../../document.rst:199 a26d4a50f5994071a888a76d307b1144 +#: ../../document.rst:200 b85280cd01e24f38a80f854c40667360 msgid "" "if the document has an invalid structure for the given type -- or is no " "file at all (but e.g. a folder). A subclass of `RuntimeError`." @@ -1249,33 +1258,33 @@ msgstr "" "ドキュメントが指定されたタイプに対して無効な構造を持っているか、ファイルではない場合(たとえば、フォルダの場合)。`RuntimeError` " "のサブクラス。" -#: ../../document.rst 03af244a2fdf41adb8bf52042369be99 -#: 0b0e02f4de564496937a9d566f2a047c 183a798ef5184eb3bc4cd881c1f7c344 -#: 1b81fbd8513b4fcb8db46be0ab7f7531 1da6868b67d242a38dc40c83c3af189c -#: 2c8d01b31d4149f6a3787d0cdab87e00 2e4d03c22a534a50a912a62be693053d -#: 33d07c7f1284441f99e55f47ccf00d48 3f4bb57fcc3c4ffba47e650aaf35ff50 -#: 4e0fb5ade02241919216e75c6eefc2cb 4e8fe8d07d2443b3b8a0b47c62bf5077 -#: 55a929aa08194f04887e82f9fcff08ce 622daf12de07491eb6d58d4a86c09ea3 -#: 62329c02e11d4fd18877fe16474cba15 62d6e13f8e2d479cae0cdd277fd7cb00 -#: 6da26baba77446edb4da68b1777bf71b 74f2c9628914443c800ee0f454c8b760 -#: 76a576f9e81f42d7af1e07f83d198f26 77faca6bf7ae4e02a462a0b5a6dc0798 -#: 7a7d8b452c2443c6849ca07d866fe84d 833ebf4fe79541e28f0b21ebd6d20139 -#: 86427f465c3947258057462c8ce5f92f 94331c6d2d2f41858a481435b83fe0fb -#: 95a9548a306f4aacad03e2633cfe6a61 970d5855779d44fab64939c0be33b273 -#: 99720882f6d74e9ea0a85436cd7f56b1 9d920fc690cd48b9a8735d3f029239e0 -#: a708eb2809c24193bb73b4b7f141990b a8681fd5af904c27a1e8b069bf3df825 -#: ae066df5343043229101c0c1f375b90a aea2346fadb745ee83ff0c2e358ffa97 -#: b0e9d3717d4a4c62a2d590a24fe55a6c ba663608bf244493a6b11d3fbba85f77 -#: c34235a52f754ef195b544eb1105e405 c3f5af5788ec4943a28fb73ce8708186 -#: cd755adf39064fb8bb0bc2b8ecc4d009 ce4d64705a2b44ad83f566c89614db33 -#: d039814e39b34c8397e63e13bb70a566 deb0dbac6d554590861678e2e5937c0a -#: e1b68afb5bda437980fa7fc8e8a3d5ce eb0aa00c36084acda6771b4b5bca9d19 -#: f256b8ae393440fab1809938bab4fb53 f6cdb1f670f5428a98d95d20e2c7d62a -#: f904eb50d76d411c99133b717068d8a1 f9fbb5eee3904e6584e205d1031132f2 +#: ../../document.rst 09c6af5ead994ae088de1afcd7114ad0 +#: 0a7e2fb9ac974a8fa1330b9d42207434 257bba4be3d44207983043b9626c397e +#: 36b2976e0d2b45ee9a50e99d7e882e83 36e8fc90b1e0456482505ceb99cf6ed9 +#: 3c6769b601244a478a5bc2838cb67f6d 4716327cb45b4e6bb680a5820f8562f8 +#: 48b9103297964eb0bf17c066ddf12681 519da62766224aeca8ccb66a3de585d4 +#: 5724bf2ed05e4ebfac74bc656e4e0172 57a6dfd67f4448e9aac0447d22a9251b +#: 5853660403604dc0af9621499e243d50 5cd6a1be97a942798863ae963f79287b +#: 5f4d7f912cb34a489338493a13dbc3d9 5f9cfc7d64b34d9b9ce8c4f2335013e2 +#: 5fd74513ad25474c8d77d933c824b758 5fe85ad0ea55466b9bdddd9058a8ea28 +#: 6655b8ad15d54d928cf17ebd729cf7c2 66a16f1ad5784904b55d69d304cd9995 +#: 6bd3b715ba524ca2ab587261ba80e3d1 744403beaa1f4aa08046532091ee1f37 +#: 8015d61fb433457bba996791d597fcd2 88b73a4f9d994449a7f2808c2e9d68b1 +#: a876d69563074060853778a84f4600b6 a941ad0e330543d4a550b95e93ff04ad +#: b55b9e06ead3430fb403923249886ffc bc650397c19f4e04a79ccab5b3c03ddc +#: c8556ea17b2748c2b934345cf84afb5a ce7c38197ad948fdac4255ab831ea6b7 +#: d3db6ea957ef4ea1b0e5fe07ae90a242 d497765c20974eae9b34c0974c91f495 +#: d4f7245f363a4a7593a3349d3a71f3c0 d529ca24cf66418097369c4790d0a246 +#: d5786ad98c5d4c809046fe5de59f6c91 d7f5d3d25ad04aec84d923b8b622b503 +#: d9b6568ae90a4b1c8fbd7cdb6d9141a8 db4cc76afec44fc082c1bf3de1d5f02a +#: e30ca0a2a0e845cc8f88699400d963c8 e960957b179645e9825de9c876d889bf +#: eb87921d62f9444ca0d9ede840c95da6 eef4a580032b44bc9e8ef7af4343790b +#: f5bc242fb54e4485b66120d4021dd2c6 f767fb5a683d4191b5a808d3fbcd6d1d +#: fb3d343f355540518f482fbeb51a4e94 fdfd0e3cfcc9476f9cd14657fbb76237 msgid "Returns" msgstr "" -#: ../../document.rst:201 5e5c1c062fd742f886f57352ccf9caee +#: ../../document.rst:202 3bc9fad57b344868b68081705e9374b4 msgid "" "A document object. If the document cannot be created, an exception is " "raised in the above sequence. Note that PyMuPDF-specific exceptions, " @@ -1287,7 +1296,7 @@ msgid "" ":meth:`Tools.mupdf_warnings`)." msgstr "" -#: ../../document.rst:201 c4762e6f21ad4146951264332394bb61 +#: ../../document.rst:202 68caa9eb7f9f4618854bff38104f0b7a msgid "" "A document object. If the document cannot be created, an exception is " "raised in the above sequence. Note that PyMuPDF-specific exceptions, " @@ -1298,7 +1307,7 @@ msgstr "" " 、`EmptyFileError` 、および `FileDataError` は、`RuntimeError` " "をチェックする場合にキャッチされます。" -#: ../../document.rst:203 84abee291d1844dea77a37cc9c9fdb6e +#: ../../document.rst:204 abe6b00f2b0e41d8afec662814791054 msgid "" "In case of problems you can see more detail in the internal messages " "store: `print(pymupdf.TOOLS.mupdf_warnings())` (which will be emptied by " @@ -1309,7 +1318,7 @@ msgstr "" "(この呼び出しによって空にされますが、これを防ぐこともできます - :meth:`Tools.mupdf_warnings` " "を参照してください)。" -#: ../../document.rst:205 c07f1d4b413742a4ac98cfd80dbc5530 +#: ../../document.rst:206 c3e7fc0a3b1c40c8b64e20f41a52f890 msgid "" "Not all document types are checked for valid formats already at open " "time. Raster images for example will raise exceptions only later, when " @@ -1320,7 +1329,7 @@ msgstr "" "すべてのドキュメントタイプがオープン時に有効なフォーマットで確認されるわけではありません。例えば、ラスター画像はコンテンツにアクセスしようとした際に例外を発生させることがあります。他のタイプ(特にバイナリでないコンテンツを持つもの)は、有効なコンテンツを持たない場合でも成功してオープンされ(そして時に" " **アクセスされる** こともあります):" -#: ../../document.rst:207 c7b81e61f8324660a04fbafe5c7f92ff +#: ../../document.rst:208 098d3641b2da4c6e97432afcfcedd2d2 msgid "" "HTM, HTML, XHTML: **always** opened, `metadata[\"format\"]` is \"HTML5\"," " resp. \"XHTML\"." @@ -1328,45 +1337,42 @@ msgstr "" "HTM、HTML、XHTML: **常に** オープンされ、 `metadata[\"format\"]` は \"HTML5\" または " "\"XHTML\" です。" -#: ../../document.rst:208 a0fa0d041b5c4b0b90df2872e519abbd +#: ../../document.rst:209 cb5779d64b3941b4b8de3a3073313a4f msgid "XML, FB2: **always** opened, `metadata[\"format\"]` is \"FictionBook2\"." msgstr "XML、FB2: **常に** オープンされ、 `metadata[\"format\"]` は \"FictionBook2\" です。" -#: ../../document.rst:210 ade75a7931f74c45a58121f53791e6f8 +#: ../../document.rst:211 37cc676e2ace4f47b00ccb0207a83536 msgid "Overview of possible forms, note: `open` is a synonym of `Document`::" msgstr "可能なフォームの概要、注: `open` は `Document` の同義語です::" -#: ../../document.rst:227 9b029eb92c2a49f79532cc85bb94a67a +#: ../../document.rst:228 56b467bff2714e36b4cd332b444fa962 msgid "" "Raster images with a wrong (but supported) file extension **are no " "problem**. MuPDF will determine the correct image type when file " -"**content** is actually accessed and will process it without complaint. " -"So `pymupdf.open(\"file.jpg\")` will work even for a PNG image." +"**content** is actually accessed and will process it without complaint." msgstr "" "サポートされているが正しくないファイル拡張子を持つラスター画像は **問題ありません** 。MuPDFは、ファイルの実際の **内容** " -"がアクセスされると正しい画像タイプを判断し、何もクレームをつけずに処理します。したがって、 " -"`pymupdf.open(\"file.jpg\")` はPNG画像でも機能します。" +"がアクセスされると正しい画像タイプを判断し、何もクレームをつけずに処理します。" -#: ../../document.rst:229 4a1a5fe1c7dd45a6a059c4c495f4c453 +#: ../../document.rst:230 0241155cc4cd4ae4af4e0094c55ac867 msgid "" -"The Document class can be also be used as a **context manager**. On exit," -" the document will automatically be closed." +"The Document class can be also be used as a **context manager**. Exiting the content manager will close the document automatically." msgstr "Document クラスは **コンテキストマネージャ** としても使用できます。終了時に、ドキュメントは自動的に閉じられます。" -#: ../../document.rst:245 ../../document.rst:255 ../../document.rst:315 -#: ../../document.rst:361 917d06ad28474dfaba10d1beac3e1a4f -#: 9da770f90ce14743baf9d14a62830f22 aa28e8032ed94707810191142b1c5e83 -#: e60cf065339246f38fffab10d7670ab6 +#: ../../document.rst:246 ../../document.rst:256 ../../document.rst:316 +#: ../../document.rst:362 13bc087318584ac2a19c9ab8c10ec7a2 +#: 17e448ab020f4b4facd306f956642566 56384202f30e46618912166e026fb4b1 +#: 83d146659e664858863f57dea0164f84 msgid "New in v1.18.4" msgstr "v1.18.4 で新規追加" -#: ../../document.rst:247 f7e82c32c7a449c88639c8d769d33e47 +#: ../../document.rst:248 2e54d119ca394575bb3575941fa68307 msgid "" "Return the cross reference number of an :data:`OCG` or :data:`OCMD` " "attached to an image or form xobject." msgstr "画像またはフォームXObjectに添付された :data:`OCG` または :data:`OCMD` のクロスリファレンス番号を返します。" -#: ../../document.rst:249 877ae29cf90e4fa88ab45462b85b47c3 +#: ../../document.rst:250 8e725470595447c789bc07dc930f3879 msgid "" "the :data:`xref` of an image or form xobject. Valid such cross reference " "numbers are returned by :meth:`Document.get_page_images`, resp. " @@ -1377,43 +1383,43 @@ msgstr "" "。有効なクロスリファレンス番号は、:meth:`Document.get_page_images` または " ":meth:`Document.get_page_xobjects` で返されます。無効な番号の場合、例外が発生します。" -#: ../../document.rst 1448b5d90478428aad1bcf15170336c0 -#: 1a5a4195f37a43ac89c68ecfb43428a6 2926806b1a7944da960143c3be4d4077 -#: 2fac0cf4ea104898af78dac4cba4dad9 33a61c6d66784b0d8d99a4cd2d7fbee8 -#: 354d22fae4d44e4db3496fe513c9b907 37b1182fb85a46e8bb5363ea8d259fa7 -#: 3a4b61e29e574f5abfdad0688d665501 406976f18d5944dab77340239f2a8ecf -#: 4a57b7679eb94c8a90c9b6e203faaaca 5bd386ff6d8f4eefb1b041563e4b327e -#: 692ca683bc1e4ec7997556b080acc575 7c1a4232e6ae40108eb7fef41ee81fce -#: 7de807db22264f4da4879731a074f4cd 87a93fa00688403baa74e419a2ce731c -#: 885f487126954576bfbb1a42a3374b6a 891a4b9ff4f241639a82a439fb324246 -#: 8ba067fb200b4341ad798aa072b43af0 a8e0833bf54e40628534bc118173c03f -#: af2eea700ef3419ebc3faf19ad8ad26d b3724cbeab5646528e05683acfdbbcc9 -#: ba686c5c28f74be2b226320345d38179 be5aff77584e49c0a454ddf46d4aa2a5 -#: c53a7d3d88104d3ab629a180e02cc34b c6c87a9ada024c63931f2b23e1a4fa35 -#: ccab3d4690c14e5b9c49485275dbf09f cd3a17c875f34dda848f54f226547efd -#: d159a6ff306c45c7bb08544ef064b09f d532d1f441bd4cca9f32edf07d33bbcd -#: d75b12c4dbd84d04ba77a68982e17e15 de07522d7cd4495bba9148dda49d17f0 -#: e0af5604dc154762ab94567e323ee962 ebccb2ef9934483fbae0fee2f57f8d5a -#: ec843db4c2334fab8c884e4a5c56f3a6 f4dac3bedb29417c83b77fcf2e032402 -#: f706181e81764d3f91fafb3d7cb555b1 +#: ../../document.rst 0a21b790773a4090bfc5271474a195cb +#: 10a83fa3eae840f9833eef241c187305 16f1acc2440a4c35993643d150c8c720 +#: 1da2b6257594426fb6f2128a9813217b 1ea1c881e2764afebb28bad05bb6f36a +#: 28019a4db4f44523a66404894b3d6284 2b101e8a7db1403e912fbebaf420dae3 +#: 326ca52e3c994ccbb396508d1da76b36 44c3a0a240f5440fb0d5739e1801471f +#: 44d067fdc96c46d295e7a9ab89bfa2ee 45da04136a514f089a6a57d98bcbfd6c +#: 5200762a664b4ecd9a1ba012cbbd7423 6307a143471a4627ac611101c51ccf81 +#: 707ddca3b0bc44a1b6a33e48ac2e1d75 74e17f1e1afe498881359c88ddc50cd5 +#: 784cb709707646a098224af800f0988a 79d859f2cef64b18be7b237003d52167 +#: 8211be426df143fba7835fb8a0feb445 844d58b3a3c14fb5afab11871d16cec0 +#: 8fd4c7db1f194c61b51e9a879f672de2 a0d6b2eff5d2470c8723accb1440e09a +#: a1d8dff87f4c4a3897dc6e0768a58e6d aa933b87d78145e3baef1ab3ca03d20f +#: abf811ba9c234b53a7c045649c4cf38b b0378c71d9564599a6752f6e65118889 +#: b2a81a6bbfdf4ed38f420a88772a122c b382338bd6514c78860e7e8477d135e8 +#: b3e0e99b68644128a50db0673fcb5cb3 d8c7da52fe5c44c1a5baf752140a73df +#: da29f51e370d4ed5bfe0b9509be69005 e1a11efad7a940f0bd4580da962ccb09 +#: e579746f01e145139f6a24613fb4abf3 ea602632da4a4f609cb240376c2bdba6 +#: ec1608b88dcb42c1b9cf558406991504 f7975af7da1343aa96a39a4525d0dc64 +#: f89c1d3148004904986ce3e8036e2e36 msgid "Return type" msgstr "戻り値の型" -#: ../../document.rst:251 6fe0222ea87f4604a71af44e56776d3f +#: ../../document.rst:252 b8beca35910045089e4ce3f0c9b284a8 msgid "" "the cross reference number of an optional contents object or zero if " "there is none." msgstr "オプションコンテンツオブジェクトのクロスリファレンス番号、または存在しない場合はゼロ。" -#: ../../document.rst:257 63469c401eb544a999130a4e2c26d3f7 +#: ../../document.rst:258 9bc5b4bd65d54421ac34b31abe50a92f msgid "" -"If *xref* represents an image or form xobject, set or remove the cross " -"reference number *ocxref* of an optional contents object." +"If :data:`xref` represents an image or form xobject, set or remove the " +"cross reference number *ocxref* of an optional contents object." msgstr "" -"*xref* が画像またはフォームXObjectを表す場合、オプションコンテンツオブジェクトのクロスリファレンス番号 *ocxref* " -"を設定または削除します。" +":data:`xref` が画像またはフォームXObjectを表す場合、オプションコンテンツオブジェクトのクロスリファレンス番号 *ocxref*" +" を設定または削除します。" -#: ../../document.rst:259 169916f08b484ce38ab1b3d191f09316 +#: ../../document.rst:260 2fde6ff5ddd54ba78ec4b6ccbd2d11ff msgid "" "the :data:`xref` of an image or form xobject [#f5]_. Valid such cross " "reference numbers are returned by :meth:`Document.get_page_images`, resp." @@ -1424,7 +1430,7 @@ msgstr "" "[#f5]_。有効なクロスリファレンス番号は、:meth:`Document.get_page_images` または " ":meth:`Document.get_page_xobjects` で返されます。無効な番号の場合、例外が発生します。" -#: ../../document.rst:260 d04fa9dac278457f8226af945d06c9e3 +#: ../../document.rst:261 fd703d6957164c338beff42d52bab016 msgid "" "the :data:`xref` number of an :data:`OCG` / :data:`OCMD`. If not zero, an" " invalid reference raises an exception. If zero, any OC reference is " @@ -1433,24 +1439,24 @@ msgstr "" ":data:`OCG` / :data:`OCMD` の :data:`xref` " "番号。ゼロでない場合、無効な参照は例外を発生させます。ゼロの場合、任意のOC参照が削除されます。" -#: ../../document.rst:265 ../../document.rst:275 ../../document.rst:286 -#: ../../document.rst:298 ../../document.rst:372 ../../document.rst:384 -#: ../../document.rst:406 ../../document.rst:424 ../../document.rst:440 -#: 1076617c2cb943cb94085bfa9165cd82 16f0a69587624aeb935045224dbbe312 -#: 2d57d5aa80d640669c629e387a075813 6eaeb84d91eb4e72a250e07359459bc4 -#: 8d78a184d3264cc69cf2a1d4eb770c07 9c2f918442a64556937dc1a8afc3eccc -#: a1a4301a7ffb42c2b4e7b7db31527cbb a87073fb15ba4fcdb6a5a71c4f1c9259 -#: ce7a0b51c2894b72aff4b3df32d9d52c +#: ../../document.rst:266 ../../document.rst:276 ../../document.rst:287 +#: ../../document.rst:299 ../../document.rst:373 ../../document.rst:385 +#: ../../document.rst:407 ../../document.rst:425 ../../document.rst:441 +#: 1ebb0dc696424238a5358253445a56d1 239d00cc10df4c3f9dcb020cbaec1a87 +#: 4329c49ae53c46999d95685858874053 4ef034b06e1e4159a4ad268f1e850cbd +#: 6d5e2a896148412db20e40813655a4ae 88730381f1674b4cabdaead24ba6242f +#: a231b15b2bed4928a31a3699dd40064e bb287da011604799865a06f7df9d20c7 +#: dff1d832e6514290be48c737ca4e782c msgid "New in v1.18.3" msgstr "v1.18.3 で新規追加" -#: ../../document.rst:267 cb7c18170d21479f8f9ffda8636890b3 +#: ../../document.rst:268 51a7ed15e0a34682892b1432d85babbb msgid "" "Show optional layer configurations. There always is a standard one, which" " is not included in the response." msgstr "オプションのレイヤー構成を表示します。常に標準のものが存在し、それは応答に含まれていません。" -#: ../../document.rst:277 54816f15238744a2ba168f1261b97a78 +#: ../../document.rst:278 374ab6f84e2447acb856e3165482ffd9 msgid "" "Add an optional content configuration. Layers serve as a collection of ON" " / OFF states for optional content groups and allow fast visibility " @@ -1459,15 +1465,15 @@ msgstr "" "オプションのコンテンツ構成を追加します。レイヤーはオプションコンテンツグループのON / " "OFFの状態のコレクションとして機能し、同じドキュメントの異なるビュー間での高速な表示切り替えを可能にします。" -#: ../../document.rst:279 a6dbe13d1f8444fe8d17e998e6c39d54 +#: ../../document.rst:280 35814160d4494e69a130e8185865d792 msgid "arbitrary name." msgstr "任意の名前。" -#: ../../document.rst:280 4920a4c691934aa4af2eb40ae2c34882 +#: ../../document.rst:281 4af6ab310ec64faba5a2ccf8a57b6233 msgid "(optional) creating software." msgstr "(オプション)作成ソフトウェア。" -#: ../../document.rst:281 5a1d6dc6e2114baab8600198d29df3b0 +#: ../../document.rst:282 7c5cfab6ddf142e681e86769706ba6de msgid "" "a sequence of OCG :data:`xref` numbers which should be set to ON when " "this layer gets activated. All OCGs not listed here will be set to OFF." @@ -1475,52 +1481,52 @@ msgstr "" "このレイヤーがアクティブになったときにONに設定されるOCG :data:`xref` " "番号のシーケンス。ここでリストされていないすべてのOCGはOFFに設定されます。" -#: ../../document.rst:288 253b2ac1212a4c07b82b1a316d50fb52 +#: ../../document.rst:289 a64b197f2f304289b326fb6dbacd1286 msgid "" "Switch to a document view as defined by the optional layer's " "configuration number. This is temporary, except if established as " "default." msgstr "オプションレイヤーの構成番号によって定義されたドキュメントビューに切り替えます。これは一時的なものであり、デフォルトとして確立されていない限り、一時的なものです。" -#: ../../document.rst:290 0424d31810c043e1b0dcf19a85f2ba15 +#: ../../document.rst:291 6f1f64b1fcb04da78b1c21e3e7636f80 msgid "config number as returned by :meth:`Document.layer_configs`." msgstr ":meth:`Document.layer_configs` によって返される構成番号。" -#: ../../document.rst:291 157636232b5f48cfb1382395c1468957 +#: ../../document.rst:292 c7f0ded359bf4871ba2ea0aec5a7371d msgid "make this the default configuration." msgstr "これをデフォルト構成にします。" -#: ../../document.rst:293 7ce677d8c1e046e8ac7226a1fc0932a6 +#: ../../document.rst:294 02c3213ae6284cf7ade2a43256e7984e msgid "" "Activates the ON / OFF states of OCGs as defined in the identified layer." -" If *as_default=True*, then additionally all layers, including the " +" If ``as_default=True``, then additionally all layers, including the " "standard one, are merged and the result is written back to the standard " "layer, and **all optional layers are deleted**." msgstr "" -"識別されたレイヤーで定義されたOCGのON / OFFの状態をアクティブにします。 *as_default=True* " +"識別されたレイヤーで定義されたOCGのON / OFFの状態をアクティブにします。 ``as_default=True`` " "の場合、追加で、標準のレイヤーを含むすべてのレイヤーがマージされ、結果が標準レイヤーに書き込まれ、 " "**すべてのオプションレイヤーが削除されます** 。" -#: ../../document.rst:300 7ea1d3cedaa841d083326060c07e8438 +#: ../../document.rst:301 356c8eaa49a949d8aef9fd5cc8a4c65c msgid "" "Add an optional content group. An OCG is the most important unit of " "information to determine object visibility. For a PDF, in order to be " "regarded as having optional content, at least one OCG must exist." msgstr "オプションコンテンツグループを追加します。OCGはオブジェクトの表示を決定するための最も重要な情報単位です。PDFでは、オプションコンテンツとして扱われるためには、少なくとも1つのOCGが存在する必要があります。" -#: ../../document.rst:302 94afe7acf1e8491e8401fecf07e16ae4 +#: ../../document.rst:303 90f3ea8909be4feaa40749f018f1d3a9 msgid "arbitrary name. Will show up in supporting PDF viewers." msgstr "任意の名前。サポートするPDFビューアに表示されます。" -#: ../../document.rst:303 22d2e0bf0dd14de78f1e9d89b9ca4e47 +#: ../../document.rst:304 7f590f7231744e01b5571c95e86286d4 msgid "layer configuration number. Default -1 is the standard configuration." msgstr "レイヤー構成番号。デフォルトは-1で、標準構成です。" -#: ../../document.rst:304 79222ec954b4445e944cc8c802070c67 +#: ../../document.rst:305 61a3bf7b996747b9a65344923ea9e9a8 msgid "standard visibility status for objects pointing to this OCG." msgstr "このOCGを指すオブジェクトの標準の表示状態。" -#: ../../document.rst:305 d71cafa166024ff68af082c38da21510 +#: ../../document.rst:306 ce09ba3d03f34b4283394531db465e0f msgid "" "a string or list of strings declaring the visibility intents. There are " "two PDF standard values to choose from: \"View\" and \"Design\". Default " @@ -1529,7 +1535,7 @@ msgstr "" "表示意図を宣言する文字列または文字列のリスト。PDF標準の2つの値から選択できます: \"View\" と \"Design\"。デフォルトは " "\"View\" です。 **正確なスペルが重要です** 。" -#: ../../document.rst:306 26ce5c3ce231490ca27ef607adcd347f +#: ../../document.rst:307 fc4ef2e67f69442fa039e22cdf455121 msgid "" "another influencer for OCG visibility. This will become part of the OCG's" " `/Usage` key. There are two PDF standard values to choose from: " @@ -1539,13 +1545,13 @@ msgstr "" "OCGの表示に影響を与えるもう一つの要因。これはOCGの `/Usage` キーの一部になります。PDF標準の2つの値から選択できます: " "\"Artwork\" と \"Technical\"。デフォルトは \"Artwork\" です。必要な場合にのみ変更してください。" -#: ../../document.rst:308 20aa035932554ccd973f58c47653f054 +#: ../../document.rst:309 f5d476306bd44db4a28019e3a0b51898 msgid "" ":data:`xref` of the created OCG. Use as entry for `oc` parameter in " "supporting objects." msgstr "作成されたOCGの :data:`xref` 。サポートオブジェクトの `oc` パラメータのエントリとして使用します。" -#: ../../document.rst:310 fa0fcabd0a04443891822c78a5f1e353 +#: ../../document.rst:311 4baf97664df64c3a98e3561af570ae84 msgid "" "Multiple OCGs with identical parameters may be created. This will not " "cause problems. Garbage option 3 of :meth:`Document.save` will get rid of" @@ -1554,27 +1560,27 @@ msgstr "" "同一のパラメータを持つ複数のOCGを作成することができます。これは問題を引き起こしません。:meth:`Document.save` " "のゴミオプション3を使用すれば、重複を削除できます。" -#: ../../document.rst:317 405489e0b3ae462fae9b319c474905db +#: ../../document.rst:318 db5bd12d3dbc420087d12d833f9c598e msgid "" "Create or update an :data:`OCMD`, **Optional Content Membership " "Dictionary.**" msgstr ":data:`OCMD` ( **Optional Content Membership Dictionary** )を作成または更新します。" -#: ../../document.rst:319 a0c8291573134a84bc1963ab38a5108e +#: ../../document.rst:320 0077e90b93324ba88c115d6ee3d5ac5c msgid ":data:`xref` of the OCMD to be updated, or 0 for a new OCMD." msgstr "更新するOCMDの :data:`xref` 、または新しいOCMDの場合は0" -#: ../../document.rst:320 02159310f80c402daf5a237b5c54b3b6 +#: ../../document.rst:321 ac78f73e99864584b9fa09f88291a2cd msgid "a sequence of :data:`xref` numbers of existing :data:`OCG` PDF objects." msgstr "既存の :data:`OCG` PDFオブジェクトの :data:`xref` 番号のシーケンス。" -#: ../../document.rst:321 ca09fbcd096642988d3965534b1ff377 +#: ../../document.rst:322 de566168b1414d0a8987e77d28482d95 msgid "" "one of \"AnyOn\" (default), \"AnyOff\", \"AllOn\", \"AllOff\" (mixed or " "lower case)." msgstr "\"AnyOn\"(デフォルト)、\"AnyOff\"、\"AllOn\"、\"AllOff\"のいずれか。大文字小文字は区別されません。" -#: ../../document.rst:322 5073f91d1461464d814429b471213942 +#: ../../document.rst:323 b620c7ce19d049e781343d4fdd974df6 msgid "" "a \"visibility expression\". This is a list of arbitrarily nested other " "lists -- see explanation below. Use as an alternative to the combination " @@ -1583,7 +1589,7 @@ msgstr "" "\"表示条件式\"。これは他のリストを任意に入れ子にしたリストです - 説明は以下を参照してください。より複雑な条件を定式化する必要がある場合、 " "*ocgs* / *policy* の組み合わせの代替として使用します。" -#: ../../document.rst:324 3436c030633c483198a84506828ebd08 +#: ../../document.rst:325 2a5a3c59ac1b46699cbf05748642b252 msgid "" ":data:`xref` of the OCMD. Use as `oc=xref` parameter in supporting " "objects, and respectively in :meth:`Document.set_oc` or " @@ -1592,7 +1598,7 @@ msgstr "" "OCMDの :data:`xref` 。サポートオブジェクトの `oc=xref` " "パラメータとして使用し、:meth:`Document.set_oc` または :meth:`Annot.set_oc` にもそれぞれ使用します。" -#: ../../document.rst:328 53ba145c9cb04ce68abb1b6b3601f376 +#: ../../document.rst:329 f1338e535b114a4094ce381c9474405f msgid "" "Like an OCG, an OCMD has a visibility state ON or OFF, and it can be used" " like an OCG. In contrast to an OCG, the OCMD state is determined by " @@ -1603,39 +1609,39 @@ msgstr "" "OCGと同様に、OCMDには表示状態ONまたはOFFがあり、OCGのように使用できます。OCGとは異なり、OCMDの状態は **ブール式** " "の特別な形式を使用して1つ以上のOCGの状態を評価することによって決定されます。式がtrueに評価される場合、OCMDの状態はONで、falseに評価される場合はOFFです。" -#: ../../document.rst:330 89772de826d94774a3a3576ec85e5828 +#: ../../document.rst:331 dd33d0294d674e2a87fe2c44817c8eb5 msgid "There are two ways to formulate OCMD visibility:" msgstr "OCMDの表示を定式化する方法は2つあります:" -#: ../../document.rst:332 4c79d490b17b464abb4f4e2a2dc443db +#: ../../document.rst:333 a5477a5b28504196b445183f988a735f msgid "" "Use the combination of *ocgs* and *policy*: The *policy* value is " "interpreted as follows:" msgstr "*ocgs* と *policy* の組み合わせを使用する: *policy* の値は次のように解釈されます:" -#: ../../document.rst:334 3d068de4bc9545a1b3666831dbfb4057 +#: ../../document.rst:335 fc3e9f29df53403f82d22b7de723acdc msgid "AnyOn -- (default) true if at least one OCG is ON." msgstr "(デフォルト) 少なくとも1つのOCGがONの場合、true。" -#: ../../document.rst:335 46412e63e0354a0fb64ecd6937ab90bf +#: ../../document.rst:336 539a3f619a49428692f8e63ddf0fe484 msgid "AnyOff -- true if at least one OCG is OFF." msgstr "少なくとも1つのOCGがOFFの場合、true。" -#: ../../document.rst:336 ebec5577b5f94362af7ca5c6566fa47b +#: ../../document.rst:337 0fe13a500cc64a62a92dd7c5b643b9d6 msgid "AllOn -- true if all OCGs are ON." msgstr "すべてのOCGがONの場合、true。" -#: ../../document.rst:337 f189b0ff6c574b579f85ff902744feb3 +#: ../../document.rst:338 008a93b661e449598b46988b85ae73f0 msgid "AllOff -- true if all OCGs are OFF." msgstr "すべてのOCGがOFFの場合、true。" -#: ../../document.rst:339 36f238059f2645c7bf43dc5d30a65df6 +#: ../../document.rst:340 6da86fb0daa44840bc4b416a4a6ff84c msgid "" "Suppose you want two PDF objects be displayed exactly one at a time (if " "one is ON, then the other one must be OFF):" msgstr "2つのPDFオブジェクトを、必ず1つずつ表示するようにしたい場合(1つがONの場合、他の1つはOFFにする必要があります):" -#: ../../document.rst:341 39a398b56f2d477fa21b63732a8f488d +#: ../../document.rst:342 ab33f5968f234adba5e93312924f2004 msgid "" "Solution: use an **OCG** for object 1 and an **OCMD** for object 2. " "Create the OCMD via `set_ocmd(ocgs=[xref], policy=\"AllOff\")`, with the " @@ -1644,7 +1650,7 @@ msgstr "" "解決策: オブジェクト1用のOCGとオブジェクト2用のOCMDを使用します。 OCMDは `set_ocmd(ocgs=[xref], " "policy=\"AllOff\")` を使用して作成し、OCGの :data:`xref` を指定します。" -#: ../../document.rst:343 eab9365759ea4242b3dec5eee128a337 +#: ../../document.rst:344 0ac3735619df4bc388e5ab64ff7a7fee msgid "" "Use the **visibility expression** *ve*: This is a list of two or more " "items. The **first item** is a logical keyword: one of the strings " @@ -1659,11 +1665,11 @@ msgstr "" "のいずれかです。2番目以降のアイテムは整数または別のリストである必要があります。整数はOCGの :data:`xref` " "番号でなければなりません。リストは再び少なくとも2つのアイテムから始まり、ブールキーワードのいずれかで始まる必要があります。この構文はやや厄介ですが、非常に強力です:" -#: ../../document.rst:345 7dc52c5ae0954b778c3bf4157505c53c +#: ../../document.rst:346 6cf5a382eb1040d9b9a6423cabc513ca msgid "Each list must start with a logical keyword." msgstr "各リストは論理キーワードで始まる必要があります。" -#: ../../document.rst:346 e27a6adbfd1243878651b4cb0872e677 +#: ../../document.rst:347 a526e683a21846e6b38ff2825b77627f msgid "" "If the keyword is a **\"not\"**, then the list must have exactly two " "items. If it is **\"and\"** or **\"or\"**, any number of other items may " @@ -1672,7 +1678,7 @@ msgstr "" "キーワードが **\"not\"** の場合、リストは正確に2つのアイテムを持たなければなりません。 **\"and\"** または " "**\"or\"** の場合、その後にいくつでも他のアイテムが続くことができます。" -#: ../../document.rst:347 f698f26f48f34512b926cffee956eb1f +#: ../../document.rst:348 23524270e63d4257abebc4ab7d8d67a4 msgid "" "Items following the logical keyword may be either integers or again a " "list. An *integer* must be the xref of an OCG. A *list* must conform to " @@ -1681,11 +1687,11 @@ msgstr "" "論理キーワードの後に続くアイテムは、整数または再びリストである必要があります。 *整数* はOCGのxref番号でなければなりません。 *リスト*" " は前述のルールに従う必要があります。" -#: ../../document.rst:349 016a6c226a09454fbbc1a6bced7fc1c2 +#: ../../document.rst:350 85bca83dab23408e8a01ce2ef12bd648 msgid "**Examples:**" msgstr "**例:** " -#: ../../document.rst:351 50f6060dc5a84f999b8956487fe9cd72 +#: ../../document.rst:352 3475135ba7d44691ac3b4e166c84f12e msgid "" "`set_ocmd(ve=[\"or\", 4, [\"not\", 5], [\"and\", 6, 7]])`. This delivers " "ON if the following is true: **\"4 is ON, or 5 is OFF, or 6 and 7 are " @@ -1694,13 +1700,13 @@ msgstr "" "`set_ocmd(ve=[\"or\", 4, [\"not\", 5], [\"and\", 6, 7]])` " "。これは次の条件がtrueの場合にONを返します: **\"4がON、または5がOFF、または6と7が両方ON** \"。" -#: ../../document.rst:352 096e2f8ec8914571acb3029026c85a2a +#: ../../document.rst:353 7666a329e9ed406da01627bd493da505 msgid "" "`set_ocmd(ve=[\"not\", xref])`. This has the same effect as the OCMD " "example created under 1." msgstr "`set_ocmd(ve=[\"not\", xref])` 。これは1で作成されたOCMDの例と同じ効果があります。" -#: ../../document.rst:354 5acf5454a5a1481b830ebaf094815126 +#: ../../document.rst:355 2d0514e36d0a49f084fdfe9c3f092459 msgid "" "For more details and examples see page 224 of :ref:`AdobeManual`. Also do" " have a look at example scripts `here `_ の例のスクリプトもご覧いただけます。" -#: ../../document.rst:356 e4a20e2d25004f1d8f4aac8d9aeda1ef +#: ../../document.rst:357 46760dbbe40c4a8e8a1ea0e9becd7ca0 msgid "" "Visibility expressions, `/VE`, are part of PDF specification version 1.6." " So not all PDF viewers / readers may already support this feature and " @@ -1719,19 +1725,19 @@ msgstr "" "表示条件式 `/VE` " "はPDF仕様バージョン1.6の一部です。したがって、すべてのPDFビューア/リーダーがすでにこの機能をサポートしているわけではなく" -#: ../../document.rst:363 93918555fbb1429db9e3c5bc7d0a1e33 +#: ../../document.rst:364 ee5a1a0e82be4360bc7870730a4c0c42 msgid "Retrieve the definition of an :data:`OCMD`." msgstr ":data:`OCMD` の定義を取得します。" -#: ../../document.rst:365 fd0cffdbde2248ae81bfadce4c382efa +#: ../../document.rst:366 2e78b0f033d94f7a8ad06d69691f107d msgid "the :data:`xref` of the OCMD." msgstr ":data:`xref` (int)- OCMDのxref。" -#: ../../document.rst:367 8dd61c1853fe4f66ab5dfd61745a9259 -msgid "a dictionary with the keys *xref*, *ocgs*, *policy* and *ve*." -msgstr "*xref* 、*ocgs* 、*policy*、*ve* のキーを持つ辞書" +#: ../../document.rst:368 07494fa965de4c8ab089d1e4b59f3130 +msgid "a dictionary with the keys :data:`xref`, *ocgs*, *policy* and *ve*." +msgstr ":data:`xref` 、*ocgs* 、*policy*、*ve* のキーを持つ辞書" -#: ../../document.rst:374 ada5fdf7dffe44b9ac897d9bdc61a88e +#: ../../document.rst:375 73714edbf6c5428388be75bc838a65af msgid "" "List of optional content groups by status in the specified configuration." " This is a dictionary with lists of cross reference numbers for OCGs that" @@ -1741,25 +1747,25 @@ msgstr "" "指定された構成内のステータス別オプションコンテンツグループのリスト。これは、OCGsのクロスリファレンス番号のリストを持つ辞書で、`/ON` " "、`/OFF` 、またはラジオボタングループ (`/RBGroups`) のいずれかに出現するOCGsに対応しています。" -#: ../../document.rst:376 73b15dc749004e469fcc7f90ef796a4d +#: ../../document.rst:377 75befc4dc3314c519e48b236807ec818 msgid "the configuration layer (default is the standard config layer)." msgstr "構成レイヤー(デフォルトは標準の構成レイヤー)。" -#: ../../document.rst:386 902504de80b641d5bacf79e04682dc38 +#: ../../document.rst:387 5e3dd6212c8649359a28d9a9dde70e8a msgid "Changed in v1.22.5: Support list of *locked* OCGs." msgstr "バージョン1.22.5で変更: *ロックされた* OCGのリストをサポート。" -#: ../../document.rst:388 a076e3e8c00b4514896376a9386d8982 +#: ../../document.rst:389 830da4a5e3e947a7984cfa8af2405f40 msgid "" "Mass status changes of optional content groups. **Permanently** sets the " "status of OCGs." msgstr "オプションコンテンツグループの大量ステータス変更。OCGのステータスを **永続的に** 設定します。" -#: ../../document.rst:390 23fd8b3f96d547e0b475ea4f03ba2b48 +#: ../../document.rst:391 8977a0c07e1f4b3984d013a61f77cdf7 msgid "desired configuration layer, choose -1 for the default one." msgstr "希望の構成レイヤー、デフォルトのものには-1を選択します。" -#: ../../document.rst:391 400c95889bf24ab6ad7319ddb197d9f3 +#: ../../document.rst:392 aad2d8c73ab048cda5faaf2597d11459 msgid "" "list of :data:`xref` of OCGs to set ON. Replaces previous values. An " "empty list will cause no OCG being set to ON anymore. Should be specified" @@ -1769,7 +1775,7 @@ msgstr "" "のリスト。以前の値を置換します。空のリストはもうOCGをONに設定しなくなります。`basestate=\"ON\"` " "が使用される場合は指定する必要があります。" -#: ../../document.rst:392 55f9ed8df02c4e238edee84889b39c8c +#: ../../document.rst:393 bf18370943344aff81bb71e9a7bf8fdb msgid "" "list of :data:`xref` of OCGs to set OFF. Replaces previous values. An " "empty list will cause no OCG being set to OFF anymore. Should be " @@ -1778,7 +1784,7 @@ msgstr "" "OFFに設定するOCGの :data:`xref` のリスト。以前の値を置換します。空のリストはもうOCGをOFFに設定しなくなります。 " "`basestate=\"OFF\"` が使用される場合は指定する必要があります。" -#: ../../document.rst:393 d99cbc119423434cb39f01b9b76f5485 +#: ../../document.rst:394 d10f9c3218b84dd0ab61c593cfeff50e msgid "" "state of OCGs that are not mentioned in *on* or *off*. Possible values " "are \"ON\", \"OFF\" or \"Unchanged\". Upper / lower case possible." @@ -1786,7 +1792,7 @@ msgstr "" "*on* または *off* " "で言及されていないOCGの状態。可能な値は「ON」、「OFF」または「Unchanged」です。大文字/小文字を区別できます。" -#: ../../document.rst:394 051f06e3246447f6be29ec76ce76c636 +#: ../../document.rst:395 8d3be651951a406893b3b70d1eca0912 msgid "" "a list of lists. Replaces previous values. Each sublist should contain " "two or more OCG xrefs. OCGs in the same sublist are handled like buttons " @@ -1796,57 +1802,57 @@ msgstr "" "リストのリスト。以前の値を置換します。各サブリストには2つ以上のOCG " "xrefを含める必要があります。同じサブリスト内のOCGはラジオボタングループ内のボタンのように処理され、1つをONに設定すると他のすべてのグループメンバーがOFFに設定されます。" -#: ../../document.rst:395 ea3f2cc2738a4829b76f0737affbf46a +#: ../../document.rst:396 0580d6eb3d53458792a20ec40a781b02 msgid "a list of OCG xref number that cannot be changed by the user interface." msgstr "ユーザーインターフェースで変更できないOCG xref番号のリスト。" -#: ../../document.rst:397 1957c9e3c2784186b99d821a7065f9f3 +#: ../../document.rst:398 ee670e6b96b343338a05af967d9158de msgid "Values `None` will not change the corresponding PDF array." msgstr "値 `None` は対応するPDF配列を変更しません。" -#: ../../document.rst:408 7d0aef97e34844cea2724b66c053b42d +#: ../../document.rst:409 ead81941d26a4414a8ffc13162026d51 msgid "" "Details of all optional content groups. This is a dictionary of " "dictionaries like this (key is the OCG's :data:`xref`):" msgstr "オプションコンテンツグループの詳細情報。これは次のような辞書の辞書です(キーはOCGの :data:`xref` です):" -#: ../../document.rst:426 85060fb9442a4e4c9694278da1977c21 +#: ../../document.rst:427 a53580de03a44f849f63fbaa4a4d1e73 msgid "" "Show the visibility status of optional content that is modifiable by the " "user interface of supporting PDF viewers." msgstr "サポートするPDFビューアのユーザーインターフェースで変更可能なオプションコンテンツの表示状態を表示します。" -#: ../../document.rst:428 75c425ac2b074740a47f3bc34079bba3 +#: ../../document.rst:429 19657ea9ba8346388c0250aa3213298d msgid "" "Only reports items contained in the currently selected layer " "configuration." msgstr "現在選択されているレイヤー設定に含まれるアイテムのみを報告します。" -#: ../../document.rst:435 3f8409db06a543f399328142d63da519 +#: ../../document.rst:436 c8dbb8ff82c34477ac9f19e279231952 msgid "The meaning of the dictionary keys is as follows:" msgstr "辞書のキーの意味は次の通りです:" -#: ../../document.rst:431 bf624f7e91204ba0968545032a0f1bd0 +#: ../../document.rst:432 845eede4ae824dfab1de3dc452eac6cd msgid "*depth:* item's nesting level in the `/Order` array" msgstr "*depth:* `/Order` 配列内のアイテムのネストレベル" -#: ../../document.rst:432 ff6cc74b4593493c98b2d60e6d78dab6 +#: ../../document.rst:433 06b6bc5cb5fe4c12accd9e8f3d7042a4 msgid "*locked:* true if cannot be changed via user interfaces" msgstr "*locked:* ユーザーインターフェースを介して変更できない場合はtrue" -#: ../../document.rst:433 a71657ce222a4814bf3cb2632b423ce6 +#: ../../document.rst:434 89558845cbd04e858106b655305de4f7 msgid "*number:* running sequence number" msgstr "*number:* 連続するシーケンス番号" -#: ../../document.rst:434 6f0eb8d8f516440ab5fefc6374bc566c +#: ../../document.rst:435 88b798a54ea34344b4210ffe1181404d msgid "*on:* item state" msgstr "*on:* アイテムの状態" -#: ../../document.rst:435 75da460421554dfbaa1145b323bbe6d5 +#: ../../document.rst:436 5d1f88eeb5b34806a19135eeaa76ba46 msgid "*text:* text string or name field of the originating OCG" msgstr "*text:* 元のOCGのテキスト文字列または名前フィールド" -#: ../../document.rst:436 dacc553c20254b268bdd7e1ccb9971a5 +#: ../../document.rst:437 1b1ceafa27b441dda9196254eb0b3da7 msgid "" "*type:* one of \"label\" (set by a text string), \"checkbox\" (set by a " "single OCG) or \"radiobox\" (set by a set of connected OCGs)" @@ -1854,13 +1860,13 @@ msgstr "" "*type:* \"label\"(テキスト文字列によって設定)、\"checkbox\"(単一のOCGによって設定)、または " "\"radiobox\"(接続されたOCGのセットによって設定)のいずれか" -#: ../../document.rst:442 bcde7ab87e6f411ea74207cbbb1559b7 +#: ../../document.rst:443 b1c81ff21ecc42afbfab2179ec9cc0f2 msgid "" "Modify OC visibility status of content groups. This is analog to what " "supporting PDF viewers would offer." msgstr "コンテンツグループのOC表示状態を変更します。これは、サポートするPDFビューアが提供するものと同様です。" -#: ../../document.rst:444 60b54700462a4082b3b44f68c1569152 +#: ../../document.rst:445 bd8000a233aa4115a722ee3b083ea52c msgid "" "Please note that visibility is **not** a property stored with the OCG. It" " is not even information necessarily present in the PDF document at all. " @@ -1872,17 +1878,17 @@ msgstr "" "ことに注意してください。それはPDFドキュメントに必ずしも存在しない情報でもありません。代わりに、現在の表示状態はサポートするPDF消費者ソフトウェアのユーザーインターフェースを使用して**一時的に**" " 設定されます。このメソッドでも同じタイプの機能が提供されます。" -#: ../../document.rst:446 6c0ad023ece24fcfa376a2a2346e1488 +#: ../../document.rst:447 e212555b749b44a6b4f562a12fb95ef2 msgid "To make **permanent** changes, use :meth:`Document.set_layer`." msgstr "**永続的な** 変更を行うには、:meth:`Document.set_layer` を使用してください。" -#: ../../document.rst:448 5ab0c02de4b74fdba95d49e75703f7ea +#: ../../document.rst:449 fbe306d1307848f1ab3938e738258066 msgid "" "either the sequence number of the item in list " ":meth:`Document.layer_configs` or the \"text\" of one of these items." msgstr ":meth:`Document.layer_configs` リストのアイテムのシーケンス番号またはこれらのアイテムの「テキスト」。" -#: ../../document.rst:449 9ecd16ddfb4f4b358efee57c0dff0d5f +#: ../../document.rst:450 3dbca83257a54c80af622790e7a2d830 msgid "" "`PDF_OC_ON` = set on (default), `PDF_OC_TOGGLE` = toggle on/off, " "`PDF_OC_OFF` = set off." @@ -1890,7 +1896,7 @@ msgstr "" "`PDF_OC_ON` = ONに設定(デフォルト)、`PDF_OC_TOGGLE` = ON/OFFを切り替え、`PDF_OC_OFF` = " "OFFに設定。" -#: ../../document.rst:454 b4c740c43c6f4b3594dee235864060dc +#: ../../document.rst:455 1a43efa52c434e2ba8c7b6f808bfeb1f msgid "" "Decrypts the document with the string *password*. If successful, document" " data can be accessed. For PDF documents, the \"owner\" and the \"user\" " @@ -1901,15 +1907,15 @@ msgstr "" "文字列の *パスワード* " "でドキュメントを複合化します。成功した場合、ドキュメントデータにアクセスできます。PDFドキュメントの場合、「オーナー」および「ユーザー」には異なる特権があり、したがってこれらの認証レベルに異なるパスワードが存在する可能性があります。このメソッドは提供されたパスワードに適切な(オーナーまたはユーザー)アクセス権を自動的に確立します。" -#: ../../document.rst:456 a22e53f414f54824810d7a2438f8a593 +#: ../../document.rst:457 3dd4a0f7ba2b4b669d92257a1504439f msgid "owner or user password." msgstr "オーナーまたはユーザーパスワード。" -#: ../../document.rst:459 5f6907fd670040fcb74227d7a31751b3 +#: ../../document.rst:460 d31f4a53b1e04294bc6c2e1a1919d29d msgid "" "a positive value if successful, zero otherwise (the string does not match" " either password). If positive, the indicator " -":attr:`Document.is_encrypted` is set to *False*. **Positive** return " +":attr:`Document.is_encrypted` is set to ``False``. **Positive** return " "codes carry the following information detail: * 1 => authenticated, but " "the PDF has neither owner nor user passwords. * 2 => authenticated with " "the **user** password. * 4 => authenticated with the **owner** password. " @@ -1927,36 +1933,36 @@ msgid "" "where applicable." msgstr "" -#: ../../document.rst:459 cb4eae6602f74a3d93b22cdc1757e453 +#: ../../document.rst:460 6ba8e1cf3a644f9c8317e43603585098 msgid "" "a positive value if successful, zero otherwise (the string does not match" " either password). If positive, the indicator " -":attr:`Document.is_encrypted` is set to *False*. **Positive** return " +":attr:`Document.is_encrypted` is set to ``False``. **Positive** return " "codes carry the following information detail:" msgstr "" "成功した場合は正の値、それ以外はゼロです(文字列がどちらのパスワードとも一致しない場合)。正の戻り値がある場合、インジケータ " -":attr:`Document.is_encrypted` は *False* に設定されます。**正の** " +":attr:`Document.is_encrypted` は ``False`` に設定されます。**正の** " "戻り値コードには、次の情報の詳細が含まれています:" -#: ../../document.rst:461 288e75c977254026a0fd7447fcc2180a +#: ../../document.rst:462 4b23d932af1f47dfb645a634cf51d717 msgid "1 => authenticated, but the PDF has neither owner nor user passwords." msgstr "1 => 認証済み、ただしPDFにはオーナーまたはユーザーパスワードがありません。" -#: ../../document.rst:462 09363643102546b3a2f2a90374e55d23 +#: ../../document.rst:463 c410aa901a8a4722a786ecbda1773364 msgid "2 => authenticated with the **user** password." msgstr "2 => **ユーザー** パスワードで認証済み。" -#: ../../document.rst:463 57e42aa4f88747a380415680c8fb1efc +#: ../../document.rst:464 e3ce9b279da54a07a8cbbb5738228811 msgid "4 => authenticated with the **owner** password." msgstr "4 => **オーナー** パスワードで認証済み。" -#: ../../document.rst:464 c3cdc7dd913b43648bc8c97e40a3dacc +#: ../../document.rst:465 ebe25554a7144e6f8a924c50920cc86e msgid "" "6 => authenticated and both passwords are equal -- probably a rare " "situation." msgstr "6 => 認証済みで両方のパスワードが等しい-おそらくまれな状況" -#: ../../document.rst:468 026de4e2f2034c0fb727d438b9a78e33 +#: ../../document.rst:469 28ddd78b67804caa95d8b0f7f9b64892 msgid "" "The document may be protected by an owner, but **not** by a user " "password. Detect this situation via `doc.authenticate(\"\") == 2`. This " @@ -1976,11 +1982,11 @@ msgstr "" "。したがって、`PDF_PERM_COPY` 、`PDF_PERM_MODIFY` 、`PDF_PERM_ANNOTATE` " "などの対応する許可フラグがオフに設定されていても、テキストを抽出したり、コンテンツを追加または変更したりすることができます!該当する場合、法的に適合するアプリケーションを構築する責任があります。" -#: ../../document.rst:472 65063eef9ac044848898ae2135851676 +#: ../../document.rst:473 77b217ddc32c4f70ab3b022b40117cc1 msgid "New in v 1.18.6" msgstr "バージョン 1.18.6 での新機能" -#: ../../document.rst:474 63114ea78de84aa2a0b3daf479eea30b +#: ../../document.rst:475 a3e58e7fdbc4431aa838c03548bdcab1 msgid "" "PDF only: Return a list of page numbers that have the specified label -- " "note that labels may not be unique in a PDF. This implies a sequential " @@ -1989,35 +1995,35 @@ msgstr "" "PDF のみ:指定されたラベルを持つページ番号のリストを返します。ラベルは PDF " "では一意でないことがあることに注意してください。これは、**すべてのページ番号** を逐次検索してそのラベルを比較することを意味します。" -#: ../../document.rst:476 f90e7f8192c94043ab8a90e7abddf3e5 +#: ../../document.rst:477 c8c2ee5c83ce40db824b6209b1e3809f msgid "Implementation detail -- pages are **not loaded** for this purpose." msgstr "実装の詳細 - この目的でページは **読み込まれません** 。" -#: ../../document.rst:478 57928b82f2184c518470c78b91c2259a +#: ../../document.rst:479 5d808a1230ca4174974e00810f24dda8 msgid "the label to look for, e.g. \"vii\" (Roman number 7)." msgstr "検索対象のラベル、例: \"vii\"(ローマ数字 7)。" -#: ../../document.rst:479 9fd7d2713ac24550b4424504d03eb25e +#: ../../document.rst:480 63226c9d70b1477ba39669cffcfde1e2 msgid "" "stop after first hit. Useful e.g. if labelling is known to be unique, or " "there are many pages, etc. The default will check every page number." msgstr "最初の一致で停止します。ラベリングが一意であることがわかっている場合や、多くのページがある場合などに便利です。デフォルトではすべてのページ番号をチェックします。" -#: ../../document.rst:481 a7cfb034013f4f70954273bbb95b827d +#: ../../document.rst:482 f5d03ab00a5c4c7dbc8d30330c402ad3 msgid "" "list of page numbers that have this label. Empty if none found, no labels" " defined, etc." msgstr "このラベルを持つページ番号のリスト。見つからない場合やラベルが定義されていない場合などは空です。" -#: ../../document.rst:486 ../../document.rst:766 ../../document.rst:787 -#: ../../document.rst:1809 ../../document.rst:1833 -#: 294b750372d648fa9c027e718c2cd3eb 8e9810a984354da9a99b6aafe59d3d52 -#: 9f2418d9641743a2851e09649dbcb9de a99d1cf78e1e44cfb97a4123c3af987d -#: af2e4c56b5ff4c48a60a70f4e3ff45b9 +#: ../../document.rst:487 ../../document.rst:777 ../../document.rst:798 +#: ../../document.rst:1835 ../../document.rst:1859 +#: 00e5d800806d4befb68e44539d5e3d2b 52abd04029c448dc8b66b342498ff51a +#: 795752c8c5f34590a03245bef3c22dc0 c326bff701194aa6b2b548f5892ebc2a +#: e61ef169a79d47fe917db70cea1692d1 msgid "New in v1.18.7" msgstr "バージョン 1.18.7 での新機能" -#: ../../document.rst:488 8f1635a4080a440bb4c34abc8e2d1073 +#: ../../document.rst:489 5526c7633a0e4eb3b4372581a25d50eb msgid "" "PDF only: Extract the list of page label definitions. Typically used for " "modifications before feeding it into :meth:`Document.set_page_labels`." @@ -2025,19 +2031,19 @@ msgstr "" "PDF のみ:ページラベルの定義のリストを抽出します。通常は :meth:`Document.set_page_labels` " "に渡す前の変更に使用されます。" -#: ../../document.rst:490 7a0c02d80a1b4b2e9b8e0452069eaeff +#: ../../document.rst:491 ad8d156e57d74eb8ae4aaa51f4863cbd msgid "a list of dictionaries as defined in :meth:`Document.set_page_labels`." msgstr ":meth:`Document.set_page_labels` で定義されたように辞書のリスト。" -#: ../../document.rst:494 aca3ea8d3fed43dd9203e4df9a33e076 +#: ../../document.rst:495 899254ea0c9c4ed99dbcfe83a5c1f99f msgid "New in v1.18.6" msgstr "バージョン 1.18.6 での新機能" -#: ../../document.rst:496 f3c242ca7a52442d8fa6981ec611f13b +#: ../../document.rst:497 a36b2a03a63f407a85e05b74ba57f024 msgid "PDF only: Add or update the page label definitions of the PDF." msgstr "PDF のみ:PDF のページラベルの定義を追加または更新します。" -#: ../../document.rst:498 886040cc6d4c4c9eb9fe2c30b66f5b38 +#: ../../document.rst:499 505683a75e8c4e8baf1766d51e0d26de msgid "" "a list of dictionaries. Each dictionary defines a label building rule and" " a 0-based \"start\" page number. That start page is the first for which " @@ -2058,7 +2064,7 @@ msgid "" "numbering with this value. Default is 1, smaller values are ignored." msgstr "" -#: ../../document.rst:498 d5d56720a66942abbbeee39b7735ef81 +#: ../../document.rst:499 4b9ea342bc174d848a753d24bd9fd590 msgid "" "a list of dictionaries. Each dictionary defines a label building rule and" " a 0-based \"start\" page number. That start page is the first for which " @@ -2070,7 +2076,7 @@ msgstr "" "ページ番号を定義します。その開始ページはラベル定義が有効になる最初のページです。各辞書は最大 4 つの項目を持ち、 `{'startpage': " "int, 'prefix': str, 'style': str, 'firstpagenum': int}` という形式で、次の項目を持ちます。" -#: ../../document.rst:500 81016ff115774fba83770fe22d8e69b0 +#: ../../document.rst:501 459cdc3edc19474d9874b4176f2b770c msgid "" "`startpage`: (int) the first page number (0-based) to apply the label " "rule. This key **must be present**. The rule is applied to all subsequent" @@ -2080,13 +2086,13 @@ msgstr "" "`startpage` :(int)ラベルルールを適用する最初のページ番号(0 ベース)。このキーは **存在する必要があります** " "。ルールはドキュメントの終端に達するか、次の大きなページ番号を持つルールに置き換えられるまで、すべての後続ページに適用されます。" -#: ../../document.rst:501 98c97facd7d44f4daa10e296199b8a85 +#: ../../document.rst:502 c64500585bde414a83c7547ded5715cf msgid "" "`prefix`: (str) an arbitrary string to start the label with, e.g. \"A-\"." " Default is \"\"." msgstr "`prefix` :(str)ラベルの先頭に付ける任意の文字列、例: \"A-\"。デフォルトは \"\" です。" -#: ../../document.rst:502 d5aa1dd505f14993aece6673060ca4cd +#: ../../document.rst:503 e10dbc001fbc4f398a7f13ef7fd444c0 msgid "" "`style`: (str) the numbering style. Available are \"D\" (decimal), " "\"r\"/\"R\" (Roman numbers, lower / upper case), and \"a\"/\"A\" (lower /" @@ -2102,17 +2108,17 @@ msgstr "" "の場合、番号付けは行われず、その範囲のページはプレフィックス値から成る同じラベルを受け取ります。`prefix` も省略された場合、ラベルは " "\"\" になります。" -#: ../../document.rst:503 f50f21a163604ff7a3c092d3df9bda05 +#: ../../document.rst:504 c6e67023eb8d4238b1d1f30abd874de9 msgid "" "`firstpagenum`: (int) start numbering with this value. Default is 1, " "smaller values are ignored." msgstr "`firstpagenum` :(int)この値から番号付けを開始します。デフォルトは 1 で、小さい値は無視されます。" -#: ../../document.rst:505 6e036cea41a544968714f47092a789b5 +#: ../../document.rst:506 1b1e49880cf049f6a1ff93045b392960 msgid "For example::" msgstr "例::" -#: ../../document.rst:510 cf37f24194d64ea7869f2df4869497ee +#: ../../document.rst:511 8f31f7e7e4e444e49e3118f5ecbdb058 msgid "" "will generate the labels \"A-10\", \"A-11\", \"A-12\", \"A-13\", \"1\", " "\"2\", \"3\", ... for pages 6, 7 and so on until end of document. Pages 0" @@ -2121,76 +2127,76 @@ msgstr "" "次のラベルを生成します: \"A-10\"、\"A-11\"、\"A-12\"、\"A-13\"、\"1\"、\"2\"、\"3\"、... " "ページ 6、7、など、ドキュメントの終了まで続きます。ページ 0 から 5 まではラベル \"A-\" が付きます。" -#: ../../document.rst:515 ../../document.rst:529 -#: 6adf8b32546e47508e8950a2471aef3a d3fddead862d4bcea2663647a11306ab +#: ../../document.rst:516 ../../document.rst:530 +#: 772aa52715f6499c891d664f7529b9c8 bdf83f312d9e4d09810192fc4a8decbd msgid "New in v.1.17.3" msgstr "バージョン 1.17.3 での新機能" -#: ../../document.rst:517 7a774a68a5a744a8a4b9aa6578f446de +#: ../../document.rst:518 66d372f32ecb4e74984de4b4a7a7dd6b msgid "" "Return a page pointer in a reflowable document. After re-layouting the " "document, the result of this method can be used to find the new location " "of the page." msgstr "リフロータブルなドキュメント内のページポインターを返します。ドキュメントの再レイアウト後、このメソッドの結果はページの新しい位置を見つけるために使用できます。" -#: ../../document.rst:519 8c12c7ea79bd473c9f1ec875e69f88e3 +#: ../../document.rst:520 f23213f179fe40b7a72f40464cf851a9 msgid "Do not confuse with items of a table of contents, TOC." msgstr "目次の項目とは混同しないでください。" -#: ../../document.rst:521 c35bd7738e0b473d855cc6a9b80af2d9 +#: ../../document.rst:522 71671bfa13e545b682cc52bf1695d0fc msgid "page location. Must be a valid *(chapter, pno)*." msgstr "ページの位置。有効なものである必要があります *(章、ページ番号)* 。" -#: ../../document.rst:524 71774e5cae9a44b0818a881f6df93275 +#: ../../document.rst:525 087aa911d9a744c9ae6a67741197e987 msgid "" "a long integer in pointer format. To be used for finding the new location" " of the page after re-layouting the document. Do not touch or re-assign." msgstr "ポインターフォーマットの長整数。ドキュメントの再レイアウト後のページの新しい位置を見つけるために使用されます。変更しないでください。" -#: ../../document.rst:531 5c14b2f8f9d846408b4b5cab7a8d667d +#: ../../document.rst:532 98941bcf4dda4435a226bfaa556008a7 msgid "Return the new page location after re-layouting the document." msgstr "ドキュメントの再レイアウト後の新しいページの位置を返します。" -#: ../../document.rst:533 d213c42f0fe94db99badfe166a7d8fcb +#: ../../document.rst:534 dc0f0731eb2148669b8c227ae9190bb8 msgid "created by :meth:`Document.make_bookmark`." msgstr ":meth:`Document.make_bookmark` によって作成されたもの。" -#: ../../document.rst:536 444177fe274845049d5ec3991654c09e +#: ../../document.rst:537 f3490537b6b144d5b8e63cd8888773c6 msgid "the new (chapter, pno) of the page." msgstr "ページの新しい(章、ページ番号)。" -#: ../../document.rst:541 ../../document.rst:553 ../../document.rst:564 -#: 29f784a3d6e24fae8564659214bd2ac6 e4b70325d2744e9ea78052532ff8e231 -#: e6bcbd881a7840f68d08495189bd671f +#: ../../document.rst:542 ../../document.rst:554 ../../document.rst:565 +#: 21d1d657e4ee444f986b635f805fcfd5 a193e53c41e549ea82e7d96ff9b92231 +#: b122ce60fb3a4d5abf86bceb9077ec57 msgid "New in v.1.17.0" msgstr "バージョン 1.17.0 での新機能" -#: ../../document.rst:543 03e177c3985d4c029553fab4679dd852 +#: ../../document.rst:544 2615090100224dc2a3d9267d0ec58241 msgid "Return the number of pages of a chapter." msgstr "章のページ数を返します。" -#: ../../document.rst:545 0a18532614c54fae9673e738c5d1f589 +#: ../../document.rst:546 7522ca0d7afc4bfba33b976a4262edc1 msgid "the 0-based chapter number." msgstr "0 ベースの章番号。" -#: ../../document.rst:548 79e06126c5d64affb175988fd01e41b5 +#: ../../document.rst:549 11816b8fe558459f9a9675333f683d11 msgid "" "number of pages in chapter. Relevant only for document types with chapter" " support (EPUB currently)." msgstr "章内のページ数。章のサポートを持つドキュメントタイプに関連します(現在は EPUB のみ)。" -#: ../../document.rst:555 79bd6ec708d5487a9733071cf051397b +#: ../../document.rst:556 2179f23cf070467195c75e4b7d33f4ee msgid "Return the location of the following page." msgstr "次のページの位置を返します。" -#: ../../document.rst:557 ../../document.rst:568 -#: 35ff6df3a897472f8cad2bf2f9e2aa6f 863c56312b3b47deaa6af74173434f3a +#: ../../document.rst:558 ../../document.rst:569 +#: 07705b8ee93b48cb96aa5fd0b7235f60 3685a64b0c8c41dcb95fe4cb7a355fc6 msgid "" "the current page id. This must be a tuple *(chapter, pno)* identifying an" " existing page." msgstr "現在のページ ID。これは既存のページを識別するタプル *(章、ページ番号)* である必要があります。" -#: ../../document.rst:559 1312b07486064556afa731b200d4996b +#: ../../document.rst:560 59412c3cfa2a4986bacf02ce94022ca7 msgid "" "The tuple of the following page, i.e. either *(chapter, pno + 1)* or " "*(chapter + 1, 0)*, **or** the empty tuple *()* if the argument was the " @@ -2200,11 +2206,11 @@ msgstr "" "次のページのタプル、つまり *(章、ページ番号 + 1)* または *(章 + 1、0)* 、**または** " "引数が最後のページである場合は空のタプル *()* 。章のサポートを持つドキュメントタイプに関連します(現在は EPUB のみ)。" -#: ../../document.rst:566 7e959f045af5447da6b702bfa0139fe5 +#: ../../document.rst:567 eca860a95ca34478bb570ab041b828f6 msgid "Return the locator of the preceding page." msgstr "前のページの位置を返します。" -#: ../../document.rst:570 bbbc1c74e0bf445bb7dbd1ab9ecace5a +#: ../../document.rst:571 53c5a2b7e00f49538c6330c1844ef619 msgid "" "The tuple of the preceding page, i.e. either *(chapter, pno - 1)* or the " "last page of the preceding chapter, **or** the empty tuple *()* if the " @@ -2214,7 +2220,7 @@ msgstr "" "前のページのタプル、つまり *(章、ページ番号 - 1)* **または** 前の章の最後のページ、または引数が最初のページである場合は空のタプル " "*()* 。章のサポートを持つドキュメントタイプに関連します(現在は EPUB のみ)。" -#: ../../document.rst:575 8a441effb7774071ad05c6221844bff0 +#: ../../document.rst:576 2deebc74649d4656bed4b761c2dd19fb msgid "" "Changed in v1.17.0: For document types supporting a so-called \"chapter " "structure\" (like EPUB), pages can also be loaded via the combination of " @@ -2226,13 +2232,13 @@ msgstr "" "をサポートするドキュメントタイプ(例:EPUB)の場合、絶対ページ番号の代わりに章番号と相対ページ番号の組み合わせを使用してページをロードすることもできます。これにより、大きなドキュメントへの" " **アクセスが大幅に高速化される** はずです。" -#: ../../document.rst:577 106b6ffc2b8f4ecb90fc4caf0161e809 +#: ../../document.rst:578 377222ade7c945c7bde7b14244bece04 msgid "" "Create a :ref:`Page` object for further processing (like rendering, text " "searching, etc.)." msgstr "さらなる処理(レンダリング、テキスト検索など)のための :ref:`Page` オブジェクトを作成します。" -#: ../../document.rst:579 083c354564be4d109d82a900b4ff1bf4 +#: ../../document.rst:580 f36a12d37f79485d87c4bf4a515e0e4f msgid "" "*(Changed in v1.17.0)* Either a 0-based page number, or a tuple " "*(chapter, pno)*. For an **integer**, any `-∞ < page_id < page_count` is " @@ -2247,11 +2253,11 @@ msgid "" "currently)." msgstr "" -#: ../../document.rst:579 55de756400cd474ba4ac6698dd55096b +#: ../../document.rst:580 1512338ecdd04c348659a0323f7aecdf msgid "*(Changed in v1.17.0)*" msgstr "*(バージョン 1.17.0 で変更)*" -#: ../../document.rst:581 0cd902b694964a00b0a05fc484fbb08d +#: ../../document.rst:582 17f834ccf97443c5accfad63c19f5f48 msgid "" "Either a 0-based page number, or a tuple *(chapter, pno)*. For an " "**integer**, any `-∞ < page_id < page_count` is acceptable. While page_id" @@ -2264,7 +2270,7 @@ msgstr "" "が追加されます。たとえば、最後のページを読み込むには、*doc.load_page(-1)* を使用できます。これにより、 " "`page.number = doc.page_count - 1` となります。" -#: ../../document.rst:583 280ce967423546c8a26c963214a0ccaf +#: ../../document.rst:584 b79c95fb0ede4718a95c88960fa53e35 msgid "" "For a tuple, *chapter* must be in range :attr:`Document.chapter_count`, " "and *pno* must be in range :meth:`Document.chapter_page_count` of that " @@ -2277,13 +2283,13 @@ msgstr "" "の範囲内になければなりません。両方の値は0から始まります。この表記法を使用すると、:attr:`Page.number` " "は指定されたタプルに等しくなります。章のサポートを持つドキュメントタイプに関連します(現在は EPUB のみ)。" -#: ../../document.rst:585 ../../document.rst:606 ../../document.rst:1362 -#: 6731bf31070d4451a7cf5e0fd7d63c34 e13daa6e8e0c4878ab4678ec0b86d0b0 -#: eeec73f3027d4b9390c0a1b87da09a21 +#: ../../document.rst:586 ../../document.rst:617 ../../document.rst:1390 +#: 50ae7cbcdb4742c29d5a033a4fc933d7 55b4cd344aef490cb3c3d8708149ae5d +#: 7e748f42d2fb4b0d80b35cc1c60bfecd msgid ":ref:`Page`" msgstr "" -#: ../../document.rst:589 3c34b8ed12d24069a205e0836b25fc96 +#: ../../document.rst:590 fd0f6c32991d41d3ab32ce52f3104091 msgid "" "Documents also follow the Python sequence protocol with page numbers as " "indices: *doc.load_page(n) == doc[n]*." @@ -2291,7 +2297,7 @@ msgstr "" "ドキュメントはページ番号をインデックスとするPythonのシーケンスプロトコルに従います:indices: *doc.load_page(n) " "== doc[n]* 。" -#: ../../document.rst:591 e404ee2e14ec4b5397de531e7ef58666 +#: ../../document.rst:592 8dea69cd0aad4a66b0696a76fa8cc82e msgid "" "For **absolute page numbers** only, expressions like *\"for page in doc: " "...\"* and *\"for page in reversed(doc): ...\"* will successively yield " @@ -2302,7 +2308,7 @@ msgstr "" "reversed(doc): …\"* は文書のページを順次生成します。スライシングのようにページを処理できる " ":meth:`Document.pages` を参照してください。" -#: ../../document.rst:593 197d0e214fc2418782ffb81a6ff0a038 +#: ../../document.rst:594 9edaee625ebb486bb9fe0a059a073385 msgid "" "You can also use index notation with the new chapter-based page " "identification: use *page = doc[(5, 2)]* to load the third page of the " @@ -2311,7 +2317,7 @@ msgstr "" "新しい章ベースのページ識別にもインデックス表記を使用できます: *page = doc[(5, 2)]* として、 " "6番目の章の3番目のページを読み込むことができます。" -#: ../../document.rst:595 198a748dd2614a82bb09e5189b48d196 +#: ../../document.rst:596 f1304b560624489ea0557ed7cf6de939 msgid "" "To maintain a consistent API, for document types not supporting a chapter" " structure (like PDFs), :attr:`Document.chapter_count` is 1, and pages " @@ -2322,21 +2328,39 @@ msgstr "" " は1であり、ページはタプル *(0、pno)* を使用しても読み込むことができます。パフォーマンスの改善に関するコメントについては、この " "[#f3]_ の注釈を参照してください。" -#: ../../document.rst:599 cff8351d7d7d47c792eef66b9f053f67 +#: ../../document.rst:601 68c322ee2c48453fb89596b42ec3a41b +msgid "" +"PDF only: Change the color component counts for all object types text, " +"image and vector graphics for all pages." +msgstr "" + +#: ../../document.rst:603 8548a955df7248bab5796a7b981e2cc9 +msgid "" +"desired color space indicated by the number of color components: 1 = " +"DeviceGRAY, 3 = DeviceRGB, 4 = DeviceCMYK." +msgstr "" + +#: ../../document.rst:605 04afac121dd941a29f03623c8a265035 +msgid "" +"The typical use case is 1 (DeviceGRAY) which converts the PDF to " +"grayscale." +msgstr "" + +#: ../../document.rst:610 c8d895eb5eba47ddb5ea0dabeec141e7 msgid "New in v1.16.10" msgstr "バージョン 1.16.10 での新機能" -#: ../../document.rst:601 b91801aaa02647f28999a847017265e7 +#: ../../document.rst:612 943fbb7b4c1b4a81b4dce6a7f0ee672e msgid "" "PDF only: Provide a new copy of a page after finishing and updating all " "pending changes." msgstr "PDF のみ:保留中のすべての変更を終了および更新した後、ページの新しいコピーを提供します。" -#: ../../document.rst:603 d0062420bc5848aba4f2764417b5b8c7 +#: ../../document.rst:614 4e8d792de4c1453680688ea24e51416a msgid "page object." msgstr "ページオブジェクト。" -#: ../../document.rst:608 f93f09457861474485955f027bfc5287 +#: ../../document.rst:619 11aef2ea90ae4af690da0f74c161d5a6 msgid "" "a new copy of the same page. All pending updates (e.g. to annotations or " "widgets) will be finalized and a fresh copy of the page will be loaded. " @@ -2347,13 +2371,13 @@ msgid "" "page -> annotations/widgets\" intact." msgstr "" -#: ../../document.rst:608 0afa1674508a4c839047b7386eaf69e3 +#: ../../document.rst:619 e6d5b5d4da4f4dbfb4e0225583f8ea5a msgid "" "a new copy of the same page. All pending updates (e.g. to annotations or " "widgets) will be finalized and a fresh copy of the page will be loaded." msgstr "同じページの新しいコピー。すべての保留中の更新(注釈やウィジェットなど)が確定し、ページの新しいコピーが読み込まれます。" -#: ../../document.rst:610 35fc5611747b4447aafaa4633986839e +#: ../../document.rst:621 885aa43c28704aeb9e16090d8df6c920 msgid "" "In a typical use case, a page :ref:`Pixmap` should be taken after " "annotations / widgets have been added or changed. To force all those " @@ -2365,11 +2389,11 @@ msgstr "" "を取得する必要があります。これらの変更がページ構造に反映されるようにするために、このメソッドは \"document -> page -> " "annotations/widgets\" のオブジェクト階層を保持したまま、新しいコピーを再設定します。" -#: ../../document.rst:615 424ea284ba3047e0b8e13975a979dee3 +#: ../../document.rst:626 cf5c3c95d8664db2b7be4ba1f1d6c5e2 msgid "PDF only: Convert destination names into a Python dict." msgstr "PDFのみ: ページの目的地名をPythonの辞書に変換します" -#: ../../document.rst:617 53ded2727f5347dcb222f13a97eea039 +#: ../../document.rst:628 2d4ffec227b64c0899f1d4af952cf9b8 msgid "" "A dictionary with the following layout: * *key*: (str) the name. * " "*value*: (dict) with the following layout: * \"page\": target page " @@ -2385,65 +2409,65 @@ msgid "" "1486 0'}, ... }" msgstr "" -#: ../../document.rst:618 ef5724a6ce2f49d3906b87953c800322 +#: ../../document.rst:629 8c08f8d4386e4cac808542d05c7c07b5 msgid "A dictionary with the following layout:" msgstr "以下のキーを持つ辞書:" -#: ../../document.rst:620 531018ae1ed844a4ad7741e3a25d57bd +#: ../../document.rst:631 a1744f0351f949cf8179d23b302afcd1 msgid "*key*: (str) the name." msgstr "キー: (str) 名前" -#: ../../document.rst:626 72e8ad0f20dd43b78788d3bfdead0c27 +#: ../../document.rst:637 8df122bec3d142f8a607917f44f38332 msgid "*value*: (dict) with the following layout:" msgstr "以下のキーを持つ辞書:" -#: ../../document.rst:622 4fa65e66a57346fda2d1dc94b741bf00 +#: ../../document.rst:633 525df66fc21943b0a24379c72dbac672 msgid "\"page\": target page number (0-based). If no page number found -1." msgstr "\"page\": 対象のページ番号(0から始まる)。ページ番号が見つからない場合は-1。" -#: ../../document.rst:623 346a2ba4520e496abf91972b1f112142 +#: ../../document.rst:634 59f559f2579f4863932532a135b4c20f msgid "" "\"to\": (x, y) target point on page. Currently in PDF coordinates, i.e. " "point (0,0) is the bottom-left of the page." msgstr "\"to\": (x, y) ページ上のターゲットポイント。現在はPDF座標であり、つまり点(0,0)がページの左下になります。" -#: ../../document.rst:625 60c8aa2ed2b74574828da1552876fb97 +#: ../../document.rst:636 b1183d130eb1479f9b3fdfecb2f7c536 msgid "\"zoom\": (float) the zoom factor." msgstr "\"zoom\": ターゲットページ上のズームファクター(float)。" -#: ../../document.rst:626 355194e0e6f94219ab97b7dd58a95217 +#: ../../document.rst:637 dce3f3fcf79d4221a915941c4f265a7c msgid "" "\"dest\": (str) only present if the target location on the page has not " "been provided as \"/XYZ\" or if no page number was found." msgstr "\"dest\": (str) \"/XYZ\" としてターゲット位置が指定されていない場合や、ページ番号が見つからない場合にのみ存在します。" -#: ../../document.rst:628 96c0105e82824e849eb1004311e3b3a8 +#: ../../document.rst:639 3fa6a208d82447d396afcf33d9b52c8e msgid "Examples::" msgstr "例::" -#: ../../document.rst:635 45d407ac3fa146a98a8c33ee6dc16d63 +#: ../../document.rst:646 52809bb95d8d44639dec4855045d4835 msgid "or::" msgstr "または:" -#: ../../document.rst:642 19d30d9ee7994b5190be6ce320d141cd +#: ../../document.rst:653 54e150b680c44fc28555686e749b4dbf msgid "" "All names found in the catalog under keys \"/Dests\" and \"/Names/Dests\"" " are included." msgstr "キー \"/Dests\" および \"/Names/Dests\" の下でカタログ内に見つかるすべての名前が含まれます。" -#: ../../document.rst:645 b090343415504ab8b5d0704e1d5afa3d +#: ../../document.rst:656 029d932ed78d461fbf4f7e23ac10d40d msgid "New in v1.23.6" msgstr "v1.23.6で新登場" -#: ../../document.rst:650 ../../document.rst:660 ../../document.rst:1087 -#: ../../document.rst:1097 ../../document.rst:1109 -#: 07cc94ef09d741aea75450070aac89af 431f305117c84f4ab7569080bf68aa99 -#: 8dfd46791dc145d9a3d01f109f6fcdb2 ce21f83b2dd64c13bf5799269d50b8ea -#: f6c7579657324efc8bb0f351dc638b4a +#: ../../document.rst:661 ../../document.rst:671 ../../document.rst:1104 +#: ../../document.rst:1114 ../../document.rst:1126 +#: 42da0868d52045f4912cdc253b0d58d0 43dc347381244a1bb0247e19dee82361 +#: bde0f345fc704856bfa6922bc3c598f2 c8dfe172f6eb4880b9559bb1a41a9a66 +#: fd31829450cb409580bc03f15f672add msgid "New in v1.17.7" msgstr "バージョン 1.17.7 での新機能" -#: ../../document.rst:652 74bec1ee0f24463d9d02f050bafa750e +#: ../../document.rst:663 aa60e0724f6542b89b15cb221c5e4492 msgid "" "PDF only: Return the unrotated page rectangle -- **without loading the " "page** (via :meth:`Document.load_page`). This is meant for internal " @@ -2452,16 +2476,16 @@ msgstr "" "PDF のみ:ページを読み込まずに(:meth:`Document.load_page` " "を介さずに)、回転を無視してページの長方形を返します。これは、最高のパフォーマンスを必要とする内部目的のために使用されます。" -#: ../../document.rst:654 ../../document.rst:664 -#: 2b2befcd3c774649a12adf8717aa42fd cb6499a631c449998219b4871cd7f13f +#: ../../document.rst:665 ../../document.rst:675 +#: d6f44a6f77ba4aef87b8a3f5c983f2fd ece882efa538407a93154e82c6c9e8da msgid "0-based page number." msgstr "0から始まるページ番号。" -#: ../../document.rst:656 506f3cf0494d4390989ffe5c634fc844 +#: ../../document.rst:667 0b215749aa924948a79159275a12e6cd msgid ":ref:`Rect` of the page like :meth:`Page.rect`, but ignoring any rotation." msgstr ":meth:`Page.rect` のようなページの :ref:`Rect` ですが、回転を無視します。" -#: ../../document.rst:662 4347429869c64fafa78021f548531e83 +#: ../../document.rst:673 94aed8c23e4440008ff68cd76cae2948 msgid "" "PDF only: Return the :data:`xref` of the page -- **without loading the " "page** (via :meth:`Document.load_page`). This is meant for internal " @@ -2470,15 +2494,15 @@ msgstr "" "PDF のみ: **ページを読み込まずに** (:meth:`Document.load_page` を介さずに)、ページの " ":data:`xref` を返します。これは、最高のパフォーマンスを必要とする内部目的のために使用されます。" -#: ../../document.rst:666 1e5d233f62d247199ff5b936dccf4843 +#: ../../document.rst:677 f68b5fd43cd44364a072ac854e970d7d msgid ":data:`xref` of the page like :attr:`Page.xref`." msgstr ":attr:`Page.xref` のようなページの :data:`xref` 。" -#: ../../document.rst:670 14ab731996614e2eae73e33aa1dfa90a +#: ../../document.rst:681 d59a89bac09b4944afd99a99bb1fe2c5 msgid "New in v1.16.4" msgstr "バージョン 1.16.4 での新機能" -#: ../../document.rst:672 779e575a43db41b5b9249b10441a9095 +#: ../../document.rst:683 bd51b24afd4e47ebac962d0313b3f815 msgid "" "A generator for a range of pages. Parameters have the same meaning as in " "the built-in function *range()*. Intended for expressions of the form " @@ -2487,7 +2511,7 @@ msgstr "" "一連のページのためのジェネレーター。パラメーターの意味は組み込みの *range()* 関数と同じです。 *\"for page in " "doc.pages(start, stop, step): …\"* の形式の式に使用することを意図しています。" -#: ../../document.rst:674 e206c457853b4548a94a42597ec79210 +#: ../../document.rst:685 75be001f5d554c8e9f05155e9f180e11 msgid "" "start iteration with this page number. Default is zero, allowed values " "are `-∞ < start < page_count`. While this is negative, :attr:`page_count`" @@ -2496,7 +2520,7 @@ msgstr "" "このページ番号から反復を開始します。デフォルトはゼロで、許容値は `-∞ < start < page_count` " "です。負の値の間は反復を開始する **前に** :attr:`page_count` が追加されます。" -#: ../../document.rst:675 d7bbb6ccabfc4084b685b6ca7b060eda +#: ../../document.rst:686 850d3ba2e51942bdac38c2c96d14b32b msgid "" "stop iteration at this page number. Default is :attr:`page_count`, " "possible are `-∞ < stop <= page_count`. Larger values are **silently " @@ -2508,13 +2532,13 @@ msgstr "" "page_count` です。大きな値はデフォルトで **静かに置き換えられます** 。負の値は逆順でページを循環的に生成します。組み込みの " "*range()* 関数と同様に、これは **返されない** 最初のページです。" -#: ../../document.rst:676 787e073834934beeb008e1068ee7595a +#: ../../document.rst:687 71a1420d64a94c03afd8796a6ed02124 msgid "" "stepping value. Defaults are 1 if start < stop and -1 if start > stop. " "Zero is not allowed." msgstr "ステップ値。start < stop の場合はデフォルトで1、start > stop の場合は-1です。ゼロは許可されていません。" -#: ../../document.rst:678 e1723f80a0574c4a8b845549b39aa92f +#: ../../document.rst:689 40f613aff2cc4f50bf0b79d1c5bfecbe msgid "" "a generator iterator over the document's pages. Some examples: * " "\"doc.pages()\" emits all pages. * \"doc.pages(4, 9, 2)\" emits pages 4, " @@ -2527,31 +2551,31 @@ msgid "" "3." msgstr "" -#: ../../document.rst:678 a10f5812e03041f986a8812a962f2bea +#: ../../document.rst:689 f45b9694e9f34c38ad4482760ae7aca1 msgid "a generator iterator over the document's pages. Some examples:" msgstr "ドキュメントのページに対するジェネレーターイテレーターです。いくつかの例:" -#: ../../document.rst:680 00e66162eae540c197b9269b66c1ef6b +#: ../../document.rst:691 7e5e22c9cf1c4650ae403be190736d44 msgid "\"doc.pages()\" emits all pages." msgstr "\"doc.pages()\" はすべてのページを生成します。" -#: ../../document.rst:681 8697e6acfb7a43379a3b10a69141b96b +#: ../../document.rst:692 44f14db8e1c941b1ae62879f95497c29 msgid "\"doc.pages(4, 9, 2)\" emits pages 4, 6, 8." msgstr "\"doc.pages(4, 9, 2)\" はページ4、6、8を生成します。" -#: ../../document.rst:682 0c051387d4b04919b5b78d990af71144 +#: ../../document.rst:693 a533cad1663e46e6a5941d76b2037bb4 msgid "\"doc.pages(0, None, 2)\" emits all pages with even numbers." msgstr "\"doc.pages(0, None, 2)\" はすべての偶数ページを生成します。" -#: ../../document.rst:683 cfa3540e5d244dd7bce8c87d63a2affd +#: ../../document.rst:694 16ef2fc267d744f686ffa88af27369f6 msgid "\"doc.pages(-2)\" emits the last two pages." msgstr "\"doc.pages(-2)\" は最後の2ページを生成します。" -#: ../../document.rst:684 ac8994f5781241339a7e77570d929817 +#: ../../document.rst:695 863a7d77e31649a2a715d675aa4edb32 msgid "\"doc.pages(-1, -1)\" emits all pages in reversed order." msgstr "\"doc.pages(-1, -1)\" は逆の順序ですべてのページを生成します。" -#: ../../document.rst:685 98ffadfcb652463a8bd156e55c38abcf +#: ../../document.rst:696 3f767da46b0d44e4b3556a7d311806db msgid "" "\"doc.pages(-1, -10)\" always emits 10 pages in reversed order, starting " "with the last page -- **repeatedly** if the document has less than 10 " @@ -2562,7 +2586,7 @@ msgstr "" "**繰り返し** 生成します。したがって、4ページのドキュメントの場合、次のページ番号が生成されます: " "3、2、1、0、3、2、1、0、3、2、1、0、3。" -#: ../../document.rst:694 0850204462e24780a12df2a017a2043b +#: ../../document.rst:705 f48c185825c2403aa8b51fcffaa8c9b0 msgid "" "Create a PDF version of the current document and write it to memory. " "**All document types** are supported. The parameters have the same " @@ -2574,21 +2598,21 @@ msgstr "" ":meth:`insert_pdf` と同じ意味を持ちます。 " "基本的に、ページのサブセットに変換を制限し、ページの回転を指定し、ページの順序を逆にすることができます。" -#: ../../document.rst:696 d8e04356f6744fffb5604c227c375baf +#: ../../document.rst:707 46ccb3be97f741dcbcfe7fc4137e7bcd msgid "first page to copy (0-based). Default is first page." msgstr "コピーする最初のページ(0ベース)。デフォルトは最初のページです。" -#: ../../document.rst:698 8eaf0e82933244f28da8fbdbc694fc88 +#: ../../document.rst:709 23a04f94f6724a3899a1375c75690320 msgid "last page to copy (0-based). Default is last page." msgstr "コピーする最後のページ(0ベース)。デフォルトは最後のページです。" -#: ../../document.rst:700 e303aae3afc14ef8b33d0bae21182189 +#: ../../document.rst:711 bb2f1bc11b48415cba76b4961858f552 msgid "" "rotation angle. Default is 0 (no rotation). Should be *n * 90* with an " "integer n (not checked)." msgstr "回転角度。デフォルトは0度(回転なし)です。整数n(チェックされていない)で *n * 90* である必要があります。" -#: ../../document.rst:703 d84b69c434d14cfc885db21608059932 +#: ../../document.rst:714 c74c2791f258466296ec36b0fc5626c7 msgid "" "a Python *bytes* object containing a PDF file image. It is created by " "internally using `tobytes(garbage=4, deflate=True)`. See :meth:`tobytes`." @@ -2608,7 +2632,7 @@ msgid "" "doc.save(\"allmyimages.pdf\")" msgstr "" -#: ../../document.rst:703 540cef50e04e4b4cbe7fd33a4c3ded7d +#: ../../document.rst:714 fcede7b6375e4313a29021a400393b1c msgid "" "a Python *bytes* object containing a PDF file image. It is created by " "internally using `tobytes(garbage=4, deflate=True)`. See :meth:`tobytes`." @@ -2619,7 +2643,7 @@ msgstr "" "deflate=True)` を使用して作成されます。:meth:`tobytes` " "を参照してください。これを直接ディスクに出力するか、PDFとして開くことができます。以下にいくつかの例を示します::" -#: ../../document.rst:729 d28c9687f6fc4b76a4b5a35746b38e9d +#: ../../document.rst:740 338cff57f1c14eb78e44aa08f634a79e msgid "" "The method uses the same logic as the *mutool convert* CLI. This works " "very well in most cases -- however, beware of the following limitations." @@ -2627,7 +2651,7 @@ msgstr "" "このメソッドは、*mutool convert* " "CLIと同じロジックを使用しています。これはほとんどの場合非常にうまく機能しますが、以下の制限に注意してください。" -#: ../../document.rst:731 f2c92d030f534e00b73c7163895e4fde +#: ../../document.rst:742 8bcf27ec2972489b8a66b52e727c26a7 msgid "" "Image files: perfect, no issues detected. However, image transparency is " "ignored. If you need that (like for a watermark), use " @@ -2638,36 +2662,36 @@ msgstr "" ":meth:`Page.insert_image` " "を使用してください。それ以外の場合、このメソッドははるかに優れたパフォーマンスのために推奨されます。" -#: ../../document.rst:732 4fe290ff521948a4ae0317f9299e2c3a +#: ../../document.rst:743 efd920175c804d928c317a5a501316ec msgid "" "XPS: appearance very good. Links work fine, outlines (bookmarks) are " "lost, but can easily be recovered [#f2]_." msgstr "XPS: 外観は非常に良好です。リンクは正常に機能し、アウトライン(ブックマーク)は失われますが、簡単に回復できます [#f2]_。" -#: ../../document.rst:733 4b9e243024714f97b309cf1497de3299 +#: ../../document.rst:744 336a0be2bc9e4860b7b3b0c47ad4835f msgid "EPUB, CBZ, FB2: similar to XPS." msgstr "EPUB、CBZ、FB2: XPSと類似しています。" -#: ../../document.rst:734 4c72d0e0e95a48cca0492516f171543e +#: ../../document.rst:745 9dbcb1b8abae45cabc70a4552926325f msgid "" "SVG: medium. Roughly comparable to `svglib " "`_." msgstr "SVG: 中程度です。おおよそ `svglib `_ と比較できます。" -#: ../../document.rst:738 1ad418f0428f49a4a38a1623f18c704d +#: ../../document.rst:749 5cb402163d4e4c6999bdfedfc4c6ad7f msgid "Creates a table of contents (TOC) out of the document's outline chain." msgstr "ドキュメントのアウトラインチェーンから目次(TOC)を作成します。" -#: ../../document.rst:740 91de05775cc04c49a45b6335c14ad090 +#: ../../document.rst:751 b052df8d0ef140c783e851c1563df7a8 msgid "" -"Indicates whether a simple or a detailed TOC is required. If *False*, " +"Indicates whether a simple or a detailed TOC is required. If ``False``, " "each item of the list also contains a dictionary with :ref:`linkDest` " "details for each outline entry." msgstr "" -"簡単なTOCまたは詳細なTOCが必要かを示す値です。*False* の場合、リストの各アイテムにはアウトラインエントリごとの " +"簡単なTOCまたは詳細なTOCが必要かを示す値です。``False`` の場合、リストの各アイテムにはアウトラインエントリごとの " ":ref:`linkDest` の詳細を含む辞書も含まれます。" -#: ../../document.rst:744 b6b321849fca4d9cbbdfefba3728f879 +#: ../../document.rst:755 f2ee7e1afe8e4f06819f620115b35f3a msgid "" "a list of lists. Each entry has the form *[lvl, title, page, dest]*. Its " "entries have the following meanings: * *lvl* -- hierarchy level " @@ -2688,13 +2712,13 @@ msgid "" "nameddest: target name if kind=4. PDF only. (New in 1.23.7.)" msgstr "" -#: ../../document.rst:744 c2fa0db81f1240f48267bf512d0bb119 +#: ../../document.rst:755 55d6cd189dfe4990bcd196b86a15835b msgid "" "a list of lists. Each entry has the form *[lvl, title, page, dest]*. Its " "entries have the following meanings:" msgstr "リストのリスト。各エントリは次の形式を持っています: *[lvl, title, page, dest]* 。そのエントリは次の意味を持っています:" -#: ../../document.rst:746 75a00571e9ac4bf58a2c1f92e421eb45 +#: ../../document.rst:757 454d03d450624061938d946b501c9663 msgid "" "*lvl* -- hierarchy level (positive *int*). The first entry is always 1. " "Entries in a row are either **equal**, **increase** by 1, or **decrease**" @@ -2703,81 +2727,81 @@ msgstr "" "*lvl* – 階層レベル(正の整数)。最初のエントリは常に1です。行内のエントリは **等しい** か、1ずつ **増加** または任意の数で " "**減少** します。" -#: ../../document.rst:747 a1e4b4ba95774021870cad1b297b7ea6 +#: ../../document.rst:758 0889207b55464b11a1a4d2eb60f7268b msgid "*title* -- title (*str*)" msgstr "*title* – タイトル(*str*)" -#: ../../document.rst:748 3cc25b99cda24562804ebe796a5a2bd6 +#: ../../document.rst:759 5fa3112e6f004b80ae2976b1070cf936 msgid "" "*page* -- 1-based source page number (*int*). `-1` if no destination or " "outside document." msgstr "*page* – 1から始まるページ番号(*int*)。`-1` の場合、宛先なしまたはドキュメント外。" -#: ../../document.rst:749 a3ee554f488642619320df62306fdba8 +#: ../../document.rst:760 abd18e5ece4d4c88b1c87baf72f2c2c6 msgid "" "*dest* -- (*dict*) included only if *simple=False*. Contains details of " "the TOC item as follows:" msgstr "*dest* – (*dict*) *simple=False* の場合のみ含まれます。TOCアイテムの詳細が以下のように含まれます:" -#: ../../document.rst:751 9e08383030124d9d91a2085127aac9e5 +#: ../../document.rst:762 76bc0d0dfaee41c48fff15ada7b9a5b4 msgid "kind: destination kind, see :ref:`linkDest Kinds`." msgstr "kind: 宛先の種類、:ref:`linkDest Kinds` を参照。" -#: ../../document.rst:752 e85d22b56b9040c7930c794b4640f4b2 +#: ../../document.rst:763 9758bcc5f2f746e18f86c4fa2d250b60 msgid "file: filename if kind is :data:`LINK_GOTOR` or :data:`LINK_LAUNCH`." msgstr "file: `kind` が :data:`LINK_GOTOR` または :data:`LINK_LAUNCH` の場合のファイル名。" -#: ../../document.rst:753 5a7ee6ee51b74348a540f98a3fc19e29 +#: ../../document.rst:764 5afcceaa21ab4291a43e7196af474940 msgid "page: target page, 0-based, :data:`LINK_GOTOR` or :data:`LINK_GOTO` only." msgstr "page: ターゲットページ、0ベース、:data:`LINK_GOTOR` または :data:`LINK_GOTO` の場合のみ。" -#: ../../document.rst:754 8d59674650f040a1922cd226173cfa9c +#: ../../document.rst:765 7ef679ac849c48eb8d577c0fe3454ac4 msgid "to: position on target page (:ref:`Point`)." msgstr "to: ターゲットページ上の位置 (:ref:`Point`)。" -#: ../../document.rst:755 5a9a1fe8baa64c84af0c43de0ec63bd6 +#: ../../document.rst:766 8a166e04e8df4d08b89f8440cc674f32 msgid "zoom: (float) zoom factor on target page." msgstr "zoom: ターゲットページ上のズームファクター(float)。" -#: ../../document.rst:756 cc5a5194f63a4aa19a93c131b33fa858 +#: ../../document.rst:767 d702c639749e417cb078fd32f13de012 msgid "xref: :data:`xref` of the item (0 if no PDF)." msgstr "xref: アイテムの :data:`xref` (PDFがない場合は0)。" -#: ../../document.rst:757 1bb888d5292e4b93a70b210f38dfaf75 +#: ../../document.rst:768 99f0660ad6394091809cbdf3d302955c msgid "" "color: item color in PDF RGB format `(red, green, blue)`, or omitted " "(always omitted if no PDF)." msgstr "color: PDF RGB形式 `(red, green, blue)` のアイテムカラー、または省略(PDFがない場合は常に省略)。" -#: ../../document.rst:758 fcb2d0955eb1480884dddb3e3a6f9bff +#: ../../document.rst:769 c4f8e59bfeac45bfbfb7ea9d1248838a msgid "bold: true if bold item text or omitted. PDF only." msgstr "bold: アイテムテキストが太字の場合、または省略。PDFのみ。" -#: ../../document.rst:759 18fb36bd059642cdba42eac8332c44b0 +#: ../../document.rst:770 f6cae7c40b8e45f59f44ad81ef15567c msgid "italic: true if italic item text, or omitted. PDF only." msgstr "italic: アイテムテキストがイタリックの場合、または省略。PDFのみ。" -#: ../../document.rst:760 ad4897d3973641afa2918159be68840d +#: ../../document.rst:771 76b18e63c1714b74b2122abb08daa430 msgid "collapse: true if sub-items are folded, or omitted. PDF only." msgstr "collapse: サブアイテムが折りたたまれている場合、または省略。PDFのみ。" -#: ../../document.rst:761 9af7151b096a4cd2a30c11182f30f384 +#: ../../document.rst:772 1101c4e55af149bdaf2a45d5f3f593ce msgid "nameddest: target name if kind=4. PDF only. (New in 1.23.7.)" msgstr "" -#: ../../document.rst:768 9611d8f0601d4b2ab1e58753583de43f +#: ../../document.rst:779 0cb3aef79b2e4dc3bd6ade0f8560df02 msgid "" "PDF only: Return the PDF dictionary keys of the :data:`dictionary` object" " provided by its xref number." msgstr "PDFのみ: xref番号で提供される :data:`dictionary` オブジェクトのPDF辞書キーを返します。" -#: ../../document.rst:770 4980b00572f34422afab29b6c698ded7 +#: ../../document.rst:781 c77458be421d4b29bb97c9dc1a3e67fa msgid "" "the :data:`xref`. *(Changed in v1.18.10)* Use `-1` to access the special " "dictionary \"PDF trailer\"." msgstr ":data:`xref` 。 *(v1.18.10で変更)* \"PDF trailer\" としてアクセスするには `-1` を使用します。" -#: ../../document.rst:772 587c5791532244a88cf6da78274dfdf3 +#: ../../document.rst:783 efe50840bb3a41ea82e644f3e3f5e202 msgid "" "a tuple of dictionary keys present in object :data:`xref`. Examples: >>>" " from pprint import pprint >>> import pymupdf >>> " @@ -2789,23 +2813,23 @@ msgid "" ">>>" msgstr "" -#: ../../document.rst:772 6740653aface48aeb9f79e581fc28502 +#: ../../document.rst:783 61a280371ea44c08be60d1d6e1116b80 msgid "a tuple of dictionary keys present in object :data:`xref`. Examples:" msgstr ":data:`xref` オブジェクトに存在する辞書キーのタプル。例:" -#: ../../document.rst:789 5f6c5e3e85db4061a0d9b6598b50afab +#: ../../document.rst:800 180b102e04e64f7798fcdb86576717b5 msgid "" "PDF only: Return type and value of a PDF dictionary key of a " ":data:`dictionary` object given by its xref." msgstr "PDFのみ: xrefによって提供される :data:`dictionary` オブジェクトのPDF辞書キーの戻り値の型と値を返します。" -#: ../../document.rst:791 f05eccf46d4347e9bf48ebb77bfececb +#: ../../document.rst:802 b6b9bd8f35c24eada60ca621edbe56ed msgid "" "the :data:`xref`. *Changed in v1.18.10:* Use `-1` to access the special " "dictionary \"PDF trailer\"." msgstr ":data:`xref` 。*v1.18.10で変更:* 特別な辞書 \"PDF trailer\" にアクセスするには `-1` を使用します。" -#: ../../document.rst:793 792052e8f7b54a5087b1910cc8acc837 +#: ../../document.rst:804 69819bf36f4b42558eeb2c4bbe22cb65 msgid "" "the desired PDF key. Must **exactly** match (case-sensitive) one of the " "keys contained in :meth:`Document.xref_get_keys`." @@ -2813,7 +2837,7 @@ msgstr "" "望ましいPDFキー。:meth:`Document.xref_get_keys` " "に含まれるキーのいずれかと厳密に一致する必要があります(大文字と小文字を区別します)。" -#: ../../document.rst:797 a49673e32c85440994e82d898e126b4c +#: ../../document.rst:808 41a966d291554b56b93fc03772a17bf0 msgid "" "A tuple (type, value) of strings, where type is one of \"xref\", " "\"array\", \"dict\", \"int\", \"float\", \"null\", \"bool\", \"name\", " @@ -2829,35 +2853,35 @@ msgstr "" "以下の例を参照 – " "そして(ほとんどの場合)PDFに格納されている内容の忠実な反映です。ほとんどの場合、値文字列のフォーマットもキーのタイプについてのヒントを提供します:" -#: ../../document.rst:799 7a842fb1ce6e49238e26606964de947c +#: ../../document.rst:810 68962e8fe4d442e293d9c3118347e01e msgid "A \"name\" always starts with a \"/\" slash." msgstr "\"name\" は常に \"/\" スラッシュで始まります。" -#: ../../document.rst:800 440517c87e8443ea9ea4f852e4ff5722 +#: ../../document.rst:811 32d534887bbc47a096b329464447814b msgid "An \"xref\" always ends with \" 0 R\"." msgstr "\"xref\" は常に \" 0 R\" で終わります。" -#: ../../document.rst:801 e58f606132514a2d8c520c202bae3dd8 +#: ../../document.rst:812 36770e892a53423d9754f40b4cbb44fd msgid "An \"array\" is always enclosed in \"[...]\" brackets." msgstr "\"array\" は常に \"[...]\" 角括弧で囲まれています。" -#: ../../document.rst:802 bd05a5cb8c2e4a78a8101c39632c13f1 +#: ../../document.rst:813 fd7eef20a4fe4744bd5b4151cd909798 msgid "A \"dict\" is always enclosed in \"<<...>>\" brackets." msgstr "\"dict\" は常に \"<<...>>\" 角括弧で囲まれています。" -#: ../../document.rst:803 f3b46c4236574b89a14567364cf4b17d +#: ../../document.rst:814 a7ca5eff251543ceb8cfb9e695ebde43 msgid "" "A \"bool\", resp. \"null\" always equal either \"true\", \"false\", resp." " \"null\"." msgstr "\"bool\" または \"null\" は常に \"true\"、\"false\" または \"null\" のいずれかです。" -#: ../../document.rst:804 6af6ddfec6a04dd49984d6eb1bcd59ce +#: ../../document.rst:815 9ba0410ed2ab4e03877a3a08d13bf77c msgid "" "\"float\" and \"int\" are represented by their string format -- and are " "thus not always distinguishable." msgstr "\"float\" と \"int\" は文字列形式で表され、したがって常に区別できるわけではありません。" -#: ../../document.rst:805 b10be1a7bc70476fa702e16321c21fb8 +#: ../../document.rst:816 f33721d0aec84d23b9300ace9c35a6f9 msgid "" "A \"string\" is converted to UTF-8 and may therefore deviate from what is" " stored in the PDF. For example, the PDF key \"Author\" may have a value " @@ -2869,21 +2893,21 @@ msgstr "" "\"FEFF004A006F0072006A00200058002E0020004D0063004B00690065\" " "という値を持つかもしれませんが、このメソッドは `('string', 'Jorj X. McKie')` を返します。" -#: ../../document.rst:834 5b48d44522284afa85195bc4fe9897e7 +#: ../../document.rst:845 e9c2a10f60da46c587236437b7c1ed6b msgid "New in v1.18.7, changed in v 1.18.13" msgstr "バージョン1.18.7で新規追加、バージョン1.18.13で変更されました。" -#: ../../document.rst:835 2cb4dc38c2e8453e959039129eed4909 +#: ../../document.rst:846 ba86e3e07a4c47598104d3b71044774e msgid "Changed in v1.19.4: remove a key \"physically\" if set to \"null\"." msgstr "バージョン1.19.4で変更: \"null\" に設定された場合、キーを \"物理的に\" 削除します。" -#: ../../document.rst:837 da8de08aaf2845fba83396612f4e41b3 +#: ../../document.rst:848 e1292beca902409b92239cd05c2a3a50 msgid "" "PDF only: Set (add, update, delete) the value of a PDF key for the " ":data:`dictionary` object given by its xref." msgstr "PDFのみ: xrefによって提供される :data:`dictionary` オブジェクトのPDFキーの値を設定(追加、更新、削除)します。" -#: ../../document.rst:839 ed3be21595f34f79a8308da6d0dd622c +#: ../../document.rst:850 0bb3825d68dd410e991716b3f51fab4a msgid "" "This is an expert function: if you do not know what you are doing, there " "is a high risk to render (parts of) the PDF unusable. Please do consult " @@ -2893,13 +2917,13 @@ msgstr "" "これはエキスパート向けの機能です。何をしているのかわからない場合、PDFの(一部の)使用不能の高いリスクがあります。PDFオブジェクト仕様フォーマット(ページ18)やページオブジェクトなどの特別な辞書タイプの構造については" " :ref:`AdobeManual` を参照してください。" -#: ../../document.rst:841 a37235ffdd7e4cdba36b38a2f34a5f97 +#: ../../document.rst:852 16ca3e7fbf794d38a823d632ad2ae243 msgid "" "the :data:`xref`. *Changed in v1.18.13:* To update the PDF trailer, " "specify -1." msgstr ":data:`xref` 。バージョン1.18.13で変更: PDFトレーラーを更新する場合、-1を指定します。" -#: ../../document.rst:842 aed994c4791f43d99f410fc10ba5822c +#: ../../document.rst:853 8960997235104ce1abc84fe4cb69fefe msgid "" "the desired PDF key (without leading \"/\"). Must not be empty. Any valid" " PDF key -- whether already present in the object (which will be " @@ -2912,7 +2936,7 @@ msgstr "" "(`\"Resources/ExtGState\"` のような)を使用して、`\"/Resources\"` のサブオブジェクトとしてキー " "`\"/ExtGState\"` の値を設定することも可能です。" -#: ../../document.rst:843 2c50d56bca6c4a9fa369bf8700bb54ed +#: ../../document.rst:854 368de1a24c0c4b9f98d0d3cb4d81d00d msgid "" "the value for the key. It must be a non-empty string and, depending on " "the desired PDF object type, the following rules must be observed. There " @@ -2921,16 +2945,16 @@ msgid "" "is important!" msgstr "キーの値。空でない文字列である必要があり、望ましいPDFオブジェクトのタイプに応じて以下のルールを守る必要があります。一部の構文チェックは行われますが、型チェックやPDFとして意味があるかどうかのチェックは行われません。大文字と小文字の区別が重要です!" -#: ../../document.rst:845 9a60b42bad884755b87ef53ddaea3226 +#: ../../document.rst:856 06ed2d0e262a45629c998ae7c495a933 msgid "" -"**xref** -- must be provided as `\"nnn 0 R\"` with a valid :data:`xref` " -"number nnn of the PDF. The suffix \"`0 R`\" is required to be " -"recognizable as an xref by PDF applications." +"*:data:`xref`* -- must be provided as `\"nnn 0 R\"` with a valid " +":data:`xref` number nnn of the PDF. The suffix \"`0 R`\" is required to " +"be recognizable as an xref by PDF applications." msgstr "" -"**xref** – 有効なPDFのxref番号nnnを持つ `\"nnn 0 R\"` として提供される必要があります。サフィックス \"`0 " -"R`\" はPDFアプリケーションによって :data:`xref` として認識されるため必要です。" +"*:data:`xref`* – 有効なPDFのxref番号nnnを持つ `\"nnn 0 R\"` として提供される必要があります。サフィックス" +" \"`0 R`\" はPDFアプリケーションによって :data:`xref` として認識されるため必要です。" -#: ../../document.rst:846 44ddb27720124eee975b9f94637fa84a +#: ../../document.rst:857 330970abae9f4facabb37ba6eccd7370 msgid "" "**array** -- a string like `\"[a b c d e f]\"`. The brackets are " "required. Array items must be separated by at least one space (not commas" @@ -2944,7 +2968,7 @@ msgstr "" " `\"[]\"` も可能で、キーを削除することと *同等* " "です。配列のアイテムは、辞書、xref、他の配列など、PDFオブジェクトである必要があります。Pythonと同様に、配列のアイテムは異なるタイプである場合があります。" -#: ../../document.rst:847 e05d9c8e29c441ce84ffd8cb527896f4 +#: ../../document.rst:858 dd02ad08c6f7478299103ed59cc6a4a9 msgid "" "**dict** -- a string like `\"<< ... >>\"`. The brackets are required and " "must enclose a valid PDF dictionary definition. The empty dictionary " @@ -2953,17 +2977,17 @@ msgstr "" "**dict** – `\"<< ... >>\"` のような文字列。角括弧が必要で、有効なPDF辞書定義を囲む必要があります。空の辞書 " "`\"<<>>\"` も可能で、キーを削除することと *同等* です。" -#: ../../document.rst:848 8103ded1a1484ab0857f895a803eadb2 +#: ../../document.rst:859 c4181d6e27f34f4c9ff75b529d476a93 msgid "**int** -- an integer formatted **as a string**." msgstr "**int** – **文字列として** フォーマットされた整数。" -#: ../../document.rst:849 e667e81734cc4fbeb6e7de3016b761ed +#: ../../document.rst:860 157a221ca7aa4d48a23b606b9975d385 msgid "" "**float** -- a float formatted **as a string**. Scientific notation (with" " exponents) is **not allowed by PDF**." msgstr "**float** – 文字列としてフォーマットされた浮動小数点数。科学的表記法(指数を含む)は **PDFでは許可されていません** 。" -#: ../../document.rst:850 7dc4b5d0503d4905927c0227f1bf71da +#: ../../document.rst:861 2de697538bd44abca00e569494265742 msgid "" "**null** -- the string `\"null\"`. This is the PDF equivalent to Python's" " `None` and causes the key to be ignored -- however not necessarily " @@ -2975,11 +2999,11 @@ msgstr "" "に相当し、キーを無視させますが、必ずしも削除されるわけではありません。ガベージコレクションを伴う保存時に削除される場合があります。*バージョン1.19.4で変更:*" " キーがパス階層でない場合(つまりスラッシュ \"/\" を含まない場合)、それは完全に削除されます。" -#: ../../document.rst:851 bd28773f5b384d1d85a3cf84cfed1c33 +#: ../../document.rst:862 b39a734639f8407ba3bbdaf290e83863 msgid "**bool** -- one of the strings `\"true\"` or `\"false\"`." msgstr "**bool** – `\"true\"` または `\"false\"` のいずれかの文字列。" -#: ../../document.rst:852 969792df7d344ff185957bc0e0fed856 +#: ../../document.rst:863 abd3326f76034c32ad2cece7dd88ee74 msgid "" "**name** -- a valid PDF name with a leading slash like this: " "`\"/PageLayout\"`. See page 16 of the :ref:`AdobeManual`." @@ -2987,7 +3011,7 @@ msgstr "" "**name** – `\"/PageLayout\"` のように先頭にスラッシュを持つ有効なPDF名。:ref:`AdobeManual` " "のページ16を参照してください。" -#: ../../document.rst:853 7ebf685ea13b449cae38701c8c091734 +#: ../../document.rst:864 a124ee862f9e4d9f8e2db002683963e3 msgid "" "**string** -- a valid PDF string. **All PDF strings must be enclosed by " "brackets**. Denote the empty string as `\"()\"`. Depending on its " @@ -2996,7 +3020,7 @@ msgstr "" "**string** – 有効なPDF文字列。 **すべてのPDF文字列は角括弧で囲まれている必要があります** 。空の文字列は `\"()\"`" " として表記されます。内容に応じて、可能な角括弧は次の通りです。" -#: ../../document.rst:855 dab3dfb0f3484d2391524c9435d0f300 +#: ../../document.rst:866 cf9ad384fa7e48e89ed6220e656605e2 msgid "" "\"(...)\" for ASCII-only text. Reserved PDF characters must be backslash-" "escaped and non-ASCII characters must be provided as 3-digit backslash-" @@ -3006,13 +3030,13 @@ msgstr "" "\"(…)\":ASCIIのテキストの場合。予約されたPDF文字はバックスラッシュでエスケープし、非ASCII文字は先頭にゼロパディングされた3桁のバックスラッシュエスケープの8進数で提供する必要があります。例:" " 12 = 0x0C は `\\014` としてエンコードする必要があります。" -#: ../../document.rst:856 e52408602ff7497c9873fe8d5f540624 +#: ../../document.rst:867 6933707b8a404c698d2bb0178fe6bb7d msgid "" "\"<...>\" for hex-encoded text. Every character must be represented by " "two hex-digits (lower or upper case)." msgstr "\"<…>\":16進数でエンコードされたテキストの場合。各文字は2桁の16進数で表されなければなりません(大文字または小文字)。" -#: ../../document.rst:858 7b1882b887524ef49e00077528035437 +#: ../../document.rst:869 617b10333ace4793b0272dcbf1ad1528 msgid "" "If in doubt, we **strongly recommend** to use :meth:`get_pdf_str`! This " "function automatically generates the right brackets, escapes, and overall" @@ -3021,59 +3045,59 @@ msgstr "" "疑念がある場合は、:meth:`get_pdf_str` " "の使用を**強くお勧めします**!この関数は自動的に適切な角括弧、エスケープ、および全体のフォーマットを生成します。たとえば、次のような変換を行います。" -#: ../../document.rst:870 3890d72528b240369a5a7bc02064005d +#: ../../document.rst:881 d9f815c2f13749c1bbba34778122e4b5 msgid "" "Creates a pixmap from page *pno* (zero-based). Invokes " ":meth:`Page.get_pixmap`." msgstr "*pno* (ゼロベース)のページからピクスマップを作成します。:meth:`Page.get_pixmap` を呼び出します。" -#: ../../document.rst:872 fcfb7eadbc844205998aa9a33083cfd9 +#: ../../document.rst:883 212a466e64f54ceab96d342b6203b839 msgid "All parameters except `pno` are *keyword-only.*" msgstr "`pno` 以外のすべてのパラメーターは *キーワード専用* です。" -#: ../../document.rst:874 75275c6737094374bee50affec432f68 +#: ../../document.rst:885 e1319e0e7970424791a53525152e1639 msgid "page number, 0-based in `-∞ < pno < page_count`." msgstr "pno (int) – ページ番号、ゼロベース、`-∞ < pno < page_count`。" -#: ../../document.rst:876 f06d568304a742b48a5436d3b98c4cf1 +#: ../../document.rst:887 2cc8a9bd2bb645669b18514646b4297e msgid ":ref:`Pixmap`" msgstr "" -#: ../../document.rst:880 361d67e3ead941e685870adfce67103a +#: ../../document.rst:891 9ea89530b850439c97138a6fcab13410 msgid "New in v1.16.13" msgstr "バージョン1.16.13で新規追加" -#: ../../document.rst:881 a0d5126594914a8887adf96de594e5ba +#: ../../document.rst:892 73acb049c43a4985a295c16dfa1b05f2 msgid "Changed in v1.18.11" msgstr "バージョン1.18.11で変更" -#: ../../document.rst:883 1a8dcc31f52a4227b80f70800db5f38e +#: ../../document.rst:894 ad363437834b4d41a88a015c57fb06bf msgid "PDF only: Return a list of all XObjects referenced by a page." msgstr "PDFのみ: ページによって参照されるすべてのXObjectのリストを返します。" -#: ../../document.rst:885 ../../document.rst:900 ../../document.rst:928 -#: 52a30c1d19ad401ea08031849ce820cb c4559af8954c49dabfddc123a8a3c503 -#: ef90053e000f49429d290f294feeba08 +#: ../../document.rst:896 ../../document.rst:911 ../../document.rst:940 +#: 1f721aa38b2841618a5ff2c3d399515f 2be167774b6e411286adf1d850042ad0 +#: 6373181f04914740a5bbd91abdcd1de2 msgid "page number, 0-based, `-∞ < pno < page_count`." msgstr "ページ番号、ゼロベース、`-∞ < pno < page_count`。" -#: ../../document.rst:888 8eb94fa83d5740d9bd40016de5e2fd25 +#: ../../document.rst:899 722d965ee64d45429057256a881874f3 msgid "" "a list of (non-image) XObjects. These objects typically represent pages " "*embedded* (not copied) from other PDFs. For example, " ":meth:`Page.show_pdf_page` will create this type of object. An item of " "this list has the following layout: `(xref, name, invoker, bbox)`, where" -" * **xref** (*int*) is the XObject's :data:`xref`. * **name** (*str*) is" -" the symbolic name to reference the XObject. * **invoker** (*int*) the " -":data:`xref` of the invoking XObject or zero if the page directly invokes" -" it. * **bbox** (:ref:`Rect`) the boundary box of the XObject's location " -"on the page **in untransformed coordinates**. To get actual, non-rotated " -"page coordinates, multiply with the page's transformation matrix " -":attr:`Page.transformation_matrix`. *Changed in v.18.11:* the bbox is now" -" formatted as :ref:`Rect`." +" * *:data:`xref`* (*int*) is the XObject's :data:`xref`. * **name** " +"(*str*) is the symbolic name to reference the XObject. * **invoker** " +"(*int*) the :data:`xref` of the invoking XObject or zero if the page " +"directly invokes it. * **bbox** (:ref:`Rect`) the boundary box of the " +"XObject's location on the page **in untransformed coordinates**. To get " +"actual, non-rotated page coordinates, multiply with the page's " +"transformation matrix :attr:`Page.transformation_matrix`. *Changed in " +"v.18.11:* the bbox is now formatted as :ref:`Rect`." msgstr "" -#: ../../document.rst:888 a1c4dad6bcd240078b56144742db757c +#: ../../document.rst:899 0fbe94736a044053802826a4e53067ad msgid "" "a list of (non-image) XObjects. These objects typically represent pages " "*embedded* (not copied) from other PDFs. For example, " @@ -3085,15 +3109,15 @@ msgstr "" "はこのタイプのオブジェクトを作成します。このリストのアイテムは以下のレイアウトを持っています:`(xref, name, invoker, " "bbox)`、ここで" -#: ../../document.rst:890 51a7c36434ba4aec91923c9ebbc9145a -msgid "**xref** (*int*) is the XObject's :data:`xref`." -msgstr "**xref** (*int*) はXObjectの :data:`xref` です。" +#: ../../document.rst:901 7a364bde2f77412fb904d358b7a02643 +msgid "*:data:`xref`* (*int*) is the XObject's :data:`xref`." +msgstr "*:data:`xref`* (*int*) はXObjectの :data:`xref` です。" -#: ../../document.rst:891 a8e2a68e04714a49ab17d1b0ae7ff5a2 +#: ../../document.rst:902 9922e6b3ac3446dabf4f05cbd662e6eb msgid "**name** (*str*) is the symbolic name to reference the XObject." msgstr "**name** (*str*) はXObjectを参照するための象徴的な名前です。" -#: ../../document.rst:892 8107420b7bcb41e185e7b74c9e6e40db +#: ../../document.rst:903 b55ebb0f160f40568cc38ab211aceaa7 msgid "" "**invoker** (*int*) the :data:`xref` of the invoking XObject or zero if " "the page directly invokes it." @@ -3101,7 +3125,7 @@ msgstr "" "**invoker** (*int*) は、ページがそれを直接呼び出す場合はゼロ、それ以外の場合は呼び出し元XObjectの " ":data:`xref` です。" -#: ../../document.rst:893 5575cbb0e1a54bdc980b5229ab7f679a +#: ../../document.rst:904 eb3c40a7273b48a394cae50ae2bf4c16 msgid "" "**bbox** (:ref:`Rect`) the boundary box of the XObject's location on the " "page **in untransformed coordinates**. To get actual, non-rotated page " @@ -3113,86 +3137,94 @@ msgstr "" "表されます。実際の、回転していないページ座標を取得するには、ページの変換行列 :attr:`Page.transformation_matrix`" " を掛けてください。*バージョン1.18.11で変更:* **bbox** は今や :ref:`Rect` としてフォーマットされています。" -#: ../../document.rst:898 c14b7bb769794dfb88be638d07b5d32f +#: ../../document.rst:909 be3724545cd849628e6bd091a3cc3fa8 msgid "" "PDF only: Return a list of all images (directly or indirectly) referenced" " by the page." msgstr "PDFのみ: ページによって参照されるすべての画像(直接または間接的に)のリストを返します。" -#: ../../document.rst:901 7a0a3b2ad3ac4f479c13e26fbcf88be8 +#: ../../document.rst:912 bf86d878c0c74dbe9f6905d912e1069e msgid "" "whether to also include the referencer's :data:`xref` (which is zero if " "this is the page)." msgstr "このページがそのページ自体の場合、参照元の :data:`xref` も含めるかどうか(これがページの場合はゼロ)。" -#: ../../document.rst:905 d79dedfeef31496ea375d5f5666c332c +#: ../../document.rst:916 88bc7cacbc2348e98e470cbb54a6ea4c msgid "" "a list of images **referenced** by this page. Each item looks like " -"`(xref, smask, width, height, bpc, colorspace, alt. colorspace, name, " -"filter, referencer)` Where * **xref** (*int*) is the image object " -"number * **smask** (*int*) is the object number of its soft-mask image" -" * **width** and **height** (*ints*) are the image dimensions * " -"**bpc** (*int*) denotes the number of bits per component (normally 8) *" -" **colorspace** (*str*) a string naming the colorspace (like " -"**DeviceRGB**) * **alt. colorspace** (*str*) is any alternate " -"colorspace depending on the value of **colorspace** * **name** (*str*) " -"is the symbolic name by which the image is referenced * **filter** " -"(*str*) is the decode filter of the image (:ref:`AdobeManual`, pp. 22)." -" * **referencer** (*int*) the :data:`xref` of the referencer. Zero if " -"directly referenced by the page. Only present if *full=True*." -msgstr "" - -#: ../../document.rst:905 6ef19b160d8747aeb26bbfaad62c1276 +"`(xref, smask, width, height, bpc, colorspace, alt_colorspace, name, " +"filter, referencer)` Where * *:data:`xref`* (*int*) is the image " +"object number * **smask** (*int*) is the object number of its soft-mask" +" image * **width** (*int*) is the image width * **height** (*int*) is" +" the image height * **bpc** (*int*) denotes the number of bits per " +"component (normally 8) * **colorspace** (*str*) a string naming the " +"colorspace (like **DeviceRGB**) * **alt_colorspace** (*str*) is any " +"alternate colorspace depending on the value of **colorspace** * " +"**name** (*str*) is the symbolic name by which the image is referenced " +"* **filter** (*str*) is the decode filter of the image " +"(:ref:`AdobeManual`, pp. 22). * **referencer** (*int*) the :data:`xref`" +" of the referencer. Zero if directly referenced by the page. Only present" +" if *full=True*." +msgstr "" + +#: ../../document.rst:916 6491f87ae96840e09c13fccc226463ef msgid "a list of images **referenced** by this page. Each item looks like" msgstr "このページで **参照されている** 画像のリスト。各アイテムは以下のようになります:" -#: ../../document.rst:907 ba2678a632074bbca40c010bc0bbb3aa +#: ../../document.rst:918 855d4bf2eedd4786ab4836f0e660eeb1 msgid "" -"`(xref, smask, width, height, bpc, colorspace, alt. colorspace, name, " +"`(xref, smask, width, height, bpc, colorspace, alt_colorspace, name, " "filter, referencer)`" msgstr "" -#: ../../document.rst:909 94c75ffd2db74f188161ffa1f5286c09 +#: ../../document.rst:920 d393059c685e4b2b99530489a9fd4cd7 msgid "Where" msgstr "ここで" -#: ../../document.rst:911 a194cb5b4f0c4fab8ad533f43d90087d -msgid "**xref** (*int*) is the image object number" -msgstr "**xref** (*int*) は画像オブジェクトの番号です" +#: ../../document.rst:922 34311a21103f4cc58b7e72482c578f48 +msgid "*:data:`xref`* (*int*) is the image object number" +msgstr "*:data:`xref`* (*int*) は画像オブジェクトの番号です" -#: ../../document.rst:912 3b0c2730d22d4a57961aabc3ddce70ea +#: ../../document.rst:923 da18a00df2e547b59ff9927842e1ff99 msgid "**smask** (*int*) is the object number of its soft-mask image" msgstr "**smask** (*int*) はそのソフトマスク画像のオブジェクト番号です" -#: ../../document.rst:913 4bb795c114e44ded9c08068959f31999 -msgid "**width** and **height** (*ints*) are the image dimensions" -msgstr "**width** と **height** (*int*)は画像の寸法です" +#: ../../document.rst:924 5dfc945fe0eb407dbb539c5a180be7e1 +#, fuzzy +msgid "**width** (*int*) is the image width" +msgstr "*width* (*int*) 画像の幅" -#: ../../document.rst:914 3bc014d2b6f54bd99cb13e31d0ac7d9c +#: ../../document.rst:925 e927e011deb14515876f09257cf7ffbc +#, fuzzy +msgid "**height** (*int*) is the image height" +msgstr "*height* (*int*) 画像の高さ" + +#: ../../document.rst:926 80ca7112d6be40dba2189a15e0d020d3 msgid "**bpc** (*int*) denotes the number of bits per component (normally 8)" msgstr "**bpc** (*int*) はコンポーネントごとのビット数を示します(通常は8)" -#: ../../document.rst:915 aa63282213de4321a5b0757d20fbd40b +#: ../../document.rst:927 ec292a4da4644bf6bac8b05be16ecef0 msgid "**colorspace** (*str*) a string naming the colorspace (like **DeviceRGB**)" msgstr "**colorspace** (*str*) は色空間の名前を示す文字列です( **DeviceRGB** など)" -#: ../../document.rst:916 d5247b4ca0b8482882d6905bb129b651 +#: ../../document.rst:928 ab540ead740a449db82338f6215bb0f0 +#, fuzzy msgid "" -"**alt. colorspace** (*str*) is any alternate colorspace depending on the " +"**alt_colorspace** (*str*) is any alternate colorspace depending on the " "value of **colorspace**" msgstr "**alt. colorspace** (*str*) は **colorspace** の値に依存する代替の色空間です" -#: ../../document.rst:917 983141ee3e5f40ecba707b13969f9c8b +#: ../../document.rst:929 93d6b6c06d624f5d8d5e1ea99e488051 msgid "**name** (*str*) is the symbolic name by which the image is referenced" msgstr "**name** (*str*) は画像が参照される際の象徴的な名前です" -#: ../../document.rst:918 b3de1d17c83846e68bc9f84e85edde06 +#: ../../document.rst:930 a82bc86c4ff44e3797f686d5a6832a66 msgid "" "**filter** (*str*) is the decode filter of the image (:ref:`AdobeManual`," " pp. 22)." msgstr "**filter** (*str*) は画像のデコードフィルタです(:ref:`AdobeManual`、pp. 22)。" -#: ../../document.rst:919 5acad8907784460b899a8cbc1ea33fe8 +#: ../../document.rst:931 8c958de2bcd240e7b553529c32c3183f msgid "" "**referencer** (*int*) the :data:`xref` of the referencer. Zero if " "directly referenced by the page. Only present if *full=True*." @@ -3200,7 +3232,7 @@ msgstr "" "**referencer** (*int*) は参照元の :data:`xref` です。直接ページから参照されている場合はゼロ。 " "*full=True* の場合のみ存在します" -#: ../../document.rst:921 afc64253f3a8407dbe69a1e1cf6287ee +#: ../../document.rst:933 ef506a92d3bd45eea0964062da5b01a5 msgid "" "In general, this is not the list of images that are **actually " "displayed**. This method only parses several PDF objects to collect " @@ -3213,61 +3245,67 @@ msgstr "" "画像のリストではありません。このメソッドは埋め込まれた画像への参照を収集するためにいくつかのPDFオブジェクトのみを解析します。実際の画像表示コマンドが定義されているページの内容は解析しません。この情報を取得するには、:meth:`Page.get_image_info`" " を使用してください。また、:ref:`textpagedict` のセクションでの議論もご覧ください。" -#: ../../document.rst:926 602e2a4334dc48d091a33b0dc11e5b09 +#: ../../document.rst:938 3e222a6391974132911f5718c2fcc006 +#, fuzzy msgid "" "PDF only: Return a list of all fonts (directly or indirectly) referenced " -"by the page." +"by the page object definition." msgstr "PDFのみ: ページによって参照されるすべてのフォント(直接または間接的に)のリストを返します。" -#: ../../document.rst:929 cb1f163d6d434dc7890c298294b27d87 +#: ../../document.rst:941 8591c400dad84c1684522b3ca38aa15e msgid "" -"whether to also include the referencer's :data:`xref`. If *True*, the " +"whether to also include the referencer's :data:`xref`. If ``True``, the " "returned items are one entry longer. Use this option if you need to know," " whether the page directly references the font. In this case the last " "entry is 0. If the font is referenced by an `/XObject` of the page, you " "will find its :data:`xref` here." msgstr "" -"参照元の :data:`xref` も含めるかどうか。*True* " +"参照元の :data:`xref` も含めるかどうか。``True`` " "の場合、返されるアイテムは1つ多くなります。ページがフォントを直接参照しているかどうかを知る必要がある場合は、このオプションを使用します。この場合、最後のエントリは0です。フォントがページの" " `/XObject` によって参照される場合、その :data:`xref` をここで見つけることができます。" -#: ../../document.rst:933 adf27a3e40ca48bb94b5b159fcea6095 -msgid "a list of fonts referenced by this page. Each entry looks like" +#: ../../document.rst:945 b3162d921d8b405db6a0eb5f2ae20038 +#, fuzzy +msgid "" +"a list of fonts referenced by the object definition of the page. Each " +"entry looks like" msgstr "このページで参照されているフォントのリスト。各エントリは以下のようになります:" -#: ../../document.rst:935 8e658241c60945228f72cd780c86f398 +#: ../../document.rst:947 f034c95a0d374a0692c7b6a2ed4f295a msgid "**(xref, ext, type, basefont, name, encoding, referencer)**," msgstr "" -#: ../../document.rst:937 f67f222dd34442c78536c61c0cd4f1f4 +#: ../../document.rst:949 f7d5895a2dee45758178d3e3f856822e msgid "where" msgstr "ここで" -#: ../../document.rst:939 98c92e898dac4b2ba3805f14ffaffd96 +#: ../../document.rst:951 1f8f44b1b35c48feb6f38d57662547bb msgid "" -"**xref** (*int*) is the font object number (may be zero if the PDF uses " -"one of the builtin fonts directly)" -msgstr "**xref** (*int*) はフォントオブジェクト番号です(PDFが組み込みフォントを直接使用している場合、ゼロになることがあります)" +"*:data:`xref`* (*int*) is the font object number (may be zero if the PDF " +"uses one of the builtin fonts directly)" +msgstr "" +"*:data:`xref`* (*int*) " +"はフォントオブジェクト番号です(PDFが組み込みフォントを直接使用している場合、ゼロになることがあります)" -#: ../../document.rst:940 bc23886a68d74bb8bcff01236b343857 +#: ../../document.rst:952 f04105275ec7406c813b24e358165f3c msgid "" "**ext** (*str*) font file extension (e.g. \"ttf\", see " ":ref:`FontExtensions`)" msgstr "**ext** (*str*) フォントファイルの拡張子(例: \"ttf\"、:ref:`FontExtensions` を参照)" -#: ../../document.rst:941 0b984e32839b4762886cc3b6feb3dcbe +#: ../../document.rst:953 18fe5995888b4d6cbd2090663098b08f msgid "**type** (*str*) is the font type (like \"Type1\" or \"TrueType\" etc.)" msgstr "**type** (*str*) フォントの種類(\"Type1\"や\"TrueType\"など)" -#: ../../document.rst:942 66bb4a08eb6a4ef8aa7bc314aabcaa0d +#: ../../document.rst:954 46d4f4b7854f4c7bb33265a3bbea63e4 msgid "**basefont** (*str*) is the base font name," msgstr "**basefont** (*str*) ベースフォント名" -#: ../../document.rst:943 0abf3ede10c446309e146df312cea8b3 +#: ../../document.rst:955 b34d9fb1b13c48748456b908131517b0 msgid "**name** (*str*) is the symbolic name, by which the font is referenced" msgstr "**name** (*str*) フォントが参照される象徴的な名前" -#: ../../document.rst:944 14e004fdfa384a96929bd3961318149d +#: ../../document.rst:956 340cfb69f253428fad01b23c36d7d10c msgid "" "**encoding** (*str*) the font's character encoding if different from its " "built-in encoding (:ref:`AdobeManual`, p. 254):" @@ -3275,7 +3313,7 @@ msgstr "" "**encoding** (*str*) " "フォントの文字エンコーディング。組み込みエンコーディングと異なる場合(:ref:`AdobeManual`、p. 254を参照):" -#: ../../document.rst:945 308daf052aec4d5b81eaadc7383a9f4c +#: ../../document.rst:957 237434e9722c44f6a2a3a13c03118c18 msgid "" "**referencer** (*int* optional) the :data:`xref` of the referencer. Zero " "if directly referenced by the page, otherwise the xref of an XObject. " @@ -3284,64 +3322,94 @@ msgstr "" "**referencer** (*int*、オプション) 参照元のxref。ページから直接参照されている場合は0、それ以外の場合はXObjectの" " :data:`xref` です。 *full=True* の場合のみ存在します。" -#: ../../document.rst:947 740ddb6444034853929fcffb2fc3b6ec +#: ../../document.rst:959 deb2aa7147f34e08aa316d1edbcde9b1 msgid "Example::" msgstr "例::" -#: ../../document.rst:960 30ad9ded269b49569e95e030aff5345a +#: ../../document.rst:972 5a7a9c1645de41c6adc2914a03660dd2 msgid "" "This list has no duplicate entries: the combination of :data:`xref`, " "*name* and *referencer* is unique." msgstr "このリストには重複するエントリはありません::data:`xref` 、*name* 、および *referencer* の組み合わせは一意です。" -#: ../../document.rst:961 7bfcf8ef61b846629779bcc584db8b8d +#: ../../document.rst:973 b7bc024d7ade48f29ca45e6fbffac417 +#, fuzzy msgid "" -"In general, this is a superset of the fonts actually in use by this page." -" The PDF creator may e.g. have specified some global list, of which each " -"page only makes partial use." +"In general, this is a true superset of the fonts actually in use by this " +"page. The PDF creator may e.g. have specified some global list, of which " +"each page make only partial use." msgstr "一般的に、これはこのページで実際に使用されているフォントのスーパーセットです。PDF作成者は、各ページが部分的にしか使用しない、グローバルリストを指定したかもしれません。" -#: ../../document.rst:965 92fc099219d14e4dae2fd0fba1edb0e9 +#: ../../document.rst:974 04ac002739ac4185a9858211f4e8bc62 +msgid "" +"Be aware that font names returned by some variants of " +":meth:`Page.get_text` (respectively :ref:`TextPage` methods) need not " +"(exactly) equal the base font name shown here. Reasons for any " +"differences include:" +msgstr "" + +#: ../../document.rst:976 152d5a7785474d7dbff306e85b09958d +msgid "" +"This method always shows any subset prefixes (the pattern ``ABCDEF+``), " +"whereas text extractions do not do this by default." +msgstr "" + +#: ../../document.rst:977 e1b5ec7f36b9446c906f18220ae53a37 +msgid "" +"Text extractions use the base library to access the font name, which has " +"a length cap of 31 bytes and generally interrogates the font file binary " +"to access the name. Method ``get_page_fonts()`` however looks at the PDF " +"definition source." +msgstr "" + +#: ../../document.rst:978 f30488f7a506418d877eebc2490fed5d +msgid "" +"Text extractions work for all supported document types in exactly the " +"same way -- not just for PDFs. Consequently they do not contain PDF-" +"specifics." +msgstr "" + +#: ../../document.rst:982 ad73ac2dd81547b28a9a20e0bb368d63 msgid "" "Extracts the text of a page given its page number *pno* (zero-based). " "Invokes :meth:`Page.get_text`." msgstr "ページ番号 *pno* (0から始まる)を指定して、ページのテキストを抽出します。:meth:`Page.get_text` を呼び出します。" -#: ../../document.rst:967 9e032fa954b6476e8ce3e51af3571a18 +#: ../../document.rst:984 b258e962454b4ab2b5f383f3356416d5 msgid "page number, 0-based, any value `-∞ < pno < page_count`." msgstr "ページ番号、0から始まる、任意の値 `-∞ < pno < page_count`。" -#: ../../document.rst:969 6dd3a7c59a47408b8a7ddc5f5544e9df +#: ../../document.rst:986 4d32e6e7d1ff40b9997b6a2fab8d9414 msgid "For other parameter refer to the page method." msgstr "その他のパラメータについては、ページのメソッドを参照してください。" -#: ../../document.rst:981 c3cdd7116c464a18a7eda32a9211ddea +#: ../../document.rst:998 670a6c4d60ae4a4e856c0aed38a32b8d msgid "" "Re-paginate (\"reflow\") the document based on the given page dimension " "and fontsize. This only affects some document types like e-books and " -"HTML. Ignored if not supported. Supported documents have *True* in " +"HTML. Ignored if not supported. Supported documents have ``True`` in " "property :attr:`is_reflowable`." msgstr "" "与えられたページの寸法とフォントサイズに基づいて、ドキュメントを再ページ割り(\"リフロー\")します。これは電子書籍やHTMLなどの一部のドキュメントタイプにのみ影響します。サポートされていない場合は無視されます。サポートされているドキュメントには" -" :attr:`is_reflowable` プロパティで *True* が設定されています。" +" :attr:`is_reflowable` プロパティで ``True`` が設定されています。" -#: ../../document.rst:983 24cee37012c2474d89889ab5d2d80f3c +#: ../../document.rst:1000 ebf2748dcfce49bca4d672942c503996 msgid "desired page size. Must be finite, not empty and start at point (0, 0)." msgstr "望ましいページサイズ。有限で、空でなく、ポイント(0, 0)で始まる必要があります。" -#: ../../document.rst:984 19f2663c1bf243e6a8f209368c95bc5d +#: ../../document.rst:1001 86347c614af0436bb338d20c7582e940 msgid "use it together with *height* as alternative to *rect*." msgstr "*rect* との代替として、*height* と一緒に使用します。" -#: ../../document.rst:985 988cd14564fe45898c6993f832d839c5 +#: ../../document.rst:1002 ea15e2c3e68549618e1fa6ed8f2cf0b0 msgid "use it together with *width* as alternative to *rect*." msgstr "*rect* との代替として、*width* と一緒に使用します。" -#: ../../document.rst:986 992a2072617d4a28a0685b87ff9e77d4 +#: ../../document.rst:1003 e860e1d18a5c42f2b1fe3b03e07d9196 msgid "the desired default fontsize." msgstr "望ましいデフォルトのフォントサイズ。" -#: ../../document.rst:990 76a837a7234d4ef1a5d4e927359909c6 +#: ../../document.rst:1007 f4ae5777a1ed4675a10cc9991509f306 msgid "" "PDF only: Keeps only those pages of the document whose numbers occur in " "the list. Empty sequences or elements outside `range(doc.page_count)` " @@ -3352,7 +3420,7 @@ msgstr "" "`range(doc.page_count)` は *ValueError* " "を引き起こします。詳細については、この章の最後の注釈を参照してください。" -#: ../../document.rst:992 b33b3c1b62d24874a8203fc245f4c9ab +#: ../../document.rst:1009 5d1c676de3e248aa9afa6e840a8e87c9 msgid "" "The sequence (see :ref:`SequenceTypes`) of page numbers (zero-based) to " "be included. Pages not in the sequence will be deleted (from memory) and " @@ -3364,20 +3432,20 @@ msgstr "" "ページ番号(0から始まる)のシーケンス(PyMuPDFで引数として使用する場合はPythonシーケンスを使用)を含めるためのもの。シーケンス内に含まれていないページは(メモリから)削除され、ドキュメントが再オープンされるまで利用できなくなります。**ページ番号は複数回発生し、任意の順序で発生できます:**" " 結果のドキュメントは指定された正確なシーケンスを反映します。" -#: ../../document.rst:996 c4a4624bd86a49628554dcb7c90a3a75 +#: ../../document.rst:1013 c24904baf72a426784816f2dec800563 msgid "" "Page numbers in the sequence need not be unique nor be in any particular " "order. This makes the method a versatile utility to e.g. select only the " "even or the odd pages or meeting some other criteria and so forth." msgstr "シーケンス内のページ番号は一意である必要も、特定の順序である必要もありません。これにより、この方法は、例えば偶数のページだけを選択したり、奇数のページだけを選択したり、その他の基準を満たしたりするなど、多目的に使用できます。" -#: ../../document.rst:998 671c66af2b454e73bc27c15fc53b4cf3 +#: ../../document.rst:1015 1eedae859790478fa6c58679c6a117e3 msgid "" "On a technical level, the method will always create a new " ":data:`pagetree`." msgstr "技術的なレベルでは、この方法は常に新しい :data:`pagetree` を作成します。" -#: ../../document.rst:1000 4b4e77ee98304b209dfb4a5a801a12b1 +#: ../../document.rst:1017 a4541d5a87e24452b0ce0cc2ca1f1117 msgid "" "When dealing with only a few pages, methods :meth:`copy_page`, " ":meth:`move_page`, :meth:`delete_page` are easier to use. In fact, they " @@ -3388,13 +3456,13 @@ msgstr "" "、:meth:`move_page`、:meth:`delete_page` " "を使用する方が簡単です。実際、これらの方法は、文書に多くのページがある場合でも、少なくとも1桁のオーダーで **高速です** 。" -#: ../../document.rst:1005 ed615749622544c1bf34578ac5fe0215 +#: ../../document.rst:1022 9b3a0322272e49d7ab4240c67bf562c6 msgid "" "PDF only: Sets or updates the metadata of the document as specified in " "*m*, a Python dictionary." msgstr "PDFのみ: *m* で指定されたPythonの辞書と同じキーを持つ辞書を設定または更新します。" -#: ../../document.rst:1007 77fc2c8e75b24fd28fc04ccc3fe92e87 +#: ../../document.rst:1024 c3400fc94d384392908cfb4b29dfa389 msgid "" "A dictionary with the same keys as *metadata* (see below). All keys are " "optional. A PDF's format and encryption method cannot be set or changed " @@ -3411,66 +3479,66 @@ msgstr "" "にクリアされます。一部の値のみを選択的に変更したい場合は、*doc.metadata* " "のコピーを変更して引数として使用してください。UTF-8でエンコードされた場合、任意のUnicode値が指定可能です。" -#: ../../document.rst:1009 308cb1e03df34606b940baa8f31e1630 +#: ../../document.rst:1026 a9f1934c049c4780b0818c16ed0fcc95 msgid "" "*(Changed in v1.18.4)* Empty values or \"none\" are no longer written, " "but completely omitted." msgstr "*(v1.18.4で変更)* 空の値または \"none\" は書き込まれなくなり、完全に省略されます。" -#: ../../document.rst:1013 8e307daf95944473b1fa7605b06c9fb3 +#: ../../document.rst:1030 41d3c4ca07ec4f089d03386dccc57d6a msgid "PDF only: Get the document XML metadata." msgstr "PDFのみ:ドキュメントのXMLメタデータを取得します。" -#: ../../document.rst:1016 1bdf31a772854ada8f44d31ffe32130f +#: ../../document.rst:1033 25fd37327bb346108add254429abcd2d msgid "XML metadata of the document. Empty string if not present or not a PDF." msgstr "ドキュメントのXMLメタデータ。存在しない場合やPDFでない場合は空の文字列。" -#: ../../document.rst:1020 2809d8dbf90d4464ba13aac8260dd513 +#: ../../document.rst:1037 2fdf0ee60d4b4edd9e3fa3d209aab99f msgid "PDF only: Sets or updates XML metadata of the document." msgstr "PDFのみ:ドキュメントのXMLメタデータを設定または更新します。" -#: ../../document.rst:1022 a83dbd8ebdc449e19bef1d90e9144c9c +#: ../../document.rst:1039 e9c74b38abe24b6aab15e7e575325869 msgid "" "the new XML metadata. Should be XML syntax, however no checking is done " "by this method and any string is accepted." msgstr "xml(str)–新しいXMLメタデータ。XML構文である必要がありますが、このメソッドではチェックされず、任意の文字列が受け入れられます。" -#: ../../document.rst:1027 ../../document.rst:1036 ../../document.rst:1045 -#: ../../document.rst:1974 ../../document.rst:1982 ../../document.rst:1990 -#: ../../document.rst:1998 ../../document.rst:2006 -#: 19f1a4722e614e8c8e0a76369e80acbb 1cd34ed2147741839b8def84a76d37ed -#: 4b285d5d90db44ad8782cfd8eb619a9b 8f2fd5c3a8f94b04a35e7e8343738128 -#: 998e56e985e843f59ea54196a30f0f71 9f2c1d5dff174de4ae1c8630a7ad2617 -#: 9faa8e27aaf640209c129eb0723c66f7 f68bda930cc8435ea31379412741efce +#: ../../document.rst:1044 ../../document.rst:1053 ../../document.rst:1062 +#: ../../document.rst:2000 ../../document.rst:2008 ../../document.rst:2016 +#: ../../document.rst:2024 ../../document.rst:2032 +#: 0f80c2e6f76943548daf29544192ee08 3f59c0024a1e452c9f3cc1d5e65ac6c8 +#: 5a2c60666f0f45e69c41fa94a13d52f0 a89d92b2c4fd4b89978475498a73d59e +#: a9a03d3f9bf543139f6dffe335c28111 c1cbcd07cce14eb19a42b3aec21e5df2 +#: ce98846a575c43db9f1ce69e181223f8 eb059f73cbfb45f89eb50d0b7a163741 msgid "New in v1.22.2" msgstr "v1.22.2で新登場" -#: ../../document.rst:1029 20ae726baf0947b3935f1cb86e444835 +#: ../../document.rst:1046 7a89cff419794c21b4d37c19a0085600 msgid "PDF only: Set the `/PageLayout`." msgstr "PDFのみ:`/PageLayout` を設定します。" -#: ../../document.rst:1031 82f234b45c8d490ab806d1af2850c8f4 +#: ../../document.rst:1048 d35d4f2dea4647fe9ee6c05e0920823c msgid "" "one of the strings \"SinglePage\", \"OneColumn\", \"TwoColumnLeft\", " "\"TwoColumnRight\", \"TwoPageLeft\", \"TwoPageRight\". Lower case is " "supported." msgstr "以下の文字列のいずれか、\"SinglePage\"、\"OneColumn\"、\"TwoColumnLeft\"、\"TwoColumnRight\"、\"TwoPageLeft\"、\"TwoPageRight\"。小文字もサポートされています。" -#: ../../document.rst:1038 226d8bbf2c4644deb527a714a2e46c41 +#: ../../document.rst:1055 8799ae6598b84f96ae31960223b42da9 msgid "PDF only: Set the `/PageMode`." msgstr "PDFのみ:`/PageMode` を設定します。" -#: ../../document.rst:1040 291d23c5558a4ad495e8ac1ab6bfadde +#: ../../document.rst:1057 3581829f53d74f5dbe7f0c6057610060 msgid "" "one of the strings \"UseNone\", \"UseOutlines\", \"UseThumbs\", " "\"FullScreen\", \"UseOC\", \"UseAttachments\". Lower case is supported." msgstr "以下の文字列のいずれか、\"UseNone\"、\"UseOutlines\"、\"UseThumbs\"、\"FullScreen\"、\"UseOC\"、\"UseAttachments\"。小文字もサポートされています。" -#: ../../document.rst:1047 426899fe15ec46c1a52f5b4d3843cf93 +#: ../../document.rst:1064 e4f86a3e7a9c450fa44c58e504cbfc52 msgid "PDF only: Set the `/MarkInfo` values." msgstr "PDFのみ:`/MarkInfo` の値を設定します。" -#: ../../document.rst:1049 9d283bbc9098497ebcc71df1664d9fa9 +#: ../../document.rst:1066 17f255ef8d8c4cecad9d64a169bfeee8 msgid "" "a dictionary like this one: `{\"Marked\": False, \"UserProperties\": " "False, \"Suspects\": False}`. This dictionary contains information about " @@ -3483,7 +3551,7 @@ msgstr "" "`_ を参照してください。" -#: ../../document.rst:1054 053f0e2c3c2148b781ea5c71c9bf8ea2 +#: ../../document.rst:1071 6e7e2e7e67574edea4027eced013ae29 msgid "" "PDF only: Replaces the **complete current outline** tree (table of " "contents) with the one provided as the argument. After successful " @@ -3498,15 +3566,15 @@ msgstr "" "を使用してアクセスできます。他の出力指向のメソッドと同様に、変更は :meth:`save` " "(増分保存対応)を介してのみ永続的になります。内部的には、このメソッドは次の2つのステップで構成されています。デモンストレーションについては以下の例を参照してください。" -#: ../../document.rst:1056 727d879acfbe401b994deff3e0f408a1 +#: ../../document.rst:1073 791c9c71e2184c7f81fd6a3d8ff7c22c msgid "Step 1 deletes all existing bookmarks." msgstr "ステップ1:すべての既存のブックマークを削除します。" -#: ../../document.rst:1058 31c46192b6744a03bab325a4e51e0cd9 +#: ../../document.rst:1075 c786a74e27b1445d983bfe65ed6efbbd msgid "Step 2 creates a new TOC from the entries contained in *toc*." msgstr "ステップ2:*toc* に含まれるエントリを使用して新しいTOCを作成します。" -#: ../../document.rst:1060 af6859f4fa95473292177272c7ed8894 +#: ../../document.rst:1077 01c47a1265f840ed992ec7c8f24007b7 msgid "" "A list / tuple with **all bookmark entries** that should form the new " "table of contents. Output variants of :meth:`get_toc` are acceptable. To " @@ -3526,7 +3594,7 @@ msgid "" ":meth:`Document.get_toc` for a description." msgstr "" -#: ../../document.rst:1062 cd75456132b94c55bc67c6b77b95f729 +#: ../../document.rst:1079 c7dd9bee1ec14c3496fc2aa291b50dfb msgid "" "A list / tuple with **all bookmark entries** that should form the new " "table of contents. Output variants of :meth:`get_toc` are acceptable. To " @@ -3536,17 +3604,17 @@ msgstr "" "新しい目次を形成するための **すべてのブックマークエントリ** を含むリスト/タプル。:meth:`get_toc` " "の出力バリエーションが許容されます。目次を完全に削除するには、空のシーケンスまたはNoneを指定してください。各アイテムは、次の形式である必要があります。" -#: ../../document.rst:1064 22a6a04b886f422196b5dd0db3ba99eb +#: ../../document.rst:1081 38299a74fc0349db86848d437f980ca7 msgid "[lvl, title, page [, dest]] where" msgstr "[lvl, title, page [, dest]] ここで" -#: ../../document.rst:1066 be77dc2e720e435c8781b2ddf26aa525 +#: ../../document.rst:1083 30de0bbe44cb439fbdcdef536e433e50 msgid "" "**lvl** is the hierarchy level (int > 0) of the item, which **must be 1**" " for the first item and at most 1 larger than the previous one." msgstr "**lvl** はアイテムの階層レベル(int > 0)で、最初のアイテムの場合は1で、前のアイテムより最大1大きくする必要があります。" -#: ../../document.rst:1068 b391d7ec673e4183b345b00f924a4f7a +#: ../../document.rst:1085 e09bf06761b0434a8b8d1fe4c3013804 msgid "" "**title** (str) is the title to be displayed. It is assumed to be " "UTF-8-encoded (relevant for multibyte code points only)." @@ -3554,7 +3622,7 @@ msgstr "" "**title** " "(str)は表示されるタイトルです。UTF-8でエンコードされていると仮定されています(マルチバイトコードポイントの場合に関連します)。" -#: ../../document.rst:1070 3d39b1af4ef647b88de336a049cbe9f7 +#: ../../document.rst:1087 6f3cd9c55d3b4dce865154bff0d76b74 msgid "" "**page** (int) is the target page number **(attention: 1-based)**. Must " "be in valid range if positive. Set it to -1 if there is no target, or the" @@ -3563,7 +3631,7 @@ msgstr "" "**page**(int)は対象のページ番号です **(注意:1から始まります)** " "。正の場合、有効な範囲内になければなりません。対象がない場合、または対象が外部の場合は-1に設定します。" -#: ../../document.rst:1072 33a1c44c2f1d458ea05806241bab35d6 +#: ../../document.rst:1089 bf68607517eb40ccafef1c06f1d77730 msgid "" "**dest** (optional) is a dictionary or a number. If a number, it will be " "interpreted as the desired height (in points) this entry should point to " @@ -3575,7 +3643,7 @@ msgstr "" "(オプション)は辞書または数値です。数値の場合、このエントリがページ上で指し示すべき目標の高さ(ポイント単位)と解釈されます。詳細なブックマークのプロパティを制御するには(`get_toc(False)`" " によって出力されるものと同様の辞書を使用してください)、:meth:`Document.get_toc` の説明を参照してください。" -#: ../../document.rst:1074 01aaa15c21b34690be4e3e1c7ad0158f +#: ../../document.rst:1091 97edf9c633a944dc8cdc27675efe2f29 msgid "" "*(new in v1.16.9)* controls the hierarchy level beyond which outline " "entries should initially show up collapsed. The default 1 will hence only" @@ -3585,11 +3653,11 @@ msgstr "" "*(v1.16.9で新規追加)* " "アウトラインエントリが初めて折りたたまれて表示される階層レベルを制御します。デフォルトの1はレベル1のみを表示し、より高いレベルはPDFビューアを使用して展開する必要があります。すべてを展開するには、大きな整数、0、またはNoneを指定してください。" -#: ../../document.rst:1077 b146dc9e4f4542ffa52f0967601fb1ff +#: ../../document.rst:1094 f08551f3aadd45be8c4ac339de74411e msgid "the number of inserted, resp. deleted items." msgstr "挿入されたアイテム、または削除されたアイテムの数。" -#: ../../document.rst:1079 7fdf867830de4d0b8b7d18c47985a085 +#: ../../document.rst:1096 c8b19a664c41408894120b76b42475b1 msgid "" "Changed in v1.23.8: Destination 'to' coordinates should now be in the " "same coordinate system as those returned by `get_toc()` (internally they " @@ -3601,27 +3669,28 @@ msgstr "" " (内部的には `page.cropbox` と `page.rotation_matrix` で変換されます)。したがって、例えば " "`set_toc(get_toc())` は、変更されていない 'to' 座標を与えます。" -#: ../../document.rst:1089 1410759f67134c83a9b2c672b7a46230 +#: ../../document.rst:1106 1b44b9477da5409fa135b1af7596c6c7 msgid "" "PDF only: Return the :data:`xref` of the outline item. This is mainly " "used for internal purposes." msgstr "PDFのみ:アウトラインアイテムの :data:`xref` を返します。これは主に内部用途で使用されます。" -#: ../../document.rst:1091 cf8a1907766c4d0480a0b8561497e4b4 -msgid "arg int idx: index of the item in list :meth:`Document.get_toc`." -msgstr "引数 int idx: :meth:`Document.get_toc` リスト内のアイテムのインデックス。" +#: ../../document.rst:1108 46ab12633f9f48c5ac377c51eaeed3cf +#, fuzzy +msgid "index of the item in list :meth:`Document.get_toc`." +msgstr ":meth:`Document.get_toc` のリスト内のアイテムのインデックス。" -#: ../../document.rst:1093 a73336ac0f7a4c5d9540843cf962478a +#: ../../document.rst:1110 de8f2ba5f5fa48f388f70daecdd094b0 msgid ":data:`xref`." msgstr "" -#: ../../document.rst:1098 c3180879261f48c3a7f2c46ea583f18f +#: ../../document.rst:1115 183f533e24964bd29ae666eadc3bf9a1 msgid "" "Changed in v1.18.14: no longer remove the item's text, but show it " "grayed-out." msgstr "v1.18.14で変更: アイテムのテキストを削除しなくなり、灰色で表示されます。" -#: ../../document.rst:1100 ef6ad9ecb75e445ca669e686db42ee95 +#: ../../document.rst:1117 6aedd6b394514138a6f0cc42782782e1 msgid "" "PDF only: Remove this TOC item. This is a high-speed method, which " "**disables** the respective item, but leaves the overall TOC structure " @@ -3631,7 +3700,7 @@ msgstr "" "PDFのみ: この目次アイテムを削除します。これは高速なメソッドで、該当するアイテムを **無効にします** " "が、全体の目次構造はそのままです。物理的には、アイテムはまだ目次ツリーに存在しますが、灰色で表示され、もはやどの宛先も指し示しません。" -#: ../../document.rst:1102 1d613bd50b9d4ae7a581f8e610e145ad +#: ../../document.rst:1119 b0c8964d54534f91afc361d747cda4b4 msgid "" "This also implies that you can reassign the item to a new destination " "using :meth:`Document.set_toc_item`, when required." @@ -3639,15 +3708,15 @@ msgstr "" "これはまた、必要な場合に:meth:`Document.set_toc_item` " "を使用してアイテムを新しい宛先に再割り当てできることを意味します。" -#: ../../document.rst:1104 65a3e11ab1d14b6090c8f175f6d363ab +#: ../../document.rst:1121 f863cf2617b04cabafa956b26cf5fddb msgid "the index of the item in list :meth:`Document.get_toc`." msgstr ":meth:`Document.get_toc` のリスト内のアイテムのインデックス。" -#: ../../document.rst:1110 d9377ec0aa384eb98a981fcfdaf45541 +#: ../../document.rst:1127 b9b8e1aae2154d798b5a9c69f9716526 msgid "Changed in v1.18.6" msgstr "v1.18.6で変更" -#: ../../document.rst:1112 d3cadad1c7ab4a6e958ae9bcc527b4a0 +#: ../../document.rst:1129 cd7352b98859448391d3bceecde81fd8 msgid "" "PDF only: Changes the TOC item identified by its index. Change the item " "**title**, **destination**, **appearance** (color, bold, italic) or " @@ -3656,18 +3725,18 @@ msgstr "" "PDFのみ: インデックスによって識別されるTOCアイテムを変更します。アイテムの **タイトル** 、**宛先** 、 **外観** " "(色、太字、イタリック)を変更したり、サブアイテムを折りたたんだり、アイテムを完全に削除したりするために使用します。" -#: ../../document.rst:1114 c4298b644e3042c78154531f62ba92fa +#: ../../document.rst:1131 9cc7c9f824384d8d80e92eea4a4b5887 msgid "" "Use this method if you need specific changes for selected entries only " "and want to avoid replacing the complete TOC. This is beneficial " "especially when dealing with large table of contents." msgstr "選択したエントリに対して特定の変更が必要で、完全なTOCを置き換えたくない場合にこのメソッドを使用します。大きな目次を扱う場合に特に便利です。" -#: ../../document.rst:1116 88e9ee50da91463d88106a0051fd9b08 +#: ../../document.rst:1133 6b4e00f4ee6148a78200cb3ad35ca391 msgid "the index of the entry in the list created by :meth:`Document.get_toc`." msgstr ":meth:`Document.get_toc` によって作成されたリスト内のエントリのインデックス。" -#: ../../document.rst:1117 17e54b2be0e542028e878be2ea14fa08 +#: ../../document.rst:1134 e812d5f67b2a410f9087d76dd19d4c85 msgid "" "the new destination. A dictionary like the last entry of an item in " "`doc.get_toc(False)`. Using this as a template is recommended. When " @@ -3676,7 +3745,7 @@ msgstr "" "新しい宛先。`doc.get_toc(False)` のアイテムの最後のエントリのような辞書を使用することが推奨されます。指定された場合、他の " "**すべてのパラメータは無視されます** - タイトル以外。" -#: ../../document.rst:1118 0480470b942b43c49e7078e74061b1e9 +#: ../../document.rst:1135 9fb602c3c81f4ba0a0e6078792c10a32 msgid "" "the link kind, see :ref:`linkDest Kinds`. If :data:`LINK_NONE`, then all " "remaining parameter will be ignored, and the TOC item will be removed -- " @@ -3689,51 +3758,51 @@ msgstr "" "の場合、残りのパラメータはすべて無視され、TOCアイテムは削除されます - :meth:`Document.del_toc_item` " "と同じです。Noneの場合、タイトルのみが変更され、残りのパラメータは無視されます。それ以外の値は、後続の引数を使用して新しい宛先辞書を作成します。" -#: ../../document.rst:1119 4683a017aa504643824d146b8ae57317 +#: ../../document.rst:1136 c8fd861096fa449a8a72b9c25bc74212 msgid "" "the 1-based page number, i.e. a value 1 <= pno <= doc.page_count. " "Required for LINK_GOTO." msgstr "1から始まるページ番号、つまり1 <= pno <= doc.page_count。LINK_GOTOの場合に必要です。" -#: ../../document.rst:1120 019a45bfaf414891a5ce59e6da860f16 +#: ../../document.rst:1137 e3124c2dabb84235a2dab26fa5e4313b msgid "the URL text. Required for LINK_URI." msgstr "URLのテキスト。LINK_URIの場合に必要です。" -#: ../../document.rst:1121 d2b943f2ce544278b70e93bcab660f85 +#: ../../document.rst:1138 4d9ab75988b84c51a00d505cad5d6597 msgid "the desired new title. None if no change." msgstr "新しいタイトル。変更しない場合はNone。" -#: ../../document.rst:1122 2cd4a1f9e71641f5928e023c77d5eabb +#: ../../document.rst:1139 4da7aca1af47456987cba8fc8a789cf5 msgid "" "(optional) points to a coordinate on the target page. Relevant for " "LINK_GOTO. If omitted, a point near the page's top is chosen." msgstr "(オプション)対象ページ上の座標を指定します。LINK_GOTOの場合に関連します。省略された場合、ページの上部近くのポイントが選択されます。" -#: ../../document.rst:1123 85528a77b911456aae86a88772c3ee0c +#: ../../document.rst:1140 a1ec74204c6e4cea9d578172ca6472de msgid "required for LINK_GOTOR and LINK_LAUNCH." msgstr "LINK_GOTORおよびLINK_LAUNCHに必要です。" -#: ../../document.rst:1124 13410c61a23f46f2b13a0b65c83767f0 +#: ../../document.rst:1141 98848c95243e4967ae1b563865daec93 msgid "use this zoom factor when showing the target page." msgstr "対象ページを表示する際にこのズームファクターを使用します。" -#: ../../document.rst:1126 2a11eef6207c4ad29c77f1267111257d +#: ../../document.rst:1143 07b9d1f04f8b4b1eb0cfe2fbdcb95bec msgid "**Example use:** Change the TOC of the SWIG manual to achieve this:" msgstr "**使用例:** SWIGマニュアルのTOCを変更して、次のことを達成します:" -#: ../../document.rst:1128 8928bd2a788849039bdc0ab0cfed09b3 +#: ../../document.rst:1145 cba2012437d147cb8d7e4d8043ab9045 msgid "" "Collapse everything below top level and show the chapter on Python " "support in red, bold and italic::" msgstr "トップレベル以下をすべて折りたたみ、Pythonサポートの章を赤色で太字かつイタリックで表示::" -#: ../../document.rst:1145 60b6ad7bed1942e8accf5ef29c722808 +#: ../../document.rst:1162 4b7969ea1ad749c3ba251a7815355131 msgid "" "In the previous example, we have changed only 42 of the 1240 TOC items of" " the file." msgstr "前の例では、ファイルの1240のTOCアイテムのうち、わずか42のみを変更しました。" -#: ../../document.rst:1149 d3e29e50ed384b338a919b86e3255849 +#: ../../document.rst:1166 ef06c1c4efa948a68ccfa92c2da560d5 msgid "" "PDF only: Convert annotations and / or widgets to become permanent parts " "of the pages. The PDF **will be changed** by this method. If `widgets` is" @@ -3742,14 +3811,14 @@ msgstr "" "PDF のみ: 注釈やウィジェットをページの永続的な部分に変換します。このメソッドによって PDF **は変更されます**。 `widgets` " "が `True` の場合、ドキュメントは「フォーム PDF」ではなくなります。" -#: ../../document.rst:1151 badbbf69e5a94087923f68274196ec8d +#: ../../document.rst:1168 3c8b2c2bbd0e46588b86ed44ebf4977f msgid "" "All pages will look the same, but will no longer have annotations, " "respectively fields. The visible parts will be converted to standard " "text, vector graphics or images as required." msgstr "すべてのページが同じように見えますが、注釈またはフィールドがなくなります。必要に応じて、表示される部分は標準のテキスト、ベクトルグラフィックス、または画像に変換されます。" -#: ../../document.rst:1153 8c72acc6297246e4b5e2f98f5a218574 +#: ../../document.rst:1170 2d05aa4abfb34b2a9795d88893ac9f2b msgid "" "The method may thus be a viable **alternative for PDF-to-PDF " "conversions** using :meth:`Document.convert_to_pdf`." @@ -3757,7 +3826,7 @@ msgstr "" "このメソッドは、:meth:`Document.convert_to_pdf` を使用して PDF を PDF " "に変換する際の代替手段として有効な選択肢です。" -#: ../../document.rst:1155 2048389712724034a47ff0faa995e08b +#: ../../document.rst:1172 edbcbf03d0284b9ab26884f37b7fd612 msgid "" "Please consider that annotations are complex objects and may consist of " "more data \"underneath\" their visual appearance. Examples are \"Text\" " @@ -3770,42 +3839,42 @@ msgstr "" "\"FileAttachment\" " "の注釈が挙げられます。このメソッドで注釈やウィジェットを組み込む際には、この下部情報(添付ファイル、コメント、関連するポップアップ注釈など)がすべて失われ、次のガベージコレクション時に削除されます。" -#: ../../document.rst:1157 c03e05a37eb2411bac8cdad16246bbe5 +#: ../../document.rst:1174 c30265d88f5d4a7d9c1019d6774131b8 +#, fuzzy msgid "" -"Use this feature for instance for methods :meth:`Document.insert_pdf` " -"(which supports no copying of widgets) or :meth:`Page.show_pdf_page` " -"(which supports neither annotations nor widgets) when the source pages " -"should look exactly the same in the target." +"Use this feature for instance for :meth:`Page.show_pdf_page` (which " +"supports neither annotations nor widgets) when the source pages should " +"look exactly the same in the target." msgstr "" "たとえば、 :meth:`Document.insert_pdf` (ウィジェットのコピーをサポートしていない)や " ":meth:`Page.show_pdf_page` " "(注釈やウィジェットをサポートしていない)などのメソッドで、ソースページがターゲットで完全に同じように見えるようにする場合にこの機能を使用します。" -#: ../../document.rst:1160 43d317af79b145c3a5ef7c746774c380 +#: ../../document.rst:1177 d1469dec5e3249dabbf9a298e8466705 msgid "convert annotations." msgstr "注釈を変換するかどうか。" -#: ../../document.rst:1161 304dcd941cb54798915d041d81f9ef1f +#: ../../document.rst:1178 dd66637740294e09ba7b8e36f33a8206 msgid "" "convert fields / widgets. After execution, the document will no longer be" " a \"Form PDF\"." msgstr "フィールド / ウィジェットを変換します。実行後、ドキュメントはもはや「フォーム PDF」ではありません。" -#: ../../document.rst:1166 97e5190779ee433db29f19c5a4622f4c +#: ../../document.rst:1183 b05fb5b75e5a4162b9f73314aa643aa6 msgid "New in v1.16.0" msgstr "v1.16.0で新規追加" -#: ../../document.rst:1168 639466778dec435d8e69c3c318897bae +#: ../../document.rst:1185 c1f4ba67c1b24bf6867b2fd21bb8cccc msgid "" "Check whether the document can be saved incrementally. Use it to choose " "the right option without encountering exceptions." msgstr "ドキュメントを増分保存できるかどうかを確認します。例外を発生させずに正しいオプションを選択するために使用します。" -#: ../../document.rst:1172 c0d7d8d6ef434c06ad848447e071c5be +#: ../../document.rst:1189 41e3e4bdc3424c10aafd4d97c601e30d msgid "New in v1.16.14" msgstr "v1.16.14で新規追加" -#: ../../document.rst:1174 e4f5e28687ca4438b1e754364a6c7298 +#: ../../document.rst:1191 831d489a84d740a984bb6dde04e39587 msgid "" "PDF only: Remove potentially sensitive data from the PDF. This function " "is inspired by the similar \"Sanitize\" function in Adobe Acrobat " @@ -3814,85 +3883,85 @@ msgstr "" "PDFのみ:PDFから潜在的に機密性の高いデータを削除します。この関数はAdobe " "Acrobat製品の類似の「Sanitize」機能にインスパイアを受けたものです。プロセスはさまざまなオプションで設定可能です。" -#: ../../document.rst:1176 1363146351154c6bb08b3c24d30e0380 +#: ../../document.rst:1193 6f8418ad5d594c2685d50bc277597149 msgid "Search for 'FileAttachment' annotations and remove the file content." msgstr "'FileAttachment' 注釈を検索してファイルコンテンツを削除します。" -#: ../../document.rst:1177 1b84816544814b4b8d88a63e9462e812 +#: ../../document.rst:1194 ae021ac28be945bd8cd77cf390db94fb msgid "" "Remove any comments from page painting sources. If this option is set to " -"*False*, then this is also done for *hidden_text* and *redactions*." +"``False``, then this is also done for *hidden_text* and *redactions*." msgstr "" -"ページ描画ソースからコメントを削除します。このオプションが *False* に設定されている場合、*hidden_text* と " +"ページ描画ソースからコメントを削除します。このオプションが ``False`` に設定されている場合、*hidden_text* と " "*redactions* に対しても同様の処理が行われます。" -#: ../../document.rst:1178 12bdce2aff9446159cc8b03f22584cc7 +#: ../../document.rst:1195 660dc58f6a0f44e69faa091b43161b8e msgid "Remove embedded files." msgstr "埋め込みファイルを削除します。" -#: ../../document.rst:1179 419382cf99a34991ae33a426577b0da1 +#: ../../document.rst:1196 5104963ff403431481222cfd5218c3ec msgid "Remove OCRed text and invisible text [#f7]_." msgstr "OCRedテキストと不可視テキストを削除します [#f7]_。" -#: ../../document.rst:1180 489c59d1e9db42359cfc0831522714b6 +#: ../../document.rst:1197 4dfbac2778a64056ba97610453c08522 msgid "Remove JavaScript sources." msgstr "JavaScriptソースを削除します。" -#: ../../document.rst:1181 485896f910d84516a8ebc1822962e2a8 +#: ../../document.rst:1198 74cac565ea5943e59ad48e5ef187e1dc msgid "Remove PDF standard metadata." msgstr "PDF標準のメタデータを削除します。" -#: ../../document.rst:1182 065dbe48ec9d4c1fa275f3a102e97004 +#: ../../document.rst:1199 4db71b1a67b74f88ba5f0ae8b3c0552c msgid "Apply redaction annotations." msgstr "レダクション注釈を適用します。" -#: ../../document.rst:1183 72124f2de246431f92ef29d327c76646 +#: ../../document.rst:1200 455b9180bd39482ca48bc22b220d7c1b msgid "" "how to handle images if applying redactions. One of 0 (ignore), 1 (blank " "out overlaps) or 2 (remove)." msgstr "レダクションを適用する場合の画像の処理方法。0(無視)、1(オーバーラップをブランク化)、または2(削除)のいずれかです。" -#: ../../document.rst:1184 73382c877f0140ad9d4a3a2893e4b2dc +#: ../../document.rst:1201 4efb835789e3448f850ed836092cadbd msgid "Remove all links." msgstr "すべてのリンクを削除します。" -#: ../../document.rst:1185 59340b64aab44f91bcbb9211d445718d +#: ../../document.rst:1202 a04b25ebc4be4ab78fd4025c31825208 msgid "Reset all form fields to their defaults." msgstr "すべてのフォームフィールドをデフォルトにリセットします。" -#: ../../document.rst:1186 e2cd3285b3fe4d00ade3fd04328fb86a +#: ../../document.rst:1203 d2fdd0f9a581444f8169ad8e41f10582 msgid "Remove all responses from all annotations." msgstr "すべての注釈からすべての応答を削除します。" -#: ../../document.rst:1187 2a5cb3a214894cb1be6f36fa74171d8f +#: ../../document.rst:1204 425b0e0e0fa44a04be0e85f4ead6310e msgid "Remove thumbnail images from pages." msgstr "ページからサムネイル画像を削除します。" -#: ../../document.rst:1188 a97be085a7514560be10a056a15f1798 +#: ../../document.rst:1205 322bd83e66124ae39a349175bf2440a5 msgid "Remove XML metadata." msgstr "XMLメタデータを削除します。" -#: ../../document.rst:1193 ../../document.rst:1270 -#: 3c6cb5bbd34f48f59aaef879387b4e97 80d5d376bca34abab09d0d6c4d14ee77 +#: ../../document.rst:1210 ../../document.rst:1287 +#: 80c798afa80c4f6080e78b5de0336fd6 a03c50fd205f46eeb779eb48aa917435 msgid "Changed in v1.18.7" msgstr "v1.18.7で変更" -#: ../../document.rst:1194 ../../document.rst:1271 -#: 53049b72ec9a44bfbac07595e3ce8284 a61d64e3ea444655accd4b0079bd61dc +#: ../../document.rst:1211 ../../document.rst:1288 +#: 6cc5089ce6d64019a52eafa8037879b1 ee9e935b08974827b8c9e8eadaefe2fb msgid "Changed in v1.19.0" msgstr "v1.19.0で変更" -#: ../../document.rst:1195 ../../document.rst:1272 -#: 6496e73228f144e58c9b973d21174daa d4ddb1faa9f9452e872440dbcd67b79e +#: ../../document.rst:1212 ../../document.rst:1289 +#: 94c5625550364c218d32a9427d6f6d74 b9f4e4ff00684e08926149ff521dda37 #, fuzzy msgid "Changed in v1.24.1" msgstr "v1.14.12で変更" -#: ../../document.rst:1197 c5c9c49cc19b4ef38d378b64a2a8d4a2 +#: ../../document.rst:1214 bf084f82a22c44c38ac1c20f5267276d msgid "PDF only: Saves the document in its **current state**." msgstr "PDFのみ:ドキュメントの **現在の状態** を保存します。" -#: ../../document.rst:1199 068ee4e77cde4f0ba7e7a70dec87e927 +#: ../../document.rst:1216 888d6783b4d84d5db564523f80262aac msgid "" "The file path, `pathlib.Path` or file object to save to. A file object " "must have been created before via `open(...)` or `io.BytesIO()`. Choosing" @@ -3904,7 +3973,7 @@ msgstr "" ":meth:`Document.tobytes` と同等で、内部で作成された `io.BytesIO()` の `getvalue()` " "出力に等しいです。" -#: ../../document.rst:1201 c77004ea10a74ef3af68ba7fa7f8843b +#: ../../document.rst:1218 53b2f2f5f0b340ac918bec088d5b4e88 msgid "" "Do garbage collection. Positive values exclude \"incremental\". * 0 = " "none * 1 = remove unused (unreferenced) objects. * 2 = in addition to 1, " @@ -3913,54 +3982,54 @@ msgid "" "duplication. This may be slow because such data are typically large." msgstr "" -#: ../../document.rst:1201 1e7d04f3dd0543188cd235ea0caaa812 +#: ../../document.rst:1218 7efba68731ea4ff284b87f46f662b83c msgid "Do garbage collection. Positive values exclude \"incremental\"." msgstr "ガベージコレクションを実行します。正の値は「増分」を除外します。" -#: ../../document.rst:1203 ../../document.rst:1221 -#: 09295d11eb2e40f28bdeb142600c11c0 bcd059d82f884b7c902525c6388d9d0a +#: ../../document.rst:1220 ../../document.rst:1238 +#: a3229c6eac6941e192f4df52120f797b c973b26bd6aa4aa58c7afd967487a60e msgid "0 = none" msgstr "0 = なし" -#: ../../document.rst:1204 00c7ba0d6678412398c71ce6a674dd50 +#: ../../document.rst:1221 d0d8843048a44405847d3294c003cd6f msgid "1 = remove unused (unreferenced) objects." msgstr "1 = 未使用(参照されていない)オブジェクトを削除します。" -#: ../../document.rst:1205 c67b0f7fe3e545f79ff720289cd8f24b +#: ../../document.rst:1222 84a303b468a04dc4a0521209bcdc388c msgid "2 = in addition to 1, compact the :data:`xref` table." msgstr "2 = 1に加えて、:data:`xref` テーブルを最適化します。" -#: ../../document.rst:1206 6bbbef2ba168404c84033d393d1049c7 +#: ../../document.rst:1223 1d4e31d30172446eba5010679376acf6 msgid "3 = in addition to 2, merge duplicate objects." msgstr "3 = 2に加えて、重複したオブジェクトを統合します。" -#: ../../document.rst:1207 5bde6b9879e04bb792a302e404b61b96 +#: ../../document.rst:1224 37a687cab330413f9397288384e42c13 msgid "" "4 = in addition to 3, check :data:`stream` objects for duplication. This " "may be slow because such data are typically large." msgstr "4 = 3に加えて、ストリームオブジェクトの重複をチェックします。これは、そのようなデータが通常大きいため、遅い場合があります。" -#: ../../document.rst:1209 08e5ccc20903420885acd82b764ace8a +#: ../../document.rst:1226 1137c653f68a4160a407c0ac30f70d42 msgid "" "Clean and sanitize content streams [#f1]_. Corresponds to \"mutool clean " "-sc\"." msgstr "コンテンツストリームをクリーンアップおよびサニタイズします [#f1]_。これは「mutool clean -sc」に対応します。" -#: ../../document.rst:1211 3c05c9a10918495f9f2e4b241978ea42 +#: ../../document.rst:1228 4fe2857bcc254ad98f3ea8856af1c985 msgid "Deflate (compress) uncompressed streams." msgstr "未圧縮のストリームをデフレート(圧縮)します。" -#: ../../document.rst:1212 415c228a15b2474e9aa0b65a52f554a9 +#: ../../document.rst:1229 062ab8a185724229b02afcc813ab29e4 msgid "*(new in v1.18.3)* Deflate (compress) uncompressed image streams [#f4]_." msgstr "*(v1.18.3で新規追加)* 未圧縮の画像ストリームをデフレート(圧縮)します [#f4]_。" -#: ../../document.rst:1213 16353e5a11744b17ac3d65355304432a +#: ../../document.rst:1230 1e5e79417a27470a9b7536921b0697cc msgid "" "*(new in v1.18.3)* Deflate (compress) uncompressed fontfile streams " "[#f4]_." msgstr "(v1.18.3で新規追加)未圧縮のフォントファイルストリームをデフレート(圧縮)します [#f4]_。" -#: ../../document.rst:1215 71c7295b6c9c4bfe88e5d3cccec853bf +#: ../../document.rst:1232 e79d1702eaa84c59bcd3d53f88c1060d msgid "" "Only save changes to the PDF. Excludes \"garbage\" and \"linear\". Can " "only be used if *outfile* is a string or a `pathlib.Path` and equal to " @@ -3974,36 +4043,36 @@ msgstr "" "に等しい場合にのみ使用できます。復号化または修復されたファイルおよび一部の他の場合には使用できません。確実にするために、:meth:`Document.can_save_incrementally`" " を確認してください。これがFalseの場合、新しいファイルに保存する必要があります。" -#: ../../document.rst:1217 11e0e51152b74bc29077ffce455f504a +#: ../../document.rst:1234 a9a373ed3f6743cf99dd5aee541254be msgid "convert binary data to ASCII." msgstr "バイナリデータをASCIIに変換します。" -#: ../../document.rst:1219 307cd75c19f84092bddc2862f9c14db1 +#: ../../document.rst:1236 e825d9d3a8884ad2a569e181c0a15562 msgid "" "Decompress objects. Generates versions that can be better read by some " "other programs and will lead to larger files. * 0 = none * 1 = images * " "2 = fonts * 255 = all" msgstr "" -#: ../../document.rst:1219 7d22b15983df462cb5e2f58713875ea2 +#: ../../document.rst:1236 e9848e0cf34b4ca7a118b7514fe07ef2 msgid "" "Decompress objects. Generates versions that can be better read by some " "other programs and will lead to larger files." msgstr "オブジェクトを展開します。他のプログラムにより読みやすいバージョンを生成し、ファイルサイズが大きくなります。" -#: ../../document.rst:1222 fb507e79404f46d29a41afe92c618fe5 +#: ../../document.rst:1239 31e7fe586f994835ae20290ce1782cbe msgid "1 = images" msgstr "1 = 画像" -#: ../../document.rst:1223 e6927b41a605419885570032dad47b25 +#: ../../document.rst:1240 793a606defb04ae7b1787243445f0db0 msgid "2 = fonts" msgstr "2 = フォント" -#: ../../document.rst:1224 63ffe9046fca467db571e47d9ea8152d +#: ../../document.rst:1241 cc23f66f1b9242f29d94d08b2c6799a7 msgid "255 = all" msgstr "255 = すべて" -#: ../../document.rst:1226 8d93cdbd94d942889f018d4d38401cef +#: ../../document.rst:1243 6b3c690a7f944f17b9432682b66ab1b4 #, fuzzy msgid "" "Save a linearised version of the document. This option creates a file " @@ -4013,7 +4082,7 @@ msgstr "" "ドキュメントの線形バージョンを保存します。このオプションは、インターネットアクセスのパフォーマンス向上のためのファイル形式を作成します。 " "\"増分\" を除外します。" -#: ../../document.rst:1228 88e90f9df3ad492aa12e353574beb8c6 +#: ../../document.rst:1245 e1ddd0f43c05434ab3b80e71b45039a7 msgid "" "Prettify the document source for better readability. PDF objects will be " "reformatted to look like the default output of " @@ -4022,7 +4091,7 @@ msgstr "" "ドキュメントソースを見やすく整形します。PDFオブジェクトは、:meth:`Document.xref_object` " "のデフォルト出力のように再フォーマットされます。" -#: ../../document.rst:1230 235858add5d34df68bea1b772bbc2f8a +#: ../../document.rst:1247 c90f9b7287884d9e838eb1a205e8b10c msgid "" "Suppress the update of the file's `/ID` field. If the file happens to " "have no such field at all, also suppress creation of a new one. Default " @@ -4032,7 +4101,7 @@ msgstr "" "ファイルにそのようなフィールドがまったくない場合、新しいフィールドの作成も抑制します。デフォルトは `False` " "で、各保存でファイル識別情報が更新されます。" -#: ../../document.rst:1232 f143539381cf4db195711131968b85b4 +#: ../../document.rst:1249 a45bccacac804f9e8e2fe9954896e0ce msgid "" "*(new in v1.16.0)* Set the desired permission levels. See " ":ref:`PermissionCodes` for possible values. Default is granting all." @@ -4040,7 +4109,7 @@ msgstr "" "(v1.16.0で新規追加)希望の権限レベルを設定します。可能な値については :ref:`PermissionCodes` " "を参照してください。デフォルトはすべてを許可します。" -#: ../../document.rst:1234 8fa774de558a46b3b66fd4ca88c04f94 +#: ../../document.rst:1251 27eb2c84ab3e4ac8a20455ef9980b23a msgid "" "*(new in v1.16.0)* set the desired encryption method. See " ":ref:`EncryptionMethods` for possible values." @@ -4048,7 +4117,7 @@ msgstr "" "*(v1.16.0で新規追加)* 希望の暗号化メソッドを設定します。可能な値については :ref:`EncryptionMethods` " "を参照してください。" -#: ../../document.rst:1236 a4bcb0d9a7404b78b35d10a0c04e6484 +#: ../../document.rst:1253 8e39572e62904c4e93c05ddd7bcc7198 msgid "" "*(new in v1.16.0)* set the document's owner password. *(Changed in " "v1.18.3)* If not provided, the user password is taken if provided. The " @@ -4057,13 +4126,13 @@ msgstr "" "*(v1.16.0で新規追加)* ドキュメントの所有者パスワードを設定します。 (v1.18.3で変更) " "指定しない場合、ユーザーパスワードが提供された場合にユーザーパスワードが使用されます。文字列の長さは40文字を超えてはいけません。" -#: ../../document.rst:1238 648e80d325f14452b78761783d5cc3be +#: ../../document.rst:1255 02459360d62b445f90c1f256fa56bfb9 msgid "" "*(new in v1.16.0)* set the document's user password. The string length " "must not exceed 40 characters." msgstr "(v1.16.0で新規追加)ドキュメントのユーザーパスワードを設定します。文字列の長さは40文字を超えてはいけません。" -#: ../../document.rst:1240 52c11a646e7e4e5eb7ca5aa1a65c944a +#: ../../document.rst:1257 896c5b94bd874b09b79318b506cdd76d msgid "" "*(new in v1.24.0)* compression option that converts eligible PDF object " "definitions to information that is stored in some other object's " @@ -4075,18 +4144,18 @@ msgstr "" "データに格納される情報に変換する圧縮オプションです。`deflate` " "パラメータの値に応じて、変換されたオブジェクト定義が圧縮されます。これにより、ファイルサイズが非常に大幅に削減される可能性があります。" -#: ../../document.rst:1242 710f0b25006f4d4580aa1a0c28d804f4 +#: ../../document.rst:1259 289ef1c582d84a49aa961c905ef123c1 msgid "" "The method does not check, whether a file of that name already exists, " "will hence not ask for confirmation, and overwrite the file. It is your " "responsibility as a programmer to handle this." msgstr "このメソッドは、その名前のファイルがすでに存在するかどうかをチェックしません。したがって、確認を求めずにファイルを上書きします。これについては、プログラマーとしての責任があります。" -#: ../../document.rst:1246 db94d629e3de4f07b6232430decc36a7 +#: ../../document.rst:1263 a498e025ef0847c4bac9ebdeb7895f8d msgid "**File size reduction**" msgstr "**ファイルサイズの削減**" -#: ../../document.rst:1248 454fd673298e48f7aa9b405991aa4476 +#: ../../document.rst:1265 e2a31e8ad643474899c1129d6b2574df #, fuzzy msgid "" "1. Use the save options like `garbage=3|4, deflate=True, " @@ -4101,7 +4170,7 @@ msgstr "" "は変更しないでください。これは「非破壊的」なファイルサイズの削減です。これらの値がデフォルトで設定されたメソッドの簡易版もあります。 " ":meth:`Document.ez_save()` をご覧ください。" -#: ../../document.rst:1251 961ac32f65b34671b99f1874a150fc06 +#: ../../document.rst:1268 02162b7327224823bfe59a1333d7bb60 msgid "" "\"Lossy\" file size reduction in essence must give up something with " "respect to images, like (a) remove all images (b) replace images by their" @@ -4114,11 +4183,11 @@ msgstr "" "image\" folder `_ に例があります。" -#: ../../document.rst:1255 c98fe9d8e4fb477b9941ae21bf14a93c +#: ../../document.rst:1272 3c2052c0fe104385a7fa4378f718d772 msgid "New in v1.18.11" msgstr "v1.18.11で新規追加" -#: ../../document.rst:1257 b4727a09005d44aa8af89c7b7cd4084e +#: ../../document.rst:1274 e779ad2fbbce4acdb947d7e7224bb271 msgid "" "PDF only: The same as :meth:`Document.save` but with changed defaults " "`deflate=True, garbage=3, use_objstms=1`." @@ -4126,7 +4195,7 @@ msgstr "" "PDFのみ::meth:`Document.save` と同じですが、デフォルト値が `deflate=True, garbage=3, " "use_objstms=1` に変更されています。" -#: ../../document.rst:1261 a55c8148192c4e58b5ede7470c144e3e +#: ../../document.rst:1278 a086d3ff8a9546cd8c3474b44628a32e msgid "" "PDF only: saves the document incrementally. This is a convenience " "abbreviation for *doc.save(doc.name, incremental=True, " @@ -4135,13 +4204,13 @@ msgstr "" "PDFのみ:ドキュメントを増分的に保存します。これは、 *doc.save(doc.name, incremental=True, " "encryption=PDF_ENCRYPT_KEEP)* の簡略表記です。" -#: ../../document.rst:1265 11f2e61b017c466a836e0e344f6bab5e +#: ../../document.rst:1282 173d1bc3507841f6b0154a4d61ab6ec4 msgid "" "Saving incrementally may be required if the document contains verified " "signatures which would be invalidated by saving to a new file." msgstr "増分保存が必要な場合、ドキュメントに確認済みの署名が含まれている場合、新しいファイルに保存することによって無効になる可能性があります。" -#: ../../document.rst:1274 5352629e5292414f955a56e2a3584019 +#: ../../document.rst:1291 69ee28fed5104fc6ad96bd34c07e1b26 msgid "" "PDF only: Writes the **current content of the document** to a bytes " "object instead of to a file. Obviously, you should be wary about memory " @@ -4155,15 +4224,15 @@ msgstr "" "とまったく同じです。チャプター :ref:`FAQ` には、このメソッドを `pdfrw " "`_ の前処理として使用する例が含まれています。" -#: ../../document.rst:1276 337ac2053c234b9d9490a733f93e4d33 +#: ../../document.rst:1293 d3725dc95b37470b8575d3846941665b msgid "*(Changed in v1.16.0)* for extended encryption support." msgstr "*(v1.16.0で変更)* 拡張暗号サポート用。" -#: ../../document.rst:1279 b5069c9f904944f39a36a4552da40c2a +#: ../../document.rst:1296 cd3d4e2cbea24746b1282f1af4521b74 msgid "a bytes object containing the complete document." msgstr "ドキュメント全体を含むbytesオブジェクト。" -#: ../../document.rst:1283 248620b410f44c5db4cce99c73705687 +#: ../../document.rst:1300 c8cfce8c4fdd42aa8813bf8eb3c4dee7 msgid "" "Search for \"text\" on page number \"pno\". Works exactly like the " "corresponding :meth:`Page.search_for`. Any integer `-∞ < pno < " @@ -4172,42 +4241,34 @@ msgstr "" "\"pno\" ページ上で \"text\" を検索します。対応する :meth:`Page.search_for` " "とまったく同じ方法で機能します。整数 `-∞ < pno < page_count` ならどのような値でも受け入れられます。" -#: ../../document.rst:1299 c00ce346acb64c6d874b5e104680ee92 -msgid "" -"Changed in v1.19.3 - as a fix to issue `#537 " -"`_, form fields are always" -" excluded." -msgstr "" -"v1.19.3で変更 - 問題# `#537 `_ " -"の修正として、フォームフィールドは常に除外されます。" - -#: ../../document.rst:1301 f1e233f6f8354282b0fdde7e0955b5f3 +#: ../../document.rst:1318 09b2ff9e99e94f089fd00c4231869235 +#, fuzzy msgid "" "PDF only: Copy the page range **[from_page, to_page]** (including both) " "of PDF document *docsrc* into the current one. Inserts will start with " "page number *start_at*. Value -1 indicates default values. All pages thus" -" copied will be rotated as specified. Links and annotations can be " -"excluded in the target, see below. All page numbers are 0-based." +" copied will be rotated as specified. Links, annotations and widgets can " +"be excluded in the target, see below. All page numbers are 0-based." msgstr "" "PDFのみ:PDFドキュメント *docsrc* のページ範囲 **[from_page、to_page]** " "(両方を含む)を現在のドキュメントにコピーします。挿入はページ番号 *start_at* " "から開始します。値-1はデフォルト値を示します。したがって、コピーされるすべてのページは指定されたように回転します。リンクと注釈は対象から除外することができます(以下参照)。すべてのページ番号は0から始まります。" -#: ../../document.rst:1303 e8a45c76c5984ad18f60a0a2fa67fd88 +#: ../../document.rst:1320 0cfbbbe2873045fab67a1c9d19fd9274 msgid "" "An opened PDF *Document* which must not be the current document. However," " it may refer to the same underlying file." msgstr "現在のドキュメントではない、開かれたPDF *ドキュメント* 。ただし、同じ基盤ファイルを参照する場合があります。" -#: ../../document.rst:1306 4c8100e232d746e88b1bec1827459729 +#: ../../document.rst:1323 43c125b72c3048ebaf3f53f305f4ff8c msgid "First page number in *docsrc*. Default is zero." msgstr "*docsrc* 内の最初のページ番号。デフォルトはゼロです。" -#: ../../document.rst:1308 ad387e573f1349cd8034bb41d36218cd +#: ../../document.rst:1325 578e57c96db74a6682265149c492bdaf msgid "Last page number in *docsrc* to copy. Defaults to last page." msgstr "コピーする *docsrc* 内の最後のページ番号。デフォルトは最終ページです。" -#: ../../document.rst:1310 6ff351d90f9a48e19752e14155a1af60 +#: ../../document.rst:1327 961000a4a8ef4b9b8656febad06ba539 msgid "" "First copied page, will become page number *start_at* in the target. " "Default -1 appends the page range to the end. If zero, the page range " @@ -4216,28 +4277,74 @@ msgstr "" "コピーされる最初のページ、対象のページ番号 *start_at* " "になります。デフォルト-1はページ範囲を末尾に追加します。ゼロの場合、ページ範囲は現在の最初のページの前に挿入されます。" -#: ../../document.rst:1312 412634533e144c68a12642c3e0dac884 +#: ../../document.rst:1329 1800a49c031744218281af9422f6d529 msgid "" "All copied pages will be rotated by the provided value (degrees, integer " "multiple of 90)." msgstr "コピーされるすべてのページは、指定された値(度数、90の整数倍)で回転します。" -#: ../../document.rst:1314 9405812eea2445ed86e0d04f8aadf3ba +#: ../../document.rst:1331 3f4f1a4a518440a6a7ec602c7e4a43c5 msgid "" "Choose whether (internal and external) links should be included in the " "copy. Default is `True`. *Named* links (:data:`LINK_NAMED`) and internal " "links to outside the copied page range are **always excluded**." msgstr "" -"(内部および外部) リンクをコピーに含めるかどうかを選択します。デフォルトは *True* です。コピー対象外のコピー範囲外の内部リンクは " +"(内部および外部) リンクをコピーに含めるかどうかを選択します。デフォルトは ``True`` です。コピー対象外のコピー範囲外の内部リンクは " "**常に除外されます** 。" -#: ../../document.rst:1315 e013d614033240f4be60a30fd875896d -msgid "" -"*(new in v1.16.1)* choose whether annotations should be included in the " -"copy. Form **fields can never be copied** -- see below." +#: ../../document.rst:1333 391fa50b6e85480f9ddedac416feae2a +#, fuzzy +msgid "choose whether annotations should be included in the copy." msgstr "*(v1.16.1で新規追加)* 注釈をコピーに含めるかどうかを選択します。 フォームフィールドはコピーできません。" -#: ../../document.rst:1316 f4ece3ce1aae46da8052d8b415045b9c +#: ../../document.rst:1335 57a88c0d4e95428180e328cc1e060e20 +msgid "" +"choose whether annotations should be included in the copy. If `True` and " +"at least one of the source pages contains form fields, the target PDF " +"will be turned into a Form PDF (if not already being one)." +msgstr "" + +#: ../../document.rst:1337 080cd6c505c54450af5334a5aba9403c +msgid "" +"*(New in version 1.25.5)* Choose how to handle duplicate root field names" +" in the source pages. This parameter is ignored if `widgets=False`. " +"Default is ``False`` which will add unifying strings to the name of those" +" source root fields which have a duplicate in the target. For instance, " +"if \"name\" already occurs in the target, the source widget's name will " +"be changed to \"name [text]\" with a suitably chosen string \"text\". If" +" ``True``, root fields with duplicate names in source and target will be " +"converted to so-called \"Kids\" of a \"Parent\" object (which lists all " +"kid widgets in a PDF array). This will effectively turn those kids into " +"instances of the \"same\" widget: if e.g. one of the kids is changed, " +"then all its instances will automatically inherit this change -- no " +"matter on which page they happen to be displayed." +msgstr "" + +#: ../../document.rst:1337 9e7900061e1243c4901ba1776afa8120 +msgid "" +"*(New in version 1.25.5)* Choose how to handle duplicate root field names" +" in the source pages. This parameter is ignored if `widgets=False`." +msgstr "" + +#: ../../document.rst:1339 9325fc72fda5486b981214d0018f9cfc +msgid "" +"Default is ``False`` which will add unifying strings to the name of those" +" source root fields which have a duplicate in the target. For instance, " +"if \"name\" already occurs in the target, the source widget's name will " +"be changed to \"name [text]\" with a suitably chosen string \"text\"." +msgstr "" + +#: ../../document.rst:1341 5ffb402e3396421aae813b66c0b5de76 +msgid "" +"If ``True``, root fields with duplicate names in source and target will " +"be converted to so-called \"Kids\" of a \"Parent\" object (which lists " +"all kid widgets in a PDF array). This will effectively turn those kids " +"into instances of the \"same\" widget: if e.g. one of the kids is " +"changed, then all its instances will automatically inherit this change --" +" no matter on which page they happen to be displayed." +msgstr "" + +#: ../../document.rst:1343 a4ba7d35af8f47d883a4bb779faab641 msgid "" "*(new in v1.17.7)* specify an interval size greater zero to see progress " "messages on `sys.stdout`. After each interval, a message like `Inserted " @@ -4247,35 +4354,26 @@ msgstr "" "で進捗メッセージを表示するための大きなゼロより大きい間隔を指定します。各間隔後、`Inserted 30 of 47 pages.` " "のようなメッセージが印刷されます。" -#: ../../document.rst:1317 7350f906710749efbbe57767571a5c2b +#: ../../document.rst:1345 45d40f5660454970b9ddb2a95ff37fbf msgid "" "*(new in v1.18.0)* controls whether the list of already copied objects " -"should be **dropped** after this method, default *True*. Set it to 0 " +"should be **dropped** after this method, default ``True``. Set it to 0 " "except for the last one of multiple insertions from the same source PDF. " "This saves target file size and speeds up execution considerably." msgstr "" "*(v1.18.0で新規追加)* このメソッドの後にすでにコピーされたオブジェクトのリストを **削除する** かどうかを制御します。デフォルトは" -" *True* " +" ``True`` " "です。同じソースPDFからの複数の挿入の最後以外は、0に設定します。これにより、対象ファイルのサイズが節約され、実行が大幅に高速化されます。" -#: ../../document.rst:1321 89d26e56fe6242d98fe950c59829e64c +#: ../../document.rst:1349 23da58c56e6d4983997732275eddf854 msgid "" "This is a page-based method. Document-level information of source " -"documents is therefore ignored. Examples include Optional Content, " -"Embedded Files, `StructureElem`, `AcroForm`, table of contents, page " -"labels, metadata, named destinations (and other named entries) and some " -"more. As a consequence, specifically, **Form Fields (widgets) can never " -"be copied** -- although they seem to appear on pages only. Look at " -":meth:`Document.bake` for converting a source document if you need to " -"retain at least widget **appearances.**" -msgstr "" -"これはページベースのメソッドです。そのため、ソース文書のドキュメントレベルの情報は無視されます。例には、オプショナルコンテンツ、埋め込みファイル、" -" `StructureElem` 、 `AcroForm` " -"、目次、ページラベル、メタデータ、名前付き目的地(および他の名前付きエントリ)などがあります。その結果、具体的にはフォームフィールド(ウィジェット)はコピーできません。" -" - たとえそれらがページ上に表示されているように見える場合でも。ウィジェットの **外観** " -"を少なくとも保持する必要がある場合は、:meth:`Document.bake` をご覧ください。" - -#: ../../document.rst:1323 7a6bb513587e45028cc7ef3b9f7e5174 +"documents is therefore mostly ignored. Examples include Optional Content," +" Embedded Files, `StructureElem`, table of contents, page labels, " +"metadata, named destinations (and other named entries) and some more." +msgstr "" + +#: ../../document.rst:1351 f0a071616e314f88a87910b55cd6cee6 msgid "" "If `from_page > to_page`, pages will be **copied in reverse order**. If " "`0 <= from_page == to_page`, then one page will be copied." @@ -4283,7 +4381,7 @@ msgstr "" "`from_page > to_page` の場合、ページは **逆の順序でコピーされます** 。`0 <= from_page == " "to_page` の場合、1ページがコピーされます。" -#: ../../document.rst:1325 d22f9a9d7835438c841cc39b7731074d +#: ../../document.rst:1353 283180bbf983435e91685f67ed77c66e msgid "" "`docsrc` TOC entries **will not be copied**. It is easy however, to " "recover a table of contents for the resulting document. Look at the " @@ -4298,11 +4396,11 @@ msgstr "" "documents/join.py>`_ " "を参照してください:これはPDFドキュメントを結合し、同時に対応する目次の部分を組み立てることができます。" -#: ../../document.rst:1342 b70025d40c344ec7aae23ee64fb35624 +#: ../../document.rst:1370 39e76b859dc446ec9080ec8d242bc13b msgid "New in v1.22.0" msgstr "v1.22.0で新規追加" -#: ../../document.rst:1344 3723b31e56214017b6ef9fc6c974cca4 +#: ../../document.rst:1372 afcd6f4f6dbb49de8e379a8352a9acb5 msgid "" "PDF only: Add an arbitrary supported document to the current PDF. Opens " "\"infile\" as a document, converts it to a PDF and then invokes " @@ -4314,7 +4412,7 @@ msgstr "" "をドキュメントとして開き、PDFに変換し、:meth:`Document.insert_pdf` " "を呼び出します。パラメータはそのメソッドと同じです。他のことの中で、これには画像を出力PDFに完全なページとして追加する簡単な方法が含まれています。" -#: ../../document.rst:1346 2731b7f02f844777a0fcb76419379fec +#: ../../document.rst:1374 980b05d8ec9043478b43e690e2c8f931 msgid "" "the input document to insert. May be a filename specification as is valid" " for creating a :ref:`Document` or a :ref:`Pixmap`." @@ -4322,32 +4420,37 @@ msgstr "" "挿入する入力ドキュメント。:ref:`Document` を作成する際に有効なファイル名の指定または :ref:`Pixmap` " "である可能性があります。" -#: ../../document.rst:1355 f6b3e706da8948958981ecda33824cdb +#: ../../document.rst:1383 1973a63997bf441bb333f3a64ba68bcf msgid "PDF only: Insert an empty page." msgstr "PDFのみ:空のページを挿入します。" -#: ../../document.rst:1357 6f2425219a54468a9ebd4ad0bf54f845 +#: ../../document.rst:1385 b7256473ae514578be3947849b44db62 + msgid "" "page number in front of which the new page should be inserted. Must be in" -" *1 < pno <= page_count*. Special values -1 and *doc.page_count* insert " +" `1 < pno <= page_count`. Special values -1 and *doc.page_count* insert " "**after** the last page." msgstr "" -"新しいページを挿入する前のページ番号。*1 < pno <= page_count* である必要があります。特別な値-1および " +"新しいページを挿入する前のページ番号。`1 < pno <= page_count` である必要があります。特別な値-1および " "*doc.page_count* は最後のページの後に挿入します。" -#: ../../document.rst:1359 cdb0b47dfd484315984d352f9a58ab34 +#: ../../document.rst:1387 0f646751e84c4800909811f615b97ee4 msgid "page width." msgstr "ページの幅。" -#: ../../document.rst:1360 b40d394b2843436e8a89ca4e9e661c4c +#: ../../document.rst:1388 acdaf160ab0943e4a039b2b995e3514a msgid "page height." msgstr "ページの高さ。" -#: ../../document.rst:1363 024dd2169ea0474ea2c07eb25cfee11e -msgid "the created page object." -msgstr "作成されたページオブジェクト。" +#: ../../document.rst:1391 f533e6f166d54bbd9f836817a4477c70 +msgid "" +"the created page object. Be aware that the page numbers of pages after " +"the inserted one will have changed after method execution. For the same " +"reason, **all existing page objects will be invalidated.** Using them " +"will lead to exceptions." +msgstr "" -#: ../../document.rst:1375 78ae3c9acee549189b01df17ab7eee7a +#: ../../document.rst:1403 a0af237003924b22876d7fa12331f23f msgid "" "PDF only: Insert a new page and insert some text. Convenience function " "which combines :meth:`Document.new_page` and (parts of) " @@ -4356,7 +4459,7 @@ msgstr "" "PDFのみ:新しいページを挿入し、テキストを挿入します。:meth:`Document.new_page` と " ":meth:`Page.insert_text` の一部を組み合わせた便利な関数です。" -#: ../../document.rst:1377 fd6d777adfac48608bcde986801e15de +#: ../../document.rst:1405 93a93061c9dd424aa19f6744784f6e49 msgid "" "page number (0-based) **in front of which** to insert. Must be in " "`range(-1, doc.page_count + 1)`. Special values -1 and `doc.page_count` " @@ -4364,7 +4467,7 @@ msgid "" "positional parameter" msgstr "" -#: ../../document.rst:1377 9e5959d951764cec83a4c68fdf5bc6e4 +#: ../../document.rst:1405 e43138d7fbcd4bd3ac2e388dcd5a0cca msgid "" "page number (0-based) **in front of which** to insert. Must be in " "`range(-1, doc.page_count + 1)`. Special values -1 and `doc.page_count` " @@ -4373,60 +4476,60 @@ msgstr "" "**挿入する前** のページ番号(0ベース)を指定します。範囲 `range(-1, doc.page_count + 1)` " "内である必要があります。特別な値-1および `doc.page_count` は最後のページの **後** に挿入します。" -#: ../../document.rst:1380 c959c782fb29456685c3837bdfb9e935 +#: ../../document.rst:1408 a71c7b2a75be4830bcd8cbd5c7d79e28 msgid "Changed in v1.14.12" msgstr "v1.14.12で変更" -#: ../../document.rst:1380 979c7e98528b463abb6f88910c493719 +#: ../../document.rst:1408 fc2477f4827449258c65aafe838c04f2 msgid "This is now a positional parameter" msgstr "これは今ポジションパラメータです" -#: ../../document.rst:1382 0b0ae5f02fd44d5599899f74eb9772d6 +#: ../../document.rst:1410 1eb7aeb952014ed4a78680770afb15b8 msgid "For the other parameters, please consult the aforementioned methods." msgstr "その他のパラメータについては、前述のメソッドをご参照ください。" -#: ../../document.rst:1385 90ad7c9298d24c58a59c96e5bea62bbd +#: ../../document.rst:1413 e4069f60a52b4bd69514a1d009befbe1 msgid "" "the result of :meth:`Page.insert_text` (number of successfully inserted " "lines)." msgstr ":meth:`Page.insert_text` の結果(正常に挿入された行数)。" -#: ../../document.rst:1389 0eb05c6d0ae649fc8c82346e80699561 +#: ../../document.rst:1417 a23ff1a304a54e25a7a07e740752b8dd msgid "" "PDF only: Delete a page given by its 0-based number in `-∞ < pno < " "page_count - 1`." msgstr "PDFのみ:0ベースの番号で指定されたページを削除します。`-∞ < pno < page_count - 1` です。" -#: ../../document.rst:1391 ../../document.rst:1398 -#: a1e96a95cd1b4b15ba309263f842e99b f7b8805acf8442b0a70acbc2ed169d25 +#: ../../document.rst:1419 ../../document.rst:1426 +#: b511b678cb654603bcd324b8f1915b53 e3a047edfe434ac5a2930b5d930e13a8 msgid "Changed in v1.18.14: support Python's `del` statement." msgstr "v1.18.14で変更:Pythonの `del` 文をサポート。" -#: ../../document.rst:1393 156339144d3149619f7d588f1de94ac8 +#: ../../document.rst:1421 69185a84c34145d7b927e424304e13b3 msgid "" "the page to be deleted. Negative number count backwards from the end of " "the document (like with indices). Default is the last page." msgstr "削除するページ。負の数は文書の末尾から逆に数えます(インデックスと同様)。デフォルトは最後のページです。" -#: ../../document.rst:1397 355447dbfafb45c196206f067f683567 +#: ../../document.rst:1425 abd23351a7d545b6a100cd90751beb0a msgid "Changed in v1.18.13: more flexibility specifying pages to delete." msgstr "v1.18.13 で変更されました: 削除するページを指定する柔軟性が向上しました。" -#: ../../document.rst:1400 6e1331e4f54c424b8c696b2f86a3fd78 +#: ../../document.rst:1428 0a047abd46d54fada919148f5b6bca27 msgid "PDF only: Delete multiple pages given as 0-based numbers." msgstr "PDF のみ: 0 ベースの番号として指定された複数のページを削除します。" -#: ../../document.rst:1404 bfc9d5d0d358482d854b68ad3ffcecb7 +#: ../../document.rst:1432 175c76de607e4cfc80c5a197eda88f94 msgid "" "**Format 1:** Use keywords. Represents the old format. A contiguous range" " of pages is removed." msgstr "**フォーマット 1:** キーワードを使用します。古いフォーマットを表します。連続したページ範囲が削除されます。" -#: ../../document.rst:1403 f31a80050e044825a537ab46321ae6e1 +#: ../../document.rst:1431 2a065399a1214adf8f0b8fd284af6372 msgid "\"from_page\": first page to delete. Zero if omitted." msgstr "\"from_page\": 削除する最初のページ。省略された場合はゼロです。" -#: ../../document.rst:1404 8c3e39ef5f7d453fa4e87e0e0847a34b +#: ../../document.rst:1432 69402a8c85fd4253bf4b4815a985bcd8 msgid "" "\"to_page\": last page to delete. Last page in document if omitted. Must " "not be less then \"from_page\"." @@ -4434,19 +4537,19 @@ msgstr "" "\"to_page\": 削除する最後のページ。省略された場合はドキュメント内の最後のページです。\"from_page\" " "より小さくしてはいけません。" -#: ../../document.rst:1406 a6104fd3e92445028c40be4064a637f4 +#: ../../document.rst:1434 9268bfe4dc0e4412824caa21a36b3525 msgid "" "**Format 2:** Two page numbers as positional parameters. Handled like " "Format 1." msgstr "**フォーマット 2:** 位置パラメータとしての2つのページ番号。フォーマット 1 と同様に処理されます。" -#: ../../document.rst:1408 a08b4a093c444161a5ef13e2f5b215f5 +#: ../../document.rst:1436 4f45a9abbb234670ad5f48db8ed0ed68 msgid "" "**Format 3:** One positional integer parameter. Equivalent to " ":meth:`Page.delete_page`." msgstr "**フォーマット 3:** 1 つの位置パラメータの整数。:meth:`Page.delete_page` に相当します。" -#: ../../document.rst:1410 dbd5a21093654255a69e4ff316a36fd4 +#: ../../document.rst:1438 52626733de604cf1b5447bb8f0d753b5 msgid "" "**Format 4:** One positional parameter of type *list*, *tuple* or " "*range()* of page numbers. The items of this sequence may be in any order" @@ -4455,7 +4558,7 @@ msgstr "" "**フォーマット 4:** ページ番号のリスト、*タプル*、または *range()* " "の1つの位置パラメータ。このシーケンスのアイテムは任意の順序であり、重複していてもかまいません。" -#: ../../document.rst:1412 c3d0b4ed02574ec69909cc05e7b485ee +#: ../../document.rst:1440 41dbb1b8fe4d4535b5c6d32d5afc2dca msgid "" "**Format 5:** *(New in v1.18.14)* Using the Python `del` statement and " "index / slice notation is now possible." @@ -4463,7 +4566,7 @@ msgstr "" "**フォーマット 5:** *(v1.18.14 で新規)* Python の `del` ステートメントとインデックス / " "スライス表記を使用することができます。" -#: ../../document.rst:1416 6823e0a46cd74429b8da36c58a32c4e8 +#: ../../document.rst:1444 77a9dcc310bc4cbb8f21655f85e3d166 msgid "" "*(Changed in v1.14.17, optimized in v1.17.7)* In an effort to maintain a " "valid PDF structure, this method and :meth:`delete_page` will also " @@ -4477,7 +4580,7 @@ msgstr "" "とは、ブックマークがどこを指しているのか分からなくなり、サポートされている PDF " "ビューアによってタイトルがグレーアウト表示されることを意味します。全体の目次構造は維持されます。" -#: ../../document.rst:1418 a3b246b1ceab4fccb4b51c15bf0bf6b4 +#: ../../document.rst:1446 e7da40e8d07e48708979fdae87e22e32 msgid "" "It will also remove any **links on remaining pages** which point to a " "deleted one. This action may have an extended response time for documents" @@ -4486,39 +4589,39 @@ msgstr "" "また、削除されたページを指す **残りのページ上のリンク** " "も削除されます。これにより、多くのページを持つドキュメントでは拡張された応答時間が発生する可能性があります。" -#: ../../document.rst:1420 be30c657639e4357b9fd9628609d4d86 +#: ../../document.rst:1448 411a3e7d8d1648d2865212d6dcc56ba6 msgid "Following examples will all delete pages 500 through 519:" msgstr "以下の例はすべて、ページ500から519を削除します:" -#: ../../document.rst:1422 bd75b16fc3c04b44a0e8b21d378c92cc +#: ../../document.rst:1450 62a61e5649474ca582a515b0bc621c0b msgid "`doc.delete_pages(500, 519)`" msgstr "" -#: ../../document.rst:1423 0de65efe0d1d4a889ad3d827fdc70333 +#: ../../document.rst:1451 10c409a9fd5840abb743d555dbfff4b9 msgid "`doc.delete_pages(from_page=500, to_page=519)`" msgstr "" -#: ../../document.rst:1424 5c98dbcaf70046e9be6f4e16326e2c23 +#: ../../document.rst:1452 ebf6a7145f184b17a4166e1f00c71e1c msgid "`doc.delete_pages((500, 501, 502, ... , 519))`" msgstr "" -#: ../../document.rst:1425 2d2ef5ee143e4deb9a0dad78566504f6 +#: ../../document.rst:1453 ab18e8ba47d549589b99cf6f69044c7f msgid "`doc.delete_pages(range(500, 520))`" msgstr "" -#: ../../document.rst:1426 dbef44464b5943ba82e9c26e51b51a2a +#: ../../document.rst:1454 a5186cdcb011492dba90d3a3030884dc msgid "`del doc[500:520]`" msgstr "" -#: ../../document.rst:1427 3d5143b8e1844f5fa7035c9243e03d46 +#: ../../document.rst:1455 85a3222b689444209f224d5602b13a26 msgid "`del doc[(500, 501, 502, ... , 519)]`" msgstr "" -#: ../../document.rst:1428 11458b8871e941da83b7cb542d40eec1 +#: ../../document.rst:1456 1ed4d0db6b78459ab0976ad876a90ad7 msgid "`del doc[range(500, 520)]`" msgstr "" -#: ../../document.rst:1430 e3ee19ef16504a98b4c53166c8af3f54 +#: ../../document.rst:1458 5088720006cc436aab4d360eb69ac504 msgid "" "For the :ref:`AdobeManual` the above takes about 0.6 seconds, because the" " remaining 1290 pages must be cleaned from invalid links." @@ -4526,7 +4629,7 @@ msgstr "" ":ref:`AdobeManual` " "では、上記の操作に約0.6秒かかります。なぜなら、残りの1290ページから無効なリンクを削除する必要があるからです。" -#: ../../document.rst:1432 172b16528c624648aa7a17f8be89782c +#: ../../document.rst:1460 c6a3995894004ef197d262a2b817d678 msgid "" "In general, the performance of this method is dependent on the number of " "remaining pages -- **not** on the number of deleted pages: in the above " @@ -4536,22 +4639,22 @@ msgstr "" "一般的に、このメソッドのパフォーマンスは残りのページの数に依存します - 削除されたページの数には依存 **しません** " "。上記の例では、20個のページ **以外のすべてのページを削除する** 場合、はるかに少ない時間がかかります。" -#: ../../document.rst:1437 d0f318d54fe040da9f259f68c08e2244 +#: ../../document.rst:1465 705b0078ed754e92a8d93ffaa22a672b msgid "PDF only: Copy a page reference within the document." msgstr "PDF のみ: ドキュメント内でページの参照をコピーします。" -#: ../../document.rst:1439 5fed21842e9f40caba420995cabd3c63 +#: ../../document.rst:1467 60aecdad658c4ca5a914a99b2b3dcf58 msgid "the page to be copied. Must be in range `0 <= pno < page_count`." msgstr "コピーするページ。範囲は `0 <= pno < page_count` である必要があります。" -#: ../../document.rst:1441 ../../document.rst:1453 -#: 0cb37ded460047e5a7d5a28dd4c11a2a 29e6f9e0a9414f9b9aa676fc44fbb56d +#: ../../document.rst:1469 ../../document.rst:1481 +#: 246e4a838923434ab9fd784d103d18cb 81dfc717124c41aba7f5f4ecbc9884d7 msgid "" "the page number in front of which to copy. The default inserts **after** " "the last page." msgstr "コピーする位置の前のページ番号。デフォルトでは最後のページの **後** に挿入されます。" -#: ../../document.rst:1443 88db11e483914f15b7d8883f35d9f007 +#: ../../document.rst:1471 53a1a95597734ded97d4ec5f763b5811 msgid "" "Only a new **reference** to the page object will be created -- not a new " "page object, all copied pages will have identical attribute values, " @@ -4562,19 +4665,19 @@ msgstr "" "新しいページオブジェクトは作成されません。すべてのコピーされたページは、:attr:`Page.xref` " "を含む属性値が同じになります。これは、これらのコピーの1つに対する変更がすべてのコピーに反映されることを意味します。" -#: ../../document.rst:1447 f36a6e3ae0984e0b9decc3aad5ae0e06 +#: ../../document.rst:1475 8cea514a3a744c2ea11dde817b21393b msgid "New in v1.14.17" msgstr "v1.14.17 で新規" -#: ../../document.rst:1449 205e3ec8fe4e4a6788ebc5131de96482 +#: ../../document.rst:1477 a749aee3a9dc4121a1a2250b36db8e82 msgid "PDF only: Make a full copy (duplicate) of a page." msgstr "PDF のみ: ページの完全なコピー(複製)を作成します。" -#: ../../document.rst:1451 642ef5d4dd53454982dd1a0037a7f392 +#: ../../document.rst:1479 90ce7f1125ea445aae29c35aa5d80383 msgid "the page to be duplicated. Must be in range `0 <= pno < page_count`." msgstr "複製するページ。範囲は `0 <= pno < page_count` である必要があります。" -#: ../../document.rst:1457 c51f422a288e44d29f9143639fe8f258 +#: ../../document.rst:1485 36b8a43c605d47ab9a0a82bd42df7c25 msgid "" "In contrast to :meth:`copy_page`, this method creates a new page object " "(with a new :data:`xref`), which can be changed independently from the " @@ -4583,31 +4686,31 @@ msgstr "" ":meth:`copy_page` とは異なり、このメソッドは新しいページオブジェクト(新しい :data:`xref` " "を持つ)を作成します。これは元のページから独立して変更できます。" -#: ../../document.rst:1459 a7cf835abdce490c9600a0c458619586 +#: ../../document.rst:1487 670014ae08da406ca2be38655e5bd201 msgid "" "Any Popup and \"IRT\" (\"in response to\") annotations are **not copied**" " to avoid potentially incorrect situations." msgstr "ポップアップと \"IRT\"(\"応答先\")注釈は、潜在的に誤った状況を回避するために **コピーされません** 。" -#: ../../document.rst:1463 9ec389eccfa04d5ca206f22ce3936db4 +#: ../../document.rst:1491 4ae895e2d04644e8a9fe842fe0f3cc70 msgid "PDF only: Move (copy and then delete original) a page within the document." msgstr "PDF のみ: ドキュメント内でページを移動します(コピーしてから元のページを削除)。" -#: ../../document.rst:1465 4b114ce22a2d4e16946c6e31541436cf +#: ../../document.rst:1493 b29c45738329442b91a0f727076f4fcb msgid "the page to be moved. Must be in range `0 <= pno < page_count`." msgstr "移動するページ。範囲は `0 <= pno < page_count` である必要があります。" -#: ../../document.rst:1467 252049e7c90f47d3bf0a2b9a7821e9b7 +#: ../../document.rst:1495 fc13875857424ed295d7af1c2209553c msgid "" "the page number in front of which to insert the moved page. The default " "moves **after** the last page." msgstr "移動したページの前に挿入するページ番号。デフォルトでは最後のページの **後** に移動します。" -#: ../../document.rst:1472 7ac1f37245b94789b0fe7adf93339593 +#: ../../document.rst:1500 5d500f5b36af4323beb85a3298a954a2 msgid "New in v1.17.4" msgstr "v1.17.4 で新規" -#: ../../document.rst:1474 47461a50d3004123bf40567ef16c666e +#: ../../document.rst:1502 c39d81a776164d29a530943108efaadc msgid "" "PDF only: Get or set the */NeedAppearances* property of Form PDFs. Quote:" " *\"(Optional) A flag specifying whether to construct appearance streams " @@ -4619,30 +4722,30 @@ msgstr "" "*\"(オプション)ドキュメント内のすべてのウィジェット注釈の外観ストリームと外観辞書を構築するかどうかを指定するフラグ...デフォルト値: " "false\"* 。これは一部のリーダー/ビューアの動作を制御するのに役立つかもしれません。" -#: ../../document.rst:1476 957e67c63a8a4b6693a1388e461e61f3 +#: ../../document.rst:1504 e4314279bc2c408f9dde35e3f7e7e40c msgid "" "set the property to this value. If omitted or `None`, inquire the current" " value." msgstr "プロパティをこの値に設定します。省略された場合または `None` の場合、現在の値を問い合わせます。" -#: ../../document.rst:1479 bd42b3c8137a4ce1ae99335447318de7 +#: ../../document.rst:1507 d9c3dbb3bcc94873a067046f484f7a2f msgid "" "* None: not a Form PDF, or property not defined. * True / False: the " "value of the property (either just set or existing for inquiries). Has no" " effect if no Form PDF." msgstr "" -#: ../../document.rst:1480 e8298333f55c484db04bb355c2b386de +#: ../../document.rst:1508 764e7d8a7f6a4f968098dee9e0e48af9 msgid "None: not a Form PDF, or property not defined." msgstr "None: フォーム PDF ではないか、プロパティが定義されていない。" -#: ../../document.rst:1481 579feff47ede471a91286492b3d139bf +#: ../../document.rst:1509 8b3a18e58aa548319307bc6b0ea6112e msgid "" "True / False: the value of the property (either just set or existing for " "inquiries). Has no effect if no Form PDF." msgstr "True / False: プロパティの値(設定されたばかりまたは問い合わせ用に存在する)。フォーム PDF がない場合は影響しません。" -#: ../../document.rst:1487 9c4dc371e6354239a960e585c1700211 +#: ../../document.rst:1515 507ed2c3e11e4ab0837cfc30a44db928 msgid "" "PDF only: Return whether the document contains signature fields. This is " "an optional PDF property: if not present (return value -1), no " @@ -4652,7 +4755,7 @@ msgstr "" "PDF のみ: ドキュメントに署名フィールドが含まれているかどうかを返します。これはオプションの PDF プロパティです。存在しない場合(返り値 " "-1)、結論を導くことはできません - PDF の作成者は単にそれを使用しなかった可能性があります。" -#: ../../document.rst:1490 192b433a8cd04aa7af1439029fc39710 +#: ../../document.rst:1518 66607b1a4570426c885fa1810e2f38d6 msgid "" "* -1: not a Form PDF / no signature fields recorded / no *SigFlags* " "found. * 1: at least one signature field exists. * 3: contains " @@ -4661,22 +4764,22 @@ msgid "" "update." msgstr "" -#: ../../document.rst:1491 c1c8a41bfc4f4f10bbdbcc773549309d +#: ../../document.rst:1519 f5324fe1ddb443398af1771fca69a157 msgid "-1: not a Form PDF / no signature fields recorded / no *SigFlags* found." msgstr "-1: フォーム PDF でない / 署名フィールドが記録されていない / *SigFlags* が見つからない。" -#: ../../document.rst:1492 3e990a58ab9a4d25868bbe149c5240fb +#: ../../document.rst:1520 0884776d1e7e4becb22692136174f4ee msgid "1: at least one signature field exists." msgstr "1: 少なくとも1つの署名フィールドが存在します。" -#: ../../document.rst:1493 f7fc63734344467aad9951c80e0d95c5 +#: ../../document.rst:1521 6622bf12d0344a21ac885957fa8f1d8a msgid "" "3: contains signatures that may be invalidated if the file is saved " "(written) in a way that alters its previous contents, as opposed to an " "incremental update." msgstr "3: ファイルが前の内容を変更する方法で保存(書き込み)されると、署名が無効になる可能性のある署名が含まれています。これは増分更新とは対照的です。" -#: ../../document.rst:1502 142259b5ae544d83bfabd921c7d9fc1f +#: ../../document.rst:1530 528434fc5e09484e9eb2a85a231054b8 msgid "" "Changed in v1.14.16: The sequence of positional parameters \"name\" and " "\"buffer\" has been changed to comply with the call pattern of other " @@ -4685,7 +4788,7 @@ msgstr "" "v1.14.16 で変更されました: 位置パラメータ \"name\" と \"buffer\" " "の順序が他の関数の呼び出しパターンに従うように変更されました。" -#: ../../document.rst:1504 baccd55305134cfc84e40a286e2b27d8 +#: ../../document.rst:1532 eca673836bcd48c5a8d26046e16edc13 msgid "" "PDF only: Embed a new file. All string parameters except the name may be " "unicode (in previous versions, only ASCII worked correctly). File " @@ -4694,40 +4797,40 @@ msgstr "" "PDF のみ: 新しいファイルを埋め込みます。名前以外のすべての文字列パラメータは Unicode である場合があります(以前のバージョンでは " "ASCII しか正しく動作しませんでした)。ファイルの内容は(有益な場合に)圧縮されます。" -#: ../../document.rst:1506 10e19393ceaf40519c8fc018cb6b1734 +#: ../../document.rst:1534 cb0ab8857b9c4af48c687ed6a564a8bb msgid "entry identifier, **must not already exist**." msgstr "エントリの識別子、**すでに存在しない必要** があります。" -#: ../../document.rst:1507 e0f6dd836f6741bcb92b776155c55801 +#: ../../document.rst:1535 ce223d9f9961497d9b60c0a5aeb35f00 msgid "" "file contents. *(Changed in v1.14.13)* *io.BytesIO* is now also " "supported." msgstr "" -#: ../../document.rst:1507 21a9d2b0a74947b8a3130fc6a0046b07 +#: ../../document.rst:1535 d0e7f79c8154495b8c46b61cf3c005a2 msgid "file contents." msgstr "ファイルの内容。" -#: ../../document.rst:1509 ../../document.rst:1585 -#: 3b38cdbea1fc4073909b78190aea54cb b24788df8ab246c3bb4750b0ec1b4a48 +#: ../../document.rst:1537 ../../document.rst:1611 +#: 2e665750305f41efb2f4afc33ec5e9aa c70a3f73e78043fa88f0de8aa92d8587 msgid "*(Changed in v1.14.13)* *io.BytesIO* is now also supported." msgstr "*(v1.14.13 で変更)* *io.BytesIO* もサポートされるようになりました。" -#: ../../document.rst:1511 1b7c1ca48fac489ebaf30bcbb245ab5c +#: ../../document.rst:1539 90969f73d7ff4f51ba67614c9c2b474f msgid "optional filename. Documentation only, will be set to *name* if `None`." msgstr "オプションのファイル名。ドキュメンテーション専用で、`None` の場合は *name* に設定されます。" -#: ../../document.rst:1512 bb0cfc87f66b4e4884d3ac342514aeea +#: ../../document.rst:1540 7e6212904ad2482dbec0fd308683752c msgid "" "optional unicode filename. Documentation only, will be set to *filename* " "if `None`." msgstr "オプションのUnicodeファイル名。ドキュメンテーション専用で、`None` の場合は *filename* に設定されます。" -#: ../../document.rst:1513 aabc9bc3982e4d39a9b98fc16df7e0e0 +#: ../../document.rst:1541 c72a82ba117a4b2b89ac71c25a98622b msgid "optional description. Documentation only, will be set to *name* if `None`." msgstr "オプションの説明。ドキュメンテーション専用で、`None` の場合は *name* に設定されます。" -#: ../../document.rst:1516 415645e8618643bdb5395f396d7e2f83 +#: ../../document.rst:1544 be4b00766ada40a2bd40f839a28e2e4a msgid "" "*(Changed in v1.18.13)* The method now returns the :data:`xref` of the " "inserted file. In addition, the file object now will be automatically " @@ -4738,17 +4841,17 @@ msgstr "" "も返すようになりました。さらに、ファイルオブジェクトには現在の日時に基づいて自動的に PDF キー `/CreationDate` および " "`/ModDate` が設定されるようになりました。" -#: ../../document.rst:1521 5318f186560848bfa5c983fe36ad046b +#: ../../document.rst:1549 45ee39f2dfbc45d08de6112ef030d189 msgid "" "Changed in v1.14.16: This is now a method. In previous versions, this was" " a property." msgstr "v1.14.16 で変更されました: これは現在のメソッドです。以前のバージョンではプロパティでした。" -#: ../../document.rst:1523 b93d47d754074b5d976793748bf5102e +#: ../../document.rst:1551 e96e4fa4cc3045fe872784dd49d8cbcc msgid "PDF only: Return the number of embedded files." msgstr "PDF のみ: 埋め込まれたファイルの数を返します。" -#: ../../document.rst:1527 a6cd4ebffd6440428c44b0a6c7b52d95 +#: ../../document.rst:1555 1a8bef3689d8400ba77f0281259128e0 msgid "" "PDF only: Retrieve the content of embedded file by its entry number or " "name. If the document is not a PDF, or entry cannot be found, an " @@ -4757,17 +4860,17 @@ msgstr "" "PDF のみ: エントリ番号または名前によって埋め込まれたファイルの内容を取得します。ドキュメントが PDF " "でない場合、またはエントリが見つからない場合、例外が発生します。" -#: ../../document.rst:1529 ../../document.rst:1549 ../../document.rst:1582 -#: 3e73ed8879a44a92b061c4cf294d1421 694ac399d4eb4780a5cc2d6454e44f47 -#: 9012871f3f1f4f0aa866b33603fdfd26 +#: ../../document.rst:1557 ../../document.rst:1577 ../../document.rst:1608 +#: 0681fb6812f247b3a657b4b0d828c4b6 383e427f82004cbe8cc2a825920e0b05 +#: 3aa0076b95144faba6014fb667a2524d msgid "index or name of entry. An integer must be in `range(embfile_count())`." msgstr "エントリのインデックスまたは名前。整数は範囲内である必要があります `range(embfile_count())`。" -#: ../../document.rst:1535 de1af7b40f8f42c1830028d0abb9ac21 +#: ../../document.rst:1563 ebbdeff1629b489a97670b59e1ae920b msgid "Changed in v1.14.16: Items can now be deleted by index, too." msgstr "v1.14.16 で変更されました: インデックスによってアイテムを削除できるようになりました。" -#: ../../document.rst:1537 c0717a2523a04c82976cdd5c914aa8ed +#: ../../document.rst:1565 f0136a227370430087d262df18e1a84d msgid "" "PDF only: Remove an entry from `/EmbeddedFiles`. As always, physical " "deletion of the embedded file content (and file space regain) will occur " @@ -4777,11 +4880,11 @@ msgstr "" "PDF のみ: `/EmbeddedFiles` " "からエントリを削除します。いつものように、適切なガベージオプションを使用して新しいファイルに保存すると、埋め込まれたファイルの内容の物理的な削除(およびファイルスペースの回復)が行われます。" -#: ../../document.rst:1539 734a736984844209b94eec7b24e305b7 +#: ../../document.rst:1567 faacd51f9a014064a8e3da2f5c142759 msgid "index or name of entry." msgstr "エントリのインデックスまたは名前。" -#: ../../document.rst:1541 ea048d474b0e44648cab1682c8c30708 +#: ../../document.rst:1569 a81454daa9fe45cbba977936d41c7176 msgid "" "When specifying an entry name, this function will only **delete the first" " item** with that name. Be aware that PDFs not created with PyMuPDF may " @@ -4790,100 +4893,102 @@ msgstr "" "エントリ名を指定する場合、この関数はその名前を持つ **最初のアイテムのみを削除します** 。PyMuPDF で作成された PDF 以外の PDF" " には重複する名前が含まれている可能性があるため、適切な注意を払う必要があるかもしれません。" -#: ../../document.rst:1545 3215dd3ea49b46bf8f432ad18a9733a7 +#: ../../document.rst:1573 32126dd18fd24500b308accd077d025f msgid "Changed in v1.18.13" msgstr "v1.18.13 で変更されました" -#: ../../document.rst:1547 4e7f45325c424ccd8347b9387428d2cf +#: ../../document.rst:1575 b197159c495a4d389a8e72ac34725c36 msgid "" "PDF only: Retrieve information of an embedded file given by its number or" " by its name." msgstr "PDF のみ: 埋め込まれたファイルの情報を取得します。エントリ番号または名前によって指定されたファイルの情報を取得します。" -#: ../../document.rst:1552 0321f614569e4d73a011e5ece794fc52 +#: ../../document.rst:1580 c947869a0abd450aba656b8457d2e67b msgid "" -"a dictionary with the following keys: * *name* -- (*str*) name under " -"which this entry is stored * *filename* -- (*str*) filename * *ufilename*" -" -- (*unicode*) filename * *desc* -- (*str*) description * *size* -- " -"(*int*) original file size * *length* -- (*int*) compressed file length *" -" *creationDate* -- *(New in v1.18.13)* (*str*) date-time of item creation" -" in PDF format * *modDate* -- *(New in v1.18.13)* (*str*) date-time of " -"last change in PDF format * *collection* -- *(New in v1.18.13)* (*int*) " -":data:`xref` of the associated PDF portfolio item if any, else zero. * " -"*checksum* -- *(New in v1.18.13)* (*str*) a hashcode of the stored file " -"content as a hexadecimal string. Should be MD5 according to PDF " -"specifications, but be prepared to see other hashing algorithms." +"a dictionary with the following keys: * ``name`` -- (*str*) name under " +"which this entry is stored * ``filename`` -- (*str*) filename * " +"``ufilename`` -- (*unicode*) filename * ``description`` -- (*str*) " +"description * ``size`` -- (*int*) original file size * ``length`` -- " +"(*int*) compressed file length * ``creationDate`` -- (*str*) date-time of" +" item creation in PDF format * ``modDate`` -- (*str*) date-time of last " +"change in PDF format * ``collection`` -- (*int*) :data:`xref` of the " +"associated PDF portfolio item if any, else zero. * ``checksum`` -- " +"(*str*) a hashcode of the stored file content as a hexadecimal string. " +"Should be MD5 according to PDF specifications, but be prepared to see " +"other hashing algorithms." msgstr "" -#: ../../document.rst:1552 03ffad36eb634dda963829dfe5bb2366 +#: ../../document.rst:1580 c6d2fd48543e43c98de50702298f3e93 msgid "a dictionary with the following keys:" msgstr "以下のキーを持つ辞書:" -#: ../../document.rst:1554 9e935853150143109eca9acf1ed77607 -msgid "*name* -- (*str*) name under which this entry is stored" -msgstr "*name* – (*str*) このエントリが格納されている名前" +#: ../../document.rst:1582 fbac45b6fb9b45b696291bbb6e40d275 -#: ../../document.rst:1555 e80dcd7176714e3e943c4a7aac84f388 -msgid "*filename* -- (*str*) filename" -msgstr "*filename* – (*str*) ファイル名" +msgid "``name`` -- (*str*) name under which this entry is stored" +msgstr "``name`` – (*str*) このエントリが格納されている名前" -#: ../../document.rst:1556 8f02efcd8aad47009c8a4c2502be37fb -msgid "*ufilename* -- (*unicode*) filename" -msgstr "*ufilename* – (*unicode*) Unicode ファイル名" +#: ../../document.rst:1583 ac7cdd97593b4a499b8c7d804c6f4014 -#: ../../document.rst:1557 c681c5df8fab4953a18f7103f2414312 -msgid "*desc* -- (*str*) description" -msgstr "*desc* – (*str*) 説明" +msgid "``filename`` -- (*str*) filename" +msgstr "``filename`` – (*str*) ファイル名" -#: ../../document.rst:1558 821ecb809abc4bdf92c7fec4870068b6 -msgid "*size* -- (*int*) original file size" -msgstr "*size* – (*int*) 元のファイルサイズ" +#: ../../document.rst:1584 935d57ba0d7349c192ccf39791ae5335 -#: ../../document.rst:1559 56f41aa72e674bc381cd55b2705966f4 -msgid "*length* -- (*int*) compressed file length" -msgstr "*length* – (*int*) 圧縮ファイルの長さ" +msgid "``ufilename`` -- (*unicode*) filename" +msgstr "``ufilename`` – (*unicode*) Unicode ファイル名" -#: ../../document.rst:1560 5d0ed7f0a4d6464b9d81cfeb68771b3d -msgid "" -"*creationDate* -- *(New in v1.18.13)* (*str*) date-time of item creation " -"in PDF format" -msgstr "*creationDate* – *(v1.18.13 で新規)* (*str*) PDF 形式のアイテム作成の日時" +#: ../../document.rst:1585 9c68a90a51b1456f84258a5c564f1934 -#: ../../document.rst:1561 b8bff1d5042e462d9c4f46d02e0c3f3a -msgid "" -"*modDate* -- *(New in v1.18.13)* (*str*) date-time of last change in PDF " -"format" -msgstr "*modDate* – *(v1.18.13 で新規)* (*str*) PDF 形式の最終変更の日時" +msgid "``description`` -- (*str*) description" +msgstr "``description`` – (*str*) 説明" + +#: ../../document.rst:1586 7e7ddf34d9a1459c8c1de5dc8202df7b + +msgid "``size`` -- (*int*) original file size" +msgstr "``size`` – (*int*) 元のファイルサイズ" + +#: ../../document.rst:1587 fb9eddcb3d474795a2468d79481a7f8f + +msgid "``length`` -- (*int*) compressed file length" +msgstr "``length`` – (*int*) 圧縮ファイルの長さ" + +#: ../../document.rst:1588 3b6add56ce56412b80dd09077ed06529 + +msgid "``creationDate`` -- (*str*) date-time of item creation in PDF format" +msgstr "``creationDate`` – (*str*) PDF 形式のアイテム作成の日時" + +#: ../../document.rst:1589 0fb6cb02dc664e4580cc745eece83618 + +msgid "``modDate`` -- (*str*) date-time of last change in PDF format" +msgstr "``modDate`` – (*str*) PDF 形式の最終変更の日時" + +#: ../../document.rst:1590 1ed3eec819544ad88fe1e48742f08be5 -#: ../../document.rst:1562 71cfc3018ba44e7399d90f954b183dc5 msgid "" -"*collection* -- *(New in v1.18.13)* (*int*) :data:`xref` of the " -"associated PDF portfolio item if any, else zero." +"``collection`` -- (*int*) :data:`xref` of the associated PDF portfolio " +"item if any, else zero." msgstr "" -"*collection* – *(v1.18.13 で新規)* (*int*) 関連する PDF ポートフォリオアイテムの " +"``collection`` – (*int*) 関連する PDF ポートフォリオアイテムの " ":data:`xref`(あれば)、それ以外はゼロ。" -#: ../../document.rst:1563 cdde20187deb442ba98cad8396f00974 +#: ../../document.rst:1591 b50b9a70e5b24a5097b61c6c20e91bd6 + msgid "" -"*checksum* -- *(New in v1.18.13)* (*str*) a hashcode of the stored file " -"content as a hexadecimal string. Should be MD5 according to PDF " -"specifications, but be prepared to see other hashing algorithms." +"``checksum`` -- (*str*) a hashcode of the stored file content as a " +"hexadecimal string. Should be MD5 according to PDF specifications, but be" +" prepared to see other hashing algorithms." msgstr "" -"*checksum* – *(v1.18.13 で新規)* (*str*) " +"``checksum`` – (*str*) " "16進数の文字列として格納されたファイルコンテンツのハッシュコード。PDF 仕様に従えば MD5 " "であるべきですが、他のハッシュアルゴリズムも見る可能性があるので、準備しておいてください。" -#: ../../document.rst:1567 541d047c9cc04e40b164d8d726da5af2 -msgid "New in v1.14.16" -msgstr "v1.14.16 で新規" - -#: ../../document.rst:1569 d39319bc57984950aaef4784fc177acb +#: ../../document.rst:1595 c5155287efc6411fa9ea13c55b53cde3 msgid "" "PDF only: Return a list of embedded file names. The sequence of the names" " equals the physical sequence in the document." msgstr "PDF のみ: 埋め込まれたファイルの名前のリストを返します。名前のシーケンスはドキュメント内の物理的なシーケンスと同じです。" -#: ../../document.rst:1580 ffd0b8c3adf6470db9aee839d97558ff +#: ../../document.rst:1606 84d2e06f1a5c410d8ede4fcd1602ba91 msgid "" "PDF only: Change an embedded file given its entry number or name. All " "parameters are optional. Letting them default leads to a no-operation." @@ -4891,41 +4996,41 @@ msgstr "" "PDF のみ: " "エントリ番号または名前によって指定された埋め込まれたファイルを変更します。すべてのパラメータはオプションです。デフォルトで設定すると、操作は行われません。" -#: ../../document.rst:1583 27cf40710c0041e49374962a1f671449 +#: ../../document.rst:1609 38c5beed974341f2bee1c034141e92bb msgid "" "the new file content. *(Changed in v1.14.13)* *io.BytesIO* is now also " "supported." msgstr "新しいファイルの内容。*(v1.14.13 で変更)* *io.BytesIO* もサポートされるようになりました。" -#: ../../document.rst:1583 fbb857c33a7646d791bdb5aabef509af +#: ../../document.rst:1609 b6d5c01a9c2349c78c6d62752c61660c msgid "the new file content." msgstr "新しいファイルの内容。" -#: ../../document.rst:1587 82cd5dc4ece44491b7961315144d49d0 +#: ../../document.rst:1613 3ba623d2e9d14185b19cbc759afd1b82 msgid "the new filename." msgstr "新しいファイル名。" -#: ../../document.rst:1588 0ced4528e72a41de9998c9c90b2ee908 +#: ../../document.rst:1614 ed5923bc2633452eaf57327d15e9e8dd msgid "the new unicode filename." msgstr "新しいUnicodeファイル名。" -#: ../../document.rst:1589 46fc1e8cda274d20883f4facb02be906 +#: ../../document.rst:1615 e40b7cce2d134763b249779bbc9813b4 msgid "the new description." msgstr "新しい説明。" -#: ../../document.rst:1591 a83546b2f6ee47b1b013a0431a22d623 +#: ../../document.rst:1617 eccaeb63c015477a9c290bedf3341def msgid "" "*(Changed in v1.18.13)* The method now returns the :data:`xref` of the " "file object." msgstr "*(v1.18.13 で変更)* このメソッドはファイルオブジェクトの :data:`xref` も返すようになりました。" -#: ../../document.rst:1594 9009ed7bcae14c07b9a2a7756f022ff7 +#: ../../document.rst:1620 366c4efd2a264a579ef34427b84e24de msgid "" "xref of the file object. Automatically, its `/ModDate` PDF key will be " "updated with the current date-time." msgstr "ファイルオブジェクトのxref。自動的に、`/ModDate` PDF キーが現在の日時で更新されます。" -#: ../../document.rst:1599 97b264e547264ef3a7c51f1abfab871e +#: ../../document.rst:1625 fd1fa19c112e490cb4ddba079fe457a1 msgid "" "Release objects and space allocations associated with the document. If " "created from a file, also closes *filename* (releasing control to the " @@ -4936,43 +5041,43 @@ msgstr "" "に制御を解放)ます。文書を明示的に閉じることは、それを削除すること、`del doc` 、または `doc = None` " "のように別のものに割り当てることと同等です。" -#: ../../document.rst:1603 ../../document.rst:1617 ../../document.rst:1624 -#: ../../document.rst:1631 ../../document.rst:1642 ../../document.rst:1651 -#: ../../document.rst:1800 1ca0d5af17014ccdb1b3953829b9abb7 -#: 31a0dc0d231f4798a65b4e539d52a6a7 4a5231d4827c448d8fb7cbe1d0b9a5cb -#: 99fdb6d4c1b44d7298602375d8008867 d1e5b49d97764f1580a421dd173bc4ae -#: e67e236e2fae48daa395f491487b23e3 efe557c0ab6e4c7984bdbb7d8a632207 +#: ../../document.rst:1629 ../../document.rst:1643 ../../document.rst:1650 +#: ../../document.rst:1657 ../../document.rst:1668 ../../document.rst:1677 +#: ../../document.rst:1826 14270db97f264164b3d69f71fe0c69f5 +#: 47d6b76ebe8b409fac6fe3b3a248d7b9 8c37e8f457fb483ca28af03c826fcd9d +#: c086dd2a27094668a3840fa79cd84e18 c69e0d6af69b4a0f842860ca8c505d1d +#: c8b828c921894f2286ddf6656820725b f8a3165580ff48368a0b479e9fdfe975 msgid "New in v1.16.8" msgstr "" -#: ../../document.rst:1604 da0afc5ef3e94ae99b82e61510c1ed80 +#: ../../document.rst:1630 d6b60999b8d94f51a2e0483ff83c7b82 msgid "Changed in v1.18.10" msgstr "v1.18.10 で変更" -#: ../../document.rst:1606 e557a4a43446436f9e0c30e1ce4ea095 +#: ../../document.rst:1632 d347d20f77b9466ea053a83e859da0b7 msgid "PDF only: Return the definition source of a PDF object." msgstr "PDF のみ: PDF オブジェクトの定義ソースを返します。" -#: ../../document.rst:1608 4288db6b36e745e5a6564fd871f2a6eb +#: ../../document.rst:1634 0e9d6b86440048cfb572b93e553490bf #, fuzzy msgid "" "the object's :data:`xref`. *Changed in v1.18.10:* A value of `-1` returns" " the PDF trailer source." msgstr "オブジェクトの :data`xref` 。*v1.18.10 で変更:* -1 の値は PDF トレーラーのソースを返します。" -#: ../../document.rst:1609 69b9eb3dcbcc4d7091a546c1dd1522f3 +#: ../../document.rst:1635 be9f07753f0148da9f081a7ff76d6c6d msgid "whether to generate a compact output with no line breaks or spaces." msgstr "改行やスペースのないコンパクトな出力を生成するかどうか。" -#: ../../document.rst:1610 171c4a058e024e49acf9c03527419087 +#: ../../document.rst:1636 c4c8ef97519a4dc0b7f70eb9a4c3d7b8 msgid "whether to ASCII-encode binary data." msgstr "バイナリデータを ASCII エンコードするかどうか。" -#: ../../document.rst:1613 029cdad6d3eb4c72a514b4609c262678 +#: ../../document.rst:1639 81018b7cd93b40d7a34959a2fc502118 msgid "The object definition source." msgstr "オブジェクトの定義ソース。" -#: ../../document.rst:1619 2a116f3e36b64794be94522df657d11b +#: ../../document.rst:1645 0fc49a0de9e84778a0bc18624f536533 msgid "" "PDF only: Return the :data:`xref` number of the PDF catalog (or root) " "object. Use that number with :meth:`Document.xref_object` to see its " @@ -4981,32 +5086,32 @@ msgstr "" "PDF のみ: PDF カタログ(またはルート)オブジェクトの :data:`xref` 番号を返します。これを " ":meth:`Document.xref_object` で使用してそのソースを表示できます。" -#: ../../document.rst:1626 f6adfc4d401e4a64b8471eba212a5691 +#: ../../document.rst:1652 7f6be18bdd1e495095253b00baf60799 msgid "" "PDF only: Return the trailer source of the PDF, which is usually located" " at the PDF file's end. This is :meth:`Document.xref_object` with an " -"*xref* argument of -1." +":data:`xref` argument of -1." msgstr "" "PDF のみ: PDF のトレーラーソースを返します。通常、これは PDF ファイルの末尾にあります。これは " -":meth:`Document.xref_object` で *xref* 引数が -1 の場合です。" +":meth:`Document.xref_object` で :data:`xref` 引数が -1 の場合です。" -#: ../../document.rst:1633 0dea79778eb9401bb19526952508858e +#: ../../document.rst:1659 cda51bc9c719464ba91fae26c9d622c7 msgid "" "PDF only: Return the **decompressed** contents of the :data:`xref` stream" " object." msgstr "PDF のみ: :data:`xref` ストリームオブジェクトの **解凍された** コンテンツを返します。" -#: ../../document.rst:1635 ../../document.rst:1655 ../../document.rst:1674 -#: 2b4e138cfb4444d49bb1fb819a7463ae 7bd8ea82c7ad4c44a105d499c7bb7a23 -#: ca0f2dae235d4d2f85fe4f304a0770ed +#: ../../document.rst:1661 ../../document.rst:1681 ../../document.rst:1700 +#: 90fdc9a5cc744b868d7af84c5cb5be91 c5f1d5447e98482db0d26ea3fe57fcf2 +#: e47e0b06f7b1465481e307eeabddc696 msgid ":data:`xref` number." msgstr ":data:`xref` 番号。" -#: ../../document.rst:1638 0e3a770f87434af6b9397b185f832952 +#: ../../document.rst:1664 5376bfef128f44058da5eebfe6aa818d msgid "the (decompressed) stream of the object." msgstr "(解凍された)オブジェクトのストリーム。" -#: ../../document.rst:1644 cfc5cefda7be43528e885f911b9d1997 +#: ../../document.rst:1670 b3a4a8aa7935410ea8c4d7ab3133a391 msgid "" "PDF only: Return the **unmodified** (esp. **not decompressed**) contents " "of the :data:`xref` stream object. Otherwise equal to " @@ -5015,11 +5120,11 @@ msgstr "" "PDF のみ: :data:`xref` ストリームオブジェクトの**変更前**(特に " "**解凍されていない**)コンテンツを返します。それ以外の点では :meth:`Document.xref_stream` と同等です。" -#: ../../document.rst:1647 28c57d3fd66f484abed174a6a4006310 +#: ../../document.rst:1673 efd01ffe56354915803c3346b344e52e msgid "the (original, unmodified) stream of the object." msgstr "(元の、変更前の)オブジェクトのストリーム。" -#: ../../document.rst:1653 cf6c884b50e345859e11c5d05ce5f6c7 +#: ../../document.rst:1679 ffc079d7b8b2498ab520df7c23173fc8 msgid "" "PDF only: Replace object definition of :data:`xref` with the provided " "string. The xref may also be new, in which case this instruction " @@ -5029,30 +5134,30 @@ msgstr "" "PDF のみ: :data:`xref` のオブジェクト定義を提供された文字列で置き換えます。xref " "が新しい場合、この命令はオブジェクト定義を完成させます。ページオブジェクトも指定された場合、そのリンクと注釈が後で再ロードされ、リンクと/または注釈に関連する変更が反映されます。" -#: ../../document.rst:1657 50aa6f51da7f42ac8e730e9a96d6c421 +#: ../../document.rst:1683 af7ef9c3350d46dd91ea33d838f30ead msgid "a string containing a valid PDF object definition." msgstr "有効な PDF オブジェクト定義を含む文字列。" -#: ../../document.rst:1659 4220d2b770b14ea6bd9d5baf50b4216f +#: ../../document.rst:1685 31f52c85186448aba72732d814dc072a msgid "" "a page object. If provided, indicates, that annotations of this page " "should be refreshed (reloaded) to reflect changes incurred with links and" " / or annotations." msgstr "ページオブジェクト。指定された場合、このページの注釈が変更を反映するために再ロードされることを示します。" -#: ../../document.rst:1663 926d4cba35364cfbb0d7177f7e0ed6ee +#: ../../document.rst:1689 483c09db656d477ab951dc64519cfd02 msgid "zero if successful, otherwise an exception will be raised." msgstr "成功した場合はゼロ、それ以外の場合は例外が発生します。" -#: ../../document.rst:1668 c8b96002e924460fba962f7a5179dfa8 +#: ../../document.rst:1694 ae0ff7cd9ec24ce48088e3a5e0bc7c45 msgid "New in v.1.16.8" msgstr "v1.16.8 で新規" -#: ../../document.rst:1669 6faa10a400d4443ebe52a8bc8bbde886 +#: ../../document.rst:1695 afa3844759854f40a009d8d2095af614 msgid "Changed in v1.19.2: added parameter \"compress\"" msgstr "v1.19.2 で変更: パラメータ \"compress\" を追加" -#: ../../document.rst:1670 77289fa3bc2f4e1eb348a6afaa14406f +#: ../../document.rst:1696 e3670f10669943438f37d0e3d3fbc30b msgid "" "Changed in v1.19.6: deprecated parameter \"new\". Now confirms that the " "object is a PDF dictionary object." @@ -5060,35 +5165,35 @@ msgstr "" "v1.19.6 で変更: パラメータ \"new\" を非推奨にし、無視します。オブジェクトが PDF " "辞書オブジェクトであることを確認するようになりました。" -#: ../../document.rst:1672 347990c53d53453ab7028d00d82be224 +#: ../../document.rst:1698 801d5e33074841c3875b9bcf083a2669 msgid "" -"Replace the stream of an object identified by *xref*, which must be a PDF" -" dictionary. If the object is no :data:`stream`, it will be turned into " -"one. The function automatically performs a compress operation " +"Replace the stream of an object identified by :data:`xref`, which must be" +" a PDF dictionary. If the object is no :data:`stream`, it will be turned " +"into one. The function automatically performs a compress operation " "(\"deflate\") where beneficial." msgstr "" -"xref で識別されるオブジェクトのストリームを置き換えます。*xref* は PDF " +"xref で識別されるオブジェクトのストリームを置き換えます。:data:`xref` は PDF " "辞書である必要があります。オブジェクトがストリームでない場合、それをストリームに変換します。この関数は、有益な場合には自動的に圧縮操作(\"deflate\")を実行します。" -#: ../../document.rst:1676 75adcf00f93f48e68aee2d0c01d1bf60 +#: ../../document.rst:1702 a663fea15c1841c7b5086dd25b9ee0c9 msgid "" "the new content of the stream. *(Changed in v1.14.13:)* *io.BytesIO* " "objects are now also supported." msgstr "" -#: ../../document.rst:1676 3831afcfca1c41f0bc9aa5d301bb99da +#: ../../document.rst:1702 5586045fec9e4af589b8a924b2aa966f msgid "the new content of the stream." msgstr "ストリームの新しい内容。" -#: ../../document.rst:1678 e207f8b653c34329972673bc6a8730ee +#: ../../document.rst:1704 2986570ec9f84dcbb3dc3f15f9ba16de msgid "*(Changed in v1.14.13:)* *io.BytesIO* objects are now also supported." msgstr "*(v1.14.13 で変更:)* *io.BytesIO* オブジェクトもサポートされるようになりました。" -#: ../../document.rst:1680 fb1d3c4026c3429995a326ad05fd2bd0 +#: ../../document.rst:1706 708b8e1347c54de588279245527cd0d5 msgid "*deprecated* and ignored. Will be removed some time after v1.20.0." msgstr "*非推奨* で無視されます。v1.20.0 以降のある時点で削除されます。" -#: ../../document.rst:1681 3700776a38be4da3b92dba7bf7eebe4a +#: ../../document.rst:1707 9169f5b479714b5a823515010c9c4077 msgid "" "whether to compress the inserted stream. If `True` (default), the stream " "will be inserted using `/FlateDecode` compression (if beneficial), " @@ -5097,18 +5202,18 @@ msgstr "" "挿入されるストリームを圧縮するかどうか。`True` の場合(デフォルト)、ストリームは `/FlateDecode` " "圧縮を使用して挿入されます(有益な場合)、それ以外の場合はストリームはそのまま挿入されます。" -#: ../../document.rst:1683 dcb9fb9e602d4490b3775113887afc27 +#: ../../document.rst:1709 6a01d56f4b354296b703610ea2bbe419 msgid "" -"if *xref* does not represent a PDF :data:`dict`. An empty dictionary " -"``<<>>`` is accepted. So if you just created the xref and want to give it" -" a stream, first execute `doc.update_object(xref, \"<<>>\")`, and then " -"insert the stream data with this method." +"if :data:`xref` does not represent a PDF :data:`dict`. An empty " +"dictionary ``<<>>`` is accepted. So if you just created the xref and want" +" to give it a stream, first execute `doc.update_object(xref, \"<<>>\")`, " +"and then insert the stream data with this method." msgstr "" -"*xref* が PDF 辞書を表していない場合。空の辞書 < は受け入れられます。したがって、xref " +":data:`xref` が PDF 辞書を表していない場合。空の辞書 < は受け入れられます。したがって、xref " "を作成し、それにストリームを指定する場合は、まず `doc.update_object(xref, \"<<>>\")` " "を実行し、その後、このメソッドでストリームデータを挿入してください。" -#: ../../document.rst:1685 0e132817ea2d412a926137ddb6e634a8 +#: ../../document.rst:1711 415073833d5341049e2e7a7ddb473a50 msgid "" "The method is primarily (but not exclusively) intended to manipulate " "streams containing PDF operator syntax (see pp. 643 of the " @@ -5117,7 +5222,7 @@ msgstr "" "このメソッドは主に(しかし排他的ではなく)PDFオペレータ構文を含むストリームを操作することを意図しています(:ref:`AdobeManual`" " の pp. 643 参照)。例えばページのコンテンツストリームのようにです。" -#: ../../document.rst:1687 8744ce7bd88640af87e4293eb8ffb49c +#: ../../document.rst:1713 bc0a1750301d4b80bca19316ee01933a msgid "" "If you update a contents stream, consider using save parameter " "*clean=True* to ensure consistency between PDF operator source and the " @@ -5126,7 +5231,7 @@ msgstr "" "コンテンツストリームを更新する場合、PDFオペレータのソースとオブジェクト構造の間の整合性を確保するために save パラメータを " "*clean=True* で使用することを検討してください。" -#: ../../document.rst:1689 af1f7ffaae494742944e8a4efb8bc82d +#: ../../document.rst:1715 02d2b54a93af4ea890ed6715774590d5 msgid "" "Example: Let us assume that you no longer want a certain image appear on " "a page. This can be achieved by deleting the respective reference in its " @@ -5139,11 +5244,11 @@ msgstr "" "そして実際には、ページを再読み込みした後、画像は消えてしまいます。ただし、ページの :data:`resources` " "は、まだその画像がページによって参照されていると表示されます。この保存オプションは、そのような不一致をクリーンアップします。" -#: ../../document.rst:1694 52fa3b50c5fa4a78b36e13ad72daa69e +#: ../../document.rst:1720 556ab1a555e9477d800957c0e4e1e97b msgid "New in v1.19.5" msgstr "v1.19.5 で新規" -#: ../../document.rst:1696 83c52a221d28467aa5cacddeaf9c953c +#: ../../document.rst:1722 47e849734d964b1490749d596ade2345 msgid "" "PDF Only: Make *target* xref an exact copy of *source*. If *source* is a " ":data:`stream`, then these data are also copied." @@ -5151,11 +5256,11 @@ msgstr "" "PDF のみ: *ターゲット* の xref をソースの正確なコピーにします。*ソース* が :data:`stream` " "の場合、これらのデータもコピーされます。" -#: ../../document.rst:1698 84036b67e08444f8be972a7d242d3477 +#: ../../document.rst:1724 21c3cbbe776e4f8a8ac7f5190fb7a335 msgid "the source :data:`xref`. It must be an existing **dictionary** object." msgstr "ソースの :data:`xref`。既存の **辞書** オブジェクトである必要があります。" -#: ../../document.rst:1699 54baea41569a44a0af1da766e0ceb419 +#: ../../document.rst:1725 55276a5af2ec4e179a9d6c501b808961 msgid "" "the target xref. Must be an existing **dictionary** object. If the xref " "has just been created, make sure to initialize it as a PDF dictionary " @@ -5164,40 +5269,39 @@ msgstr "" "ターゲットの :data:`xref`。既存の **辞書** オブジェクトである必要があります。xref が新たに作成されたばかりの場合、最小仕様" " ``<<>>`` を持つ PDF 辞書として初期化することを確認してください。" -#: ../../document.rst:1700 bf0480b9601b480a84d45ac1955ffc4f +#: ../../document.rst:1726 2b605267f77649968b69d698aeead973 msgid "" -"an optional list of top-level keys in *target*, that should not be " +"an optional list of top-level keys in ``target``, that should not be " "removed in preparation of the copy process." -msgstr "*ターゲット* 内のトップレベルのキーを削除する準備段階で削除しない、オプションのキーリスト。" +msgstr "``target`` 内のトップレベルのキーを削除する準備段階で削除しない、オプションのキーリスト。" -#: ../../document.rst:1704 b535f704593b47e983f6558ea5b07a2d +#: ../../document.rst:1730 f9a0573da15e4f609a6b4dafb0c6f191 msgid "This method has much in common with Python's *dict* method `copy()`." msgstr "このメソッドは、Python の *dict* メソッド `copy()` と多くの共通点があります。" -#: ../../document.rst:1705 908d8fc291f54305b3afc34f7bc18ab6 +#: ../../document.rst:1731 e284df946c1a4d42a141beebb9ecdbd4 msgid "Both xref numbers must represent existing dictionaries." msgstr "両方の xref 番号は既存の辞書を表す必要があります。" -#: ../../document.rst:1706 a31db435471f445da4dd998fe0057a04 +#: ../../document.rst:1732 d76070ec87284eeba9402138be67ac92 msgid "" "Before data is copied from *source*, all *target* dictionary keys are " -"deleted. You can specify exceptions from this in the *keep* list. If " +"deleted. You can specify exceptions from this in the ``keep`` list. If " "*source* however has a same-named key, its value will still replace the " "target." msgstr "" -"データがソースからコピーされる前に、すべての *ターゲット* 辞書のキーが削除されます。この削除からの例外を *keep* " +"データがソースからコピーされる前に、すべての *ターゲット* 辞書のキーが削除されます。この削除からの例外を ``keep`` " "リストで指定できます。ただし、*ソース* に同じ名前のキーがある場合、その値はターゲットに置き換えられます。" -#: ../../document.rst:1707 d49cbeeee4734aeb9ba377ecd8c918fd +#: ../../document.rst:1733 eb592c11643040f8bacae8d7ff2aa6b0 msgid "" -"If *source* is a :data:`stream` object, then these data will also be " -"copied over, and *target* will be converted to a stream object." -msgstr "*ソース* がストリームオブジェクトの場合、これらのデータもコピーされ、*ターゲット* はストリームオブジェクトに変換されます。" +"If ``source`` is a :data:`stream` object, then these data will also be copied over, and ``target`` will be converted to a stream object." +msgstr "``source`` が ``stream`` オブジェクトである場合、そのデータもコピーされ、``target`` は ``stream`` オブジェクトに変換されます。" -#: ../../document.rst:1708 74b192a80c4e4a70814231a6eb57f701 +#: ../../document.rst:1734 6e76189531f4460496c74073c0e2105f msgid "" "A typical use case is to replace or remove an existing image without " -"using redaction annotations. Example scripts can be seen `here " +"using redaction annotations. Example scripts can be seen `in this PyMuPDF Utilities example " "`_." msgstr "" @@ -5205,7 +5309,7 @@ msgstr "" "`_ で確認できます。" -#: ../../document.rst:1712 cc14077df724472a9cbd26e380da071c +#: ../../document.rst:1738 3757280fea3a405cb5eec49e258ba662 msgid "" "PDF Only: Extract data and meta information of an image stored in the " "document. The output can directly be used to be stored as an image file, " @@ -5218,7 +5322,7 @@ msgstr "" "の作成などに使用できます。このメソッドは、できる限りピクマップを使用せず、画像をその元の形式(例:JPEG " "として)で表示することを目的としています。" -#: ../../document.rst:1714 db6662d828864a94b562ff6aa6723fe5 +#: ../../document.rst:1740 145ea90626d94642bace65f7cfae7c01 msgid "" ":data:`xref` of an image object. If this is not in `range(1, " "doc.xref_length())`, or the object is no image or other errors occur, " @@ -5227,7 +5331,7 @@ msgstr "" "画像オブジェクトの :data:`xref`。これが `range(1, doc.xref_length())` " "の範囲外であるか、オブジェクトが画像でないか、その他のエラーが発生した場合、 `None` が返され、例外は発生しません。" -#: ../../document.rst:1717 21074eaa5f0e4f3a8945cca78958e400 +#: ../../document.rst:1743 757d4da025c14b728095072969c1d22d msgid "" "a dictionary with the following keys * *ext* (*str*) image type (e.g. " "*'jpeg'*), usable as image file extension * *smask* (*int*) :data:`xref` " @@ -5240,51 +5344,51 @@ msgid "" "image file content" msgstr "" -#: ../../document.rst:1717 ecaf95133480442badf7250b55f7eff0 +#: ../../document.rst:1743 5da832c6b8c343ea946b193ed144376e msgid "a dictionary with the following keys" msgstr "以下のキーを持つ辞書" -#: ../../document.rst:1719 a23def8fea944111aa6e73cb46c87b4e +#: ../../document.rst:1745 e9f061ed5c634149934f0ff466277a8b msgid "*ext* (*str*) image type (e.g. *'jpeg'*), usable as image file extension" msgstr "*ext* (*str*) 画像タイプ(例:*'jpeg'*)、画像ファイルの拡張子として使用可能" -#: ../../document.rst:1720 a3f665469fc5475f951d5a27790a9edd +#: ../../document.rst:1746 4d2df5918a8345cb92c00ac43a54a409 msgid "*smask* (*int*) :data:`xref` number of a stencil (/SMask) image or zero" msgstr "*smask* (*int*) ステンシル(/SMask)画像の :data:`xref` 番号またはゼロ" -#: ../../document.rst:1721 5a464b0b9563477ba37ec83759e7c276 +#: ../../document.rst:1747 179f1bf46b6e40afbeb65a87365dc3e3 msgid "*width* (*int*) image width" msgstr "*width* (*int*) 画像の幅" -#: ../../document.rst:1722 1121bd94f15348a4b14e2119b384dffa +#: ../../document.rst:1748 88b43c7b7ead4e9cbce2276a540e5c6c msgid "*height* (*int*) image height" msgstr "*height* (*int*) 画像の高さ" -#: ../../document.rst:1723 96f57b050361405da5ba9cdd98f2bdac +#: ../../document.rst:1749 0448216e247447b5b867c7a212a7db7c msgid "*colorspace* (*int*) the image's *colorspace.n* number." msgstr "*colorspace* (*int*) 画像のカラースペースの数" -#: ../../document.rst:1724 9781fe01b5e14d3bb7be402afca9a9d0 +#: ../../document.rst:1750 bfec3e10c09347409c2ce4991f863d76 msgid "*cs-name* (*str*) the image's *colorspace.name*." msgstr "*cs-name* (*str*) 画像のカラースペースの名前" -#: ../../document.rst:1725 b5f7b5bc9bda4ccdbecf7761e34e8c9f +#: ../../document.rst:1751 bab5172f3e2d42d7a2d7687f1aabc59f msgid "" "*xres* (*int*) resolution in x direction. Please also see " ":data:`resolution`." msgstr "*xres* (*int*) x 方向の解像度。:data:`resolution` も参照してください。" -#: ../../document.rst:1726 c6ddd5abc3994cf7b5b2caddf6d4b902 +#: ../../document.rst:1752 d940169fe33947e8b45dc1161bd129d8 msgid "" "*yres* (*int*) resolution in y direction. Please also see " ":data:`resolution`." msgstr "*yres* (*int*) y 方向の解像度。:data:`resolution` も参照してください。" -#: ../../document.rst:1727 b8114e4238c547a0916d6b771714decc +#: ../../document.rst:1753 a2f030ad2bcb4bf68c260cb4874be600 msgid "*image* (*bytes*) image data, usable as image file content" msgstr "*image* (*bytes*) 画像データ、画像ファイルのコンテンツとして使用可能" -#: ../../document.rst:1739 5b6d40e3cdf449d2bcfe047d6bb38152 +#: ../../document.rst:1765 efcfe100b8a6420e850eeb29525eac1b msgid "" "There is a functional overlap with *pix = pymupdf.Pixmap(doc, xref)*, " "followed by a *pix.tobytes()*. Main differences are that extract_image, " @@ -5299,11 +5403,11 @@ msgstr "" "PNG以外の画像では非常に高速である、 **(3)** 抽出された画像のディスクストレージが通常ははるかに少ない、 **(4)** " "エラーケースでは `None` を返す(例外を生成しない)という点です。同じPDF内の以下の例の画像を見てみましょう。" -#: ../../document.rst:1741 2a4789733aa34582850e660b831ba502 +#: ../../document.rst:1767 79b4a5862036494bb5451d004438fe43 msgid "xref 1268 is a PNG -- Comparable execution time and identical output::" msgstr "xref 1268 は PNG 形式です - 比較可能な実行時間と同じ出力::" -#: ../../document.rst:1753 7b8458f0c0f34a35a580f9a1a9f548f2 +#: ../../document.rst:1779 3cfaf358ed8f49a288bdad998ca0dfc8 msgid "" "xref 1186 is a JPEG -- :meth:`Document.extract_image` is **many times " "faster** and produces a **much smaller** output (2.48 MB vs. 0.35 MB)::" @@ -5311,11 +5415,11 @@ msgstr "" "xref 1186 は JPEG です - :meth:`Document.extract_image` は " "**何倍も速く**、はるかに小さい出力を生成します(2.48 MB に対して 0.35 MB)::" -#: ../../document.rst:1768 995c36292f7842a697532b153966dd32 +#: ../../document.rst:1794 f96212b879b34069be2cb1046653ead4 msgid "Changed in v1.19.4: return a dictionary if `named == True`." msgstr "v1.19.4 で変更: `named == True` の場合、辞書を返します。" -#: ../../document.rst:1770 c249305a818f4e97b045b5b23f998a59 +#: ../../document.rst:1796 60c2bb121f8c407fb832d07b5ea5366b msgid "" "PDF Only: Return an embedded font file's data and appropriate file " "extension. This can be used to store the font as an external file. The " @@ -5326,17 +5430,17 @@ msgstr "" "埋め込まれたフォントファイルのデータと適切なファイル拡張子を返します。これを使用してフォントを外部ファイルとして保存することができます。このメソッドは例外をスローしません(PDF" " および有効な :data:`xref` のチェックを除く)。" -#: ../../document.rst:1772 670a2614d2b64147b8e78c377363aab3 +#: ../../document.rst:1798 a9d21a1213bf49d5ab5fe1f9aa1f9fcd msgid "PDF object number of the font to extract." msgstr "抽出するフォントの PDF オブジェクト番号。" -#: ../../document.rst:1773 5cb12d0d9953463a91fe732a37748483 +#: ../../document.rst:1799 4ff80700b4ea49ad83243ffdfeefb1d4 msgid "" "only return font information, not the buffer. To be used for information-" "only purposes, avoids allocation of large buffer areas." msgstr "フォント情報のみを返し、バッファの割り当てを回避するために使用します。" -#: ../../document.rst:1774 0e5f5ee7bace47a4bf9820eeeb18fb92 +#: ../../document.rst:1800 3b6cc4812e4b48aba4f32d17dbe04134 msgid "" "If true, a dictionary with the following keys is returned: 'name' (font " "base name), 'ext' (font file extension), 'type' (font type), 'content' " @@ -5345,7 +5449,7 @@ msgstr "" "`True` の場合、次のキーを持つ辞書が返されます: 'name'(フォントのベース名)、 'ext'(フォントファイルの拡張子)、 " "'type'(フォントのタイプ)、 'content'(フォントファイルの内容)。" -#: ../../document.rst:1777 be98206ba685474b9db023132de29cce +#: ../../document.rst:1803 d418db8a63b94c2caac5f1effd542a11 #, fuzzy msgid "" "a tuple `(basename, ext, type, content)`, where *ext* is a 3-byte " @@ -5363,7 +5467,7 @@ msgstr "" "はフォントのタイプ(例:「Type1」)で、*content* はフォントファイルの内容を含むバイトオブジェクトです(または *b\"\"* " ")。可能な拡張子の値とその意味については :ref:`FontExtensions` を参照してください。エラー時の返り値の詳細:" -#: ../../document.rst:1777 0df39797510f47829cbc13919c270b17 +#: ../../document.rst:1803 e4ecc274179d4bbe96d0ebb132fc1670 msgid "" "a tuple `(basename, ext, type, content)`, where *ext* is a 3-byte " "suggested file extension (*str*), *basename* is the font's name (*str*), " @@ -5377,13 +5481,13 @@ msgstr "" "はフォントのタイプ(例:「Type1」)で、*content* はフォントファイルの内容を含むバイトオブジェクトです(または *b\"\"* " ")。可能な拡張子の値とその意味については :ref:`FontExtensions` を参照してください。エラー時の返り値の詳細:" -#: ../../document.rst:1779 1672c91944c746caa1a7ca1cca6958a6 +#: ../../document.rst:1805 ff2818d044fa4383b69ac0ee6aa70281 msgid "" "`(\"\", \"\", \"\", b\"\")` -- invalid xref or xref is not a (valid) font" " object." msgstr "`(\"\", \"\", \"\", b\"\")` – 無効な xref または xref が(有効な)フォントオブジェクトではない場合。" -#: ../../document.rst:1780 72c9507ce8234175addf7e59f69e0a78 +#: ../../document.rst:1806 9d33bfe772504f61b0c7b69ca54f7ecd msgid "" "`(basename, \"n/a\", \"Type1\", b\"\")` -- *basename* is not embedded and" " thus cannot be extracted. This is the case for e.g. the " @@ -5393,11 +5497,11 @@ msgstr "" "は埋め込まれておらず、したがって抽出できません。これは、例えば :ref:`Base-14-Fonts` フォントや Type 3 " "フォントの場合に該当します。" -#: ../../document.rst:1782 51ec2ab15b884162a29f075d69c41a3f +#: ../../document.rst:1808 8535e1de2d1f4c1787b82ba79e94aeaf msgid "Example:" msgstr "例:" -#: ../../document.rst:1791 814f414d7b1f4ae58049af338343c8bc +#: ../../document.rst:1817 b1ee580e36614da38b63b42d9e2c408e msgid "" "The basename is returned unchanged from the PDF. So it may contain " "characters (such as blanks) which may disqualify it as a filename for " @@ -5406,13 +5510,13 @@ msgstr "" "*ベースネーム* は PDF から変更されずに返されます。そのため、それには (空白などの) " "ファイル名として使用できない文字が含まれている可能性があります。適切な措置を取ってください。" -#: ../../document.rst:1794 76ed8f74c27b43a798d369a9aa5c7c4b +#: ../../document.rst:1820 229b42ffbe404889b9cfe652193a8bea msgid "" "The returned *basename* in general is **not** the original file name, but" " it probably has some similarity." msgstr "通常、返される *ベースネーム* は元のファイル名ではなく、いくつかの類似性があるかもしれません。" -#: ../../document.rst:1795 e0917cd862f9469ca400d362f472f218 +#: ../../document.rst:1821 56b4bdd66e364960a6f523e14f5a5864 msgid "" "If parameter `named == True`, a dictionary with the following keys is " "returned: `{'name': 'T1', 'ext': 'n/a', 'type': 'Type3', 'content': " @@ -5421,31 +5525,31 @@ msgstr "" "`named == True` の場合、次のキーを持つ辞書が返されます: `{'name': 'T1', 'ext': 'n/a', " "'type': 'Type3', 'content': b''}`。" -#: ../../document.rst:1802 fd18e26167c6409aacbeb3d3412ccec7 +#: ../../document.rst:1828 f5ee8f1765344460b1f72a694be0dcc5 msgid "PDF only: Return the :data:`xref` of the document's XML metadata." msgstr "PDF のみ: ドキュメントの XML メタデータの :data:`xref` を返します。" -#: ../../document.rst:1811 e87fd285f4d5462d9f0c54c179f7bd53 +#: ../../document.rst:1837 3bc7c8decb7b41a1967751004cb7a16e msgid "" "PDF only: Check whether there are links, resp. annotations anywhere in " "the document." msgstr "PDF のみ: ドキュメント内にリンクまたは注釈が存在するかどうかを確認します。" -#: ../../document.rst:1813 835781f5d5f24293baf039bb48244263 +#: ../../document.rst:1839 83ea1c4b222140c49a97cf7bece5dd05 msgid "" -"*True* / *False*. As opposed to fields, which are also stored in a " +"``True`` / ``False``. As opposed to fields, which are also stored in a " "central place of a PDF document, the existence of links / annotations can" " only be detected by parsing each page. These methods are tuned to do " -"this efficiently and will immediately return, if the answer is *True* for" -" a page. For PDFs with many thousand pages however, an answer may take " -"some time [#f6]_ if no link, resp. no annotation is found." +"this efficiently and will immediately return, if the answer is ``True`` " +"for a page. For PDFs with many thousand pages however, an answer may take" +" some time [#f6]_ if no link, resp. no annotation is found." msgstr "" -"*True* / *False* 。フィールドとは異なり、リンクや注釈の存在は PDF " +"``True`` / ``False`` 。フィールドとは異なり、リンクや注釈の存在は PDF " "ドキュメントの中心的な場所に格納されているわけではなく、各ページを解析してのみ検出できます。これらのメソッドは効率的に実行するように調整されており、ページに対して" -" *True* の回答がある場合、すぐに返されます。ただし、多くのページを持つ PDF " +" ``True`` の回答がある場合、すぐに返されます。ただし、多くのページを持つ PDF " "の場合、リンクや注釈が見つからない場合、回答に時間がかかることがあります [#f6]_。" -#: ../../document.rst:1818 ca428b139b5a4bf5b5a430f8356eb702 +#: ../../document.rst:1844 59f96b58568e4e428c9c1e21712318a5 msgid "" "PDF only: Investigate eligible fonts for their use by text in the " "document. If a font is supported and a size reduction is possible, that " @@ -5454,17 +5558,17 @@ msgstr "" "PDF のみ: " "ドキュメント内のテキストによる使用を検討するための適格なフォントを調査します。サポートされているフォントで、サイズの削減が可能な場合、そのフォントは文字のサブセットを含むバージョンで置換されます。" -#: ../../document.rst:1820 53761ab8e0944d7d97a37133426bf053 +#: ../../document.rst:1846 a9ed3a66d31a41618be1bdfc1e160d89 msgid "Use this method immediately before saving the document." msgstr "このメソッドは、ドキュメントを保存する直前に使用します" -#: ../../document.rst:1822 54639e64f5544d1fbf91659555b6050a +#: ../../document.rst:1848 e6c74fb06afe4b3e9cace5df8c49914f msgid "" "write various progress information to sysout. This currently only has an " "effect if `fallback` is `True`." msgstr "さまざまな進行状況情報を sysout に書き込みます。現在、これは `fallback` が `True` の場合にのみ効果があります。" -#: ../../document.rst:1823 57c78179045e4744aa856a49760d808e +#: ../../document.rst:1849 a90de8c245eb47b99d1752fe0de85df8 msgid "" "if `True` use the deprecated algorithm that makes use of package " "`fontTools `_ (which hence must be " @@ -5478,7 +5582,7 @@ msgstr "" "のネイティブ関数が使用されます。これは非常に高速で、より広範なフォントタイプをサブセット化できます。この場合、パッケージ fontTools " "は必要ありません。" -#: ../../document.rst:1825 a1b795927e4b440ba1ce1976822e53d6 +#: ../../document.rst:1851 1a7cb8534e5c46f19590403b54ef074f msgid "" "The greatest benefit can be achieved when creating new PDFs using large " "fonts like is typical for Asian scripts. When using the :ref:`Story` " @@ -5489,7 +5593,7 @@ msgstr "" "クラスまたはメソッド :meth:`Page.insert_htmlbox` " "を使用する場合、複数のフォントが自動的に含まれる場合がありますが、プログラマーが気付かない場合もあります。" -#: ../../document.rst:1827 447ebb4264df48d7979a981655d7e3e9 +#: ../../document.rst:1853 997c9fd6bbde438f9c43d3d0ee42963c msgid "" "In all these cases, the set of actually used unicodes mostly is very " "small compared to the number of glyphs available in the used fonts. Using" @@ -5500,7 +5604,7 @@ msgstr "" "これらのすべての場合、実際に使用される Unicode " "のセットは、使用されるフォントの使用可能なグリフの数に比べて非常に小さいことがほとんどです。このメソッドを使用すると、埋め込まれたフォントのバイナリを容易に2桁のキロバイト量にまで減らすことができます。" -#: ../../document.rst:1829 c4f73a45ac054d73ac193830aa9a09ac +#: ../../document.rst:1855 31e85330a1524939a2a3ed0807433ec5 msgid "" "Creating font subsets leaves behind a large number of large, now unused " "PDF objects (\"ghosts\"). Therefore, make sure to compress and garbage-" @@ -5511,42 +5615,42 @@ msgstr "" "オブジェクト(「ゴースト」)が残ります。そのため、ファイルを保存する際に圧縮およびガベージコレクトを行ってください。:meth:`Document.ez_save`" " の使用をお勧めします。" -#: ../../document.rst:1831 7155536b37af44189453db97eecda570 +#: ../../document.rst:1857 e7b42869145d4d2f9217a7bfce00aba9 msgid "|history_begin|" msgstr "" -#: ../../document.rst:1834 781950250b304b5b8701ea72b73892c0 +#: ../../document.rst:1860 dd414b262d654d37af1c10d6292b6773 msgid "Changed in v1.18.9" msgstr "v1.18.9で変更" -#: ../../document.rst:1835 fd4e165fc61f481297786a8f1e1335cb +#: ../../document.rst:1861 7a1af6d710284fa9bfb416a88abb494a msgid "Changed in v1.24.2 use native function of MuPDF." msgstr "v1.24.2 で変更され、MuPDF のネイティブ機能を使用するようになりました。" -#: ../../document.rst:1837 170353644e284e4b8ad44b07c073e6fd +#: ../../document.rst:1863 7e539c977c0b42c7b31af48f1c4c68ce msgid "|history_end|" msgstr "" -#: ../../document.rst:1842 ../../document.rst:1848 ../../document.rst:1855 -#: ../../document.rst:1862 ../../document.rst:1871 ../../document.rst:1878 -#: ../../document.rst:1887 ../../document.rst:1894 ../../document.rst:1901 -#: ../../document.rst:1910 ../../document.rst:1919 -#: 180f246587c94781aeaf94096cc0ea7c 23dae2def30e45e694ccdccd247b22fe -#: 277cb04b6a9d44f480b9b651bb09b7a4 4e7aab2c244a412fab71291c05691eae -#: 6ff287e8bb464d8687220caf8d70bc2c 7e055c0fd5db40cd9dbeb741b8fcaa1c -#: 8b9d2d60e8324aeb8e1accca5dab71e6 91ecb16fa9934b9e896fa3254264ca10 -#: 9de5ef4eb70f41b4932ac6c3ee91252d a40968664aff4ffda7b4ac0b4818691a -#: eab76d52704d4d9dbd368fa5b216fc73 +#: ../../document.rst:1868 ../../document.rst:1874 ../../document.rst:1881 +#: ../../document.rst:1888 ../../document.rst:1897 ../../document.rst:1904 +#: ../../document.rst:1913 ../../document.rst:1920 ../../document.rst:1927 +#: ../../document.rst:1936 ../../document.rst:1945 +#: 134b144f37c3455da3ec93f70f27276f 39e7cbe6c2474316b6c9fc99383efe76 +#: 44d241e5e38b48aca82290625d04112c 588e2116a323410ebb522ae9ce502dad +#: 5fe09ca4168c4ff38669cce32efa5023 6177169626d04870a257a387d1540d3f +#: 929e0adce63142fba8d8529664d15e11 92bfdc79266f4e24bbb782fccff67205 +#: c374df25a8944351a350e6977af4c6df c9d54685fa7e48738fdcf99788045578 +#: f3f00fcdf6434f9a8d759354cb52b541 msgid "New in v1.19.0" msgstr "v1.19.0 で新規追加" -#: ../../document.rst:1844 e4058eee09c2444482826b98db9177b8 +#: ../../document.rst:1870 5f34db045fd54cf1abcf901da92df76b msgid "" "PDF only: Enable journalling. Use this before you start logging " "operations." msgstr "PDF のみ: ジャーナリングを有効にします。ログ操作を開始する前にこれを使用します。" -#: ../../document.rst:1850 23a889360782439da41e5f6c8d27ff76 +#: ../../document.rst:1876 6ff50c67b9d1453891f1b22d5e619bec msgid "" "PDF only: Start journalling an *\"operation\"* identified by a string " "\"name\". Updates will fail for a journal-enabled PDF, if no operation " @@ -5555,20 +5659,20 @@ msgstr "" "PDF のみ: 文字列 \"name\" で識別される *\"操作\"* のジャーナリングを開始します。ジャーナリングが有効な PDF " "に対しては、操作が開始されていない場合、更新が失敗します。" -#: ../../document.rst:1857 850a59063d2e46378a0d41e87f9b4dfd +#: ../../document.rst:1883 0b85789997a34ddeb767c2eff02767e5 msgid "" "PDF only: Stop the current operation. The updates between start and stop " "of an operation belong to the same unit of work and will be undone / " "redone together." msgstr "PDF のみ: 現在の操作を停止します。操作の開始から終了までの間の更新は、同じユニットの作業に属し、一緒に元に戻される / やり直されます。" -#: ../../document.rst:1864 a6a40fdc8b8949c59b34df0881b41dd3 +#: ../../document.rst:1890 4771694b094349ff9dbd48caa537ed8b msgid "" "PDF only: Return the numbers of the current operation and the total " "operation count." msgstr "PDF のみ: 現在の操作番号と総操作数を返します。" -#: ../../document.rst:1866 176d1ca31aec47b0a11ce114d9320045 +#: ../../document.rst:1892 3e61c0d7bb2940ac8a92d69b5de2f9a6 msgid "" "a tuple `(step, steps)` containing the current operation number and the " "total number of operations in the journal. If **step** is 0, we are at " @@ -5583,45 +5687,45 @@ msgstr "" "と等しい場合、ジャーナルの末尾にいることを示します。undo または redo 以外の何かで PDF " "を更新すると、現在のエントリ以降のすべてのジャーナルエントリが自動的に削除され、新しい更新がジャーナルの新しい最後のエントリになります。削除されたジャーナルエントリに対応する更新は永久に失われます。" -#: ../../document.rst:1873 6c4a6e7557474fb9a9602ca2d65b8dd1 +#: ../../document.rst:1899 7351954a6f184a1b91e20ccf82194e9d msgid "PDF only: Return the name of operation number *step.*" msgstr "PDF のみ: 操作番号 *step* の操作名を返します。" -#: ../../document.rst:1880 de7c8bd7348d4892bba401d983612501 +#: ../../document.rst:1906 0030e540718549a2b02199f54a9803f3 msgid "" "PDF only: Show whether forward (\"redo\") and / or backward (\"undo\") " "executions are possible from the current journal position." msgstr "PDF のみ: 現在のジャーナル位置から前方(\"やり直し\")および後方(\"元に戻す\")の実行が可能かどうかを表示します。" -#: ../../document.rst:1882 e56683d2734c4cae8dfd91887145bafc +#: ../../document.rst:1908 6365fcc2558a4a63abc8665e14a07de3 msgid "" "a dictionary `{\"undo\": bool, \"redo\": bool}`. The respective method is" " available if its value is `True`." msgstr "`{\"undo\": bool, \"redo\": bool}` 形式の辞書。各メソッドはその値が `True` の場合に利用可能です。" -#: ../../document.rst:1889 a6be3f00987840ad9edc1a702be999c4 +#: ../../document.rst:1915 889f26f9d92e48dc9c535ab16045bc6c msgid "" "PDF only: Revert (undo) the current step in the journal. This moves " "towards the journal's top." msgstr "PDF のみ: ジャーナル内の現在のステップを元に戻します(元に戻す)。これにより、ジャーナルの先頭に向かって移動します。" -#: ../../document.rst:1896 2a2258ad23004d0c90c475d80da646f3 +#: ../../document.rst:1922 7945421689274307a8689bf3deb0a153 msgid "" "PDF only: Re-apply (redo) the current step in the journal. This moves " "towards the journal's bottom." msgstr "PDF のみ:現在のステップをジャーナルのボトムに戻して再適用します。" -#: ../../document.rst:1903 352ebe2b81f6497fa7cf0b78561ac93f +#: ../../document.rst:1929 1cc46a714d7144beb37789a07730ec12 msgid "PDF only: Save the journal to a file." msgstr "PDF のみ:ジャーナルをファイルに保存します。" -#: ../../document.rst:1905 6e4239d5aef14e6fb022359f774f2c86 +#: ../../document.rst:1931 a89dc948eea94659b2d4d21afcf75782 msgid "" "either a filename as string or a file object opened as \"wb\" (or an " "`io.BytesIO()` object)." msgstr "文字列としてのファイル名または \"wb\" で開かれたファイルオブジェクト (または `io.BytesIO()` オブジェクト)。" -#: ../../document.rst:1912 aba05cb85a5f410e8acce506f702948d +#: ../../document.rst:1938 d7214c5f077d480d8ee2e10beb2b36f9 msgid "" "PDF only: Load journal from a file. Enables journalling for the document." " If journalling is already enabled, an exception is raised." @@ -5629,13 +5733,13 @@ msgstr "" "PDF " "のみ:ファイルからジャーナルを読み込みます。ドキュメントのジャーナリングを有効にします。既にジャーナリングが有効になっている場合、例外が発生します。" -#: ../../document.rst:1914 6ca45598ca094919b523e4a9f918c97a +#: ../../document.rst:1940 ec37c90326cc4e7fa50fd0849adddb51 msgid "" "the filename (str) of the journal or a file object opened as \"rb\" (or " "an `io.BytesIO()` object)." msgstr "ジャーナルのファイル名 (str) または \"rb\" で開かれたファイルオブジェクト (または `io.BytesIO()` オブジェクト)。" -#: ../../document.rst:1921 1b44a32c60b14ef59d198c2fe57faeae +#: ../../document.rst:1947 40a6123027074b8484b5e4701e8385ed msgid "" "PDF only: Saves a \"snapshot\" of the document. This is a PDF document " "with a special, incremental-save format compatible with journalling -- " @@ -5645,7 +5749,7 @@ msgstr "" "PDF のみ:ドキュメントの「スナップショット」を保存します。これは、ジャーナリングと互換性のある特別なインクリメンタルセーブ形式を持つ PDF " "ドキュメントです。そのため、セーブオプションは利用できません。新しいドキュメントにはスナップショットを保存することはできません。" -#: ../../document.rst:1923 be5a55c0b9bd47a4976fecee46bfc4ed +#: ../../document.rst:1949 a2b97da070ba4261906f3c43a837a36e msgid "" "This is a normal PDF document with no usage restrictions whatsoever. If " "it is not being changed in any way, it can be used together with its " @@ -5654,7 +5758,7 @@ msgstr "" "これは通常の PDF " "ドキュメントで、制限はありません。何も変更されていない場合、そのスナップショットはジャーナルと共に操作を元に戻したり、やり直したり、更新を続けたりするために使用できます。" -#: ../../document.rst:1928 c60383c6d19d434e86ab80f9d7f179a4 +#: ../../document.rst:1954 2431d2fb78d34d04a30cfc26a1ca2bcb msgid "" "Contains the first :ref:`Outline` entry of the document (or `None`). Can " "be used as a starting point to walk through all outline items. Accessing " @@ -5665,115 +5769,115 @@ msgstr "" "`None`)。すべてのアウトラインアイテムを歩く出発点として使用できます。暗号化された、認証されていないドキュメントに対してこのプロパティにアクセスすると、*AttributeError*" " が発生します。" -#: ../../document.rst 06a350f75e374326aa4a6b1218266021 -#: 10d8a826100645bb8b74c4a2f42ade5c 127c4d1964cd481690b31368aff15542 -#: 2453b589e95e4adf964519031cecd2e3 255c433dd8a847ab949623cda743f1ef -#: 3b1919959fd544fe9e4a43bca0b4a5b6 3dee65a136af4abfb4ba61c9115f440a -#: 48da4e25f3de406eb2a9dcf271e82dfe 49fd26c6d0624bc8a257944040b1710f -#: 56a8a9ac66c347a5aebf5df6828295fc 5f61b08fddeb4e49b9d495c3091ec62a -#: 6648b5f2744b44d584e68bcf57d81717 7332926e4a4146b6bd5549700b1afdfc -#: 825b8c2a33754627a5d22269be52d766 916132a8b3314c919f00b767e719dbca -#: 97c90b52e4f14fc08a254c1f74546eb3 b3179404dc924bd78bfbcde6aea91cd2 -#: b3d71dbd71de4895a11eb7772cdba015 ba94c3b0dabf4f7880b889f6b0a03afd -#: bf73d12c54ad4492ab6dbe33dee0e1dd d2d9d177786746f0b877a00689e1ca55 +#: ../../document.rst 0425d6e823a049a58b3910948b859aac +#: 1a4c62f1f72547b28e337c09591fa4e3 22441097973c4c78a00bda60bb5b4b0a +#: 2a65fb9679e2422fa9a7e472a4674547 36df541fa177422fa6a1525f979fcd83 +#: 3c03be6185ec4eb1b121534a7f792853 82f9cd8d045845d0bdfd4f280aa0ad74 +#: 8c39c9ab02724cde8fbeac515bee65a0 932eb1e01abf4958907b24da9d2d0e16 +#: 9a6c05b88750437fa179d989e3edefcf a07df30a3dcf4033a2406acba7ee0b7d +#: a8cb1ffeb1f040fa8b730813e32f0122 ade9e281bfc64dc9b77c7e42a8f9f807 +#: b11dbf9a5df64369b2e3ae2e4491c99d b199035444494d29bd28c8629d429e4f +#: b603735f2cc64db598488fd2680cdc91 b961708a486a439faee6eb85cce60019 +#: c44492122ef943db8db2e8b9efd056e0 e46abe91945844eb8cc104c103211276 +#: edcee78110e840b4a187183ce9df3b5d f94ec6831ed84a0082a17f0c5455a30e msgid "type" msgstr "タイプ" -#: ../../document.rst:1930 34bda8fcf4c64385ae1a0731bbacb8b2 +#: ../../document.rst:1956 572eb577537b4bcb9d607b838aedc0ca msgid ":ref:`Outline`" msgstr "" -#: ../../document.rst:1934 4b92693a3b2c40ee8632e7a98266127f +#: ../../document.rst:1960 3873056a822545e3be2b362c2fe48a3c msgid "" -"*False* if document is still open. If closed, most other attributes and " -"methods will have been deleted / disabled. In addition, :ref:`Page` " +"``False`` if document is still open. If closed, most other attributes and" +" methods will have been deleted / disabled. In addition, :ref:`Page` " "objects referring to this document (i.e. created with " ":meth:`Document.load_page`) and their dependent objects will no longer be" " usable. For reference purposes, :attr:`Document.name` still exists and " "will contain the filename of the original document (if applicable)." msgstr "" -"もし文書がまだ開いている場合は *False* " +"もし文書がまだ開いている場合は ``False`` " "です。閉じた場合、他のほとんどの属性やメソッドが削除されたり無効になります。また、この文書を参照する :ref:`Page` " "オブジェクト(すなわち :meth:`Document.load_page` " "で作成されたもの)とそれに依存するオブジェクトは利用できなくなります。参照用に、:attr:`Document.name` " "はまだ存在し、元の文書のファイル名が含まれます(該当する場合)。" -#: ../../document.rst:1936 ../../document.rst:1942 ../../document.rst:1948 -#: ../../document.rst:1962 ../../document.rst:1970 ../../document.rst:1978 -#: ../../document.rst:2016 ../../document.rst:2022 -#: 0c5033988d4644b6b5101dff3a811e61 0dc4753e0b194e7885a16ebf93200866 -#: 1cfded9c6b2c49c69df0ead685d5f75b 6093ab4aee8646ff9ea4673e83d74352 -#: b4e0e80488ef4794b3cbc4dc1a456598 c562bc500a594d0ab8aeb6d2c6206873 -#: ded98ac86ffb42c18eae5b9c15753f9a f2bdfe615738402196b027dac0bcd275 +#: ../../document.rst:1962 ../../document.rst:1968 ../../document.rst:1974 +#: ../../document.rst:1988 ../../document.rst:1996 ../../document.rst:2004 +#: ../../document.rst:2042 ../../document.rst:2048 +#: 0e0ecaeba1354583ab141694171983c1 15ecbd8f8b4e4f66838e84f048c23ac0 +#: 20ed8a1d74d64f768927618f4c8d5775 36c5bd4e96bb49b3974eb537d041b2b9 +#: 8b931470fbff4a78af465bc20f1b4bc5 ab529e3a588f4da89688c075525eca3b +#: b9b48ab1190d4eb0b0555c8b5504ff7e e204fe7e86144f0b89219e2564b70ef4 msgid "bool" msgstr "" -#: ../../document.rst:1940 a2ac90eca9934e1aaad6d0af94528bcb +#: ../../document.rst:1966 2500215d97e14534a9e2da08bbe6a2ea msgid "" -"*True* if this is a PDF document and contains unsaved changes, else " -"*False*." -msgstr "これがPDFドキュメントであり、保存されていない変更が含まれている場合は *True* 、それ以外は *False* です。" +"``True`` if this is a PDF document and contains unsaved changes, else " +"``False``." +msgstr "これがPDFドキュメントであり、保存されていない変更が含まれている場合は ``True`` 、それ以外は ``False`` です。" -#: ../../document.rst:1946 1dd1dc093e574efeaa9fe2ae814eb7b8 -msgid "*True* if this is a PDF document, else *False*." -msgstr "これがPDFドキュメントである場合は *True* 、それ以外は *False* です。" +#: ../../document.rst:1972 1c51427200a443b3b3ca741816eab527 +msgid "``True`` if this is a PDF document, else ``False``." +msgstr "これがPDFドキュメントである場合は ``True`` 、それ以外は ``False`` です。" -#: ../../document.rst:1952 1931e87700ad4cd7ad416eee51e0d0ae +#: ../../document.rst:1978 01ec2efd01e14c3691724a5e542f728b msgid "" -"*False* if this is not a PDF or has no form fields, otherwise the number " -"of root form fields (fields with no ancestors)." +"``False`` if this is not a PDF or has no form fields, otherwise the " +"number of root form fields (fields with no ancestors)." msgstr "" -"これがPDFでないか、フォームフィールドが含まれていない場合は *False* " +"これがPDFでないか、フォームフィールドが含まれていない場合は ``False`` " "であり、それ以外の場合はルートフォームフィールド(祖先のないフィールド)の数です。" -#: ../../document.rst:1954 f0c08b7fdfc547dea287ea469b2d2f99 +#: ../../document.rst:1980 fb2835699f1a4d2e91cbeaca4ff3e396 msgid "*(Changed in v1.16.4)* Returns the total number of (root) form fields." msgstr "*(v1.16.4で変更)* (ルート)フォームフィールドの合計数を返します。" -#: ../../document.rst:1956 e5f33c4c4f904aa39a65dfe9b9db4bfb +#: ../../document.rst:1982 2be18a9939df43299855a8423e99ec64 msgid "bool,int" msgstr "" -#: ../../document.rst:1960 b33491644eda4ccba4df8a5f5aaff67f +#: ../../document.rst:1986 47fe05ac74a645bf862a453c4b9ef5ea msgid "" -"*True* if document has a variable page layout (like e-books or HTML). In " -"this case you can set the desired page dimensions during document " +"``True`` if document has a variable page layout (like e-books or HTML). " +"In this case you can set the desired page dimensions during document " "creation (open) or via method :meth:`layout`." msgstr "" -"文書が可変ページレイアウト(電子書籍やHTMLのような)を持つ場合は *True* です。この場合、文書の作成(オープン)時または " +"文書が可変ページレイアウト(電子書籍やHTMLのような)を持つ場合は ``True`` です。この場合、文書の作成(オープン)時または " ":meth:`layout` メソッドを使用して所望のページ寸法を設定できます。" -#: ../../document.rst:1966 57f5d4584063496c905f4f9be9ad6176 +#: ../../document.rst:1992 3305b89decd6493881920df4d4242e8d msgid "New in v1.18.2" msgstr "v1.18.2で新しく追加されました。" -#: ../../document.rst:1968 40e99767ae8b41159c6739db5926f21e +#: ../../document.rst:1994 126148a54fe24c0ea75ba68040b25524 msgid "" -"*True* if PDF has been repaired during open (because of major structure " -"issues). Always *False* for non-PDF documents. If true, more details have" -" been stored in `TOOLS.mupdf_warnings()`, and " -":meth:`Document.can_save_incrementally` will return *False*." +"``True`` if PDF has been repaired during open (because of major structure" +" issues). Always ``False`` for non-PDF documents. If true, more details " +"have been stored in `TOOLS.mupdf_warnings()`, and " +":meth:`Document.can_save_incrementally` will return ``False``." msgstr "" -"PDFがオープン時に修復された場合は *True* です(主要な構造上の問題のため)。非PDF文書の場合は常に *False* です。*True*" -" の場合、詳細は `TOOLS.mupdf_warnings()` " -"に保存され、:meth:`Document.can_save_incrementally` は *False* を返します。" +"PDFがオープン時に修復された場合は ``True`` です(主要な構造上の問題のため)。非PDF文書の場合は常に ``False`` " +"です。``True`` の場合、詳細は `TOOLS.mupdf_warnings()` " +"に保存され、:meth:`Document.can_save_incrementally` は ``False`` を返します。" -#: ../../document.rst:1976 e1375e94e6e04849b6f348dfd4dbef0e -msgid "*True* if PDF is in linearized format. *False* for non-PDF documents." -msgstr "PDFが直線化形式である場合は *True* です。非PDF文書の場合はFalseです。" +#: ../../document.rst:2002 02a31170430a4f788d99c01c7f635162 +msgid "``True`` if PDF is in linearized format. ``False`` for non-PDF documents." +msgstr "PDFが直線化形式である場合は ``True`` です。非PDF文書の場合はFalseです。" -#: ../../document.rst:1984 2afa57ff2bcb49df9aab9875c47b5978 +#: ../../document.rst:2010 e99a659b3fa643b6accb313197214579 msgid "" "A dictionary indicating the `/MarkInfo` value. If not specified, the " "empty dictionary is returned. If not a PDF, `None` is returned." msgstr "`/MarkInfo` の値を示す辞書です。指定されていない場合、空の辞書が返されます。PDFでない場合は `None` が返されます。" -#: ../../document.rst:1986 ../../document.rst:2050 -#: 63058add584c49fe8d08c58bafa36acd 972247950d444bdaad03e2290eb50a29 +#: ../../document.rst:2012 ../../document.rst:2076 +#: 0d6b84b0dcf64cc289c8dc99edf4b717 71735633a6684ca7b64ad390ad5a7b02 msgid "dict" msgstr "" -#: ../../document.rst:1992 1bcaa83287f64b559360db29819a54b0 +#: ../../document.rst:2018 c22caa728e4e41e2bede8158057b0b5a msgid "" "A string containing the `/PageMode` value. If not specified, the default " "\"UseNone\" is returned. If not a PDF, `None` is returned." @@ -5781,13 +5885,13 @@ msgstr "" "`/PageMode` の値を含む文字列です。指定されていない場合、デフォルトの「UseNone」が返されます。PDFでない場合、`None` " "が返されます。" -#: ../../document.rst:1994 ../../document.rst:2002 ../../document.rst:2056 -#: 3792033df0524492a5b82b00dd32daab 5ee7d72d9fca446492d2c969d3074a56 -#: 7890513dd9cb43db9d0afd03269943ca +#: ../../document.rst:2020 ../../document.rst:2028 ../../document.rst:2082 +#: 9630ce9d52334f899eab242a03d0900f be6f4cd8d5ee452896e80446905aa219 +#: e213aab4508c414a8b7f18d6667d0332 msgid "str" msgstr "" -#: ../../document.rst:2000 b56831ca388042829b3d62ee00fd9654 +#: ../../document.rst:2026 c7d730951aa94e158ce63b666f6b32d1 msgid "" "A string containing the `/PageLayout` value. If not specified, the " "default \"SinglePage\" is returned. If not a PDF, `None` is returned." @@ -5795,21 +5899,21 @@ msgstr "" "`/PageLayout` " "の値を含む文字列です。指定されていない場合、デフォルトの「SinglePage」が返されます。PDFでない場合、`None` が返されます。" -#: ../../document.rst:2008 4a0a07fdbbed448a939aef392b3aa215 +#: ../../document.rst:2034 6bbf43e44f1c4939900b41773ff54c2f msgid "" "An integer counting the number of versions present in the document. Zero " "if not a PDF, otherwise the number of incremental saves plus one." msgstr "ドキュメント内に存在するバージョンの数をカウントする整数です。PDFでない場合、ゼロです。それ以外の場合、増分保存の数に1を加えたものです。" -#: ../../document.rst:2010 ../../document.rst:2030 ../../document.rst:2062 -#: ../../document.rst:2070 ../../document.rst:2078 -#: 064115c213e44362adde86a5417df232 07610b17d16540639cc0c0695f472e64 -#: 481436e5abd94b4eb08d0d36e146ff7d 78f84643bba146db9e45f99d5706fa7a -#: 98d15d990a8646419824fd8ce2285e47 +#: ../../document.rst:2036 ../../document.rst:2056 ../../document.rst:2088 +#: ../../document.rst:2096 ../../document.rst:2104 +#: 76db5832ec704f76968f4723517561f9 941e976c3d4242328e6907e519764906 +#: 9fcfff7a1a934e62872e49af7ebde2fd ad836f1a022c45c18d8eeb69062240dd +#: b1728f5baab047d0bc4679129588efa9 msgid "int" msgstr "" -#: ../../document.rst:2014 645cce06a9d3485ca614f4c4041ffd9d +#: ../../document.rst:2040 fd94bdde1af14fcfa8e9e04928beafe4 msgid "" "Indicates whether the document is password-protected against access. This" " indicator remains unchanged -- **even after the document has been " @@ -5818,21 +5922,22 @@ msgstr "" "ドキュメントがアクセス制限のあるパスワードで保護されているかどうかを示します。この指示は、**ドキュメントが認証された後も** 変更されません。 " "`True` の場合、増分保存が不可能です。" -#: ../../document.rst:2020 45cb1bca4b714c4b9799812f7954a9d3 +#: ../../document.rst:2046 53fe029c3f12452dbaac145e9a48899a msgid "" "This indicator initially equals :attr:`Document.needs_pass`. After " -"successful authentication, it is set to *False* to reflect the situation." +"successful authentication, it is set to ``False`` to reflect the " +"situation." msgstr "" -"この指示は、最初に :attr:`Document.needs_pass` と等しいです。認証が成功した後、状況を反映するために *False* " -"に設定されます。" +"この指示は、最初に :attr:`Document.needs_pass` と等しいです。認証が成功した後、状況を反映するために " +"``False`` に設定されます。" -#: ../../document.rst:2026 56b0dd3030c9409da215fee133f5f1ca +#: ../../document.rst:2052 5199386a13e6471ba15ecc69930ed35c msgid "" "Changed in v1.16.0: This is now an integer comprised of bit indicators. " "Was a dictionary previously." msgstr "" -#: ../../document.rst:2028 edafb6e6cdcd42dcae56bf7ab9745513 +#: ../../document.rst:2054 83c9a569a40e459383053082e7f988ec msgid "" "Contains the permissions to access the document. This is an integer " "containing bool values in respective bit positions. For example, if " @@ -5843,7 +5948,7 @@ msgstr "" "pymupdf.PDF_PERM_MODIFY > 0* " "の場合、ドキュメントを変更できます。詳細については、:ref:`PermissionCodes` を参照してください。" -#: ../../document.rst:2034 e0b07704b00547b7b69665fc20828866 +#: ../../document.rst:2060 d30b6615d8384ff88cd5d749383278f5 msgid "" "Contains the document's meta data as a Python dictionary or `None` (if " "*is_encrypted=True* and *needPass=True*). Keys are *format*, " @@ -5856,7 +5961,7 @@ msgstr "" "*format*、*encryption*、*title*、*author*、*subject*、*keywords*、*creator*、*producer*、*creationDate*、*modDate*、*trapped*" " です。すべてのアイテムの値は文字列または `None` です。" -#: ../../document.rst:2036 611d9f5760a64bab931a9ffc308b2ccb +#: ../../document.rst:2062 22a58e4fd9734362ae5a306ff4c5593c msgid "" "Except *format* and *encryption*, for PDF documents, the key names " "correspond in an obvious way to the PDF keys */Creator*, */Producer*, " @@ -5867,11 +5972,11 @@ msgstr "" "*/Creator*、*/Producer*、*/CreationDate*、*/ModDate*、*/Title*、*/Author*、*/Subject*、*/Trapped*、*/Keywords*" " に対応しています。" -#: ../../document.rst:2038 3a4ff86dd1d34107b077ca754e523fde +#: ../../document.rst:2064 ad7c4d5d9fae4f0e898ac385bd7f8482 msgid "*format* contains the document format (e.g. 'PDF-1.6', 'XPS', 'EPUB')." msgstr "*format* には文書のフォーマット(例: 'PDF-1.6'、'XPS'、'EPUB')が含まれます。" -#: ../../document.rst:2040 7f4ed5f410f04c0bbdbd486e4a6e88f8 +#: ../../document.rst:2066 8dffab4742e1469397b2815626d806bf msgid "" "*encryption* either contains `None` (no encryption), or a string naming " "an encryption method (e.g. *'Standard V4 R4 128-bit RC4'*). Note that an " @@ -5884,7 +5989,7 @@ msgstr "" "の場合でも暗号化メソッドが指定される場合があります。その場合、すべての権限が付与されていない可能性があります。詳細は " ":attr:`Document.permissions` を確認してください。" -#: ../../document.rst:2042 1470f66167fe45b68b8589ee665c85b7 +#: ../../document.rst:2068 5f01390fc6d54c90b8256b82a6426d0a msgid "" "If the date fields contain valid data (which need not be the case at " "all!), they are strings in the PDF-specific timestamp format " @@ -5893,7 +5998,7 @@ msgstr "" "日付フィールドに有効なデータが含まれている場合(必ずしもそうである必要はありません!)、それらは PDF 固有のタイムスタンプ形式 " "\"D:\" の文字列です。" -#: ../../document.rst:2044 ae20c764f2ea47d48d7c3db73355019f +#: ../../document.rst:2070 86e562f458934d1c9608459d1de68ad0 msgid "" " is the 12 character ISO timestamp *YYYYMMDDhhmmss* (*YYYY* - year, " "*MM* - month, *DD* - day, *hh* - hour, *mm* - minute, *ss* - second), and" @@ -5901,7 +6006,7 @@ msgstr "" " は 12 文字の ISO タイムスタンプ YYYYMMDDhhmmss(*YYYY* - 年、*MM* - 月、*DD* - " "日、*hh* - 時、*mm* - 分、*ss* - 秒)であり、" -#: ../../document.rst:2046 cb2a41df4ca94700a4677429dbb0cad0 +#: ../../document.rst:2072 fcdfa6bbcaea4438a9be956c698c4c0e msgid "" " is a time zone value (time interval relative to GMT) containing a " "sign ('+' or '-'), the hour (*hh*), and the minute (*'mm'*, note the " @@ -5910,7 +6015,7 @@ msgstr "" " は GMT に対する時刻間隔を示す符号('+' または " "'-')、時間(*hh*)、および分(*'mm'*、アポストロフィに注意!)を含むタイムゾーン値です。" -#: ../../document.rst:2048 c03123dc7a984e82a6bb807ff3e067d9 +#: ../../document.rst:2074 0dc32bcac0904847ab80467d283ef68c msgid "" "A Paraguayan value might hence look like *D:20150415131602-04'00'*, which" " corresponds to the timestamp April 15, 2015, at 1:16:02 pm local time " @@ -5919,24 +6024,24 @@ msgstr "" "したがって、パラグアイの値は *D:20150415131602-04'00'* となり、これは Asuncion の現地時間で 2015 年 4" " 月 15 日午後 1 時 16 分 02 秒を表します。" -#: ../../document.rst:2054 76aaf1b5da824af694001816f9724db1 +#: ../../document.rst:2080 3a01420c50284cf9b138a814b97cc015 msgid "" "Contains the *filename* or *filetype* value with which *Document* was " "created." msgstr "*Document* が作成された *ファイル名* または *ファイルタイプ* の値を含みます。" -#: ../../document.rst:2060 980bdb6b599a426eacfec7e050914326 +#: ../../document.rst:2086 9dc57ac338cf4bb1922bd5c6ad91a2f0 msgid "" "Contains the number of pages of the document. May return 0 for documents " "with no pages. Function `len(doc)` will also deliver this result." msgstr "文書のページ数を含みます。ページがない文書の場合は 0 を返す場合があります。`len(doc)` 関数もこの結果を返します。" -#: ../../document.rst:2066 ../../document.rst:2074 -#: 712f7745ddd440bf815d6873e4ce07da 7b7994b82f5f4075945774d173b07ea5 +#: ../../document.rst:2092 ../../document.rst:2100 +#: 27898a87a5c14c2797cf0d9fef76b091 b2439eb54f6a41b9a4717f3fcbcc3676 msgid "New in v1.17.0" msgstr "v1.17.0 で新たに追加されました" -#: ../../document.rst:2068 b2332ee492fd4cfc9c6b881e9539ceda +#: ../../document.rst:2094 c077ffc6f78c4072bac3d07e3de18bbd msgid "" "Contains the number of chapters in the document. Always at least 1. " "Relevant only for document types with chapter support (EPUB currently). " @@ -5945,7 +6050,7 @@ msgstr "" "文書の章の数を含みます。常に少なくとも 1 です。章のサポートがある文書タイプ(現在は EPUB のみ)にのみ関連します。その他の文書は 1 " "を返します。" -#: ../../document.rst:2076 e5a5bacd4cb6403b87033363ebc9ae72 +#: ../../document.rst:2102 177e4df3b4274e7eb9fdeb47f94ebbed msgid "" "Contains (chapter, pno) of the document's last page. Relevant only for " "document types with chapter support (EPUB currently). Other documents " @@ -5954,17 +6059,17 @@ msgstr "" "文書の最後のページの(章、pno)を含みます。章のサポートがある文書タイプ(現在は EPUB のみ)にのみ関連します。その他の文書は `(0, " "page_count - 1)` と `(0, -1)` を返します。" -#: ../../document.rst:2082 11194c34b83a4d8bb12a844292083d45 +#: ../../document.rst:2108 229315a297e647aeb533006453f78f80 msgid "" "A list of form field font names defined in the */AcroForm* object. `None`" " if not a PDF." msgstr "*/AcroForm* オブジェクトで定義されたフォームフィールドのフォント名のリストです。PDF でない場合は `None` です。" -#: ../../document.rst:2084 9402de0b203147248f38c1eaa6b7e625 +#: ../../document.rst:2110 59b7c20dd69b48cab5a65f4007b3ccd7 msgid "list" msgstr "" -#: ../../document.rst:2086 a8aeafade5854ab5972359b9a184c094 +#: ../../document.rst:2112 2c90af6b351d4361997ec7e629d4b6f0 msgid "" "For methods that change the structure of a PDF (:meth:`insert_pdf`, " ":meth:`select`, :meth:`copy_page`, :meth:`delete_page` and others), be " @@ -5982,11 +6087,11 @@ msgstr "" "オブジェクトとその子要素(リンク、注釈、ウィジェット)、古いページ数を保持する変数、目次などが含まれます。このような変数を最新の情報に保つか、孤立したオブジェクトを削除することを忘れないでください。:ref:`ReferenialIntegrity`" " も参照してください。" -#: ../../document.rst:2089 3f1d4818f922429988933fb09af483b1 +#: ../../document.rst:2115 de4984bdc6ed427aaeabcf57d6cd7207 msgid ":meth:`set_metadata` Example" msgstr ":meth:`set_metadata` の例" -#: ../../document.rst:2090 27fd99fd85be4b23a92e0264a44c862c +#: ../../document.rst:2116 79432e081e244f6c8b722e43ff9b7245 msgid "" "Clear metadata information. If you do this out of privacy / data " "protection concerns, make sure you save the document as a new file with " @@ -5998,11 +6103,11 @@ msgstr "" "でドキュメントを新しいファイルとして保存してから古い */Info* " "オブジェクトもファイルから物理的に削除されることを確認してください。この場合、いくつかのPDFエディタによって挿入されたXMLメタデータもクリアすることを検討するかもしれません。" -#: ../../document.rst:2108 d958f43414d142fc9ad2ed674d15ffea +#: ../../document.rst:2134 6a3b7a5cd55a41f59c8dc713dd50a750 msgid ":meth:`set_toc` Demonstration" msgstr ":meth:`set_toc` のデモンストレーション" -#: ../../document.rst:2109 1760b4409eef4c1d8224e38060614a7d +#: ../../document.rst:2135 8382f77c041647f1b4d870c36908eabc msgid "" "This shows how to modify or add a table of contents. Also have a look at " "`import.py `_ " "も参照してみてください。" -#: ../../document.rst:2129 e325dd734d244d588b092396af60cded +#: ../../document.rst:2155 d2292f38b140476b980712ef37997a9e msgid ":meth:`insert_pdf` Examples" msgstr ":meth:`insert_pdf` の例" -#: ../../document.rst:2130 ac7803722a684a98b10a0d04d5077a62 +#: ../../document.rst:2156 6b959bd7cea34677878c2aea2d404c28 msgid "**(1) Concatenate two documents including their TOCs:**" msgstr "**(1)2つの文書を連結して、それぞれの目次を含める:**" -#: ../../document.rst:2142 ab522672708b45858758b348cbb4b1fc +#: ../../document.rst:2168 0ff20ee002e14e60bcd4138a25d8cf41 msgid "" "Obviously, similar ways can be found in more general situations. Just " "make sure that hierarchy levels in a row do not increase by more than " @@ -6040,27 +6145,27 @@ msgstr "" " `join.py `_ で見つけることができます。" -#: ../../document.rst:2144 5b4243ea85a7443da60ad0ff02c46bba +#: ../../document.rst:2170 4f4610a44e0c4e7e817696b6550ea5d6 msgid "**(2) More examples:**" msgstr "**(2)その他の例:**" -#: ../../document.rst:2156 304e27c6daa64be08219f49226315f40 +#: ../../document.rst:2182 47d56d0345d64fab86db840c51a5379a msgid "Other Examples" msgstr "他の例" -#: ../../document.rst:2157 3d1c98bcd6824881a93d11ce9bab85c9 +#: ../../document.rst:2183 7faf6f3e99f0428498f9bce29d851f8c msgid "**Extract all page-referenced images of a PDF into separate PNG files**::" msgstr "**PDF内のすべてのページ参照画像を個別のPNGファイルに抽出します**::" -#: ../../document.rst:2172 0fe74130f6f147f0adc612a214f4fe44 +#: ../../document.rst:2198 1bb439a9b34d45008b0859967d3af58f msgid "**Rotate all pages of a PDF:**" msgstr "**PDFのすべてのページを回転させます:**" -#: ../../document.rst:2177 bbb2c90f34aa4494ad55f476fdccc684 +#: ../../document.rst:2203 9b472940853140af99232c7023957677 msgid "Footnotes" msgstr "脚注" -#: ../../document.rst:2178 aedf9a4ebdb8447ab08f282716a74468 +#: ../../document.rst:2204 07f097f7dd634f1f8949fb889cf944ec msgid "" "Content streams describe what (e.g. text or images) appears where and how" " on a page. PDF uses a specialized mini language similar to PostScript to" @@ -6070,7 +6175,7 @@ msgstr "" "コンテンツストリームは、ページ上に何が表示され、どのように表示されるかを説明します。PDFは、ページが読み込まれると解釈される、PostScriptに似た専門のミニ言語を使用しています(:ref:`AdobeManual`" " のpp. 643)。" -#: ../../document.rst:2180 4212bd28e15042b0a07280031fb06f17 +#: ../../document.rst:2206 75d56f01fa284bfe8e248978b604f238 msgid "" "However, you **can** use :meth:`Document.get_toc` and " ":meth:`Page.get_links` (which are available for all document types) and " @@ -6083,7 +6188,7 @@ msgstr "" "`_ を参照してください。" -#: ../../document.rst:2182 4224c0da53f84578b225f77eff63f8d7 +#: ../../document.rst:2208 a10321538c664b93bdf23fb77a5eade0 msgid "" "For applicable (EPUB) document types, loading a page via its absolute " "number may result in layouting a large part of the document, before the " @@ -6096,7 +6201,7 @@ msgstr "" "該当する(EPUB)ドキュメントタイプの場合、絶対番号でページを読み込むと、ページにアクセスする前にドキュメントの大部分のレイアウトが発生する場合があります。このパフォーマンスへの影響を避けるために、章ベースのアクセスを優先します。:meth:`Document.prev_location`、:attr:`Document.last_location`、:attr:`Document.last_location`" " といった便利なメソッドや属性を使用して、高いコーディング効率を維持してください。" -#: ../../document.rst:2184 2d0e7fd3be4e4c938e74b8dfc9260077 +#: ../../document.rst:2210 cbc3cc03287e46448f98fa53d57a4df4 msgid "" "These parameters cause separate handling of stream categories: use it " "together with `expand` to restrict decompression to streams other than " @@ -6105,27 +6210,27 @@ msgstr "" "これらのパラメータはストリームカテゴリの別々の処理を引き起こします:これらを `expand` " "と一緒に使用して、画像やフォントファイル以外のストリームの解凍を制限できます。" -#: ../../document.rst:2186 642b3551cd97495499bc7dac759d32a0 +#: ../../document.rst:2212 4e0731637c314114adc2120b29c55fbd msgid "Examples for \"Form XObjects\" are created by :meth:`Page.show_pdf_page`." msgstr "「Form XObjects」の例は、:meth:`Page.show_pdf_page` によって作成されます。" -#: ../../document.rst:2188 fe48711608014440b68f510dc4ceb6e3 +#: ../../document.rst:2214 f2e0dd8b194144bcbd4eea4a4505612e msgid "" -"For a *False* the **complete document** must be scanned. Both methods " +"For a ``False`` the **complete document** must be scanned. Both methods " "**do not load pages,** but only scan object definitions. This makes them " "at least 10 times faster than application-level loops (where total " "response time roughly equals the time for loading all pages). For the " ":ref:`AdobeManual` (756 pages) and the Pandas documentation (over 3070 " "pages) -- both have no annotations -- the method needs about 11 ms for " -"the answer *False*. So response times will probably become significant " +"the answer ``False``. So response times will probably become significant " "only well beyond this order of magnitude." msgstr "" -"*False* の場合、完全なドキュメントをスキャンする必要があります。ただし、これらのメソッドは " +"``False`` の場合、完全なドキュメントをスキャンする必要があります。ただし、これらのメソッドは " "**ページを読み込まず**、オブジェクト定義のみをスキャンします。これにより、アプリケーションレベルのループよりも少なくとも10倍高速になります(合計応答時間はすべてのページを読み込む時間とほぼ同じです)。:ref:`AdobeManual`(756ページ)とPandasのドキュメンテーション(3070ページ以上)の両方に注釈がない場合、このメソッドは" -" *False* " +" ``False`` " "の回答に約11ミリ秒かかります。したがって、応答時間はおそらくこのオーダーオブマグニチュードをはるかに超えた範囲で初めて重要になる可能性があります。" -#: ../../document.rst:2190 e7272d938e0546f3806ea23b27b93aaf +#: ../../document.rst:2216 84720f80e51e4100b6e77f8e63c61312 msgid "" "This only works under certain conditions. For example, if there is normal" " text covered by some image on top of it, then this is undetectable and " @@ -6135,14 +6240,10 @@ msgstr "" "これは特定の条件下でのみ機能します。たとえば、上に何らかの画像が覆っている通常のテキストがある場合、これは検出不可能で、該当するテキストは削除 " "**されません**。同様に、白い背景の白いテキストなども同様です。" -#: ../../footer.rst:60 6dcba5bebfd04dacae606271211dfb91 +#: ../../footer.rst:60 8460d844a4eb409a858707466cd97c8c msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 30fd6d61b26f4f059c851ecd9d116ddb -msgid "Discord logo" -msgstr "" - #~ msgid "" #~ "a list of lists. Each entry has" #~ " the form *[lvl, title, page, dest]*." @@ -6250,3 +6351,110 @@ msgstr "" #~ "を作成する場合に得られます。このような場合、実際に使用されているユニコードのセットは、フォント内のグリフの数と比較して非常に小さいことが多いです。この機能を使用すると、埋め込まれたフォントのバイナリサイズを容易に2桁のキロバイト単位にまで削減できます" #~ " - 数メガバイトから低二桁キロバイトの量にまで。" +#~ msgid "" +#~ "a list of images **referenced** by " +#~ "this page. Each item looks like " +#~ "`(xref, smask, width, height, bpc, " +#~ "colorspace, alt. colorspace, name, filter, " +#~ "referencer)` Where * *:data:`xref`* " +#~ "(*int*) is the image object number " +#~ "* **smask** (*int*) is the object " +#~ "number of its soft-mask image *" +#~ " **width** and **height** (*ints*) are " +#~ "the image dimensions * **bpc** (*int*)" +#~ " denotes the number of bits per " +#~ "component (normally 8) * **colorspace** " +#~ "(*str*) a string naming the colorspace" +#~ " (like **DeviceRGB**) * **alt. " +#~ "colorspace** (*str*) is any alternate " +#~ "colorspace depending on the value of " +#~ "**colorspace** * **name** (*str*) is " +#~ "the symbolic name by which the " +#~ "image is referenced * **filter** " +#~ "(*str*) is the decode filter of " +#~ "the image (:ref:`AdobeManual`, pp. 22). " +#~ "* **referencer** (*int*) the :data:`xref` " +#~ "of the referencer. Zero if directly " +#~ "referenced by the page. Only present " +#~ "if *full=True*." +#~ msgstr "" + +#~ msgid "" +#~ "`(xref, smask, width, height, bpc, " +#~ "colorspace, alt. colorspace, name, filter, " +#~ "referencer)`" +#~ msgstr "" + +#~ msgid "**width** and **height** (*ints*) are the image dimensions" +#~ msgstr "**width** と **height** (*int*)は画像の寸法です" + +#~ msgid "arg int idx: index of the item in list :meth:`Document.get_toc`." +#~ msgstr "引数 int idx: :meth:`Document.get_toc` リスト内のアイテムのインデックス。" + +#~ msgid "" +#~ "Changed in v1.19.3 - as a fix " +#~ "to issue `#537 " +#~ "`_, form " +#~ "fields are always excluded." +#~ msgstr "" +#~ "v1.19.3で変更 - 問題# `#537 " +#~ "`_ " +#~ "の修正として、フォームフィールドは常に除外されます。" + +#~ msgid "" +#~ "This is a page-based method. " +#~ "Document-level information of source " +#~ "documents is therefore ignored. Examples " +#~ "include Optional Content, Embedded Files, " +#~ "`StructureElem`, `AcroForm`, table of " +#~ "contents, page labels, metadata, named " +#~ "destinations (and other named entries) " +#~ "and some more. As a consequence, " +#~ "specifically, **Form Fields (widgets) can " +#~ "never be copied** -- although they " +#~ "seem to appear on pages only. Look" +#~ " at :meth:`Document.bake` for converting a" +#~ " source document if you need to " +#~ "retain at least widget **appearances.**" +#~ msgstr "" +#~ "これはページベースのメソッドです。そのため、ソース文書のドキュメントレベルの情報は無視されます。例には、オプショナルコンテンツ、埋め込みファイル、" +#~ " `StructureElem` 、 `AcroForm` " +#~ "、目次、ページラベル、メタデータ、名前付き目的地(および他の名前付きエントリ)などがあります。その結果、具体的にはフォームフィールド(ウィジェット)はコピーできません。" +#~ " - たとえそれらがページ上に表示されているように見える場合でも。ウィジェットの **外観** " +#~ "を少なくとも保持する必要がある場合は、:meth:`Document.bake` をご覧ください。" + +#~ msgid "the created page object." +#~ msgstr "作成されたページオブジェクト。" + +#~ msgid "" +#~ "a dictionary with the following keys:" +#~ " * *name* -- (*str*) name under " +#~ "which this entry is stored * " +#~ "*filename* -- (*str*) filename * " +#~ "*ufilename* -- (*unicode*) filename * " +#~ "*desc* -- (*str*) description * *size*" +#~ " -- (*int*) original file size * " +#~ "*length* -- (*int*) compressed file " +#~ "length * *creationDate* -- *(New in " +#~ "v1.18.13)* (*str*) date-time of item " +#~ "creation in PDF format * *modDate* " +#~ "-- *(New in v1.18.13)* (*str*) date-" +#~ "time of last change in PDF format" +#~ " * *collection* -- *(New in " +#~ "v1.18.13)* (*int*) :data:`xref` of the " +#~ "associated PDF portfolio item if any," +#~ " else zero. * *checksum* -- *(New " +#~ "in v1.18.13)* (*str*) a hashcode of " +#~ "the stored file content as a " +#~ "hexadecimal string. Should be MD5 " +#~ "according to PDF specifications, but be" +#~ " prepared to see other hashing " +#~ "algorithms." +#~ msgstr "" + +#~ msgid "New in v1.14.16" +#~ msgstr "v1.14.16 で新規" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/faq.mo b/docs/locales/ja/LC_MESSAGES/faq.mo index 27c53d17f..8f61a3638 100644 Binary files a/docs/locales/ja/LC_MESSAGES/faq.mo and b/docs/locales/ja/LC_MESSAGES/faq.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/faq.po b/docs/locales/ja/LC_MESSAGES/faq.po index d6979b6b3..a30fc8c8a 100644 --- a/docs/locales/ja/LC_MESSAGES/faq.po +++ b/docs/locales/ja/LC_MESSAGES/faq.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.24.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-06 22:50+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -18,43 +18,42 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 430dee7b70cb4dfba12ff8ce07188fd4 +#: ../../header.rst:-1 fc37bbaea9e645f2a1934950c4d360aa msgid "Artifex" msgstr "" -#: ../../header.rst:-1 9dafa464c2864c2f9d36b67a0c0aa4ec +#: ../../header.rst:-1 3e2f00868cab4dc9b3f9c47206f4e0e1 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 f4cbd02631b44fc8aa8616c6ca375830 +#: ../../header.rst:-1 dc5cbb9888564cd2904f297d4612db6a msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../faq.rst:7 28110ac6e55e4f5f90f83c155167d628 +#: ../../faq.rst:7 34a4b295156e4a8b80a33df4e0d989fe msgid "FAQ" msgstr "" -#: ../../faq.rst:9 beec3c4152da4bcb936eae88ecec3a3d +#: ../../faq.rst:9 42099b86e20e4e99a1843a506f01916e msgid "A collection of recipes in “How-To” format for using PyMuPDF." msgstr "" -#: ../../faq.rst:12 f9b28c8299d74d039993f485b5457a00 +#: ../../faq.rst:12 b75419af6b7a47d9900bf518ab5e1ad3 msgid "Please see:" msgstr "" -#: ../../faq.rst:14 6c1a79aa095e403f9e9c1e94330c5e68 +#: ../../faq.rst:14 478d3b75ae384ae8b14fb10fdd9b39fc msgid ":ref:`Recipes: Table of Contents`" msgstr "" -#: ../../footer.rst:71 33bbb07f58ec4d2b80e83f8678b4ddb8 +#: ../../footer.rst:60 ebceb100878042a6ade4b6d7432a599e msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 4a60814fe4e246d6bf8f43de8222dfc5 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/font.mo b/docs/locales/ja/LC_MESSAGES/font.mo index ef3fad068..c3596dbbc 100644 Binary files a/docs/locales/ja/LC_MESSAGES/font.mo and b/docs/locales/ja/LC_MESSAGES/font.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/font.po b/docs/locales/ja/LC_MESSAGES/font.po index 08ceb1616..1282eb244 100644 --- a/docs/locales/ja/LC_MESSAGES/font.po +++ b/docs/locales/ja/LC_MESSAGES/font.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,190 +19,214 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 fea242e5b6ae40c89f4a2d2c3f002245 +#: ../../header.rst:-1 45a7d290afb143ae889044cf4a7e6d0a msgid "Artifex" msgstr "" -#: ../../header.rst:-1 2ea6ed58083742dbb2a92dc5711c7e4c +#: ../../header.rst:-1 00c23289844444afbfd2c89d7559321f msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 d1a9bd16b79a49e587c4ed62d751b707 +#: ../../header.rst:-1 ab3ce3d73853429f893c65557831d844 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../font.rst:7 6e4eda957b6045788ed357987f8d9469 +#: ../../font.rst:7 f02283a943e74b869bf944c3b38dab4b msgid "Font" msgstr "Font (フォント)" -#: ../../font.rst:9 96f92df21b4f49e68390c02cd89e77f4 +#: ../../font.rst:9 4b6a50a7ca01495fb1d18526d4a352a4 msgid "New in v1.16.18" msgstr "新機能:v1.16.18" -#: ../../font.rst:11 a6253402eb7544fc97b5b79ac40aee3c +#: ../../font.rst:11 ddeb945b793d49fab4dad50fd160c376 msgid "" -"This class represents a font as defined in MuPDF (*fz_font_s* structure)." +"This class represents a font as defined in |MuPDF| (``fz_font_s`` structure)." " It is required for the new class :ref:`TextWriter` and the new " ":meth:`Page.write_text`. Currently, it has no connection to how fonts are" " used in methods :meth:`Page.insert_text` or :meth:`Page.insert_textbox`," " respectively." msgstr "" -"このクラスは、MuPDFで定義されたフォント(fz_font_s構造体)を表します。これは、新しいクラス :ref:`TextWriter` " +"このクラスは、|MuPDF| で定義されたフォント( ``fz_font_s`` 構造体)を表します。これは、新しいクラス :ref:`TextWriter` " "と新しい :meth:`Page.write_text` に必要であり、現在、:meth:`Page.insert_text` または " ":meth:`Page.insert_textbox` メソッドでフォントがどのように使用されているかとは関係ありません。" -#: ../../font.rst:13 a292619e154545c88eb844de9f6e33f9 +#: ../../font.rst:13 9d4c0b8b63e84f38b96afda6417986ff msgid "" -"A Font object also contains useful general information, like the font " -"bbox, the number of defined glyphs, glyph names or the bbox of a single " +"A ``Font`` object also contains useful general information, like the font " +"bbox, the number of defined glyphs, glyph names or the ``bbox`` of a single " "glyph." -msgstr "Fontオブジェクトには、フォントbbox、定義済みグリフの数、グリフ名、単一グリフのbboxなど、有用な一般情報も含まれています。" +msgstr "``Font`` オブジェクトには、フォント ``bbox`` 、定義済みグリフの数、グリフ名、単一グリフの ``bbox`` など、有用な一般情報も含まれています。" -#: ../../font.rst:17 9263de3b13ff4531964d8f37804c0821 +#: ../../font.rst:17 7c72f65d296840899683ec8537ef1f7e msgid "**Method / Attribute**" msgstr "**メソッド/属性** " -#: ../../font.rst:17 fe8dd4caa7bc4403ac41c1cd08adcfa3 +#: ../../font.rst:17 2dc504c945074db49451ff6cfe92ff06 msgid "**Short Description**" msgstr "**短い説明** " -#: ../../font.rst:19 3c5b78563fe044ed8e15fd770a166e81 +#: ../../font.rst:19 f59fd1b895564a42b724b588f4fc4535 msgid ":meth:`~Font.glyph_advance`" msgstr "" -#: ../../font.rst:19 5f5a8f8eb1ab474aac5cb9e9dc22e212 +#: ../../font.rst:19 290af01ec4284c0a9459d29faf19c241 msgid "Width of a character" msgstr "文字の幅" -#: ../../font.rst:20 f8f60ee5dca7478d97bbc6a81eb0f4eb +#: ../../font.rst:20 d36df8d2c1534221865b7ee8c26d9a16 msgid ":meth:`~Font.glyph_bbox`" msgstr "" -#: ../../font.rst:20 69e4d76cd4a849b4b50625e5b8aae389 +#: ../../font.rst:20 fde6283ce67f4c1ba76993b42ebb87e0 msgid "Glyph rectangle" msgstr "グリフの矩形" -#: ../../font.rst:21 2b281bfe7cc24ffca875db9aca40d7b8 +#: ../../font.rst:21 19c7f97bcc804101a1599f5d955a26c2 msgid ":meth:`~Font.glyph_name_to_unicode`" msgstr "" -#: ../../font.rst:21 3717dd33d7844b86b2b88585736ef3fc +#: ../../font.rst:21 dfd0653dbbe14fbbb28215a00cef7ff7 msgid "Get unicode from glyph name" msgstr "グリフ名からUnicodeを取得" -#: ../../font.rst:22 25aa53e3de3143058b53af41f081e32c +#: ../../font.rst:22 57f5b88c0c8c456fb8b818b59e822404 msgid ":meth:`~Font.has_glyph`" msgstr "" -#: ../../font.rst:22 b5a50f1df6ae435a8cdf20c5304c075c +#: ../../font.rst:22 8768dbc2180b49648d5b8e8a35fe20e2 msgid "Return glyph id of unicode" msgstr "UnicodeのグリフIDを返す" -#: ../../font.rst:23 cd462a584bca432096613f602d90fa9f +#: ../../font.rst:23 25ac0c185f98441a97f85b1852974e5e msgid ":meth:`~Font.text_length`" msgstr "" -#: ../../font.rst:23 06338b4fc30f4864ba30f5ce665164bc +#: ../../font.rst:23 cafb4c8e9f7145ff999b1c2859f5b5f6 msgid "Compute string length" msgstr "文字列の長さを計算" -#: ../../font.rst:24 89efeb699b5c4ab09cda5376e8f34d86 +#: ../../font.rst:24 6426a083aaeb46909ac368aad5baa0be msgid ":meth:`~Font.char_lengths`" msgstr "" -#: ../../font.rst:24 191cb6a24a49471ca8509bb23f6e2295 +#: ../../font.rst:24 ae55279d05ff45639ca0126f6f5094d5 msgid "Tuple of char widths of a string" msgstr "文字列の文字幅のタプル" -#: ../../font.rst:25 447942951896475b9391d5af72e2dcf0 +#: ../../font.rst:25 ec26b63e7eef445e9a0c1bd624fdc888 msgid ":meth:`~Font.unicode_to_glyph_name`" msgstr "" -#: ../../font.rst:25 67c5cf6ed9604420940a3abc091cf348 +#: ../../font.rst:25 7c7807d100b04dd5941a20428f67a254 msgid "Get glyph name of a unicode" msgstr "Unicodeのグリフ名を取得" -#: ../../font.rst:26 dd0e8b03058a4543aa9aa9b8bcae4698 +#: ../../font.rst:26 d926f8b02f4546d398cc79a470067477 msgid ":meth:`~Font.valid_codepoints`" msgstr "" -#: ../../font.rst:26 7c07efa321ea484597fd0a5ebbee5bdb +#: ../../font.rst:26 6e2dfdf539a441da80c05f9704ab9444 msgid "Array of supported unicodes" msgstr "サポートされているUnicodeの配列" -#: ../../font.rst:27 eb9e4355d89c4966b11e4a8e68d8b8f4 +#: ../../font.rst:27 89d173d419b64155bd0aca6a425584e7 msgid ":attr:`~Font.ascender`" msgstr "" -#: ../../font.rst:27 5314b15ddf324e79aba083f017cc3aa9 +#: ../../font.rst:27 9c4238ddaced4bc3959d5546e0286306 msgid "Font ascender" msgstr "フォントのアセンダ" -#: ../../font.rst:28 0a9c5253243d44459503bfa182b7ad49 +#: ../../font.rst:28 78b7d9e180f9485db69b51a5463d3571 msgid ":attr:`~Font.descender`" msgstr "" -#: ../../font.rst:28 7053f461465040be87fbca43a4c0042c +#: ../../font.rst:28 3d6f9666a2374daaa025f778a56be258 msgid "Font descender" msgstr "フォントのディセンダ" -#: ../../font.rst:29 54c34bb283fb4a7490a49024bc949476 +#: ../../font.rst:29 f42bed3ccae74e1085cc1506360d79c3 msgid ":attr:`~Font.bbox`" msgstr "" -#: ../../font.rst:29 d271ed21978a4f01af9c98db3c31fd82 +#: ../../font.rst:29 2dd21372d0b949b49f4e17dfcb4f4496 msgid "Font rectangle" msgstr "フォントの矩形" -#: ../../font.rst:30 c0f42e3a9d8941caa4e32254a3e559cd +#: ../../font.rst:30 71b14ffa01ac43bd8ddbdaadbb0f1cfd msgid ":attr:`~Font.buffer`" msgstr "" -#: ../../font.rst:30 eb09b0e34aee4c33a553f2bc0978adcb +#: ../../font.rst:30 5bd92ce5ad94497587aec728309e49d4 msgid "Copy of the font's binary image" msgstr "フォントのバイナリイメージのコピー" -#: ../../font.rst:31 c2fa45574dae448aafd027643b590317 +#: ../../font.rst:31 8f58bdb27c0c4035b913b270b3e02b02 msgid ":attr:`~Font.flags`" msgstr "" -#: ../../font.rst:31 868bd314dc94485683d6f231d7e2bf4d +#: ../../font.rst:31 8987d36d302546c48fccabf333e8eb66 msgid "Collection of font properties" msgstr "フォントのプロパティのコレクション" -#: ../../font.rst:32 c9c30fb50ab84061923b283efd6847b4 +#: ../../font.rst:32 10176eb1e76c4953ade9fb0a7baba794 msgid ":attr:`~Font.glyph_count`" msgstr "" -#: ../../font.rst:32 a2cf925368a9496e99adc135ef99d264 +#: ../../font.rst:32 f8d7e052eea8479c94a7cd51b5d4950c msgid "Number of supported glyphs" msgstr "サポートされているグリフの数" -#: ../../font.rst:33 6518baeb36484e9e95bac69248d09bbd +#: ../../font.rst:33 ba08a8cfb6c54d82a80a4ad50de26d64 msgid ":attr:`~Font.name`" msgstr "" -#: ../../font.rst:33 59cfc2c79307436481ed0f0d21d6cf7a +#: ../../font.rst:33 32b7c1e41541468b94da653810f5aa7c msgid "Name of font" msgstr "フォントの名前" -#: ../../font.rst:34 a177d0b4b04f420c912ebfe69ce63ea5 -msgid ":attr:`~Font.is_writable`" +#: ../../font.rst:34 97ea28e957384acbb39bb0ee05bf7011 +msgid ":attr:`~Font.is_bold`" msgstr "" -#: ../../font.rst:34 7b2053e4560646e4a716976de6d7d9b9 -msgid "Font usable with :ref:`TextWriter`" -msgstr ":ref:`TextWriter` で使用可能なフォント" +#: ../../font.rst:34 0da7a495eb3940be97b05d6ff9e51e70 +msgid "`True` if bold" +msgstr "" + +#: ../../font.rst:35 e1aaedf145dd4413b79daae1269069a9 +msgid ":attr:`~Font.is_monospaced`" +msgstr "" + +#: ../../font.rst:35 9a7f20b9c7704e88b54fbdb6151fff49 +msgid "`True` if mono-spaced" +msgstr "" -#: ../../font.rst:38 d9bffd4461a4464db22a09e1de2165a0 +#: ../../font.rst:36 c4f4f6778d144109be97c6b7bd799e3b +msgid ":attr:`~Font.is_serif`" +msgstr "" + +#: ../../font.rst:36 1110ef3babb845a5ab3659f7e61dc42f +msgid "`True` if serif, `False` if sans-serif" +msgstr "" + +#: ../../font.rst:37 b68dcb7818c24ba9a89b733b3ada1fb3 +msgid ":attr:`~Font.is_italic`" +msgstr "" + +#: ../../font.rst:37 dcde6d1781444230aefd0dd66f36e48d +msgid "`True` if italic" +msgstr "" + +#: ../../font.rst:41 055c88f482754327b0319159f5cd05c4 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../font.rst:57 51abeaeb766a41ca946ddddee6d7b247 +#: ../../font.rst:60 941c9b4f031a4bb7ac7ed85363ad6dfc msgid "" "Font constructor. The large number of parameters are used to locate font," " which most closely resembles the requirements. Not all parameters are " @@ -212,15 +236,15 @@ msgstr "" "フォントコンストラクタ。多くのパラメータは、要件に最も近いフォントを特定するために使用されます。必ずしもすべてのパラメータが必要とされるわけではありません" " - パラメータが評価されるロジックを説明する以下の疑似コードを参照してください。" -#: ../../font.rst 0e5e996ccbe54e06891e799f5e4cd67b -#: 322ee2fe758b416cb74002fa4e96275d 36054e9930b14698b9633fa3539da568 -#: 42abf610d15e4297b4bcbe359004adf2 5e300d222220425d96cc19049e2f498a -#: 87de21a1438e4bdab4067734fb1d7d39 89274a338b74459183a738618c0137db -#: ad145dd4513047a58cd4420a2bb8ca9e +#: ../../font.rst 038b1350c78e4af38ce27b2161a878ba +#: 11d859906804423d906939c95128b9f1 4dc8aea23a6f47f3a29859317d74fc91 +#: 65f80f24c66a48b78e43f93f741e3fda 8930cac6b6524339bbac6f8a39bb3547 +#: 8d8305aa574c4ab6b4e0f12053b08ee1 b7c7897014cf43d2bd2709757c71556b +#: e243e193bd1c4d8cbecdcdefb29dcd48 msgid "Parameters" msgstr "パラメータ" -#: ../../font.rst:59 99adfa23b8874e289fac08671bdb79ff +#: ../../font.rst:62 ce1b93a1069e401a8fc8fb883957f814 msgid "" "one of the :ref:`Base-14-Fonts` or CJK fontnames. Also possible are a " "select few other names like (watch the correct spelling): \"Arial\", " @@ -230,7 +254,7 @@ msgid "" ":attr:`fitz_fonts` and in the table further down." msgstr "" -#: ../../font.rst:59 219f675833084bf5b6ac650bc99642d5 +#: ../../font.rst:62 7dc0e95a2250423fa26f074438f4acc6 msgid "" "one of the :ref:`Base-14-Fonts` or CJK fontnames. Also possible are a " "select few other names like (watch the correct spelling): \"Arial\", " @@ -239,11 +263,11 @@ msgstr "" ":ref:`Base-14-Fonts` またはCJKフォントの名前のいずれか。また、\"Arial\"、\"Times\"、\"Times " "Roman\"などの選択的な名前も可能です。" -#: ../../font.rst:61 ffc94f8d0d9e49f5887defcc832f7807 +#: ../../font.rst:64 6bec0e09402e4bb6845ddf5125491bb3 msgid "*(Changed in v1.17.5)*" msgstr "(v1.17.5で変更)" -#: ../../font.rst:63 20a3a753c26a4a518dc446ec593412a2 +#: ../../font.rst:66 a2688702fcc44a058dbe4572e93e9c67 msgid "" "If you have installed `pymupdf-fonts `_, there are also new \"reserved\" fontnames available, which are" @@ -252,15 +276,15 @@ msgstr "" "`pymupdf-fonts `_ " "をインストールしている場合、:attr:`fitz_fonts` と下の表でリストされている新しい「予約済み」フォント名も利用可能です。" -#: ../../font.rst:65 3ef11a63c2be4864af678b66fad37a8e +#: ../../font.rst:68 64c4dea0a26f459f9ecfaeb1987f3820 msgid "the filename of a fontfile somewhere on your system [#f1]_." msgstr "システムのどこかにあるフォントファイルのファイル名 [#f1]_。" -#: ../../font.rst:66 64bb4ac0713f44929ea48c590ce3a59a +#: ../../font.rst:69 ec5352b957ba406f8ab58c0737979e0f msgid "a fontfile loaded in memory [#f1]_." msgstr "メモリ内にロードされたフォントファイル [#f1]_。" -#: ../../font.rst:67 92e99f2c4ea0467fa9338ce0ad156fc0 +#: ../../font.rst:70 71bc43be60c04dde9f99f96570fca0a8 msgid "" "the number of a UCDN script. Currently supported in PyMuPDF are numbers " "24, and 32 through 35." @@ -268,7 +292,7 @@ msgstr "" "UCDN(Unicode Character Database " "Number)のスクリプト番号です。現在、PyMuPDFでサポートされている番号は、24、および32から35です。" -#: ../../font.rst:68 4470833e793948c3bcda3ab77c135687 +#: ../../font.rst:71 add40d2e69f447128313fbd4ead517a1 msgid "" "one of the values \"zh-Hant\" (traditional Chinese), \"zh-Hans\" " "(simplified Chinese), \"ja\" (Japanese) and \"ko\" (Korean). Otherwise, " @@ -276,31 +300,31 @@ msgid "" "are currently documentary only." msgstr "UCDNスクリプトの番号。現在、PyMuPDFでサポートされているのは24、および32から35の数値です" -#: ../../font.rst:69 0f3604b7127a4a598d4804ff8894ea2f +#: ../../font.rst:72 5e4b791b58be400b99c3fccfaae671ba msgid "an alternative selector for one of the CJK fonts." msgstr "CJKフォントの選択のための代替セレクタ。" -#: ../../font.rst:70 f8d989c26d5046e8aee17500232932a4 +#: ../../font.rst:73 33707866dd584b6993b3c60292e5e392 msgid "look for a bold font." msgstr "太字のフォントを探します。" -#: ../../font.rst:71 16d8617d23574f469dea0d385475535d +#: ../../font.rst:74 e8c45f980fa04d4394e41fe116a45f3f msgid "look for an italic font." msgstr "イタリック体のフォントを探します。" -#: ../../font.rst:72 b1a44bff10844fc48906239c22038bb8 +#: ../../font.rst:75 27bccc7d1af94edead067542a7104885 msgid "look for a serifed font." msgstr "セリフ付きのフォントを探します。" -#: ../../font.rst 14b7e28af59f491380da2e822f73a3b6 -#: 51b8a296a72441f79bba2481a1696f5f 59fd6de8ca5340bea92a5d14cd4ab9da -#: 72fdf08809e24efb992cb18445ebbc61 9235e3d06fcf42b2a568c419a7867558 -#: a504bf6fa1f04e20a728a82ebe8d27ea ae0286083751448199d90570619b99aa -#: c20ab7370ded4417a82679b6b268cf0b c25fcbfd5b0b42e1a5fa5c62dbf5bb29 +#: ../../font.rst 4a4bfff89a5f4d888dfc93b55c8fc5e3 +#: 6c3e1ce9b68e4804a745f0940b33e0bd 6d5f19eef6ac42d8a6f06d709743c29a +#: 7af7d1f2dc8c4e89b9947286bc644cad 7dd50832351947f9986543d602236567 +#: 7e13176fe56b4278aa552ef5f2800e85 7e576e8f92594b329d5a3ebd0eae62b5 +#: a32ab6ce83104291bb24d7a7dce8d2e5 f08da17b5bd640e68aab31bf872ecb8b msgid "Returns" msgstr "戻り値" -#: ../../font.rst:74 8538361a012d40ca844278ba6c5c1d4d +#: ../../font.rst:77 af29f25c30c749a99cadf0048bdb2132 msgid "" "a MuPDF font if successful. This is the overall sequence of checks to " "determine an appropriate font: =========== " @@ -315,49 +339,49 @@ msgid "" "============================================================" msgstr "" -#: ../../font.rst:74 47bbb7618814442db3cabfc59289996a +#: ../../font.rst:77 199ff48cd818477fa38adf2a6a1cba35 msgid "" -"a MuPDF font if successful. This is the overall sequence of checks to " +"a |MuPDF| font if successful. This is the overall sequence of checks to " "determine an appropriate font:" -msgstr "成功した場合はMuPDFフォント。適切なフォントを特定するための全体のチェックのシーケンスは次のとおりです。" +msgstr "成功した場合は |MuPDF| フォント。適切なフォントを特定するための全体のチェックのシーケンスは次のとおりです。" -#: ../../font.rst:77 9c1d387cab4b476b8641db8cd8cb3279 +#: ../../font.rst:80 3718868448404e609fd00b39ed9b41b9 msgid "Argument" msgstr "引数" -#: ../../font.rst:77 bf379c48017e4e818eb3f169aced3388 +#: ../../font.rst:80 fa6a9cc31ca146e394069b04868d0946 msgid "Action" msgstr "アクション" -#: ../../font.rst:79 61d23e7dd799437db0e95334db260864 +#: ../../font.rst:82 8dd85a26111942b7844cf367fe830da3 msgid "fontfile?" msgstr "" -#: ../../font.rst:79 3022d81541dd4474a988ac7b92c69244 +#: ../../font.rst:82 3670d7b40da644d2a20a88832c83529c msgid "Create font from file, exception if failure." msgstr "ファイルからフォントを作成し、失敗した場合は例外をスローします。" -#: ../../font.rst:80 37390d94f9ae4943a5b0a9813b115c8d +#: ../../font.rst:83 31eb3c630783441790a421702a4035ca msgid "fontbuffer?" msgstr "" -#: ../../font.rst:80 0caef6a372ec460e8165714051ef1497 +#: ../../font.rst:83 e3bcdda824a34730bae2ca3a3b1787d0 msgid "Create font from buffer, exception if failure." msgstr "バッファからフォントを作成し、失敗した場合は例外をスローします。" -#: ../../font.rst:81 35a673c83fff4f699efc03149115832e +#: ../../font.rst:84 3acc4602197a42aeac8ae72bab1ed28c msgid "ordering>=0" msgstr "" -#: ../../font.rst:81 750c304230f14b81bf362a9c24c29bb9 +#: ../../font.rst:84 df1bde02d3334adfb8e5268b0c5f3ae5 msgid "Create universal font, always succeeds." msgstr "ユニバーサルフォントを作成し、常に成功します。" -#: ../../font.rst:82 ed052602eb214b0896d160b6b6adb44c +#: ../../font.rst:85 c44248a623b7435ba06d5df0b1cba3a5 msgid "fontname?" msgstr "" -#: ../../font.rst:82 db06422b8406444ab69b3ec04b6aa594 +#: ../../font.rst:85 50cd0fd1f1a240c2ac6592e4a8356720 msgid "" "Create a Base-14 font, universal font, or font provided by `pymupdf-fonts" " `_. See table below." @@ -365,7 +389,7 @@ msgstr "" "ベース14フォント、ユニバーサルフォント、または `pymupdf-fonts `_ で提供されるフォントを作成します。下の表を参照してください。" -#: ../../font.rst:89 f06907a9dae64033800122fb9bf772af +#: ../../font.rst:92 2fa3ff4df5ae4bef8482f34c63767318 msgid "" "With the usual reserved names \"helv\", \"tiro\", etc., you will create " "fonts with the expected names \"Helvetica\", \"Times-Roman\" and so on. " @@ -374,17 +398,17 @@ msgstr "" "通常の予約済みの名前「helv」、「tiro」などを使用すると、期待どおりの名前「Helvetica」、「Times-" "Roman」などのフォントが作成されます。**ただし** 、:meth:`Page.insert_font` などとは異なり、" -#: ../../font.rst:91 a91e1179bbda4618a3befdfe3e45c62f +#: ../../font.rst:94 765b0615bb4b44bb9cdcca9bf1e3657d msgid "a font file will **always** be embedded in your PDF," msgstr "フォントファイルはPDFに **常に** 埋め込まれます。" -#: ../../font.rst:92 48736ced83c541ea865bb98b271267ce +#: ../../font.rst:95 8e3f9ad2f0754e10b50ef42e6882653d msgid "" "Greek and Cyrillic characters are supported without needing the " "*encoding* parameter." msgstr "ギリシャ文字およびキリル文字は *エンコーディング* パラメータを必要とせずにサポートされます。" -#: ../../font.rst:94 5cccc77c48fd436eb4fdab9cad677567 +#: ../../font.rst:97 d3746cee61fc4490b1696ed40b1b739a msgid "" "Using *ordering >= 0*, or fontnames \"cjk\", \"china-t\", \"china-s\", " "\"japan\" or \"korea\" will **always create the same \"universal\"** font" @@ -397,7 +421,7 @@ msgstr "" " フォント **「Droid Sans Fallback " "Regular」が作成されます**。このフォントは、**中国語、日本語、韓国語、ラテン文字、ギリシャ文字、キリル文字を含むすべての文字をサポートしています**。これはサンセリフのフォントです。" -#: ../../font.rst:96 928a72ad35a94ed7a7bd3b807a5fa2da +#: ../../font.rst:99 fa0bc1c990854bbe800c94afd2368fec msgid "" "Actually, you would rarely ever need another sans-serif font than " "**\"Droid Sans Fallback Regular\"**. **Except** that this font file is " @@ -409,7 +433,7 @@ msgstr "" "Regular」以外のサンセリフのフォントはほとんど必要ありません。ただし、このフォントファイルは比較的大きく、PDFファイルサイズを約1.65 " "MB(圧縮)増加させます。CJKのサポートが必要でない場合は、「helv」、「tiro」などを指定し、約35 KB(圧縮)で済むでしょう。" -#: ../../font.rst:98 322da063f76a4e1198459620bebb7ac3 +#: ../../font.rst:101 12bbf85ce3a143c1baa646f805eef0ae msgid "" "If you **know** you have a mixture of CJK and Latin text, consider just " "using `Font(\"cjk\")` because this supports everything and also " @@ -420,7 +444,7 @@ msgstr "" "CJKとラテン文字の混合テキストがあることを **知っている** 場合は、単に `Font(\"cjk\")` " "を使用して、すべてをサポートし、実行を大幅に高速化します(最大3倍)。MuPDFは常にこの単一のフォントで任意の文字を見つけることができ、フォールバックをチェックする必要はありません。" -#: ../../font.rst:100 36d7faa6f1b546e4bf4917ad4677036a +#: ../../font.rst:103 2df673aa00fd4367849b86bc1d74524c msgid "" "But if you do use some other font, you will still automatically be able " "to also write CJK characters: MuPDF detects this situation and silently " @@ -428,7 +452,7 @@ msgid "" "embedded in your PDF)." msgstr "ただし、他のフォントを使用する場合、CJK文字を書き込むことも自動的にできるようになります。MuPDFはこの状況を検出し、静かにユニバーサルフォントにフォールバックします(その場合、当然、PDFにも埋め込まれます)。" -#: ../../font.rst:102 8c2c5cfb3d3e43c5baedf9af20dd6ac9 +#: ../../font.rst:105 7b6e209cffc74b7fad6dc4636f926e62 msgid "" "*(New in v1.17.5)* Optionally, some new \"reserved\" fontname codes " "become available if you install `pymupdf-fonts >> " "import pymupdf >>> font = pymupdf.Font(\"math\") >>> vuc = " "font.valid_codepoints() >>> for i in vuc: print(\"%04X %s (%s)\" % " @@ -727,16 +751,16 @@ msgid "" "(arrowdbldown) 21D4 ⇔ (arrowdblboth) ... 221E ∞ (infinity) ..." msgstr "" -#: ../../font.rst:152 f5a2988ea93f4988b19570b3fae65ba5 +#: ../../font.rst:155 ecaff954703b475f8857d239246738f0 msgid "" -"an *array.array* [#f2]_ of length at most :attr:`Font.glyph_count`. I.e. " -"*chr()* of every item in this array has a glyph in the font without using" +"an ``array.array`` [#f2]_ of length at most :attr:`Font.glyph_count`. I.e. " +"``chr()`` of every item in this array has a glyph in the font without using" " fallbacks. This is an example display of the supported glyphs:" msgstr "" -":attr:`Font.glyph_count` 以上の長さを持つ array.array [#f2]_。つまり、この配列内の各アイテムの " -"*chr()* は、フォールバックを使用せずにフォント内にグリフを持っていることを示します。以下はサポートされるグリフの例示です:" +":attr:`Font.glyph_count` 以上の長さを持つ ``array.array`` [#f2]_。つまり、この配列内の各アイテムの " +"``chr()`` は、フォールバックを使用せずにフォント内にグリフを持っていることを示します。以下はサポートされるグリフの例示です:" -#: ../../font.rst:180 554a3acb7bf24b47a5961d01d0490a84 +#: ../../font.rst:183 0556ec3680644e8ea88f8c4958c55890 msgid "" "This method only returns meaningful data for fonts having a CMAP " "(character map, charmap, the `/ToUnicode` PDF key). Otherwise, this array" @@ -745,54 +769,54 @@ msgstr "" "このメソッドは、CMAP(文字マップ、charmap、`/ToUnicode` PDF " "キー)を持つフォントに対してのみ意味のあるデータを返します。それ以外の場合、この配列は長さ1で、ゼロのみを含みます。" -#: ../../font.rst:189 5203ff8b18484bbface98b40936eeffc +#: ../../font.rst:192 977003f77d0945819e92c70f65fbd280 msgid "Calculate the \"width\" of the character's glyph (visual representation)." msgstr "文字のグリフ(視覚的な表現)の「幅」を計算します。" -#: ../../font.rst:191 2106834ff579495d8c1c6786d9719923 +#: ../../font.rst:194 afe1cf924a86491792a061d549e652d4 msgid "" -"the unicode number of the character. Use *ord()*, not the character " +"the unicode number of the character. Use ``ord()``, not the character " "itself. Again, this should normally work even if a character is not " "supported by that font, because fallback fonts will be checked where " "necessary." msgstr "" -"文字のUnicode番号。文字自体ではなく、*ord()* " +"文字のUnicode番号。文字自体ではなく、``ord()`` " "を使用します。文字がそのフォントでサポートされていない場合でも、必要に応じてフォールバックフォントがチェックされるため、通常は機能するはずです。" -#: ../../font.rst:192 761b21c65b374b50b16e3dcdf42b3ea5 -msgid "write mode, 0 = horizontal, 1 = vertical." -msgstr "書き込みモード、0 = 横方向、1 = 縦方向。" +#: ../../font.rst:195 334621872cd84ea6ac7b451fe8ea32aa +msgid "write mode, ``0`` = horizontal, ``1`` = vertical." +msgstr "書き込みモード、 ``0`` = 横方向、 ``1`` = 縦方向。" -#: ../../font.rst:194 1bda5e39363940f0ae12bc56fae3afb0 +#: ../../font.rst:197 928ef35ea33748988d53e0117ab7c79d msgid "The other parameters are not in use currently." msgstr "その他のパラメータは現在使用されていません。" -#: ../../font.rst:196 2db672cfcd2c4b8a8699b6c6438bf893 +#: ../../font.rst:199 5241fa12af7442538a664176d250293c msgid "a float representing the glyph's width relative to **fontsize 1**." msgstr "**フォントサイズ** 1に対するグリフの幅を表す浮動小数点数。" -#: ../../font.rst:200 a0ac15c59c9a4ace809a7d04641c4bcd +#: ../../font.rst:203 c2d509855a694eb4a75f07ca6581bd9b msgid "" "Return the unicode value for a given glyph name. Use it in conjunction " "with `chr()` if you want to output e.g. a certain symbol." msgstr "指定されたグリフ名のUnicode値を返します。特定のシンボルを出力したい場合は、`chr()` と組み合わせて使用します。" -#: ../../font.rst:202 d698518f59d343cbb29dd7ae4ea85757 +#: ../../font.rst:205 3c10db60e1374fec881815e9d3754bf4 msgid "The name of the glyph." msgstr "グリフの名前。" -#: ../../font.rst:204 201e3a9a2b4f4ec59fe344b2b21099d5 +#: ../../font.rst:207 84cca9708fcf42f0b150dc6360ebc3e7 msgid "" "The unicode integer, or 65533 = 0xFFFD if the name is unknown. Examples: " "`font.glyph_name_to_unicode(\"Sigma\") = 931`, " "`font.glyph_name_to_unicode(\"sigma\") = 963`. Refer to the `Adobe Glyph " "List `_ publication for a list of glyph names " -"and their unicode numbers. Example: >>> font = pymupdf.Font(\"helv\") >>> " -"font.has_glyph(font.glyph_name_to_unicode(\"infinity\")) True" +"and their unicode numbers. Example: >>> font = pymupdf.Font(\"helv\") " +">>> font.has_glyph(font.glyph_name_to_unicode(\"infinity\")) True" msgstr "" -#: ../../font.rst:204 ce3733d394fd4ef3a8f689f19f1f186f +#: ../../font.rst:207 c780e4b197d94ca68b5f7ea4196a216d msgid "" "The unicode integer, or 65533 = 0xFFFD if the name is unknown. Examples: " "`font.glyph_name_to_unicode(\"Sigma\") = 931`, " @@ -806,39 +830,40 @@ msgstr "" "931`、`font.glyph_name_to_unicode(\"sigma\") = 963` 。Adobe Glyph " "Listの出版物を参照して、グリフ名とUnicode番号のリストを確認してください。例:" -#: ../../font.rst:216 e39a0b3f8547433889d5436459317a29 +#: ../../font.rst:219 4e8ef50287f840c39ab6193fe4d15cef msgid "The glyph rectangle relative to :data:`fontsize` 1." msgstr ":data:`fontsize` 1に対するグリフの矩形領域。" -#: ../../font.rst:218 b93a351874b3494e8b8122f1b329f12d -msgid "*ord()* of the character." -msgstr "文字の *ord()* 。" +#: ../../font.rst:221 2d75f0d683514f0ca0affa79216761d3 +msgid "``ord()`` of the character." +msgstr "文字の ``ord()`` 。" -#: ../../font.rst:220 a18c3cf6a98b4e89845759c17ecc720e +#: ../../font.rst:223 d5ebc63552854e929e574e66356875f3 msgid "a :ref:`Rect`." msgstr ":ref:`Rect`。" -#: ../../font.rst:225 73ebc7b050f14c0ebf1a339979533493 +#: ../../font.rst:228 ecfa548b1cdb4cbf977bdd106fe6a53a msgid "Show the name of the character's glyph." msgstr "文字のグリフの名前を表示します。" -#: ../../font.rst:227 e583929eeeb743ef95bb17beb977a3d7 +#: ../../font.rst:230 0a3a425d6dd84c9bb036c80f302940e1 msgid "" -"the unicode number of the character. Use *ord()*, not the character " +"the unicode number of the character. Use ``ord()``, not the character " "itself." -msgstr "文字のunicode番号。文字自体ではなく *ord()* を使用します。" +msgstr "文字のunicode番号。文字自体ではなく ``ord()`` を使用します。" -#: ../../font.rst:229 29cb5f601341402899dd008a0ed090b5 +#: ../../font.rst:232 e30f70a8afc247e1a71dff22dec0df83 msgid "" "a string representing the glyph's name. E.g. `font.glyph_name(ord(\"#\"))" " = \"numbersign\"`. For an invalid code \".notfound\" is returned. .. " "note:: *(Changed in v1.18.0)* This method and " ":meth:`Font.glyph_name_to_unicode` no longer depend on a font and instead" " retrieve information from the **Adobe Glyph List**. Also available as " -"`pymupdf.unicode_to_glyph_name()` and resp. `pymupdf.glyph_name_to_unicode()`." +"`pymupdf.unicode_to_glyph_name()` and resp. " +"`pymupdf.glyph_name_to_unicode()`." msgstr "" -#: ../../font.rst:229 23ac72ab6ff24d69ab985bd2af3ffb46 +#: ../../font.rst:232 7ae0eaba9ee2443a8f60786834a14ecb msgid "" "a string representing the glyph's name. E.g. `font.glyph_name(ord(\"#\"))" " = \"numbersign\"`. For an invalid code \".notfound\" is returned." @@ -846,48 +871,48 @@ msgstr "" "グリフの名前を表す文字列。例:`font.glyph_name(ord(\"#\")) = \"numbersign\"` " "。無効なコードの場合、\".notfound\" が返されます。" -#: ../../font.rst:231 41dd4f7d62e9414a91e507a5b975cf6f +#: ../../font.rst:234 5b19c370607445debb9b31926c40bd34 msgid "" "*(Changed in v1.18.0)* This method and :meth:`Font.glyph_name_to_unicode`" " no longer depend on a font and instead retrieve information from the " -"**Adobe Glyph List**. Also available as `pymupdf.unicode_to_glyph_name()` " -"and resp. `pymupdf.glyph_name_to_unicode()`." +"**Adobe Glyph List**. Also available as `pymupdf.unicode_to_glyph_name()`" +" and resp. `pymupdf.glyph_name_to_unicode()`." msgstr "" "*(1.18.0で変更)* このメソッドと:meth:`Font.glyph_name_to_unicode` " "はもはやフォントに依存せず、**Adobe Glyph List** " "から情報を取得します。`pymupdf.unicode_to_glyph_name()` とresp. " "`pymupdf.glyph_name_to_unicode()` としても利用可能です。" -#: ../../font.rst:238 63e339d8568a4ff0859762fa1c6b73b8 +#: ../../font.rst:241 c11d86d001524cb0b0035abf8228f4be msgid "Calculate the length in points of a unicode string." msgstr "Unicode文字列の長さをポイント単位で計算します。" -#: ../../font.rst:240 d63466b2c8c04fbe9980bf8fb23351c4 +#: ../../font.rst:243 e4ab64b446a74c32ae91c6a6adf19b19 msgid "" "There is a functional overlap with :meth:`get_text_length` for Base-14 " "fonts only." msgstr "Base-14フォントに対しては、:meth:`get_text_length` と機能が重複しています。" -#: ../../font.rst:242 ../../font.rst:266 672248109c864f729c8ea97dc73ecee3 -#: 93f7f25d140342cbb940f85144a5a88d +#: ../../font.rst:245 ../../font.rst:269 035f68a9090c4e2f987c581f69acb324 +#: 14a8f02b38c644daa664491248d5815c msgid "a text string, UTF-8 encoded." msgstr "テキスト文字列、UTF-8エンコード。" -#: ../../font.rst:244 ../../font.rst:268 277276db309b48a682846dee9a4591b8 -#: eea46083607c43f49c19e1172430de97 +#: ../../font.rst:247 ../../font.rst:271 517bbee097774337989d00f3f53b0216 +#: ecc2c4f1004f417bb7b183dea2531bdf msgid "the :data:`fontsize`." msgstr ":data:`fontsize`。" -#: ../../font.rst 15802e31168148a89c67311788ea657d -#: 1feb387adc664c449d6a75ce2b5d6b2a 36d9c53da60e4e49bde288a169836677 -#: 3cf82964c43c4342a7a21f742e0c75d8 5bcd39492fd84ce3ba96450ada8d7712 -#: 895c2df75be2436dba451b1ce5d884dc a3d32095f1bf455988be3bcf09cb09c5 -#: b8db6a3c43944f698dd6cd08c5f7adc0 d1ef3a97dc2c4ba29871f87cd2481d50 -#: f698ce59cdfe46158fbf25f0af68bce4 +#: ../../font.rst 0f9f97b5b7274e28bb66f006ab7729ff +#: 100725ef275b4763b1eb920723f8d42b 382dcd13dbdd4c6eb6dcb3f1fb1b0d98 +#: 5669062b0c794a1ea0c95524ee04fdc2 5aa22119ec9d467c80a0df11b13e21b2 +#: 67ed9c95928a4ccd955c23069b590461 6bc06432bdd44d2ba5bf2badedb1d12f +#: 742b70e009af4f818c34be3c0a57a54b af206f92225d443abcefdeea9a1f2793 +#: bc302339066642a0bbb9a13e75b7e47e msgid "Return type" msgstr "" -#: ../../font.rst:248 279ad3a435c5492fb0c70d4dcc9b9d25 +#: ../../font.rst:251 8987bb3eba2948ca85213ee532f6a807 msgid "" "the length of the string in points when stored in the PDF. If a character" " is not contained in the font, it will automatically be looked up in a " @@ -903,14 +928,14 @@ msgid "" "the second and subsequent ones." msgstr "" -#: ../../font.rst:248 cf45ac9589424b2bad619615c2e946f5 +#: ../../font.rst:251 70750ea5a311499ea7fac5b6aed32cb1 msgid "" "the length of the string in points when stored in the PDF. If a character" " is not contained in the font, it will automatically be looked up in a " "fallback font." msgstr "PDFに格納された文字列のポイント単位の長さ。文字がフォントに含まれていない場合、自動的にフォールバックフォントで検索されます。" -#: ../../font.rst:250 0af95683c50d40248570299f7c9a2d11 +#: ../../font.rst:253 4ae0b7bb62084e13a26b43b1b57ac9fc msgid "" "This method was originally implemented in Python, based on calling " ":meth:`Font.glyph_advance`. For performance reasons, it has been " @@ -920,15 +945,15 @@ msgstr "" "このメソッドは元々Pythonで実装され、:meth:`Font.glyph_advance` " "を呼び出すことに基づいていました。性能の理由から、v1.18.14向けにCで書き直されました。単一の文字の幅を計算するには、以下のいずれかを使用でき、パフォーマンスに差異はありません:" -#: ../../font.rst:252 4bbc27648b72419d8bfa2051b96bd95d +#: ../../font.rst:255 dba2bd273bcb496e8048e7c5e69cb5cb msgid "`font.glyph_advance(ord(\"Ä\")) * fontsize`" msgstr "" -#: ../../font.rst:253 f3a8372556b64b448fe81a7f91bd2025 +#: ../../font.rst:256 d5e165b21ed445bc9a5c17a70d8d6558 msgid "`font.text_length(\"Ä\", fontsize=fontsize)`" msgstr "" -#: ../../font.rst:255 e0145bc6e3a2493aaf626649785cc0bc +#: ../../font.rst:258 eec51191fac44eb6ae1c858092678361 msgid "" "For multi-character strings, the method offers a huge performance " "advantage compared to the previous implementation: instead of about 0.5 " @@ -936,15 +961,15 @@ msgid "" "the second and subsequent ones." msgstr "複数文字の文字列に対して、このメソッドは以前の実装と比べて非常に高速で、各文字ごとに約0.5マイクロ秒かかる代わりに、2番目以降の文字には12.5ナノ秒しか必要ありません。" -#: ../../font.rst:262 5c7eb382b8ff4a8791fbb918b059beca +#: ../../font.rst:265 c34ff4dceaae4d6a81ed946778f0c4cf msgid "*New in v1.18.14*" msgstr "*v1.18.14で新たに導入*" -#: ../../font.rst:264 88101a3f878b480bafee9a423d2c6cac +#: ../../font.rst:267 d3992820d7be4dc1a6b845a733c4b3e9 msgid "Sequence of character lengths in points of a unicode string." msgstr "Unicode文字列の文字の長さ(ポイント単位)のシーケンス。" -#: ../../font.rst:272 b7e24f5c8ab04ca4a69f156bac74812e +#: ../../font.rst:275 b84312cc1c534354881dd97d76839e9e msgid "" "the lengths in points of the characters of a string when stored in the " "PDF. It works like :meth:`Font.text_length` broken down to single " @@ -952,15 +977,16 @@ msgid "" ":meth:`TextWriter.fill_textbox`. The following is true (allowing rounding" " errors): `font.text_length(text) == sum(font.char_lengths(text))`. >>> " "font = pymupdf.Font(\"helv\") >>> text = \"PyMuPDF\" >>> " -"font.text_length(text) 50.115999937057495 >>> pymupdf.get_text_length(text, " -"fontname=\"helv\") 50.115999937057495 >>> sum(font.char_lengths(text)) " -"50.115999937057495 >>> pprint(font.char_lengths(text)) " -"(7.336999952793121, # P 5.5, # y 9.163000047206879, # " -"M 6.115999937057495, # u 7.336999952793121, # P 7.942000031471252, " -"# D 6.721000015735626) # F" +"font.text_length(text) 50.115999937057495 >>> " +"pymupdf.get_text_length(text, fontname=\"helv\") 50.115999937057495 >>> " +"sum(font.char_lengths(text)) 50.115999937057495 >>> " +"pprint(font.char_lengths(text)) (7.336999952793121, # P 5.5," +" # y 9.163000047206879, # M 6.115999937057495, # u " +"7.336999952793121, # P 7.942000031471252, # D 6.721000015735626) # " +"F" msgstr "" -#: ../../font.rst:272 75fd06c3e5024ccda4874dbf76a139de +#: ../../font.rst:275 18590ab69f6c4f9aa28811c3edcdb8dd msgid "" "the lengths in points of the characters of a string when stored in the " "PDF. It works like :meth:`Font.text_length` broken down to single " @@ -973,54 +999,53 @@ msgstr "" "で使用されています。以下が成り立ちます(丸め誤差を許容する):`font.text_length(text) == " "sum(font.char_lengths(text))`。" -#: ../../font.rst:294 ee085e8aa5ae409fb2e6f12f3e4af415 +#: ../../font.rst:297 90184e5c052f413bb769157e755c3564 msgid "New in v1.17.6" msgstr "新機能 v1.17.6" -#: ../../font.rst:296 9b26e59785bf4f6489c55403d5c7df0c +#: ../../font.rst:299 7789084e41e44fd8a5452982982c9d31 msgid "Copy of the binary font file content." msgstr "バイナリフォントファイルのコンテンツのコピー。" -#: ../../font.rst:302 5d516f2a357c4e348c56aa892efbba00 +#: ../../font.rst:305 bc5d1c2db4ea4b55a720b5cd1cb60971 msgid "" "A dictionary with various font properties, each represented as bools. " "Example for Helvetica::" msgstr "Helveticaの例など、さまざまなフォントプロパティを持つ辞書で、それぞれがブール値として表されています。" -#: ../../font.rst:322 447d78c8d2d1423d9ffc6c7667acc7d0 +#: ../../font.rst:325 2c69c51beb634c2ea40a3542e9623343 msgid "Name of the font. May be \"\" or \"(null)\"." msgstr "フォントの名前。空文字列であることもあります。" -#: ../../font.rst:326 c563fbf80695497d8a44df6a9ef236e4 +#: ../../font.rst:329 d87516f6f7ee41e5bcea1870810c81c0 msgid "The font bbox. This is the maximum of its glyph bboxes." msgstr "フォントのbbox。これは、そのグリフのbboxの最大値です。" -#: ../../font.rst:328 64e07605f22f46868828b18332bb40c9 +#: ../../font.rst:331 5d6efec296e84501bce9006881c8e99e msgid ":ref:`Rect`" msgstr "" -#: ../../font.rst:334 96fe0e46c78e442e933a184b22d3d8f4 +#: ../../font.rst:337 085122ed54784cd68460c9c243a86347 msgid "The number of glyphs defined in the font." msgstr "グリフ数。" -#: ../../font.rst:338 ../../font.rst:346 ../../font.rst:354 -#: 66876909a01e4ffbafb756d76fa8627b de8b0200b20d4c71aed169b0d150ad11 -#: ef639f9ffed54a87a22db7706f7608d6 +#: ../../font.rst:341 ../../font.rst:349 4e654e57562b44bfbaaa02fd7dc465ec +#: d23b8faa3854454ca67f10a1f0d8260d msgid "New in v1.18.0" msgstr "v1.18.0で新規追加" -#: ../../font.rst:340 80457b73efa14e4382d27cd16a371c3a +#: ../../font.rst:343 f327c380b2a84214962dc640edc3d113 msgid "" -"The ascender value of the font, see `here " +"The ascender value of the font, see `ascender typography " "`_ for details. " "Please note that there is a difference to the strict definition: our " "value includes everything above the baseline -- not just the height " "difference between upper case \"A\" and and lower case \"a\"." msgstr "フォントのアセンダー値。詳細についてはこちらを参照してください。ただし、厳密な定義とは異なり、私たちの値にはベースラインを上回るすべてが含まれます。単に大文字の「A」と小文字の「a」の高さの違いだけでなく、ベースラインを上回るすべてが含まれます。" -#: ../../font.rst:348 b9e411161e0545689860907521327bc5 +#: ../../font.rst:351 c2b2e6bdad8a4d50864215d20298070f msgid "" -"The descender value of the font, see `here " +"The descender value of the font, see `descender typography " "`_ for details. This value " "always is negative and is the portion that some glyphs descend below the " "base line, for example \"g\" or \"y\". As a consequence, the value " @@ -1032,36 +1057,45 @@ msgstr "" " - ディセンダー` " "の値は、フォントのすべてのグリフが収まる総高さです。これはほとんどのフォントに当てはまりますが、いくつかの例外があります。特にカリグラフィーフォントなどです。" -#: ../../font.rst:356 e3c1361f021a44358cbd963f24575b24 -msgid "Indicates whether this font can be used with :ref:`TextWriter`." -msgstr "このフォントを :ref:`TextWriter` で使用できるかどうかを示します。" +#: ../../font.rst:363 183f4486ae154572b4f1eabf80f6d289 +msgid "" +"A number of attributes with obvious meanings. Reflect some values of the " +":attr:`Font.flags` dictionary." +msgstr "明らかな意味を持つ属性がいくつかあります。これらは :attr:`Font.flags` 辞書の値の一部を反映しています。" -#: ../../font.rst:361 28135bdf2ca440138a959b187f28aab5 +#: ../../font.rst:368 f5b86a56151043388dd70a219b536ee0 msgid "Footnotes" msgstr "脚注" -#: ../../font.rst:362 7db8c64de0034226b33b52f7668f3b45 +#: ../../font.rst:369 fdd858aa443d477f829878a30b0ea1f0 msgid "" "MuPDF does not support all fontfiles with this feature and will raise " "exceptions like *\"mupdf: FT_New_Memory_Face((null)): unknown file " -"format\"*, if it encounters issues. The :ref:`TextWriter` methods check " -":attr:`Font.is_writable`." +"format\"*, if it encounters issues." msgstr "" "MuPDFはこの機能を持つすべてのフォントファイルをサポートしておらず、問題が発生すると *「mupdf: " "FT_New_Memory_Face((null)): unknown file format」* " "といった例外を発生させます。:ref:`TextWriter` のメソッドは :attr:`Font.is_writable` をチェックします。" -#: ../../font.rst:364 a2ded5a2356b4b00ad4221ef796d6c73 +#: ../../font.rst:371 209859bd49c24fa297bf99f6b0a27b59 msgid "" -"The built-in module *array* has been chosen for its speed and its compact" -" representation of values." +"The built-in Python module `array` has been chosen for its speed and low " +"memory requirement." msgstr "組み込みの *array* モジュールは、その速度と値のコンパクトな表現のために選択されました。" -#: ../../footer.rst:71 e86d105672484a049fca7c59bfeec4fd +#: ../../footer.rst:60 9ec9aab2e7474eea822f4d9e093fb613 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 462bf82cb06d4bddbbf766607393f916 -msgid "Discord logo" -msgstr "" +#~ msgid ":attr:`~Font.is_writable`" +#~ msgstr "" + +#~ msgid "Font usable with :ref:`TextWriter`" +#~ msgstr ":ref:`TextWriter` で使用可能なフォント" + +#~ msgid "Indicates whether this font can be used with :ref:`TextWriter`." +#~ msgstr "このフォントを :ref:`TextWriter` で使用できるかどうかを示します。" + +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/footer.mo b/docs/locales/ja/LC_MESSAGES/footer.mo index e1e179597..249832dee 100644 Binary files a/docs/locales/ja/LC_MESSAGES/footer.mo and b/docs/locales/ja/LC_MESSAGES/footer.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/footer.po b/docs/locales/ja/LC_MESSAGES/footer.po index 30f1f0749..61aaa6400 100644 --- a/docs/locales/ja/LC_MESSAGES/footer.po +++ b/docs/locales/ja/LC_MESSAGES/footer.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,11 +19,10 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../footer.rst:71 674492ee672d4d5a8f6b4e8d8f3d2186 +#: ../../footer.rst:60 74c961cfd0e64769bcdb58467763a6c6 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 d45ae422db144960bbc4e58dcffb48cc -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/functions.mo b/docs/locales/ja/LC_MESSAGES/functions.mo index ca7ad9875..b69b2df87 100644 Binary files a/docs/locales/ja/LC_MESSAGES/functions.mo and b/docs/locales/ja/LC_MESSAGES/functions.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/functions.po b/docs/locales/ja/LC_MESSAGES/functions.po index 205192d5a..d2427bfad 100644 --- a/docs/locales/ja/LC_MESSAGES/functions.po +++ b/docs/locales/ja/LC_MESSAGES/functions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,493 +19,517 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 febca3b7cd2141479bf31155168a7479 +#: ../../header.rst:-1 f10a8020c28249fca44848d866853453 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 b28f7f493bc94b909e9a6c50d2a2103a +#: ../../header.rst:-1 8c253eade3be4573a8d216948f6a7359 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 ebf287a07b0a45fbadcfba96ebad7273 +#: ../../header.rst:-1 c1dc5c8f7ce44ac4906d7f2e9ae8dd3c msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../functions.rst:5 12ec108491d946e5a71c3e21d788f419 +#: ../../functions.rst:5 f3404c3080304de29e895aac382d9965 msgid "Functions" msgstr "関数" -#: ../../functions.rst:6 88855f73b1ae4dd9ab78813b3d36a904 +#: ../../functions.rst:6 70323b9e30fb490db389a3d997a1cab9 msgid "" "The following are miscellaneous functions and attributes on a fairly low-" "level technical detail." msgstr "以下は、PDFに関する低レベルな技術的詳細に関するさまざまな関数と属性です。" -#: ../../functions.rst:8 b8d9e7b2dd774593a2d2466fee1ef530 +#: ../../functions.rst:8 a7a4a6b9e92945e49a02a07f50b221d4 msgid "" "Some functions provide detail access to PDF structures. Others are " "stripped-down, high performance versions of other functions which provide" " more information." msgstr "一部の関数は、PDF構造への詳細なアクセスを提供します。他の関数の高性能バージョンで、より多くの情報を提供する関数から派生しています。" -#: ../../functions.rst:10 e89f01a97b46418daefe21d082eb24e0 +#: ../../functions.rst:10 80d711cfafea41b6b18edc4996098631 msgid "Yet others are handy, general-purpose utilities." msgstr "また、その他にも便利な汎用ユーティリティが含まれています。" -#: ../../functions.rst:14 cc837d442b81417abc2be037184386a0 +#: ../../functions.rst:14 ce08da4d75f04c2d88814b9f4cb4b9fb msgid "**Function**" msgstr "**関数**" -#: ../../functions.rst:14 b36e4a27ca404ec4bfbbd782fd221e88 +#: ../../functions.rst:14 87267f8f2f9c4906abe394a3726d8ce3 msgid "**Short Description**" msgstr "**短い説明**" -#: ../../functions.rst:16 d8f2a8383dc544b898202fefa9013f4f +#: ../../functions.rst:16 8c7b262e30494eb2900a478249533401 msgid ":attr:`Annot.apn_bbox`" msgstr "" -#: ../../functions.rst:16 9908d8b5052d46608c1b0640bcbf4424 +#: ../../functions.rst:16 3ec7f54fc6214998ac1f32de3ae05905 msgid "PDF only: bbox of the appearance object" msgstr "PDFのみ:外観オブジェクトのバウンディングボックス" -#: ../../functions.rst:17 cf8710e3c8b448918f259cf9b741d6b5 +#: ../../functions.rst:17 62b2f314087e4c5d802938929352a251 msgid ":attr:`Annot.apn_matrix`" msgstr "" -#: ../../functions.rst:17 49ea60bdc2a9477a83ca6ccd4248ae44 +#: ../../functions.rst:17 5d4bf95e115f4a79b0ac44f6d45a0cd4 msgid "PDF only: the matrix of the appearance object" msgstr "PDFのみ:外観オブジェクトの行列" -#: ../../functions.rst:18 ec294f256e1c4e48ab9a58ce3c02325c +#: ../../functions.rst:18 23379817033347e4a0ad91ffc4860e15 msgid ":attr:`Page.is_wrapped`" msgstr "" -#: ../../functions.rst:18 36961b110a494307b53ef09dd28d010b +#: ../../functions.rst:18 49fe2cfdf483448abb46dfa426338186 msgid "check whether contents wrapping is present" msgstr "コンテンツの折り返しが存在するかどうかを確認します" -#: ../../functions.rst:19 e2db0e00c4ce412b829b6450d42939d8 +#: ../../functions.rst:19 11b42e143aba4579bfd08436ce71b89f msgid ":meth:`adobe_glyph_names`" msgstr "" -#: ../../functions.rst:19 744096094af64521a5134e5c13a77bcf +#: ../../functions.rst:19 f7532442f88b4d4481a985a21e1e9dca msgid "list of glyph names defined in **Adobe Glyph List**" msgstr "**Adobe Glyph List** で定義されたグリフ名のリスト" -#: ../../functions.rst:20 5478b6b23d544a43984a6269077a0ba1 +#: ../../functions.rst:20 bbe71f57dd1544d6abbffb3f025ad0d0 msgid ":meth:`adobe_glyph_unicodes`" msgstr "" -#: ../../functions.rst:20 73702f778e6745fb86bacdd222b656a6 +#: ../../functions.rst:20 2e63b3cdb4614f68bd0f06bdf473415c msgid "list of unicodes defined in **Adobe Glyph List**" msgstr "**Adobe Glyph List** で定義されたUnicodeのリスト" -#: ../../functions.rst:21 cd4bd68d113e4983aa741fae5e087ca0 +#: ../../functions.rst:21 1dab9af8f225439a809a695624ad06ad msgid ":meth:`Annot.clean_contents`" msgstr "" -#: ../../functions.rst:21 1b5d7d1b36394b6b9589dcddae8d035c +#: ../../functions.rst:21 17d23fa135d74e28baebb9a590420a93 msgid "PDF only: clean the annot's :data:`contents` object" msgstr "PDFのみ:アノテーションの :data:`contents` オブジェクトをクリーンアップ" -#: ../../functions.rst:22 174d90c09b8f4882b66509898be83437 +#: ../../functions.rst:22 2565b744b5074b0197b985feda6260d3 msgid ":meth:`Annot.set_apn_bbox`" msgstr "" -#: ../../functions.rst:22 82c66b6a46874e9ea881433cb30c4003 +#: ../../functions.rst:22 c603cce58b4e4f19ad03d7d5816decf7 msgid "PDF only: set the bbox of the appearance object" msgstr "PDFのみ:外観オブジェクトのバウンディングボックスを設定" -#: ../../functions.rst:23 ea92ea66ebc54ababa1f5716cc4548e2 +#: ../../functions.rst:23 dec230a165a848fab667491090a3b48c msgid ":meth:`Annot.set_apn_matrix`" msgstr "" -#: ../../functions.rst:23 4f6ec497d4e14d6da9cb69cb8430fae6 +#: ../../functions.rst:23 1d4c8fcb695b41f794fe0181f55c4fed msgid "PDF only: set the matrix of the appearance object" msgstr "PDFのみ:外観オブジェクトの行列を設定" -#: ../../functions.rst:24 9fbdb1937a00492d94547ba5583971a7 +#: ../../functions.rst:24 919aa9c3fa0d4cea9f07bf595fd68689 msgid ":meth:`ConversionHeader`" msgstr "" -#: ../../functions.rst:24 e8e04acc856d467c86233842b96b37a7 +#: ../../functions.rst:24 c5631d7a4fb54c26b307af4ec9a45d23 msgid "return header string for *get_text* methods" msgstr "*get_text* メソッド用のヘッダー文字列を返す" -#: ../../functions.rst:25 2b2799fb8de749d0b81e8cd407997503 +#: ../../functions.rst:25 02f472d4f87e4921a7850ccf52b83efe msgid ":meth:`ConversionTrailer`" msgstr "" -#: ../../functions.rst:25 933faf425c734824b96eadb295f87c92 +#: ../../functions.rst:25 67364fbb2a0641498bd046f77798342d msgid "return trailer string for *get_text* methods" msgstr "*get_text* メソッド用のトレーラー文字列を返す" -#: ../../functions.rst:26 7f4e8fd7d6ad4911b7278fba430d83fa +#: ../../functions.rst:26 ec526b8d6e4c4baa8432dc878bc3b9c2 msgid ":meth:`Document.del_xml_metadata`" msgstr "" -#: ../../functions.rst:26 ffa48aa69a1f4302818e36422a744f78 +#: ../../functions.rst:26 124e8e0efc184fe087303fef4d743203 msgid "PDF only: remove XML metadata" msgstr "PDFのみ:XMLメタデータを削除" -#: ../../functions.rst:27 01f29c7bfc6c4301ad68ad62828eae2d +#: ../../functions.rst:27 b6f93fdd44ad46129f8fa2758f2a4818 msgid ":meth:`Document.get_char_widths`" msgstr "" -#: ../../functions.rst:27 5ec79d6a1b204026936601a3185f05ea +#: ../../functions.rst:27 09b83665efc54bec90b1491e267e0f10 msgid "PDF only: return a list of glyph widths of a font" msgstr "PDFのみ:フォントのグリフ幅のリストを返す" -#: ../../functions.rst:28 12bc8165da60469fad68708b64d50898 +#: ../../functions.rst:28 62aedd1eef214e3b9fd7dfd8a09d1ff3 msgid ":meth:`Document.get_new_xref`" msgstr "" -#: ../../functions.rst:28 d21e9fbb952f4c59b1afaa2c83e8f6b0 +#: ../../functions.rst:28 0b6342969ec0441393c79f793e633ddd msgid "PDF only: create and return a new :data:`xref` entry" msgstr "PDFのみ:新しい :data:`xref` エントリを作成して返す" -#: ../../functions.rst:29 4afecd55d4c349ab97c5df5945287a8d +#: ../../functions.rst:29 62f8b93e8bf8444bbafae94639086f66 msgid ":meth:`Document.is_stream`" msgstr "" -#: ../../functions.rst:29 9a95e33bb3cd495c9949c7d5772ddb93 +#: ../../functions.rst:29 3b16adc919ff4ccb921eba7b7ec2457c msgid "PDF only: check whether an :data:`xref` is a stream object" msgstr "PDFのみ::data:`xref` がストリームオブジェクトであるかどうかを確認" -#: ../../functions.rst:30 dfd2673b92734f1e977002b130e80f1b +#: ../../functions.rst:30 7a3f46883b23434fb745bea51dd302df msgid ":meth:`Document.xml_metadata_xref`" msgstr "" -#: ../../functions.rst:30 476de3b33c9040a7960791fb1e72d617 +#: ../../functions.rst:30 b0b51441d32e4c969fe3b90dc9843f34 msgid "PDF only: return XML metadata :data:`xref` number" msgstr "PDFのみ:XMLメタデータの :data:`xref` 番号を返す" -#: ../../functions.rst:31 97ce028600194f7e99523e1b1eadd9ca +#: ../../functions.rst:31 b4adeece49294f0a9217abd6f42e075d msgid ":meth:`Document.xref_length`" msgstr "" -#: ../../functions.rst:31 2a6c8ed4a41b4ab3aa13726084499f8e +#: ../../functions.rst:31 cfa061cc4de4418a9a6c699fd6c1dbbf msgid "PDF only: return length of :data:`xref` table" msgstr "PDFのみ::data:`xref` テーブルの長さを返す" -#: ../../functions.rst:32 0eae92a8c95b41969faf257964cf05ca +#: ../../functions.rst:32 973a90abac464c3b8b375c56719a0bff msgid ":meth:`EMPTY_IRECT`" msgstr "" #: ../../functions.rst:32 ../../functions.rst:34 -#: 8fb5f703e62c44c69a069e3abaaf1800 d17b17ccb4894af9bf2b1d3ff8ba8412 +#: 291e722b9502438bb05be547414824c7 55383aeb0dae482fa2d060d914f7b6b4 msgid "return the (standard) empty / invalid rectangle" msgstr "標準の空の/無効な矩形を返す" -#: ../../functions.rst:33 772c73ceabfa4a47b06645f9ecfd94e4 +#: ../../functions.rst:33 205726f3db7d409494a330988f4f46ba msgid ":meth:`EMPTY_QUAD`" msgstr "" -#: ../../functions.rst:33 8a38942cc6ed47e085eeb6daa1142a48 +#: ../../functions.rst:33 101a675d89a348a39c26a4c078403def msgid "return the (standard) empty / invalid quad" msgstr "標準の空の/無効な四角形を返す" -#: ../../functions.rst:34 095b80cab66d484fb5db7f8c7dd9225d +#: ../../functions.rst:34 4b352eaf25a946d683f7845067fd3fe2 msgid ":meth:`EMPTY_RECT`" msgstr "" -#: ../../functions.rst:35 f9eb4259ac9a42e1ace3a382991ecb2c +#: ../../functions.rst:35 4c90b4ab2918473bbd455ac6e171a04b msgid ":meth:`get_pdf_now`" msgstr "" -#: ../../functions.rst:35 2d67ecc2baa64f4a8060fe8bf8ffff69 +#: ../../functions.rst:35 fa79da54010c460cb80834428c14658a msgid "return the current timestamp in PDF format" msgstr "現在のタイムスタンプをPDF形式で返す" -#: ../../functions.rst:36 dae28f3b26e74afcaefff0365c864a46 +#: ../../functions.rst:36 5235531d94bf455ca878c91fa390f88a msgid ":meth:`get_pdf_str`" msgstr "" -#: ../../functions.rst:36 7c6a0a0022254671bd62c5d40bc26dd7 +#: ../../functions.rst:36 cd5a4fcf322c478eb525e24c4c3e9ca7 msgid "return PDF-compatible string" msgstr "PDF互換の文字列を返す" -#: ../../functions.rst:37 27838abd312a405786870b03cb9e0ef0 +#: ../../functions.rst:37 3cef9014049b46ef8fb2c04a8a96525d msgid ":meth:`get_text_length`" msgstr "" -#: ../../functions.rst:37 840c03c4fd7f4f4e8e9e895c2106677a +#: ../../functions.rst:37 7deedb3c51ef4df0b7c843146b9b6110 msgid "return string length for a given font & :data:`fontsize`" msgstr "指定したフォントと :data:`fontsize` の文字列長を返す" -#: ../../functions.rst:38 7bba52b573164dbf8c21773d16b34267 +#: ../../functions.rst:38 865c3294809b414a9f66ddd11a8975ba msgid ":meth:`glyph_name_to_unicode`" msgstr "" -#: ../../functions.rst:38 00fae5a2ea244c7ebee226887e8793b0 +#: ../../functions.rst:38 c5ef798d869d46a488886a86148f9432 msgid "return unicode from a glyph name" msgstr "グリフ名からUnicodeを返す" -#: ../../functions.rst:39 167c047791214fcfa8517345faacbd89 +#: ../../functions.rst:39 777efc2daaf34022b9921b15fb3406ed msgid ":meth:`image_profile`" msgstr "" -#: ../../functions.rst:39 35d94d450278455c90f7826c84107125 +#: ../../functions.rst:39 4ad04b9521d940ed8675cf7ccf967fc5 msgid "return a dictionary of basic image properties" msgstr "基本的な画像プロパティの辞書を返します。" -#: ../../functions.rst:40 d8db99de3c5f48aea2d3a831f5f25063 +#: ../../functions.rst:40 f9f1eaf655b84ca6aa0cca517c7f74e7 msgid ":meth:`INFINITE_IRECT`" msgstr "" #: ../../functions.rst:40 ../../functions.rst:42 -#: 2e96de87fe95462abe944b12c04ac764 737a14b4cbf4493f8789d77fe1bb34d3 +#: 2b0312cf18394f9bb48eea5c1e82f262 8cb320f4f817465fbba9644f0f247810 msgid "return the (only existing) infinite rectangle" msgstr "(唯一存在する)無限の矩形を返します。" -#: ../../functions.rst:41 499efb69e4da4bcabde1005d3a3f8280 +#: ../../functions.rst:41 a1ac10acd9264731961d1b01f0eec40b msgid ":meth:`INFINITE_QUAD`" msgstr "" -#: ../../functions.rst:41 43f965ca3fb64d26852dc2fabbfdf13d +#: ../../functions.rst:41 c4853233b2054963818cbc88b3f9d8cb msgid "return the (only existing) infinite quad" msgstr "(唯一存在する)無限のクワッドを返します。" -#: ../../functions.rst:42 b5022fecf43749e3b1d968c1061b81b6 +#: ../../functions.rst:42 b1324daf9ff745fb9d2168d7be4648c7 msgid ":meth:`INFINITE_RECT`" msgstr "" -#: ../../functions.rst:43 fa211f7648304d21a52c6b4ac4060a7d +#: ../../functions.rst:43 4e1fe0343be849e89ad51baa5921d04a msgid ":meth:`make_table`" msgstr "" -#: ../../functions.rst:43 4b85378d6b3b48dca441bb651460ea18 +#: ../../functions.rst:43 fdf7383642024c03a67f955ae885907f msgid "split rectangle in sub-rectangles" msgstr "矩形をサブ矩形に分割します。" -#: ../../functions.rst:44 c9f4b5b118414965b4a93e0662d4d671 +#: ../../functions.rst:44 4adb8d71f2044344a5b26234ccf68e06 msgid ":meth:`Page.clean_contents`" msgstr "" -#: ../../functions.rst:44 1b737065fac141768ae8c762f81c0f83 +#: ../../functions.rst:44 f3cb03e57a5c41ae8143f7555a79c7fc msgid "PDF only: clean the page's :data:`contents` objects" msgstr "PDF のみ:ページの :data:`contents` オブジェクトをクリーンアップします" -#: ../../functions.rst:45 37728b6bb13a489fa75ed18fed0ca8f9 +#: ../../functions.rst:45 75ced595d7584e5f92e8eb2b62cd3ad4 msgid ":meth:`Page.get_bboxlog`" msgstr "" -#: ../../functions.rst:45 d3e59176e51f498f9370788dd02dccab +#: ../../functions.rst:45 8c4f754edc4c4b319cc2b54860845f79 msgid "list of rectangles that envelop text, drawing or image objects" msgstr "テキスト、描画、または画像オブジェクトを囲む矩形のリストです。" -#: ../../functions.rst:46 3c8a6b6aa1574a1f881ad91f2c3344ae +#: ../../functions.rst:46 d1e897d011a04f2c920b3cd8c3a2f4d6 msgid ":meth:`Page.get_contents`" msgstr "" -#: ../../functions.rst:46 03a6856746604d68b1bc19309aee10db +#: ../../functions.rst:46 8087b4ddded34432a1081ed947f22cea msgid "PDF only: return a list of content :data:`xref` numbers" msgstr "PDF のみ:コンテンツ :data:`xref` 番号のリストを返します。" -#: ../../functions.rst:47 ef01ebb1256641f1a71a27ceb2e34b45 +#: ../../functions.rst:47 4002cfc938c14ecaa48d6ee403f154d0 msgid ":meth:`Page.get_displaylist`" msgstr "" -#: ../../functions.rst:47 ed1c5a6199c541fa954d5652e932bca1 +#: ../../functions.rst:47 561f38475f9641f0bff2da76977dfe5a msgid "create the page's display list" msgstr "ページの表示リストを作成します。" -#: ../../functions.rst:48 9a642e8e1c104c45bd22ff4a20ecbabc +#: ../../functions.rst:48 53c748a7a20f4af897e22b85db7febe7 msgid ":meth:`Page.get_text_blocks`" msgstr "" -#: ../../functions.rst:48 39f7da7381644fa893f4391bd7eaad81 +#: ../../functions.rst:48 6a53466a2b9c4ca3a36d2fd49d6b817d msgid "extract text blocks as a Python list" msgstr "テキスト ブロックを Python リストとして抽出します。" -#: ../../functions.rst:49 4efc526eda1240389e4d86de0fc1a000 +#: ../../functions.rst:49 ccaaf6bb9f4345e6846f9b35f9f45357 msgid ":meth:`Page.get_text_words`" msgstr "" -#: ../../functions.rst:49 8be3700dad954858a354b3100eb5182d +#: ../../functions.rst:49 e1831d592e724dc3ac18729b5f39eb5e msgid "extract text words as a Python list" msgstr "テキストワードを Python リストとして抽出します。" -#: ../../functions.rst:50 3d71f23deab645dca40ee6a63e8c3d08 +#: ../../functions.rst:50 b6be6a798be9474b861e51b28bd9c46c msgid ":meth:`Page.get_texttrace`" msgstr "" -#: ../../functions.rst:50 57dc86b409e4412dbef48a37e050d1c5 +#: ../../functions.rst:50 1918ba1582404d0da1cfa1bb90facd9a msgid "low-level text information" msgstr "低レベルのテキスト情報です。" -#: ../../functions.rst:51 c5b89b2513ea452fa80d9a9a80b9f17d +#: ../../functions.rst:51 97f7f70a1f024c5596beba2d6083c370 msgid ":meth:`Page.read_contents`" msgstr "" -#: ../../functions.rst:51 6f884869467c4541a12b98da0a66bff1 +#: ../../functions.rst:51 fbbe70d6b80548bf81db0ed638604ff3 msgid "PDF only: get complete, concatenated /Contents source" msgstr "PDF のみ:完全な連結 /Contents ソースを取得します。" -#: ../../functions.rst:52 fd3870c657e44c5dbaaf23a1f942e9c9 +#: ../../functions.rst:52 97fc05c38d804f0c829d6226fae6ff64 msgid ":meth:`Page.run`" msgstr "" -#: ../../functions.rst:52 7929fc2b5f554b97a2ad4418923a60fd +#: ../../functions.rst:52 7d5ea217e7ce4dd2856d6dd788de51fa msgid "run a page through a device" msgstr "ページをデバイスを介して実行します。" -#: ../../functions.rst:53 5c92e536a9d24e9f90f8d0746f945580 +#: ../../functions.rst:53 3f0fafaa94704a27945b473cc84d6b53 msgid ":meth:`Page.set_contents`" msgstr "" -#: ../../functions.rst:53 3bc1ed294fdc4f9aacbc657384620a44 +#: ../../functions.rst:53 3a38b120e7094eef91491802cb5ede57 msgid "PDF only: set page's :data:`contents` to some :data:`xref`" msgstr "PDF のみ:ページの :data:`contents` を特定の :data:`xref` に設定します。" -#: ../../functions.rst:54 9254d31d596c4f4d97309a4afd49ddd7 +#: ../../functions.rst:54 0feca3c718384d869711f8270fcfe9a9 msgid ":meth:`Page.wrap_contents`" msgstr "" -#: ../../functions.rst:54 a862b53e918f4423910dc43104352845 +#: ../../functions.rst:54 ae1231ecd4ea49c7813df81e4da27c5e msgid "wrap contents with stacking commands" msgstr "スタッキング コマンドでコンテンツをラップします。" -#: ../../functions.rst:55 814a18dfdbf34c72902440d950d733cf +#: ../../functions.rst:55 b104404c744c474293113d1eef9ae246 msgid ":meth:`css_for_pymupdf_font`" msgstr "" -#: ../../functions.rst:55 18f47837feb14a8aabf96db17e2876b7 +#: ../../functions.rst:55 79e6c0cb8367467aae4981ef407ebca5 msgid "create CSS source for a font in package pymupdf_fonts" msgstr "パッケージ pymupdf_fonts のフォント用の CSS ソースを作成します。" -#: ../../functions.rst:56 96fbb4c226a44fb2a9ddd180bcf88eb3 +#: ../../functions.rst:56 86e04922d0254df48749ddd782a42be2 msgid ":meth:`paper_rect`" msgstr "" -#: ../../functions.rst:56 079706736af441488304680cd4961566 +#: ../../functions.rst:56 850682504daa47a3b49a984ce1189a63 msgid "return rectangle for a known paper format" msgstr "既知の用紙形式の矩形を返します。" -#: ../../functions.rst:57 b50eb762093248bdbd2d748a0587a560 +#: ../../functions.rst:57 c4d147c5a1d64c82a16e7e347fe90738 msgid ":meth:`paper_size`" msgstr "" -#: ../../functions.rst:57 4af03d7287a147178e02e07293203386 +#: ../../functions.rst:57 1c6cfbbad22542ec987d6587745efa4e msgid "return width, height for a known paper format" msgstr "既知の用紙形式の幅と高さを返します。" -#: ../../functions.rst:58 67479b183f4f42a09955f6e7aa486c69 +#: ../../functions.rst:58 3e78ca8b672c4df394141beb3ca86a19 msgid ":meth:`paper_sizes`" msgstr "" -#: ../../functions.rst:58 abd1e40ad8744e4a8aef9f89f357aad7 +#: ../../functions.rst:58 efdf46d6a1ee49d9a65b0785d1b8197d msgid "dictionary of pre-defined paper formats" msgstr "事前定義の用紙形式の辞書です。" -#: ../../functions.rst:59 a7468878075e449aa1e936f52a8ce5bc +#: ../../functions.rst:59 2b76da1b09664c2281a67555e1aee79d msgid ":meth:`planish_line`" msgstr "" -#: ../../functions.rst:59 59110cc88c574009abd5ff8bba2e6d09 +#: ../../functions.rst:59 55e6af8933184b9799583466ae6b5260 msgid "matrix to map a line to the x-axis" msgstr "直線を x 軸にマップする行列です。" -#: ../../functions.rst:60 a16ffd002cde4c0f964e5eb8bcc2f356 +#: ../../functions.rst:60 adf4a6912b74494e8b4a81e1ad1e023d msgid ":meth:`recover_char_quad`" msgstr "" -#: ../../functions.rst:60 b7248a98c91f428a9f91dcd0352e2a89 +#: ../../functions.rst:60 2593d09e30694c1f9bd6ce4bdb1520cb msgid "compute the quad of a char (\"rawdict\")" msgstr "文字のクワッドを計算します(\"rawdict\")。" -#: ../../functions.rst:61 e08812940adb41d2ac32fdcc3737de51 +#: ../../functions.rst:61 8b29bf9a3a4f4c3eb96ef7c0bd912926 msgid ":meth:`recover_line_quad`" msgstr "" -#: ../../functions.rst:61 54b0122980044e9cb165a616c07fe726 +#: ../../functions.rst:61 7d233952bb8e4ce885f963dd77fb0e6f msgid "compute the quad of a subset of line spans" msgstr "ラインスパンのサブセットのクワッドを計算します" -#: ../../functions.rst:62 b6b0b2338c2344cd90da8981ae2e8476 +#: ../../functions.rst:62 72275833d3a1438faa6a801185292b81 msgid ":meth:`recover_quad`" msgstr "" -#: ../../functions.rst:62 35b4e4f76e48429ea6345296f90ea072 +#: ../../functions.rst:62 5a8d087891f4445ea85ed013e701bc78 msgid "compute the quad of a span (\"dict\", \"rawdict\")" msgstr "スパンのクワッドを計算する (\"dict\", \"rawdict\")" -#: ../../functions.rst:63 eca9a5d425534164a1200f49c35ff881 +#: ../../functions.rst:63 9eef281b47d64378adb6f46472037ad9 msgid ":meth:`recover_span_quad`" msgstr "" -#: ../../functions.rst:63 715969f217724b93955b48ecd0fa81ab +#: ../../functions.rst:63 1a7eefd270d942119569ac42043ae560 msgid "compute the quad of a subset of span characters" msgstr "行スパンのサブセットのクワッドを計算します。" -#: ../../functions.rst:64 45a7022060ae45978ae5761beb3c92f9 +#: ../../functions.rst:64 d8411fe2450a4335b4720cfc8fd88ac1 +msgid ":meth:`set_messages`" +msgstr "" + +#: ../../functions.rst:64 49fec9a75fe34e408cf4e2b564d9393e +msgid "set destination of |PyMuPDF| messages." +msgstr "" + +#: ../../functions.rst:65 bacb887d9fe64e2586f478457311f52e msgid ":meth:`sRGB_to_pdf`" msgstr "" -#: ../../functions.rst:64 0c28ed34160c462dbddb0716f8a21274 +#: ../../functions.rst:65 7b07cd68b95740db96d883725a23dfc8 msgid "return PDF RGB color tuple from an sRGB integer" msgstr "sRGB 整数から PDF RGB カラー タプルを返します。" -#: ../../functions.rst:65 4c4b528f0c624eeaac035c3730601096 +#: ../../functions.rst:66 d9fad77ca5bb4ea29e7e115ae41027d9 msgid ":meth:`sRGB_to_rgb`" msgstr "" -#: ../../functions.rst:65 dea5adb7b47541e3aa3fb3ea3a31cdb7 +#: ../../functions.rst:66 3eb2e1a49c394d7190320f310ced9897 msgid "return (R, G, B) color tuple from an sRGB integer" msgstr "sRGB 整数から (R、G、B) カラー タプルを返します。" -#: ../../functions.rst:66 614d089dfc8a40d4b382ad0283e82b6e +#: ../../functions.rst:67 dacbb5d08f684a739eea5e737a0f8475 msgid ":meth:`unicode_to_glyph_name`" msgstr "" -#: ../../functions.rst:66 360bd7f1e0bb42589598a5c7558946bd +#: ../../functions.rst:67 e27898f4a503438b9c84fbaea53d8e46 msgid "return glyph name from a unicode" msgstr "Unicode からグリフ名を返します。" -#: ../../functions.rst:67 168ac883d56d48ccb52b1971ff2d4a70 +#: ../../functions.rst:68 3761a359e2a440e6a6d94194ddd5ca47 msgid ":meth:`get_tessdata`" msgstr "" -#: ../../functions.rst:67 3d745df01cac428389d321054acfbc3f +#: ../../functions.rst:68 7916666e646e4f1b81e7eeb0f76726f4 msgid "locates the language support of the Tesseract-OCR installation" msgstr "Tesseract-OCR インストールの言語サポートを特定します。" -#: ../../functions.rst:68 cae75a27525d4c41b4f347d93ed99209 +#: ../../functions.rst:69 88ba621d00d6454d87a956ca2ea10427 +msgid ":meth:`colors_pdf_dict`" +msgstr "" + +#: ../../functions.rst:69 8d156d20680342ef90bfb088e0b93fdf +msgid "return dict of color names." +msgstr "" + +#: ../../functions.rst:70 d6674fd6f92b465f9640631eee500d7b +msgid ":meth:`colors_wx_list`" +msgstr "" + +#: ../../functions.rst:70 72620216e10a478985af2dc1ca95125f +msgid "return list of color names." +msgstr "" + +#: ../../functions.rst:71 94e8002b7c134f61aae64d5f0ee42280 msgid ":attr:`fitz_fontdescriptors`" msgstr "" -#: ../../functions.rst:68 2951f5e6f9184ffb9dd3a85355d539a2 +#: ../../functions.rst:71 ccee6906defe4b3391fa9a827d7183b6 msgid "dictionary of available supplement fonts" msgstr "利用可能な補足フォントの辞書です。" -#: ../../functions.rst:69 36963fb2c27c48d68d8f1a15a4823c5d -msgid ":attr:`TESSDATA_PREFIX`" +#: ../../functions.rst:72 d4da999f959b4d72813e7d4b11346f02 +msgid ":attr:`PYMUPDF_MESSAGE`" msgstr "" -#: ../../functions.rst:69 cabf1c2282e84b59bccf3546a3a32ac9 -msgid "a copy of `os.environ[\"TESSDATA_PREFIX\"]`" -msgstr "os.environ[\"TESSDATA_PREFIX\"] のコピーです" +#: ../../functions.rst:72 d20b7c4d1f2d40a295f7f3556bd510ff +msgid "destination of |PyMuPDF| messages." +msgstr "" -#: ../../functions.rst:70 fe30b83204c34c498e0175053ec02e85 +#: ../../functions.rst:73 b730944f16e5483a91a1d0e55c948756 msgid ":attr:`pdfcolor`" msgstr "" -#: ../../functions.rst:70 99abd9d94bbf448680c090621203f5f0 +#: ../../functions.rst:73 a7dbeae797964748bc2445c3524f2142 msgid "dictionary of almost 500 RGB colors in PDF format." msgstr "PDF 形式のほぼ 500 以上の RGB カラーの辞書です。" -#: ../../functions.rst:75 2e073efcf1074766b59cdeaf558c4338 +#: ../../functions.rst:78 002feca7554345c0b5cf4b41b774f168 msgid "" "Convenience function to return width and height of a known paper format " "code. These values are given in pixels for the standard resolution 72 " "pixels = 1 inch." msgstr "既知の用紙フォーマットの幅と高さを返す便利な関数です。これらの値は、標準解像度 72 ピクセル = 1 インチのピクセル単位で指定されます。" -#: ../../functions.rst:77 462370aa057e4925aca32255cf8c803c +#: ../../functions.rst:80 17ca7e059e904354a626f297dde8741d msgid "" "Currently defined formats include **'A0'** through **'A10'**, **'B0'** " "through **'B10'**, **'C0'** through **'C10'**, **'Card-4x6'**, **'Card-" @@ -518,7 +542,7 @@ msgstr "" "5x7’**、**‘Commercial’**、**‘Executive’**、**‘Invoice’**、**‘Ledger’**、**‘Legal’**、**‘Legal-13’**、**‘Letter’**、**‘Monarch" "’**、**‘Tabloid-Extra’** が含まれており、各フォーマットは縦向きまたは横向きで提供されています。" -#: ../../functions.rst:79 32be57871b6046418519fb3767649f7c +#: ../../functions.rst:82 33458151eb9e4b27adb3007ddcaf2e74 msgid "" "A format name must be supplied as a string (case **in** \\sensitive), " "optionally suffixed with \"-L\" (landscape) or \"-P\" (portrait). No " @@ -527,22 +551,22 @@ msgstr "" "フォーマット名は、文字列として指定する必要があります(大文字小文字を区別しない)。オプションで \" -L\"(横向き)または \" " "-P\"(縦向き)でサフィックスを付けることができます。サフィックスが指定されていない場合、デフォルトは縦向きです。" -#: ../../functions.rst 02d515329e3b4181bff2cbdaa10b803f -#: 148202ab78a140da851a9c8de20f21f6 2115e753a258491385f941629e43e19b -#: 23888bbb10fa429e9a7cc4d399ac0ff4 26ed77cc080f4294812c6d2514b63d67 -#: 28758249face4c2b859888b535198a2c 3055b0fdbc9b469b89556d4781985d42 -#: 3ebb70ed1f184530a7daf7be05281adb 6c358a00ff6d48d7984287a8850c625d -#: 7641890305fc4fa8b43ce75b53fc93bc 8435f0502a604645828b01cb335643f3 -#: 8c77af79ebaa4ebc986f6f7c8f63d05d 9d3d49a1458c43cdb7e76f4d2f71ce1b -#: ab699830b1e747428c9527e4605ae009 ae6f8c69639f447f97eef7cbb791ad5b -#: b064bdc8561646efa2ff303146a6fcd8 b40d25889c264bbe9db7a8cf04254d07 -#: b9ad2e8a6c1f49a7a10e70163bec1f47 e378d7da80eb40ce85cfcbaa28a2dc8e -#: ec2b5332c0224c039795b006b0047d72 fded76ded33a4a8eaa657d55f30d6693 -#: fe5cc255037a4b9d9dd553f20040ffc9 +#: ../../functions.rst 0086ae19d23245d2a3c425d537cff985 +#: 0107a4c1a39347c4af4004ad0d5e403f 252c1e16d25c490cb7cbcce3b9f1cfce +#: 4d137e1791c745deb8c590d5bfbb5dc5 53d3e4977fb146ad8669a8e821bfefc2 +#: 64c8593781c046ddb8f521a6f1f0b725 73e64bfff41249dc85e4ec96e8391f45 +#: 906ceb613e864f36a87c345f3583fe16 9710f4ab97144634a38ae20942d1913c +#: 9926c7d0fcee400e841aa1890bc67ea2 9a5f4a6a98dc4147bdf82210a75f126b +#: 9d47d65487774d9c8607562d808e63bc a546b36584fc4023a7e68fa52d3bb110 +#: a9f64f731e974ea0aa63eb249d1d18db b3ce1309b9604e59aa7340f733b76c42 +#: c25ed4ddc44a4d8292fe7a949a15fe58 c4cdb78e6944459a8934a78aadb3eaa5 +#: c9c22817211c49a2ae16da519ef351b3 d7d622d64742404689c069e3aca882b3 +#: d9a5cf2ad2a74ac69251b17f01c01ef3 da9e9f534e6d4e9f8dbbb79b9ea31590 +#: f4fb4b17df8044c5967eb49d08ad2940 f56da1d9666f450fbdb7617571826508 msgid "Parameters" msgstr "" -#: ../../functions.rst:81 34a730eaf3e0405f887d792ffddcc4b4 +#: ../../functions.rst:84 d1edba4a2b0749ff9e106b3732d82d71 msgid "" "any format name from above in upper or lower case, like *\"A4\"* or " "*\"letter-l\"*." @@ -550,72 +574,132 @@ msgstr "" "上記のいずれかのフォーマット名を大文字または小文字で指定します。たとえば、*\"A4\"* または *\"letter-l\"* " "のように指定します。" -#: ../../functions.rst 0a655f6f9e95465f83d8415487452afd -#: 1553f07f8ce5497d8c6eb70c04787006 15d9e6e9d4094e618c111cc106b353d8 -#: 1aa89fe9227e4ec0babeb88175c99ac4 1b5b1ba6d13240cd80307c3c4560f029 -#: 206ef13499f349b68f6f2b6bc57ad7d5 209bac29dfc649c8a8d8ffae555bf93c -#: 3fd698b607aa4c8380cb20cbfad3bbc8 442097ac4506471b8c4ca7199f8949db -#: 55b7e84bf5524f49819d576a0a5e3190 676882485dac4f10b121ee4dbc159156 -#: 77c46e2061a84fbd95fda3a84ef40245 99dd17ef8a7a43c483f8b23b6921d56d -#: 9f9f11bae52a492f8e7eaa6d92a6d904 a22901c082ab414bb697f982fa2c9fdb -#: a3f6e8b49b8c45619276096cd36fc281 b00a44e1d2fa4b7bab88940a5e7ae621 -#: b304f4ad2bb140368d150c86a4ef2825 bca9c3c8088a400791acdec1c2e1f2ce -#: c227f3bfb6114afa954f65ea653e3e1c cadced4347ee4778a6fbbe9ec1d258ad -#: d41d8f3ed0414d008fa858d828b4afaa f9a31d1ce08c46eab55a1ecb7928a48b -#: fe009309d95640c1bd30fd33e55a5d30 +#: ../../functions.rst 0121f158b26c43a2b9c36019a068d476 +#: 0ce6605af5f4478d8061e1965c2e1d97 106ca0af52b042ab892bc071e9202602 +#: 1c86a8e962aa499e9e410d093e1a7f88 256a84d8523f4aee8718f26909ba604d +#: 327dfa749eae497cb7f5387483a9a444 32ee4d8eb19b45f6bae13ef61ea1df84 +#: 374143252c4d4144b7fc79a07ecbcfe9 54c6c9a08eb645fba6be747045bde8c4 +#: 550b0c06550e4a1db6acda53a6f75aee 64d7b707a7bf4582b8102acb5337d806 +#: 6c7410225afa49df905d5ed0d17dc474 6d694012d38941158e6047cbd6765876 +#: 7262ad3fefd743ddaa764526ac356634 89ce342518cf4fafa64b40ff6b7b140c +#: 97d9ffa38655495f8a0013a370df5289 a8487089b1734e4eb813ff485ba54710 +#: a8684a1cd202441c86731484fca25ce8 b10068ceba924c31976b9242b92fd17f +#: cd5f983948d04e5ab2670e6390e0052f d4a5ef1e9ff945c3b9d4e2747459e5b5 +#: e05046ff91b84ecfb6c3e9f910e35c6b e5e153a681464042ac902226ca22a638 +#: fec4328be3b2480a916f5378f659f73a msgid "Return type" msgstr "" -#: ../../functions.rst 072b70eb83e842dea3324d1b18bc0682 -#: 1241c98a8c9749079a97fa0ec0ec4d98 1b1e39955eb743ec9c546fb969fdbbdc -#: 208ac7c2a5174feca16c7f6dbc554a0f 2275fa701bc4490bb5026f368d17e0da -#: 25273f0dd8a3466fa5019f870c6418f3 417e1996767145ffa353f8e1e84149dc -#: 55f30f7ed3514c34b83ff2eb2e263669 56df2e349261436d9026164095028bf8 -#: 647b9abce23a458f9176a469cd728e1f 69bf7519c512496b9adcb30e9662afab -#: 746164ce64944ad992395a4244d452b8 85cbcb98b64f4655a51465874c8ed2fe -#: 94e0e511aa284361b56de441cc6e40ff 98b51f61925f47b4b07df5bbc2fe3f2b -#: b7aff03688674ef9bd5915acce4d4ba1 c40f8edec27b4ca58de9cf0d58a5e2e9 -#: c78b99c9b326486fb6da45fe61e1a12d d2c7b0cecaaf4e8b96a56f7cd6d91706 -#: d3f66153c89c49ec92b36bcbbf5ffd05 d60bb695df30454f9aac5c33ef99e10c -#: df0a510f214b47b08e6860284b8f1116 e9ed871311c94af88496edbfb382237a -#: f8f86eb652784c2387f860ccd4b9af85 fb7646bfb2fc4b599e6e38da918c7eb9 -#: fbd8d969ddd249e5a636e7fefc0b0beb +#: ../../functions.rst 0b28aca76f944ff18b6098afd579680a +#: 2b6133170db1444d825aff6739634e39 2b9736094e9f44c3a525fc5e7097a5e5 +#: 313496306a9743919ee5823a60c2d361 33ac39ac07414f85b3786ef4c9223ea3 +#: 454aad8620e64aa1a01848beb351cbec 5253deb9dac74a40b25e1b22197ba15d +#: 53a771157e234176a0d7ae969d9b227a 58185911039140a28707f02ad521b3ab +#: 5f35c2a270ac4eefa23fdc76dcee2484 624cf976820b41928dcd66343ff03da6 +#: 63b4df40d8c140b1be54bc04ef374174 6408e5ad41d2461a9f1df6fd1d10247a +#: 770763d9916145aa866e83c019d3897f 87450388ea2e4b3ba78057e08bf8d59c +#: 94045b20d2aa4b1db426dcb58eea1b10 94d79843696941f89e89964f275df7e5 +#: 9ff48f8556cd4c7799e4ae3e2becbe62 af5f6456a8f7493cae3a280402806308 +#: bd1a8c77553943e290203312960e2401 d3e45a9126484cd4a279e1ae5a54a761 +#: ddf4fe6c595f4133838d416f125ba6e5 debdc63467a94655af3b4c62c59d52cb +#: e1773e4b9bbc4fc1b6025290b2dd5ef4 e7e7c4c4fd324c66870c6a5a75a9fe69 msgid "Returns" msgstr "" -#: ../../functions.rst:84 ac5b90841daa4ba481515db67628054f +#: ../../functions.rst:87 1b138ce45cb24fb29f004a1d4309d345 msgid "" "*(width, height)* of the paper format. For an unknown format *(-1, -1)* " -"is returned. Examples: *pymupdf.paper_size(\"A4\")* returns *(595, 842)* and" -" *pymupdf.paper_size(\"letter-l\")* delivers *(792, 612)*." +"is returned. Examples: *pymupdf.paper_size(\"A4\")* returns *(595, 842)* " +"and *pymupdf.paper_size(\"letter-l\")* delivers *(792, 612)*." msgstr "" "用紙フォーマットの *(幅、高さ)*。不明なフォーマットの場合、(-1、-1) " "が返されます。例:*pymupdf.paper_size(\"A4\")* は (595、842) " "を返し、*pymupdf.paper_size(\"letter-l\")* は *(792、612)* を返します。" -#: ../../functions.rst:90 8faa7984bb8447bbaa4e6137e8197b03 +#: ../../functions.rst:93 405aadeaf0834803b43a3691be34a350 msgid "Convenience function to return a :ref:`Rect` for a known paper format." msgstr "既知の紙のフォーマットに対応する :ref:`Rect` を返す便益関数です。" -#: ../../functions.rst:92 60a7100f536b4bce9080f1835f9f0b6b +#: ../../functions.rst:95 4321cecbf19e44b5969aaaac7d91192f msgid "any format name supported by :meth:`paper_size`." msgstr ":meth:`paper_size` でサポートされている任意のフォーマット名。" -#: ../../functions.rst:94 328b1427b7e3475b986c27e7a7c1d721 +#: ../../functions.rst:97 6253b4e47f72404b86be542a1f5ba214 msgid ":ref:`Rect`" msgstr "" -#: ../../functions.rst:95 6f5aa63c0b044ffeb849067e07992742 -msgid "*pymupdf.Rect(0, 0, width, height)* with *width, height=pymupdf.paper_size(s)*." +#: ../../functions.rst:98 96cb4ba9703240cda5af5d9b5ebd4273 +msgid "" +"*pymupdf.Rect(0, 0, width, height)* with *width, " +"height=pymupdf.paper_size(s)*." +msgstr "" + +#: ../../functions.rst:109 209aaeabd9fc46ac99b66ad31493b3d0 +msgid "" +"Sets destination of |PyMuPDF| messages to a file descriptor, a file, an " +"existing stream or `Python's logging system " +"`_." +msgstr "" + +#: ../../functions.rst:113 494817e916d2455a86023b21c58f3a11 +msgid "Usually one would only set one arg, or one or more `pylogging*` args." +msgstr "" + +#: ../../functions.rst:115 8e1da9c75a4d46cd98e9c4659b1a151c +msgid "" +"A text specification of destination; for details see description of " +"environmental variable `PYMUPDF_MESSAGE`." +msgstr "" + +#: ../../functions.rst:118 34909df9199646a4b311eeccca4936a0 +msgid "Write to file descriptor." +msgstr "" + +#: ../../functions.rst:120 9b448bc58b824bb08b07efa6932546dd +msgid "" +"Write to existing stream, which must have methods `.write(text)` and " +"`.flush()`." +msgstr "" + +#: ../../functions.rst:123 f053785536f6462bba2672cfee39462e +msgid "Write to a file." msgstr "" -#: ../../functions.rst:106 ../../functions.rst:118 ../../functions.rst:232 -#: 61804c6ac63f4178b9b99d557fa0be0e 7215f5accc6e4490a927e3bbdfc96db1 -#: f840b9d6eef34b4aa39b31b54e3bffe8 +#: ../../functions.rst:125 5a0b5cb436f2417c881f352a3f16f2d2 +msgid "Append to a file." +msgstr "" + +#: ../../functions.rst:127 ad3bbc6027e84e2bab9cb27d2b9ea314 +msgid "Write to Python's `logging` system." +msgstr "" + +#: ../../functions.rst:129 11b3c7e90be841f99339dbc2b36b3221 +msgid "Write to Python's `logging` system using specified Logger." +msgstr "" + +#: ../../functions.rst:131 71019e8509cd432ab8818a7b104e22de +msgid "Write to Python's `logging` system using specified level." +msgstr "" + +#: ../../functions.rst:133 c04c80653e184bbab2777ad6e8ce5511 +msgid "" +"Write to Python's `logging` system using specified logger name. Only used" +" if `pylogging_logger` is None. Default is `pymupdf`." +msgstr "" + +#: ../../functions.rst:137 10dcacf9980a48319c1ccddf8727743f +msgid "" +"If any `pylogging*` arg is not None, we write to `Python's logging system" +" `_." +msgstr "" + +#: ../../functions.rst:144 ../../functions.rst:156 ../../functions.rst:270 +#: 263672d47c2b4937aabab2ac1973bdd6 b0f3d381bde84d2e9d140f8eb6fc20c8 +#: fc756121bb534e6888ea52f5d5f7475b msgid "*New in v1.17.4*" msgstr "*バージョン1.17.4で新たに追加*" -#: ../../functions.rst:108 75a2934d0f1d4f9ba046f22257a49fb5 +#: ../../functions.rst:146 28a2adf5d1a8459a866ce88539692849 msgid "" "Convenience function returning a PDF color triple (red, green, blue) for " "a given sRGB color integer as it occurs in :meth:`Page.get_text` " @@ -624,14 +708,14 @@ msgstr "" ":meth:`Page.get_text` の辞書 \"dict\" および \"rawdict\" に存在する与えられた sRGB " "カラー整数に対して、PDF カラーのトリプル(赤、緑、青)を返す便益関数です。" -#: ../../functions.rst:110 ../../functions.rst:122 -#: 5418712f5dad4417bab76a1ba5b1647f dec4c0784e97489ca5150009f5fc08c2 +#: ../../functions.rst:148 ../../functions.rst:160 +#: 8382544bac0e4c58959a7c6356a5ea1d 938ab4f232fd47ad925a7c3d3141b81b msgid "" "an integer of format RRGGBB, where each color component is an integer in " "range(255)." msgstr "各カラーコンポーネントが範囲[0, 255]の整数である RRGGBB 形式の整数。" -#: ../../functions.rst:112 eaa541042f2548348d33d7834c8ef3b9 +#: ../../functions.rst:150 10f206e7d5e243329ebcb32246f8b902 msgid "" "a tuple (red, green, blue) with float items in interval *0 <= item <= 1* " "representing the same color. Example `sRGB_to_pdf(0xff0000) = (1, 0, 0)` " @@ -641,13 +725,13 @@ msgstr "" "の間の浮動小数点数アイテムを持つタプル(赤、緑、青)で、同じカラーを表します。例:`sRGB_to_pdf(0xff0000) = (1, 0, " "0)` (赤)。" -#: ../../functions.rst:120 596074d1e1fd4b41bd77c02667cacbe5 +#: ../../functions.rst:158 3f1bd182a011433f95c261cb5072c83e msgid "" "Convenience function returning a color (red, green, blue) for a given " "*sRGB* color integer." msgstr "与えられた *sRGB* カラー整数に対して、カラー(赤、緑、青)を返す便益関数です。" -#: ../../functions.rst:124 4c0f7632dde648c599abc6582bff272c +#: ../../functions.rst:162 56008f93f9c4445e9550ff701c9a5067 msgid "" "a tuple (red, green, blue) with integer items in `range(256)` " "representing the same color. Example `sRGB_to_pdf(0xff0000) = (255, 0, " @@ -656,20 +740,20 @@ msgstr "" "整数アイテムが `range(256)` の範囲にある、同じ色を表すタプル(赤、緑、青)。例: `sRGB_to_pdf(0xff0000) = " "(255, 0, 0)` (赤)" -#: ../../functions.rst:130 ../../functions.rst:145 ../../functions.rst:160 -#: ../../functions.rst:173 006f7466728c4bdaa1e682aef87aa241 -#: 0a36b3e7790642ff8ee907b7b4d6bf9a 6d36a95dac08419b8382873be956cff6 -#: a13643d6e233448ba8af0fa861e567f6 +#: ../../functions.rst:168 ../../functions.rst:183 ../../functions.rst:198 +#: ../../functions.rst:211 6909db03961b42e384921d94b42d088b +#: 7fa4e5d78b60492e8580ca2bd95fc9e2 df918e2414764ab88723bfeb276d87b3 +#: e0895f463b6a4252a8d81f9f899483c2 msgid "*New in v1.18.0*" msgstr "*バージョン1.18.0で新たに追加*" -#: ../../functions.rst:132 cd2b04aa606a4f43aec9cb69dd7b8446 +#: ../../functions.rst:170 1c99f3f02cbe41beaaccdc4a304a0c18 msgid "" "Return the unicode number of a glyph name based on the **Adobe Glyph " "List**." msgstr "**Adobe Glyph List** に基づくグリフ名のUnicode番号を返す関数です。" -#: ../../functions.rst:134 09cf1f8a2e994cdfb4c9104b35469f94 +#: ../../functions.rst:172 4d64118594024a50bb3b89613e2a782a msgid "" "the name of some glyph. The function is based on the `Adobe Glyph List " "`_ に基づいています。" -#: ../../functions.rst:137 f39e3867b8ef4b6d9138b5f90670bc20 +#: ../../functions.rst:175 6f671fb8e68041e9babf072c102e5b6f msgid "the unicode. Invalid *name* entries return `0xfffd (65533)`." msgstr "Unicode番号。無効な *name* のエントリは `0xfffd (65533)` を返します。" -#: ../../functions.rst:139 ../../functions.rst:167 ../../functions.rst:180 -#: 2b780e8610b742fdac5f34592ad16f22 7ac7ce8674f5450c9a66d4d49fdcbe5c -#: e1719a48b88f48de87028b811d032229 +#: ../../functions.rst:177 ../../functions.rst:205 ../../functions.rst:218 +#: 1d529882b0fd460cb9ec78ab559a0ece 318abb6987cc4a819a5fcfa675571abb +#: 3ff634aebfcc49c0a91be502177113cf msgid "" "A similar functionality is provided by package `fontTools " "`_ in its *agl* sub-package." @@ -692,14 +776,14 @@ msgstr "" "同様の機能は、`fontTools `_ パッケージの *agl* " "サブパッケージで提供されています。" -#: ../../functions.rst:147 cb9f7935a4f044cd8462a23408fd689b +#: ../../functions.rst:185 609da01536814ffc8706b0bbea3ab5f8 msgid "" "Return the glyph name of a unicode number, based on the **Adobe Glyph " "List**." msgstr "以下は、**Adobe Glyph List** に基づいた、Unicode番号に基づいたグリフ名を返す関数です。" -#: ../../functions.rst:149 763bfcf0bc004d399d2583d10bf7422b -#: e7e300fbbb624dd0be2e4664fe0705c1 +#: ../../functions.rst:187 6a2134788061488f80d967a33cc10f18 +#: b79e55b908d046998fb2c3e15ba9aa33 msgid "" "the unicode given by e.g. `ord(\"ß\")`. The function is based on the " "`Adobe Glyph List `_ に基づいています。" -#: ../../functions.rst:152 886c62f7a2e841f2af796198f72ec82b +#: ../../functions.rst:190 075e96968e27471791191d74ea61cb09 msgid "" "the glyph name. E.g. `pymupdf.unicode_to_glyph_name(ord(\"Ä\"))` returns " "`'Adieresis'`." msgstr "グリフ名、例:`pymupdf.unicode_to_glyph_name(ord(\"Ä\"))` は `'Adieresis'` を返します。" -#: ../../functions.rst:154 a458ad05ba024f9e9e289cfe249fff1b +#: ../../functions.rst:192 2ebedf06c52f4f49a1b608ac0a185a68 msgid "" "A similar functionality is provided by package `fontTools " "`_: in its *agl* sub-package." @@ -723,33 +807,33 @@ msgstr "" "類似の機能は、`fontTools `_ パッケージの *agl* " "サブパッケージで提供されています。" -#: ../../functions.rst:162 2454ffd9afcf4515b7cabbe637980fe7 +#: ../../functions.rst:200 901a264999f74b27b1b6f0c75e3d26ce msgid "Return a list of glyph names defined in the **Adobe Glyph List**." msgstr "**Adobe Glyph List** で定義されたグリフ名のリストを返します。" -#: ../../functions.rst:165 9befc5cec0764c03b225dbd47c7a1992 +#: ../../functions.rst:203 8a8082e41b3b4d36b08a96250bdea3ff msgid "list of strings." msgstr "文字列のリスト。" -#: ../../functions.rst:175 194876ded4214674b88872b8dc3688d0 +#: ../../functions.rst:213 2f4ba69189114cc490cffb97e8a0ab9f msgid "" "Return a list of unicodes for there exists a glyph name in the **Adobe " "Glyph List**." msgstr "**Adobe Glyph List** にグリフ名が存在するUnicodeのリストを返します。" -#: ../../functions.rst:178 17b007ab35374ee0962f6d028e128e2e +#: ../../functions.rst:216 74dae50c6b504e448879f45b492bc8ca msgid "list of integers." msgstr "整数のリスト。" -#: ../../functions.rst:186 576975080c9047138e6d80bf177096b5 +#: ../../functions.rst:224 6bcba2202f05412b80d121404158c83d msgid "*New in v1.21.0*" msgstr "*新機能 v1.21.0*" -#: ../../functions.rst:188 e94916278bef4fcaa57d34ebe692d60c +#: ../../functions.rst:226 fb495a7e4a74418db018826854000539 msgid "**Utility function for use with \"Story\" applications.**" msgstr "**\"Story\" アプリケーションで使用するためのユーティリティ関数。**" -#: ../../functions.rst:190 e52139db2f614f3d9ffbfe81b15bf094 +#: ../../functions.rst:228 4809306f864c4a89ad70d5975115d193 msgid "" "Create CSS `@font-face` items for the given fontcode in pymupdf-fonts. " "Creates a CSS font-family for all fonts starting with string " @@ -758,7 +842,7 @@ msgstr "" "指定された \"fontcode\" に対して CSS `@font-face` アイテムを作成します。文字列 \"fontcode\" " "で始まるすべてのフォント用に CSS font-family を作成します。" -#: ../../functions.rst:192 754c4cd65c7447d3bc2e28400527f9a8 +#: ../../functions.rst:230 e303e778dae54e6386372944b977834f msgid "" "The font naming convention in package pymupdf-fonts is \"fontcode\", " "where the suffix \"sf\" is one of \"\" (empty), \"it\"/\"i\", " @@ -769,27 +853,27 @@ msgstr "" "は(空白)、\"it\"、\"i\"、\"bo\"、\"b\"、\"bi\" " "のいずれかです。したがって、これらのサフィックスは、フォントの通常の、イタリックの、太字の、太字イタリックのバリアントを表します。" -#: ../../functions.rst:194 8b522f3167fe442f828003134726a7c7 +#: ../../functions.rst:232 49d93b48dea8445a957440edfb91fc78 msgid "For example, font code \"notos\" refers to fonts" msgstr "例えば、フォントコード \"notos\" は以下のフォントに対応します。" -#: ../../functions.rst:196 4dffcc77e98f438187baed0661955e8d +#: ../../functions.rst:234 d540049bb18b402b8e2fce94206a4c9d msgid "\"notos\" - \"Noto Sans Regular\"" msgstr "" -#: ../../functions.rst:197 88893dedb4844c07a575a184f9331620 +#: ../../functions.rst:235 bf50eb25ccaa4873a1e000b10f70f85d msgid "\"notosit\" - \"Noto Sans Italic\"" msgstr "" -#: ../../functions.rst:198 0dea68c6cada44ca9b3d92f2c12f7492 +#: ../../functions.rst:236 c64e89ce985b4b40b347a45ae5034e62 msgid "\"notosbo\" - \"Noto Sans Bold\"" msgstr "" -#: ../../functions.rst:199 56126f9e3cdb4324b31aabb8c38a7b4c +#: ../../functions.rst:237 243f4afbd3cc424aace4fb3d1c4aeb29 msgid "\"notosbi\" - \"Noto Sans Bold Italic\"" msgstr "" -#: ../../functions.rst:201 240c25bf37d746d78e511a7b56b25673 +#: ../../functions.rst:239 a51da85020894121a2adaabef5348f53 msgid "" "The function creates (up to) four CSS `@font-face` definitions and " "collectively assigns the `font-family` name \"notos\" to them (or the " @@ -800,7 +884,7 @@ msgstr "" "\"notos\"(または指定された \"name\" " "の値)を割り当てます。関連するフォントバッファは提供されたアーカイブに配置されます/追加されます。" -#: ../../functions.rst:203 fe4006aa53bb4490acbbfd8701369efd +#: ../../functions.rst:241 3132df29e9a44c06b7d46173b110b76a msgid "" "To use the font in the Python API for :ref:`Story`, execute " "`.set_font(fontcode)` (or \"name\" if given). The correct font weight or " @@ -809,7 +893,7 @@ msgstr "" ":ref:`Story` の Python API でフォントを使用するには、`.set_font(fontcode)`(または指定した場合は " "\"name\")を実行します。必要に応じて正しいフォントウェイトまたはスタイルが自動的に選択されます。" -#: ../../functions.rst:205 7f73a488044c478eb6249caeb79dffa5 +#: ../../functions.rst:243 21a24adeea0843709838dbd657e52cf5 msgid "" "For example to replace the \"sans-serif\" HTML standard (i.e. Helvetica) " "with the above \"notos\", execute the following. Whenever \"sans-serif\" " @@ -819,17 +903,17 @@ msgstr "" "たとえば、上記の \"notos\" で \"sans-serif\" HTML 標準(Helvetica)を置き換えるには、次のように実行します" "。\"sans-serif\" が使用される場合(明示的にまたは暗黙的に)、Noto Sans フォントが選択されます。" -#: ../../functions.rst:207 ffc403e5a0d241449802d86d1008130c +#: ../../functions.rst:245 6f8364fda1b84e83815345fa382938cb msgid "" "`CSS = pymupdf.css_for_pymupdf_font(\"notos\", name=\"sans-serif\", " "archive=...)`" msgstr "" -#: ../../functions.rst:209 363cbac635d6436a87158620322d6179 +#: ../../functions.rst:247 261383cb1f684bcaa5dc2ca977a8e1a7 msgid "Expects and returns the CSS source, with the new CSS definitions appended." msgstr "CSS ソースが期待されており、新しい CSS 定義が追加されています。" -#: ../../functions.rst:211 1d4a64bad08440f1988ca8cfde9282fa +#: ../../functions.rst:249 5a7949de431b4714bf7738ba97e9843e msgid "" "one of the font codes present in package `pymupdf-fonts " "`_ (usually) representing the " @@ -838,7 +922,7 @@ msgstr "" "`pymupdf-fonts `_ " "パッケージに存在するフォントファミリーの通常バージョンを表す、フォントコード。" -#: ../../functions.rst:212 255dd5e575ab4277b9a624f82a89035f +#: ../../functions.rst:250 82d6c0696254483d8cb06494af221497 msgid "" "any already existing CSS source, or `None`. The function will append its " "new definitions to this. This is the string that **must be used** as " @@ -847,7 +931,7 @@ msgstr "" "既存の CSS ソース、または `None`。新しい定義はこれに追加されます。これは :ref:`Story` を作成する際に " "`user_css` として **使用する必要がある** 文字列です。" -#: ../../functions.rst:213 7048ceaf4e244f1abb3ab84c97522a08 +#: ../../functions.rst:251 2d57c3a9f53d4da38683c5c30aed39d0 msgid "" ":ref:`Archive`, **mandatory**. All font binaries (i.e. up to four) found " "for \"fontcode\" will be added to the archive. This is the archive that " @@ -857,26 +941,26 @@ msgstr "" "に対して見つかるすべてのフォントバイナリ(最大で4つ)がアーカイブに追加されます。これは :ref:`Story` を作成する際に " ":ref:`Archive` として**使用する必要があります** 。" -#: ../../functions.rst:214 d575bf4a18d74d09b21508e1b0a2171f +#: ../../functions.rst:252 a831e1b443044f949bfac61510ccb880 msgid "" "the name under which the \"fontcode\" fonts should be found. If omitted, " "\"fontcode\" will be used." msgstr "\"fontcode\" フォントが見つかる名前。省略した場合、\"fontcode\" が使用されます。" -#: ../../functions.rst:217 03fdaade951a4314b9d40eb700b2c541 +#: ../../functions.rst:255 4ecf6d28131348f3a658cd320f01200f msgid "" "Modified CSS, with appended `@font-face` statements for each font variant" " of fontcode. Fontbuffers associated with \"fontcode\" will have been " "added to 'archive'. The function will automatically find up to 4 font " "variants. All pymupdf-fonts (that are no special purpose like math or " "music, etc.) have regular, bold, italic and bold-italic variants. To see " -"currently available font codes check `pymupdf.fitz_fontdescriptors.keys()`. " -"This will show something like `dict_keys(['cascadia', 'cascadiai', " -"'cascadiab', 'cascadiabi', 'figbo', 'figo', 'figbi', 'figit', 'fimbo', " -"'fimo', 'spacembo', 'spacembi', 'spacemit', 'spacemo', 'math', 'music', " -"'symbol1', 'symbol2', 'notosbo', 'notosbi', 'notosit', 'notos', 'ubuntu'," -" 'ubuntubo', 'ubuntubi', 'ubuntuit', 'ubuntm', 'ubuntmbo', 'ubuntmbi', " -"'ubuntmit'])`." +"currently available font codes check " +"`pymupdf.fitz_fontdescriptors.keys()`. This will show something like " +"`dict_keys(['cascadia', 'cascadiai', 'cascadiab', 'cascadiabi', 'figbo', " +"'figo', 'figbi', 'figit', 'fimbo', 'fimo', 'spacembo', 'spacembi', " +"'spacemit', 'spacemo', 'math', 'music', 'symbol1', 'symbol2', 'notosbo', " +"'notosbi', 'notosit', 'notos', 'ubuntu', 'ubuntubo', 'ubuntubi', " +"'ubuntuit', 'ubuntm', 'ubuntmbo', 'ubuntmbi', 'ubuntmit'])`." msgstr "" "変更された CSS。\"fontcode\" の各フォントバリアントに対して追加された `@font-face` " "ステートメントを含みます。関連する pymupdf-fonts のフォントバッファが 'archive' に追加されます。関数は最大で 4 " @@ -888,13 +972,13 @@ msgstr "" " 'ubuntubo', 'ubuntubi', 'ubuntuit', 'ubuntm', 'ubuntmbo', 'ubuntmbi', " "'ubuntmit'])` のようなものが表示されます。" -#: ../../functions.rst:219 b7245331e91441eca4b7ca3010513ef4 +#: ../../functions.rst:257 bd2b0caaa55b48a4a91a57acaef9b5db msgid "" "Here is a complete snippet for using the \"Noto Sans\" font instead of " "\"Helvetica\"::" msgstr "以下は \"Helvetica\" の代わりに \"Noto Sans\" フォントを使用する完全なスニペットです::" -#: ../../functions.rst:234 97f858e89d334ae08ee156acd84934d1 +#: ../../functions.rst:272 6c7eb3d6af61417aa66cef53d50ec562 #, fuzzy msgid "" "Convenience function to split a rectangle into sub-rectangles of equal " @@ -905,19 +989,19 @@ msgstr "" "矩形をサブ矩形に分割するための関数です。*行* のリストを含むリストを返し、各リストには指定された *列数* の :ref:`Rect` " "アイテムが含まれています。各サブ矩形はその行と列のインデックスでアクセスできます。" -#: ../../functions.rst:236 4358d20bf1de4bc0955df8d31dbcc57d +#: ../../functions.rst:274 55f942fd80da4d66bac2b35ee5a51276 msgid "the rectangle to split." msgstr "分割する矩形。" -#: ../../functions.rst:237 f35309434cea4d9fb19712b6a7ce1d09 +#: ../../functions.rst:275 555136c14a224f6ea35dce0f1ec9c79d msgid "the desired number of columns." msgstr "列の数。" -#: ../../functions.rst:238 b0a73b3de30d4d9fb416ae45884abdd8 +#: ../../functions.rst:276 6569fd83357741b98b4916dc1ebc46ae msgid "the desired number of rows." msgstr "行の数。" -#: ../../functions.rst:239 21d4fdc04958483fa3c87aebf387f760 +#: ../../functions.rst:277 b5930e3aeb564e1c9a36af2644961112 msgid "" "a list of :ref:`Rect` objects of equal size, whose union equals *rect*. " "Here is the layout of a 3x4 table created by `cell = " @@ -927,54 +1011,54 @@ msgstr "" "pymupdf.make_table(rect, cols=4, rows=3)` によって作成された 3x4 " "のテーブルのレイアウトは次のようになります:" -#: ../../functions.rst:249 524a5a663b6a42189b6d418989a5749f +#: ../../functions.rst:287 aeb0295f33ed4f3680e7eaae3631829e msgid "New in version 1.16.2)*" msgstr "*バージョン1.16.2で新たに導入されました。*" -#: ../../functions.rst:251 57bd378c3e4a43419fb82fe6a5afeecd +#: ../../functions.rst:289 dd962cf0f83d4e7bbe3373a541ff2cd6 msgid "" "Return a matrix which maps the line from p1 to p2 to the x-axis such that" " p1 will become (0,0) and p2 a point with the same distance to (0,0)." msgstr "p1からp2への直線をx軸にマッピングする行列を返します。その際、p1は(0,0)になり、p2は(0,0)から同じ距離に配置されるように変換されます。" -#: ../../functions.rst:253 d5c91f2072384e6f8fc5fbd7b534265d +#: ../../functions.rst:291 27847587bb6e480588c5a42b1044353e msgid "starting point of the line." msgstr "直線の始点。" -#: ../../functions.rst:254 1fbc73cf9a55473d9ebd143fa3415486 +#: ../../functions.rst:292 f4a34c3eb1de46778eed630ba3f8a554 msgid "end point of the line." msgstr "直線の終点。" -#: ../../functions.rst:256 d31b88ff4ba34dbf910e36d02515c885 +#: ../../functions.rst:294 0a643e5f3a5544c9a7f7eb96a29a5e50 msgid ":ref:`Matrix`" msgstr "" -#: ../../functions.rst:257 3f2d9e1801554619b6b77fe20f5c32d1 +#: ../../functions.rst:295 efc91beb38014b22a8c5dc17a55a5ad8 msgid "" "a matrix which combines a rotation and a translation:: >>> p1 = " -"pymupdf.Point(1, 1) >>> p2 = pymupdf.Point(4, 5) >>> abs(p2 - p1) # " -"distance of points 5.0 >>> m = pymupdf.planish_line(p1, p2) >>> p1 " -"* m Point(0.0, 0.0) >>> p2 * m Point(5.0, " +"pymupdf.Point(1, 1) >>> p2 = pymupdf.Point(4, 5) >>> abs(p2 - p1) " +"# distance of points 5.0 >>> m = pymupdf.planish_line(p1, p2) " +">>> p1 * m Point(0.0, 0.0) >>> p2 * m Point(5.0, " "-5.960464477539063e-08) >>> # distance of the resulting points >>> " "abs(p2 * m - p1 * m) 5.0 .. image:: images/img-planish.png " ":scale: 40" msgstr "" -#: ../../functions.rst:257 75973700d2bd495aa4142677fd1d6133 +#: ../../functions.rst:295 99ce4ad1b2e44ef9952ab645c2e2a29f msgid "a matrix which combines a rotation and a translation::" msgstr "回転と平行移動を組み合わせた行列::" -#: ../../functions.rst:281 6ad01640faf94046876005080a4e17f0 +#: ../../functions.rst:319 cd6d3f128f3d404cb028905325357f80 msgid "" "A dictionary of pre-defines paper formats. Used as basis for " ":meth:`paper_size`." msgstr "あらかじめ定義された用紙フォーマットの辞書。:meth:`paper_size` の基盤として使用されます。" -#: ../../functions.rst:287 e42a8093437641d3a2fe57579c640cfe +#: ../../functions.rst:325 779d1b9d87ec456386f8b682518e1b8d msgid "New in v1.17.5" msgstr "バージョン1.17.5で新たに導入されました" -#: ../../functions.rst:289 7ac4e0338d764c4aae5779333d13c1dd +#: ../../functions.rst:327 2a02368d2b68461c8413177ff0766a85 msgid "" "A dictionary of usable fonts from repository `pymupdf-fonts " "`_. Items are keyed by their " @@ -983,77 +1067,110 @@ msgstr "" "`pymupdf-fonts `_ " "リポジトリから使用可能なフォントの辞書。アイテムは予約されたフォント名でキー付けされ、以下のような情報を提供します::" -#: ../../functions.rst:305 b67ba26951fb4a03b7936762228c8c88 +#: ../../functions.rst:343 cb398218853f42038512c72c146c78e8 msgid "If `pymupdf-fonts` is not installed, the dictionary is empty." msgstr "`pymupdf-fonts` がインストールされていない場合、この辞書は空です。" -#: ../../functions.rst:307 7cc9518e7a3b4059a3d2e3483d6212e2 +#: ../../functions.rst:345 d3a4226063254a47a7110bef0f56256f msgid "" "The dictionary keys can be used to define a :ref:`Font` via e.g. `font = " -"pymupdf.Font(\"fimo\")` -- just like you can do it with the builtin fonts " -"\"Helvetica\" and friends." +"pymupdf.Font(\"fimo\")` -- just like you can do it with the builtin fonts" +" \"Helvetica\" and friends." msgstr "" -"辞書のキーは、例えば `font = pymupdf.Font(\"fimo\")` のように使用してフォントを定義できます。これは、組み込みのフォント" -" \"Helvetica\" やその他のフォントと同様に行うことができます。" +"辞書のキーは、例えば `font = pymupdf.Font(\"fimo\")` " +"のように使用してフォントを定義できます。これは、組み込みのフォント \"Helvetica\" やその他のフォントと同様に行うことができます。" -#: ../../functions.rst:313 abcab2d360ce420990ed3d9d5a4e02fa -msgid "New in v1.19.4" -msgstr "バージョン1.19.4で新たに導入されました" +#: ../../functions.rst:351 c7682a849a5048fe99f8c19c9aee7cb3 +msgid "" +"If in `os.environ` when |PyMuPDF| is imported, sets destination of " +"|PyMuPDF| messages. Otherwise messages are sent to `sys.stdout`." +msgstr "" -#: ../../functions.rst:315 9619002543ae4d068f7916225d1991ff +#: ../../functions.rst:355 3218febc90704ce79797a636f25c89c1 msgid "" -"Copy of `os.environ[\"TESSDATA_PREFIX\"]` for convenient checking whether" -" there is integrated Tesseract OCR support." -msgstr "便利なチェックに使用される `os.environ[\"TESSDATA_PREFIX\"]` のコピー" +"If the value starts with `fd:`, the remaining text should be an integer " +"file descriptor to which messages are written." +msgstr "" -#: ../../functions.rst:317 bf7da7cf1da34c9cba7e5e10ae9d79af +#: ../../functions.rst:358 638ff04c1b724dbbabe6d8cde2b252fb +msgid "For example `PYMUPDF_MESSAGE=fd:2` will send messages to stderr." +msgstr "" + +#: ../../functions.rst:360 dcaaa640c313488f9ea010cb608902e7 msgid "" -"If this attribute is `None`, Tesseract-OCR is either not installed, or " -"the environment variable is not set to point to Tesseract's language " -"support folder." +"If the value starts with `path:`, the remaining text is the path of a " +"file to which messages are written. If the file already exists, it is " +"truncated." msgstr "" -"この属性が `None` の場合、Tesseract-" -"OCRはインストールされていないか、環境変数がTesseractの言語サポートフォルダを指すように設定されていない可能性があります。" -#: ../../functions.rst:319 ec161e0c65ae4fef9f451a6126eeb98f +#: ../../functions.rst:364 859891baca6846a2a7b06125bba642c4 msgid "" -"This variable is now checked before OCR functions are tried. This " -"prevents verbose messages from MuPDF." -msgstr "この変数は、OCR関数が試行される前に確認されます。これにより、MuPDFから冗長なメッセージが表示されるのを防ぎます。" +"If the value starts with `path+:`, the remaining text is the path of file" +" to which messages are written. If the file already exists, we append " +"output." +msgstr "" + +#: ../../functions.rst:369 917bb5b5660c4baaacb483f666337304 +msgid "" +"If the value starts with `logging:`, messages are written to `Python's " +"logging system `_. The " +"remaining text can contain comma-separated name=value items:" +msgstr "" + +#: ../../functions.rst:373 5220ec2027f94decbb3d5b101d6ac481 +msgid "`level=` sets the logging level." +msgstr "" + +#: ../../functions.rst:374 a4c4076564974edc9a9514098c5d95ed +msgid "`name=` sets the logger name (default is `pymupdf`)." +msgstr "" + +#: ../../functions.rst:376 2a32a55410504c23b6cb4f12682cafa2 +msgid "Other items are ignored." +msgstr "" + +#: ../../functions.rst:378 f0420cb19b0b4ec2bb48cadb322a64ba +msgid "Other prefixes will cause an error." +msgstr "" + +#: ../../functions.rst:380 c3898cead22f497ba9d9c391364c4c8a +msgid "Also see `set_messages()`." +msgstr "" -#: ../../functions.rst:325 554c3c1dd10a4ccb84710c88c5d9b16f +#: ../../functions.rst:387 f5c9e9f015d44ceda40361601fc41f38 msgid "New in v1.19.6" msgstr "バージョン1.19.6で新たに導入されました" -#: ../../functions.rst:327 85354e8863e54a6795d97922822fffe8 +#: ../../functions.rst:389 f020265eebef4b1fb070d23fc83beb86 msgid "" "Contains about 500 RGB colors in PDF format with the color name as key. " -"To see what is there, you can obviously look at `pymupdf.pdfcolor.keys()`." +"To see what is there, you can obviously look at " +"`pymupdf.pdfcolor.keys()`." msgstr "" "PDF形式の約500個のRGB色が、色の名前をキーとして含まれています。中身を確認するには、`pymupdf.pdfcolor.keys()` " "を見ることができます。" -#: ../../functions.rst:329 4f12df6f069741f296ecfb7da5b3d335 +#: ../../functions.rst:391 e139a8577f8340ffb015fab764a9655a msgid "Examples:" msgstr "例:" -#: ../../functions.rst:331 8b8ea083542f481e9d5e1ef47581d0d4 +#: ../../functions.rst:393 40f5af3779d84dc282680e022cece0c1 msgid "`pymupdf.pdfcolor[\"red\"] = (1.0, 0.0, 0.0)`" msgstr "" -#: ../../functions.rst:332 0cea3bc4000e49ea871db0f195e1bc3a +#: ../../functions.rst:394 413ce7dd0e8543f5868732ac0dbf8ef5 msgid "" "`pymupdf.pdfcolor[\"skyblue\"] = (0.5294117647058824, 0.807843137254902, " "0.9215686274509803)`" msgstr "" -#: ../../functions.rst:333 94d74db40e9a4b2b822688d7e99877df +#: ../../functions.rst:395 2842b0f25a2c490c94a9b5e64376f558 msgid "" "`pymupdf.pdfcolor[\"wheat\"] = (0.9607843137254902, 0.8705882352941177, " "0.7019607843137254)`" msgstr "" -#: ../../functions.rst:339 8eb0b3dc709940f886fb15d883d79a71 +#: ../../functions.rst:401 34272632112745f9a3d80b95aace8419 msgid "" "Convenience function to return the current local timestamp in PDF " "compatible format, e.g. *D:20170501121525-04'00'* for local datetime May " @@ -1063,25 +1180,25 @@ msgstr "" "ローカルの日付と時刻が2017年5月1日12時15分25秒で、UTC子午線の西4時間のタイムゾーンにある場合、*D:20170501121525-04’00’*" " となります。" -#: ../../functions.rst:342 41789c4c44f949f08be5f79a0138505c +#: ../../functions.rst:404 d3e70a97bb2d4d0cbd2aabba7e397c47 msgid "current local PDF timestamp." msgstr "現在のローカルPDFタイムスタンプ。" -#: ../../functions.rst:348 6f91f7d4b58148669471497bb9bd6f7d +#: ../../functions.rst:410 99c490db0f4f4638842bcf149740cc60 msgid "New in version 1.14.7" msgstr "バージョン1.14.7で新規追加" -#: ../../functions.rst:350 e0b98796e7ba48a184ed32e1a586c963 +#: ../../functions.rst:412 6857c18d6df5448c947c917d8129b136 msgid "" "Calculate the length of text on output with a given **builtin** font, " ":data:`fontsize` and encoding." msgstr "指定された *組み込み* フォント、:data:`fontsize` 、およびエンコーディングで出力されるテキストの長さを計算します。" -#: ../../functions.rst:352 986721f63f34436c87bed4ce23e2584c +#: ../../functions.rst:414 0c724a86099b4016a27ca94ce9ff53fb msgid "the text string." msgstr "テキスト文字列。" -#: ../../functions.rst:353 1874722ddacb4c95928fcff0dc81762b +#: ../../functions.rst:415 b4f673b68cc549d3a3a4ed4d11159d4f msgid "" "the fontname. Must be one of either the :ref:`Base-14-Fonts` or the CJK " "fonts, identified by their \"reserved\" fontnames (see table in " @@ -1091,11 +1208,11 @@ msgstr "" "またはCJKフォントのいずれかでなければなりません。これらは「予約済み」フォント名で識別されます(:meth:`Page.insert_font`" " のテーブルを参照)。" -#: ../../functions.rst:354 e020b1f660964f199434c2e576601e25 +#: ../../functions.rst:416 fd9ab85296864b159297cf2f40c07b63 msgid "the :data:`fontsize`." msgstr ":data:`fontsize`。" -#: ../../functions.rst:355 7cbb4bba48a74f3ea35166748c3d6fc2 +#: ../../functions.rst:417 659e6b24c6a54cd6be9215d2a7b7bec6 msgid "" "the encoding to use. Besides 0 = Latin, 1 = Greek and 2 = Cyrillic " "(Russian) are available. Relevant for Base-14 fonts \"Helvetica\", " @@ -1105,19 +1222,19 @@ msgstr "" "使用するエンコーディング。0 = ラテン、1 = ギリシャ、2 = " "キリル文字(ロシア語)が利用可能です。ベース14フォント「Helvetica」、「Courier」、「Times」とそのバリアントにのみ関連します。対応するテキスト挿入で使用する値と同じ値を使用してください。" -#: ../../functions.rst:357 4673266dca284ae2af10652a13c2ace8 +#: ../../functions.rst:419 085fba5efa1b441c8a7a959307fadd09 msgid "" "the length in points the string will have (e.g. when used in " ":meth:`Page.insert_text`)." msgstr "文字列が持つポイント単位の長さ(たとえば、:meth:`Page.insert_text` で使用する場合)。" -#: ../../functions.rst:359 b0da1acac7c3475a8b23c6a364c81401 +#: ../../functions.rst:421 0071e0f0d968469dbcf4380c63ab4efe msgid "" "This function will only do the calculation -- it won't insert font nor " "text." msgstr "この関数は計算のみを行います - フォントまたはテキストを挿入しません。" -#: ../../functions.rst:361 867ef43d6ba8478c8a36c312b23faa10 +#: ../../functions.rst:423 beca988a40a1457882759c4d1063a516 msgid "" "The :ref:`Font` class offers a similar method, :meth:`Font.text_length`, " "which supports Base-14 fonts and any font with a character map (CMap, " @@ -1126,7 +1243,7 @@ msgstr "" ":ref:`Font` クラスは、Base-14フォントおよび文字マップ(CMap、Type " "0フォントをサポートする任意のフォントに対応した似たようなメソッド :meth:`Font.text_length` を提供しています。" -#: ../../functions.rst:363 8712e40452304e2c89cf17cd866c49de +#: ../../functions.rst:425 2621d40424214d07bbd4fab562324e61 msgid "" "If you use this function to determine the required rectangle width for " "the (:ref:`Page` or :ref:`Shape`) *insert_textbox* methods, be aware that" @@ -1134,15 +1251,17 @@ msgid "" " this will mostly lead to a slightly larger number: " "*sum([pymupdf.get_text_length(c) for c in text]) > " "pymupdf.get_text_length(text)*. So either (1) do the same, or (2) use " -"something like *pymupdf.get_text_length(text + \"'\")* for your calculation." +"something like *pymupdf.get_text_length(text + \"'\")* for your " +"calculation." msgstr "" "この関数を使用して(:ref:`Page` または :ref:`Shape`)*insert_textbox* " "メソッドの必要な矩形の幅を決定する場合、**文字単位で** " "計算されることに注意してください。丸め効果のため、これはほとんどの場合、やや大きな数になります:*sum([pymupdf.get_text_length(c)" -" for c in text]) > pymupdf.get_text_length(text)*。したがって、(1)同じことを行うか、(2)計算に " +" for c in text]) > " +"pymupdf.get_text_length(text)*。したがって、(1)同じことを行うか、(2)計算に " "*pymupdf.get_text_length(text + \"’\")* のようなものを使用してください。" -#: ../../functions.rst:369 7d111a4c907949b988f3b553b81d6c27 +#: ../../functions.rst:431 858e74323bb44d4aabd1ec6116e45b4e msgid "" "Make a PDF-compatible string: if the text contains code points *ord(c) > " "255*, then it will be converted to UTF-16BE with BOM as a hexadecimal " @@ -1156,37 +1275,37 @@ msgstr "" "ブラケットで囲まれます。それ以外の場合は、ASCII範囲外の文字を特別なコードで置き換えて、(丸い)カッコで囲まれた文字列が返されます。また、すべての" " \"(\", \")\", またはバックスラッシュはバックスラッシュでエスケープされます。" -#: ../../functions.rst:371 e9dde8ab327b4915848448d8bd6401a0 +#: ../../functions.rst:433 70176ef4d97a409dbe6452c90d7b85c1 msgid "the object to convert" msgstr "変換するオブジェクト" -#: ../../functions.rst:374 51e1fae97cfc49919425c8bdc820f2ef +#: ../../functions.rst:436 d145e56ff72f4b868a418777ae2da0a0 msgid "PDF-compatible string enclosed in either *()* or *<>*." msgstr "*()* または *<>* で囲まれたPDF互換の文字列。" -#: ../../functions.rst:380 71709585505e4bb6a5b842e38488a6c5 +#: ../../functions.rst:442 7699f58d78164df49cc2d12fb7cd9b3c msgid "New in v1.16.7" msgstr "バージョン1.16.7で新規追加" -#: ../../functions.rst:381 9d58db3349ae4ad7a76b3ffebc848558 +#: ../../functions.rst:443 957b32a916a54e10a69ac468ba8ebf2f msgid "" "Changed in v1.19.5: also return natural image orientation extracted from " "EXIF data if present." msgstr "バージョン1.19.5で変更:EXIFデータから抽出した自然な画像の向きも返すように変更されました。" -#: ../../functions.rst:382 117a33770dd9459fbab0ad8cf1b4ed07 +#: ../../functions.rst:444 af5e89f8d4524be697b2b949fe03e45a msgid "" "Changed in v1.22.5: always return `None` in error cases instead of an " "empty dictionary." msgstr "バージョン1.22.5で変更:エラーケースで空の辞書ではなく、常に `None` を返すように変更されました。" -#: ../../functions.rst:384 be46c784eec6434592f11b1fd0eaed9a +#: ../../functions.rst:446 2b1e37d83d2345f9bc9d910447b32df9 msgid "" "Show important properties of an image provided as a memory area. Its main" " purpose is to avoid using other Python packages just to determine them." msgstr "メモリ領域として提供される画像の重要なプロパティを表示します。主な目的は、これらのプロパティを決定するために他のPythonパッケージを使用しないようにすることです。" -#: ../../functions.rst:386 8b7d7ad4f37344f48f646330bdb7d499 +#: ../../functions.rst:448 bb83a10d199948a28baf855069679fff msgid "" "either an image in memory or an **opened** file. An image in memory may " "be any of the formats `bytes`, `bytearray` or `io.BytesIO`." @@ -1194,12 +1313,12 @@ msgstr "" "メモリ内の画像または **開いた** ファイル。メモリ内の画像は、`bytes`、`bytearray`、または `io.BytesIO` " "形式のいずれかです。" -#: ../../functions.rst:389 8addc02ee38e417995250148e422b02b +#: ../../functions.rst:451 b80c362428224f70893f7dbb18fef550 msgid "" "No exception is ever raised. In case of an error, `None` is returned. " "Otherwise, there are the following items:: In [2]: " -"pymupdf.image_profile(open(\"nur-ruhig.jpg\", \"rb\").read()) Out[2]: " -"{'width': 439, 'height': 501, 'orientation': 0, # natural " +"pymupdf.image_profile(open(\"nur-ruhig.jpg\", \"rb\").read()) Out[2]:" +" {'width': 439, 'height': 501, 'orientation': 0, # natural " "orientation (from EXIF) 'transform': (1.0, 0.0, 0.0, 1.0, 0.0, 0.0), " "# orientation matrix 'xres': 96, 'yres': 96, 'colorspace': 3," " 'bpc': 8, 'ext': 'jpeg', 'cs-name': 'DeviceRGB'} There is the " @@ -1218,18 +1337,19 @@ msgid "" " These methods will automatically convert exotic images to the PNG format" " before returning results. * You can also get the properties of images" " embedded in a PDF, via their :data:`xref`. In this case make sure to " -"extract the raw stream: `pymupdf.image_profile(doc.xref_stream_raw(xref))`." -" * Images as returned by the image blocks of :meth:`Page.get_text` " -"using \"dict\" or \"rawdict\" options are also supported." +"extract the raw stream: " +"`pymupdf.image_profile(doc.xref_stream_raw(xref))`. * Images as " +"returned by the image blocks of :meth:`Page.get_text` using \"dict\" or " +"\"rawdict\" options are also supported." msgstr "" -#: ../../functions.rst:390 0eb441dc65b24948ad38c20c1894a99a +#: ../../functions.rst:452 e84943d4656c4a47972901421acab8c3 msgid "" "No exception is ever raised. In case of an error, `None` is returned. " "Otherwise, there are the following items::" msgstr "例外は発生しません。エラーの場合、`None` が返されます。それ以外の場合、以下のアイテムがあります::" -#: ../../functions.rst:405 833b000129c94481839f14ae30e48486 +#: ../../functions.rst:467 e1c02eedf39547b084e5b48dafffc726 msgid "" "There is the following relation to **Exif** information encoded in " "`orientation`, and correspondingly in the `transform` matrix-like (quoted" @@ -1238,43 +1358,43 @@ msgstr "" "以下は、**Exif** 情報にエンコードされた`orientation` と、対応する `transform` " "マトリックスの関係です(MuPDFドキュメンテーションから引用、*ccw* = 反時計回り):" -#: ../../functions.rst:407 627daac205bf4793a98cc0ed372420c6 +#: ../../functions.rst:469 df23c683fa524ccc9fccbcd2d69f503e msgid "Undefined" msgstr "未定義" -#: ../../functions.rst:408 c46194828ce04b5596cd94f9f1e03076 +#: ../../functions.rst:470 f8275cc11f6449f9b1b4178b941b44a7 msgid "0 degree ccw rotation. (Exif = 1)" msgstr "0度の反時計回りの回転(Exif = 1)" -#: ../../functions.rst:409 8ff318fb837f4b1c888fdcd6f97dcff1 +#: ../../functions.rst:471 a8b3b37b73d04b739d9a8a259e1dff82 msgid "90 degree ccw rotation. (Exif = 8)" msgstr "90度の反時計回りの回転(Exif = 8)" -#: ../../functions.rst:410 ba8a4c246e8e467db4ec7dc6d70da5bb +#: ../../functions.rst:472 062c3fd11ce642f1b8a0e042967c25d8 msgid "180 degree ccw rotation. (Exif = 3)" msgstr "180度の反時計回りの回転(Exif = 3)" -#: ../../functions.rst:411 51ca1c496cd04636bc543ec02fd6decf +#: ../../functions.rst:473 21c985c2793d46ff943d7bb01b5fde98 msgid "270 degree ccw rotation. (Exif = 6)" msgstr "270度の反時計回りの回転(Exif = 6)" -#: ../../functions.rst:412 563316f2f9174bf49f27828e6091fc25 +#: ../../functions.rst:474 3ed66a5ba1bb42b892ec496c07ea5b91 msgid "flip on X. (Exif = 2)" msgstr "X軸で反転(Exif = 2)" -#: ../../functions.rst:413 d1a73f6cabf941f5be2f80498b561f28 +#: ../../functions.rst:475 54290bb6ec3b4339b21edb09c7be1a9a msgid "flip on X, then rotate ccw by 90 degrees. (Exif = 5)" msgstr "X軸で反転し、さらに90度反時計回りに回転(Exif = 5)" -#: ../../functions.rst:414 b56221aad1044923bc347c71fae0a31d +#: ../../functions.rst:476 c893cd5f6eaa4095b8d48dcafbe803db msgid "flip on X, then rotate ccw by 180 degrees. (Exif = 4)" msgstr "X軸で反転し、さらに180度反時計回りに回転(Exif = 4)" -#: ../../functions.rst:415 4524fde7af6d4bd5a95c9baea2ee62b2 +#: ../../functions.rst:477 a4b2bb8a084748028583799fa437e2b0 msgid "flip on X, then rotate ccw by 270 degrees. (Exif = 7)" msgstr "X軸で反転し、さらに270度反時計回りに回転(Exif = 7)" -#: ../../functions.rst:420 7afda9a5da9044f88ddd95694690c617 +#: ../../functions.rst:482 9642e070a8d94067bd7aafb6a79a0acf msgid "" "For some \"exotic\" images (FAX encodings, RAW formats and the like), " "this method will not work. You can however still work with such images in" @@ -1286,7 +1406,7 @@ msgstr "" " を使用したり、`Pixmap(doc, xref)` " "を介してピクマップを作成したりできます。これらのメソッドは、結果を返す前にエキゾチックな画像を自動的にPNG形式に変換します。" -#: ../../functions.rst:421 1be25174715a45f08673c9f4f58e2de1 +#: ../../functions.rst:483 0730816b36d9470fbfe5ffef4c9916a3 msgid "" "You can also get the properties of images embedded in a PDF, via their " ":data:`xref`. In this case make sure to extract the raw stream: " @@ -1295,34 +1415,34 @@ msgstr "" "また、PDFに埋め込まれた画像のプロパティをxrefを介して取得することもできます。この場合は生のストリームを抽出してください: " "`pymupdf.image_profile(doc.xref_stream_raw(xref))`。" -#: ../../functions.rst:422 8ce6c92e076b47e9a635d3f71edf0482 +#: ../../functions.rst:484 df9a9e1daad84638aab9b2dbf6914506 msgid "" "Images as returned by the image blocks of :meth:`Page.get_text` using " "\"dict\" or \"rawdict\" options are also supported." msgstr ":meth:`Page.get_text` の画像ブロックが「dict」または「rawdict」オプションを使用して返す画像もサポートされています。" -#: ../../functions.rst:429 9047ad48a48e4868ad4b384236dd35df +#: ../../functions.rst:491 a1e2b993edc14a45a3b8fe89caaa8ef1 msgid "" "Return the header string required to make a valid document out of page " "text outputs." msgstr "ページのテキスト出力を有効なドキュメントに変換するために必要なヘッダー文字列を返します。" -#: ../../functions.rst:431 ../../functions.rst:443 -#: 6fd7b0222f1c4f2dbed4e20d3f26279d ab20c801e8c840178094b154561ea085 +#: ../../functions.rst:493 ../../functions.rst:505 +#: 6a1fbfdf58b5440b96cb4b908da4904a aed0ed261f5f497998e8def7b43eb6d2 msgid "type of document. Use the same as the output parameter of *get_text()*." msgstr "ドキュメントの種類。*get_text()* メソッドのoutputパラメータと同じものを使用します。" -#: ../../functions.rst:433 289e770b42d14f29bcdc4ca138c90f11 +#: ../../functions.rst:495 ca6c0195dc2f4fe28a7a155716d6fdc8 msgid "optional arbitrary name to use in output types \"json\" and \"xml\"." msgstr "出力タイプ \"json\" および \"xml\" で使用するオプションの任意の名前。" -#: ../../functions.rst:441 2b7acbd2470544cd9a78e32ccc51b405 +#: ../../functions.rst:503 4afb8f14f4734193aaa42c1517d46188 msgid "" "Return the trailer string required to make a valid document out of page " "text outputs. See :meth:`Page.get_text` for an example." msgstr ":meth:`Page.get_text` の例を参照して、ページテキストの出力から有効な文書を作成するために必要なトレーラー文字列を返します。" -#: ../../functions.rst:451 f544134478924fd8804d658b5228c931 +#: ../../functions.rst:513 8d482e8a42044ad3afc48e2b7fffb27c msgid "" "Delete an object containing XML-based metadata from the PDF. (Py-) MuPDF " "does not support XML-based metadata. Use this if you want to make sure " @@ -1333,7 +1453,7 @@ msgid "" "deleted during next garbage collection of the file." msgstr "PDF内からXMLベースのメタデータを含むオブジェクトを削除します。PyMuPDFではXMLベースのメタデータはサポートされていません。従って、従来のメタデータ辞書が排他的に使用されることを確認したい場合に使用します。多くのサードパーティのPDFプログラムは、独自のXML形式でメタデータを挿入し、従来の辞書に保存されている内容を上書きする可能性があります。このメソッドはそのような参照を削除し、ファイルの次回のガベージコレクション時に対応するPDFオブジェクトが削除されます。" -#: ../../functions.rst:457 a12cd8c0bfbc445891e659e5ef3fcf83 +#: ../../functions.rst:519 a72aa87bc68e4f4bb9703be4f74f288a msgid "" "Return the XML-based metadata :data:`xref` of the PDF if present -- also " "refer to :meth:`Document.del_xml_metadata`. You can use it to retrieve " @@ -1345,35 +1465,35 @@ msgstr "" "にも言及してください。これを使用して、:meth:`Document.xref_stream` " "を介してコンテンツを取得し、それをいくつかのXMLソフトウェアを使用して操作できます。" -#: ../../functions.rst:460 3a399e8b3c3b4142b291c465553ad7d6 +#: ../../functions.rst:522 67817bc5551a458ba2d78406a1906f21 msgid ":data:`xref` of PDF file level XML metadata -- or 0 if none exists." msgstr "PDFファイルレベルのXMLメタデータの :data:`xref`。存在しない場合は0。" -#: ../../functions.rst:466 df7b8698de6941d8b9969a075ad7207c +#: ../../functions.rst:528 93cbd43b947f4be192e5cebeef12cb87 msgid "Run a page through a device." msgstr "ページをデバイスを通じて実行します。" -#: ../../functions.rst:468 32fb783c78cd4347b6b22b39e43866b3 +#: ../../functions.rst:530 b72d243c438742829f57b99405fd7d9d msgid "Device, obtained from one of the :ref:`Device` constructors." msgstr ":ref:`Device`。デバイスのコンストラクタから取得します。" -#: ../../functions.rst:471 2e71f229286a48e5afa9fb01107372ee +#: ../../functions.rst:533 c8020e6ac06b490d910a4453c2720322 msgid "" "Transformation to apply to the page. Set it to :ref:`Identity` if no " "transformation is desired." msgstr "ページに適用する変換。変換を行わない場合は :ref:`Identity` に設定します。" -#: ../../functions.rst:478 e8a4117001284afdb2d7bee610c7b898 +#: ../../functions.rst:540 9992ddbf8ffc4b54959b0e40bc882789 msgid "New in v1.19.0" msgstr "新機能 v1.19.0" -#: ../../functions.rst:479 28f67855a40c444fbf4f2601d7951312 +#: ../../functions.rst:541 16801d5fbea9459f9c065e2e45ad6785 msgid "" "Changed in v1.22.0: optionally also return the OCG name applicable to the" " boundary box." msgstr "v1.22.0 で変更: 境界ボックスに適用される OCG 名もオプションで返すように変更されました。" -#: ../../functions.rst:481 66a81b9df07c4d11bc838d9a3e0cbd83 +#: ../../functions.rst:543 67438b98643c46ff80ff211265df90a4 msgid "" "a list of rectangles that envelop text, image or drawing objects. Each " "item is a tuple `(type, (x0, y0, x1, y1))` where the second tuple " @@ -1394,7 +1514,7 @@ msgid "" "returned by :meth:`Page.get_drawings` and :meth:`Page.get_texttrace`." msgstr "" -#: ../../functions.rst:481 de368efd22de4e0cb237d38f981b2042 +#: ../../functions.rst:543 4c16c87165ac4c3683c707f5278e54b2 msgid "" "a list of rectangles that envelop text, image or drawing objects. Each " "item is a tuple `(type, (x0, y0, x1, y1))` where the second tuple " @@ -1406,37 +1526,37 @@ msgstr "" "で、第2のタプルは矩形の座標を表し、*type* は以下の値のいずれかです。`layers=True` の場合、OCG 名または `None` " "を含む第3のアイテムがあります: `(type, (x0, y0, x1, y1), None)`。" -#: ../../functions.rst:483 925063ccb8084ef1b4209819cc5e29a0 +#: ../../functions.rst:545 1f3baaa90f60489491041912650d2b50 msgid "`\"fill-text\"` -- normal text (painted without character borders)" msgstr "`\"fill-text\"` – 通常のテキスト(文字の境界線なしで描画)" -#: ../../functions.rst:484 d15136b2131f408c88d22fb5ef399db5 +#: ../../functions.rst:546 8d03bd3914d941edad4fa681105b6cde msgid "`\"stroke-text\"` -- text showing character borders only" msgstr "`\"stroke-text\"` – 文字の境界線のみを表示するテキスト" -#: ../../functions.rst:485 41bf23a784304a159d974f94fb302ccb +#: ../../functions.rst:547 564648c64c1c4eb1acd881a4c41559a8 msgid "" "`\"ignore-text\"` -- text that should not be displayed (e.g. as used by " "OCR text layers)" msgstr "`\"ignore-text\"` – 表示されないべきテキスト(OCR テキストレイヤーなどで使用されます)" -#: ../../functions.rst:486 0b35f74c5e074c00b5b9c500b5bd87d7 +#: ../../functions.rst:548 2012f24724e24d2e8b3d682c6c0dd95f msgid "`\"fill-path\"` -- drawing with fill color (and no border)" msgstr "`\"fill-path\"` – 塗りつぶしカラーで描画(境界線なし)" -#: ../../functions.rst:487 b3614b8881b24df289d9a14dbdda918e +#: ../../functions.rst:549 e50df5ab435b4f6b90c2a709b7c028ec msgid "`\"stroke-path\"` -- drawing with border (and no fill color)" msgstr "`\"stroke-path\"` – 境界線で描画(塗りつぶしカラーなし)" -#: ../../functions.rst:488 c4400831be484c559aa5a8c3f139a2a3 +#: ../../functions.rst:550 dddccd8f9bf14c8392556865bb9ff046 msgid "`\"fill-image\"` -- displays an image" msgstr "`\"fill-image\"` – 画像を表示" -#: ../../functions.rst:489 a15c9178e69946d1ae06b2fd8150f18b +#: ../../functions.rst:551 516bf44416f3416186b1467931874344 msgid "`\"fill-shade\"` -- display a shading" msgstr "`\"fill-shade\"` – シェーディングを表示" -#: ../../functions.rst:491 59472acb4a624c7f92cc630e3686aef6 +#: ../../functions.rst:553 c6d414fcee334ceda5a5d4f95b414a9a msgid "" "The item sequence represents the **sequence in which these commands are " "executed** to build the page's appearance. Therefore, if an item's bbox " @@ -1446,7 +1566,7 @@ msgstr "" "**アイテムのシーケンスは、ページの外観を構築するためにこれらのコマンドが実行される** 順序を表します。したがって、アイテムの bbox " "が前のアイテムの bbox と交差または包含されている場合、前のアイテムは(部分的に)カバー / 隠される可能性があります。" -#: ../../functions.rst:494 7aea0214f5e54de3b6f3647d3b6d467a +#: ../../functions.rst:556 6c70aeead4b54e3f8ffc2e256995b69c msgid "" "So this list can be used to detect such situations. An item's index in " "this list equals the value of a `\"seqno\"` in dictionaries as returned " @@ -1455,31 +1575,31 @@ msgstr "" "したがって、このリストを使用してそのような状況を検出できます。このリスト内のアイテムのインデックスは、:meth:`Page.get_drawings`" " および :meth:`Page.get_texttrace` によって返される辞書の `\"seqno\"` の値と等しいです。" -#: ../../functions.rst:501 95f1a11270f84c67afc0b98dacb42c15 +#: ../../functions.rst:563 30b8d1185b0f421f93d06d5a205a7f67 msgid "New in v1.18.16" msgstr "v1.18.16 で新機能" -#: ../../functions.rst:502 cb657557d2f848078a214ef075fe512e +#: ../../functions.rst:564 620e7dd916f64b479cfda147a4f22c8d msgid "Changed in v1.19.0: added key \"seqno\"." msgstr "v1.19.0 で変更: キー \"seqno\" を追加。" -#: ../../functions.rst:503 c067d90742484b15a3ea03dedaf1b04d +#: ../../functions.rst:565 8063a63deea0416da32bcbd66284d856 msgid "" "Changed in v1.19.1: stroke and fill colors now always are either RGB or " "GRAY" msgstr "v1.19.1 で変更: ストロークと塗りつぶしのカラーは常に RGB または GRAY です" -#: ../../functions.rst:504 55584f06a5d94da5ab3decb85030bcb4 +#: ../../functions.rst:566 8a6ee644042c4f919504d2a366486ed5 msgid "" "Changed in v1.19.3: span and character bboxes are now also correct if " "`dir != (1, 0)`." msgstr "v1.19.3 で変更: `dir != (1, 0)` の場合、スパンと文字の bbox も正確になりました。" -#: ../../functions.rst:505 990a117f428a41fa9289456b1bd90a35 +#: ../../functions.rst:567 97c4ae32b3a0440c8c1f1296fbe716b2 msgid "Changed in v1.22.0: add new dictionary key \"layer\"." msgstr "v1.22.0 で変更: 新しい辞書キー \"layer\" を追加。" -#: ../../functions.rst:508 11558513872b43cc8d25c7f630ff6d10 +#: ../../functions.rst:570 45cc7e74a2654f74bcfcabb65d9e7803 msgid "" "Return low-level text information of the page. The method is available " "for **all** document types. The result is a list of Python dictionaries " @@ -1488,26 +1608,27 @@ msgstr "" "ページの低レベルなテキスト情報を返します。このメソッドは **すべて** のドキュメントタイプで利用可能です。結果は、以下の内容を持つ " "Python 辞書のリストです。" -#: ../../functions.rst:544 c1f529b4f37b4d4780c34e24d14c7b2a +#: ../../functions.rst:606 759d41b8e915425ba2f090d80b0065ab msgid "Details:" msgstr "" -#: ../../functions.rst:546 972132f98ad64700b8ccb2599d9f3d13 +#: ../../functions.rst:608 c027ebb8dfaf4fb9b454d85a0898a0bd msgid "" "Information above tagged with \"(1)\" has the same meaning and value as " "explained in :ref:`TextPage`." msgstr "「(1)」でタグ付けされた情報は、:ref:`TextPage` で説明された内容と同じ意味と値を持っています。" -#: ../../functions.rst:548 335477fd0c8f4744a42e24af77d263d0 +#: ../../functions.rst:610 71a2f731acc249aa8278de7e3edbb5a5 +#, fuzzy msgid "" -"Please note that the font `flags` value will never contain a " +"Please note that the font ``flags`` value will never contain a " "*superscript* flag bit: the detection of superscripts is done within " "MuPDF :ref:`TextPage` code -- it is not a property of any font." msgstr "" "フォント `flags` の値には *superscript* フラグビットが含まれないことに注意してください。上付き文字の検出はMuPDF " ":ref:`TextPage` 内で行われます。これは任意のフォントのプロパティではありません。" -#: ../../functions.rst:549 a1471984e7184e5893bd24f2b826cd42 +#: ../../functions.rst:611 71e973788c8e4fd29354221499b566c1 msgid "" "Also note, that the text *color* is encoded as the usual tuple of floats " "0 <= f <= 1 -- not in sRGB format. Depending on `span[\"type\"]`, " @@ -1517,27 +1638,27 @@ msgstr "" "1)でエンコードされており、sRGB形式ではありません。`span[\"type\"]` " "に応じて、これを塗りつぶし色またはストローク色として解釈してください。" -#: ../../functions.rst:551 d1ff75c2b3c8431295be2fc7bd78b343 +#: ../../functions.rst:613 93a130aa74244d8ea4f44649257f0b0f msgid "There are 3 text span types:" msgstr "テキストスパンには3つのタイプがあります:" -#: ../../functions.rst:553 230afb83be164569bd04f5a6601fc157 +#: ../../functions.rst:615 04bb9e4a8efd4f36b449a896e093e997 msgid "" "0: Filled text -- equivalent to PDF text rendering mode 0 (`0 Tr`, the " "default in PDF), only each character's \"inside\" is shown." msgstr "0:塗りつぶしテキスト - PDFテキストレンダリングモード0(`0 Tr`、PDFのデフォルト)と同等で、各文字の「内部」のみが表示されます。" -#: ../../functions.rst:554 219cadef22c94372b546069751b93ed1 +#: ../../functions.rst:616 66862797440b4cc89f0ab0b03386f731 msgid "" "1: Stroked text -- equivalent to `1 Tr`, only the character borders are " "shown." msgstr "1:ストロークテキスト - `1 Tr` に相当し、文字の境界のみが表示されます。" -#: ../../functions.rst:555 5dfccccf787446038c8077feb6a85440 +#: ../../functions.rst:617 2acf0e18c96e49f880293e3357fd16f6 msgid "3: Ignored text -- equivalent to `3 Tr` (hidden text)." msgstr "3:無視されたテキスト - `3 Tr` に相当し(非表示テキスト)。" -#: ../../functions.rst:557 3862bf334547426ebc3458eaf41b4633 +#: ../../functions.rst:619 9de9513b92b54ed1bbabbb458b2a9fa0 #, python-format msgid "" "Line width in this context is important only for processing " @@ -1557,13 +1678,13 @@ msgstr "" "によって作成されます。この場合、このケースの等価なスパンタイプは存在しません。代わりに、対応するテキストは2つの連続したスパンによって表されます。これらのスパンはすべての側面が同一であり、タイプ以外は異なります(0、1)。このタイプの状況を処理する責任はあなたにあります。:meth:`Page.get_text`" " では、MuPDFがこれを代わりに行います。" -#: ../../functions.rst:558 6836fccf29f94403a9064f3955034672 +#: ../../functions.rst:620 6487d82fbf414538ae086ba2cf0e5fab msgid "" "For data compactness, the character's unicode is provided here. Use " "built-in function `chr()` for the character itself." msgstr "データのコンパクトさのために、文字のUnicodeがここで提供されます。文字自体には `chr()` という組み込み関数を使用します。" -#: ../../functions.rst:559 cb1cd0083bca4f7c8b3f88a2bf91c012 +#: ../../functions.rst:621 a660bf6a775c44649783a559eaf01274 msgid "" "The alpha / opacity value of the span's text, `0 <= opacity <= 1`, 0 is " "invisible text, 1 (100%) is intransparent. Depending on `span[\"type\"]`," @@ -1573,7 +1694,7 @@ msgstr "" "1`、0は見えないテキスト、1(100%)は不透明です。`span[\"type\"]` に応じて、この値を *fill* の不透明度または " "*stroke* の不透明度として解釈してください。" -#: ../../functions.rst:560 1cedbeea45d947e1933cc569f61f58d0 +#: ../../functions.rst:622 e6e4063809024f138da4aeb44e24eb92 msgid "" "*(Changed in v1.19.0)* This value is equal or close to `char[\"bbox\"]` " "of \"rawdict\". In particular, the bbox **height** value is always " @@ -1582,11 +1703,11 @@ msgstr "" "*(v1.19.0で変更)* この値は「rawdict」の `char[\"bbox\"]` と等しいか、近い値です。特に、bboxの " "**高さ** の値は常に **「小さなグリフの高さ」** が要求されたかのように計算されます。" -#: ../../functions.rst:561 d7d2fbf28eff49619630132dba08d571 +#: ../../functions.rst:623 4e62b747b8f9441b9279357f81f7e81b msgid "*(New in v1.19.0)* This is the union of all character bboxes." msgstr "*(v1.19.0で新規)* これはすべての文字bboxの合併です。" -#: ../../functions.rst:562 47ba7ab28e3a46de91f6b68793ca4398 +#: ../../functions.rst:624 03fcc8f1fed344049ab836df258e5e2e msgid "" "*(New in v1.19.0)* Enumerates the commands that build up the page's " "appearance. Can be used to find out whether text is effectively hidden by" @@ -1599,13 +1720,13 @@ msgstr "" "*(v1.19.0で新規)* " "ページの外観を構築するコマンドを列挙します。テキストが実際には後で「描画」されるオブジェクトによって隠れるか、またはいくつかのオブジェクトの上にかかっているかを判断するのに使用できます。したがって、bboxがこのテキストスパンのbboxと交差または含まれている場合、以前のアイテムが(部分的に)カバー/非表示にされる可能性があります。" -#: ../../functions.rst:563 b4592e6ab17b49bf946b02fffd256b43 +#: ../../functions.rst:625 a332ef5bf29948dab52498a113c1055c msgid "" "*(New in v1.22.0)* The name of the Optional Content Group (OCG) if " "applicable or `None`." msgstr "*(v1.22.0で新規)* 該当する場合、Optional Content Group(OCG)の名前、または `None`" -#: ../../functions.rst:565 b35971c5d37e4b6a9ec54e2028674b01 +#: ../../functions.rst:627 7d10accada8e4512a251cde3f4f3cb77 msgid "" "Here is a list of similarities and differences of `page.get_texttrace()` " "compared to `page.get_text(\"rawdict\")`:" @@ -1613,19 +1734,19 @@ msgstr "" "以下は、`page.get_texttrace()` と `page.get_text(\"rawdict\")` " "を比較した類似点と相違点のリストです:" -#: ../../functions.rst:567 4c1d12b52cbf42b4933069aa65c6307f +#: ../../functions.rst:629 14d43abeade64ae6a7e7a66f55a6b4e8 msgid "" "The method is up to **twice as fast,** compared to \"rawdict\" " "extraction. Depends on the amount of text." msgstr "メソッドは、テキストの量に依存しますが、\"rawdict\" の抽出と比較して最大 **2倍速い** です。" -#: ../../functions.rst:568 6d787f6cb99942f2b410ab7745032c70 +#: ../../functions.rst:630 ddaa111279c14f54bf12d70419804137 msgid "" "The returned data is very **much smaller in size** -- although it " "provides more information." msgstr "返されるデータは **非常に小さく** 、より多くの情報を提供します。" -#: ../../functions.rst:569 10d3ea1817f84f3a8f34f34423ce387f +#: ../../functions.rst:631 b5fcaaa904c848cb99d1cfd72df19bad msgid "" "Additional types of text **invisibility can be detected**: opacity = 0 or" " type > 1 or overlapping bbox of an object with a higher sequence number." @@ -1633,7 +1754,7 @@ msgstr "" "追加のテキストの **不可視性のタイプを検出できます** :不透明度 = 0またはタイプ > " "1またはシーケンス番号の高いオブジェクトとの境界ボックスが重なる。" -#: ../../functions.rst:570 b816f88bebfe4b88862855bc036d15ea +#: ../../functions.rst:632 d3ffddc4c8c74b0c87f348dfe1c80ad4 msgid "" "If MuPDF returns unicode 0xFFFD (65533) for unrecognized characters, you " "may still be able to deduct desired information from the glyph id." @@ -1641,7 +1762,7 @@ msgstr "" "MuPDFが認識できない文字に対してUnicode " "0xFFFD(65533)を返す場合、グリフIDから必要な情報を導き出すことができるかもしれません。" -#: ../../functions.rst:571 b4c21e1d74e34b638110a404d412cef5 +#: ../../functions.rst:633 dd5d04de31034398aa834b1cdb6e56f6 msgid "" "The `span[\"chars\"]` **contains no spaces**, **except** the document " "creator has explicitly coded them. They **will never be generated** like " @@ -1654,7 +1775,7 @@ msgstr "" ":meth:`Page.get_text` メソッドで発生するように " "**生成されません**。自分自身の計算を行うのを助けるために、スペース文字の幅が提供されます。この値はフォントから派生しています。それ以外の場合はフォールバックフォントの値が取られます。" -#: ../../functions.rst:572 b96a2219d9f24de78816e2e4d763b89e +#: ../../functions.rst:634 9652b19463904ee38c62ccc2b2239dff msgid "" "There is no effort to organize text like it happens for a :ref:`TextPage`" " (the hierarchy of blocks, lines, spans, and characters). Characters are " @@ -1672,11 +1793,11 @@ msgstr "" "値を持つ文字を見つけることができます(これは異なる行に表示されることを意味します)。スパンの文字が特定の順序でソートされているとは仮定できません。情報を理解し、`span[\"dir\"]`、`span[\"wmode\"]`" " などを考慮に入れる必要があります。" -#: ../../functions.rst:590 5fffbefb0a4d4e38a0116b4b4d2954a7 +#: ../../functions.rst:652 e762a117d84b42ecb7cf21d17049df5f msgid "Ligatures are represented like this:" msgstr "リガチャは次のように表されます:" -#: ../../functions.rst:574 ef375c271cfb4ca1b9f8d85079bc781d +#: ../../functions.rst:636 329c84b204634c1294fb77b93a056ef4 msgid "" "MuPDF handles the following ligatures: \"fi\", \"ff\", \"fl\", \"ft\", " "\"st\", \"ffi\", and \"ffl\" (only the first 3 are mostly ever used). If " @@ -1687,48 +1808,48 @@ msgstr "" "\"ffl\"(ほとんどは最初の3つが使用されます)。したがって、ページに \"fi\" " "のようなリガチャが含まれている場合、次の2つの文字アイテムが連続して表示されます。" -#: ../../functions.rst:579 9560025144d3478e934e58afac57bbd1 +#: ../../functions.rst:641 da6322372fb64311b85eea0cc2f68ccd msgid "" "This means that the bbox of the first ligature character is the area " "containing the complete, compound glyph. Subsequent ligature components " "are recognizable by their glyph value -1 and a bbox of width zero." msgstr "これにより、最初の合字文字のbboxは、完全な合成グリフを含む領域です。後続の合字コンポーネントは、そのグリフ値が-1で幅がゼロであることで識別できます。" -#: ../../functions.rst:580 2dff7947fb1048d5b132be0b6c30f4a1 +#: ../../functions.rst:642 2284a09cdf584b6aa6f22b5aae18d4fe msgid "" "You may want to replace those 2 or 3 char tuples by one, that represents " "the ligature itself. Use the following mapping of ligatures to unicodes:" msgstr "これらの2つまたは3つの文字のタプルを、合字自体を表す1つに置き換えたい場合があるかもしれません。次のような合字をUnicodeにマッピングします。" -#: ../../functions.rst:582 9c09a89d91a148408873888ec3c3524d +#: ../../functions.rst:644 0a799c550746408c85fef2c7576bfede msgid "`\"ff\" -> 0xFB00`" msgstr "" -#: ../../functions.rst:583 06d3c70a65704520b6a882b1d10851e1 +#: ../../functions.rst:645 9898a6f56cfe4eb4899294c8b6b06002 msgid "`\"fi\" -> 0xFB01`" msgstr "" -#: ../../functions.rst:584 edccf0d7c8e54b139724df8c301b9941 +#: ../../functions.rst:646 5e3800258f5348718ebba22eb1059a6f msgid "`\"fl\" -> 0xFB02`" msgstr "" -#: ../../functions.rst:585 b1c38e9c24a24a0eb1acd1abc385e79b +#: ../../functions.rst:647 936b3a65e7c742f8bfe6b86441ea1a98 msgid "`\"ffi\" -> 0xFB03`" msgstr "" -#: ../../functions.rst:586 ecaaaf724261498bb2d319c0033b4311 +#: ../../functions.rst:648 a4aa6a1539d043e8abfc0b8638794818 msgid "`\"ffl\" -> 0xFB04`" msgstr "" -#: ../../functions.rst:587 ab4b387fed804611936e99eba665eccb +#: ../../functions.rst:649 984fff2c59774ed1be88a1741f6a305f msgid "`\"ft\" -> 0xFB05`" msgstr "" -#: ../../functions.rst:588 bd0e6a1f40024293a5de92d6b63b2179 +#: ../../functions.rst:650 a20f60a691f6403e83506643220c07c0 msgid "`\"st\" -> 0xFB06`" msgstr "" -#: ../../functions.rst:590 45e8ba1378674b40b2e87f3b854d5ad5 +#: ../../functions.rst:652 2ed2cd30247844df8bbc69833a24683a msgid "" "So you may want to replace the two example tuples above by the following " "single one: `(0xFB01, glyph, (x, y), (x0, y0, x1, y1))` (there is usually" @@ -1740,7 +1861,7 @@ msgstr "" "y1))`(通常、0xFB01の正しいグリフIDをフォント内で調べる必要はありませんが、`font.has_glyph(0xFB01)` " "を実行し、その戻り値を使用することができます)。" -#: ../../functions.rst:592 41b0a44ba80843f2b0b621ed99669321 +#: ../../functions.rst:654 ce7f0eaeb90046aab353b46f85433ed3 #, fuzzy msgid "" "**Changed in v1.19.3:** Similar to other text extraction methods, the " @@ -1756,33 +1877,30 @@ msgstr "" ":meth:`recover_span_quad` の同じ方法を使用します。書き込み方向にはNoneまたはspan `span[\"dir\"]`" " を使用してください。" -#: ../../functions.rst:594 22f78d6005bc42529040db5994e09808 +#: ../../functions.rst:656 de65772c37bd47cf876f0743e9332fe9 msgid "" "**Changed in v1.21.1:** If applicable, the name of the OCG is shown in " "`\"layer\"`." msgstr "**v1.21.1** で変更:該当する場合、OCGの名前が `\"layer\"` に表示されます。" -#: ../../functions.rst:600 be3d90ed1b7c42e99d071693cafeb31d +#: ../../functions.rst:662 10427f25463d47fdb17d58e686fdfc9e msgid "" "Ensures that the page's so-called graphics state is balanced and new " "content can be inserted correctly." msgstr "" -#: ../../functions.rst:602 bd49221bbe8241678129f4252227d1ad +#: ../../functions.rst:664 8259e8d0721848219547bfd39f7867b9 msgid "" "In versions 1.24.1+ of PyMuPDF the method was improved and is being " "executed automatically as required, so you should no longer need to " "concern yourself with it." msgstr "" -#: ../../functions.rst:604 4cb283f90bb44d5d8b7fb3855b5e2716 -msgid "" -"This method obsoletes the use of :meth:`Page.clean_contents` in most " -"cases. The advantage this method is a small footprint in terms of " -"processing time and a low impact on the data size of incremental saves." +#: ../../functions.rst:666 a829f7373a644aff8f6037428bea9712 +msgid "We discourage using :meth:`Page.clean_contents` to achieve this." msgstr "" -#: ../../functions.rst:611 876a7369a66047e881aec497a2a24391 +#: ../../functions.rst:672 db794a7ecc3a415baa480e8c9f7a6f1c msgid "" "Indicate whether the page's so-called graphic state is balanced. If " "`False`, :meth:`Page.wrap_contents` should be executed if new content is " @@ -1791,7 +1909,7 @@ msgid "" "executed -- you therefore should not be concerned about this anymore." msgstr "" -#: ../../functions.rst:619 ad6b1db728c343b6a2dceaaeaa4c169e +#: ../../functions.rst:680 d203c9e2bbe24468bd5568a1db6ea2a7 msgid "" "Deprecated wrapper for :meth:`TextPage.extractBLOCKS`. Use " ":meth:`Page.get_text` with the \"blocks\" option instead." @@ -1799,29 +1917,30 @@ msgstr "" ":meth:`TextPage.extractBLOCKS` の非推奨のラッパーです。代わりにオプション \"blocks\" を使用して " ":meth:`Page.get_text` を使用してください。" -#: ../../functions.rst:627 2a371a4b9de04db59d66eb8dc83b3575 +#: ../../functions.rst:688 99ad32943641482ab84b11366ccbbe4f msgid "" "Deprecated wrapper for :meth:`TextPage.extractWORDS`. Use " ":meth:`Page.get_text` with the \"words\" option instead." msgstr "" -#: ../../functions.rst:635 b961f350af7a4f94991bb7b33632335b +#: ../../functions.rst:696 a2853d3cdede4d2db456cfb83b815124 msgid "Run a page through a list device and return its display list." msgstr "ページをリストデバイスを介して実行し、そのディスプレイリストを返します。" -#: ../../functions.rst:637 17fbd462eaf44b6b9612cb3e67fe02c2 +#: ../../functions.rst:698 21e4b6cf9da846258448b5e17cbf3282 msgid ":ref:`DisplayList`" msgstr "" -#: ../../functions.rst:638 301e560ae7ea4878a566ae3ee6057cec +#: ../../functions.rst:699 ffb9b48f375440e290527ab49901acf1 msgid "the display list of the page." msgstr "ページのディスプレイリスト。" -#: ../../functions.rst:644 6684eeb4377a4e2f8317dfe656218630 +#: ../../functions.rst:705 5c87e4c0d7cf4cee8bd5c73c0185175c +#, fuzzy msgid "" "PDF only: Retrieve a list of :data:`xref` of :data:`contents` objects of " "a page. May be empty or contain multiple integers. If the page is cleaned" -" (:meth:`Page.clean_contents`), it will be one entry at most. The " +" (:meth:`Page.clean_contents`), it will be no more than one entry. The " "\"source\" of each `/Contents` object can be individually read by " ":meth:`Document.xref_stream` using an item of this list. Method " ":meth:`Page.read_contents` in contrast walks through this list and " @@ -1833,7 +1952,7 @@ msgstr "" "で個別に読み取ることができます。一方、:meth:`Page.read_contents` メソッドは、このリストを走査し、対応するソースを1つの" " `bytes` オブジェクトに連結します。" -#: ../../functions.rst:652 09853e64d3e8484c946500c760bbb391 +#: ../../functions.rst:713 90e498eeac6e4beeafac3412b4c240b6 msgid "" "PDF only: Let the page's `/Contents` key point to this xref. Any " "previously used contents objects will be ignored and can be removed via " @@ -1842,11 +1961,11 @@ msgstr "" "PDFのみ:ページの `/Contents` " "キーをこのxrefに設定します。以前に使用されていたコンテンツオブジェクトは無視され、ガベージコレクションを使用して削除できます。" -#: ../../functions.rst:658 f127e1d3286a440c81ef5bff0a0f0831 +#: ../../functions.rst:719 f9513e84e2ca4321bff8c46802105ac6 msgid "Changed in v1.17.6" msgstr "v1.17.6で変更" -#: ../../functions.rst:660 117143b0cb064431b99d9866acde4e03 +#: ../../functions.rst:721 22bc66a703e54067b1e2f2c5f119ba1d msgid "" "PDF only: Clean and concatenate all :data:`contents` objects associated " "with this page. \"Cleaning\" includes syntactical corrections, " @@ -1860,7 +1979,7 @@ msgstr "" "sanitizeがtrueの場合、:data:`contents` と :data:`resources` " "オブジェクト間の不一致も修正されます。詳細については、:meth:`Page.get_contents` を参照してください。" -#: ../../functions.rst:662 c3d019bd10284482b9e20495d905036e +#: ../../functions.rst:723 a3f4d1a068824a428423ffa2da562127 msgid "" "Changed in version 1.16.0 Annotations are no longer implicitly cleaned by" " this method. Use :meth:`Annot.clean_contents` separately." @@ -1868,7 +1987,7 @@ msgstr "" "バージョン1.16.0以降、注釈はこのメソッドによって暗黙的にクリーンアップされなくなりました。 " ":meth:`Annot.clean_contents` を別途使用してください。" -#: ../../functions.rst:664 5353db49bb344f258d3521f56a7ea115 +#: ../../functions.rst:725 15c1db8404ca46dbaf4c906166750f5b msgid "" "*(new in v1.17.6)* if true, synchronization between resources and their " "actual use in the contents object is snychronized. For example, if a font" @@ -1879,7 +1998,7 @@ msgstr "" "trueの場合、リソースとコンテンツオブジェクト間の同期が行われます。たとえば、ページのテキストでフォントが実際に使用されていない場合、それは " "`/Resources/Font` オブジェクトから削除されます。" -#: ../../functions.rst:666 70e3feec130341278c6da2c24fa107ba +#: ../../functions.rst:727 d98faf235eb84369adf87e543eaba7f2 msgid "" "This is a complex function which may generate large amounts of new data " "and render old data unused. It is **not recommended** using it together " @@ -1891,7 +2010,13 @@ msgstr "" "**お勧めできません** 。また、結果のシングルトンの新しい */Contents* オブジェクトは **非圧縮です**。したがって、オプション " "*\"deflate=True、garbage=3\"* を使用して **新しいファイル** に保存する必要があります。" -#: ../../functions.rst:672 30b14ac33cfb41929a597e3e12a9e2ed +#: ../../functions.rst:729 f02d605a87d143948e528d28b56a3a2d +msgid "" +"Do not any longer use this method to ensure correct insertions on PDF " +"pages. Since PyMuPDF version 1.24.2 this is taken care of automatically." +msgstr "" + +#: ../../functions.rst:735 2196c7e1b31b40ddab3b297b291177f8 msgid "" "*New in version 1.17.0.* Return the concatenation of all :data:`contents`" " objects associated with the page -- without cleaning or otherwise " @@ -1902,7 +2027,7 @@ msgstr "" "*v1.17.0で新たに追加。* ページに関連付けられたすべての :data:`contents` " "オブジェクトの連結を返します。クリーニングや変更などを行わずに、このソース全体を解析する必要がある場合にこのメソッドを使用します。" -#: ../../functions.rst:681 a88a39cce6d14b579fd9e90b4ef9c386 +#: ../../functions.rst:744 9a37de9e2f3c4f5f8730e0926cb5527e msgid "" "Clean the :data:`contents` streams associated with the annotation. This " "is the same type of action which :meth:`Page.clean_contents` performs -- " @@ -1912,7 +2037,7 @@ msgstr "" "ストリームをクリーンアップします。これは、:meth:`Page.clean_contents` " "が実行するのと同じ種類のアクションですが、この注釈に制限されています。" -#: ../../functions.rst:688 feae89801f724ae8aa0f8ea1b00b1b48 +#: ../../functions.rst:751 c7c5b8d11bab42d1ab6490984348b460 msgid "" "Return a list of character glyphs and their widths for a font that is " "present in the document. A font must be specified by its PDF cross " @@ -1924,7 +2049,7 @@ msgstr "" "で指定する必要があります。この関数は、:meth:`Page.insert_text` および " ":meth:`Page.insert_textbox` から自動的に呼び出されます。したがって、自分で行う必要があることはほとんどありません。" -#: ../../functions.rst:690 236481fb80cb48a9b4a3b072942cc916 +#: ../../functions.rst:753 0810b08678db4de2aa2a906546639b32 msgid "" "cross reference number of a font embedded in the PDF. To find a font " ":data:`xref`, use e.g. *doc.get_page_fonts(pno)* of page number *pno* and" @@ -1933,7 +2058,7 @@ msgstr "" "ドキュメントに埋め込まれたPDFのクロスリファレンス番号。フォントの :data:`xref` を見つけるには、例えば、ページ番号 *pno* の" " *doc.get_page_fonts(pno)* を使用し、返されたリストエントリの最初を取得します。" -#: ../../functions.rst:692 c8237438137442fbbc634cb144ef9766 +#: ../../functions.rst:755 630cf059f27845f38b21edb71c79835d msgid "" "limits the number of returned entries. The default of 256 is enforced for" " all fonts that only support 1-byte characters, so-called \"simple " @@ -1943,7 +2068,7 @@ msgstr "" "返されるエントリの数を制限します。256のデフォルト値は、1バイトの文字のみをサポートする「シンプルフォント」と呼ばれるフォントに対して適用されます(このメソッドで確認されます)。すべてのPDF" " :ref:`Base-14-Fonts` はシンプルフォントです。" -#: ../../functions.rst:695 85e541e45fab4e049fc64ceeec9f37b7 +#: ../../functions.rst:758 c04bc439f7ef4026892771cb1184f704 msgid "" "a list of *limit* tuples. Each character *c* has an entry *(g, w)* in " "this list with an index of *ord(c)*. Entry *g* (integer) of the tuple is " @@ -1957,40 +2082,40 @@ msgstr "" ":data:`fontsize`* として計算できます。シンプルフォントの場合、gエントリは常に安全に無視できます。それ以外の場合、*g* は " "*c* を視覚的に表現するための基礎です。" -#: ../../functions.rst:697 edd31867317b448b9aa9e344d9ab4795 +#: ../../functions.rst:760 3ef4cadd1af84e83949d7678fe2c81e3 msgid "This function calculates the pixel width of a string called *text*::" msgstr "この関数は、*text* と呼ばれる文字列のピクセル幅を計算します::" -#: ../../functions.rst:709 8646b6112cbc42898ae4b3e8c9e6581e +#: ../../functions.rst:772 ecbe28bd36cf4da9890cb253317137d4 msgid "New in version 1.14.14" msgstr "バージョン1.14.14で新規追加" -#: ../../functions.rst:711 22f461bbe0a449cebf8ef16a0a136f89 +#: ../../functions.rst:774 89120d06d2c2469199a7dcb86576f510 msgid "" "PDF only: Check whether the object represented by :data:`xref` is a " -":data:`stream` type. Return is *False* if not a PDF or if the number is " -"outside the valid xref range." +":data:`stream` type. Return is ``False`` if not a PDF or if the number is" +" outside the valid xref range." msgstr "" "PDFのみ::data:`xref` によって表されるオブジェクトが :data:`stream` " "タイプかどうかを確認します。PDFでない場合や、有効なxref範囲外の場合はFalseを返します。" -#: ../../functions.rst:713 3296af108365428bb094e55c5cafaba3 +#: ../../functions.rst:776 a09f8f5311c14f39ab22fb0476dc55e1 msgid ":data:`xref` number." msgstr ":data:`xref` 番号。" -#: ../../functions.rst:715 bf35bcb670be48b48ef7869f581f2148 +#: ../../functions.rst:778 cefc628d4f1c49b8b44905792b59ddd8 msgid "" -"*True* if the object definition is followed by data wrapped in keyword " +"``True`` if the object definition is followed by data wrapped in keyword " "pair *stream*, *endstream*." -msgstr "*stream*、*endstream* のキーワードペアで囲まれたデータに続いてオブジェクト定義がある場合は *True*。" +msgstr "*stream*、*endstream* のキーワードペアで囲まれたデータに続いてオブジェクト定義がある場合は ``True``。" -#: ../../functions.rst:721 3f9a3aa51c724f60a91cddf5331355b6 +#: ../../functions.rst:784 2133898daacd4e1db066969afe31bb04 msgid "" "Increase the :data:`xref` by one entry and return that number. This can " "then be used to insert a new object." msgstr ":data:`xref` を1つ増やしてその番号を返します。これは新しいオブジェクトを挿入するために使用できます。" -#: ../../functions.rst:723 710a017cd44640d5957ebc0cbb115a28 +#: ../../functions.rst:786 b937dc8deb524375b27622d6996b23e7 msgid "" "int :returns: the number of the new :data:`xref` entry. Please note, that" " only a new entry in the PDF's cross reference table is created. At this " @@ -2002,15 +2127,15 @@ msgstr "" "エントリの数。PDFのクロスリファレンステーブルに新しいエントリのみが作成されます。この段階では、それに関連付けられたPDFオブジェクトはまだ存在しません。この番号で(空の)オブジェクトを作成するには、`doc.update_xref(xref、\"<<>>\")`" " を使用します。" -#: ../../functions.rst:730 c5024f6889ab4a48a9e8ab92d5c43df1 +#: ../../functions.rst:793 232449497ffb4eedb8dae90f7b55fed0 msgid "Return length of :data:`xref` table." msgstr ":data:`xref` テーブルの長さを返します。" -#: ../../functions.rst:733 901dbd7a9ee247ae810e45e244731a1d +#: ../../functions.rst:796 245e54c66fda43548f4bb15c292b7f52 msgid "the number of entries in the :data:`xref` table." msgstr ":data:`xref` テーブルのエントリ数。" -#: ../../functions.rst:739 4623bdd6cdac49daac4aa9819a1fd479 +#: ../../functions.rst:802 8dc72dca25f445da9457591672f80769 msgid "" "Compute the quadrilateral of a text span extracted via options \"dict\" " "or \"rawdict\" of :meth:`Page.get_text`." @@ -2018,7 +2143,7 @@ msgstr "" ":meth:`Page.get_text` のオプション \"dict\" または \"rawdict\" " "で抽出されたテキストスパンの四辺形を計算します。" -#: ../../functions.rst:741 30b6d2c4af684b438750032bc41ae1a5 +#: ../../functions.rst:804 79949b47b0e8434da2450695ab50368e msgid "" "`line[\"dir\"]` of the owning line. Use `None` for a span from " ":meth:`Page.get_texttrace`." @@ -2026,26 +2151,26 @@ msgstr "" "所有する行の `line[\"dir\"]`。:meth:`Page.get_texttrace` からのスパンの場合は `None` " "を使用します。" -#: ../../functions.rst:742 ../../functions.rst:752 ../../functions.rst:763 -#: 20551e8d992c410caa288736357ca2ba b6ceb63218d04ba7b99440a0dd562369 -#: df7d999c0a6045f9abedab080b7abb48 +#: ../../functions.rst:805 ../../functions.rst:815 ../../functions.rst:826 +#: 0770a5ef3a8a47db94dbbe6aa5ce37d5 5c5d1cb049fa4b2db4557396cea5ef45 +#: 9218509c4f0844e3af20da0e09b821af msgid "the span." msgstr "スパン。" -#: ../../functions.rst:743 00de3f629c4440619a9dc8d9571717b1 +#: ../../functions.rst:806 659d93593c5c4212808a3586ed130e9f msgid "" "the :ref:`Quad` of the span, usable for text marker annotations " "('Highlight', etc.)." msgstr "スパンの :ref:`Quad`、テキストマーカーアノテーション('ハイライト' など)で使用できます。" -#: ../../functions.rst:749 69db52d1ed434f70a710382d7d2b4168 +#: ../../functions.rst:812 3cd5684ddb9d43ccb146f4a824abc81d msgid "" "Compute the quadrilateral of a text character extracted via option " "\"rawdict\" of :meth:`Page.get_text`." msgstr ":meth:`Page.get_text` のオプション \"rawdict\" で抽出されたテキスト文字の四辺形を計算します。" -#: ../../functions.rst:751 ../../functions.rst:762 -#: 3e1913d57aaa459fb3297eab7f65068a f75b584e4b2244e7ab88dbce63c1e313 +#: ../../functions.rst:814 ../../functions.rst:825 +#: d61965cb158a476ab9824dc5c8554d04 f84cc11dbc814f73857fec69aa9acd5b msgid "" "`line[\"dir\"]` of the owning line. Use `None` for a span from " ":meth:`Page.get_texttrace`." @@ -2053,36 +2178,35 @@ msgstr "" "所有する行の `line[\"dir\"]`。:meth:`Page.get_texttrace` からのスパンの場合は `None` " "を使用します。" -#: ../../functions.rst:753 0a84517d4dcc4edeabd759f23035cf31 +#: ../../functions.rst:816 67ed1cab15584b639de82d14613b4292 msgid "the character." msgstr "文字。" -#: ../../functions.rst:754 617e382f29ed4a68bf22fd305c96b72b +#: ../../functions.rst:817 b0a52cdeaedc4130a8c46b7b8ec0809d msgid "" "the :ref:`Quad` of the character, usable for text marker annotations " "('Highlight', etc.)." msgstr "文字の :ref:`Quad`、テキストマーカーアノテーション('ハイライト' など)で使用できます。" -#: ../../functions.rst:760 88976a82010d4983afe256ca2efc452a +#: ../../functions.rst:823 ed8ff97737994061997361b365b77280 msgid "" "Compute the quadrilateral of a subset of characters of a span extracted " "via option \"rawdict\" of :meth:`Page.get_text`." msgstr ":meth:`Page.get_text` のオプション \"rawdict\" で抽出されたスパンの一部の文字の四辺形を計算します。" -#: ../../functions.rst:764 d99a5255fabb46668efcafc5d32ef8f4 +#: ../../functions.rst:827 e333f58502ed4eceb02ca72ec7d9a14b msgid "" "the characters to consider. If given, the selected extraction option must" " be \"rawdict\"." msgstr "考慮する文字。省略した場合、。指定する場合、選択した抽出オプションは \"rawdict\" である必要があります。" - -#: ../../functions.rst:765 96d847976a5d4e02a20c31511ac7491d +#: ../../functions.rst:828 5e23e60cd2b44deba9b5844d0be494e4 msgid "" "the :ref:`Quad` of the selected characters, usable for text marker " "annotations ('Highlight', etc.)." msgstr "選択された文字の :ref:`Quad` 、テキストマーカーアノテーション('ハイライト' など)で使用できます。" -#: ../../functions.rst:771 8005b6daf639436a938f22336d4dab3b +#: ../../functions.rst:834 d5b5fa6626ea4e5fbd3c5729c70131ca msgid "" "Compute the quadrilateral of a subset of spans of a text line extracted " "via options \"dict\" or \"rawdict\" of :meth:`Page.get_text`." @@ -2090,57 +2214,52 @@ msgstr "" ":meth:`Page.get_text` のオプション \"dict\" または \"rawdict\" " "で抽出されたテキスト行の一部のスパンの四辺形を計算します。" -#: ../../functions.rst:773 535a91962bf74395995775ad170e4138 +#: ../../functions.rst:836 77bdfd3566c640d5abf49df4e0523400 msgid "the line." msgstr "行。" -#: ../../functions.rst:774 314fdf22b70645eda99c9db4b2999091 +#: ../../functions.rst:837 4763d4513a72443a8cb2e1abde8e800b msgid "" "a sub-list of `line[\"spans\"]`. If omitted, the full line quad will be " "returned." msgstr "`line[\"spans\"]` のサブリスト。省略した場合、選択した行の四辺形が返されます。" -#: ../../functions.rst:775 a2bb02c1f17c4da299918bb416eafccb +#: ../../functions.rst:838 4457ad14e4724e9ca4aa3a5e256a3db8 msgid "" "the :ref:`Quad` of the selected line spans, usable for text marker " "annotations ('Highlight', etc.)." msgstr "選択された行のスパンの :ref:`Quad`、テキストマーカーアノテーション('ハイライト' など)で使用できます。" -#: ../../functions.rst:781 a53f51254d604c8ab28ef4985407e13e -msgid "" -"Return the name of Tesseract's language support folder. Use this function" -" if the environment variable `TESSDATA_PREFIX` has not been set." -msgstr "Tesseractの言語サポートフォルダの名前を返します。環境変数 `TESSDATA_PREFIX` が設定されていない場合にこの関数を使用します" +#: ../../functions.rst:844 fa6ac2d5352e447898bb5eb220bb90b4 +msgid "Detect Tesseract language support folder." +msgstr "" -#: ../../functions.rst:783 f037da4ab97848c699a6b324e6c6cda7 +#: ../../functions.rst:846 6f11797ccc5148c581def86e479e2474 msgid "" -"`os.getenv(\"TESSDATA_PREFIX\")` if not `None`. Otherwise, if Tesseract-" -"OCR is installed, locate the name of `tessdata`. If no installation is " -"found, return `False`. The folder name can be used as parameter " -"`tessdata` in methods :meth:`Page.get_textpage_ocr`, " -":meth:`Pixmap.pdfocr_save` and :meth:`Pixmap.pdfocr_tobytes`." +"This function is used to enable OCR via Tesseract even if the language " +"support folder is not specified directly or in environment variable " +"TESSDATA_PREFIX." msgstr "" -#: ../../functions.rst:783 6ec40fbee2dc4839a9b5d6fbd31aaf12 -msgid "" -"`os.getenv(\"TESSDATA_PREFIX\")` if not `None`. Otherwise, if Tesseract-" -"OCR is installed, locate the name of `tessdata`. If no installation is " -"found, return `False`." +#: ../../functions.rst:850 5be47dc2280f44249eb4b89a51c504a8 +msgid "If is set we return it directly." +msgstr "" + +#: ../../functions.rst:852 610202bb1cc345d08689d17027881575 +msgid "Otherwise we return `os.environ['TESSDATA_PREFIX']` if set." msgstr "" -"`os.getenv(\"TESSDATA_PREFIX\")` が `None` でない場合、またはTesseract-" -"OCRがインストールされている場合は、`tessdata` の名前を見つけます。インストールが見つからない場合、`False` を返します。" -#: ../../functions.rst:785 d0c39b998df640b88ca054324b4a9105 +#: ../../functions.rst:854 addd2c5751724dd19f1ad368ab40fab0 msgid "" -"The folder name can be used as parameter `tessdata` in methods " -":meth:`Page.get_textpage_ocr`, :meth:`Pixmap.pdfocr_save` and " -":meth:`Pixmap.pdfocr_tobytes`." +"Otherwise we search for a Tesseract installation and return its language " +"support folder." +msgstr "" + +#: ../../functions.rst:857 aaff4ea4400b47dcac737f3a953d4d18 +msgid "Otherwise we raise an exception." msgstr "" -"このフォルダの名前は、メソッド " -":meth:`Page.get_textpage_ocr`、:meth:`Pixmap.pdfocr_save`、および " -":meth:`Pixmap.pdfocr_tobytes` の `tessdata` パラメータに使用できます。" -#: ../../functions.rst:795 7e3de696c7284b6dba011a6e01942920 +#: ../../functions.rst:867 59f441bd5735450d9f431cb8ac5d4d06 msgid "" "Return the (unique) infinite rectangle `Rect(-2147483648.0, " "-2147483648.0, 2147483520.0, 2147483520.0)`, resp. the :ref:`IRect` and " @@ -2151,7 +2270,7 @@ msgstr "" "`Rect(-2147483648.0、-2147483648.0、2147483520.0、2147483520.0)`、または " ":ref:`IRect` と :ref:`Quad` の対応するものを返します。これは最大の可能な四角形で、すべての有効な四角形が含まれます。" -#: ../../functions.rst:805 2fdb3ba67cda469da0e1804a110e4bd4 +#: ../../functions.rst:877 6edd4f317e5e4c1f929fee4707063b02 msgid "" "Return the \"standard\" empty and invalid rectangle `Rect(2147483520.0, " "2147483520.0, -2147483648.0, -2147483648.0)` resp. quad. Its top-left and" @@ -2165,14 +2284,23 @@ msgstr "" "または対応する四角形を返します。その左上と右下のポイント値は、無限の四角形と比較して反転しています。たとえば、`page.get_text(\"dict\")`" " 辞書内の空の bboxes を示すために使用されます。ただし、無限に多くの空のまたは無効な四角形が存在します。" -#: ../../footer.rst:60 e6e1aac88efd4cc593563099aaefb817 -msgid "This documentation covers all versions up to |version|." -msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" +#: ../../functions.rst:883 ecbb9be9ecab43fe9b984e688d525aca +msgid "" +"Returns a dict mapping lower-case color name to `(red, green, blue)` " +"tuple, and `red`, `green`, `blue` are floats in range 0..1." +msgstr "" -#: ../../footer.rst:-1 9fddd0d47dd64d798cf2db1a616d66c5 -msgid "Discord logo" +#: ../../functions.rst:888 7909544a776b416ca01ff4363ae21452 +msgid "" +"Returns a list of `(colorname, red, green, blue)` tuples, where " +"`colorname` is upper case and `red`, `green`, `blue` are integers in " +"range 0..255." msgstr "" +#: ../../footer.rst:60 029e415e5bba4c8cbd9b3986f648e693 +msgid "This documentation covers all versions up to |version|." +msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" + #~ msgid "return the quad for a text span (\"dict\" / \"rawdict\")" #~ msgstr "テキスト スパンのクワッドを返す (\"dict\", \"rawdict\")" @@ -2231,13 +2359,99 @@ msgstr "" #~ "be required for object insertions in " #~ "standard PDF geometry. Note that this" #~ " is a quick, basic check only: " -#~ "a value of *False* may still be" +#~ "a value of ``False`` may still be" #~ " a false alarm. But nevertheless " #~ "executing :meth:`Page.wrap_contents` will have " #~ "no negative side effects." #~ msgstr "" #~ ":meth:`Page.wrap_contents` " -#~ "が標準のPDFジオメトリにオブジェクトを挿入する際に必要かどうかを示します。ただし、これは迅速で基本的なチェックであることに注意してください。*False*" +#~ "が標準のPDFジオメトリにオブジェクトを挿入する際に必要かどうかを示します。ただし、これは迅速で基本的なチェックであることに注意してください。``False``" #~ " の値でも誤報の可能性があることに留意してください。ただし、:meth:`Page.wrap_contents` " #~ "を実行しても負の副作用はありません。" +#~ msgid ":attr:`TESSDATA_PREFIX`" +#~ msgstr "" + +#~ msgid "a copy of `os.environ[\"TESSDATA_PREFIX\"]`" +#~ msgstr "os.environ[\"TESSDATA_PREFIX\"] のコピーです" + +#~ msgid "New in v1.19.4" +#~ msgstr "バージョン1.19.4で新たに導入されました" + +#~ msgid "" +#~ "Copy of `os.environ[\"TESSDATA_PREFIX\"]` for " +#~ "convenient checking whether there is " +#~ "integrated Tesseract OCR support." +#~ msgstr "便利なチェックに使用される `os.environ[\"TESSDATA_PREFIX\"]` のコピー" + +#~ msgid "" +#~ "If this attribute is `None`, " +#~ "Tesseract-OCR is either not installed, " +#~ "or the environment variable is not " +#~ "set to point to Tesseract's language " +#~ "support folder." +#~ msgstr "" +#~ "この属性が `None` の場合、Tesseract-" +#~ "OCRはインストールされていないか、環境変数がTesseractの言語サポートフォルダを指すように設定されていない可能性があります。" + +#~ msgid "" +#~ "This variable is now checked before " +#~ "OCR functions are tried. This prevents" +#~ " verbose messages from MuPDF." +#~ msgstr "この変数は、OCR関数が試行される前に確認されます。これにより、MuPDFから冗長なメッセージが表示されるのを防ぎます。" + +#~ msgid "" +#~ "This method obsoletes the use of " +#~ ":meth:`Page.clean_contents` in most cases. The" +#~ " advantage this method is a small " +#~ "footprint in terms of processing time" +#~ " and a low impact on the data" +#~ " size of incremental saves." +#~ msgstr "" + +#~ msgid "" +#~ "Return the name of Tesseract's language" +#~ " support folder. Use this function if" +#~ " the environment variable `TESSDATA_PREFIX` " +#~ "has not been set." +#~ msgstr "" +#~ "Tesseractの言語サポートフォルダの名前を返します。環境変数 `TESSDATA_PREFIX` " +#~ "が設定されていない場合にこの関数を使用します" + +#~ msgid "" +#~ "`os.getenv(\"TESSDATA_PREFIX\")` if not `None`. " +#~ "Otherwise, if Tesseract-OCR is " +#~ "installed, locate the name of " +#~ "`tessdata`. If no installation is found," +#~ " return `False`. The folder name can" +#~ " be used as parameter `tessdata` in" +#~ " methods :meth:`Page.get_textpage_ocr`, " +#~ ":meth:`Pixmap.pdfocr_save` and " +#~ ":meth:`Pixmap.pdfocr_tobytes`." +#~ msgstr "" + +#~ msgid "" +#~ "`os.getenv(\"TESSDATA_PREFIX\")` if not `None`. " +#~ "Otherwise, if Tesseract-OCR is " +#~ "installed, locate the name of " +#~ "`tessdata`. If no installation is found," +#~ " return `False`." +#~ msgstr "" +#~ "`os.getenv(\"TESSDATA_PREFIX\")` が `None` でない場合" +#~ "、またはTesseract-OCRがインストールされている場合は、`tessdata` " +#~ "の名前を見つけます。インストールが見つからない場合、`False` を返します。" + +#~ msgid "" +#~ "The folder name can be used as " +#~ "parameter `tessdata` in methods " +#~ ":meth:`Page.get_textpage_ocr`, :meth:`Pixmap.pdfocr_save` " +#~ "and :meth:`Pixmap.pdfocr_tobytes`." +#~ msgstr "" +#~ "このフォルダの名前は、メソッド " +#~ ":meth:`Page.get_textpage_ocr`、:meth:`Pixmap.pdfocr_save`、および " +#~ ":meth:`Pixmap.pdfocr_tobytes` の `tessdata` " +#~ "パラメータに使用できます。" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/glossary.mo b/docs/locales/ja/LC_MESSAGES/glossary.mo index b1667e6f3..53cb77e34 100644 Binary files a/docs/locales/ja/LC_MESSAGES/glossary.mo and b/docs/locales/ja/LC_MESSAGES/glossary.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/glossary.po b/docs/locales/ja/LC_MESSAGES/glossary.po index 64fceede0..20dc740f6 100644 --- a/docs/locales/ja/LC_MESSAGES/glossary.po +++ b/docs/locales/ja/LC_MESSAGES/glossary.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,54 +19,54 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 98633b74650f4f368314c1e087d8a723 +#: ../../header.rst:-1 b0e2cd94d0aa4b3a934fbebb0e61235b msgid "Artifex" msgstr "" -#: ../../header.rst:-1 7c0bcdcd9ff74351abbcfcba72b58e09 +#: ../../header.rst:-1 f1baafce3d564895b00cf4bc56d7bb33 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 dfb56bc186b5495f9b3cf600e64f272b +#: ../../header.rst:-1 819b0bef657b4ba4a0ab2d3e4ec0b4d8 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../glossary.rst:7 87e01380a92e4f4ca20314289ce76620 +#: ../../glossary.rst:7 9941910a374d4a0db2b472ea37c6f1f8 msgid "Glossary" msgstr "用語集" -#: ../../glossary.rst:11 d9645c6f37d7406983e6e2be167f78d4 +#: ../../glossary.rst:11 0c491cef7a4041028d651475e56a294b msgid "" "This is an essential general mathematical / geometrical term for " "understanding this documentation. Please see this section for a more " "detailed discussion: :ref:`Coordinates`." msgstr "" -#: ../../glossary.rst:15 5d9926d99e6140498a76ce0b7f1a68f9 +#: ../../glossary.rst:15 b03cc7629633424488939ad7912ff819 msgid "A Python sequence of 6 numbers." msgstr "6つの数字からなるPythonのシーケンス。" -#: ../../glossary.rst:19 7101f0cee372419ebae2136010d546f1 +#: ../../glossary.rst:19 bd43bb115ff04c94b19ca36c5f5d02f6 msgid "A Python sequence of 4 numbers." msgstr "4つの数字からなるPythonのシーケンス。" -#: ../../glossary.rst:23 c8cacc02ab7142f5890f7b46e2508e42 +#: ../../glossary.rst:23 1a31b68b33264ca5a77bd2b6902ffe53 msgid "A Python sequence of 4 integers." msgstr "4つの整数からなるPythonのシーケンス。" -#: ../../glossary.rst:27 73dc4dc1395f415ca2371197fde69cd0 +#: ../../glossary.rst:27 2a42549c54164862ab4a896ad4f7e587 msgid "A Python sequence of 2 numbers." msgstr "2つの数字からなるPythonのシーケンス。" -#: ../../glossary.rst:31 396355bcd75140418bbb7fe9a25421b4 +#: ../../glossary.rst:31 5d5f5915c82d4921bed1e2f95ab91ecb msgid "A Python sequence of 4 :data:`point_like` items." msgstr "4つの :data:`point_like` アイテムからなるPythonのシーケンス。" -#: ../../glossary.rst:35 5e49607eb8064d5484e42cb3ea16c0c7 +#: ../../glossary.rst:35 775806cbba59489bac52cba16de32799 msgid "" "A number of values in a PDF can inherited by objects further down in a " "parent-child relationship. The mediabox (physical size) of pages may for " @@ -77,7 +77,7 @@ msgstr "" "PDF内のいくつかの値は、親子関係で下位のオブジェクトに継承されることがあります。例えば、ページのmediabox(物理的なサイズ)は一度だけ指定されるか、:data:`pagetree`" " のいくつかのノードで指定され、それ以外の値を指定しない子供たちにとってその値が取得されます。" -#: ../../glossary.rst:41 50db8ba49a2f4971aef4d735feffdf5c +#: ../../glossary.rst:41 d6aa867681e449c0a945275210eb6353 msgid "" "A PDF array of 4 floats specifying a physical page size -- " "(:data:`inheritable`, mandatory). This rectangle should contain all other" @@ -97,7 +97,7 @@ msgstr "" ":attr:`Page.mediabox` は常に、ページオブジェクト定義内の `/MediaBox` " "キーと同じ座標を示します。他のすべての矩形に関して、MuPDFはy座標を変換し、上部境界が参照点となるようにします。これは時に混乱することがあります。例えば、次のような状況に遭遇することがあります。" -#: ../../glossary.rst:43 c96b230d8ef2445d9b9f0f4e43de87d5 +#: ../../glossary.rst:43 4b7aa0adab17468e947f9b8eb328fd00 msgid "" "The page definition contains the following identical values: `/MediaBox [" " 36 45 607.5 765 ]`, `/CropBox [ 36 45 607.5 765 ]`." @@ -105,13 +105,13 @@ msgstr "" "ページ定義には次のような同一の値が含まれています: `/MediaBox [ 36 45 607.5 765 ]` 、 `/CropBox [ " "36 45 607.5 765 ]`。 " -#: ../../glossary.rst:44 9e8cfd88590644cd8b3345ff2ff2e6c4 +#: ../../glossary.rst:44 c3336320e59f48f9986d52f340b7a4d4 msgid "" "PyMuPDF accordingly shows `page.mediabox = Rect(36.0, 45.0, 607.5, " "765.0)`." msgstr "したがって、PyMuPDFは `page.mediabox = Rect(36.0, 45.0, 607.5, 765.0)` と表示します。 " -#: ../../glossary.rst:45 e957287ce41f46de972315e80c56aa3c +#: ../../glossary.rst:45 a216a8839aee420cbe653cdb1e90cee1 msgid "" "**BUT:** `page.cropbox = Rect(36.0, 0.0, 607.5, 720.0)`, because the two " "y-coordinates have been transformed (45 subtracted from both of them)." @@ -119,7 +119,7 @@ msgstr "" "しかし、 `page.cropbox = Rect(36.0, 0.0, 607.5, 720.0)` " "です。なぜなら、2つのy座標が変換されているため(両方から45が引かれているため)です。" -#: ../../glossary.rst:49 42a9b0d066c74ec8b9496f164ac4fea5 +#: ../../glossary.rst:49 8fa4e076a5e744bfa85ec3664e4908ce msgid "" "A PDF array of 4 floats specifying a page's visible area -- " "(:data:`inheritable`, optional). It is the default for TrimBox, ArtBox " @@ -133,7 +133,7 @@ msgstr "" " - :attr:`Page.rect` とは対照的です。また、ページ矩形以外では、クロップボックスの左上隅が(0, " "0)であるかどうかは問題ありません。" -#: ../../glossary.rst:54 3c12792e76ed4656bb48c2e0a3697974 +#: ../../glossary.rst:54 695d4331e2574a73a6bc119defe798a4 msgid "" "A central PDF :data:`dictionary` -- also called the \"root\" -- " "containing document-wide parameters and pointers to many other " @@ -144,7 +144,7 @@ msgstr "" "で、文書全体のパラメータと多くの他の情報へのポインタを含んでいます。その :data:`xref` は " ":meth:`Document.pdf_catalog` で返されます。" -#: ../../glossary.rst:58 2388345375504f7aa7f1a59a1f27496a +#: ../../glossary.rst:58 972c6ce4df00407a83efb4a5e33cf1b8 msgid "" "More precisely, the **PDF trailer** contains information in " ":data:`dictionary` format. It is usually located at the file's end. In " @@ -156,14 +156,14 @@ msgstr "" "形式の情報が含まれています。通常、ファイルの末尾に配置されています。この辞書には、カタログやメタデータの :data:`xref` " "、:data:`xref` の数などが含まれています。PDF仕様の定義は次のとおりです:" -#: ../../glossary.rst:60 17283d99978f440997c28898a7e7894c +#: ../../glossary.rst:60 c620690ecfe5406fbe8d467efeb91794 msgid "" "*\"The trailer of a PDF file enables an application reading the file to " "quickly find the cross-reference table and certain special objects. " "Applications should read a PDF file from its end.\"*" msgstr "「PDFファイルのトレーラーは、ファイルを読むアプリケーションがクロスリファレンステーブルと特定の特別なオブジェクトを迅速に見つけることを可能にします。アプリケーションはPDFファイルを末尾から読むべきです。」" -#: ../../glossary.rst:62 49e450a94657450ba6d590eac41e9077 +#: ../../glossary.rst:62 bbfcfb28f25f49608557cc077c9f2ff2 msgid "" "To access the trailer in PyMuPDF, use the usual methods " ":meth:`Document.xref_object`, :meth:`Document.xref_get_key` and " @@ -174,7 +174,7 @@ msgstr "" ":meth:`Document.xref_get_key` 、:meth:`Document.xref_get_keys` " "を使用し、正のxref番号の代わりに `-1` を指定します。" -#: ../../glossary.rst:66 6af89fe1bb4d44808a2c0abca0d09847 +#: ../../glossary.rst:66 52c596bdac704429bcc9b0406875b7fc msgid "" "A **content stream** is a PDF :data:`object` with an attached " ":data:`stream`, whose data consists of a sequence of instructions " @@ -195,17 +195,17 @@ msgstr "" ":ref:`AdobeManual` の「Operator " "Summary」章(p.643)をご覧ください。PDFページには0から多くのコンテンツオブジェクトを持つことができます。コンテンツオブジェクトが存在しない場合、ページは空になります(ただし注釈は表示される可能性があります)。複数のコンテンツオブジェクトがある場合、それらは1つのオブジェクトに存在するかのように順番に解釈されます(つまり、連結された文字列のように)。なお、同じ構文を使用する他のストリームオブジェクトタイプもあることに注意してください。たとえば、注釈に関連する外観辞書やフォームXObjectなどです。" -#: ../../glossary.rst:68 6f507c79d58949b18e85d75b20465b57 +#: ../../glossary.rst:68 fcc09656179a42c7974f67c0e38f4c94 msgid "PyMuPDF provides a number of methods to deal with contents of PDF pages:" msgstr "PyMuPDFは、PDFページのコンテンツに対処するためのいくつかのメソッドを提供しています:" -#: ../../glossary.rst:70 40768387957a4177ae2bd28cd6c078df +#: ../../glossary.rst:70 aa25f61d861242e7a13b1c745587ebad msgid "" ":meth:`Page.read_contents()` -- reads and concatenates all page contents " "into one `bytes` object." msgstr ":meth:`Page.read_contents()` – ページのすべてのコンテンツを読み込んで1つのバイトオブジェクトに連結します。" -#: ../../glossary.rst:71 1baf2ad6c28d4d4ebafd64f87ece87a7 +#: ../../glossary.rst:71 85a71eda07ba4442b8014231e74ff345 msgid "" ":meth:`Page.clean_contents()` -- a wrapper of a MuPDF function that " "reads, concatenates and syntax-cleans all page contents. After this, only" @@ -218,7 +218,7 @@ msgstr "" "`/Contents` オブジェクトのみが存在します。さらに、ページの :data:`resources` " "はそれと同期され、ページが実際に参照する画像、フォント、その他のオブジェクトのみが含まれるようになります。" -#: ../../glossary.rst:72 d6732fd9427b404abf33e5bf3f11da3a +#: ../../glossary.rst:72 47bbed208b0b4183bd6abbb069ce2eb9 msgid "" ":meth:`Page.get_contents()` -- return a list of :data:`xref` numbers of a" " page's :data:`contents` objects. May be empty. Use " @@ -229,13 +229,13 @@ msgstr "" "番号のリストを返します。空かもしれません。:meth:`Document.xref_stream()` " "をこれらのxrefの1つとともに使用して、対応するコンテンツセクションを読み込むことができます。" -#: ../../glossary.rst:73 62fbe782eaab4f5092260c26151df9c1 +#: ../../glossary.rst:73 fc38f58008f949d283ae3b24382f368a msgid "" ":meth:`Page.set_contents()` -- set a page's `/Contents` key to the " "provided :data:`xref` number." msgstr ":meth:`Page.set_contents()` – ページの `/Contents` キーを指定されたxref番号に設定します。" -#: ../../glossary.rst:77 08bedb6cb7ff4bad988ef8d2901c32ab +#: ../../glossary.rst:77 7f136697e7be484382e85c200cb2c6dc msgid "" "A :data:`dictionary` containing references to any resources (like images " "or fonts) required by a PDF :data:`page` (required, inheritable, " @@ -249,7 +249,7 @@ msgstr "" ":data:`dictionary` " "は、オブジェクト定義内のキー/リソースの下にサブ辞書として表示されます。継承可能なオブジェクトタイプであるため、すべてのページまたは一部のページの「親」リソースが存在する可能性があります。" -#: ../../glossary.rst:81 279201da4a73418dac26375cced7a49a +#: ../../glossary.rst:81 bf3936e13b07411e9f15d4dea0704603 msgid "" "A PDF :data:`object` type, which is somewhat comparable to the same-named" " Python notion: \"A dictionary object is an associative table containing " @@ -263,13 +263,13 @@ msgstr "" "のタイプで、同じ名前のPythonの概念に多少似ています。「辞書オブジェクトは、辞書のエントリとして知られるオブジェクトのペアを含む連想テーブルです。各エントリの最初の要素はキーであり、2番目の要素は値です。キーは名前である必要があります(...)。値は他の辞書を含む他の種類のオブジェクトであることができます。値がnull" " (...) の辞書エントリは、不在のエントリと同等です。」(:ref:`AdobeManual` p. 18)。" -#: ../../glossary.rst:83 c195de5788544203aafb1a6b52db7ce5 +#: ../../glossary.rst:83 a5774d115d78486887db6243636d5362 msgid "" "Dictionaries are the most important :data:`object` type in PDF. Here is " "an example (describing a :data:`page`)::" msgstr "辞書は、PDF内で最も重要なオブジェクトのタイプです。以下は、:data:`page` を記述する例です::" -#: ../../glossary.rst:102 c74e0783d0de45f3b58a229268d46c49 +#: ../../glossary.rst:102 45aa2b19b71e458e8fa25a2c78d596a6 msgid "" "*Contents*, *Type*, *MediaBox*, etc. are **keys**, *40 0 R*, *Page*, *[0 " "0 595.32 841.92]*, etc. are the respective **values**. The strings " @@ -278,7 +278,7 @@ msgstr "" "Contents、Type、MediaBoxなどはキーであり、40 0 R、Page、[0 0 595.32 " "841.92]などはそれぞれの値です。「<<」と「>>」という文字列は、オブジェクト定義を括るために使用されます。" -#: ../../glossary.rst:104 54bd2a13696c4c128fee944d80fc570f +#: ../../glossary.rst:104 a6f9190af07842339804c618355e0e27 msgid "" "This example also shows the syntax of **nested** dictionary values: " "*Resources* has an object as its value, which in turn is a dictionary " @@ -288,7 +288,7 @@ msgstr "" "この例は、ネストされた辞書の値の構文も示しています。Resourcesはその値としてオブジェクトを持ち、それ自体がExtGState(値は<>で、これは別の辞書です)、などのキーを持つ辞書です。" -#: ../../glossary.rst:108 95961bdaf86049ab84e31b23652e94d1 +#: ../../glossary.rst:108 b97660907730454fb80cae8fff9da131 msgid "" "A PDF page is a :data:`dictionary` object which defines one page in a " "PDF, see :ref:`AdobeManual` p. 71." @@ -296,7 +296,7 @@ msgstr "" "PDFページは、PDF内の1つのページを定義する :data:`dictionary` オブジェクトであり、 :ref:`AdobeManual`" " p. 71を参照してください。" -#: ../../glossary.rst:112 5ce5a2af63bd4902bc58673478a47352 +#: ../../glossary.rst:112 97d4db102e0e4330938ad1f4e7fca422 msgid "" "The pages of a document are accessed through a structure known as the " "page tree, which defines the ordering of pages in the document. The tree " @@ -308,7 +308,7 @@ msgstr "" "文書のページは、ページツリーとして知られる構造を介してアクセスされ、文書内のページの順序を定義します。このツリー構造により、限られたメモリしか使用しないPDFコンシューマーアプリケーションでも、数千ページを含む文書を迅速に開くことができます。ツリーには2種類のノードが含まれています。中間ノードはページツリーノードと呼ばれ、葉ノードはページオブジェクトと呼ばれます。(:ref:`AdobeManual`" " p. 75)。" -#: ../../glossary.rst:114 bf7882890a264cf69714f64989c24800 +#: ../../glossary.rst:114 2dbcc685903a4543922f7629dbdc1af4 msgid "" "While it is possible to list all page references in just one array, PDFs " "with many pages are often created using *balanced tree* structures " @@ -317,7 +317,7 @@ msgid "" "page number from a linear to some logarithmic order of magnitude." msgstr "ページ参照を単一の配列でリストすることは可能ですが、多くのページを含むPDFは、より迅速な単一ページへのアクセスのためにバランスの取れたツリー構造(「ページツリー」)を使用して作成されることがよくあります。全ページ数に対して、これにより平均ページアクセス時間がページ番号による線形から対数のオーダーに削減されることがあります。" -#: ../../glossary.rst:116 73f78167e0c742cab1b72cd3d1e3583e +#: ../../glossary.rst:116 aca1e345565340d197f15bb05ce23148 msgid "" "For fast page access, MuPDF can use its own array in memory -- " "independently from what may or may not be present in the document file. " @@ -327,7 +327,7 @@ msgstr "" "高速なページアクセスのために、MuPDFは独自のメモリ内配列を使用できます - " "文書ファイルに存在するかどうかに関係なく。この配列はページ番号でインデックスされるため、完全にバランスが取れたページツリーを経由するアクセスよりもはるかに高速です。" -#: ../../glossary.rst:120 57f551b4a4b5469bb82f79c1bea56485 +#: ../../glossary.rst:120 cf48ba84c41b4860a00bb4859a5f1ab6 msgid "" "Similar to Python, PDF supports the notion *object*, which can come in " "eight basic types: boolean values (\"true\" or \"false\"), integer and " @@ -348,7 +348,7 @@ msgstr "" "13)。オブジェクトはラベルを割り当てることで識別可能にすることができます。このラベルは、間接オブジェクトと呼ばれます。PyMuPDFは、:meth:`Document.xref_object`" " を介して間接オブジェクトの定義をクロスリファレンス番号を使って取得することができます。" -#: ../../glossary.rst:124 b50100447e5c48038bbfaf6a4680f467 +#: ../../glossary.rst:124 65f67d11513245eea25bbcfe453941d4 msgid "" "A PDF :data:`dictionary` :data:`object` type which is followed by a " "sequence of bytes, similar to Python *bytes*. \"However, a PDF " @@ -364,7 +364,7 @@ msgstr "" "タイプで、Pythonのbytesに似たバイト列が続きます。ただし、「PDFアプリケーションはストリームを段階的に読むことができますが、文字列は完全に読む必要があります。さらに、ストリームの長さは無制限ですが、文字列は実装の制限に従います。そのため、画像やページの説明などの大量のデータを含むオブジェクトは、ストリームとして表現されます。」「ストリームは、キーワード「stream」と「endstream」で囲まれた0バイト以上のバイトで構成される" " :data:`dictionary` の後に続きます」::" -#: ../../glossary.rst:135 35a1ee86bcfd4318bde0c3ee35444c97 +#: ../../glossary.rst:135 1f0727e3f450432f9923a4ffd2cc8cee msgid "" "See :ref:`AdobeManual` p. 19. PyMuPDF supports retrieving stream content " "via :meth:`Document.xref_stream`. Use :meth:`Document.is_stream` to " @@ -374,7 +374,7 @@ msgstr "" "を介してストリームコンテンツを取得するサポートを提供しています。オブジェクトがストリームタイプかどうかを判断するには、:meth:`Document.is_stream`" " を使用します。" -#: ../../glossary.rst:139 6b195420ae1a442fa45b1c2b0f3861ca +#: ../../glossary.rst:139 d732f9dcef7e47028ca43a5647adcb9c msgid "" "A mathematical notion meaning a vector of norm (\"length\") 1 -- usually " "the Euclidean norm is implied. In PyMuPDF, this term is restricted to " @@ -383,7 +383,7 @@ msgstr "" "数学的な概念で、ノルム(「長さ」)が1のベクトルを意味します。通常、ユークリッドノルムが含まれます。PyMuPDFでは、この用語は " ":ref:`Point` オブジェクトに制限されます。:attr:`Point.unit` を参照してください。" -#: ../../glossary.rst:143 732e8751585740f380cd43e574cbe977 +#: ../../glossary.rst:143 26fb51d68f234a088d1702a7b331d879 msgid "" "Abbreviation for cross-reference number: this is an integer unique " "identification for objects in a PDF. There exists a cross-reference table" @@ -391,20 +391,20 @@ msgid "" " which stores the relative position of each object for quick lookup. The " "cross-reference table is one entry longer than the number of existing " "object: item zero is reserved and must not be used in any way. Many " -"PyMuPDF classes have an *xref* attribute (which is zero for non-PDFs), " -"and one can find out the total number of objects in a PDF via " +"PyMuPDF classes have an :data:`xref` attribute (which is zero for non-" +"PDFs), and one can find out the total number of objects in a PDF via " ":meth:`Document.xref_length` *- 1*." msgstr "" "クロスリファレンス番号の省略形:これはPDF内のオブジェクトに対する一意の識別子である整数です。各PDFにはクロスリファレンステーブルが存在し(物理的には複数の別々のセグメントで構成される場合があります)、各オブジェクトの相対位置をクイックルックアップのために保存します。クロスリファレンステーブルは既存のオブジェクトの数よりも1つ長いエントリを持っており、アイテム0は予約され、何の方法でも使用してはいけません。多くのPyMuPDFクラスにはxref属性(非PDFの場合はゼロ)があり、:meth:`Document.xref_length`" " - 1を介してPDF内のオブジェクトの総数を知ることができます。" -#: ../../glossary.rst:148 5eceab782a7049678ee8da1a364e7c88 +#: ../../glossary.rst:148 6c021fd6a5aa44d7b8b3e0905f3f7b08 msgid "" "When referring to font size this metric is measured in points where 1 " "inch = 72 points." msgstr "フォントサイズを指す際、このメトリックは1インチ = 72ポイントとして測定されます。" -#: ../../glossary.rst:152 63eca8f640994da3a260f20dc9f34b32 +#: ../../glossary.rst:152 c558da0bdc1446d89fcd51030a930245 msgid "" "Images and :ref:`Pixmap` objects may contain resolution information " "provided as \"dots per inch\", dpi, in each direction (horizontal and " @@ -420,7 +420,7 @@ msgstr "" " :attr:`Pixmap.xres` 、:attr:`Pixmap.yres` " "に設定します。入力内で有意義な情報が見つからない場合(非正の値や4800を超える値など)、代わりに「適切な」デフォルト値を使用します。通常のデフォルト値は96ですが、一部の場合(例えばJPXイメージの場合)は72になる場合もあります。" -#: ../../glossary.rst:156 b3596d25e2f24a8dac3dccaca160233a +#: ../../glossary.rst:156 8e9c840d574c4b3d8c897a834b9362df msgid "" "Optional content properties dictionary - a sub :data:`dictionary` of the " "PDF :data:`catalog`. The central place to store optional content " @@ -436,7 +436,7 @@ msgstr "" "、必須、すべてのオプショナルコンテンツグループをリストする配列、(2) `/D` " "、必須、デフォルトのオプショナルコンテンツ構成辞書(OCCD)、(3) `/Configs` 、オプション、代替のOCCDの配列。" -#: ../../glossary.rst:161 5be131747b2c487b86266699a017cc2b +#: ../../glossary.rst:161 0100632cdca744f69f1f6913c969d05d msgid "" "Optional content configuration dictionary - a PDF :data:`dictionary` " "inside the PDF :data:`OCPD`. It stores a setting of ON / OFF states of " @@ -453,7 +453,7 @@ msgstr "" " の `/D` 構成は常にアクティブになります。ビューアは `/D` 、または配列 `/Configs` " "に含まれるオプショナル構成のいずれかに切り替える方法を提供する必要があります。" -#: ../../glossary.rst:166 03e82faa9c9b4b5d9ebe19bf46bfed67 +#: ../../glossary.rst:166 43b7c2249e154c59bf5a59cfd2cf86e2 msgid "" "Optional content group -- a :data:`dictionary` object used to control the" " visibility of other PDF objects like images or annotations. " @@ -467,7 +467,7 @@ msgstr "" "オブジェクト。どのページで定義されているかに関係なく、同じOCGを持つオブジェクトは、OCGをONまたはOFFに設定することで同時に表示または非表示にできます。これは多くのPDFビューア(Adobe" " Acrobat)が提供するユーザーインターフェース、またはプログラムを使用して達成できます。" -#: ../../glossary.rst:170 d5a9b3ce3ecd4b52839e8497b27cc838 +#: ../../glossary.rst:170 f4ba5ac63bea490bbc335d7fade50a6b msgid "" "Optional content membership dictionary -- a :data:`dictionary` object " "which can be used like an :data:`OCG`: it has a visibility state. The " @@ -478,7 +478,7 @@ msgstr "" "オプショナルコンテンツメンバーシップ辞書(OCMD) - :data:`OCG` " "のように使用できる辞書オブジェクトで、表示状態を持ちます。OCMDの表示は計算されます:これはOCGの1つ以上の状態を使用してブール値を生成する論理式です。式の結果はON(true)またはOFF(false)として解釈されます。" -#: ../../glossary.rst:174 b8561578150246cc911d8496bb4f3cb2 +#: ../../glossary.rst:174 522b5dde5e3b49df8ab57178f4d58ed1 msgid "" "Some frequent character combinations are represented by their own special" " glyphs in more advanced fonts. Typical examples are \"fi\", \"fl\", " @@ -490,17 +490,16 @@ msgstr "" "一部の頻繁な文字の組み合わせは、より高度なフォントでは固有の特別なグリフで表されます。典型的な例には「fi」、「fl」、「ffi」、「ffl」などがあります。これらの複合体はリガチャと呼ばれます。PyMuPDFのテキスト抽出では、対応するユニコードを変更せずに返すオプションがあり、またリガチャをその構成要素に分割することもできます:「fi」" " ==> 「f」+「i」など。" -#: ../../footer.rst:71 68552d3eff904afd8a14b070333f9caa +#: ../../footer.rst:60 04c382aafad34653bc0f596f100e3271 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 c094ce4ab8df4a67933404eb35e2f388 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/how-to-open-a-file.mo b/docs/locales/ja/LC_MESSAGES/how-to-open-a-file.mo index 8b498f87b..8552dd32f 100644 Binary files a/docs/locales/ja/LC_MESSAGES/how-to-open-a-file.mo and b/docs/locales/ja/LC_MESSAGES/how-to-open-a-file.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/how-to-open-a-file.po b/docs/locales/ja/LC_MESSAGES/how-to-open-a-file.po index 4138827f2..3d72e8d8f 100644 --- a/docs/locales/ja/LC_MESSAGES/how-to-open-a-file.po +++ b/docs/locales/ja/LC_MESSAGES/how-to-open-a-file.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,47 +19,47 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 fbce46a08b3942268c5a88496a569b7d +#: ../../header.rst:-1 cac88fdfe639485b93df6094e0c3030e msgid "Artifex" msgstr "" -#: ../../header.rst:-1 e70d4b2976654a16bee5417ccbf2a6f0 +#: ../../header.rst:-1 9510201d07b04c55a3114ceb4b285f81 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 dcf5c4bd9f534825847cfa69076d3868 +#: ../../header.rst:-1 f2821506806f4e1f858415f54f224785 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../how-to-open-a-file.rst:7 b56aef1cb94941268ffcaf474302c628 +#: ../../how-to-open-a-file.rst:7 58b4044b498b4fa98a7e544066d6548c msgid "Opening Files" msgstr "ファイルを開く" -#: ../../how-to-open-a-file.rst:15 558a099e442a4dc98d8bce5206b46aff +#: ../../how-to-open-a-file.rst:15 cae84881472c4a128e9b260c5de512f1 msgid "Supported File Types" msgstr "サポートされているファイルタイプ" -#: ../../how-to-open-a-file.rst:17 a0feccd35f4844af94fc03974d746b36 +#: ../../how-to-open-a-file.rst:17 6696fc63a01c47ffa19215b2f6d2a5b4 msgid "|PyMuPDF| can open files other than just |PDF|." msgstr "|PyMuPDF| は |PDF| 以外のファイルも開くことができます。" -#: ../../how-to-open-a-file.rst:19 a93f5ede769d467ea2eea80bac592492 +#: ../../how-to-open-a-file.rst:19 52efb4e7a74844d7b47e10f1f9677f7f msgid "The following file types are supported:" msgstr "|PyMuPDF| は以下のファイルタイプをサポートしています:" -#: ../../how-to-open-a-file.rst:26 aa587344bb504cb3b2bff50ad143091d +#: ../../how-to-open-a-file.rst:26 fb0e540bc4eb4ac4b815230c9fe94127 msgid "How to Open a File" msgstr "ファイルを開く方法" -#: ../../how-to-open-a-file.rst:28 abedd5d5fe494b67bf7e404490f3bd67 +#: ../../how-to-open-a-file.rst:28 8de724b91b61477183bf37f2a0ecd140 msgid "To open a file, do the following:" msgstr "ファイルを開くには、次の手順を実行します。" -#: ../../how-to-open-a-file.rst:35 1e9319f3d234491abe36ee148ed0e392 +#: ../../how-to-open-a-file.rst:35 ca2f4e8e9264476f8f8a228742e663fa msgid "" "The above creates a :ref:`Document`. The instruction `doc = " "pymupdf.Document(\"a.pdf\")` does exactly the same. So, `open` is just a " @@ -67,21 +67,21 @@ msgid "" "chapter." msgstr "" -#: ../../how-to-open-a-file.rst:39 e3a9d80ac30b4da2914cbd51a25d43bc +#: ../../how-to-open-a-file.rst:39 fb423287318a40b0a8079a8b86254936 msgid "Opening with :index:`a Wrong File Extension `" msgstr "拡張子の異なるファイルを開く" -#: ../../how-to-open-a-file.rst:41 9a51769cdc044639b6f2cf8134aaa943 +#: ../../how-to-open-a-file.rst:41 23a14ae19b7643cd9324eb33cc30b516 msgid "" "If you have a document with a wrong file extension for its type, you can " "still correctly open it." msgstr "拡張子がファイルタイプと異なっていても、正しく開くことができます。" -#: ../../how-to-open-a-file.rst:43 de37ef08eed44cac81a6fe6a6e1f148c +#: ../../how-to-open-a-file.rst:43 bcddf79a279b4b23b9c0c3c02a02d0ae msgid "Assume that *\"some.file\"* is actually an **XPS**. Open it like so:" msgstr "例えば *\"some.file\"* が実際には **XPS** ファイルの場合は、以下のようにして開きます:" -#: ../../how-to-open-a-file.rst:53 945beb3967e14907ac758fc6bebee7a6 +#: ../../how-to-open-a-file.rst:53 a05b58c6b9ed4edab534e2127dc4dd90 msgid "" "|PyMuPDF| itself does not try to determine the file type from the file " "contents. **You** are responsible for supplying the file type information" @@ -97,7 +97,7 @@ msgstr "" "パラメーターを通じて明示的にファイルタイプの情報を提供する責任があります。また、詳細な説明については :ref:`Document` " "の章を参照してください。" -#: ../../how-to-open-a-file.rst:55 ade379abea354b938901a31a9170b81d +#: ../../how-to-open-a-file.rst:55 01594b5d61fd4877bc9bbe0b8a5d8de8 msgid "" "If |PyMuPDF| encounters a file with an unknown / missing extension, it " "will try to open it as a |PDF|. So in these cases there is no need for " @@ -109,34 +109,34 @@ msgstr "" "は不明なファイルや拡張子のないファイルはPDFとして開きます。このため、これらの場合は追加の情報は必要ありません。同様に、メモリ上のドキュメントの場合は、`doc=pymupdf.open(stream=mem_area)`" " と指定するだけでPDFドキュメントとして開くことができます。" -#: ../../how-to-open-a-file.rst:57 0e6a53672ddc413192ab00e03d7e1f02 +#: ../../how-to-open-a-file.rst:57 213861827ccf4095a7e7ec7f44323741 msgid "" "If you attempt to open an unsupported file then |PyMuPDF| will throw a " "file data error." msgstr "サポートされていないファイルを開こうとした場合、PyMuPDFはファイルデータエラーをスローします。" -#: ../../how-to-open-a-file.rst:66 3d7344330a17461786c429099908ae4f +#: ../../how-to-open-a-file.rst:66 9408ee2e906e44feb3f19fde7131eee3 #, fuzzy msgid "Opening Remote Files" msgstr "ファイルを開く" -#: ../../how-to-open-a-file.rst:69 c00fbde0eead4bbc8c695aef57ff6222 +#: ../../how-to-open-a-file.rst:69 3c01cd03b6fd45c4bd767057e34ab038 msgid "" "For remote files on a server (i.e. non-local files), you will need to " "*stream* the file data to |PyMuPDF|." msgstr "" -#: ../../how-to-open-a-file.rst:71 f989297813a24c91a1f62a6cec117fd7 +#: ../../how-to-open-a-file.rst:71 b8988a2a5afc458592ac62ac241e9557 msgid "" "For example use the `requests " "`_ library as follows:" msgstr "" -#: ../../how-to-open-a-file.rst:84 f6a2ad2300144fe7a4ac46ad06b385ec +#: ../../how-to-open-a-file.rst:84 3afd63c1a9de47f2b54f07057b1bda6b msgid "Opening Files from Cloud Services" msgstr "" -#: ../../how-to-open-a-file.rst:86 e4a309b083dd41079127a98f13164f13 +#: ../../how-to-open-a-file.rst:86 cb885344d7a6494290518e5ac9e98541 msgid "" "For further examples which deal with files held on typical cloud services" " please see these `Cloud Interactions code snippets " @@ -144,11 +144,45 @@ msgid "" "interactions>`_." msgstr "" -#: ../../how-to-open-a-file.rst:95 579329a84c3e44609f34b54ee6f05d94 +#: ../../how-to-open-a-file.rst:94 1869089fe979430ba11b6a880eed5e13 +#, fuzzy +msgid "Opening Django Files" +msgstr "C# ファイルを開く" + +#: ../../how-to-open-a-file.rst:96 aee62dcd16f3444bbef1ae267e49fbb1 +msgid "" +"Django implements a `File Storage API " +"`_ to store " +"files. The default is the `FileSystemStorage " +"`_, but the `django-storages `_ library provides a number" +" of other storage backends." +msgstr "" + +#: ../../how-to-open-a-file.rst:98 dfc6c49ca4114ccc98d1b314f2891bd5 +msgid "" +"You can open the file, move the contents into memory, then pass the " +"contents to |PyMuPDF| as a stream." +msgstr "" + +#: ../../how-to-open-a-file.rst:113 9076a6c2f6f74a4fa882b9e2f66ab944 +msgid "Please note that if the file you open is large, you may run out of memory." +msgstr "" + +#: ../../how-to-open-a-file.rst:115 3d79799d3f0a497ba8648550cd0ab745 +msgid "" +"The File Storage API works well if you're using different storage " +"backends in different environments. If you're only using the " +"`FileSystemStorage`, you can simply use the `obj.file.name` to open the " +"file directly with |PyMuPDF| as shown in an earlier example." +msgstr "" + +#: ../../how-to-open-a-file.rst:123 85288abbd82c4edc9fb1dfee730d152d msgid "Opening Files as Text" msgstr "ファイルをテキストとして開く" -#: ../../how-to-open-a-file.rst:98 ad7c9c7973e4460197d2a893ce69a874 +#: ../../how-to-open-a-file.rst:126 6aa9839fd5d84413a0ce8f6e17824b60 msgid "" "|PyMuPDF| has the capability to open any plain text file as a document. " "In order to do this you should provide the `filetype` parameter for the " @@ -157,7 +191,7 @@ msgstr "" "|PyMuPDF| には、プレーン テキスト ファイルをドキュメントとして開く機能があります。 これを行うには、`pymupdf.open` " "関数の `filetype` パラメータを「txt」として指定する必要があります。" -#: ../../how-to-open-a-file.rst:105 7795059e827d49ceb6635695796163f1 +#: ../../how-to-open-a-file.rst:133 72d20b3c2e33457aacb836fbe07acbf0 msgid "" "In this way you are able to open a variety of file types and perform the " "typical **non-PDF** specific features like text searching, text " @@ -169,41 +203,37 @@ msgstr "" "に固有ではない一般的な機能を実行できます。 明らかに、txt コンテンツをレンダリングしたら、 |PDF| として保存したり、他の |PDF| " "ファイルと結合したりすることは問題ありません。" -#: ../../how-to-open-a-file.rst:109 02063bce85b54d24912efd14aa588c2a +#: ../../how-to-open-a-file.rst:137 9b981eb61d194ca0b2ef17f23500da44 msgid "Examples" msgstr "例" -#: ../../how-to-open-a-file.rst:113 ec04324cadf04ba6a66048352054a372 +#: ../../how-to-open-a-file.rst:141 3ac6d963ae5b402e94a3ad37e0fb12c9 msgid "Opening a `C#` file" msgstr "C# ファイルを開く" -#: ../../how-to-open-a-file.rst:122 8c74bd78aa9c4b8bac6165130e1745e5 +#: ../../how-to-open-a-file.rst:150 ff93dac3de6a4cb8bbb0076a69e1b632 msgid "Opening an ``XML`` file" msgstr "XML ファイルを開く" -#: ../../how-to-open-a-file.rst:130 280150242f3c4a128892d557a0dfa804 +#: ../../how-to-open-a-file.rst:158 72a973937e15458f9a0fc4e9ae43e9ea msgid "Opening a `JSON` file" msgstr "JSON ファイルを開く" -#: ../../how-to-open-a-file.rst:137 d417e97402044280b518fd9fb2c07337 +#: ../../how-to-open-a-file.rst:165 accacc140af14ec2998e5ca54b8909bb msgid "And so on!" msgstr "等々!" -#: ../../how-to-open-a-file.rst:139 541ec11b9a0e4adca731889451252b94 +#: ../../how-to-open-a-file.rst:167 b47b21b5806a489b9807e5cb979132f7 msgid "" -"As you can imagine many text based file formats can be *very simply " -"opened* and *interpreted* by |PyMuPDF|. This can make data analysis and " -"extraction for a wide range of previously unavailable files suddenly " -"possible." +"As you can imagine many text based file formats can be *very simply opened* and *interpreted* by |PyMuPDF|. This can make data analysis and extraction for a wide range of previously unavailable files possible." msgstr "" "ご想像のとおり、多くのテキスト ベースのファイル形式は、|PyMuPDF| によって非常に簡単に開いて解釈できます。 " "これにより、これまで利用できなかった広範囲のファイルのデータ分析と抽出が突然可能になります。" -#: ../../footer.rst:60 c1b2b8f11f1d45709966853696300e96 +#: ../../footer.rst:60 c565e48ba51e43cbb1e960403a67a689 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 63045bd2522645b08af805f3b9b46b6e -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/identity.mo b/docs/locales/ja/LC_MESSAGES/identity.mo index 62a147e8a..305af7a68 100644 Binary files a/docs/locales/ja/LC_MESSAGES/identity.mo and b/docs/locales/ja/LC_MESSAGES/identity.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/identity.po b/docs/locales/ja/LC_MESSAGES/identity.po index d4ce02671..a9e98e1c8 100644 --- a/docs/locales/ja/LC_MESSAGES/identity.po +++ b/docs/locales/ja/LC_MESSAGES/identity.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,53 +19,52 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 084b354fd5784dd1815de04be9df458e +#: ../../header.rst:-1 7b37ecd8dc3743a9a786f62dd0bec6f7 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 27591e70048e406085b09655058290e1 +#: ../../header.rst:-1 7dda5857ca604606b110ce5cddbf35fa msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 0b467d6fbf0d49f8a7da71e84cbd3128 +#: ../../header.rst:-1 024f5eebaeb24a6ea2775fd31cbf04c8 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../identity.rst:7 95e141ac758b4ddc9f3a15165333ef5f +#: ../../identity.rst:7 74c7b4d54f2f490aa6411228918d1102 msgid "Identity" msgstr "Identity (アイデンティティ)" -#: ../../identity.rst:9 815ee8c5b95a4bf0816968e37357ba17 +#: ../../identity.rst:9 9eea7980a3264df58d614219614f391d msgid "" "Identity is a :ref:`Matrix` that performs no action -- to be used " "whenever the syntax requires a matrix, but no actual transformation " "should take place. It has the form *pymupdf.Matrix(1, 0, 0, 1, 0, 0)*." msgstr "" "アイデンティティは、何もアクションを実行しない :ref:`Matrix` " -"で、構文がマトリックスを必要とするが実際の変換が必要ない場合に使用されます。それは *pymupdf.Matrix(1, 0, 0, 1, 0, " -"0)* の形をしています。" +"で、構文がマトリックスを必要とするが実際の変換が必要ない場合に使用されます。それは *pymupdf.Matrix(1, 0, 0, 1, 0," +" 0)* の形をしています。" -#: ../../identity.rst:11 d6287d614ee24decb741b84ab327cdc2 +#: ../../identity.rst:11 cf3f047b3bcd457781d6d1b0a6555a40 msgid "" "Identity is a constant, an \"immutable\" object. So, all of its matrix " "properties are read-only and its methods are disabled." msgstr "アイデンティティは、定数であり、変更できない「不変」のオブジェクトです。そのため、すべてのマトリックスのプロパティは読み取り専用であり、そのメソッドは無効になっています。" -#: ../../identity.rst:13 e052a394d9194ffba6c8d6b4c80c563f +#: ../../identity.rst:13 0eeb4dcb5f1f4643912b79cb1dc0929a msgid "" "If you need a **mutable** identity matrix as a starting point, use one of" " the following statements::" msgstr "**変更可能な** アイデンティティマトリックスが必要な場合、次の文のいずれかを使用してください::" -#: ../../footer.rst:71 1cf07d2f00d4492fafdf2bf9e71c00fe +#: ../../footer.rst:60 d7eead894067453da2f782c487c8f59e msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 a38610603c794318a556ed4791e00095 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/index.mo b/docs/locales/ja/LC_MESSAGES/index.mo index 2dfcb468a..536f1586d 100644 Binary files a/docs/locales/ja/LC_MESSAGES/index.mo and b/docs/locales/ja/LC_MESSAGES/index.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/index.po b/docs/locales/ja/LC_MESSAGES/index.po index c08c5d639..abb7611dc 100644 --- a/docs/locales/ja/LC_MESSAGES/index.po +++ b/docs/locales/ja/LC_MESSAGES/index.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.24.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-06 22:50+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -18,55 +18,55 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../index.rst:33 254b4ced6f9e4139ba51e7031b5b97ca +#: ../../index.rst:33 8fd6f740bd354549b09f02e29d6aeb9f msgid "About" msgstr "" -#: ../../index.rst:40 be03f57792ef471c8adbc955816335d3 +#: ../../index.rst:42 325ca6b150394307ad977ddc59e8199c msgid "User Guide" msgstr "ユーザーガイド" -#: ../../index.rst:52 049e220452894e95ba78d826add33ca5 +#: ../../index.rst:54 55f11e9ee1a448aaa422415824a72910 msgid "How to Guide" msgstr "使用方法ガイド" -#: ../../index.rst:59 a23de115013e4b9481fe8794b5095510 +#: ../../index.rst:61 382947f10dad49e09057aef86f6b7bdf msgid "API Reference" msgstr "APIリファレンス" -#: ../../index.rst:72 bc219103d8174148ad3af3db5dc52170 +#: ../../index.rst:74 cf7180ed975342a3ad0632f165b96c7b msgid "Other" msgstr "その他" -#: ../../header.rst:-1 16ac100c557f457e89fa6ad1246e7a6a +#: ../../header.rst:-1 17cdca8041b545be91c717e1482c6e92 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 12c89f6c9c4e4a03896ea3b73dee2659 +#: ../../header.rst:-1 929d834795de4b6c9c42aede9d848712 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 c601c4ee4cff4a78b54fb13904280e77 +#: ../../header.rst:-1 883d9811455e45eea8d6c2f3434cae01 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../index.rst:20 d037326dd41240c084d7d1385edfd86e +#: ../../index.rst:20 8cfb3ae729874f858ac4b9e18e20bf6a msgid "Welcome to |PyMuPDF|" msgstr "PyMuPDFへようこそ" -#: ../../index.rst:22 78df9fa6db184161a82c78d08ab9e966 +#: ../../index.rst:22 32ae9730ead142168b8b4abaaef4b7c3 msgid "" "|PyMuPDF| is a high-performance **Python** library for data extraction, " -"analysis, conversion & manipulation of **PDF** (and other) documents." +"analysis, conversion & manipulation of |PDF| (and other) documents." msgstr "" "|PyMuPDF| は、|PDF| (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な :title:`Python` " "ライブラリです。" -#: ../../index.rst:24 c09bdeb70ae34cea8e53f75a5677e930 +#: ../../index.rst:24 6a8830c4d9b54905a1ec1b90ebb54e90 msgid "" "|PyMuPDF| is hosted on `GitHub `_ and" " registered on `PyPI `_." @@ -74,15 +74,11 @@ msgstr "" "|PyMuPDF| は `GitHub `_ でホストされ、`PyPI" " `_ に登録されています。" -#: ../../footer.rst:60 ../../index.rst:29 2915833a994f45e3a0bd8fb39e2f15d3 -#: cfa9d7068e8747b68358db3fff7d72ad +#: ../../footer.rst:60 ../../index.rst:29 11945e0949f341ad9d1670429005389a +#: ec790aafb26941e99e919f9eba35a52e msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 7b4b36e36fac43a6b3475f65de27070e -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" @@ -102,17 +98,20 @@ msgstr "" #~ "`_ " #~ "には、さまざまな例、デモンストレーション、およびユースケースが含まれています。" -#~ msgid "Do you need **PDF** to **DOCX** conversion?" -#~ msgstr "**PDF** から **DOCX** への変換が必要ですか?" +#~ msgid "Do you need |PDF| to **DOCX** conversion?" +#~ msgstr "|PDF| から **DOCX** への変換が必要ですか?" #~ msgid "" #~ "We recommend the pdf2docx_ library which" -#~ " uses **PyMuPDF** and the **python-" +#~ " uses |PyMuPDF| and the **python-" #~ "docx** library to provide simple " -#~ "document conversion from **PDF** to " +#~ "document conversion from |PDF| to " #~ "**DOCX** format." #~ msgstr "" -#~ "**PyMuPDF** を使用する pdf2docx_ ライブラリと、**PDF** から" -#~ " **DOCX** 形式への簡単なドキュメント変換を提供する **python-docx**" -#~ " ライブラリをお勧めします。" +#~ "|PyMuPDF| を使用する pdf2docx_ ライブラリと、|PDF| から " +#~ "**DOCX** 形式への簡単なドキュメント変換を提供する **python-docx** " +#~ "ライブラリをお勧めします。" + +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/installation.mo b/docs/locales/ja/LC_MESSAGES/installation.mo index 60e7aa028..89e28f842 100644 Binary files a/docs/locales/ja/LC_MESSAGES/installation.mo and b/docs/locales/ja/LC_MESSAGES/installation.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/installation.po b/docs/locales/ja/LC_MESSAGES/installation.po index 3c86dbdc9..a51b93a0a 100644 --- a/docs/locales/ja/LC_MESSAGES/installation.po +++ b/docs/locales/ja/LC_MESSAGES/installation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,32 +19,32 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 a728ad5376f842cc89076964119ddc09 +#: ../../header.rst:-1 b59db7d5f84d47c8b229355014ba2ed2 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 4670fc24f43848a2b6e78f30318ebdea +#: ../../header.rst:-1 955a2dd45f5245208b28b50e40f044d6 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 7f2e7a1481c3477a9c043f09c2dd6084 +#: ../../header.rst:-1 e48fcbdec7f743c6a1327f95b397ca3a msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #: ../../installation.rst:6 ../../installation.rst:31 -#: 50bfc175da9f4c418ba6f5112e10de47 7957250599c44b67997bc23efc9fae97 +#: 10ecce5e3d604f4094c4c3044665cd6e 13c81322926f479eb81525503536d3d5 msgid "Installation" msgstr "インストール" -#: ../../installation.rst:9 59d6a555324447f1948f7089e9bc5979 +#: ../../installation.rst:9 43db83b2c9634becaa5ce17a7bc824b7 msgid "Requirements" msgstr "要件" -#: ../../installation.rst:11 7845e2e734674a2f8d2b615a86cb5ffa +#: ../../installation.rst:11 d16c4b4efee94685b3b883927404d895 msgid "" "All the examples below assume that you are running inside a Python " "virtual environment. See: https://docs.python.org/3/library/venv.html for" @@ -53,47 +53,47 @@ msgstr "" "以下のすべての例は、Pythonの仮想環境内で実行していると仮定しています。詳細については、https://docs.python.org/3/library/venv.html" " を参照してください。また、pipが最新であると仮定しています。" -#: ../../installation.rst:15 2a801d2de6be470c88b93cd266a34d82 +#: ../../installation.rst:15 1812a22b7b804b2c94a07ef59ee05dde msgid "For example:" msgstr "例えば:" -#: ../../installation.rst:17 8ccfb8b15a0149efbd2bfb39dc98614f +#: ../../installation.rst:17 e8b165a696864a488ad441c70ff54a53 msgid "Windows::" msgstr "" -#: ../../installation.rst:23 0b6bb8fe9f3d4c2dac89316b38ae81ca +#: ../../installation.rst:23 253af4ec1a814ab9aad6579d1c8f4499 msgid "Linux, MacOS::" msgstr "" -#: ../../installation.rst:33 9e7a8cd8cb8244169f18d0029804ba97 +#: ../../installation.rst:33 8b323123ef6d4d34a0892775e3cd63da msgid "PyMuPDF should be installed using pip with::" msgstr "PyMuPDFをインストールするには、次のようにpipを使用してください::" -#: ../../installation.rst:37 4296dc1d96654a0484ab0cd2d0875141 +#: ../../installation.rst:37 32b7323f61ea4e379cf7fbbfe4951d0b msgid "" "This will install from a Python wheel if one is available for your " "platform." msgstr "この方法でインストールすると、対象のプラットフォームに対応するPythonのwheelファイルがある場合は、それを使用してインストールされます。" -#: ../../installation.rst:41 41a58d75e0b446b9bc61c960c1fa0ea0 +#: ../../installation.rst:41 5d18bb1311c042e5b587f6976f4731dc msgid "Installation when a suitable wheel is not available" msgstr "適切なwheelファイルが利用できない場合のインストール方法" -#: ../../installation.rst:43 104286148cda4006b2cd0baf34837ed5 +#: ../../installation.rst:43 83b9093340b24fd4bef8c0351343e797 msgid "" "If a suitable Python wheel is not available, pip will automatically build" " from source using a Python sdist." msgstr "適切なPythonのwheelファイルが利用できない場合、pipは自動的にPythonのsdistからビルドします。" -#: ../../installation.rst:46 d69852aefaae48889e68d9cd11836ac4 +#: ../../installation.rst:46 1cf0140f438f450e81edd059e30668d1 msgid "**This requires C/C++ development tools to be installed**:" msgstr "**これにはC/C++の開発ツールがインストールされている必要があります:**" -#: ../../installation.rst:48 8708aa3b248140578e7be8b0e76002b7 +#: ../../installation.rst:48 ecbe8ba345644be7b2fb16b7b2e41d30 msgid "On Windows:" msgstr "Windowsの場合:" -#: ../../installation.rst:51 506bd9eadfac4f35b463e3687f19d6f7 +#: ../../installation.rst:51 7187b33c88b74933b24d8ecda3306b4f msgid "" "Install Visual Studio 2019. If not installed in a standard location, set " "environmental variable `PYMUPDF_SETUP_DEVENV` to the location of the " @@ -102,7 +102,7 @@ msgstr "" "Visual Studio 2019をインストールしてください。標準の場所にインストールされていない場合は、環境変数 " "`PYMUPDF_SETUP_DEVENV` を `devenv.com` バイナリの場所に設定してください" -#: ../../installation.rst:56 703824c26099400187416a2982fbc091 +#: ../../installation.rst:56 41e4356dfc9b43e2a8cfaa55e62d8395 msgid "" "Having other installed versions of Visual Studio, for example Visual " "Studio 2022, can cause problems because one can end up with MuPDF and " @@ -111,19 +111,19 @@ msgstr "" "他のバージョンのVisual Studio(例:Visual Studio " "2022)がインストールされている場合、異なるコンパイラバージョンでMuPDFとPyMuPDFのコードがコンパイルされる可能性があるため、問題が発生することがあります。" -#: ../../installation.rst:60 3394f592a46f4ed7897932eb2f63e6a0 +#: ../../installation.rst:60 92fb4e5280d84a54a52c756428fec37d msgid "The build will automatically download and build MuPDF." msgstr "自動的にMuPDFをダウンロードしてビルドします。" -#: ../../installation.rst:66 6f6f0843a17342b0a2c9e9aa74438824 +#: ../../installation.rst:66 1344d3d6541c47feb0f80d0fd9bf3f35 msgid "Problems after installation" msgstr "インストール後の問題" -#: ../../installation.rst:68 c2d6d32e5ed04001aec3929fc67ceac0 +#: ../../installation.rst:68 4ab4504c5d624b54b761ca80ddb1c621 msgid "On Windows, Python error::" msgstr "" -#: ../../installation.rst:72 27ba6fa413de4c68a7e90a3beb7093a2 +#: ../../installation.rst:72 5444687575794dceb7d1d7ae7d7ad613 msgid "" "This has been occasionally seen if `MSVCP140.dll` is missing, and appears" " to be caused by a bug in some versions (2015-2017) of `Microsoft Visual " @@ -132,7 +132,7 @@ msgstr "" "これは、`MSVCP140.dll` が見つからない場合に時折発生し、`Microsoft Visual C++` " "再頒布可能パッケージの一部のバージョン (2015 ~ 2017) のバグが原因であると思われます。" -#: ../../installation.rst:76 abb6c552057d4fc88bb278a9fa7936d2 +#: ../../installation.rst:76 78be3210ec2e423c8452a91b6fbf9e43 msgid "" "It is recommended to search for `MSVCP140.dll` in https://msdn.com to " "find instructions for how to reinstall it. For example " @@ -143,22 +143,22 @@ msgstr "" "たとえば、https://learn.microsoft.com/cpp/windows/latest-supported-vc-redist " "には、サポートされている最新バージョンへのパーマリンクがあります。" -#: ../../installation.rst:81 116c1a7dc53a4abbbfce5e590608299a +#: ../../installation.rst:81 95e507ac1f5748f6b6dbb48f06cff7ce msgid "See https://github.com/pymupdf/PyMuPDF/issues/2678 for more details." msgstr "詳細については、https://github.com/pymupdf/PyMuPDF/issues/2678 を参照してください。" -#: ../../installation.rst:84 d2d62b7597714bac93ad5b80cfa20d3f +#: ../../installation.rst:84 fc23d812f3e44692a7e71e90321f2ebb msgid "Python error::" msgstr "" -#: ../../installation.rst:88 545ef56f6ef74e09931ae5063b12415b +#: ../../installation.rst:88 ff01b653c1044cad9f0fc405a1bb0bc5 msgid "" "This can happen if PyMuPDF's legacy name `fitz` is used (for example " "`import fitz` instead of `import pymupdf`), and an unrelated Python " "package called `fitz` (https://pypi.org/project/fitz/) is installed." msgstr "" -#: ../../installation.rst:92 9243b45e6f6c4864a8a3e1a0c37f2491 +#: ../../installation.rst:92 7d8a14f94dfe4773a0a51c660d9a8aa8 msgid "" "The fitz package appears to be no longer maintained (the latest release " "is from 2017), but unfortunately it does not seem possible to remove it " @@ -166,50 +166,89 @@ msgid "" "use of PyMuPDF's legacy name." msgstr "" -#: ../../installation.rst:97 35d6d0da88af44d8b218090938e91943 +#: ../../installation.rst:97 5297fdbcbc3e46bcbf9e88ad36514822 msgid "There are a few ways to avoid this problem:" msgstr "" -#: ../../installation.rst:100 cb8d2deeef3042b8a6ee2add15a2fa05 +#: ../../installation.rst:100 0917d781ad454f108298fcb24e19b90d msgid "" "Use `import pymupdf` instead of `import fitz`, and update one's code to " "match." msgstr "" -#: ../../installation.rst:103 7210736f638f4e1fbef88b8ebe6a0a09 +#: ../../installation.rst:103 38fbb111d3054c05b0892cd6e6fdd636 msgid "Or uninstall the `fitz` package and reinstall PyMuPDF::" msgstr "" -#: ../../installation.rst:108 963ff7fbec804d759827f72c752ae007 +#: ../../installation.rst:108 dbff07acdcfc41999d93bb0e99c06e87 msgid "Or use `import pymupdf as fitz`. However this has not been well tested." msgstr "" -#: ../../installation.rst:110 aeeb5e2b61d64e3b8cb5f5ebd45948ba +#: ../../installation.rst:110 661b1ce5caf94b3d8fd04b933406322f msgid "With Jupyter labs on Apple Silicon (arm64), Python error::" msgstr "" -#: ../../installation.rst:114 ae6e1805472e45679a74fe8126f2cbfd +#: ../../installation.rst:114 0d8b0986a4bb4cc086da20efc59c10a8 msgid "" "This appears to be a problem in Jupyter labs; see: " "https://github.com/pymupdf/PyMuPDF/issues/3643#issuecomment-2210588778." msgstr "" -#: ../../installation.rst:119 f9d091011d9c405c8ab79c8cf22baa54 +#: ../../installation.rst:119 14b8fa60c27b415fa3903bed226f01ae msgid "Notes" msgstr "メモ" -#: ../../installation.rst:121 7475c606d4834685acb36091fa4c545b +#: ../../installation.rst:122 5e962f055eb14733bdf1a5017acc3a83 +msgid "Wheels are available for the following platforms:" +msgstr "" + +#: ../../installation.rst:124 79d92638413a4dd38cfd1b8b99c0b4f3 +msgid "Windows 32-bit Intel." +msgstr "" + +#: ../../installation.rst:125 26892ff8170348cc8d0c14e089b19911 +msgid "Windows 64-bit Intel." +msgstr "" + +#: ../../installation.rst:126 bd7d6dc2edb44fe4bedb0a0b0c3a3dc6 +msgid "Linux 64-bit Intel." +msgstr "" + +#: ../../installation.rst:127 884c93dbdd11469d849e7a0f3e941dc3 +msgid "Linux 64-bit ARM." +msgstr "" + +#: ../../installation.rst:128 1072e27fd780438f942d5c1c319492f8 +msgid "MacOS 64-bit Intel." +msgstr "" + +#: ../../installation.rst:129 1a4c740f475b4ca7abfd942fd5aebfee +msgid "MacOS 64-bit ARM." +msgstr "" + +#: ../../installation.rst:131 20443bfba24a4ca7b1405847491fcd38 +msgid "Details:" +msgstr "" + +#: ../../installation.rst:133 8bede23066fa4d429c8a60e2836f5977 +msgid "We release a single wheel for each of the above platforms." +msgstr "" + +#: ../../installation.rst:136 f5b5390ada074e1ab5aa23deb5079b26 msgid "" -"Wheels are available for Windows (32-bit Intel, 64-bit Intel), Linux " -"(64-bit Intel, 64-bit ARM) and Mac OSX (64-bit Intel, 64-bit ARM), for " -"Python versions marked as \"Supported\" on " -"https://devguide.python.org/versions/." +"Each wheel uses the Python Stable ABI of the current oldest supported " +"Python version (currently 3.9), and so works with all later Python " +"versions, including new Python releases." msgstr "" -"ホイールは、Windows向けには(32ビットIntel、64ビットIntel)、Linux向けには(64ビットIntel、64ビットARM)、およびMac" -" OSX向けには(64ビットIntel、64ビットARM)提供されています。 " -"Pythonのバージョンは、「https://devguide.python.org/versions/」で「サポートされている」とマークされています。" -#: ../../installation.rst:124 9097f4edbba842c097e0bfd97eaab67a +#: ../../installation.rst:141 6a3ea97e63974d5d87b3990a8fa154cf +msgid "" +"Wheels are tested on all Python versions currently marked as " +"\"Supported\" on https://devguide.python.org/versions/, currently 3.9, " +"3.10, 3.11, 3.12 and 3.13." +msgstr "" + +#: ../../installation.rst:146 3b5b7382bc8a459aad6dad16cedaa022 msgid "" "Wheels are not available for Python installed with `Chocolatey " "`_ on Windows. Instead install Python using the " @@ -219,7 +258,7 @@ msgstr "" "`Chocolatey `_ " "を使用してWindowsにインストールされたPythonには、ホイールが利用できません。代わりに、python.orgのウェブサイトからWindowsインストーラーを使用してPythonをインストールしてください。詳細は、以下を参照してください:http://www.python.org/downloads" -#: ../../installation.rst:130 79e46573340d42f7bad8449f808c1d68 +#: ../../installation.rst:152 2bb4e3e0f87e47ac9bf01500578038d7 msgid "" "Wheels are not available for Linux-aarch64 with `Musl libc " "`_ (For example `Alpine Linux " @@ -227,33 +266,13 @@ msgid "" "known to fail." msgstr "" -#: ../../installation.rst:135 8135314072fb49ef9e8ab308d125891c -msgid "" -"PyMuPDF does not support Python versions prior to 3.8. Older wheels can " -"be found in `this `_ repository and on `PyPI " -"`_." -msgstr "" - -#: ../../installation.rst:137 f8fd0c1ddd5a44b6a3db81c9a8725108 -#, fuzzy -msgid "" -"Please note that we generally follow the official Python release " -"schedules. For Python versions dropping out of official support this " -"means, that generation of wheels will also be ceased for them." -msgstr "" -"PyMuPDFはPythonバージョン3.8以前をサポートしていません。古いバージョンのホイールは、`この " -"`_ リポジトリや `PyPI `_ " -"でも見つけることができます" - -#: ../../installation.rst:139 8c71043102aa4164abb283dfc5a76d08 +#: ../../installation.rst:157 93856a91296c4d988b37ebe44f7d9805 msgid "" "There are no **mandatory** external dependencies. However, some optional " "feature are available only if additional components are installed:" msgstr "必須の外部依存関係はありません。ただし、追加のコンポーネントをインストールした場合にのみ、一部のオプション機能が利用可能です:" -#: ../../installation.rst:141 67ee91023dea47fdb289d4f39d63a793 +#: ../../installation.rst:159 81a65c58f6874348aeecefef70590ecb msgid "" "`Pillow `_ is required for " ":meth:`Pixmap.pil_save` and :meth:`Pixmap.pil_tobytes`." @@ -261,7 +280,7 @@ msgstr "" "`Pillow `_ は :meth:`Pixmap.pil_save` と " ":meth:`Pixmap.pil_tobytes` の実行に必要です。" -#: ../../installation.rst:142 32b4193c65e44ca785e19967683ae79c +#: ../../installation.rst:160 1489ed99644246fbb42612a9492e9d12 msgid "" "`fontTools `_ is required for " ":meth:`Document.subset_fonts`." @@ -269,7 +288,7 @@ msgstr "" "`fontTools `_ は " ":meth:`Document.subset_fonts` の実行に必要です。" -#: ../../installation.rst:143 2a45f7d276e145f3b5ec9871f1365623 +#: ../../installation.rst:161 3b2bdfbe19b04065b98e04b6419e1cfd msgid "" "`pymupdf-fonts `_ is a " "collection of nice fonts to be used for text output methods." @@ -277,52 +296,47 @@ msgstr "" "`pymupdf-fonts `_ " "は、テキスト出力の方法に使用するための素敵なフォントのコレクションです。" -#: ../../installation.rst:144 121cfc4a57654a6ea704ea1344b380f2 +#: ../../installation.rst:163 d7ec430eb8944a64a6e205e182dd89f9 msgid "" "`Tesseract-OCR `_ for optical" " character recognition in images and document pages. Tesseract is " "separate software, not a Python package. To enable OCR functions in " -"PyMuPDF, the software must be installed and the system environment " -"variable `\"TESSDATA_PREFIX\"` must be defined and contain the `tessdata`" -" folder name of the Tesseract installation location. See below." +"PyMuPDF, Tesseract must be installed and the `tessdata` folder name " +"specified; see below." msgstr "" -"`Tesseract-OCR `_ " -"は、画像やドキュメントページの光学文字認識(OCR)のためのソフトウェアです。TesseractはPythonのパッケージではなく、独立したソフトウェアです。PyMuPDFでOCR機能を有効にするには、Tesseractソフトウェアをインストールし、システム環境変数の" -" `\"TESSDATA_PREFIX\"` を定義して、Tesseractのインストール場所にある `tessdata` " -"フォルダの名前を含める必要があります。以下を参照してください。" -#: ../../installation.rst:146 e68b3dd01f6e4150bf86c406f2b97b12 +#: ../../installation.rst:169 4ae790b6169748d3b44a6801bf8a90ed msgid "" "You can install these additional components at any time -- before or " "after installing PyMuPDF. PyMuPDF will detect their presence during " "import or when the respective functions are being used." msgstr "これらの追加コンポーネントはいつでもインストールできます。PyMuPDFのインストール前または後に行うことができます。PyMuPDFは、これらのコンポーネントがインポート時または対応する機能が使用される際に検出します。" -#: ../../installation.rst:150 04301bc8d306403db6104320fc3dad4a +#: ../../installation.rst:173 9fdf6184383b4d6d8b6b4b59c3afddfa msgid "Build and install from a local PyMuPDF source tree" msgstr "ローカルのPyMuPDFソースツリーからビルドしてインストールします" -#: ../../installation.rst:152 a7857b7d2793441f9631d127e1020585 +#: ../../installation.rst:175 1ea99480f4f146e289e0b8e6c48cca01 msgid "Initial setup:" msgstr "初期設定:" -#: ../../installation.rst:154 eee8ef61e2a041e59ea37ab50a4bc594 +#: ../../installation.rst:177 68820b466a3c4c549681be9491e430fc msgid "Install C/C++ development tools as described above." msgstr "上記に記載されているように、C/C++の開発ツールをインストールしてください。" -#: ../../installation.rst:155 cdb663a7a5b54d33bf9b4319daa3e830 +#: ../../installation.rst:178 f1e1b7f608dc4082a25cb93c32a542b8 msgid "Enter a Python venv and update pip, as described above." msgstr "上記に記載されているように、Pythonのvenvに入り、pipをアップデートしてください。" -#: ../../installation.rst:157 93a607bb3fbc42158fc46918010efd7b +#: ../../installation.rst:180 d78e70a460ae488db96b4a6bc800d5d0 msgid "Get a PyMuPDF source tree:" msgstr "PyMuPDFのソースツリーを取得します:" -#: ../../installation.rst:159 d923a2949cfe47cb97a70838b33dbd00 +#: ../../installation.rst:182 5ab65829b8614644bad26016029c1917 msgid "Clone the PyMuPDF git repository::" msgstr "PyMuPDFのGitリポジトリをクローンしてください::" -#: ../../installation.rst:164 821564459e924ea1ac2fc4079a16ee09 +#: ../../installation.rst:187 1d0f0130f8534853ab24f51fbac5e978 msgid "" "Or download and extract a `.zip` or `.tar.gz` source release from " "https://github.com/pymupdf/PyMuPDF/releases." @@ -330,29 +344,29 @@ msgstr "" "または、https://github.com/pymupdf/PyMuPDF/releases から `.zip` または `.tar.gz` " "形式のソースリリースをダウンロードして展開してください。" -#: ../../installation.rst:167 1ddb0e7c02504f03b1d2a0baa7fdb26c +#: ../../installation.rst:190 d54fc4c996a94b29962dad5a0fc82cf7 msgid "Then one can build PyMuPDF in two ways:" msgstr "PyMuPDFを2つの方法でビルドできます:" -#: ../../installation.rst:169 9d8e922078314b03a369cb07a0079a0e +#: ../../installation.rst:192 2f9d95d7b59e45a8aafa871e89e2af4c msgid "Build and install PyMuPDF with default MuPDF version::" msgstr "デフォルトのMuPDFバージョンでPyMuPDFをビルドしてインストール::" -#: ../../installation.rst:173 9869eaa8abd54087a274292fbf6f0afa +#: ../../installation.rst:196 b4301c0b7cd247f6b5bf24a2567dd96b msgid "" "This will automatically download a specific hard-coded MuPDF source " "release, and build it into PyMuPDF." msgstr "これにより、特定のハードコードされたMuPDFソースリリースが自動的にダウンロードされ、PyMuPDFにビルドされます。" -#: ../../installation.rst:176 bcac2485f96c4b01b464490707acf61d +#: ../../installation.rst:199 a7dee54170fa4de89633986b2cc0a9b8 msgid "Or build and install PyMuPDF using a local MuPDF source tree:" msgstr "または、ローカルのMuPDFソースツリーを使用してPyMuPDFをビルドしてインストールします:" -#: ../../installation.rst:178 1297ca26ce6847459acf9fa12ed0a3cb +#: ../../installation.rst:201 a1bd9faae40c487db3a4f51a5b4c06ed msgid "Clone the MuPDF git repository::" msgstr "MuPDFのGitリポジトリをクローンします:" -#: ../../installation.rst:183 b6427d38d7234c1aa26e3de98de02eb7 +#: ../../installation.rst:206 7967535d801e4f859065dd78ad496b28 msgid "" "Build PyMuPDF, specifying the location of the local MuPDF tree with the " "environmental variables `PYMUPDF_SETUP_MUPDF_BUILD`::" @@ -360,13 +374,13 @@ msgstr "" "環境変数 `PYMUPDF_SETUP_MUPDF_BUILD` を使用して、ローカルな MuPDF ツリーの場所を指定して PyMuPDF " "をビルドします::" -#: ../../installation.rst:188 422694e0539c4a4990c63d20a2840851 +#: ../../installation.rst:211 b70fd263b0b64ab89388c949058fa42d msgid "" "Also, one can build for different Python versions in the same PyMuPDF " "tree:" msgstr "同じPyMuPDFツリー内で異なるPythonバージョン用にビルドする方法:" -#: ../../installation.rst:191 cefb191530f6497eac9dbdebc369f28b +#: ../../installation.rst:214 a0919843b0a348b1876bb79c3a9ff4b6 msgid "" "PyMuPDF will build for the version of Python that is being used to run " "`pip`. To run `pip` with a specific Python version, use `python -m pip` " @@ -375,29 +389,29 @@ msgstr "" "PyMuPDF は、`pip` を実行する Python のバージョンに対応してビルドされます。特定の Python バージョンで pip " "を実行するには、`pip` の代わりに `python -m pip` を使用してください。" -#: ../../installation.rst:195 9a44714ef2ad432185e515b83f59934f +#: ../../installation.rst:218 5a970fc8f8364fe381c626f8b6ed3928 msgid "So for example on Windows one can build different versions with::" msgstr "したがって、Windows 上で異なるバージョンをビルドする場合、次のようにできます::" -#: ../../installation.rst:199 a9e56797c5744459871e3a20c6c25a06 +#: ../../installation.rst:222 40ea390c252347b0b1b5a0200f0763fe msgid "or::" msgstr "または::" -#: ../../installation.rst:205 391af6f9127f4a309547418d02c27781 +#: ../../installation.rst:228 029df4cf902045f5961e4158c5775bb4 msgid "Running tests" msgstr "テストの実行" -#: ../../installation.rst:207 32a8fb5301bb4d65bb1dacb0ada5b456 +#: ../../installation.rst:230 641936ae8e864e2f9b5528828336f690 msgid "" "Having a PyMuPDF tree available allows one to run PyMuPDF's `pytest` test" " suite::" msgstr "PyMuPDFのディレクトリが利用可能な場合、PyMuPDFの `pytest` テストスイートを実行できます。::" -#: ../../installation.rst:216 85be27d56d32436997193bf3fecd087d +#: ../../installation.rst:239 8b60a917fe4047f087c4190317553172 msgid "Notes about using a non-default MuPDF" msgstr "非デフォルトのMuPDFを使用する際の注意事項" -#: ../../installation.rst:218 e5e794cd7e044a4d9c195a94a32cd3d3 +#: ../../installation.rst:241 197189c327fe410985b5abda09791b45 msgid "" "Using a non-default build of MuPDF by setting environmental variable " "`PYMUPDF_SETUP_MUPDF_BUILD` can cause various things to go wrong and so " @@ -406,21 +420,21 @@ msgstr "" "環境変数 `PYMUPDF_SETUP_MUPDF_BUILD` " "を設定して非デフォルトのMuPDFビルドを使用すると、さまざまな問題が発生する可能性があるため、一般的にはサポートされていません。" -#: ../../installation.rst:222 74498c3e5025456794bbd9d73bf55104 +#: ../../installation.rst:245 7882cccdbce54b4f95ffa6da76aae58d msgid "" "If MuPDF's major version number differs from what PyMuPDF uses by " "default, PyMuPDF can fail to build, because MuPDF's API can change " "between major versions." msgstr "もしMuPDFのメジャーバージョン番号がPyMuPDFがデフォルトで使用するものと異なる場合、PyMuPDFはビルドに失敗する可能性があります。なぜなら、MuPDFのAPIはメジャーバージョン間で変更されることがあるからです。" -#: ../../installation.rst:226 6dfb1c88d8da4325b677be4aec28faef +#: ../../installation.rst:249 4f022dd28f75444fa6f007cebef7c47b msgid "" "Runtime behaviour of PyMuPDF can change because MuPDF's runtime behaviour" " changes between different minor releases. This can also break some " "PyMuPDF tests." msgstr "PyMuPDFのランタイム動作は、異なるマイナーリリース間でMuPDFのランタイム動作が変更されるため、変わる可能性があります。これは一部のPyMuPDFのテストにも影響を及ぼすことがあります。" -#: ../../installation.rst:230 41b376e1b6c245ef97ed1437d9e53558 +#: ../../installation.rst:253 94975cba2181444f9685efe3c40f3930 msgid "" "If MuPDF was built with its default config instead of PyMuPDF's " "customised config (for example if MuPDF is a system install), it is " @@ -432,27 +446,27 @@ msgstr "" " が失敗する可能性があります。この特定のテストをスキップするには、`pytest` コマンドラインに `-k 'not " "test_textbox3'` を追加してください。" -#: ../../installation.rst:238 a377a8ca67ad43e883adf791695f3bb4 +#: ../../installation.rst:261 4cb02fc7dc3d4436a352d9dee177f2f5 msgid "Packaging" msgstr "パッケージング" -#: ../../installation.rst:240 50a33136fd73432d89e88fc68c69f963 +#: ../../installation.rst:263 7b00d1839b53423885d4bec0de2dc3b3 msgid "See :doc:`packaging`." msgstr ":doc:`packaging` を参照してください。" -#: ../../installation.rst:244 43df9f135765408eb24480cd8f66266f +#: ../../installation.rst:267 831fbebbe6b54e5fa6d74ba85df46ea3 msgid "Using with Pyodide" msgstr "Pyodideとの使用" -#: ../../installation.rst:246 838a8b5d17e24831bb4fccb8bca07803 +#: ../../installation.rst:269 c872ea949efa4dd4904134944412752d msgid "See :doc:`pyodide`." msgstr ":doc:`pyodide` を参照してください。" -#: ../../installation.rst:250 e12b2e61b1ff4bb68f0e18a9b4630bc0 +#: ../../installation.rst:275 1c0e891064cd44158680e97c13a553e6 msgid "Enabling Integrated OCR Support" msgstr "統合OCRサポートの有効化" -#: ../../installation.rst:252 01149c6612cd44dfb566988f512d7ade +#: ../../installation.rst:277 3526ef6db615496a94dbc16a01f72904 msgid "" "If you do not intend to use this feature, skip this step. Otherwise, it " "is required for both installation paths: **from wheels and from " @@ -461,7 +475,7 @@ msgstr "" "もしこの機能を使用しない場合は、このステップをスキップしてください。それ以外の場合は、**ホイールからのインストールとソースからのインストールの両方**" " に必要です。" -#: ../../installation.rst:254 f7c7e7f240b841a082646c09dccfef96 +#: ../../installation.rst:279 1358ceda8fcd404ea6d8c85bed9660d3 msgid "" "PyMuPDF will already contain all the logic to support OCR functions. But " "it additionally does need `Tesseract’s language support data " @@ -470,44 +484,62 @@ msgstr "" "PyMuPDFにはすでにOCR機能をサポートするためのロジックが含まれていますが、追加でTesseractの言語サポートデータが必要です。そのため" "、Tesseract-OCRのインストールが依然として必要です。" -#: ../../installation.rst:256 d59ad7117b584b6cb83e6d01f9ac766d +#: ../../installation.rst:281 ae308d2b2c67412c8821f5e6d1a32d86 +msgid "" +"If not specified explicitly, PyMuPDF will attempt to find the installed " +"Tesseract's tessdata, but this should probably not be relied upon." +msgstr "" + +#: ../../installation.rst:284 f80baa9303224bc195ba426b51082bd2 msgid "" -"The language support folder location must be communicated either via " -"storing it in the environment variable `\"TESSDATA_PREFIX\"`, or as a " -"parameter in the applicable functions." +"Otherwise PyMuPDF requires that Tesseract's language support folder is " +"specified explicitly either in PyMuPDF OCR functions' `tessdata` " +"arguments or `os.environ[\"TESSDATA_PREFIX\"]`." msgstr "" -"言語サポートフォルダの場所は、`\"TESSDATA_PREFIX\"` " -"という環境変数に保存するか、適用される関数のパラメータとして指定する必要があります。" -#: ../../installation.rst:258 1e71c4d0d67a47e9a12e3fcabb97c3d7 +#: ../../installation.rst:288 aff176ef01a147eeaa0bb2c600b29fb4 msgid "So for a working OCR functionality, make sure to complete this checklist:" msgstr "OCR機能を正常に動作させるために、以下のチェックリストを完了してください:" -#: ../../installation.rst:262 49653813b1a447628f9794e7b3815e6e +#: ../../installation.rst:290 298961af9b3d4572b5bb579888f8916c msgid "" "Locate Tesseract's language support folder. Typically you will find it " "here:" msgstr "Tesseractの言語サポートフォルダを見つけてください。通常、以下の場所にあります:" -#: ../../installation.rst:261 3bc48ad3c65348d9b7dc1ed780ee2d3a +#: ../../installation.rst:292 17fdd80644b24caf8e45489d9a309fda msgid "Windows: `C:/Program Files/Tesseract-OCR/tessdata`" msgstr "" -#: ../../installation.rst:262 ec1f843bce3c4e4789916a4ca3af9fb1 +#: ../../installation.rst:293 b5dcf574f00046a8ad422aab01ba29e1 msgid "Unix systems: `/usr/share/tesseract-ocr/4.00/tessdata`" msgstr "Unixシステム: `/usr/share/tesseract-ocr/4.00/tessdata`" -#: ../../installation.rst:266 d18743dfacac4b8582f1ced48a8d10ad -msgid "Set the environment variable `TESSDATA_PREFIX`" -msgstr "環境変数 `TESSDATA_PREFIX` を設定してください:" +#: ../../installation.rst:295 fbe2af3a0f8041a299431922b9ad8ab4 +msgid "Specify the language support folder when calling PyMuPDF OCR functions:" +msgstr "" + +#: ../../installation.rst:297 cd354ffc94e643f7af1f995772fd15af +msgid "Set the `tessdata` argument." +msgstr "" + +#: ../../installation.rst:298 849aa0e0a81146518cda40c778d669ef +msgid "Or set `os.environ[\"TESSDATA_PREFIX\"]` from within Python." +msgstr "" + +#: ../../installation.rst:299 9dbe5b6d696d4d3b9dc00d2450842aaa +msgid "" +"Or set environment variable `TESSDATA_PREFIX` before running Python, for " +"example:" +msgstr "" -#: ../../installation.rst:265 6f294e53c3f44e7481eeeeed18fdeb43 +#: ../../installation.rst:301 10d43e1320984012880cb8e99b362def msgid "" "Windows: `setx TESSDATA_PREFIX \"C:/Program Files/Tesseract-" "OCR/tessdata\"`" msgstr "" -#: ../../installation.rst:266 edbccfa10aa34a6e9ac7c1147121df37 +#: ../../installation.rst:302 31425f5c30314211b091636098821618 msgid "" "Unix systems: `declare -x TESSDATA_PREFIX=/usr/share/tesseract-" "ocr/4.00/tessdata`" @@ -515,22 +547,10 @@ msgstr "" "Unixシステム: `declare -x TESSDATA_PREFIX=/usr/share/tesseract-" "ocr/4.00/tessdata`" -#: ../../installation.rst:268 08f9fb76602a407d93de1706e4632984 -msgid "" -"On Windows systems, this must happen outside Python -- before starting " -"your script. Just manipulating `os.environ` will not work!" -msgstr "" -"Windowsシステムでは、これはPythonの外部で行われる必要があります。スクリプトを実行する前に行ってください。`os.environ` " -"を操作するだけではうまく動作しません!" - -#: ../../footer.rst:60 7dd0f1362a07487dac9f78ca119ff6e0 +#: ../../footer.rst:60 6714ab4300af4cc182e033502436af86 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 c868e75493954a02997285f8241bdc5a -msgid "Discord logo" -msgstr "" - #~ msgid "" #~ "On Unix-style systems such as " #~ "Linux, OpenBSD and FreeBSD, use the " @@ -658,3 +678,81 @@ msgstr "" #~ msgid "On Windows `ImportError: DLL load failed while importing _fitz`." #~ msgstr "Windowsの場合: `ImportError: DLL load failed while importing _fitz`." +#~ msgid "" +#~ "Wheels are available for Windows (32-bit" +#~ " Intel, 64-bit Intel), Linux (64-bit " +#~ "Intel, 64-bit ARM) and Mac OSX " +#~ "(64-bit Intel, 64-bit ARM), for Python" +#~ " versions marked as \"Supported\" on " +#~ "https://devguide.python.org/versions/." +#~ msgstr "" +#~ "ホイールは、Windows向けには(32ビットIntel、64ビットIntel)、Linux向けには(64ビットIntel、64ビットARM)、およびMac" +#~ " OSX向けには(64ビットIntel、64ビットARM)提供されています。 " +#~ "Pythonのバージョンは、「https://devguide.python.org/versions/」で「サポートされている」とマークされています。" + +#~ msgid "" +#~ "PyMuPDF does not support Python versions" +#~ " prior to 3.8. Older wheels can " +#~ "be found in `this `_ repository and on `PyPI " +#~ "`_." +#~ msgstr "" + +#~ msgid "" +#~ "Please note that we generally follow " +#~ "the official Python release schedules. " +#~ "For Python versions dropping out of " +#~ "official support this means, that " +#~ "generation of wheels will also be " +#~ "ceased for them." +#~ msgstr "" +#~ "PyMuPDFはPythonバージョン3.8以前をサポートしていません。古いバージョンのホイールは、`この " +#~ "`_ リポジトリや " +#~ "`PyPI `_ でも見つけることができます" + +#~ msgid "" +#~ "`Tesseract-OCR `_ for optical character " +#~ "recognition in images and document " +#~ "pages. Tesseract is separate software, " +#~ "not a Python package. To enable " +#~ "OCR functions in PyMuPDF, the software" +#~ " must be installed and the system " +#~ "environment variable `\"TESSDATA_PREFIX\"` must " +#~ "be defined and contain the `tessdata`" +#~ " folder name of the Tesseract " +#~ "installation location. See below." +#~ msgstr "" +#~ "`Tesseract-OCR `_ " +#~ "は、画像やドキュメントページの光学文字認識(OCR)のためのソフトウェアです。TesseractはPythonのパッケージではなく、独立したソフトウェアです。PyMuPDFでOCR機能を有効にするには、Tesseractソフトウェアをインストールし、システム環境変数の" +#~ " `\"TESSDATA_PREFIX\"` を定義して、Tesseractのインストール場所にある " +#~ "`tessdata` フォルダの名前を含める必要があります。以下を参照してください。" + +#~ msgid "" +#~ "The language support folder location " +#~ "must be communicated either via storing" +#~ " it in the environment variable " +#~ "`\"TESSDATA_PREFIX\"`, or as a parameter " +#~ "in the applicable functions." +#~ msgstr "" +#~ "言語サポートフォルダの場所は、`\"TESSDATA_PREFIX\"` " +#~ "という環境変数に保存するか、適用される関数のパラメータとして指定する必要があります。" + +#~ msgid "Set the environment variable `TESSDATA_PREFIX`" +#~ msgstr "環境変数 `TESSDATA_PREFIX` を設定してください:" + +#~ msgid "" +#~ "On Windows systems, this must happen " +#~ "outside Python -- before starting your" +#~ " script. Just manipulating `os.environ` " +#~ "will not work!" +#~ msgstr "" +#~ "Windowsシステムでは、これはPythonの外部で行われる必要があります。スクリプトを実行する前に行ってください。`os.environ`" +#~ " を操作するだけではうまく動作しません!" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/intro.po b/docs/locales/ja/LC_MESSAGES/intro.po index 1aead1fa5..19701c729 100644 --- a/docs/locales/ja/LC_MESSAGES/intro.po +++ b/docs/locales/ja/LC_MESSAGES/intro.po @@ -41,7 +41,7 @@ msgstr "" #: ../../intro.rst:15 12aec34e36c34e14a32ebeecf2c16431 msgid "" -"**PyMuPDF** is a Python binding for `MuPDF `_ --" +"|PyMuPDF| is a Python binding for `MuPDF `_ --" " a lightweight PDF, XPS, and E-book viewer, renderer, and toolkit, which" " is maintained and developed by Artifex Software, Inc" msgstr "" @@ -186,9 +186,9 @@ msgstr "" #: ../../version.rst:5 d0267645ce504840843677d4a3060147 msgid "" -"The major and minor versions of **PyMuPDF** and **MuPDF** will always be " +"The major and minor versions of |PyMuPDF| and |MuPDF| will always be " "the same. Only the third qualifier (patch level) may deviate from that of" -" **MuPDF**." +" |MuPDF|." msgstr "" #: ../../version.rst:7 f26be46a33a04d54965c32772883e3ab diff --git a/docs/locales/ja/LC_MESSAGES/irect.mo b/docs/locales/ja/LC_MESSAGES/irect.mo index 5e2b1839f..47e876fcc 100644 Binary files a/docs/locales/ja/LC_MESSAGES/irect.mo and b/docs/locales/ja/LC_MESSAGES/irect.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/irect.po b/docs/locales/ja/LC_MESSAGES/irect.po index a8d62c2c9..10efe4d16 100644 --- a/docs/locales/ja/LC_MESSAGES/irect.po +++ b/docs/locales/ja/LC_MESSAGES/irect.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 cdda64e68826481db3e9e4ea2983c084 +#: ../../header.rst:-1 9da9a1f0d8ad4810a00d9c3ffb986077 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 198475a28c464661bba55804be55f09f +#: ../../header.rst:-1 c119c5ee601a454eb3d762c5116445d1 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 e69fe25b476b4e01b087f5e51371d686 +#: ../../header.rst:-1 e312792ce16248f98f71d027cbbe1d64 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../irect.rst:7 be82734af403484bbebee77e779cbdc1 +#: ../../irect.rst:7 ddef2d577f7c46fca0650922f46a8a81 msgid "IRect" msgstr "" -#: ../../irect.rst:9 25da12c3f02844ef9ae09564d5303146 +#: ../../irect.rst:9 64079ef1a00e45ee981d0d272179f2e3 msgid "" "IRect is a rectangular bounding box, very similar to :ref:`Rect`, except " "that all corner coordinates are integers. IRect is used to specify an " @@ -53,230 +53,230 @@ msgstr "" "と非常に似ているが、すべての角の座標が整数であるという点が異なります。IRectは、レンダリング中に画像データを受け取る領域を指定するために使用されます。それ以外にも、長方形の空白や有効性に関する考慮事項が適用されます。メソッドと属性は同じ名前を持ち、多くの場合、対応する" " :ref:`Rect` の対応部分を再利用して実装されています。" -#: ../../irect.rst:12 175522ccb49f4c779141c956b07ca8c8 +#: ../../irect.rst:12 ab97696201f6481cb7a9151183d74b19 msgid "**Attribute / Method**" msgstr "**属性/メソッド**" -#: ../../irect.rst:12 52a0a5fa88704e21b0699d4f90127d65 +#: ../../irect.rst:12 efcc94105da54f018a86e821fec2d8cd msgid "**Short Description**" msgstr "**短い説明**" -#: ../../irect.rst:14 98f557ef73744287a4866e4702bfd0a2 +#: ../../irect.rst:14 dc94e84e46af4660871003b4bcf7a4f4 msgid ":meth:`IRect.contains`" msgstr "" -#: ../../irect.rst:14 8b9aa3582f1e4745902a67a9e61e5575 +#: ../../irect.rst:14 92ea7aa5de9a48a9b5ac185c1794a7e5 msgid "checks containment of another object" msgstr "他のオブジェクトの含まれているかを確認します。" -#: ../../irect.rst:15 57f10545768243d48dd3c4a799fc7800 +#: ../../irect.rst:15 124cec4d00074c519fbf6ce8ac42a723 msgid ":meth:`IRect.get_area`" msgstr "" -#: ../../irect.rst:15 7c6f3a6c8253462f8eb6b6e817ae3a23 +#: ../../irect.rst:15 2053892c2f4c422ab19ae350ecbe23e8 msgid "calculate rectangle area" msgstr "長方形の面積を計算します。" -#: ../../irect.rst:16 13441e9228b3470098e041d7df031454 +#: ../../irect.rst:16 a5bdba1573d44547b8b0673e7cd37dce msgid ":meth:`IRect.intersect`" msgstr "" -#: ../../irect.rst:16 7ef74f0e2a85463aa7f4ee5498a34f16 +#: ../../irect.rst:16 d1f0c881eaab47f3a362862bee94a3ec msgid "common part with another rectangle" msgstr "別の長方形との共通部分を取得します。" -#: ../../irect.rst:17 d66a27201e104e7a83ec7a615cb9ca02 +#: ../../irect.rst:17 11746224755e4a3b9da4cfe7f4269d11 msgid ":meth:`IRect.intersects`" msgstr "" -#: ../../irect.rst:17 c7e7c02a9f7c43f4b6218fa1d444b8fb +#: ../../irect.rst:17 924de332ec5b4656a802d2e85f6927e7 msgid "checks for non-empty intersection" msgstr "非空の交差をチェックします。" -#: ../../irect.rst:18 25cd374be131479793315c7d6113952a +#: ../../irect.rst:18 2132f387192449f0ac037eb9a66f3777 msgid ":meth:`IRect.morph`" msgstr "" -#: ../../irect.rst:18 db8706de5b3e474b9f3ccd7105bf5d93 +#: ../../irect.rst:18 530d3654b8ba4812a36e35dfad701ddf msgid "transform with a point and a matrix" msgstr "ポイントと行列を使用して変換します。" -#: ../../irect.rst:19 693a7b4c69124c3ca99a8f2274c5a0a7 +#: ../../irect.rst:19 a3769ab66bee466a8c94fb47b13ff0e2 msgid ":meth:`IRect.torect`" msgstr "" -#: ../../irect.rst:19 99d6c55ac1f740f0bba13ec23b8c1a5b +#: ../../irect.rst:19 d7e2a8f91121496a914e133895de1d66 msgid "matrix that transforms to another rectangle" msgstr "別の長方形に変換する行列。" -#: ../../irect.rst:20 91d3419a5d2a4e9cb18e1f52ae74efa6 +#: ../../irect.rst:20 81cff3d0715f416da3509d8bb9b099ce msgid ":meth:`IRect.norm`" msgstr "" -#: ../../irect.rst:20 76f791eda3584fcf974aafbadb3f0e11 +#: ../../irect.rst:20 444fb6d41f6c4e34b0fceb673ba3dc81 msgid "the Euclidean norm" msgstr "ユークリッドノルム。" -#: ../../irect.rst:21 b73c92ff6bc14d04afab023ad276725d +#: ../../irect.rst:21 c5fbf520ee1e47958587d44173e70ad4 msgid ":meth:`IRect.normalize`" msgstr "" -#: ../../irect.rst:21 e6ec3d4142974e9b9a98b1c8fe70f231 +#: ../../irect.rst:21 9fadec1aa0fa42899e37379ddec7c9d1 msgid "makes a rectangle finite" msgstr "長方形を有限にします。" -#: ../../irect.rst:22 e7cd8985a79e4907baffddeacaab7742 +#: ../../irect.rst:22 ad485c24a3a34720ba6cdce4aa57cd30 msgid ":attr:`IRect.bottom_left`" msgstr "" -#: ../../irect.rst:22 36046c4718894f048cf6438de61fc4d8 +#: ../../irect.rst:22 0f87509f1d3043d49419e4bf77e7d5b6 msgid "bottom left point, synonym *bl*" msgstr "左下のポイント、同義語の *bl* " -#: ../../irect.rst:23 df849bc6d8b240908607210b83831bc3 +#: ../../irect.rst:23 6b2e1bb32097415c9539dbb2ae43ca43 msgid ":attr:`IRect.bottom_right`" msgstr "" -#: ../../irect.rst:23 be2bad82328b4a57a88b65d4ffd34aec +#: ../../irect.rst:23 4888cfd6ae27499381d64bedabc834ae msgid "bottom right point, synonym *br*" msgstr "右下のポイント、同義語の *br* " -#: ../../irect.rst:24 b12e53b48243401a9236c2a8edf3a9ef +#: ../../irect.rst:24 ef3263604d9e406da1601cab4d8bac3e msgid ":attr:`IRect.height`" msgstr "" -#: ../../irect.rst:24 30ea508a3b7d4c1b905dbb136ff2690b +#: ../../irect.rst:24 ed8730e7d3eb43a38680c2490024ea3a msgid "height of the rectangle" msgstr "長方形の高さ" -#: ../../irect.rst:25 3852d21712be4ae2b8b8ca1046fd5cf7 +#: ../../irect.rst:25 c4c26d29c9dc490fb9ce003895f46551 msgid ":attr:`IRect.is_empty`" msgstr "" -#: ../../irect.rst:25 6e377f00f30d45ab9b53b11dc76a859b +#: ../../irect.rst:25 2c44a8bb62b7482a8ea229f24405e7a2 msgid "whether rectangle is empty" msgstr "長方形が空かどうか" -#: ../../irect.rst:26 42ed0482abfa4917b84dd5c0a66c93b2 +#: ../../irect.rst:26 62f693c4f27d4da28c1416bdf2633620 msgid ":attr:`IRect.is_infinite`" msgstr "" -#: ../../irect.rst:26 8d8312cdddf64b5d97724e2ddbceeea0 +#: ../../irect.rst:26 583895dab1fb49df97e3c485ef00b41b msgid "whether rectangle is infinite" msgstr "長方形が無限であるかどうか" -#: ../../irect.rst:27 4c5834781b4543d6a910399b285f5872 +#: ../../irect.rst:27 bf8fa54275764b07a1cc4cf60133e69e msgid ":attr:`IRect.rect`" msgstr "" -#: ../../irect.rst:27 0d1ebea1c95c440b847de8ed5dc01a80 +#: ../../irect.rst:27 67cc7f8daa2844e0a01efba201d0c056 msgid "the :ref:`Rect` equivalent" msgstr ":ref:`Rect` の同等物" -#: ../../irect.rst:28 8cb02131d6bd490e94a54d7ce65b75e7 +#: ../../irect.rst:28 8f89c6c745e54747aed947c8dd097575 msgid ":attr:`IRect.top_left`" msgstr "" -#: ../../irect.rst:28 b8c4746eaa5e4d6e99d13d104ffde930 +#: ../../irect.rst:28 9593c3c6673e4014bc7f1f38035db854 msgid "top left point, synonym *tl*" msgstr "左上のポイント、同義語の *tl* " -#: ../../irect.rst:29 d310c2a3d7b24d549a1d8f687dc50816 +#: ../../irect.rst:29 ccd49d6f1ebd447dbc14e886376eeedd msgid ":attr:`IRect.top_right`" msgstr "" -#: ../../irect.rst:29 b4eb0de1362f4980823855fd07e73bfd +#: ../../irect.rst:29 f5d3a7dbdfc2490e90041a1cce9c6e78 msgid "top_right point, synonym *tr*" msgstr "右上のポイント、同義語の *tr* " -#: ../../irect.rst:30 740aa5b8254c4f95a3e35f42b7c3e1ab +#: ../../irect.rst:30 092c64736cb9423fbade8738a18def52 msgid ":attr:`IRect.quad`" msgstr "" -#: ../../irect.rst:30 f312964511504fd58cfa4a643f632d6e +#: ../../irect.rst:30 02794414a93b473e9430f42716496fae msgid ":ref:`Quad` made from rectangle corners" msgstr "長方形の角から作成された四角形" -#: ../../irect.rst:31 fcc6b8a3a52c48789bec7be8670dc831 +#: ../../irect.rst:31 8f40f8f7548f45d69bb49e4340ea0e8c msgid ":attr:`IRect.width`" msgstr "" -#: ../../irect.rst:31 f1eb3fb8874949ea9ebdddf27f90d24c +#: ../../irect.rst:31 9a5de017b1ca40b7b146ca25383c738e msgid "width of the rectangle" msgstr "長方形の幅" -#: ../../irect.rst:32 f3d97c6c659a464e85e63f92a8521fc3 +#: ../../irect.rst:32 0c0b410baf734144851d33016cbdddd0 msgid ":attr:`IRect.x0`" msgstr "" -#: ../../irect.rst:32 2b2a05046c4144bcb4ff1f91cb9da561 +#: ../../irect.rst:32 219bd087640142edad26e0cef53ce452 msgid "X-coordinate of the top left corner" msgstr "左上隅のX座標" -#: ../../irect.rst:33 b23c3d9391454301ae6bb5674f62a0df +#: ../../irect.rst:33 41ac1de7703f44bcbe5f615ba2dce3ea msgid ":attr:`IRect.x1`" msgstr "" -#: ../../irect.rst:33 b900226facf6496b90c5b499b63fe244 +#: ../../irect.rst:33 ae41326e3d484ab889ee2b9c5ff3a7de msgid "X-coordinate of the bottom right corner" msgstr "右下隅のX座標" -#: ../../irect.rst:34 7d9d112e6cac486092a12524b1c5adf5 +#: ../../irect.rst:34 a3223a0657ab45b087b1c100476b4a17 msgid ":attr:`IRect.y0`" msgstr "" -#: ../../irect.rst:34 5a8f8443aff54f8e98819b98c8c3961a +#: ../../irect.rst:34 19062c693a07420a8c8d2f3b3c1eb750 msgid "Y-coordinate of the top left corner" msgstr "左上隅のY座標" -#: ../../irect.rst:35 ebe3e39b7a6d4d22b482ddf34fd3a28b +#: ../../irect.rst:35 c1c7be5dd2ef41a2b6d447cb43a6a07e msgid ":attr:`IRect.y1`" msgstr "" -#: ../../irect.rst:35 8ecfdbd1e92c48639949e90022772b6a +#: ../../irect.rst:35 be7ae048d8ea46edaf23968ef9c8bce1 msgid "Y-coordinate of the bottom right corner" msgstr "右下隅のY座標" -#: ../../irect.rst:38 599f5a8328ba49dabcaa858b1e7e1577 +#: ../../irect.rst:38 d9ba47e2fb7f40a5b94b36b2e8690bd1 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../irect.rst:50 9d65da1f2d234a7f91ba9704622ab597 +#: ../../irect.rst:50 1c5e8f4e34f047098b41ead038224c50 msgid "" "Overloaded constructors. Also see examples below and those for the " ":ref:`Rect` class." msgstr "オーバーロードされたコンストラクタ。また、以下の例と :ref:`Rect` クラスの例も参照してください。" -#: ../../irect.rst:52 b320c21624c243d3b7a133303ff4a3e5 +#: ../../irect.rst:52 50def18ce8504003afbebdd0a9a55ac1 msgid "If another irect is specified, a **new copy** will be made." msgstr "別のirectが指定された場合、**新しいコピー** が作成されます。" -#: ../../irect.rst:54 c54ebc99deba42c8888bb4aa9eef6676 +#: ../../irect.rst:54 9b2e5c01c35646e3ad3647dfb830f028 msgid "" "If sequence is specified, it must be a Python sequence type of 4 numbers " "(see :ref:`SequenceTypes`). Non-integer numbers will be truncated, non-" "numeric values will raise an exception." msgstr "シーケンスが指定された場合、それは4つの数値のPythonシーケンス型である必要があります(:ref:`SequenceTypes`)。整数以外の数値は切り捨てられ、数値以外の値は例外を発生させます。" -#: ../../irect.rst:56 636e301d583d463b8aa42d854046751c +#: ../../irect.rst:56 2cd32524540f40ac87e1e408344a827d msgid "The other parameters mean integer coordinates." msgstr "その他のパラメータは整数座標を意味します。" -#: ../../irect.rst:61 59b1ca31c2ed417992f38a541857fb6e +#: ../../irect.rst:61 840c50265ae3462c89c54b22ce7e67f9 msgid "" "Calculates the area of the rectangle and, with no parameter, equals " "*abs(IRect)*. Like an empty rectangle, the area of an infinite rectangle " "is also zero." msgstr "長方形の面積を計算し、パラメータなしで *abs(IRect)* に等しいです。空の長方形と同様に、無限の長方形の面積もゼロです。" -#: ../../irect.rst 26a722cffc014eb29989f7e4d3608579 -#: 784aad57b5024254921287f70e2e7f7a 863b3a81cf834abf8379d7f896bb0fa9 -#: b355abec958941feaf901f8c3e6d1e29 c404763e3ce24e2cab815d181c7c1e61 -#: e078f14cc47547a2a26715698c9372d0 +#: ../../irect.rst 4f00a177e1bc4d3d89dda38f1909fa94 +#: 4fc3aa5f280242c986288acbfa1b8175 9b5b83039e0c4fdeaf7685aa05b6bb16 +#: aa8fbd2f167e422e9b6b3aaac458e3a9 b69ba3e050904df0afe8a6d582ef2363 +#: ed922b3129dd4c73b25f962b90ae50aa msgid "Parameters" msgstr "" -#: ../../irect.rst:63 d7ecf3302bb341cda1ecdffd653daee6 +#: ../../irect.rst:63 3be2e3c29aba4f5189e0cbb7f1144057 msgid "" "Specify required unit: respective squares of \"px\" (pixels, default), " "\"in\" (inches), \"cm\" (centimeters), or \"mm\" (millimeters)." @@ -284,13 +284,13 @@ msgstr "" "必要な単位を指定します:「px」(ピクセル、デフォルト)、 「in」(インチ)、 " "「cm」(センチメートル)、または「mm」(ミリメートル)のそれぞれの平方。" -#: ../../irect.rst 3a1764274e634eefa39be551900b3be9 -#: 56b808ebd1484f7d88eba5439aefb724 891c44a1d9c04ee09bbf8768cedb61ff -#: ca852a82ce3c4ebe9f3f3302fa83b1a3 +#: ../../irect.rst 4e47019f7b9b4864aef1988ad0bcbdd9 +#: 8a353e9947ea4ef2b6e0a6872cda119d 9f7bfdd3aed843358d17fe22401cb884 +#: a7c70439c9f2475ba9e98c25daaa8da2 msgid "Return type" msgstr "" -#: ../../irect.rst:69 5ab3611ad9594b7faae15dbe336badb9 +#: ../../irect.rst:69 782b0a38b1a44a3fb17923582226e601 msgid "" "The intersection (common rectangular area) of the current rectangle and " "*ir* is calculated and replaces the current rectangle. If either " @@ -301,16 +301,16 @@ msgstr "" "現在の長方形と *ir* " "の交差(共通の長方形領域)を計算し、現在の長方形に置き換えます。どちらかの長方形が空の場合、結果も空です。どちらかの長方形が無限の場合、もう一方が結果として取られます。したがって、両方の長方形が無限である場合、結果も無限です。" -#: ../../irect.rst:71 1877dcde314f4c59a07aab7963c88a0a +#: ../../irect.rst:71 fcebc17df9614b1882a8032f5fcee80a msgid "Second rectangle." msgstr "第2の長方形。" -#: ../../irect.rst:75 7f9c6c8dd92e49a7a6d037565162a3ae +#: ../../irect.rst:75 bca6b46c6fce4c0391d350804618c7b0 msgid "" "Checks whether *x* is contained in the rectangle. It may be " ":data:`rect_like`, :data:`point_like` or a number. If *x* is an empty " "rectangle, this is always true. Conversely, if the rectangle is empty " -"this is always *False*, if *x* is not an empty rectangle and not a " +"this is always ``False``, if *x* is not an empty rectangle and not a " "number. If *x* is a number, it will be checked to be one of the four " "components. *x in irect* and *irect.contains(x)* are equivalent." msgstr "" @@ -320,85 +320,85 @@ msgstr "" "が数値の場合、それは4つの構成要素の1つであることが確認されます。 *x* in *irect* および *irect.contains(x)* " "は同等です" -#: ../../irect.rst:77 8a5ec9e6f6f54a739efe12f2ddc4140b +#: ../../irect.rst:77 2a8a12b2850d4bfba7bba2b40cc06f55 msgid "the object to check." msgstr "確認するオブジェクト。" -#: ../../irect.rst:84 c15489917b614153b4d918fa2c9de206 +#: ../../irect.rst:84 50064e8a49c54a6da52a3b0900a114f3 msgid "" "Checks whether the rectangle and the :data:`rect_like` \"r\" contain a " -"common non-empty :ref:`IRect`. This will always be *False* if either is " -"infinite or empty." +"common non-empty :ref:`IRect`. This will always be ``False`` if either is" +" infinite or empty." msgstr "" "長方形と :data:`rect_like`「r」が共通の非空 :ref:`IRect` " -"を含むかどうかをチェックします。どちらかが無限または空の場合、これは常に *False* になります。" +"を含むかどうかをチェックします。どちらかが無限または空の場合、これは常に ``False`` になります。" -#: ../../irect.rst:86 789a4aa42bca4228a809f5c994363124 +#: ../../irect.rst:86 b0c988e57dce4071a0e518ca1e93877f msgid "the rectangle to check." msgstr "チェックする長方形。" -#: ../../irect.rst:92 a6c2f1d7c3104334a692b4e8960aee79 +#: ../../irect.rst:92 1bbbf78a89784f7db6abf366bea409ae msgid "New in version 1.19.3" msgstr "バージョン1.19.3で新登場" -#: ../../irect.rst:94 a4956e746a5745ff85ca43ec86b207d3 +#: ../../irect.rst:94 f3726b71047d42a58f879f9c00944d3f msgid "" "Compute the matrix which transforms this rectangle to a given one. See " ":meth:`Rect.torect`." msgstr "この長方形を指定された長方形に変換する行列を計算します。:meth:`Rect.torect` を参照してください。" -#: ../../irect.rst:96 54338582814547988fc9f3780f4fb658 +#: ../../irect.rst:96 dcc19ae43b814fe4b56fa555133432ce msgid "the target rectangle. Must not be empty or infinite." msgstr "ターゲットの長方形。空または無限であってはなりません。" -#: ../../irect.rst:97 ce7bed7862cd4a639d2ebae4060b5d65 +#: ../../irect.rst:97 d473a4edcd124daab7417f12570976d0 msgid ":ref:`Matrix`" msgstr "" -#: ../../irect.rst 3af72a6785a349c7bc4618b31c2c5356 -#: dd0b1e75983b49ebaf56abc53e2f488b +#: ../../irect.rst e2953f28a3ff42908f0e4d0811230263 +#: f368ffdbb210464aac1693355694b761 msgid "Returns" msgstr "" -#: ../../irect.rst:98 315ff0add548424694f5515726b21d53 +#: ../../irect.rst:98 056021e1cc164996aed45008297df188 msgid "" "a matrix `mat` such that `self * mat = rect`. Can for example be used to " "transform between the page and the pixmap coordinates." msgstr "`self * mat = rect` となるような行列 `mat` 。たとえば、ページとピクセルマップの座標間を変換するために使用できます。" -#: ../../irect.rst:103 ff8b8313cb234fff9e6df65c603290a1 +#: ../../irect.rst:103 88b85325f704446180fd037b13f438d8 msgid "New in version 1.17.0" msgstr "新機能 バージョン1.17.0" -#: ../../irect.rst:105 a206bbc10f1f46439f824565a6a76072 +#: ../../irect.rst:105 2b9036d190fb49e0b5f461aba0df7c7f msgid "Return a new quad after applying a matrix to it using a fixed point." msgstr "指定された固定点に行列を適用した後の新しい四角形を返します。" -#: ../../irect.rst:107 c075b7b8394e4df0be4d9aaa8e415dd2 +#: ../../irect.rst:107 3ff780516b4146f3ae0d550b2b4a36ce msgid "the fixed point." msgstr "固定点。" -#: ../../irect.rst:108 83d6bc16cbee4ae58ea1394989d5db1d +#: ../../irect.rst:108 1fbd651a14a1443596afb4e080f12015 msgid "the matrix." msgstr "行列。" -#: ../../irect.rst:109 e511a8aadd8c4749a8c16d19eeb21c2c +#: ../../irect.rst:109 f932937ceb634ac7890e4cb6a194a02b msgid "" "a new :ref:`Quad`. This a wrapper of the same-named quad method. If " "infinite, the infinite quad is returned." msgstr "新しい :ref:`Quad`。これは同じ名前のquadメソッドのラッパーです。無限であれば、無限の四角形が返されます。" -#: ../../irect.rst:113 28033e7f292a4410807b4c45dce0a044 +#: ../../irect.rst:113 613eaa02d46e4a9eab41724a4e10baa2 msgid "New in version 1.16.0" msgstr "新機能 バージョン1.16.0" -#: ../../irect.rst:115 0ed40bdfdb1248e6b78a1480e18cd866 +#: ../../irect.rst:115 e05020824bd94a418f7786caff3a68e5 msgid "" "Return the Euclidean norm of the rectangle treated as a vector of four " "numbers." msgstr "四角形を4つの数字のベクトルとして扱った場合のユークリッドノルムを返します。" -#: ../../irect.rst:119 f6cb34297689441a8b6df2411f30cab1 +#: ../../irect.rst:119 deaf5a4b9f8440fd8fe7b802f78ec9b9 msgid "" "Make the rectangle finite. This is done by shuffling rectangle corners. " "After this, the bottom right corner will indeed be south-eastern to the " @@ -407,102 +407,102 @@ msgstr "" "四角形を有限にします。これは四角形の角を入れ替えることによって行われます。この操作後、右下の角は確かに左上の角の南東になります。詳細については、:ref:`Rect`" " を参照してください。" -#: ../../irect.rst:125 a4f21dbdbb9148a197a5c3466558806e +#: ../../irect.rst:125 55613d17f4fd4a458eca520133551eb0 msgid "Equals *Point(x0, y0)*." msgstr "*Point(x0, y0)* と同等です。" -#: ../../irect.rst 28a322b8fc2841c990dd3a5e9867f899 -#: 345f4225187b4a2e9716a54baaf2208f 3923d9bff1714d7ebc9b2ae0f8941e4d -#: 3a864888ffdc4769adb82d4d7c8ff4cc 418106d5eab8442899fe663d7f9980fa -#: 4464b8221f2c4fcd8f914a7703dc5860 5230ffc318a74fbba0665917a20e343f -#: 53ff7684fcd74d39959e158aa9417cc9 56fb39561c25475dbd480a6674b823ac -#: 634968233d4f4481a1050ff30ceddc63 77520f21ffb24220aedc0da49ef66cf8 -#: a8521feb9e1e4fc39f4eed4a1253bca1 c92c64abe6b148deb968b61c83cb39b9 -#: cf9d7c3cf3794520aa138c1b627a2d2d +#: ../../irect.rst 1fb6ace84c4d4e938a1ff7c0b704b38f +#: 49d4afd12c6a42c4a29bf9c269eadfe0 5b4a83c92ca649dda2e8fa0e691bbd89 +#: 6cbe1cdc288d48ee9c6b6bd68a21fea6 7559f9666807471eaa667884ab2f79b5 +#: 8d8f0f2b15df45779323571cd1a1b751 c86cbf20e5234741bd7bc1e8fd9a44ca +#: d2aad704feb949ebb36c3a4e729a8d5f d793441a05ce4bc48b85052e697d053e +#: dc8594c4fac847ac8161c79a639811ce e8ad8d35ebcb4d0795598f07a336334c +#: f52efa790e584d859f3797654913b784 f66efb6c2f134fa69083a7c6b1a857ab +#: ff031729ca2a4ce1ad1e658f12ce0cfe msgid "type" msgstr "" #: ../../irect.rst:127 ../../irect.rst:135 ../../irect.rst:143 -#: ../../irect.rst:151 2deb59220ac046a38eb28ecf14adfd9e -#: 44dda0418182496ab0ae9973d026f142 54bec20d06aa487d8a844566c5573e02 -#: ed8a24e1ae774bb0982c7e3df63d0b88 +#: ../../irect.rst:151 308d3cb353bb49ae94161cf7dc7218d3 +#: 3249e89f3b7c4ac2bea38ea5214c52c5 785ff830f1234dc69f3c770992c2a410 +#: 884b7d46c20742c0a7283bee8b40a43f msgid ":ref:`Point`" msgstr "" -#: ../../irect.rst:133 59607fc63159463f91468083b96d1669 +#: ../../irect.rst:133 921cb3a2a7cf4cbf806f9d772749b917 msgid "Equals *Point(x1, y0)*." msgstr "*Point(x1, y0)* と同等です。" -#: ../../irect.rst:141 34f0de6696c645078858e2429fbf003c +#: ../../irect.rst:141 13776e76c48248909500e8fe82c9d0a4 msgid "Equals *Point(x0, y1)*." msgstr "*Point(x0, y1)* と同等です。" -#: ../../irect.rst:149 adcb988f7f904ddfa11e6e141d90fada +#: ../../irect.rst:149 99f201fd44fd4ed0a1f49b75400f0d0f msgid "Equals *Point(x1, y1)*." msgstr "*Point(x1, y1)* と同等です。" -#: ../../irect.rst:155 02ad0145c80845e39cbd4d54c82622fe +#: ../../irect.rst:155 63204ddea7a14d2592a7ad0f9dd74810 msgid "The :ref:`Rect` with the same coordinates as floats." msgstr "浮動小数点座標と同じ座標を持つ :ref:`Rect` です。" -#: ../../irect.rst:157 e1776636b8804716b0b0b166a6b99c4d +#: ../../irect.rst:157 2d7b927314b342cb96c8fb15d3b8e3b9 msgid ":ref:`Rect`" msgstr "" -#: ../../irect.rst:161 18d6a1f42891452cb183f7770140fc5e +#: ../../irect.rst:161 57dfabd4e9b049e4900273a9ec4cb817 msgid "The quadrilateral *Quad(irect.tl, irect.tr, irect.bl, irect.br)*." msgstr "四角形 *Quad(irect.tl, irect.tr, irect.bl, irect.br)です* 。" -#: ../../irect.rst:163 f8362d4a4c404a418e3fe9d2235412a2 +#: ../../irect.rst:163 a199b927484848978ec222114a9da0cc msgid ":ref:`Quad`" msgstr "" -#: ../../irect.rst:167 c7ffecbaf7e4474c8a4d93cdb7b3f881 +#: ../../irect.rst:167 1d437103ee594f9b944058db4631bb9d msgid "Contains the width of the bounding box. Equals *abs(x1 - x0)*." msgstr "境界ボックスの幅を含みます。*abs(x1 - x0)* と同等です。" #: ../../irect.rst:169 ../../irect.rst:175 ../../irect.rst:181 #: ../../irect.rst:187 ../../irect.rst:193 ../../irect.rst:199 -#: 2103186e9f2742a0b7f0f5d2411228ab 6710a04e932345f3a9c839dae2438bdc -#: 752efa4da98949de97bf20bf345f6aa8 799cc1ee4de842e6a1848c3d9482cf5b -#: 7db76c3b760a454a9bad00e3144b3917 b3de3268728242cd985387b07be93ee2 +#: 083882bcb7354a55bf7f4dd85eef92b9 8ed88f37bd6742da83895a91a8685917 +#: 967dc9f8c2fc43b7b56954d34441687f 9958930f4f6e45b5980d2c23669ce09f +#: ac4b6a2822ce482a8dbfbf739c4ffa79 bd9b56e6197441be9f3888a17b04d9a4 msgid "int" msgstr "" -#: ../../irect.rst:173 f669b2fd262144718009c924f594d16a +#: ../../irect.rst:173 b187d2fbc4bd439e834930d74922794b msgid "Contains the height of the bounding box. Equals *abs(y1 - y0)*." msgstr "境界ボックスの高さを含みます。*abs(y1 - y0)* と同等です。" -#: ../../irect.rst:179 a38b2aa990554de195fb0b817acc109b +#: ../../irect.rst:179 4777545ac79b48f1a71c4b3dffbbe470 msgid "X-coordinate of the left corners." msgstr "左上隅のX座標です。" -#: ../../irect.rst:185 083ca91086fd414ba4c0cd0a6e8ee58f +#: ../../irect.rst:185 187b3e2a62fa440b84c0265a597e11e0 msgid "Y-coordinate of the top corners." msgstr "上端のY座標です。" -#: ../../irect.rst:191 383e87acc411416d83f670b2152858bf +#: ../../irect.rst:191 4539d20b89644229aae3fcc4c1196436 msgid "X-coordinate of the right corners." msgstr "右上隅のX座標です。" -#: ../../irect.rst:197 6087ebac89854e3d8435b40ea9856216 +#: ../../irect.rst:197 69a9d5438d1b4b199976b0b23ba70a7e msgid "Y-coordinate of the bottom corners." msgstr "下端のY座標です。" -#: ../../irect.rst:203 4d3014cd0a0f4578afab149ef43a9349 -msgid "*True* if rectangle is infinite, *False* otherwise." -msgstr "四角形が無限の場合は *True* 、それ以外の場合は*False* です。" +#: ../../irect.rst:203 34a8989b9f274d83b0a6c5031b749190 +msgid "``True`` if rectangle is infinite, ``False`` otherwise." +msgstr "四角形が無限の場合は ``True`` 、それ以外の場合は``False`` です。" -#: ../../irect.rst:205 ../../irect.rst:211 55fe5ed17d7444ca87c28b08e67b9806 -#: fd2998890cfc4e5b915a0440e9ecf616 +#: ../../irect.rst:205 ../../irect.rst:211 c8f3501df5c14812ae13827184765c29 +#: d6f0997b994c464fa7457bb7c1cce89c msgid "bool" msgstr "" -#: ../../irect.rst:209 905491a2dc3f4df799f2a2d41f37f10b -msgid "*True* if rectangle is empty, *False* otherwise." -msgstr "四角形が空の場合は *True*、それ以外の場合は *False* です。" +#: ../../irect.rst:209 5fea893d5a0e409aacb5452b2ffa3fcf +msgid "``True`` if rectangle is empty, ``False`` otherwise." +msgstr "四角形が空の場合は ``True``、それ以外の場合は ``False`` です。" -#: ../../irect.rst:216 9bab25baaead4aef9fc8b020ccbbd28d +#: ../../irect.rst:216 e58bd147e5934ff788a34135346e5c97 msgid "" "This class adheres to the Python sequence protocol, so components can be " "accessed via their index, too. Also refer to :ref:`SequenceTypes`." @@ -510,17 +510,16 @@ msgstr "" "このクラスはPythonのシーケンスプロトコルに従っているため、コンポーネントはインデックスを使用してアクセスできます。また、:ref:`SequenceTypes`" " も参照してください。" -#: ../../irect.rst:217 86be59afb03946a6bf7b90e2a27be053 +#: ../../irect.rst:217 0d59de499da146b2914c95df6f414f34 msgid "" "Rectangles can be used with arithmetic operators -- see chapter " ":ref:`Algebra`." msgstr "また、四角形は算術演算子と一緒に使用できます - :ref:`Algebra` を参照してください。" -#: ../../footer.rst:71 52177752aabf4a2c8dd1a1bf0d282a6f +#: ../../footer.rst:60 7dccd50b2f2443208394ecb0c842c1dd msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 3114acff9bec457bb69a4ab505d76eb6 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/link.mo b/docs/locales/ja/LC_MESSAGES/link.mo index 2413a67ed..1b71282c8 100644 Binary files a/docs/locales/ja/LC_MESSAGES/link.mo and b/docs/locales/ja/LC_MESSAGES/link.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/link.po b/docs/locales/ja/LC_MESSAGES/link.po index 252a5a11c..92e152bbf 100644 --- a/docs/locales/ja/LC_MESSAGES/link.po +++ b/docs/locales/ja/LC_MESSAGES/link.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 c6e1d07b0fa3448781eaf6a5bae35195 +#: ../../header.rst:-1 789ef3e179a7439395eb0d05014100e0 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 a8239beccc304a1f9a6ea5b47a174587 +#: ../../header.rst:-1 d6bae0d656e54c42bbd6fabc354253ae msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 6f860f9b5be3467d8e61fe2423c0d53d +#: ../../header.rst:-1 c2865acb728b48b0be9ebcbf4ca09b69 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../link.rst:7 92ff2fcb6ff2484e80fc0a9e81f759b8 +#: ../../link.rst:7 c688c9e8319141a9be77a5892a13809d msgid "Link" msgstr "Link (リンク)" -#: ../../link.rst:8 883622d1b4b949a196edfdf0ffb1fdbf +#: ../../link.rst:8 52cdea6624d9492a8f1367f1fee8b4f8 msgid "" "Represents a pointer to somewhere (this document, other documents, the " "internet). Links exist per document page, and they are forward-chained to" @@ -49,7 +49,7 @@ msgstr "" "リンクは、どこかへのポインタを表します(この文書、他の文書、インターネットなど)。リンクは文書のページごとに存在し、最初のリンクは " ":attr:`Page.first_link` プロパティでアクセスできます。リンクはお互いにフォワードチェーンされ、最初のリンクから始まります。" -#: ../../link.rst:10 062c9e01a89b4b3ab7689ab577e8f5d4 +#: ../../link.rst:10 ae08ffa8e9f4429bb99c55016bdcc961 msgid "" "There is a parent-child relationship between a link and its page. If the " "page object becomes unusable (closed document, any document structure " @@ -58,133 +58,133 @@ msgid "" "link property or method is accessed." msgstr "リンクとそのページとの親子関係があります。ページオブジェクトが使用できなくなると(ドキュメントがクローズされた場合、ドキュメント構造が変更された場合など)、そのページに存在するリンクオブジェクトも使用できなくなります。リンクのプロパティまたはメソッドにアクセスしようとすると、「オーファン」というオブジェクトが発生し、例外が発生します。" -#: ../../link.rst:13 fde98350c6f045728db903fa18d098d7 +#: ../../link.rst:13 540b33af6e004a60a5c462085df023e5 msgid "**Attribute**" msgstr "**属性**" -#: ../../link.rst:13 66bdf829a8ec43afa11090497f90d54b +#: ../../link.rst:13 f47bd46a654a45a4ba851c09a22eea60 msgid "**Short Description**" msgstr "**短い説明**" -#: ../../link.rst:15 634000ad7eb64039bea0f7f0b2a3b35d +#: ../../link.rst:15 f7c6af0af71e4dd19562174e5497a60d msgid ":meth:`Link.set_border`" msgstr "" -#: ../../link.rst:15 3bb847a0c2e54c77b3fa762178e7a596 +#: ../../link.rst:15 1792d06c2e574c19a323b62f42c2d45c msgid "modify border properties" msgstr "境界線のプロパティを変更します" -#: ../../link.rst:16 2b35ef5ca79f4984b3d379d598a5d21a +#: ../../link.rst:16 d9891c2fa8284703a452d3df1a0653fd msgid ":meth:`Link.set_colors`" msgstr "" -#: ../../link.rst:16 be79ca40dc6941589fb9b0299601523c +#: ../../link.rst:16 5c1f73fa45454debbad1d5891c4378cd msgid "modify color properties" msgstr "色のプロパティを変更します" -#: ../../link.rst:17 13710b794a1b43d48f76b112599f490b +#: ../../link.rst:17 0af10d50600346ea8663643e1de0eb8b msgid ":meth:`Link.set_flags`" msgstr "" -#: ../../link.rst:17 a040cf896e674d1081b48e052f013920 +#: ../../link.rst:17 6e5bbdf2f3f94fb5a120e1443763be30 msgid "modify link flags" msgstr "リンクフラグを変更します" -#: ../../link.rst:18 3c8a0cc09cab4790af00faf23b86024e +#: ../../link.rst:18 6dce9d5a48824fff84e601d4aecdc691 msgid ":attr:`Link.border`" msgstr "" -#: ../../link.rst:18 be862c211e0f48c383e0c22d52001188 +#: ../../link.rst:18 604357ac107245f993ae3b1650ebcf79 msgid "border characteristics" msgstr "境界線の特性" -#: ../../link.rst:19 b67e1da4a98c42e6924eb8bc9d01143c +#: ../../link.rst:19 56981bc862ef422cac26e01e4529b563 msgid ":attr:`Link.colors`" msgstr "" -#: ../../link.rst:19 bbf65c311bba4493bc2cca7f74dc5a73 +#: ../../link.rst:19 d2b934f42ed647d39eafa1cf42d776d1 msgid "border line color" msgstr "境界線の色" -#: ../../link.rst:20 06d233b9e5ac4d12aa2a001e651fd16c +#: ../../link.rst:20 53bcd3c8bba14f7bbc40266833181e80 msgid ":attr:`Link.dest`" msgstr "" -#: ../../link.rst:20 9b802d85d71d4a8eaf690d81f73809ef +#: ../../link.rst:20 f923e0b3b9744816a353b2e8fa3e2210 msgid "points to destination details" msgstr "宛先の詳細を指します" -#: ../../link.rst:21 c004c267dcc748a3a191381f76bc337d +#: ../../link.rst:21 5eed957ff70b41e98d0eb9285cd96980 msgid ":attr:`Link.is_external`" msgstr "" -#: ../../link.rst:21 4aae33e8b27442df88fbdae43626633d +#: ../../link.rst:21 effa067d28d44d16bb8fe8e503593a5d #, fuzzy msgid "checks if the link is an external destination" msgstr "外部宛先ですか?" -#: ../../link.rst:22 10dd54ab5a3a4a3f8ef98da2d3bc6e08 +#: ../../link.rst:22 bbe68bce0387407795c1edda367ef2ab msgid ":attr:`Link.flags`" msgstr "" -#: ../../link.rst:22 5715e9b8e4814261a08c8cf8b45ef97e +#: ../../link.rst:22 ad43a0946bcc486ca5aa72ecdd1d02bf msgid "link annotation flags" msgstr "リンク注釈のフラグ" -#: ../../link.rst:23 059b1f10380b444184d919f55c05339f +#: ../../link.rst:23 eef3e8a36ea145629db1a703e87f575d msgid ":attr:`Link.next`" msgstr "" -#: ../../link.rst:23 d0375975f81149d894ac82ad245f03cc +#: ../../link.rst:23 627116875da8492cbc9685c5ef7289cc msgid "points to next link" msgstr "次のリンクを指します" -#: ../../link.rst:24 39ba8becc1e049a580bd4d811ee69107 +#: ../../link.rst:24 08387b2d8317483d9cc61f3452cea422 msgid ":attr:`Link.rect`" msgstr "" -#: ../../link.rst:24 9acc8a2e658f4a1b8283846bdcf804bc +#: ../../link.rst:24 58a914c6c1424572881b90bcc4392db4 #, fuzzy msgid "clickable area in untransformed coordinates" msgstr "変換されていない座標内のクリック可能な領域" -#: ../../link.rst:25 e6e38288c44e4b00b14e118420419def +#: ../../link.rst:25 b115d680a21b46a6b85d654dd3a49b79 msgid ":attr:`Link.uri`" msgstr "" -#: ../../link.rst:25 b35052f7fbf646119a09fba137382825 +#: ../../link.rst:25 969ecf8c8c9341bf8ee037a0c9ee9a8b msgid "link destination" msgstr "リンクの宛先" -#: ../../link.rst:26 74bbf26781a84fa6a97cdd51b34861b3 +#: ../../link.rst:26 253e0f31052f499b9e4346932b58c7d9 msgid ":attr:`Link.xref`" msgstr "" -#: ../../link.rst:26 dbd099a505fc4a1694e68b07a0f18f03 +#: ../../link.rst:26 2e407687ff9648c88d884bc113153b63 msgid ":data:`xref` number of the entry" msgstr "エントリの :data:`xref` 番号" -#: ../../link.rst:29 b2e4e8357aab4517bf5ae183566e1922 +#: ../../link.rst:29 86c8b11333584703a538c055122d3356 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../link.rst:35 ae7d41f99e3743568c0f57caa31c51ec +#: ../../link.rst:35 12ea65b799b44f38acf6a8810d508ddb msgid "PDF only: Change border width and dashing properties." msgstr "PDFのみ:境界線の幅と破線プロパティを変更します。" -#: ../../link.rst:37 38e95172531c4461b86d31c50e437204 +#: ../../link.rst:37 3336d65932154a7e8220f704075033f6 msgid "" "*(Changed in version 1.16.9)* Allow specification without using a " "dictionary. The direct parameters are used if *border* is not a " "dictionary." msgstr "*(バージョン1.16.9で変更)* 辞書を使用せずに仕様を許可します。*border* が辞書でない場合、直接のパラメータが使用されます。" -#: ../../link.rst 961898d85adb4376bb70ee66303b22f3 -#: fba02e2c64874cb880822d6b593ea62b +#: ../../link.rst 25b24c0fd56f4c30b5aed0630d379730 +#: 9ee61ab2fe8942bfabb7ea27592c0b6d msgid "Parameters" msgstr "" -#: ../../link.rst:39 9917bafd424f49f39a4f233372612bf1 +#: ../../link.rst:39 528de9f4f21d4757bc32323b7c87d926 msgid "" "a dictionary as returned by the :attr:`border` property, with keys " "*\"width\"* (*float*), *\"style\"* (*str*) and *\"dashes\"* (*sequence*)." @@ -197,16 +197,16 @@ msgstr "" " を使用します。dashes が空のシーケンスでない場合、「style」は自動的に \"D\"(点線)に設定されます。" #: ../../link.rst:41 ../../link.rst:42 ../../link.rst:43 ../../link.rst:54 -#: 05f540ab566b472480cf910a7bd2582f 4943da3515764221a542640fea1e0497 -#: 4df19b1ed02148c3a7a7ff9d58f20f28 ec9a647b80b247bbb812c3d82bda1db2 +#: 15adf27929424619b20cae84b36ad609 8795a2d1dc084425af561ecd4c4c5474 +#: b0c1d9cdb57843a98c0a60c9326e7883 c13273a1875d45e793d46962a4b7f884 msgid "see above." msgstr "上記を参照してください。" -#: ../../link.rst:47 16911c4cf045441383cad9d188a72de2 +#: ../../link.rst:47 4f104147b1394836b55a5df9c3e2ab47 msgid "PDF only: Changes the \"stroke\" color." msgstr "PDFのみ: \"stroke\" 色を変更します。" -#: ../../link.rst:49 5096009aa48841d0978440414ff55693 +#: ../../link.rst:49 16686de7e6af4e18ab0ae3e6db98bf9b msgid "" "In PDF, links are a subtype of annotations technically and **do not " "support fill colors**. However, to keep a consistent API, we do allow " @@ -216,13 +216,13 @@ msgstr "" "PDFでは、リンクは技術的には注釈のサブタイプであり、**塗りつぶし色はサポートしていません**。ただし、一貫したAPIを維持するために、すべての注釈と同様に" " `fill=` パラメータを指定することを許可しており、警告とともに無視されます。" -#: ../../link.rst:51 f77d81b5ede24167995571df56cd85d1 +#: ../../link.rst:51 59d3c81f089043dc9af7a58db867cfcc msgid "" "*(Changed in version 1.16.9)* Allow colors to be directly set. These " "parameters are used if *colors* is not a dictionary." msgstr "*(バージョン1.16.9で変更)*: 色を直接設定することを許可します。これらのパラメータは、*colors* が辞書でない場合に使用されます。" -#: ../../link.rst:53 77c55ed61a9f409199068ecc893f4eb8 +#: ../../link.rst:53 8c2d9c9d399c48e98a0d4c825a606c31 msgid "" "a dictionary containing color specifications. For accepted dictionary " "keys and values see below. The most practical way should be to first make" @@ -232,12 +232,12 @@ msgstr "" "色仕様を含む辞書。受け入れられる辞書のキーと値については以下を参照してください。最も実用的な方法は、まず *colors* " "プロパティのコピーを作成し、必要に応じてこの辞書を修正することです。" -#: ../../link.rst:58 ../../link.rst:65 2615a3ddfff64813a70192fd00cc8dbf -#: 533fc28774974c03b6ee569d110a301e +#: ../../link.rst:58 ../../link.rst:65 3104b3d644e844db944ae3665b6c89cb +#: be4fe26181df4bd18dfb13ff2743cbac msgid "*New in v1.18.16*" msgstr "*(新バージョン1.18.16で追加)*" -#: ../../link.rst:60 d6269a4c81374d3987f4521603e02817 +#: ../../link.rst:60 383edfd8cffc48289a05af780555e233 msgid "" "Set the PDF `/F` property of the link annotation. See " ":meth:`Annot.set_flags` for details. If not a PDF, this method is a no-" @@ -246,50 +246,50 @@ msgstr "" "リンク注釈のPDF `/F` プロパティを設定します。詳細については、:meth:`Annot.set_flags` " "を参照してください。PDFでない場合、このメソッドは無効です。" -#: ../../link.rst:67 305372eee87e467888923c9f56d90c81 +#: ../../link.rst:67 8ace46d310c8449cb730957a35026758 msgid "" "Return the link annotation flags, an integer (see :attr:`Annot.flags` for" " details). Zero if not a PDF." msgstr "リンク注釈フラグ、整数(詳細については :attr:`Annot.flags` を参照)。PDFでない場合、ゼロです。" -#: ../../link.rst:72 c8319e0308ba43dd8d5ad5cc04f8e14e +#: ../../link.rst:72 4f66fbc6806c4cc3afd7d0c728786903 msgid "" "Meaningful for PDF only: A dictionary of two tuples of floats in range `0" " <= float <= 1` specifying the *stroke* and the interior (*fill*) colors." -" If not a PDF, *None* is returned. As mentioned above, the fill color is " -"always `None` for links. The stroke color is used for the border of the " -"link rectangle. The length of the tuple implicitly determines the " +" If not a PDF, ``None`` is returned. As mentioned above, the fill color " +"is always `None` for links. The stroke color is used for the border of " +"the link rectangle. The length of the tuple implicitly determines the " "colorspace: 1 = GRAY, 3 = RGB, 4 = CMYK. So `(1.0, 0.0, 0.0)` stands for " "RGB color red. The value of each float *f* is mapped to the integer value" " *i* in range 0 to 255 via the computation *f = i / 255*." msgstr "" "(意味があるのはPDFのみ): ストロークと内部(*塗りつぶし*)の色を指定する `0 <= float <= 1` " -"の2つの浮動小数点数のタプルを含む辞書。PDFでない場合、*None* が返されます。上記のように、リンクの塗りつぶしの色は常に `None` " -"です。ストロークの色はリンクの境界のために使用されます。タプルの長さは暗黙的に色空間を決定します: 1 = GRAY、3 = RGB、4 = " +"の2つの浮動小数点数のタプルを含む辞書。PDFでない場合、``None`` が返されます。上記のように、リンクの塗りつぶしの色は常に `None`" +" です。ストロークの色はリンクの境界のために使用されます。タプルの長さは暗黙的に色空間を決定します: 1 = GRAY、3 = RGB、4 = " "CMYK。したがって、 `(1.0、0.0、0.0)` はRGBカラーの赤を表します。各浮動小数点数 *f* の値は、*f = i / 255* " "の計算を介して範囲0から255の整数値 *i* にマップされます。" -#: ../../link.rst f4cdc554751c46a5a409b347d02aa7ec -#: f94a4ff4717240beb479c1c030c7e389 +#: ../../link.rst a7911594ade24fedb4eb4d5aa32134e3 +#: fd0f1aaed0b7451b864e11bf131bfc85 msgid "Return type" msgstr "戻り値のタイプ" -#: ../../link.rst:78 048325ce1e9d4813b85b0d3c94cfe1f5 +#: ../../link.rst:78 8c427c80ff3040929a19af74adb2502f msgid "" "Meaningful for PDF only: A dictionary containing border characteristics. " -"It will be *None* for non-PDFs and an empty dictionary if no border " +"It will be ``None`` for non-PDFs and an empty dictionary if no border " "information exists. The following keys can occur:" msgstr "" -"(意味があるのはPDFのみ): ボーダーの特性を含む辞書。非PDFの場合、またはボーダー情報が存在しない場合、*None* " +"(意味があるのはPDFのみ): ボーダーの特性を含む辞書。非PDFの場合、またはボーダー情報が存在しない場合、``None`` " "になります。次のキーが含まれる場合があります:" -#: ../../link.rst:80 524fc58b5fc04f8cb62f0d88e25efd47 +#: ../../link.rst:80 4a20f270fb5040f285e44464113e3f4e msgid "" "*width* -- a float indicating the border thickness in points. The value " "is -1.0 if no width is specified." msgstr "*width* - ポイント単位でのボーダーの厚さを示す浮動小数点数。幅が指定されていない場合、値は-1.0になります。" -#: ../../link.rst:82 1daa81095c6a489cb8f15652d0a28b34 +#: ../../link.rst:82 031e7d00747b4e7f97f54d9125824c13 msgid "" "*dashes* -- a sequence of integers specifying a line dash pattern. *[]* " "means no dashes, *[n]* means equal on-off lengths of *n* points, longer " @@ -300,7 +300,7 @@ msgstr "" "*n*ポイントの等しいオンオフの長さを指定し、長いリストは交互にオンオフの長さ値を指定すると解釈されます。詳細については " ":ref:`AdobeManual` のページ126を参照してください。" -#: ../../link.rst:84 4d12ef6959284f7386c5efd8de1ce83d +#: ../../link.rst:84 b1ce9fb22af2473084abfad8dcc81664 msgid "" "*style* -- 1-byte border style: *S* (Solid) = solid rectangle surrounding" " the annotation, *D* (Dashed) = dashed rectangle surrounding the link, " @@ -315,47 +315,48 @@ msgstr "" "*B* (ベベル)=ページの表面から持ち上げられたように見える模倣の浮き彫りの四角形、 *I* " "(インセット)=ページの表面からくぼみがあるように見える模倣の刻まれた四角形、 *U* (下線)=注釈四角形の底部に沿った単一の線。" -#: ../../link.rst:90 ec55d4ecc16c4a8bb56512dd423991bf +#: ../../link.rst:90 f0b94d1fd724429f9db2c8920d74db77 msgid "The area that can be clicked in untransformed coordinates." msgstr "クリックできる領域、変換されていない座標での" -#: ../../link.rst 2f57260fe2484cabb88fbc8d248075d1 -#: 365b588b42354b728d1cbbe62ac22274 473fc255938a4a6596ff715c72f63cad -#: 4873abb2b81b460ca8d37c4c7772f4c6 7bda422ade9249329e55d81d322ac40a -#: da42112bd5fc465b8eaf171fcd85db00 +#: ../../link.rst 275915bb29d54074a8eee5bb003e6f35 +#: 4cc4afb263e942e982a0c610ec312fed 61d480baed10423880ce97394eef1896 +#: 70b3b447b662426ca1084fb4942fc8f6 a60b7e4f00d946b98c5bd0406ac9f8cb +#: b81ca89a6ed84d7a914f39bc42817ff7 msgid "type" msgstr "" -#: ../../link.rst:92 3f4f393768da46f3939bbd9603e68acf +#: ../../link.rst:92 ef517da173d042b5b2f74bba55ab4cde msgid ":ref:`Rect`" msgstr ":ref:`Rect` (矩形)" -#: ../../link.rst:96 351f5bb22e494262bd51551283122cc6 +#: ../../link.rst:96 d54fc6555294411bab3c8c9b85b0fbcc msgid "" "A bool specifying whether the link target is outside of the current " "document." msgstr "現在の文書の外部にリンクの対象があるかどうかを指定するブール値。" -#: ../../link.rst:98 bbc9b54f50804939a6558110f1a7b698 +#: ../../link.rst:98 64dfe441deaf43ba9c1393ca9b801ce0 msgid "bool" msgstr "" -#: ../../link.rst:102 2282e24fae8b4dcba1faf4a79c04db42 +#: ../../link.rst:102 23ce8eaf99fc4747a0d479729c096f79 msgid "" "A string specifying the link target. The meaning of this property should " "be evaluated in conjunction with property `is_external`:" msgstr "⚠️" -#: ../../link.rst:106 1ae72418f5a149478c434b4bcc8b2981 +#: ../../link.rst:106 434842aad107476da3635f648121b5d5 +#, fuzzy msgid "" "`is_external` is true: `uri` points to some target outside the current " -"PDF, which may be an internet resource (`uri` starts with \"http://\" or " +"PDF, which may be an internet resource (`uri` starts with ``http://`` or " "similar), another file (`uri` starts with \"file:\" or \"file://\") or " "some other service like an e-mail address (`uri` starts with " -"\"mailto:\")." +"``mailto:``)." msgstr "⚠️" -#: ../../link.rst:112 934a89cc4d8d4d6980edcc2534955372 +#: ../../link.rst:112 9f133b2c3fce47338ccfeb9dad429fa6 msgid "" "`is_external` is false: `uri` will be `None` or point to an internal " "location. In case of PDF documents, this should either be *#nnnn* to " @@ -365,51 +366,47 @@ msgid "" "document." msgstr "⚠️" -#: ../../link.rst:119 0075329357674ce396c4fd233b3c538d +#: ../../link.rst:119 47f95869926845dfa68de8ffff9c59ab msgid "str" msgstr "" -#: ../../link.rst:123 663785619e5842b18aa29cb77d38d4ff +#: ../../link.rst:123 05b9e3e95335428f838140f7e0e85b7b msgid "An integer specifying the PDF :data:`xref`. Zero if not a PDF." msgstr "PDF :data:`xref` を指定する整数。PDFでない場合はゼロ。" -#: ../../link.rst:125 947fdd59c54544fc8cb88c3f8177e0c3 +#: ../../link.rst:125 08dd0b407efc4037b5bf9715bf5410f4 msgid "int" msgstr "" -#: ../../link.rst:129 a2470e6ab7b64cf0a0f5c37226d7e3f7 -msgid "The next link or *None*." -msgstr "次のリンクまたは *None*。" +#: ../../link.rst:129 19952b4d82224998827923818129feeb +msgid "The next link or ``None``." +msgstr "次のリンクまたは ``None``。" -#: ../../link.rst:131 3c0c631182134ffd83be6a4e3b6d9c07 +#: ../../link.rst:131 7091be260ac544a5955b3c6502751efb msgid "*Link*" msgstr "*Link* (リンク)" -#: ../../link.rst:135 b3aa0d0eed8a47708b575d0581ea6b0a +#: ../../link.rst:135 7dd1efb015df4899bf9b0392c76b6b6d msgid "The link destination details object." msgstr "リンクの対象の詳細オブジェクト。" -#: ../../link.rst:137 e0bd96a3ef414c2d8d0d698c066aedcd +#: ../../link.rst:137 428b1356734c407883ebe43912f1f3ea msgid ":ref:`linkDest`" msgstr "" -#: ../../footer.rst:60 6e8882d9af814043bb73fb13a2bb0d5a +#: ../../footer.rst:60 9de2e7e1b27c4242976413a45087b2a6 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 8c269b31e9f145ff93ae33826f73796c -msgid "Discord logo" -msgstr "" - #~ msgid "" #~ "A string specifying the link target. " #~ "The meaning of this property should " #~ "be evaluated in conjunction with " #~ "property *isExternal*. The value may be" -#~ " *None*, in which case *isExternal ==" -#~ " False*. If *uri* starts with " +#~ " ``None``, in which case *isExternal " +#~ "== False*. If *uri* starts with " #~ "*file://*, *mailto:*, or an internet " -#~ "resource name, *isExternal* is *True*. " +#~ "resource name, *isExternal* is ``True``. " #~ "In all other cases *isExternal == " #~ "False* and *uri* points to an " #~ "internal location. In case of PDF " @@ -422,9 +419,9 @@ msgstr "" #~ "2 (1-based) in an XPS document." #~ msgstr "" #~ "リンクの対象を指定する文字列。このプロパティの意味は、プロパティ *isExternal* " -#~ "と共に評価する必要があります。値が *None* の場合、*isExternal == " +#~ "と共に評価する必要があります。値が ``None`` の場合、*isExternal == " #~ "False* です。 *uri* が *file://、mailto:* " -#~ "、またはインターネットリソース名で始まる場合、 *isExternal* は *True* " +#~ "、またはインターネットリソース名で始まる場合、 *isExternal* は ``True`` " #~ "です。それ以外の場合、 *isExternal == False* で " #~ "*uri* は内部の場所を指します。PDF文書の場合、これは1から始まるページ番号 *nnnn* " #~ "を示すために *#nnnn* " @@ -432,3 +429,6 @@ msgstr "" #~ "*uri = '../FixedDoc.fdoc#PG_2_LNK_1'* " #~ "は、2ページ(1から始まる)を示します。" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/linkdest.mo b/docs/locales/ja/LC_MESSAGES/linkdest.mo index b74c4bfbc..f4a5589f8 100644 Binary files a/docs/locales/ja/LC_MESSAGES/linkdest.mo and b/docs/locales/ja/LC_MESSAGES/linkdest.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/linkdest.po b/docs/locales/ja/LC_MESSAGES/linkdest.po index bc689111c..a8105ec2f 100644 --- a/docs/locales/ja/LC_MESSAGES/linkdest.po +++ b/docs/locales/ja/LC_MESSAGES/linkdest.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,33 +19,33 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 c7ae1f4b5f6a40d8bb8721c992dfc19c +#: ../../header.rst:-1 c9d403d602c14550a5468c49b79ec151 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 cc07b3d31f90462f8683785e55d0a5e5 +#: ../../header.rst:-1 2ce574ba495d4bef8dfc597a774b5eb2 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 7cd2b89eec8b4e0593838437d3487f2c +#: ../../header.rst:-1 8d5420280aa04b0e82c737fe2879efc1 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../linkdest.rst:7 642d1c22b5b247379ab3e52fa5368734 +#: ../../linkdest.rst:7 5be0406fa37d496c8d775d5c14ccbc9b msgid "linkDest" msgstr "" -#: ../../linkdest.rst:8 edc558b79898455baf113c0c56e39121 +#: ../../linkdest.rst:8 dbc5983be663459da1a305db6fd4b633 msgid "" "Class representing the `dest` property of an outline entry or a link. " "Describes the destination to which such entries point." msgstr "アウトラインエントリまたはリンクの `dest` プロパティを表すクラス。これらのエントリが指す先の目的地を説明します。" -#: ../../linkdest.rst:10 bd1bdbda078b413aaf7f70340185c3ef +#: ../../linkdest.rst:10 fadcf1b2cb264b42a61422b1b39f9940 msgid "" "Up to MuPDF v1.9.0 this class existed inside MuPDF and was dropped in " "version 1.10.0. For backward compatibility, PyMuPDF is still maintaining " @@ -55,115 +55,115 @@ msgstr "" "MuPDF " "v1.9.0まで、このクラスはMuPDF内に存在し、バージョン1.10.0で削除されました。後方互換性のため、PyMuPDFはそれを引き続き維持していますが、その属性のいくつかは実際にはMuPDFを介して利用可能なデータでバックアップされていないことに注意してください。" -#: ../../linkdest.rst:13 ce64560004174982a5aca5faee977807 +#: ../../linkdest.rst:13 5cc4c7e9b4c94a61b74581d3ab546826 msgid "**Attribute**" msgstr "**属性**" -#: ../../linkdest.rst:13 d641c2a24bbc42e49c30b0c7654d1cdb +#: ../../linkdest.rst:13 2bb1dd6fb2e14d74b6262ace5e110a91 msgid "**Short Description**" msgstr "**短い説明**" -#: ../../linkdest.rst:15 54abd340aa124790ab2c2af89b34ffd0 +#: ../../linkdest.rst:15 4f46e630676f4c0d9573cd5caeeeec87 msgid ":attr:`linkDest.dest`" msgstr "" -#: ../../linkdest.rst:15 3541634ad3c1463f8caec96a7c27f0b8 +#: ../../linkdest.rst:15 b8176d37e0ab4c298fa79512e4e04ca7 msgid "destination" msgstr "目的地" -#: ../../linkdest.rst:16 2febf49e60ca4f71b5e564e49e008c72 +#: ../../linkdest.rst:16 7d38469c9fd94cc5ae034b83b7dc6c89 msgid ":attr:`linkDest.fileSpec`" msgstr "" -#: ../../linkdest.rst:16 2b7586a701334911b2569f5589045f7b +#: ../../linkdest.rst:16 c7535db1bddc446a8d9ec72cbe6ffee5 msgid "file specification (path, filename)" msgstr "ファイル仕様(パス、ファイル名)" -#: ../../linkdest.rst:17 995991331502480ba15f0a7c55164fa5 +#: ../../linkdest.rst:17 09737ba6f55b4fd39a12293d1d0d3425 msgid ":attr:`linkDest.flags`" msgstr "" -#: ../../linkdest.rst:17 399de24acc6e4e91933d26464b7ed97d +#: ../../linkdest.rst:17 b064dee65c8e4774b3aaf4042b4297e5 msgid "descriptive flags" msgstr "説明的なフラグ" -#: ../../linkdest.rst:18 48a41064dc254c4db5343665ad735f59 +#: ../../linkdest.rst:18 4bcf60e4eab64157a425d9fc9067c73d msgid ":attr:`linkDest.isMap`" msgstr "" -#: ../../linkdest.rst:18 1054ee9dd57f487faf3f761f66ea374b +#: ../../linkdest.rst:18 07f875efd9754adc83c776866a862b02 msgid "is this a MAP?" msgstr "これはMAPですか?" -#: ../../linkdest.rst:19 834d187117814d16b31a980d7fa68e5a +#: ../../linkdest.rst:19 91af568ccac84cd5b4ee16d388bbb93e msgid ":attr:`linkDest.isUri`" msgstr "" -#: ../../linkdest.rst:19 23959cecce9d4a76aa7680a3ce7ef1a1 +#: ../../linkdest.rst:19 ee75600c30be45058d58b89f78d55876 msgid "is this a URI?" msgstr "これはURIですか?" -#: ../../linkdest.rst:20 2afc08d35d214c7eae5dce92f01357c5 +#: ../../linkdest.rst:20 855d7ecb78564fbcbf4373cff63475fe msgid ":attr:`linkDest.kind`" msgstr "" -#: ../../linkdest.rst:20 8682d11f401f437c8c0ec7ac0a9eb990 +#: ../../linkdest.rst:20 8649be963579431cbf6b4132d29871dc msgid "kind of destination" msgstr "目的地の種類" -#: ../../linkdest.rst:21 75fc20a075654b18ae9236f8250e4155 +#: ../../linkdest.rst:21 2e3bd4e2ae394a558dbc24ba2ac241b8 msgid ":attr:`linkDest.lt`" msgstr "" -#: ../../linkdest.rst:21 59693accefc442f083a0556f0fe9bcc5 +#: ../../linkdest.rst:21 704e8f3a402648918640ee171f22159a msgid "top left coordinates" msgstr "左上の座標" -#: ../../linkdest.rst:22 450e3a552cc6467091bd004becd47db0 +#: ../../linkdest.rst:22 e72f8149e16f4a28b4994101fa9458fa msgid ":attr:`linkDest.named`" msgstr "" -#: ../../linkdest.rst:22 415655173d044c13b3ba18b9068f82f1 +#: ../../linkdest.rst:22 7024a1c5676a4db182cde158adddcefd msgid "name if named destination" msgstr "名前付き目的地の名前" -#: ../../linkdest.rst:23 4615a0d12fba4faf8cb7ffd5435b49c5 +#: ../../linkdest.rst:23 a607a689ec9a430585a215fd17274636 msgid ":attr:`linkDest.newWindow`" msgstr "" -#: ../../linkdest.rst:23 e69a9088c11f437e990d2507e487517d +#: ../../linkdest.rst:23 306056d18da1405fb16d64afcd5db2b1 msgid "name of new window" msgstr "新しいウィンドウの名前" -#: ../../linkdest.rst:24 5cb427cbe0174bed8f13427acb90b315 +#: ../../linkdest.rst:24 0e354263696b4dea884ce7b0e8659268 msgid ":attr:`linkDest.page`" msgstr "" -#: ../../linkdest.rst:24 b3200edc188b46cf82dcfd4ae6c0d612 +#: ../../linkdest.rst:24 709b2315bb6242709a51deccd9017a09 msgid "page number" msgstr "ページ番号" -#: ../../linkdest.rst:25 5d3f5e497105490097ba04edd117d505 +#: ../../linkdest.rst:25 db8af5778b80458c8954ad3b5d8f4b1d msgid ":attr:`linkDest.rb`" msgstr "" -#: ../../linkdest.rst:25 2efa129c8b8147ff9c391ea3b37bfe0d +#: ../../linkdest.rst:25 cc7df48156634225ab78f47225de634e msgid "bottom right coordinates" msgstr "右下の座標" -#: ../../linkdest.rst:26 549b3aa583a340368ef1265c404379f7 +#: ../../linkdest.rst:26 9591bd156430496fa34539728e98f4f2 msgid ":attr:`linkDest.uri`" msgstr "" -#: ../../linkdest.rst:26 da326e97578d481f87b400ea4d0e7e0e +#: ../../linkdest.rst:26 cd8d4153a6044983bdc26e8c29c809ad msgid "URI" msgstr "" -#: ../../linkdest.rst:29 ef29d23bfdf341eca51fbdcb51071d76 +#: ../../linkdest.rst:29 578749192c9f4502a4e8daf7c90af448 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../linkdest.rst:35 ae71905d1c13467d84171423a343e443 +#: ../../linkdest.rst:35 bcd161881123491fb6ea03b01fee7817 msgid "" "Target destination name if :attr:`linkDest.kind` is :data:`LINK_GOTOR` " "and :attr:`linkDest.page` is *-1*." @@ -171,24 +171,24 @@ msgstr "" ":attr:`linkDest.kind` が:data:`LINK_GOTOR` であり、:attr:`linkDest.page` が " "*-1* の場合、対象の宛先名。" -#: ../../linkdest.rst 07a6a4ec30ad47f7be433c6a654617cc -#: 095d3686fc0949688c05bf0454c5e200 3bb6e15c10ca45079c22a4190fa1c888 -#: 4f88f6d6f22f499ab137b3d3505d0f3d 608c19d1df3541e6ba7b6e75bb9b09ac -#: 66e78c6aa27f4817a639e0d80c2bec4f 7eb5a98c54924f1aa0dd03f1f95f844b -#: 8f02277c51d64b44a9d8af8332882d33 90cf3a3718ff444987550ec2c8bc0437 -#: ab0151e821a341c399c2846b4f24e066 bd4f0a4742a7412bb703453b0531b3be -#: d85da3784b5d41afba5464aff580aab8 +#: ../../linkdest.rst 24dee675d4504f8981a51fa2b8c9ae57 +#: 3c8f45e7a79841869726ce8c2db738bb 4e7db470641845cb993cb6d79edfc402 +#: 5282e07210cd45d1afe857765c18bb82 600998af429f4438b130f86a27543213 +#: 6190f4a6cbe547ee9bd7ce0672cbe0ea 6a314b30d1cd42cfb8ce9fbf698ea996 +#: 870a506b36024eee8203fa29ce90b30b a7317f9a30854058bcfea86fbe37948e +#: cefd59f82f5344b9bb86d527d790c30d df60e9fbe1294169ba1907f3adf1b9ee +#: f0cbb7037b834652bf39d488832ee865 msgid "type" msgstr "" #: ../../linkdest.rst:37 ../../linkdest.rst:43 ../../linkdest.rst:79 -#: ../../linkdest.rst:103 005d28ec5d7e4b8082dbfe153306bd4d -#: 39b141f3c206406082cefdd46d5083be d668624f91ae4e7dbbdaff15575ff1c6 -#: f7a3eee263ea4cddae49893aab3a949b +#: ../../linkdest.rst:103 5bb912195e6349f8b39f6b50f9cb244b +#: 621a722c520f47be96d16809c80f9936 ef378de79abf404d8902449278613652 +#: f1c0a413cf6f4affa2d72ce50adf67ef msgid "str" msgstr "" -#: ../../linkdest.rst:41 e678f66ab59e4695948714032eecbb50 +#: ../../linkdest.rst:41 0d7b86556af7432ca01f62687b7105b8 msgid "" "Contains the filename and path this link points to, if " ":attr:`linkDest.kind` is :data:`LINK_GOTOR` or :data:`LINK_LAUNCH`." @@ -196,7 +196,7 @@ msgstr "" ":attr:`linkDest.kind` が :data:`LINK_GOTOR` または :data:`LINK_LAUNCH` " "の場合、このリンクが指すファイル名とパスが含まれています。" -#: ../../linkdest.rst:47 8943cf9f7b6a46ae88519ec9a2b36abc +#: ../../linkdest.rst:47 e82ff43942aa42d181926cc8311a04ad msgid "" "A bitfield describing the validity and meaning of the different aspects " "of the destination. As far as possible, link destinations are constructed" @@ -210,30 +210,30 @@ msgstr "" " Flags` を参照してください。" #: ../../linkdest.rst:49 ../../linkdest.rst:67 ../../linkdest.rst:91 -#: 226041ad921b487cbc64a0d8101fafce 47f99943021a469aaeb9e878d45bad7d -#: bfbfb857c3ea464bb219268f046d38be +#: 1e2a30929fb3424ca85ef2673484279a c4abce4eafe44aa48a61e88929d22db8 +#: e6f10f094da249a08f0b1da68a5ad807 msgid "int" msgstr "" -#: ../../linkdest.rst:53 93c225a1fa7a4e759b7288467340134c +#: ../../linkdest.rst:53 5ca1397ac660408a8118784ff2e478e2 msgid "" "This flag specifies whether to track the mouse position when the URI is " "resolved. Default value: False." msgstr "このフラグは、URIが解決されるときにマウスの位置を追跡するかどうかを指定します。デフォルト値:False。" #: ../../linkdest.rst:55 ../../linkdest.rst:61 ../../linkdest.rst:85 -#: 1c35303c34b44e748eba9ad9a8ce151f 5f716f8888934c8fab243c3a08e2c99b -#: 79f8cf46eabc4dd18cbfc2f1ccfd1875 +#: 03a9fad387d243f5936876e77a91a777 5d8a261398264f87bcb172afe9477166 +#: b1cc8e9c4d094ea7b9418b5001babd00 msgid "bool" msgstr "" -#: ../../linkdest.rst:59 b4bf4ffcaf5640b688eb404242124b25 +#: ../../linkdest.rst:59 9653264615ef4612b74c934e94035162 msgid "" "Specifies whether this destination is an internet resource (as opposed to" " e.g. a local file specification in URI format)." msgstr "この宛先がインターネットリソースであるか(URI形式のローカルファイル仕様とは異なる場合)、指定します。" -#: ../../linkdest.rst:65 84de128b7a504abaa4a2f6fc93890306 +#: ../../linkdest.rst:65 572624f8e5234fcfabe2886d19f59fb8 msgid "" "Indicates the type of this destination, like a place in this document, a " "URI, a file launch, an action or a place in another file. Look at " @@ -242,16 +242,16 @@ msgstr "" "この宛先のタイプを示します。この文書内の場所、URI、ファイル起動、アクション、または他のファイル内の場所など。リンク宛先の種類を確認するには、:ref:`linkDest" " Kinds` を参照してください。" -#: ../../linkdest.rst:71 0948c762cf2341f5927c66a89e8c9ef3 +#: ../../linkdest.rst:71 8df3c853090f4d899931e326f5459d67 msgid "The top left :ref:`Point` of the destination." msgstr "宛先の左上の :ref:`Point` 。" -#: ../../linkdest.rst:73 ../../linkdest.rst:97 6e78e40991f84930b5871e092807598b -#: b28d1d351b90442c9f8e62ef5dcbdac5 +#: ../../linkdest.rst:73 ../../linkdest.rst:97 3c5d8c4d8bb041fc8c0f7572f332a8fa +#: 4501f09bd6dd44348a5a0d661f366be0 msgid ":ref:`Point`" msgstr "" -#: ../../linkdest.rst:77 245844ae70044380a0b912149fa98c67 +#: ../../linkdest.rst:77 35ddae2dc20442baa69cb10014649914 msgid "" "This destination refers to some named action to perform (e.g. a " "javascript, see :ref:`AdobeManual`). Standard actions provided are " @@ -260,11 +260,11 @@ msgstr "" "この宛先は実行する名前付きアクションを指します(たとえば、JavaScriptなど、:ref:`AdobeManual` " "を参照)。提供される標準アクションは、*NextPage*、*PrevPage*、*FirstPage*、および *LastPage* です。" -#: ../../linkdest.rst:83 a4514486d31c4694b2a2e53f8d5ec397 +#: ../../linkdest.rst:83 8f9e7bda1b8f488aa95b2e92bbb2e3d2 msgid "If true, the destination should be launched in a new window." msgstr "trueの場合、宛先は新しいウィンドウで起動する必要があります。" -#: ../../linkdest.rst:89 de6335fc77f44645bbf8b6e5847c4ff3 +#: ../../linkdest.rst:89 2a3bd78c3548465da36247eac48b559e msgid "" "The page number (in this or the target document) this destination points " "to. Only set if :attr:`linkDest.kind` is :data:`LINK_GOTOR` or " @@ -277,19 +277,18 @@ msgstr "" ":data:`LINK_GOTOR` の場合、*-1* になる場合があります。この場合、:attr:`linkDest.dest` " "には対象の文書内の宛先の名前が含まれます。" -#: ../../linkdest.rst:95 36eb348ce8c84de2972f60c8c6ec617b +#: ../../linkdest.rst:95 c402b9a2b14a499684cc75932a7b3061 msgid "The bottom right :ref:`Point` of this destination." msgstr "この宛先の右下の :ref:`Point`。" -#: ../../linkdest.rst:101 f420474f449b4549a50c7d45736a1629 +#: ../../linkdest.rst:101 efac7e980e8e403c9d1c9d57cd1420bc msgid "The name of the URI this destination points to." msgstr "この宛先が指すURIの名前。" -#: ../../footer.rst:71 c4db191277414e66bbfc547c723f812a +#: ../../footer.rst:60 d9aa1a371bcc4440af0a82a4a3ca0b1f msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 4fb4742851a84b719525b0c09ef20a84 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/lowlevel.mo b/docs/locales/ja/LC_MESSAGES/lowlevel.mo index 32482ec10..4c8a5f86a 100644 Binary files a/docs/locales/ja/LC_MESSAGES/lowlevel.mo and b/docs/locales/ja/LC_MESSAGES/lowlevel.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/lowlevel.po b/docs/locales/ja/LC_MESSAGES/lowlevel.po index d036f362d..2e4cb7fd9 100644 --- a/docs/locales/ja/LC_MESSAGES/lowlevel.po +++ b/docs/locales/ja/LC_MESSAGES/lowlevel.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,37 +19,36 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 d5aeae7ef7be45bbabb80ed574b4487b +#: ../../header.rst:-1 f8b51ec0649943efad8a9aad2f2ae5f0 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 7d68e2d5adbc4c30a772ece241ee28b5 +#: ../../header.rst:-1 f7f6d9b162764bd5bab35f0de0f68994 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 7650a5e4747d46a4807e7d1330b19e18 +#: ../../header.rst:-1 320005d084534805bbe61a078db61350 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../lowlevel.rst:5 6c3af0ca807f4570ac531464b7942127 +#: ../../lowlevel.rst:5 4f2d1ec9ba784ccaaa499966f89668e5 msgid "Low Level Functions and Classes" msgstr "低レベルの関数とクラス" -#: ../../lowlevel.rst:6 b4a00c72fe96419a908d418019c0aa5a +#: ../../lowlevel.rst:6 b0646074fd384255aef9e51bfce2650a msgid "" "Contains a number of functions and classes for the experienced user. To " "be used for special needs or performance requirements." msgstr "経験豊富なユーザー向けの関数とクラスが多数含まれています。 特別なニーズやパフォーマンス要件に使用します。" -#: ../../footer.rst:71 a925bcd4f7074f7cbe63304070749d66 +#: ../../footer.rst:60 4631787f1e8f470d9ab48b85edc12753 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 186d4473eb6d4a9386ca02cb2ef97b13 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/matrix.mo b/docs/locales/ja/LC_MESSAGES/matrix.mo index 830e6d643..53e3fc3f5 100644 Binary files a/docs/locales/ja/LC_MESSAGES/matrix.mo and b/docs/locales/ja/LC_MESSAGES/matrix.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/matrix.po b/docs/locales/ja/LC_MESSAGES/matrix.po index 902f55209..2911cbf68 100644 --- a/docs/locales/ja/LC_MESSAGES/matrix.po +++ b/docs/locales/ja/LC_MESSAGES/matrix.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 df64945755244578a7ff84c633ab18ce +#: ../../header.rst:-1 242eb81f189c4016a548fd715a9f13b5 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 67ebf307a6b349fd923735139429bf62 +#: ../../header.rst:-1 bb9d01d114264cef930ea9b831061c3e msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 807fe99c4fc947f8af565805677dc243 +#: ../../header.rst:-1 fa0d02bf3c9342cea931efccacae42f7 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../matrix.rst:7 1f8e9374ce6b4a9fa2f121c3ef83b16e +#: ../../matrix.rst:7 9283aaa03cc44045984fc152476c6dd2 msgid "Matrix" msgstr "Matrix (マトリックス)" -#: ../../matrix.rst:9 18ae30709aa24e3499e11c155e8f7206 +#: ../../matrix.rst:9 4c0e27b65783400d8f57bf9ed2242836 msgid "" "Matrix is a row-major 3x3 matrix used by image transformations in MuPDF " "(which complies with the respective concepts laid down in the " @@ -51,7 +51,7 @@ msgstr "" "マトリックスは、MuPDFでの画像変換に使用される行優先の3x3マトリックスです(これは :ref:`AdobeManual` " "に規定されている対応するコンセプトに従っています)。マトリックスを使用することで、ページの描画画像をさまざまな方法で操作できます。ページの一部またはすべてを回転、拡大縮小、反転、せん断、シフトなどに設定することができます。これらの操作には、たった6つの浮動小数点数値のいくつかまたはすべてを設定します。" -#: ../../matrix.rst:12 cb24c92a68fa438397d1779915165e26 +#: ../../matrix.rst:12 1a064bfd9cea4d4b9a529ccafe18376a msgid "" "Since all points or pixels live in a two-dimensional space, one column " "vector of that matrix is a constant unit vector, and only the remaining " @@ -62,17 +62,17 @@ msgstr "" "すべてのポイントまたはピクセルは2次元の空間に存在するため、そのマトリックスの1つの列ベクトルは定数ユニットベクトルであり、操作に使用されるのは残りの6つの要素のみです。これらの6つの要素は通常、" " *[a、b、c、d、e、f]* で表されます。以下は、それらがマトリックス内でどのように配置されているかです。" -#: ../../matrix.rst:17 74dd0769567f4919801981033cf5d16c +#: ../../matrix.rst:17 2a5325813bb649909ff46687ddd1ecd4 msgid "Please note:" msgstr "注意点:" -#: ../../matrix.rst:19 b2793011f00f4f0185dbd7a29bba3ef0 +#: ../../matrix.rst:19 f08be1fa5d2044b8abb4481e4f6d8351 msgid "" "the below methods are just convenience functions -- everything they do, " "can also be achieved by directly manipulating the six numerical values" msgstr "以下のメソッドは便宜的な機能であり、行うすべてのことは、6つの数値の値を直接操作しても実現できます。" -#: ../../matrix.rst:20 c370d39a4a7c441e9967a670ba21bbf1 +#: ../../matrix.rst:20 61ef9621468141248b63ac18be006ace msgid "" "all manipulations can be combined -- you can construct a matrix that " "rotates **and** shears **and** scales **and** shifts, etc. in one go. If " @@ -82,157 +82,157 @@ msgstr "" "すべての操作を組み合わせることができます。1回の操作で回転、せん断、スケール、シフトなどを同時に実行するマトリックスを構築できます。ただし、これを行う場合は、後での" " **注釈** または :ref:`AdobeManual` を参照してください。" -#: ../../matrix.rst:23 cebd8094cb774308a30c2a45f48e5df5 +#: ../../matrix.rst:23 e902ce55a5224c66a24024cd09f42fe6 msgid "**Method / Attribute**" msgstr "**メソッド/属性**" -#: ../../matrix.rst:23 dd1e433f17be4838b7e7fc77cffbc777 +#: ../../matrix.rst:23 f1a484726d804fd4aee4fb7e2ab17da5 msgid "**Description**" msgstr "**説明**" -#: ../../matrix.rst:25 5e753cb7d4804ccf808c8d709d4ff005 +#: ../../matrix.rst:25 d5be8262eaa44272a507cf4cfa406bfb msgid ":meth:`Matrix.prerotate`" msgstr "" -#: ../../matrix.rst:25 cadd3fe36f384e3bbb8775300fe521dd +#: ../../matrix.rst:25 7760e2c90c09424a8089b1c277c95a80 msgid "perform a rotation" msgstr "回転を実行" -#: ../../matrix.rst:26 49176585fe494ce8a6bdfb020b4c8087 +#: ../../matrix.rst:26 0346369679c541288f8bc97a641de409 msgid ":meth:`Matrix.prescale`" msgstr "" -#: ../../matrix.rst:26 e553f1e35555444fb12b3d9c5219098d +#: ../../matrix.rst:26 655619aef04c4325aed26c24acd0bb13 msgid "perform a scaling" msgstr "スケーリングを実行" -#: ../../matrix.rst:27 c7fc60752d6340c1996db11e355446ef +#: ../../matrix.rst:27 9b7582d8caa146f9945fc115de600542 msgid ":meth:`Matrix.preshear`" msgstr "" -#: ../../matrix.rst:27 cdad0780bc964ed3b1b75907679c27b1 +#: ../../matrix.rst:27 d6bc460db1894fb7a3dbc07aa72ea3fe msgid "perform a shearing (skewing)" msgstr "せん断(歪み)を実行" -#: ../../matrix.rst:28 3cdba170b64345108224762a83173890 +#: ../../matrix.rst:28 b337189589084fc483443ca54f5143b9 msgid ":meth:`Matrix.pretranslate`" msgstr "" -#: ../../matrix.rst:28 2b4a533fc8c946c59c21f7d8b1cc1531 +#: ../../matrix.rst:28 743965a5ace043e59e3bbd9d545f905e msgid "perform a translation (shifting)" msgstr "移動(シフト)を実行" -#: ../../matrix.rst:29 0e0eeb5b01d0498d8a3cc5c81cefce43 +#: ../../matrix.rst:29 13f27af0b48c4188a6fb06859bf34472 msgid ":meth:`Matrix.concat`" msgstr "" -#: ../../matrix.rst:29 c8cba5e233c84ec5938e7e83e08db8cb +#: ../../matrix.rst:29 d1b607732c374b22956351394880f684 msgid "perform a matrix multiplication" msgstr "マトリックスの乗算を実行" -#: ../../matrix.rst:30 2612aac598884404a081ceca9b5707ff +#: ../../matrix.rst:30 f776b8b3c958417ba6a5507d84f6a4b6 msgid ":meth:`Matrix.invert`" msgstr "" -#: ../../matrix.rst:30 8ca86bccd1f843fea44389a11ec672e2 +#: ../../matrix.rst:30 06d30fd8d9d6449585c19f4c4220fc05 msgid "calculate the inverted matrix" msgstr "反転されたマトリックスを計算" -#: ../../matrix.rst:31 3c60a69da94241979e0ee30e8f532ade +#: ../../matrix.rst:31 4dfd9496705b442bab52c7c94e928c40 msgid ":meth:`Matrix.norm`" msgstr "" -#: ../../matrix.rst:31 9aaff54de5bb4e59b909c62d3830295b +#: ../../matrix.rst:31 f30f0f921e0e4d3dba24fdb51f158b52 msgid "the Euclidean norm" msgstr "ユークリッドノルム" -#: ../../matrix.rst:32 7a5550204a8e41d58733e5a257c8c461 +#: ../../matrix.rst:32 9298a772e17f4df2ad06786de3ec6010 msgid ":attr:`Matrix.a`" msgstr "" -#: ../../matrix.rst:32 a0e2b617736f43a39ec3cbfb95500898 +#: ../../matrix.rst:32 cf66ac10810b43aabd51ce1826ed79c8 msgid "zoom factor X direction" msgstr "ズームファクターX方向" -#: ../../matrix.rst:33 f0f2653d8c5d45119499f4174347f609 +#: ../../matrix.rst:33 f5bd431f29634be4813e1191c46b46ee msgid ":attr:`Matrix.b`" msgstr "" -#: ../../matrix.rst:33 e3af7c34107248e9b11fefa492d61886 +#: ../../matrix.rst:33 f93ed8344eec4c5d81c38f51e92106d3 msgid "shearing effect Y direction" msgstr "せん断効果Y方向" -#: ../../matrix.rst:34 b354c6a80ad44b99baa0bc1d8dc1fcd1 +#: ../../matrix.rst:34 2af17db937cd4675b9a1a28f61a2304b msgid ":attr:`Matrix.c`" msgstr "" -#: ../../matrix.rst:34 8e0d6d3768134bfa97c7245b1921479b +#: ../../matrix.rst:34 d5a463f548554be2834bfdce81edf2da msgid "shearing effect X direction" msgstr "せん断効果X方向" -#: ../../matrix.rst:35 d717370fb6d844c7833667e281f77d85 +#: ../../matrix.rst:35 a4465153bdc5456f841e0b47bc167dc4 msgid ":attr:`Matrix.d`" msgstr "" -#: ../../matrix.rst:35 6577148108a8408faec08c81982efc84 +#: ../../matrix.rst:35 fb6f90dbf6e54dbea14e73618d21710c msgid "zoom factor Y direction" msgstr "ズームファクターY方向" -#: ../../matrix.rst:36 607a77b892b241df8631506c9c204a48 +#: ../../matrix.rst:36 66ca967922ef4012870a53fe43ef16e7 msgid ":attr:`Matrix.e`" msgstr "" -#: ../../matrix.rst:36 9d31af61617946e68dc2f399e2367850 +#: ../../matrix.rst:36 102c3e26603f45a49de9fa42d4e550ea msgid "horizontal shift" msgstr "水平シフト" -#: ../../matrix.rst:37 d42d24692e4f46fbb44875c3937f8991 +#: ../../matrix.rst:37 d82356145558412a9731bd811389cc3f msgid ":attr:`Matrix.f`" msgstr "" -#: ../../matrix.rst:37 22fd4e00519443009509da98a68b4f44 +#: ../../matrix.rst:37 22a7a9f4840048eba1eb07f4bcd128f2 msgid "vertical shift" msgstr "垂直シフト" -#: ../../matrix.rst:38 e78f6197e90a4c4992ce2b04c21cdc86 +#: ../../matrix.rst:38 ac127ca9ea1e49808e4f8d024d86b57d msgid ":attr:`Matrix.is_rectilinear`" msgstr "" -#: ../../matrix.rst:38 6a70401ac0af48d7b6f5fd355ec572d6 +#: ../../matrix.rst:38 e192cd84a84a43169016bda4ddde14d6 msgid "true if rect corners will remain rect corners" msgstr "角の位置が直線のままの場合はTrue" -#: ../../matrix.rst:41 1e0a0148d8134faf85346b06e54956ac +#: ../../matrix.rst:41 70b5f1b6920c4fa886a23f9c3030a78e msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../matrix.rst:59 0061b75bba2945fcb3a72a36b21c784e +#: ../../matrix.rst:59 7a2e0f40ae7a4551a3e45b239ebdfde8 msgid "Overloaded constructors." msgstr "オーバーロードされたコンストラクター。" -#: ../../matrix.rst:61 54aed815e2304243954b5de86c3620d4 +#: ../../matrix.rst:61 a13dcebe0957414bbf1138038ab5f26a msgid "" "Without parameters, the zero matrix *Matrix(0.0, 0.0, 0.0, 0.0, 0.0, " "0.0)* will be created." msgstr "パラメーターなしの場合、ゼロ行列 *Matrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)* が作成されます。" -#: ../../matrix.rst:63 ff9fbefe1abd49a688793e92120cb05f +#: ../../matrix.rst:63 e2ac98fa7803457a882513667a7bf0e9 msgid "" "*zoom-** and *shear-** specify zoom or shear values (float) and create a " "zoom or shear matrix, respectively." msgstr "*zoom-** および *shear-** はズームまたはシアーの値(float)を指定し、それぞれズームまたはシアーの行列を作成します。" -#: ../../matrix.rst:65 e51f5092c2c24517ba223448ceaefe5c +#: ../../matrix.rst:65 f11d24ff5b7d49029ac2b71f8c429d70 msgid "For \"matrix\" a **new copy** of another matrix will be made." msgstr "\"matrix\" の場合、別の行列の **新しいコピー** が作成されます。" -#: ../../matrix.rst:67 fa44eb6c65e84f74910f19d48be761a9 +#: ../../matrix.rst:67 9a491f75b29f499c8b2459f23fe86c66 msgid "" "Float value \"degree\" specifies the creation of a rotation matrix which " "rotates anti-clockwise." msgstr "浮動小数点値 \"degree\" は、反時計回りに回転する行列を作成することを指定します。" -#: ../../matrix.rst:69 70ab75004bd94d3faa37b39e6a71fb56 +#: ../../matrix.rst:69 4aea28e766aa41838ed8ce5ecbb30661 msgid "" "A \"sequence\" must be any Python sequence object with exactly 6 float " "entries (see :ref:`SequenceTypes`)." @@ -240,25 +240,26 @@ msgstr "" "\"sequence\" は、正確に 6 つの浮動小数点エントリを持つ任意の Python " "シーケンスオブジェクトである必要があります(:ref:`SequenceTypes`)。" -#: ../../matrix.rst:71 7eb10a0515a7448f8d6404d7005a00aa +#: ../../matrix.rst:71 89a09710a0cb4d71a6ce2fee2f9022b5 #, fuzzy msgid "" -"*pymupdf.Matrix(1, 1)* and *pymupdf.Matrix(pymupdf.Identity)* create modifiable " -"versions of the :ref:`Identity` matrix, which looks like *[1, 0, 0, 1, 0," -" 0]*." +"*pymupdf.Matrix(1, 1)* and *pymupdf.Matrix(pymupdf.Identity)* create " +"modifiable versions of the :ref:`Identity` matrix, which looks like *[1, " +"0, 0, 1, 0, 0]*." msgstr "" -"*pymupdf.Matrix(1, 1)*、*pymupdf.Matrix(0.0)* および *pymupdf.Matrix(pymupdf.Identity)*) " -"は、*[1, 0, 0, 1, 0, 0]* のような :ref:`Identity` マトリックスの修正可能なバージョンを作成します。" +"*pymupdf.Matrix(1, 1)*、*pymupdf.Matrix(0.0)* および " +"*pymupdf.Matrix(pymupdf.Identity)*) は、*[1, 0, 0, 1, 0, 0]* のような " +":ref:`Identity` マトリックスの修正可能なバージョンを作成します。" -#: ../../matrix.rst:75 a9b95d46c9774e1a84b223e1358c46da +#: ../../matrix.rst:75 d4dad4072a314438acfc6a4da4b03eb1 msgid "New in version 1.16.0" msgstr "バージョン 1.16.0 で新規追加" -#: ../../matrix.rst:77 053a740b2f414b099c697c8039286410 +#: ../../matrix.rst:77 0835ef04181f45bfa17fcc8d3bcdb4dc msgid "Return the Euclidean norm of the matrix as a vector." msgstr "ベクトルとしての行列のユークリッドノルムを返します。" -#: ../../matrix.rst:81 c7f01d13db50496a98cc99b3302ba62a +#: ../../matrix.rst:81 9f88266f068b4911b0a8919869076872 msgid "" "Modify the matrix to perform a counter-clockwise rotation for positive " "*deg* degrees, else clockwise. The matrix elements of an identity matrix " @@ -267,24 +268,24 @@ msgstr "" "マトリックスを修正して、正の *deg* " "度の場合は反時計回りに、それ以外の場合は時計回りに回転します。アイデンティティマトリックスの行列要素は以下のように変更されます:" -#: ../../matrix.rst:83 cd58736f05d74e7796716f4edd03c3ae +#: ../../matrix.rst:83 ae02ec62a7c54c96a841c87528133cec msgid "*[1, 0, 0, 1, 0, 0] -> [cos(deg), sin(deg), -sin(deg), cos(deg), 0, 0]*." msgstr "*[1, 0, 0, 1, 0, 0] -> [cos(deg), sin(deg), -sin(deg), cos(deg), 0, 0]*。" -#: ../../matrix.rst 02fbc813d1fa4d479c5cea792d1c6af7 -#: 115d89ad80ff4b04a2d2bd95ec788b9a 2bf80908bd5d40deb1545194f29a1d92 -#: 9b85d94db8dc476fa21abc1119cddd14 a2254296541a46a99e39f6ffb450b1a8 -#: d15396938b504b9bb1db60db3510ca0e +#: ../../matrix.rst 02825da12cfe414aa676494dcb2379c6 +#: 2c0431eba042448d87fbb8870c49f5b7 30d95892cb07480d8952ab330c60047a +#: 3545fc3d74134524ba4aa7ae2c7f151f 89c5ebeb86bc40a084ef67cdeab2792f +#: d58e17106b014e639386f6ea4023f6c6 msgid "Parameters" msgstr "" -#: ../../matrix.rst:85 31aa27bde6b347bcb16007a53855e650 +#: ../../matrix.rst:85 99cb1715288c4114b0aa5248c7f42a42 msgid "" "The rotation angle in degrees (use conventional notation based on Pi = " "180 degrees)." msgstr "度単位での回転角度(180度ベースの従来の表記法を使用します)。" -#: ../../matrix.rst:89 d16f4f38b4964b9a87dc4b6e51e08500 +#: ../../matrix.rst:89 9e021489b4d447c09015bf937b5db569 msgid "" "Modify the matrix to scale by the zoom factors sx and sy. Has effects on " "attributes *a* thru *d* only: *[a, b, c, d, e, f] -> [a*sx, b*sx, c*sy, " @@ -293,19 +294,19 @@ msgstr "" "マトリックスを修正してズームファクター sx および sy でスケーリングします。属性 *a* から *d* にのみ影響を与えます: *[a, " "b, c, d, e, f] -> [a*sx, b*sx, c*sy, d*sy, e, f]*。" -#: ../../matrix.rst:91 74cf6b260e7840b6b99d46ed62fbbe0b +#: ../../matrix.rst:91 6b157bcf2638428e8d65806254027d38 msgid "" "Zoom factor in X direction. For the effect see description of attribute " "*a*." msgstr "X方向のズームファクター。効果については属性 *a* の説明を参照してください。" -#: ../../matrix.rst:93 e9a0d7a92fc6456eb703a24d46278ccd +#: ../../matrix.rst:93 5b09d5840db149e3870b1e1f012041dc msgid "" "Zoom factor in Y direction. For the effect see description of attribute " "*d*." msgstr "Y方向のズームファクター。効果については属性 *d* の説明を参照してください。" -#: ../../matrix.rst:97 6ea6fb2979464410886f23497bac6cb9 +#: ../../matrix.rst:97 1a0cce8d493f472eb54aa98b8fe97859 msgid "" "Modify the matrix to perform a shearing, i.e. transformation of " "rectangles into parallelograms (rhomboids). Has effects on attributes *a*" @@ -314,15 +315,15 @@ msgstr "" "行列を修正して、シアリング、つまり長方形を平行四辺形(ひし形)に変換する操作を実行します。属性 *a* から *d* にのみ影響を与えます: " "*[a, b, c, d, e, f] -> [c*sy, d*sy, a*sx, b*sx, e, f]*。" -#: ../../matrix.rst:99 24a1f3f6560241feb1e3da3ab9eb4b01 +#: ../../matrix.rst:99 e29c34cf958e4e698e856cf7ff6cee7c msgid "Shearing effect in X direction. See attribute *c*." msgstr "X 方向のシアリング効果。属性 *c* を参照してください。" -#: ../../matrix.rst:101 79af03e03fe04b4a921e3d951bbc4a9e +#: ../../matrix.rst:101 272b7e47c7dd473da0b5b0cffd24cafd msgid "Shearing effect in Y direction. See attribute *b*." msgstr "Y 方向のシアリング効果。属性 *b* を参照してください。" -#: ../../matrix.rst:105 977add1e7ce94c9091f63571109a3839 +#: ../../matrix.rst:105 779fd595204642b69291fe695bdcd322 msgid "" "Modify the matrix to perform a shifting / translation operation along the" " x and / or y axis. Has effects on attributes *e* and *f* only: *[a, b, " @@ -331,15 +332,15 @@ msgstr "" "X 軸および / または Y 軸に沿ったシフト / 移動操作を実行するために行列を修正します。属性 *e* と *f* にのみ影響を与えます: " "*[a, b, c, d, e, f] -> [a, b, c, d, tx*a + ty*c, tx*b + ty*d]* 。" -#: ../../matrix.rst:107 a28149c154dc4b7bae1319cad858b058 +#: ../../matrix.rst:107 169023afabda445a8d903c49bfc6a2f0 msgid "Translation effect in X direction. See attribute *e*." msgstr "X 方向の移動効果。属性 *e* を参照してください。" -#: ../../matrix.rst:109 bcf8f5faeec44fae9baa79763e126907 +#: ../../matrix.rst:109 44c22030a3fd4cf3a8151f058791ada8 msgid "Translation effect in Y direction. See attribute *f*." msgstr "Y 方向の移動効果。属性 *f* を参照してください。" -#: ../../matrix.rst:113 b2df8381df164c79a13d4e0c2cb6627b +#: ../../matrix.rst:113 d0911abb5f66408f9d6c1e1c3b4746c1 msgid "" "Calculate the matrix product *m1 * m2* and store the result in the " "current matrix. Any of *m1* or *m2* may be the current matrix. Be aware " @@ -349,15 +350,15 @@ msgstr "" "行列の積 *m1* * *m2* を計算し、その結果を現在の行列に格納します。*m1* または *m2* " "のいずれかが現在の行列である場合があります。行列の乗算は可換ではないことに注意してください。したがって、*m1*、*m2* の順序が重要です。" -#: ../../matrix.rst:115 abfc2fca1d6942d883c36fde63837440 +#: ../../matrix.rst:115 fcce53ed3d36473fbe3db1e09a8f1092 msgid "First (left) matrix." msgstr "最初の(左側)行列。" -#: ../../matrix.rst:118 6c562a1b0aa44e91b6e05521bd2fd740 +#: ../../matrix.rst:118 6b5b3806cabd4bd4a877e8f580a07b4f msgid "Second (right) matrix." msgstr "2 番目の(右側)行列。" -#: ../../matrix.rst:123 751bb253b6174e2b8054e4554b23f8ee +#: ../../matrix.rst:123 aa87c24417e544109feb48ff1438da6b msgid "" "Calculate the matrix inverse of *m* and store the result in the current " "matrix. Returns *1* if *m* is not invertible (\"degenerate\"). In this " @@ -367,37 +368,37 @@ msgstr "" "行列 *m* の逆行列を計算し、その結果を現在の行列に格納します。*m* が逆行列を持たない場合(\"degenerate\")は 1 " "を返します。この場合、現在の行列は *変更されません* 。m が逆行列を持つ場合は 0 を返し、現在の行列は m の逆行列で置き換えられます。" -#: ../../matrix.rst:125 07d18213129241e7b0d5a4558565ac16 +#: ../../matrix.rst:125 4a37a5474816409f896a43b32b9a6626 msgid "Matrix to be inverted. If not provided, the current matrix will be used." msgstr "逆行列を計算する行列。提供されない場合、現在の行列が使用されます。" -#: ../../matrix.rst fb5afd61ee6d4e3fbfbe8c5ccd8fd9e0 +#: ../../matrix.rst 9c255f598db04f59af29ffbbbcd01ef4 msgid "Return type" msgstr "" -#: ../../matrix.rst:132 bc3472c568a049548f52e963a81de6c1 +#: ../../matrix.rst:132 03e20c492eae41fa992f3f498f061cc5 msgid "" "Scaling in X-direction **(width)**. For example, a value of 0.5 performs " "a shrink of the **width** by a factor of 2. If a < 0, a left-right flip " "will (additionally) occur." msgstr "X方向 **(幅)** のスケーリング。たとえば、0.5の値は **幅** を2倍に縮小します。a < 0の場合、左右反転が追加で発生します。" -#: ../../matrix.rst 187cae4863ba4cb7b067785b88e39aa0 -#: 7452e8b583284f3fb2476b237992147c 802bc301f4554a49889a5d11381c854c -#: 836d4f93bd4846e59b4c378ab2da9e11 9e050ed0fe124c8aa34b399f998139d1 -#: afa9bea8965f4f47bef49983d70ae088 b59febfb8302451ea7d0d7a0d03fe459 +#: ../../matrix.rst 1a83029961ca4b98a55f2db76d32479d +#: a254ab6af2f341a58d187cd0a411b834 ab09365dd4d74d78920abb2e3bec5ba7 +#: ab8ed60c547045afbb16035c829c7a60 b64a657b9e624feb9ebf9e2ae156286e +#: c9ce4c12a5c8466f8eb2ab183296a608 e8f893b6ef034364a5e313cbf43d296d msgid "type" msgstr "" #: ../../matrix.rst:134 ../../matrix.rst:140 ../../matrix.rst:146 #: ../../matrix.rst:152 ../../matrix.rst:158 ../../matrix.rst:164 -#: 5b341ccbb149486eb237a27acfa5279b d5c15733544745d6b00e7246a19f1ae1 -#: dc7fd87ae32d452d8cc11f997a31f66d e2a15d2c264845be9a6e4b9e1f3cb36d -#: ea9e6c75e608432799ed65b41bc91264 f4a379c40b2f497b8f9a733e827a0de0 +#: 2892d51d34f54837b8fa610fe9f7bf7c 42984f053cc34da49ee3bd9a96176f11 +#: 4701381cc7c64be2ac8d7413d68ada2d 48facbed1ac343818adba55314cec682 +#: a1a352394aa843e28090dd8af03562e4 aa6fe8f2ae7e4de1b3ff8512997565d5 msgid "float" msgstr "" -#: ../../matrix.rst:138 71c1df8704604c838b94cec258b83655 +#: ../../matrix.rst:138 462adab49c6f4a57b29d4a1fbfa57ab9 msgid "" "Causes a shearing effect: each `Point(x, y)` will become `Point(x, y - " "b*x)`. Therefore, horizontal lines will be \"tilt\"." @@ -405,7 +406,7 @@ msgstr "" "シアリング効果を引き起こします:各 `Point(x, y)` は `Point(x、y - b * x)` " "になります。したがって、水平線は「傾斜」します。" -#: ../../matrix.rst:144 0b556a19ed744c55a7f184bf4630772c +#: ../../matrix.rst:144 2082a80b283c46719733c3dd819c13c7 msgid "" "Causes a shearing effect: each `Point(x, y)` will become `Point(x - c*y, " "y)`. Therefore, vertical lines will be \"tilt\"." @@ -413,14 +414,14 @@ msgstr "" "シアリング効果を引き起こします:各 `Point(x, y)` は `Point(x - c * y、y)` " "になります。したがって、垂直線は「傾斜」します。" -#: ../../matrix.rst:150 00699149a2714d32a03bfe09bf8dbdd2 +#: ../../matrix.rst:150 53d9b5618cae47e0b71bff64769323a0 msgid "" "Scaling in Y-direction **(height)**. For example, a value of 1.5 performs" " a stretch of the **height** by 50%. If d < 0, an up-down flip will " "(additionally) occur." msgstr "Y方向 **(高さ)** でのスケーリング。たとえば、1.5の値は **高さ** を50%伸ばします。d < 0の場合、上下反転が追加で発生します。" -#: ../../matrix.rst:156 fe6db962d7bc4df79f3fb6a50b739c58 +#: ../../matrix.rst:156 a958758f21104e2587d2e914f97025d3 msgid "" "Causes a horizontal shift effect: Each *Point(x, y)* will become *Point(x" " + e, y)*. Positive (negative) values of *e* will shift right (left)." @@ -428,7 +429,7 @@ msgstr "" "水平シフト効果を引き起こします:各 *Point(x, y)* は *Point(x + e、y)* " "になります。eの正の(負の)値は右に(左に)シフトします。" -#: ../../matrix.rst:162 b69722a7f3e64090b260c4760b264412 +#: ../../matrix.rst:162 8cc9a9a3c2c244939a316c8f2b137673 msgid "" "Causes a vertical shift effect: Each *Point(x, y)* will become *Point(x, " "y - f)*. Positive (negative) values of *f* will shift down (up)." @@ -436,7 +437,7 @@ msgstr "" "垂直シフト効果を引き起こします:各 *Point(x, y)* は *Point(x、y - f)* になります。*f* " "の正の(負の)値は下に(上に)シフトします。" -#: ../../matrix.rst:168 701fa50a8c3c4dfaac2beaa01a19a384 +#: ../../matrix.rst:168 a127c1fe09704b199335c60561824a04 msgid "" "Rectilinear means that no shearing is present and that any rotations are " "integer multiples of 90 degrees. Usually this is used to confirm that " @@ -444,11 +445,11 @@ msgid "" "aligned rectangles afterwards." msgstr "矩形の意味は、シアリングが存在せず、回転が90度の整数倍であることを示します。通常、これは変換前の(軸に沿った)矩形が変換後も軸に沿った矩形であることを確認するために使用されます。" -#: ../../matrix.rst:170 e85fb5a54d4040b6a348465c99bdee7c +#: ../../matrix.rst:170 7749c08090474193b3e9618acea65fea msgid "bool" msgstr "" -#: ../../matrix.rst:174 204d896ac76a4364865aa4e49085863c +#: ../../matrix.rst:174 e715af845f104d2296b2501b0234bc3d msgid "" "This class adheres to the Python sequence protocol, so components can be " "accessed via their index, too. Also refer to :ref:`SequenceTypes`." @@ -456,7 +457,7 @@ msgstr "" "このクラスはPythonのシーケンスプロトコルに従っているため、コンポーネントにはインデックスを使用できます。また、:ref:`SequenceTypes`" " を参照してください。" -#: ../../matrix.rst:175 e006a10fb5f34dd3b1dac40193145063 +#: ../../matrix.rst:175 30b635dfd9454bc98764215fe2a30188 msgid "" "Matrices can be used with arithmetic operators almost like ordinary " "numbers: they can be added, subtracted, multiplied or divided -- see " @@ -465,7 +466,7 @@ msgstr "" "行列は、通常の数値のようにほとんどの算術演算子を使用して操作できます。行列は加算、減算、乗算、または除算できます。ジオメトリオブジェクトの " ":ref:`Algebra`。" -#: ../../matrix.rst:176 cd1e80628a0f4fe79fc414eaf0d70f22 +#: ../../matrix.rst:176 489e66e1271449209169986876aeae44 msgid "" "Matrix multiplication is **not commutative** -- changing the sequence of " "the multiplicands will change the result in general. So it can quickly " @@ -474,28 +475,28 @@ msgstr "" "行列の乗算は " "**可換ではありません**。乗算要因のシーケンスを変更すると、一般に結果が変わります。そのため、変換がどの結果を生じるかがすぐに不明確になることがあります。" -#: ../../matrix.rst:180 2305bc09afd84aa4844f3e0dc255d134 +#: ../../matrix.rst:180 8fd74d196a8441baae8ce70a6e44d0cc msgid "Examples" msgstr "例" -#: ../../matrix.rst:181 3becb357318f4a4f9bc97dac204ce9ce +#: ../../matrix.rst:181 6bc017c89376483da69adad4db926e9e msgid "" "Here are examples that illustrate some of the achievable effects. All " "pictures show some text, inserted under control of some matrix and " "relative to a fixed reference point (the red dot)." msgstr "以下は、いくつかの可能な効果を示す例です。すべての図は、固定された参照点(赤いドット)に対するある行列の制御下で挿入されたテキストを示しています。" -#: ../../matrix.rst:183 4fcdaa1c4cd54c548effc88ae4a57731 +#: ../../matrix.rst:183 db2952a1261c40cfb514e60890c7bf62 msgid "The :ref:`Identity` matrix performs no operation." msgstr ":ref:`Identity` 行列は操作を行いません。" -#: ../../matrix.rst:188 d651af5d8d9d4462a9eda35d506ded0f +#: ../../matrix.rst:188 3e1fc92010bd4f62b3586eb0b776853d msgid "" "The scaling matrix `Matrix(2, 0.5)` stretches by a factor of 2 in " "horizontal, and shrinks by factor 0.5 in vertical direction." msgstr "スケーリング行列 `Matrix(2, 0.5)` は、水平方向に2倍の拡大を行い、垂直方向には0.5倍の縮小を行います。" -#: ../../matrix.rst:193 74c05fc413954f3987b593311044c848 +#: ../../matrix.rst:193 87cec5421f2941e086a897be4f86452e msgid "" "Attributes :attr:`Matrix.e` and :attr:`Matrix.f` shift horizontally and, " "respectively vertically. In the following 10 to the right and 20 down." @@ -503,33 +504,36 @@ msgstr "" "属性 :attr:`Matrix.e` および :attr:`Matrix.f` " "は、それぞれ水平方向および垂直方向にシフトします。以下の場合、右に10、下に20シフトします。" -#: ../../matrix.rst:198 61172fa74cf746d488cea850cffb28da +#: ../../matrix.rst:198 20e64ee4b27d42d5ad61736843af1d2d msgid "A negative :attr:`Matrix.a` causes a left-right flip." msgstr "負の :attr:`Matrix.a` は左右反転を引き起こします。" -#: ../../matrix.rst:203 2a5b417323ed4e6a94e2f71467331dec +#: ../../matrix.rst:203 12bc585057774d82800e2ea0708e4ecf msgid "A negative :attr:`Matrix.d` causes an up-down flip." msgstr "負の :attr:`Matrix.d` は上下反転を引き起こします。" -#: ../../matrix.rst:208 1174830aaf864cb89681357c7b1e456b +#: ../../matrix.rst:208 45214abb5b9a4f55a40ff250e076b168 msgid "Attribute :attr:`Matrix.b` tilts upwards / downwards along the x-axis." msgstr "属性 M :attr:`Matrix.b` はx軸に沿って上向き/下向きに傾きます。" -#: ../../matrix.rst:213 c84d458a78b8463c99dd7fdde7bfa3fe +#: ../../matrix.rst:213 0e764434a3c54d7fa6ae19ef01e56a79 msgid "Attribute :attr:`Matrix.c` tilts left / right along the y-axis." msgstr "属性 :attr:`Matrix.c` はy軸に沿って左に傾く/右に傾きます。" -#: ../../matrix.rst:218 b1246e513c06498b979f7cff48bc3c47 +#: ../../matrix.rst:218 ec1225c9881d466385194686def4c961 msgid "" "Matrix `Matrix(beta)` performs counterclockwise rotations for positive " "angles `beta`." msgstr "Matrix `Matrix(beta)` は、正の角度 `beta` の反時計回りの回転を実行します。" -#: ../../footer.rst:71 b73620e5ee6046d083d54fcec7bbfdd1 +#: ../../matrix.rst:223 ba4611ee874a4629bcac703ea876fba5 +msgid "Show some effects on a rectangle::" +msgstr "" + +#: ../../footer.rst:60 4bd2797b4f5b4d08a256131b3743ec2d msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 30ffb60f9ee8401086fe2906af5388a2 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/module.mo b/docs/locales/ja/LC_MESSAGES/module.mo index 4776f2f1f..d9f6ba1a2 100644 Binary files a/docs/locales/ja/LC_MESSAGES/module.mo and b/docs/locales/ja/LC_MESSAGES/module.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/module.po b/docs/locales/ja/LC_MESSAGES/module.po index 60e19d8ea..d7a532ac0 100644 --- a/docs/locales/ja/LC_MESSAGES/module.po +++ b/docs/locales/ja/LC_MESSAGES/module.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,39 +19,38 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 2cc85e4150134e5e8e834a5a342cce12 +#: ../../header.rst:-1 dfc70723dfaa484db5f621fc61d3ec61 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 ba8b4f0a93c24dda8b246cb60197a1bc +#: ../../header.rst:-1 b0cc1f27976c49c7af0245511e43b241 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 acfd530e21054db290bc91b13be34b7e +#: ../../header.rst:-1 36341b6f96de494b8f0ce5847f8137be msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../module.rst:7 8ef8d3ab2b7147818a470baf13dc4380 +#: ../../module.rst:7 e5bea3ee72c64515898c8d01ff1d6e90 msgid "Command line interface" msgstr "" -#: ../../module.rst:9 86a5d5168ec841ca8bbecc7a785ddec0 +#: ../../module.rst:9 3908cfc655284232afd64fb5450b3834 msgid "New in version 1.16.8" msgstr "バージョン 1.16.8 で新たに追加されました" -#: ../../module.rst:11 90d5b3b7b4d140bba702d89abe93150c +#: ../../module.rst:11 58d929a5bf2a48c29541dd80bb1f8eb3 msgid "" "PyMuPDF can also be used from the command line to perform utility " "functions. This feature should obsolete writing some of the most basic " "scripts." -msgstr "" -"PyMuPDFは、ユーティリティ機能を実行するためにモジュールとしてコマンドラインで使用することもできます。この機能により、最も基本的なスクリプトの記述が廃止される可能性があります。" +msgstr "PyMuPDFは、ユーティリティ機能を実行するためにモジュールとしてコマンドラインで使用することもできます。この機能により、最も基本的なスクリプトの記述が廃止される可能性があります。" -#: ../../module.rst:13 259a673a172640ae8a26446fb3513ea9 +#: ../../module.rst:13 e6ea3c8327d34594bbe782dc25f0eff5 msgid "" "Admittedly, there is some functional overlap with the MuPDF CLI `mutool`." " On the other hand, PDF embedded files are no longer supported by MuPDF, " @@ -60,37 +59,37 @@ msgstr "" "確かに、MuPDF CLI `mutool` " "といくつかの機能的な重複があります。一方で、PDFの埋め込みファイルはもはやMuPDFではサポートされていないため、PyMuPDFはここで独自の機能を提供しています。" -#: ../../module.rst:16 fa092c16142049b388ac530a3b2feb1c +#: ../../module.rst:16 272f549f0f5f4c6bbb78632a8cdb5c70 msgid "Invocation" msgstr "呼び出し" -#: ../../module.rst:18 693d76d2229944a2890934429e9f5495 +#: ../../module.rst:18 c9201247b07a463abc4d936939474629 msgid "The command-line interface can be invoked in two ways." msgstr "コマンドラインインターフェースは2つの方法で呼び出すことができます。" -#: ../../module.rst:20 e75950fe433b4ddbbd7fd59b311039fa +#: ../../module.rst:20 2567496a57544136bbe0fad7c7253f05 msgid "Use the installed `pymupdf` command::" msgstr "インストールされた `pymupdf` のコマンドを使用します。" -#: ../../module.rst:24 58697137f2b74b278bbcb6b907e2af24 -msgid "Or use Python's `-m` switch with PyMuPDF's `fitz` module::" +#: ../../module.rst:24 9cb80171d54c40b4bba248563751d406 +msgid "Or use Python's `-m` switch with PyMuPDF's `pymupdf` module::" msgstr "" -#: ../../module.rst:31 2c0638e3df8f482dac7a66ad6059499b +#: ../../module.rst:31 45619289ca954ed7a361a9ee981b3f5c msgid "General remarks:" msgstr "一般的な注意事項:" -#: ../../module.rst:33 6f1adeca53874f2b80fd8b8286a0fa46 +#: ../../module.rst:33 721eb638b1ec42fca6a6bbdc7ae5bcbd msgid "" "Request help via `\"-h\"`, resp. command-specific help via `\"command " "-h\"`." msgstr "ヘルプを要求するには、`\"-h\"` 、またはコマンド固有のヘルプを要求するには `\"command -h\"` を使用します。" -#: ../../module.rst:34 c2bc62eb0fa84b25abad29d51fde5f9c +#: ../../module.rst:34 f5e98e734f074d048f1006b8adf1d172 msgid "Parameters may be abbreviated where this does not introduce ambiguities." msgstr "曖昧さが生じない場所では、パラメータは省略形で指定できます。" -#: ../../module.rst:35 321f0d71dd21470eb2eb7bce4fc31122 +#: ../../module.rst:35 1c8417bb973646218f662af487334d79 msgid "" "Several commands support parameters `-pages` and `-xrefs`. They are " "intended for down-selection. Please note that:" @@ -98,15 +97,15 @@ msgstr "" "いくつかのコマンドは、 `-pages` と `-xrefs` " "のパラメータをサポートしています。これらは選択範囲を絞るためのものです。以下に注意してください:" -#: ../../module.rst:37 b8ff71060dc345389b2e4e27bdac155b +#: ../../module.rst:37 672f2e99185b4bc6be816a31e3d2c0d4 msgid "**page numbers** for this utility must be given **1-based**." msgstr "このユーティリティでは、**ページ番号** は1から始まる必要があります。" -#: ../../module.rst:38 6ff2389559ee4992a9422d81f0d9184d +#: ../../module.rst:38 68a1ba46f6334910accedc9683dcaa9f msgid "valid :data:`xref` numbers start at 1." msgstr "有効な :data:`xref` 番号は1から始まります。" -#: ../../module.rst:39 1a9e155c7201486d8a730715bc3bb8f1 +#: ../../module.rst:39 d33d3e1e349343a496f05dca1d4a1744 msgid "" "Specify a comma-separated list of either *single* integers or integer " "*ranges*. A **range** is a pair of integers separated by one hyphen " @@ -120,11 +119,11 @@ msgstr "" "で区切られた整数のペアです。整数は、最大ページまたは xref 番号を超えてはいけません。最大値を指定するには、記号変数 \"N\" " "を使用できます。整数または範囲は複数回、任意の順序で重複して出現する可能性があります。範囲内の最初の数値が2番目の数値よりも大きい場合、それらのアイテムは逆順で処理されます。" -#: ../../module.rst:41 264eaf3e3fd04d41a6c6210b69516609 +#: ../../module.rst:41 89de8f9bcd8c40fb89ea6f1caef719fc msgid "How to use the module inside your script::" msgstr "スクリプト内でモジュールを使用する方法::" -#: ../../module.rst:50 cb661af559bf4a27b5986bbe99d6dd06 +#: ../../module.rst:50 8afb7c82d0884c95b010d5f44df6cc07 msgid "" "Use the following 2-liner and compile it with `Nuitka " "`_ in standalone mode. This will give " @@ -135,11 +134,11 @@ msgstr "" "以下の2行のコードを使用し、 `Nuitka `_ " "をスタンドアロンモードでコンパイルします。これにより、Python、PyMuPDF、またはMuPDFがインストールされていないすべての互換プラットフォームで使用できる、モジュールのすべての機能を備えたCLI実行可能ファイルが得られます。" -#: ../../module.rst:59 3d4f0d2ffc4e44caaf6eede91d51cb2c +#: ../../module.rst:59 fc63e122807f48caa2fb4686ab628c23 msgid "Cleaning and Copying" msgstr "クリーニングとコピー" -#: ../../module.rst:63 35d174eee3fb40d486a030e17374ad62 +#: ../../module.rst:63 2cf8ef7d22a6443bb761dcc73f99ddb9 msgid "" "This command will optimize the PDF and store the result in a new file. " "You can use it also for encryption, decryption and creating sub " @@ -149,25 +148,25 @@ msgstr "" "このコマンドは、PDFを最適化し、その結果を新しいファイルに保存します。また、暗号化、復号化、およびサブドキュメントの作成にも使用できます。これは、ほとんど" " MuPDF のコマンドラインユーティリティ \"mutool clean\" と似ています::" -#: ../../module.rst:96 0744ffd467784548bb61abd2208a14e3 +#: ../../module.rst:96 6f79e1e9b8a74e2b99fcb0aef05c68bb msgid "" "If you specify \"-pages\", be aware that only page-related objects are " "copied, **no document-level items** like e.g. embedded files." msgstr "「-pages」を指定する場合、ページ関連のオブジェクトのみがコピーされることに注意してください。埋め込みファイルのようなドキュメントレベルのアイテムはコピーされません。" -#: ../../module.rst:98 db3b77da7db64147ac2397fb8e3ad8c0 +#: ../../module.rst:98 d2ee7904c033483e9b988ec472f77821 msgid "Please consult :meth:`Document.save` for the parameter meanings." msgstr "パラメータの意味については、 :meth:`Document.save` をご参照ください。" -#: ../../module.rst:102 0f6e29c3f1fa48b7972ea3b5b18ffbc2 +#: ../../module.rst:102 636d626a5d2b41a1bb191041838460ac msgid "Extracting Fonts and Images" msgstr "フォントと画像の抽出" -#: ../../module.rst:103 8d310f602f6e4ff78e028e929dfb0185 +#: ../../module.rst:103 27adb23c648540a69f463d58b2d83db2 msgid "Extract fonts or images from selected PDF pages to a desired directory::" msgstr "選択したPDFページからフォントや画像を指定したディレクトリに抽出します::" -#: ../../module.rst:123 d9ab3e974597410ca15b7cd70e631e5b +#: ../../module.rst:123 6ca52a328ede4b26a250f28cf8a17bda msgid "" "**Image filenames** are built according to the naming scheme: **\"img-" "xref.ext\"**, where \"ext\" is the extension associated with the image " @@ -176,7 +175,7 @@ msgstr "" "**画像のファイル名** は、命名規則に従って構築されます: **\"img-xref.ext\"** で、\"ext\" " "は画像に関連する拡張子であり、\"xref\" は画像PDFオブジェクトの :data:`xref` です。" -#: ../../module.rst:125 fd7bfd0fd54b494782d6540033978aa4 +#: ../../module.rst:125 c295828c27c44f53ae6e3f67e33114cc msgid "" "**Font filenames** consist of the fontname and the associated extension. " "Any spaces in the fontname are replaced with hyphens \"-\"." @@ -184,11 +183,11 @@ msgstr "" "**フォントのファイル名** は、フォント名と関連する拡張子から構成されます。フォント名にスペースがある場合、ハイフン \"-\" " "で置き換えられます。" -#: ../../module.rst:127 2f83a045d15e47029155e4a2ba07dd43 +#: ../../module.rst:127 4a6a50bd636f4e71b0759d0d4ba1ee9e msgid "The output directory must already exist." msgstr "出力ディレクトリはすでに存在している必要があります。" -#: ../../module.rst:129 864e29625e0f4d25a5f44fd7c6303ed4 +#: ../../module.rst:129 cb225d0a4c184a0c9a8114e362ae7c99 msgid "" "Except for output directory creation, this feature is **functionally " "equivalent** to and obsoletes `this script `_ " "と機能的に同等であり、これを使うことで廃止できます。" -#: ../../module.rst:133 b67dbb7c444d4d78b59aff6097346f32 +#: ../../module.rst:133 db0389129c6f4603b099fcbac916bac4 msgid "Joining PDF Documents" msgstr "PDF文書の結合" -#: ../../module.rst:134 c863f386809a42249fb9d2b45756bab0 +#: ../../module.rst:134 e1e150c4ccb748d9a1b38e2dc5d53937 msgid "To join several PDF files specify::" msgstr "複数のPDFファイルを結合するには、次のように指定します::" -#: ../../module.rst:153 26058035caa44005b0b6b7c5b6afd4e2 +#: ../../module.rst:153 d821855113c84e1f827da087e866e131 msgid "" "Each input must be entered as **\"filename,password,pages\"**. Password " "and pages are optional." msgstr "各入力は「ファイル名、パスワード、ページ」の形式で入力してください。パスワードとページはオプションです。" -#: ../../module.rst:154 a959a74de8724c56ba84761053f20a85 +#: ../../module.rst:154 864440e040904b3dbd8826a88ca62bb4 msgid "" "The password entry **is required** if the \"pages\" entry is used. If the" " PDF needs no password, specify two commas." msgstr "パスワードエントリは「ページ」エントリが使用される場合に必要です。PDFにパスワードが必要ない場合は、2つのコンマを指定してください。" -#: ../../module.rst:155 b7bd373d2f00408fabb93ca821023d37 +#: ../../module.rst:155 41c937061d0a4fe084316ec44a8ee609 msgid "" "The **\"pages\"** format is the same as explained at the top of this " "section." msgstr "「ページ」のフォーマットは、このセクションの先頭で説明したものと同じです。" -#: ../../module.rst:156 f4ca706fd4e74cea93c112d987d3b777 +#: ../../module.rst:156 cf411ea13a4f4d19b11ed8f5a76dfc0f msgid "" "Each input file is immediately closed after use. Therefore you can use " "one of them as output filename, and thus overwrite it." msgstr "各入力ファイルは使用後すぐに閉じられます。したがって、出力ファイル名の1つとして使用し、上書きすることができます。" -#: ../../module.rst:159 1b71f3da17364dd8aae5f00852e427a5 +#: ../../module.rst:159 e4c131ae039b4418abdb28361a9582ea msgid "Example: To join the following files" msgstr "例: 以下のファイルを結合する" -#: ../../module.rst:161 7858d6362c0c40f187e98807c49f655a +#: ../../module.rst:161 158bba0e88494d6c8b2e21d84d98747a msgid "**file1.pdf:** all pages, back to front, no password" msgstr "**file1.pdf:** すべてのページ、最前面から最後尾、パスワードなし" -#: ../../module.rst:162 429dcb37601c479186e17c6c938fb4ea +#: ../../module.rst:162 ebc6c0f2a85e4cd787edeff16bde6324 msgid "**file2.pdf:** last page, first page, password: \"secret\"" msgstr "**file2.pdf:** 最後のページ、最前面、パスワード: \"secret\"" -#: ../../module.rst:163 f6cf9eb463d94198ad866005672b2e55 +#: ../../module.rst:163 14bef7c6b3a24f30ad5d7927fda4d2df msgid "**file3.pdf:** pages 5 to last, no password" msgstr "**file3.pdf:** 5ページから最後尾、パスワードなし" -#: ../../module.rst:165 b0e27896cd264d9999558ca1bd637771 +#: ../../module.rst:165 34718d67ba6f4ceb835b3fcec6f7f449 msgid "and store the result as **output.pdf** enter this command:" msgstr "そして結果を **output.pdf** として保存するには、次のコマンドを入力してください:" -#: ../../module.rst:167 66b2d4f4948141d985fe038b453f4d30 +#: ../../module.rst:167 d854ddfa44d74e31bbab9e89051d7c16 msgid "" "*pymupdf join -o output.pdf file1.pdf,,N-1 file2.pdf,secret,N,1 " "file3.pdf,,5-N*" msgstr "" -#: ../../module.rst:171 478f59228b6040eba14b650d4c2cb078 +#: ../../module.rst:171 1be01ded6df946e0a1446dbc7a5d9b6b msgid "Low Level Information" msgstr "低レベル情報" -#: ../../module.rst:173 d7cc8f0bcc4e47f2a67b0b208d5e9089 +#: ../../module.rst:173 ec9fccebd1f04046a8f4a1fe13b47f2f msgid "" "Display PDF internal information. Again, there are similarities to " "*\"mutool show\"*::" msgstr "PDFの内部情報を表示します。再度、 *「mutool show」* との類似点があります。" -#: ../../module.rst:194 8bf7ee8f52fc470382880d3ed2d679c8 +#: ../../module.rst:194 1d48764f8b534337a574a260b536215d msgid "Examples::" msgstr "例::" -#: ../../module.rst:243 035ce0305a3e4a549033da078cfbf612 +#: ../../module.rst:243 f0c4d5c50c5d4d609d5cb99d5eff95bb msgid "Embedded Files Commands" msgstr "埋め込みファイルコマンド" -#: ../../module.rst:245 2b7c40b3915740fd953929e1d73e937c +#: ../../module.rst:245 08ac7756e144469b8a268a500e298a13 msgid "" "The following commands deal with embedded files -- which is a feature " "completely removed from MuPDF after v1.14, and hence from all its command" @@ -284,57 +283,57 @@ msgstr "" "以下のコマンドは埋め込みファイルに関するもので、MuPDF " "v1.14以降から完全に削除され、そのためすべてのコマンドラインツールからも削除されています。" -#: ../../module.rst:248 8b7758d55f484319bb7f0c78b2089f4f +#: ../../module.rst:248 38384c90d3754e32b411967490a3aee9 msgid "Information" msgstr "情報" -#: ../../module.rst:250 4888c5f450cb4a0a8019e0742b345cd4 +#: ../../module.rst:250 0967bb1bc6a84f4da15cbfd97e2a652b msgid "Show the embedded file names (long or short format)::" msgstr "埋め込みファイルの名前を表示します(長いフォーマットまたは短いフォーマット)::" -#: ../../module.rst:266 4deb3c9fb9844f029a1512cf45236c83 +#: ../../module.rst:266 58da34953aff4db9b3ecd9964e7303b5 msgid "Example::" msgstr "例::" -#: ../../module.rst:287 3e6e291501c045a2b31990c77c0990a7 +#: ../../module.rst:287 165603d52c0d41d19398ba5cfc6db9de msgid "Detailed output would look like this per entry::" msgstr "詳細な出力は、各エントリごとに以下のようになります::" -#: ../../module.rst:297 0553bfe97e6546ac8dc1c58b367e7f43 +#: ../../module.rst:297 ce60d876119142f5b2890126aab69f93 msgid "Extraction" msgstr "抽出" -#: ../../module.rst:299 9fd0e67e9c9e47b9bb5473f8cadb4b9b +#: ../../module.rst:299 8b751a2f410b472c9abb5af1fc140c8e msgid "Extract an embedded file like this::" msgstr "埋め込みファイルを以下のように抽出します::" -#: ../../module.rst:316 2996dae032384f95b11db198d0fc28de +#: ../../module.rst:316 fddf683ac2a14567908174cf3fc43284 msgid "" "For details consult :meth:`Document.embfile_get`. Example (refer to " "previous section)::" msgstr "詳細については、Document.embfile_get() を参照してください。例(前のセクションを参照)::" -#: ../../module.rst:322 e255c67b12aa463c87a6398eb5106bbf +#: ../../module.rst:322 1185f1a9df3146a9bc268d1196f67add msgid "Deletion" msgstr "削除" -#: ../../module.rst:323 ddae79746c8c4e6b8e4244d343f13225 +#: ../../module.rst:323 c505828edb234ccbba8146976192985a msgid "Delete an embedded file like this::" msgstr "以下のようにして埋め込みファイルを削除します::" -#: ../../module.rst:339 e019fdc73d784a83a05c76cf2038d65d +#: ../../module.rst:339 3de3e80b402e493f9f1c1bd8dd6335c2 msgid "For details consult :meth:`Document.embfile_del`." msgstr "詳細については、 :meth:`Document.embfile_del` を参照してください。" -#: ../../module.rst:342 b980d5695d574f57a88c6f1df87c4222 +#: ../../module.rst:342 d1672507de264f41aa7190163aabad14 msgid "Insertion" msgstr "挿入" -#: ../../module.rst:343 b377fde471414adea9e174e087959732 +#: ../../module.rst:343 a8086839b2cb43f3b9c6dbb070737442 msgid "Add a new embedded file using this command::" msgstr "このコマンドを使用して新しい埋め込みファイルを追加します::" -#: ../../module.rst:363 437f36120b8e4f53b775617ee42e2094 +#: ../../module.rst:363 32dbe086f564423fa12bebec433d3953 msgid "" "*\"NAME\"* **must not** already exist in the PDF. For details consult " ":meth:`Document.embfile_add`." @@ -342,15 +341,15 @@ msgstr "" "*\"NAME\"* は既にPDF内に存在していてはいけません。詳細については、 :meth:`Document.embfile_add` " "を参照してください。" -#: ../../module.rst:366 87337e5d5a504434bd66ef8b6e1b059c +#: ../../module.rst:366 2e6d06b46c294e1c8264e4ea71cd898a msgid "Updates" msgstr "更新" -#: ../../module.rst:367 52e1089edd1c468494ecd0b757c05f38 +#: ../../module.rst:367 e7a81b672cda44c3a9843c5f74d77e8e msgid "Update an existing embedded file using this command::" msgstr "このコマンドを使用して既存の埋め込みファイルを更新します::" -#: ../../module.rst:392 d2d8fc418fac417288491b79564f26be +#: ../../module.rst:392 ae4810297f254019ab7b519fa66be7df msgid "" "Use this method to change meta-information of the file -- just omit the " "*\"PATH\"*. For details consult :meth:`Document.embfile_upd`." @@ -358,23 +357,23 @@ msgstr "" "ファイルのメタ情報を変更するために、この方法を使用します - 単に「PATH」を省略してください。詳細については、 " ":meth:`Document.embfile_upd` を参照してください。" -#: ../../module.rst:396 b641d660c5204322941e4a284e7c2039 +#: ../../module.rst:396 102481707f57444bb1adca3feb2403f4 msgid "Copying" msgstr "コピー" -#: ../../module.rst:397 316bbae72fdd403ab2d58d315a8903e4 +#: ../../module.rst:397 c58bf8a5cd564738917c96c89b0948d4 msgid "Copy embedded files between PDFs::" msgstr "PDF間で埋め込みファイルをコピーします::" -#: ../../module.rst:421 71e9527db22d4fc5904498d02cfb0f33 +#: ../../module.rst:421 4c2a7e2a5cbc471eac1e4b6ca1e127ea msgid "Text Extraction" msgstr "テキスト抽出 " -#: ../../module.rst:422 b2968c6aafb147faa1c617f7cdac9529 +#: ../../module.rst:422 14d209f140b94907b55464548176d2af msgid "New in v1.18.16" msgstr "v1.18.16で新登場" -#: ../../module.rst:424 b2f90e7b96a74ad1aa485177c95ba0a6 +#: ../../module.rst:424 1712031a4ff548c6b84feb50f0674bf5 msgid "" "Extract text from arbitrary :ref:`supported " "documents` to a textfile. Currently, there are " @@ -384,7 +383,7 @@ msgstr "" "任意の :ref:`サポートされたドキュメント ` " "からテキストをテキストファイルに抽出します。現在、3つの出力フォーマットモードが利用可能です:シンプル、ブロックソート、物理的なレイアウトの再現。" -#: ../../module.rst:426 bb5a3449ea3241e7babe92f5d95fcb54 +#: ../../module.rst:426 982ae84a7f67448283c284d17ab22d53 msgid "" "**Simple** text extraction reproduces all text as it appears in the " "document pages -- no effort is made to rearrange in any particular " @@ -393,7 +392,7 @@ msgstr "" "**シンプル** なテキスト抽出は、ドキュメントページに表示される通りのすべてのテキストを再現します - " "特定の読み取り順序に再配置する努力は行われません。" -#: ../../module.rst:427 6df354ebfc354896b68cc96e54e5c54e +#: ../../module.rst:427 2b8226df4353428eac33d189ecdbc907 msgid "" "**Block sorting** sorts text blocks (as identified by MuPDF) by ascending" " vertical, then horizontal coordinates. This should be sufficient to " @@ -402,16 +401,16 @@ msgstr "" "**ブロックソート** " "は、テキストブロック(MuPDFによって識別される)を垂直座標、水平座標の昇順に並べ替えます。これは、基本的なテキストページの「自然な」読み取り順序を確立するために十分です。" -#: ../../module.rst:428 88f4f17d368a48638450b3b941b3f297 +#: ../../module.rst:428 248d0d12667c48f3a622e6ca10a94124 msgid "" "**Layout** strives to reproduce the original appearance of the input " "pages. You can expect results like this (produced by the command `pymupdf" " gettext -pages 1 demo1.pdf`):" msgstr "" -"**レイアウト** は、入力ページの元の外観を再現しようとします。次のような結果が期待できます(コマンド `pymupdf " -"gettext -pages 1 demo1.pdf` によって生成されたもの):" +"**レイアウト** は、入力ページの元の外観を再現しようとします。次のような結果が期待できます(コマンド `pymupdf gettext " +"-pages 1 demo1.pdf` によって生成されたもの):" -#: ../../module.rst:433 1d0c650782b44e979bfddabce23dab2a +#: ../../module.rst:433 019fb45a3bb2420395d210f0c241bb84 msgid "" "The \"gettext\" command offers a functionality similar to the CLI tool " "`pdftotext` by XPDF software, http://www.foolabs.com/xpdf/ -- this is " @@ -422,7 +421,7 @@ msgstr "" "と似た機能を提供します。http://www.foolabs.com/xpdf/ - " "これは特に「レイアウト」モードに当てはまり、このモードはそのツールの `-layout` と `-table` オプションを組み合わせています。" -#: ../../module.rst:437 15dfba5ece914780a1cc1866707eb0df +#: ../../module.rst:437 ba127522f3494c259b7032abdb483fb4 msgid "" "After each page of the output file, a formfeed character, `hex(12)` is " "written -- even if the input page has no text at all. This behavior can " @@ -431,7 +430,7 @@ msgstr "" "出力ファイルの各ページの後に、フォームフィード文字 `hex(12)` が書き込まれます - " "入力ページにテキストがない場合でもです。この動作はオプションを介して制御できます。" -#: ../../module.rst:439 61d6e9f2a13b4948856f39a98ef73bf4 +#: ../../module.rst:439 30d0328e90b94fd8b23e68b0353a065b msgid "" "For \"layout\" mode, **only horizontal, left-to-right, top-to bottom** " "text is supported, other text is ignored. In this mode, text is also " @@ -440,33 +439,33 @@ msgstr "" "「レイアウト」モードでは、水平方向、左から右、上から下のテキストのみがサポートされ、他のテキストは無視されます。また、このモードでは、:data:`fontsize`" " が小さすぎる場合もテキストが無視されます。" -#: ../../module.rst:441 da043ea0a2ab4865a5779c90d4bbe60c +#: ../../module.rst:441 cd72c16aed314ef3a7590885d9fae841 msgid "" "\"Simple\" and \"blocks\" mode in contrast output **all text** for any " "text size or orientation." msgstr "対照的に、「シンプル」モードと「ブロック」モードでは、テキストのサイズや向きに関係なくすべてのテキストが出力されます。" -#: ../../module.rst:443 49c7c7aca5d14d75b54289de30694b94 +#: ../../module.rst:443 8ecb7409221c49938c9fb9d37493484c msgid "Command::" msgstr "コマンド::" -#: ../../module.rst:471 6fa5cd60811443768b4dc141c81e7a5c +#: ../../module.rst:471 5fad84347d2445a8856906e329288d56 msgid "" "Command options may be abbreviated as long as no ambiguities are " "introduced. So the following do the same:" msgstr "コマンドのオプションは、曖昧さが生じない限り、省略形を使用することができます。したがって、以下のように同じ結果を得ることができます:" -#: ../../module.rst:473 f782ee5605e94cb389feca69716aa689 +#: ../../module.rst:473 592f0bfc5eb549db900005b6e9f32c97 msgid "" "`... -output text.txt -noligatures -noformfeed -convert-white -grid 3 " "-extra-spaces ...`" msgstr "" -#: ../../module.rst:474 08ced6020d3845f8a9ec2d0f71fdb311 +#: ../../module.rst:474 eddbf6fc4404413299a348a9c362474d msgid "`... -o text.txt -nol -nof -c -g 3 -e ...`" msgstr "" -#: ../../module.rst:476 0e3e347e95574500a015102e355f602a +#: ../../module.rst:476 6831e519b57348daaeda28c983995f14 msgid "" "The output filename defaults to the input with its extension replaced by " "`.txt`. As with other commands, you can select page ranges **(caution: " @@ -475,11 +474,11 @@ msgstr "" "出力ファイル名は、入力ファイル名の拡張子が `.txt` に置換されたものがデフォルトです。他のコマンドと同様に、上記に示されているように、 " "`mutool` 形式でページ範囲(注意:1から始まる)を選択できます。" -#: ../../module.rst:478 88be67b088b748859842dc671617a1e0 +#: ../../module.rst:478 0b7bf6de37b24078b730bc7bf19be42a msgid "**mode:** (str) select a formatting mode -- default is \"layout\"." msgstr "**mode:** (str) フォーマットモードを選択します - デフォルトは「レイアウト」です。" -#: ../../module.rst:479 c8b0201010fc4c87b211a6e9aa882669 +#: ../../module.rst:479 3bcd33bb5ce24428a07587f4712b9a18 msgid "" "**noligatures:** (bool) corresponds to **not** " ":data:`TEXT_PRESERVE_LIGATURES`. If specified, ligatures (present in " @@ -490,7 +489,7 @@ msgstr "" "**noligatures:** (bool) :data:`TEXT_PRESERVE_LIGATURES` " "に相当します。指定された場合、リガチャ(複数の文字を結合するグリフ、例:「fi」のようなもの)はその構成要素(つまり「f」、「i」)に分割されます。デフォルトはそのまま通過させることです。" -#: ../../module.rst:480 a59008ea89594aa7b4ae3e6c758cfb82 +#: ../../module.rst:480 fde0e3bb3c2246b9a71dfdb9c1d66955 msgid "" "**convert-white:** corresponds to **not** " ":data:`TEXT_PRESERVE_WHITESPACE`. If specified, all white space " @@ -500,7 +499,7 @@ msgstr "" "**convert-white:** :data:`TEXT_PRESERVE_WHITESPACE` " "に相当します。指定された場合、すべての空白文字(タブなど)は1つ以上のスペースに置き換えられます。デフォルトはそのまま通過させることです。" -#: ../../module.rst:481 4784c965a42a4671bf403582213bc99c +#: ../../module.rst:481 f37af1239c334a93824af0c9eb11ff0d msgid "" "**extra-spaces:** (bool) corresponds to **not** " ":data:`TEXT_INHIBIT_SPACES`. If specified, large gaps between adjacent " @@ -509,19 +508,20 @@ msgstr "" "**extra-spaces:** (bool) :data:`TEXT_INHIBIT_SPACES` " "に相当します。指定された場合、隣接する文字間の大きな間隔は1つ以上のスペースで埋められます。デフォルトはオフです。" -#: ../../module.rst:482 b11e0766033243e280bcd45936b2d60f +#: ../../module.rst:482 ec10e29ae9104149922fda77e2386600 +#, fuzzy msgid "" "**noformfeed:** (bool) instead of `hex(12)` (formfeed), write linebreaks" -" `\\n` at end of output pages." +" ``\\n`` at end of output pages." msgstr "" "**noformfeed:** (bool) `hex(12)` (フォームフィード)の代わりに、出力ページの末尾に ``\\n`` " "個の改行を書き込みます。" -#: ../../module.rst:483 f2576eca4c4342b9a74077418e42585f +#: ../../module.rst:483 b27625b2a5e8453a9b0064ea812c95c5 msgid "**skip-empty:** (bool) skip pages with no text." msgstr "**skip-empty:** ((bool) テキストがないページをスキップします。" -#: ../../module.rst:484 196128cc8af447adb88ba9fe7133ae62 +#: ../../module.rst:484 9d41da5687ef45a989cfeaf0a76592cf msgid "" "**grid:** lines with a vertical coordinate difference of no more than " "this value (in points) will be merged into the same output line. Only " @@ -537,7 +537,7 @@ msgstr "" "「レイアウト」モードにのみ関連します。注意して使用してください: " "ほとんどの場合、3またはデフォルトの2が適切です。大きすぎると、元のフォントで異なる行が結合され、文字化けや不完全な出力が発生する可能性があります。低すぎると、入力行の一部の範囲で個別の出力行が生成されることがありますが、これはわずかに異なる特性を持つ別のフォントでコーディングされているためです。" -#: ../../module.rst:485 48edfb1a2fcb440495c927ae310ad252 +#: ../../module.rst:485 b9f7195d039a44ad9f6dcb30ae1f8552 msgid "" "**fontsize:** include text with :data:`fontsize` larger than this value " "only (default 3). Only relevant for \"layout\" option." @@ -545,14 +545,10 @@ msgstr "" "**fontsize:** この値よりも大きな :data:`fontsize` を持つテキストのみを含めます(デフォルト3)。 " "「レイアウト」オプションにのみ関連します。" -#: ../../footer.rst:60 b21154b02d504bc08130840e1b13c220 +#: ../../footer.rst:60 4893a2a143c54c6ea8e7ffd30db93e7c msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 1fe964f7c74e45698c937bf32a38f4d5 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" @@ -570,3 +566,9 @@ msgstr "" #~ "file1.pdf,,N-1 file2.pdf,secret,N,1 file3.pdf,,5-N*" #~ msgstr "" +#~ msgid "Or use Python's `-m` switch with PyMuPDF's `fitz` module::" +#~ msgstr "" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/outline.mo b/docs/locales/ja/LC_MESSAGES/outline.mo index faa3f0cfc..832af92ff 100644 Binary files a/docs/locales/ja/LC_MESSAGES/outline.mo and b/docs/locales/ja/LC_MESSAGES/outline.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/outline.po b/docs/locales/ja/LC_MESSAGES/outline.po index 23eaa3b33..a66393834 100644 --- a/docs/locales/ja/LC_MESSAGES/outline.po +++ b/docs/locales/ja/LC_MESSAGES/outline.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,245 +19,253 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 65e6874f0dce4ceba0ac7b5a0fe541c7 +#: ../../header.rst:-1 eade87716b2747e7817d9414e8034522 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 11c10f419a994a49afb7f4d97fa321f2 +#: ../../header.rst:-1 6379b9d9980a4f9fabc3904f865e408b msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 ac98ab7904af4ab9aa3a40bf70964aba +#: ../../header.rst:-1 dc2316e3820a455f9e030297b205a574 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../outline.rst:7 e264451d33854b90b8e9a456aa2ef946 +#: ../../outline.rst:7 3ebaa51cc5b946e7a450900a8661c90c msgid "Outline" msgstr "Outline (アウトライン)" -#: ../../outline.rst:9 f2a708b4015144d2ad7b3468131332c5 +#: ../../outline.rst:9 5119b28a24af46d682652e038c5a1126 msgid "" -"*outline* (or \"bookmark\"), is a property of *Document*. If not *None*, " -"it stands for the first outline item of the document. Its properties in " -"turn define the characteristics of this item and also point to other " -"outline items in \"horizontal\" or downward direction. The full tree of " -"all outline items for e.g. a conventional table of contents (TOC) can be " -"recovered by following these \"pointers\"." +"*outline* (or \"bookmark\"), is a property of *Document*. If not " +"``None``, it stands for the first outline item of the document. Its " +"properties in turn define the characteristics of this item and also point" +" to other outline items in \"horizontal\" or downward direction. The full" +" tree of all outline items for e.g. a conventional table of contents " +"(TOC) can be recovered by following these \"pointers\"." msgstr "" -"*アウトライン*(または「ブックマーク」)は、*Document* のプロパティです。それが *None* " +"*アウトライン*(または「ブックマーク」)は、*Document* のプロパティです。それが ``None`` " "でない場合、それはドキュメントの最初のアウトライン項目を表します。そのプロパティは、この項目の特性を定義し、また「水平」または下向きの方向に他のアウトライン項目を指します。たとえば、通常の目次(TOC)のためのすべてのアウトライン項目の完全なツリーは、これらの「ポインター」をたどることで回復できます。" -#: ../../outline.rst:12 310246ec551e4da28970879408d931ff +#: ../../outline.rst:12 c27e0f395b824686b522b514ecf1d098 msgid "**Method / Attribute**" msgstr "**メソッド / 属性**" -#: ../../outline.rst:12 b7dbde06b57d42ccba9c916757c5f581 +#: ../../outline.rst:12 cb55fadb7745417899fe5f3e385a6737 msgid "**Short Description**" msgstr "**短い説明**" -#: ../../outline.rst:14 84209c70deeb495cacff8b73b2e8746c +#: ../../outline.rst:14 0e48e54f78de4ed6a2f0ef5660d74298 msgid ":attr:`Outline.down`" msgstr "" -#: ../../outline.rst:14 6e0c2993eb374f1d830ab1fe51a2020f +#: ../../outline.rst:14 4bda059c28ab45bb8c9b17d781a5f749 msgid "next item downwards" msgstr "次の項目は下向き" -#: ../../outline.rst:15 4298509e04434f4ba975eea40f0da8f5 +#: ../../outline.rst:15 af4e5daadaf54eb7a89a3012aee90476 msgid ":attr:`Outline.next`" msgstr "" -#: ../../outline.rst:15 6398bb20c0d94350b0d9f68c01e1e9b5 +#: ../../outline.rst:15 89522a47c0db4668bf6da64302eda4d1 msgid "next item same level" msgstr "同じレベルの次の項目" -#: ../../outline.rst:16 3ca1c8c262d440f4a67765b89b5afe82 +#: ../../outline.rst:16 2e773fb937834e4192d62907e44c0eae msgid ":attr:`Outline.page`" msgstr "" -#: ../../outline.rst:16 6500b4ce7d514d3e9b7f113af5491aed +#: ../../outline.rst:16 c22ddb98cc114a5c94ca6d39d1bda4f4 msgid "page number (0-based)" msgstr "ページ番号(0から始まる)" -#: ../../outline.rst:17 737c21db59fa4166af04b8094f8bb243 +#: ../../outline.rst:17 61f54e5be3684a7e9b71f47ccdede803 msgid ":attr:`Outline.title`" msgstr "" -#: ../../outline.rst:17 67f792e91d9f405cb1e366f0961a6d81 +#: ../../outline.rst:17 93a433f132584065af026642754a98fb msgid "title" msgstr "タイトル" -#: ../../outline.rst:18 d71a00d4f4644a05aa3201ebd2ab7d85 +#: ../../outline.rst:18 e41061ce2b7e48a4aa31064fe88df3cf msgid ":attr:`Outline.uri`" msgstr "" -#: ../../outline.rst:18 cdd576987ebf4f53a4efdcb567ea15ad +#: ../../outline.rst:18 323881cb7b1d40ae85b03dd5a27df654 msgid "string further specifying outline target" msgstr "アウトラインのターゲットをさらに指定する文字列" -#: ../../outline.rst:19 1d489058a08a44c7a90d0a0f8da12ce7 +#: ../../outline.rst:19 198b8ace96d142379f9036f96c06bd73 msgid ":attr:`Outline.is_external`" msgstr "" -#: ../../outline.rst:19 615cb71a196b47289034b30e0fd1aae1 +#: ../../outline.rst:19 f15b6eff0b2149948a823a986f443ba9 msgid "target outside document" msgstr "ドキュメントの外部のターゲットかどうか" -#: ../../outline.rst:20 0305b84895cd4f51bf50dfe47b1b0c25 +#: ../../outline.rst:20 7b2130996c994ef4857d2225858d3f28 msgid ":attr:`Outline.is_open`" msgstr "" -#: ../../outline.rst:20 0feac04584174efd87c88abc782e633c +#: ../../outline.rst:20 1ce23358265b4971af79d5cb7f924035 msgid "whether sub-outlines are open or collapsed" msgstr "サブアウトラインが開いているか折りたたまれているか" -#: ../../outline.rst:21 1b8c1474ba8c42179b0f64ccbe328c19 +#: ../../outline.rst:21 3810e86f9dc24ee98109b10773fe9594 msgid ":attr:`Outline.dest`" msgstr "" -#: ../../outline.rst:21 182d4719d90e40c4a1eb4cfbc247c324 +#: ../../outline.rst:21 be949162a84940be8d8d5b241b3bd8dc msgid "points to destination details object" msgstr "宛先の詳細オブジェクトを指す" -#: ../../outline.rst:24 62f2b4ced4944d7faca8fc777c9ae281 +#: ../../outline.rst:24 d60d251f33b04aba88575166c80cd268 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../outline.rst:30 5cb88905eda344a3acb46c904fbed4cd +#: ../../outline.rst:30 0d3278496d6f48cca68af36994524ad7 msgid "" -"The next outline item on the next level down. Is *None* if the item has " -"no children." -msgstr "次の階層のアウトライン項目です。アイテムに子要素がない場合は *None* です。" - -#: ../../outline.rst 24a0f693a9d4430c8d9555d7dc6f1c69 -#: 30e087665ec4410599f01a6a85813704 462933d959eb43ab88cf32fd3bc3d881 -#: 476e751e1a80456fb5d34ab6faa38595 7e8afe3d0a924c7ea035455293327b60 -#: be194250105a4c39abf6f8ee24a13694 cc1878b46c37469d9ec39a5026e4ddb8 -#: d7390dc04f9346e9bcc141ddb1b32d19 +"The next outline item on the next level down. Is ``None`` if the item has" +" no children." +msgstr "次の階層のアウトライン項目です。アイテムに子要素がない場合は ``None`` です。" + +#: ../../outline.rst 0f60e0258ec74a77850c19f4e818573b +#: 359863649a1b46a5b9e315592d26b967 455943c48bd0401da7d61e80ae3c1629 +#: 46b1711a00d245fa90b3ef78e5ed461c 4d3e0f6d95214fe79ecf3af1cee7d067 +#: 6f6b16d6c7924b9190b762fc5f398c39 b2720f2be62b4f0ebd718c2c00bad2fe +#: b5bdff1052b242918366fb27cd5edd6f msgid "type" msgstr "" -#: ../../outline.rst:32 9d66a313f5d848749279fe784dda0f60 +#: ../../outline.rst:32 31df4a9a593e495e83bdab0377d48a45 msgid ":ref:`Outline`" msgstr "" -#: ../../outline.rst:36 59720c69bce64e8ea7530d6a802cc6b7 +#: ../../outline.rst:36 821897bbe57144a2a9515d44d5988bfd msgid "" -"The next outline item at the same level as this item. Is *None* if this " -"is the last one in its level." -msgstr "このアイテムと同じレベルの次のアウトライン項目です。このアイテムがそのレベルで最後の場合、*None* です。" +"The next outline item at the same level as this item. Is ``None`` if this" +" is the last one in its level." +msgstr "このアイテムと同じレベルの次のアウトライン項目です。このアイテムがそのレベルで最後の場合、``None`` です。" -#: ../../outline.rst:38 a10704b39764499a98399079f98fbeee +#: ../../outline.rst:38 4805300829ae486787ed36cf2b1d07e6 msgid "`Outline`" msgstr "" -#: ../../outline.rst:42 bf0af8c2ee564588a039c3bf106904f4 +#: ../../outline.rst:42 6230223ef28b4e0f874585f6bd0fbfb4 msgid "The page number (0-based) this bookmark points to." msgstr "このブックマークが指すページ番号(0から始まる)です。" -#: ../../outline.rst:44 ecd1b38ccfe343339df0ce85a4001e4e +#: ../../outline.rst:44 c245da52b4444de3a1a7a67e7c8a4c6e msgid "int" msgstr "" -#: ../../outline.rst:48 fe11a63c40a644a2912820a709e89af6 -msgid "The item's title as a string or *None*." -msgstr "アイテムのタイトル、または *None* の文字列です。" +#: ../../outline.rst:48 050383aa093344d4b72c9304ea29e434 +msgid "The item's title as a string or ``None``." +msgstr "アイテムのタイトル、または ``None`` の文字列です。" -#: ../../outline.rst:50 ../../outline.rst:83 0bf0f7e68df9429e9c015e872750bb13 -#: 9d3dbd5e9289478b82d41148be377d8f +#: ../../outline.rst:50 ../../outline.rst:83 23062e46c343424b92d244ac235c1012 +#: 2826b0f053f246028f1017763eb6beba msgid "str" msgstr "" -#: ../../outline.rst:54 b3a76aacf642473890b8f8b16b00f729 +#: ../../outline.rst:54 33486d26fcf84b4287a9b62665e5d95d msgid "" -"Indicator showing whether any sub-outlines should be expanded (*True*) or" -" be collapsed (*False*). This information is interpreted by PDF reader " -"software." -msgstr "サブアウトラインが展開されるべきか(*True*)折りたたまれるべきか(*False*)を示すインジケーターです。この情報はPDFリーダーソフトウェアによって解釈されます。" +"Indicator showing whether any sub-outlines should be expanded (``True``) " +"or be collapsed (``False``). This information is interpreted by PDF " +"reader software." +msgstr "サブアウトラインが展開されるべきか(``True``)折りたたまれるべきか(``False``)を示すインジケーターです。この情報はPDFリーダーソフトウェアによって解釈されます。" -#: ../../outline.rst:56 ../../outline.rst:62 70d50d81617147ce8326e8dfe5e18ece -#: a52690857de940c286eafb4df8a9e6d2 +#: ../../outline.rst:56 ../../outline.rst:62 39516f02d6ca4ea5818c20077384b2f7 +#: 7c679ae4b313481fa70a96efb56596b0 msgid "bool" msgstr "" -#: ../../outline.rst:60 2300873f3b38439f9cfb125350892daf +#: ../../outline.rst:60 6d936126ab42453088019c3a2c2d9b85 msgid "" -"A bool specifying whether the target is outside (*True*) of the current " -"document." -msgstr "対象が現在のドキュメントの外部(*True*)かどうかを示すブール値です。" +"A bool specifying whether the target is outside (``True``) of the current" +" document." +msgstr "対象が現在のドキュメントの外部(``True``)かどうかを示すブール値です。" -#: ../../outline.rst:66 f7f05b5400e54910920b5b4e2653db4e +#: ../../outline.rst:66 ae26e1cb6f7740eab0cd822bccd86c6b msgid "" "A string specifying the link target. The meaning of this property should " "be evaluated in conjunction with property `is_external`:" msgstr "リンクの対象を指定する文字列。このプロパティの意味は、プロパティ `is_external` と一緒に評価されるべきです。" -#: ../../outline.rst:70 80555c24a5b844fd923605684a0ff47c +#: ../../outline.rst:70 6a552a5230644d80b93626dc835ea86c +#, fuzzy msgid "" -"`is_external` is true: `uri` points to some target outside the current " -"PDF, which may be an internet resource (`uri` starts with \"http://\" or " -"similar), another file (`uri` starts with \"file:\" or \"file://\") or " -"some other service like an e-mail address (`uri` starts with " -"\"mailto:\")." -msgstr "`is_external` がtrueの場合: `uri` は、現在のPDFの外部のターゲットを指します。これは、インターネットリソース( `uri` が \"http://\" などで始まる)、別のファイル(`uri` が \"file:\" または \"file://\" で始まる)、または電子メールアドレスなどのその他のサービス( `uri` が \"mailto:\" で始まる)である可能性があります。" - -#: ../../outline.rst:76 b9a1ebc948614925962e16c047386bd1 +"`is_external` is true: ``uri`` points to some target outside the current " +"PDF, which may be an internet resource (``uri`` starts with ``http://`` " +"or similar), another file (``uri`` starts with ``file:`` or ``file://``) " +"or some other service like an e-mail address (``uri`` starts with " +"``mailto:``)." +msgstr "" +"`is_external` がtrueの場合: `uri` は、現在のPDFの外部のターゲットを指します。これは、インターネットリソース( " +"`uri` が \"http://\" などで始まる)、別のファイル(`uri` が \"file:\" または \"file://\" " +"で始まる)、または電子メールアドレスなどのその他のサービス( `uri` が \"mailto:\" で始まる)である可能性があります。" + +#: ../../outline.rst:76 c000b251feae4c25aa04f34b87aff7f3 +#, fuzzy msgid "" -"`is_external` is false: `uri` will be `None` or point to an internal " +"`is_external` is false: ``uri`` will be `None` or point to an internal " "location. In case of PDF documents, this should either be *#nnnn* to " "indicate a 1-based (!) page number *nnnn*, or a named location. The " "format varies for other document types, for example " "\"../FixedDoc.fdoc#PG_2_LNK_1\" for page number 2 (1-based) in an XPS " "document." -msgstr "`is_external` がfalseの場合:`uri` は `None` になるか、または内部の位置を指します。PDFドキュメントの場合、これは1から始まるページ番号 *nnnn* を示すために *#nnnn* であるか、名前付きの場所を示します。他のドキュメントタイプの場合、形式は異なります。たとえば、XPSドキュメントのページ番号2(1から始まる)の場合は \"../FixedDoc.fdoc#PG_2_LNK_1\" です。" +msgstr "" +"`is_external` がfalseの場合:`uri` は `None` " +"になるか、または内部の位置を指します。PDFドキュメントの場合、これは1から始まるページ番号 *nnnn* を示すために *#nnnn* " +"であるか、名前付きの場所を示します。他のドキュメントタイプの場合、形式は異なります。たとえば、XPSドキュメントのページ番号2(1から始まる)の場合は" +" \"../FixedDoc.fdoc#PG_2_LNK_1\" です。" -#: ../../outline.rst:87 f52eefedca7745c48e690d90be7c1829 +#: ../../outline.rst:87 6ef34f3fc06140d2b6b9f9a43f092838 msgid "The link destination details object." msgstr "リンクの宛先詳細オブジェクトです。" -#: ../../outline.rst:89 0869b68ce6a44720b6a0e71c48245947 +#: ../../outline.rst:89 79a5c71cf6224a6198800f498dc0ddb3 msgid ":ref:`linkDest`" msgstr "" -#: ../../footer.rst:60 e4facefe6b3f4ecea815fe8ee7303e63 +#: ../../footer.rst:60 e201dcf36b574d0280f4532c31067f5b msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 3314c8aeb699484383e9bcc47d171268 -msgid "Discord logo" -msgstr "" - #~ msgid "" #~ "A string specifying the link target. " #~ "The meaning of this property should " #~ "be evaluated in conjunction with " -#~ "*isExternal*. The value may be *None*," +#~ "*isExternal*. The value may be ``None``," #~ " in which case *isExternal == False*." #~ " If *uri* starts with *file://*, " #~ "*mailto:*, or an internet resource name," -#~ " *isExternal* is *True*. In all other" -#~ " cases *isExternal == False* and " -#~ "*uri* points to an internal location." -#~ " In case of PDF documents, this " -#~ "should either be *#nnnn* to indicate " -#~ "a 1-based (!) page number *nnnn*, " -#~ "or a named location. The format " -#~ "varies for other document types, e.g." -#~ " *uri = '../FixedDoc.fdoc#PG_21_LNK_84'* for " -#~ "page number 21 (1-based) in an XPS" -#~ " document." +#~ " *isExternal* is ``True``. In all " +#~ "other cases *isExternal == False* and" +#~ " *uri* points to an internal " +#~ "location. In case of PDF documents, " +#~ "this should either be *#nnnn* to " +#~ "indicate a 1-based (!) page number " +#~ "*nnnn*, or a named location. The " +#~ "format varies for other document types," +#~ " e.g. *uri = '../FixedDoc.fdoc#PG_21_LNK_84'* " +#~ "for page number 21 (1-based) in an" +#~ " XPS document." #~ msgstr "" #~ "リンクのターゲットを指定する文字列です。このプロパティの意味は *isExternal* " -#~ "と連動して評価されるべきです。値が *None* の場合、*isExternal == " +#~ "と連動して評価されるべきです。値が ``None`` の場合、*isExternal == " #~ "False* です。*uri* が *file://、mailto:* " -#~ "、またはインターネットリソース名で始まる場合、*isExternal* は *True* " +#~ "、またはインターネットリソース名で始まる場合、*isExternal* は ``True`` " #~ "です。それ以外の場合、*isExternal == False* で、*uri* " #~ "は内部の場所を指します。PDFドキュメントの場合、これは1から始まるページ番号 *nnnn* を示すための " #~ "*#nnnn* " #~ "であるか、名前付きの場所である必要があります。他のドキュメントタイプの場合、例えばXPSドキュメントの場合、*uri = " #~ "'../FixedDoc.fdoc#PG_21_LNK_84'* は、ページ番号21(1から始まる)を示します。" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/page.mo b/docs/locales/ja/LC_MESSAGES/page.mo index 9686b69a7..44aebb3b1 100644 Binary files a/docs/locales/ja/LC_MESSAGES/page.mo and b/docs/locales/ja/LC_MESSAGES/page.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/page.po b/docs/locales/ja/LC_MESSAGES/page.po index ab758be51..7d930aff4 100644 --- a/docs/locales/ja/LC_MESSAGES/page.po +++ b/docs/locales/ja/LC_MESSAGES/page.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 4ac4234a5c4c441ca77469fa41cae29c +#: ../../header.rst:-1 61662a8c1daf46fcba3a5225ce5345b9 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 50d676c84a44472f8453f4240a3b8c88 +#: ../../header.rst:-1 6ecbaf7b19a0402d920fb129cb166867 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 2b17c9587a894db8a27a5b57f5861f7f +#: ../../header.rst:-1 aedaf2f402a840eaaf980cdf15ab35ed msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../page.rst:7 c4aae2e6228f47ecb8ca17e19476d228 +#: ../../page.rst:7 c68d0e5287c946daa89cd0f50c9100a4 msgid "Page" msgstr "Page (ページ)" -#: ../../page.rst:9 4f2a61bc068e430c901e78e4063d7343 +#: ../../page.rst:9 0e451fa94a0d46ccb18c42656dadb8c0 msgid "" "Class representing a document page. A page object is created by " ":meth:`Document.load_page` or, equivalently, via indexing the document " @@ -48,7 +48,7 @@ msgstr "" "ドキュメントページを表すクラス。ページオブジェクトは :meth:`Document.load_page` " "またはドキュメントをインデックスで参照することで作成されます(例: `doc[n]` ) - 独立したコンストラクタはありません。" -#: ../../page.rst:11 418cfdc1f7a2436cb9344aa8ae01f440 +#: ../../page.rst:11 27908c2230814d3a9d1c48e2469f4bde msgid "" "There is a parent-child relationship between a document and its pages. If" " the document is closed or deleted, all page objects (and their " @@ -57,13 +57,13 @@ msgid "" "is raised." msgstr "ドキュメントとそのページとの親子関係があります。ドキュメントが閉じられるか削除されると、存在するすべてのページオブジェクト(およびそれに関連する子供たちも)が使用できなくなります(「孤児」になります)。ページのプロパティまたはメソッドを使用している場合、例外が発生します。" -#: ../../page.rst:13 54be5e48fb5e4afb81a8100a76948cb3 +#: ../../page.rst:13 c56f4954e82540de9466a05e1ab4c1d1 msgid "" "Several page methods have a :ref:`Document` counterpart for convenience. " "At the end of this chapter you will find a synopsis." msgstr "便宜のために、いくつかのページメソッドには :ref:`Document` の対応するメソッドがあります。この章の最後に概要があります。" -#: ../../page.rst:15 074a4bd7053a4414acde37491adab593 +#: ../../page.rst:15 a646bf243f1b418ea2e7d1cccfe178ec msgid "" "Many times in this chapter we are using the term **coordinate**. It is of" " high importance to have at least a basic understanding of what that is " @@ -72,33 +72,33 @@ msgstr "" "この章では何度も **「座標」** という用語を使用しています。それが何を意味するかを少なくとも基本的な理解があること、そして " ":ref:`Coordinates` のセクションに慣れていることが非常に重要です。" -#: ../../page.rst:18 c701d738534c47e1a8b556a18e9e9ad2 +#: ../../page.rst:18 1374be2ff1e4448cad12a94163fd282c msgid "Modifying Pages" msgstr "ページの修正" -#: ../../page.rst:19 fa8582aff8f54451ac95aea64b0f77f9 +#: ../../page.rst:19 d8083d1622b74d8c88a9e5ab31ec1d61 msgid "" "Changing page properties and adding or changing page content is available" " for PDF documents only." msgstr "ページのプロパティを変更し、ページの内容を追加または変更することは、PDFドキュメントのみで使用可能です。" -#: ../../page.rst:21 28e7a40fd8e74580bd41eb396307a6ed +#: ../../page.rst:21 595cdd02c3424408946cdee8df0a08ab msgid "In a nutshell, this is what you can do with PyMuPDF:" msgstr "要するに、PyMuPDFでできることは次のとおりです:" -#: ../../page.rst:23 0eee15d4b166493badd4b2f2be32ca5f +#: ../../page.rst:23 bc39cc18888a404eb3090578b0ffce63 msgid "Modify page rotation and the visible part (\"cropbox\") of the page." msgstr "ページの回転とページの可視部分(「クロップボックス」)の変更。" -#: ../../page.rst:24 9562209fc7474f42bc2115afc9387ded +#: ../../page.rst:24 02524155c10f4264ae988234c7952a24 msgid "Insert images, other PDF pages, text and simple geometrical objects." msgstr "画像、他のPDFページ、テキスト、単純な幾何学的オブジェクトの挿入。" -#: ../../page.rst:25 31cfaeba84d147e6a5794c8b26419271 +#: ../../page.rst:25 9e3f5ef3467e4d4da095f6a7f33894d3 msgid "Add annotations and form fields." msgstr "アノテーションとフォームフィールドの追加。" -#: ../../page.rst:29 140a0cd53f6b4b2099c332a4b9ffe1be +#: ../../page.rst:29 70883e8610b84a57972a7d75d4726dc1 msgid "" "Methods require coordinates (points, rectangles) to put content in " "desired places. Please be aware that these coordinates **must always** be" @@ -112,7 +112,7 @@ msgstr "" ":meth:`Page.bound` を除いて(ページが回転したときを *反映* " "しています)、メソッドと属性が返すすべての座標は回転していないページに関連しています。" -#: ../../page.rst:31 e1be1dd7fc944b34937fd7aca8ad7324 +#: ../../page.rst:31 e8d26b51cb0542bf911b6ee7650bb848 msgid "" "So the returned value of e.g. :meth:`Page.get_image_bbox` will not change" " if you do a :meth:`Page.set_rotation`. The same is true for coordinates " @@ -130,7 +130,7 @@ msgstr "" "で乗算します。:attr:`Page.derotation_matrix` " "とその逆行列もあり、他のリーダーと連携する際に使用できます。この点で異なる動作をするかもしれません。" -#: ../../page.rst:35 16d8386e07954c4fb22c0ed285b05e19 +#: ../../page.rst:35 0d455c799f9646aead7c4f7859d1380e msgid "" "If you add or update annotations, links or form fields on the page and " "immediately afterwards need to work with them (i.e. **without leaving the" @@ -140,7 +140,7 @@ msgstr "" "ページに注釈、リンク、またはフォームフィールドを追加または更新し、直後にこれらの新しいまたは更新されたアイテムを操作する必要がある場合(つまり " "**ページを離れずに**)、:meth:`Document.reload_page` を使用してページを再読み込みする必要があります。" -#: ../../page.rst:37 33330d0d92f64167afcdaf95ddcb9348 +#: ../../page.rst:37 9cc2e75884444a2097f4580e4d06e88a msgid "" "Reloading the page is generally recommended -- although not strictly " "required in all cases. However, some annotation and widget types have " @@ -148,797 +148,805 @@ msgid "" "may also be added in the future." msgstr "一般的にはページを再読み込みすることをお勧めしますが、すべてのケースで厳密に必要とされるわけではありません。ただし、PyMuPDFの注釈とウィジェットの種類の一部は、MuPDFと比較して拡張機能を持っています。今後もこれらの拡張機能が増えるかもしれません" -#: ../../page.rst:39 26c5cd2cc1bd43e59952c485dea74018 +#: ../../page.rst:39 f0d57ff812da4db08cb5e3af326afaf1 msgid "" "Releoading the page ensures all your changes have been fully applied to " "PDF structures, so you can safely create Pixmaps or successfully iterate " "over annotations, links and form fields." msgstr "ページを再読み込むことで、変更がPDF構造に完全に適用され、Pixa画像を作成したり、アノテーション、リンク、フォームフィールドを正常にイテレートしたりできるようになります。" -#: ../../page.rst:42 168ee226a48440b58cb02b12aedf514d +#: ../../page.rst:42 0e2f000975c8476e9b1795f5a360a744 msgid "**Method / Attribute**" msgstr "**メソッド / 属性**" -#: ../../page.rst:42 da2562f000044a4aaed0596916c7c5e6 +#: ../../page.rst:42 eb997d2653594414a971e3f3ba9fca55 msgid "**Short Description**" msgstr "**短い説明**" -#: ../../page.rst:44 6c4de1fe76c746a4a6f49d9dd5072ad8 +#: ../../page.rst:44 088e0c671d9f4a7ba21e29d6ea4f7e45 msgid ":meth:`Page.add_caret_annot`" msgstr "" -#: ../../page.rst:44 0e5c4c0e842d43c4a4b69aa0758d854d +#: ../../page.rst:44 4c2923d08ffe494d83f9a8493bb8d9f6 msgid "PDF only: add a caret annotation" msgstr "PDFのみ:キャレットアノテーションを追加します" -#: ../../page.rst:45 fbedfa16adae4870a31d1a053dbef66a +#: ../../page.rst:45 869825ad65994e28bdaafacd5b65a7a8 msgid ":meth:`Page.add_circle_annot`" msgstr "" -#: ../../page.rst:45 a64f398547b14da08967c05ade1ef70f +#: ../../page.rst:45 3c9b55a6e9ca4530a99fa97fcf240f19 msgid "PDF only: add a circle annotation" msgstr "PDFのみ:円注釈を追加します" -#: ../../page.rst:46 10d9c7a1ebe24ab5a95be68a21b96996 +#: ../../page.rst:46 f3739adb1b19428c862da3ee6565f68c msgid ":meth:`Page.add_file_annot`" msgstr "" -#: ../../page.rst:46 7be5beb67b6441a2b1bb061a1e591044 +#: ../../page.rst:46 00c03a2f41014371ab4aef02f8143ec5 msgid "PDF only: add a file attachment annotation" msgstr "PDFのみ:ファイル添付アノテーションを追加します" -#: ../../page.rst:47 e97a09c3a10a43fa82d4d84b60db5997 +#: ../../page.rst:47 43a7543e97bd49428846878dfadd3765 msgid ":meth:`Page.add_freetext_annot`" msgstr "" -#: ../../page.rst:47 33f8f63c9c7d42dc96e226a5fd8c01f5 +#: ../../page.rst:47 637084fd5ac2454babf3727b3f010855 msgid "PDF only: add a text annotation" msgstr "PDFのみ:テキストアノテーションを追加します" -#: ../../page.rst:48 fad7b2a5aa064045933568fe849ee050 +#: ../../page.rst:48 04e31c3ec1c2428b91e6a2e348c05eac msgid ":meth:`Page.add_highlight_annot`" msgstr "" -#: ../../page.rst:48 2b8e1a81596e4f39a53d01ec116faa1b +#: ../../page.rst:48 6099861df7a444d6b5e92a61e0c13f26 msgid "PDF only: add a \"highlight\" annotation" msgstr "PDFのみ:「ハイライト」アノテーションを追加します" -#: ../../page.rst:49 0877f618e44f4dc49063f247c74c4b45 +#: ../../page.rst:49 6d87f8a2c5bd45a4aba68443addac6c9 msgid ":meth:`Page.add_ink_annot`" msgstr "" -#: ../../page.rst:49 562d0aa437944f3ba41174431abc9709 +#: ../../page.rst:49 b2b4ddf817944d1da98ba5cf7caf6c7c msgid "PDF only: add an ink annotation" msgstr "PDFのみ:インク注釈を追加します" -#: ../../page.rst:50 e3603b68345043d886d7ec24ba6dc5fc +#: ../../page.rst:50 26722399bcf947d9a2d34b860df50fb6 msgid ":meth:`Page.add_line_annot`" msgstr "" -#: ../../page.rst:50 8d7d183652c741a5bd16f97200d78098 +#: ../../page.rst:50 f5e9aa6723f3476cbbf5b9444687c996 msgid "PDF only: add a line annotation" msgstr "PDFのみ:線アノテーションを追加します" -#: ../../page.rst:51 626e4a3b5e2d454d92134cf10c73f764 +#: ../../page.rst:51 db1a94b17cc74175aadc4bfd1e9f2749 msgid ":meth:`Page.add_polygon_annot`" msgstr "" -#: ../../page.rst:51 41f07003b1594d5b9ab7cda8adc3fc55 +#: ../../page.rst:51 c57ae6d6041d4df4add808c430fdbe9d msgid "PDF only: add a polygon annotation" msgstr "PDFのみ:多角形アノテーションを追加します" -#: ../../page.rst:52 06d449126ae54508bfa33dd852d267f2 +#: ../../page.rst:52 b2b5588a13e54317886c83e331dfe39f msgid ":meth:`Page.add_polyline_annot`" msgstr "" -#: ../../page.rst:52 1eb577d44dc8447ea148d9344a9db124 +#: ../../page.rst:52 178f632613f54d2aaa2ad97e196b3974 msgid "PDF only: add a multi-line annotation" msgstr "PDFのみ:多線アノテーションを追加します" -#: ../../page.rst:53 7b3cc062baad4b22b60088de1839d928 +#: ../../page.rst:53 5cde6342f3294a01ad3fdcd684bce459 msgid ":meth:`Page.add_rect_annot`" msgstr "" -#: ../../page.rst:53 73f5596c563347019a4a46a290c55e13 +#: ../../page.rst:53 36766e72c63e443bbc5e7401b75b073b msgid "PDF only: add a rectangle annotation" msgstr "PDFのみ:四角アノテーション釈を追加します" -#: ../../page.rst:54 642c561718b7449d8b469c30a62e3d37 +#: ../../page.rst:54 7737d6d9e1d54a62b81528189d07ae38 msgid ":meth:`Page.add_redact_annot`" msgstr "" -#: ../../page.rst:54 1b7a29094369440e9965fd542196e5df +#: ../../page.rst:54 6f3eaa81d30a47ff9322d50db0508ebb msgid "PDF only: add a redaction annotation" msgstr "PDFのみ:黒塗りアノテーションを追加します" -#: ../../page.rst:55 d09aa043fb724d99a3ef25b6b107d380 +#: ../../page.rst:55 477627aa20014ce5a7137bb51e3ab6ce msgid ":meth:`Page.add_squiggly_annot`" msgstr "" -#: ../../page.rst:55 24db097c50c74357b66c854a6be4ed72 +#: ../../page.rst:55 c48373af1bfb428a820fa3b56f902ab7 msgid "PDF only: add a \"squiggly\" annotation" msgstr "PDFのみ:「波線」アノテーションを追加します" -#: ../../page.rst:56 77c191ff40ed424bb05325145670d079 +#: ../../page.rst:56 15134f76ca1243c782cc348723303e31 msgid ":meth:`Page.add_stamp_annot`" msgstr "" -#: ../../page.rst:56 e33b0aec46ee47f7ae2aac7f79e978c2 +#: ../../page.rst:56 482dc59222934e23ad4169443bf8dc44 msgid "PDF only: add a \"rubber stamp\" annotation" msgstr "PDFのみ:「スタンプ」アノテーションを追加します" -#: ../../page.rst:57 83a3aaaf53104fc1a59bc9a76d25ea9e +#: ../../page.rst:57 d2b71e4fa0b04441a9822c99d2236187 msgid ":meth:`Page.add_strikeout_annot`" msgstr "" -#: ../../page.rst:57 70e1e88909804fd4b9655c6b6bcbc7bc +#: ../../page.rst:57 611b366dc6694e2d962533c75b1b4db3 msgid "PDF only: add a \"strike-out\" annotation" msgstr "PDFのみ:「取り消し線」アノテーションを追加します" -#: ../../page.rst:58 7908636bcd334481a78270c5094cd40e +#: ../../page.rst:58 6b23546d662c469d9bd228585f185ef6 msgid ":meth:`Page.add_text_annot`" msgstr "" -#: ../../page.rst:58 8591bdd37cf54eb7aaba9988f647db1b +#: ../../page.rst:58 81163430e3374f2f97164a81b8373b5e msgid "PDF only: add a comment" msgstr "PDFのみ:コメントを追加します" -#: ../../page.rst:59 62666b4884e147f78e7a343235d1b75a +#: ../../page.rst:59 b986a03fae7b47a09d3708c20738ae91 msgid ":meth:`Page.add_underline_annot`" msgstr "" -#: ../../page.rst:59 ae7e8ec62827425bba43759fa0f8e5a7 +#: ../../page.rst:59 aa4dbb5f385441d0ad32a6ba6168b350 msgid "PDF only: add an \"underline\" annotation" msgstr "PDFのみ:「下線」アノテーションを追加します" -#: ../../page.rst:60 38c736db17c345ecb61294973c0d3ecd +#: ../../page.rst:60 043a3da3622b486fa0a1c02b622abc90 msgid ":meth:`Page.add_widget`" msgstr "" -#: ../../page.rst:60 61b2357e0988433d8cfb25cf77e725cd +#: ../../page.rst:60 9a5a4f0660ef44eb95779f555a29b349 msgid "PDF only: add a PDF Form field" msgstr "PDFのみ:PDFフォームフィールドを追加します" -#: ../../page.rst:61 8009bac73e534ec4bb661897865e2741 +#: ../../page.rst:61 1a42e3d7e6b642e9973fbda3358e267d msgid ":meth:`Page.annot_names`" msgstr "" -#: ../../page.rst:61 85d31fe668a443f3a67da9679edb6627 +#: ../../page.rst:61 c023452d01934d3e87a147c4f19187b2 msgid "PDF only: a list of annotation (and widget) names" msgstr "PDFのみ:アノテーション(およびウィジェット)の名前のリスト" -#: ../../page.rst:62 1afe808ea05344c9b180fd476157e0b9 +#: ../../page.rst:62 43d130c02655422e912cc35076c290f7 msgid ":meth:`Page.annot_xrefs`" msgstr "" -#: ../../page.rst:62 0ca0ffa90c46400594336df1ce0fbb41 +#: ../../page.rst:62 b583e7f546b240efaea4d4f3f94d04ef msgid "PDF only: a list of annotation (and widget) xrefs" msgstr "PDFのみ:アノテーション(およびウィジェット)のxrefのリスト" -#: ../../page.rst:63 d38aead0222b44f7a48e06da21fb1d0b +#: ../../page.rst:63 6b2f6bd4d28049b08438b47b3bc265fd msgid ":meth:`Page.annots`" msgstr "" -#: ../../page.rst:63 77a500a81a9447439b59ddc656cab5ec +#: ../../page.rst:63 4d1e3c99b6ce455abd8890286a995c7a msgid "return a generator over the annots on the page" msgstr "ページ上のアノテーションのジェネレーターを返します" -#: ../../page.rst:64 89bd5bac6090436ab7419638eda7c15c +#: ../../page.rst:64 68d250548ccc43a9bec0b1c4dc4964b0 msgid ":meth:`Page.apply_redactions`" msgstr "" -#: ../../page.rst:64 e301b0cb8f67441db3e9bf8fadb685e8 +#: ../../page.rst:64 d21570500fb848f6aee9d5de6d678efa msgid "PDF only: process the redactions of the page" msgstr "PDFのみ:ページの塗りつぶしを処理します" -#: ../../page.rst:65 2bdcc450728d4fc3b34658a1fa1e4388 +#: ../../page.rst:65 a2a12048c486482fbc1243b15d5acd39 msgid ":meth:`Page.bound`" msgstr "" -#: ../../page.rst:65 ../../page.rst:135 6dd1a96c44f046a49175597422379d82 -#: a12c52307c944fbfb43f2d4a233ce968 +#: ../../page.rst:65 ../../page.rst:136 16fc7caf47cd48c894e2a97f59b71b3c +#: 856f09bfd60149e0a2b6a9e33efd9e18 msgid "rectangle of the page" msgstr "ページの矩形" -#: ../../page.rst:66 eaf94a9877b14c69914a737f66fc12ec +#: ../../page.rst:66 689de2090a0742aba4b05ce24cc9920b msgid ":meth:`Page.cluster_drawings`" msgstr "" -#: ../../page.rst:66 fa22e59c4a3a44909336e79fc90107b5 +#: ../../page.rst:66 6e1a4fc9c4e74054b90da53a79584dc1 msgid "PDF only: bounding boxes of vector graphics" msgstr "PDFのみ:ベクトルグラフィックスの境界ボックス" -#: ../../page.rst:67 37cd483691e046cab4b442e202d6fe6a +#: ../../page.rst:67 0b291206c9644f1ebdfd6cc95911c351 msgid ":meth:`Page.delete_annot`" msgstr "" -#: ../../page.rst:67 45ebe76cab0a45c690cccae503120c45 +#: ../../page.rst:67 2b1d103f7cab4ec6a3d5862fc47202e0 msgid "PDF only: delete an annotation" msgstr "PDFのみ:アノテーションを削除します" -#: ../../page.rst:68 f99e0bc699834cde956c85b273be1630 +#: ../../page.rst:68 1029e8f7bd1446cc8a9e3c385f0fe2a3 msgid ":meth:`Page.delete_image`" msgstr "" -#: ../../page.rst:68 5bd61948c6644d6395c122a19ca47131 +#: ../../page.rst:68 e6bad8c581d34714aa3333ae457399ec msgid "PDF only: delete an image" msgstr "PDFのみ:画像を削除します" -#: ../../page.rst:69 877ea78701604ce0a4d55f09e0dc4d6a +#: ../../page.rst:69 5cf2a0a21aaf4278b810aaaecccb82af msgid ":meth:`Page.delete_link`" msgstr "" -#: ../../page.rst:69 b08b8043f399436b807a6ebd92a8ae74 +#: ../../page.rst:69 b7d6df1d3b704e138ff83e0665fc0377 msgid "PDF only: delete a link" msgstr "PDFのみ:リンクを削除します" -#: ../../page.rst:70 d36de60a585a48b9a66fa8e113ad1e07 +#: ../../page.rst:70 6f1937a143ae4275be1946b25f6b2ec5 msgid ":meth:`Page.delete_widget`" msgstr "" -#: ../../page.rst:70 0d7983860ac14be5bebb9b216fe96dc6 +#: ../../page.rst:70 264c28aec4e745fd8cc86d543d2a8e79 msgid "PDF only: delete a widget / field" msgstr "PDFのみ:ウィジェット/フィールドを削除します" -#: ../../page.rst:71 36cc3a47f6f849b5b61448ecf466609a +#: ../../page.rst:71 c4337bdd16ef4ab2a6cd79652a1c7aec msgid ":meth:`Page.draw_bezier`" msgstr "" -#: ../../page.rst:71 905fb43567584e37a43f6f534de16531 +#: ../../page.rst:71 47b12e4eff6543ca973ffc95d3862bb5 msgid "PDF only: draw a cubic Bezier curve" msgstr "PDFのみ:三次ベジエ曲線を描画します" -#: ../../page.rst:72 1e14a9225d914a2ba1e4b93d2f87e8aa +#: ../../page.rst:72 c6d2568b85b8448e99b224c1064e5a54 msgid ":meth:`Page.draw_circle`" msgstr "" -#: ../../page.rst:72 b3c8b5f9d1a8471c826d6dd3e934837c +#: ../../page.rst:72 6112215cb8e44ac2b7b276bd71369aa9 msgid "PDF only: draw a circle" msgstr "PDFのみ:円を描画します" -#: ../../page.rst:73 2406a495d0024ad3a85360c20510f4f8 +#: ../../page.rst:73 10d4a5c5d0ff4d1a83986a5892624226 msgid ":meth:`Page.draw_curve`" msgstr "" -#: ../../page.rst:73 9787515c0c4d45b7a6ed18ed3d21523f +#: ../../page.rst:73 a7601df6163d4f8080791d3cd5c0fc34 msgid "PDF only: draw a special Bezier curve" msgstr "PDFのみ:特別なベジエ曲線を描画します" -#: ../../page.rst:74 a0a58d8f22a54014abc0c3e961c8f3cd +#: ../../page.rst:74 afe91de5d4ab4842bdfcdce2f53e4932 msgid ":meth:`Page.draw_line`" msgstr "" -#: ../../page.rst:74 fd24209442ba4d589f3d1bb3951368f2 +#: ../../page.rst:74 2d7a030f99a846f4a13bd6deca5a7b96 msgid "PDF only: draw a line" msgstr "PDFのみ:直線を描画します" -#: ../../page.rst:75 eaa4de69a8c54349b923cd222b556c92 +#: ../../page.rst:75 f6578b353c814c2d9ec742b845a962e2 msgid ":meth:`Page.draw_oval`" msgstr "" -#: ../../page.rst:75 2ec7aa81d8b04d64be879d11931abc0e +#: ../../page.rst:75 94d6c3838385430d8d1c7faf3e37e538 msgid "PDF only: draw an oval / ellipse" msgstr "PDFのみ:楕円を描画します" -#: ../../page.rst:76 f5d14784377946a98d52c6ea6d6cc67b +#: ../../page.rst:76 67aa92f11b844738918b590e256a3427 msgid ":meth:`Page.draw_polyline`" msgstr "" -#: ../../page.rst:76 e162cf12019a457e8273edbe94816ac3 +#: ../../page.rst:76 a7d197d82f5b46ffabea926e440d6f35 msgid "PDF only: connect a point sequence" msgstr "PDFのみ:点のシーケンスを接続します" -#: ../../page.rst:77 138b7b3a11624b06b32dad41315b4181 +#: ../../page.rst:77 18692934b54a49e4bb03aa2f8ecf9c35 msgid ":meth:`Page.draw_quad`" msgstr "" -#: ../../page.rst:77 1c2b5eea2a5f419f94339208d59a3f65 +#: ../../page.rst:77 55d89917fdf94ece9759df7281328ae6 msgid "PDF only: draw a quad" msgstr "PDF のみ: クアッドを描く" -#: ../../page.rst:78 ea329b0552894c74a921c91ec2983226 +#: ../../page.rst:78 4d6819827e2b4c249af959b9d34c86b3 msgid ":meth:`Page.draw_rect`" msgstr "" -#: ../../page.rst:78 1b3ea928b39c47aaac9e2fc4801973e6 +#: ../../page.rst:78 d0f4dbd77e5f4c28b70ac64281ae4f27 msgid "PDF only: draw a rectangle" msgstr "PDFのみ:四角形を描画します" -#: ../../page.rst:79 0f39d88e924b4315ba2e78f537debd85 +#: ../../page.rst:79 98de881cd3cf433d891e27108ff4c038 msgid ":meth:`Page.draw_sector`" msgstr "" -#: ../../page.rst:79 e9ed68c5b42749bb8aa628f2b540e18d +#: ../../page.rst:79 5552c3983be64d5995f4250564b187f3 msgid "PDF only: draw a circular sector" msgstr "PDFのみ:円セクタを描画します" -#: ../../page.rst:80 4a9d046cd42d4ca6bf04f77470fa5151 +#: ../../page.rst:80 a3e9ed818bed4a078c5f52d8afc25e76 msgid ":meth:`Page.draw_squiggle`" msgstr "" -#: ../../page.rst:80 244c2d01bc644851bbf043919c1417ce +#: ../../page.rst:80 91065f7eb3474bc8ada2d93179d16382 msgid "PDF only: draw a squiggly line" msgstr "PDFのみ:波線を描画します" -#: ../../page.rst:81 a55a2145a5aa478a9053426f1dd42f74 +#: ../../page.rst:81 ce9b4be9828f41ddb85390c29ed74198 msgid ":meth:`Page.draw_zigzag`" msgstr "" -#: ../../page.rst:81 8816f250b8304fcbab4bc01d84049d83 +#: ../../page.rst:81 5a5807a017a44895ab7fa7395f228e98 msgid "PDF only: draw a zig-zagged line" msgstr "PDFのみ:ジグザグ線を描画します" -#: ../../page.rst:82 da9a3980dec04c31b709d9006d2c1793 +#: ../../page.rst:82 917d6e0b08f8481cb78bc89218162086 msgid ":meth:`Page.find_tables`" msgstr "" -#: ../../page.rst:82 9aeb1a0215c34c60828f17bfb95d5400 +#: ../../page.rst:82 d917260453274912bcab644a653a56d5 msgid "locate tables on the page" msgstr "ページ上のテーブルを検出します" -#: ../../page.rst:83 70da1fb9fa3946ba96c1504efede27e6 +#: ../../page.rst:83 a80c67bf147f4456a7d17f13fb5c0f56 msgid ":meth:`Page.get_drawings`" msgstr "" -#: ../../page.rst:83 b2d578d929574c819707bbaf45a3d4fc +#: ../../page.rst:83 59fb46671f3f43919c7f5ae98bf45b79 msgid "get vector graphics on page" msgstr "ページ上のベクトルグラフィックを取得します" -#: ../../page.rst:84 ../../page.rst:2280 66f52930117a40b79bc11b0400b95c59 -#: 71107fbce82d43ee9b9c5b8bd050572c +#: ../../page.rst:84 ../../page.rst:2328 6229d7b93c6845ca9e238d2e9b795f3b +#: f88c595aa10c4609a3622be46143c30a msgid ":meth:`Page.get_fonts`" msgstr "" -#: ../../page.rst:84 65b964fab2f84d259c306d963ae079ae +#: ../../page.rst:84 d7222ed39cd745ea9992b38d4b703e15 msgid "PDF only: get list of referenced fonts" msgstr "PDFのみ:参照されたフォントのリストを取得" -#: ../../page.rst:85 5244fb47a54145e68851c00625899470 +#: ../../page.rst:85 c0b5ce6fcbbc4de7aa30f2129254ff47 msgid ":meth:`Page.get_image_bbox`" msgstr "" -#: ../../page.rst:85 fce6f086d29147158e8b8b7c72a52a34 +#: ../../page.rst:85 43b13bc396dd422ab33af9875af20fb9 msgid "PDF only: get bbox and matrix of embedded image" msgstr "PDFのみ:埋め込まれた画像のバウンディングボックスと行列を取得" -#: ../../page.rst:86 9f3eec30303d4623a27b9e4fb8b4688e +#: ../../page.rst:86 2f2008eab32e41c496e916cc5fa7e785 msgid ":meth:`Page.get_image_info`" msgstr "" -#: ../../page.rst:86 fae7659beeba4ae1afeebfaec0761820 +#: ../../page.rst:86 c479d646bfb345d280646191ad904051 msgid "get list of meta information for all used images" msgstr "使用されるすべての画像のメタ情報のリストを取得" -#: ../../page.rst:87 aec86cd62c354c9cacf14f3617f57a64 +#: ../../page.rst:87 9f841024c0af4e8f8cbc147d0c1d19d6 msgid ":meth:`Page.get_image_rects`" msgstr "" -#: ../../page.rst:87 8ef4cf3023894f6aa0827bf5224ed7fc +#: ../../page.rst:87 a071461b91e141ef9f528f79778e9bdf msgid "PDF only: improved version of :meth:`Page.get_image_bbox`" msgstr "PDFのみ: :meth:`Page.get_image_bbox` の改良バージョンを取得" -#: ../../page.rst:88 ../../page.rst:2281 7a0a527c39fe4d6f89709b39b5c4e08c -#: a36182593a204109bb626c521660ba27 +#: ../../page.rst:88 ../../page.rst:2329 4b1e001813054caea2d079dfbe51ef38 +#: c4ae999812cb419f9d26b9589aa7c8e1 msgid ":meth:`Page.get_images`" msgstr "" -#: ../../page.rst:88 091ce1d0eb454ad6809531eb924c2b0e +#: ../../page.rst:88 002d655e970848c5af445a2e3ba6068d msgid "PDF only: get list of referenced images" msgstr "PDFのみ:参照された画像のリストを取得" -#: ../../page.rst:89 853e81c230294e76b658afbd1b10503a +#: ../../page.rst:89 f7ceaa7044884fca854c0912d4751bf8 msgid ":meth:`Page.get_label`" msgstr "" -#: ../../page.rst:89 df1d2968711141c69cb628f131be6dbb +#: ../../page.rst:89 4fcc37cae68548b8ae2178a2d91c50e9 msgid "PDF only: return the label of the page" msgstr "PDFのみ:ページのラベルを返す" -#: ../../page.rst:90 a899245e99834aa686165c213a78fb20 +#: ../../page.rst:90 38c59c9328dd44e9841de9deedeee098 msgid ":meth:`Page.get_links`" msgstr "" -#: ../../page.rst:90 b66d472b841040eb9d36994308ed419c +#: ../../page.rst:90 db76f5f1f41e4b9e901236bee2ddd9a8 msgid "get all links" msgstr "すべてのリンクを取得" -#: ../../page.rst:91 ../../page.rst:2282 35e02ec797314169a98a41c607484113 -#: a90898428afc4021be6c0d05d7298bd9 +#: ../../page.rst:91 ../../page.rst:2330 65624ce9eeb04d2f9ca8160259e6fe58 +#: ca6e5e28861d4d1993daa63690102fc2 msgid ":meth:`Page.get_pixmap`" msgstr "" -#: ../../page.rst:91 ed3c64cf4ea44b8496878d8da9670d2e +#: ../../page.rst:91 c828578e0c444b50be0ba7a3f11a05a1 msgid "create a page image in raster format" msgstr "ラスターフォーマットのページイメージを作成" -#: ../../page.rst:92 cca2a91db1af4f028f5ce20343e6c93f +#: ../../page.rst:92 d907b8ff3e48468d988f24b0c84e744d msgid ":meth:`Page.get_svg_image`" msgstr "" -#: ../../page.rst:92 13b38ec8df9f423ea74831629813862d +#: ../../page.rst:92 4f03677d5eef4f38909512ab59ed88e9 msgid "create a page image in SVG format" msgstr "SVGフォーマットのページイメージを作成" -#: ../../page.rst:93 ../../page.rst:2283 b8dc69f962e84062afa0cac755527a70 -#: c60fba3a1c4347278441d89bc195f41b +#: ../../page.rst:93 ../../page.rst:2331 3ec0672bf07542e7ab84dca18b782e2e +#: 65d0129edf394a778705725b98f2fde4 msgid ":meth:`Page.get_text`" msgstr "" -#: ../../page.rst:93 298fa5ef75184994aa60822d115b5126 +#: ../../page.rst:93 a106f9edd51b463aa1e9140a9e788e96 msgid "extract the page's text" msgstr "ページのテキストを抽出" -#: ../../page.rst:94 0bfdcb2f63a6419189a56a71f1fe1171 +#: ../../page.rst:94 f60eeef903ff48bf9cdaa107ebfe47d2 msgid ":meth:`Page.get_textbox`" msgstr "" -#: ../../page.rst:94 6cb17e8b6dde4e27abfa00d9105ff61b +#: ../../page.rst:94 61bfad8edc3649228c709ac1615e5e78 msgid "extract text contained in a rectangle" msgstr "特定の矩形に含まれるテキストを抽出" -#: ../../page.rst:95 c8b62bf1f0784419b847627530b26b30 +#: ../../page.rst:95 3b15abc336ec4bd8858e784dde6e31d2 msgid ":meth:`Page.get_textpage_ocr`" msgstr "" -#: ../../page.rst:95 eac7ec8f46a84e5bb3192168829bac60 +#: ../../page.rst:95 eb21942874514b38b5d6cce03a9a763b msgid "create a TextPage with OCR for the page" msgstr "ページのOCR付きのTextPageを作成" -#: ../../page.rst:96 76e10e863fbf4bc4a7ec03b29a2f39f6 +#: ../../page.rst:96 c9382b18963a4787af50bdff83d3d5b5 msgid ":meth:`Page.get_textpage`" msgstr "" -#: ../../page.rst:96 5ec66f54c9a445bbb95a62c10d0aad74 +#: ../../page.rst:96 1fff700d349047fe8f25972ca3c0541b msgid "create a TextPage for the page" msgstr "ページのTextPageを作成" -#: ../../page.rst:97 0599bd3b81eb4cd49d66ba0f3b4bdf81 +#: ../../page.rst:97 accbca958e094897ba5b28fd1781fa88 msgid ":meth:`Page.get_xobjects`" msgstr "" -#: ../../page.rst:97 1a717382ebb84cef8fbb160c695141d4 +#: ../../page.rst:97 f842f1df2d1a4367ac52a6a86963de81 msgid "PDF only: get list of referenced xobjects" msgstr "PDFのみ:参照されたxobjectのリストを取得" -#: ../../page.rst:98 ad954bcf030149adb8d80c757d5dbd61 +#: ../../page.rst:98 560cad86b28748f7b8ef9f1d92e5c744 msgid ":meth:`Page.insert_font`" msgstr "" -#: ../../page.rst:98 e518a8295f4941718d8247b24c6044e9 +#: ../../page.rst:98 a7fd2e4c23894f7faec1b88601464b17 msgid "PDF only: insert a font for use by the page" msgstr "PDFのみ:ページで使用するフォントを挿入" -#: ../../page.rst:99 be43fe67801542c9ab425a0f0f137f54 +#: ../../page.rst:99 422fa2d799ef496798e1f081fd6f26d0 msgid ":meth:`Page.insert_image`" msgstr "" -#: ../../page.rst:99 008fec5cb62b4ccf8d095380975114e1 +#: ../../page.rst:99 4367ca2a4da8472482ae22bf55fb00fc msgid "PDF only: insert an image" msgstr "PDFのみ:画像を挿入" -#: ../../page.rst:100 2ea00c2b7b16427589a4584b314f2c63 +#: ../../page.rst:100 80c4a2d5efbf4c6a96a7a191679688ef msgid ":meth:`Page.insert_link`" msgstr "" -#: ../../page.rst:100 0c9dba32588f4dce938f188b529a68df +#: ../../page.rst:100 474c8d8e91a54f3094454a2c456beb1a msgid "PDF only: insert a link" msgstr "PDFのみ:リンクを挿入" -#: ../../page.rst:101 b40716d83aa8448dbc759b48e6b8a4c6 +#: ../../page.rst:101 62e01baa42e94b278a62505489aa477c msgid ":meth:`Page.insert_text`" msgstr "" -#: ../../page.rst:101 5282ba3658624bcd83b234257294dcca +#: ../../page.rst:101 6581c5190ec64dd4bda671253e1306cd msgid "PDF only: insert text" msgstr "PDFのみ:テキストを挿入" -#: ../../page.rst:102 d095a330d9bb4d9299ba641dade19485 +#: ../../page.rst:102 a086e402014342b0824957320ac85ff0 msgid ":meth:`Page.insert_htmlbox`" msgstr "" -#: ../../page.rst:102 b36f6b8ed8cb420997023e3f2ee7b346 +#: ../../page.rst:102 bdc8db5bf36c40c98d85c65d588043db msgid "PDF only: insert html text in a rectangle" msgstr "PDFのみ: 指定された矩形にテキストを追加します。" -#: ../../page.rst:103 d42b82944ffe4a5f9e77c89c8463b214 +#: ../../page.rst:103 bfae9c37a52a4e21afbc417c8ad2cdec msgid ":meth:`Page.insert_textbox`" msgstr "" -#: ../../page.rst:103 45b6c294c9494829b6dec3b4692905a9 +#: ../../page.rst:103 6d2b5b99bea845c1876b66e66127431f msgid "PDF only: insert a text box" msgstr "PDFのみ:テキストボックスを挿入" -#: ../../page.rst:104 a777188cd6dc4c4db858103cd29be385 +#: ../../page.rst:104 3fa49329024b4c8a91b93d7cf020e6e0 msgid ":meth:`Page.links`" msgstr "" -#: ../../page.rst:104 d1ca3651fa28469c8384d0c7a023f1f9 +#: ../../page.rst:104 1a19313c7bdf4b0cbadf7b3d6892b317 msgid "return a generator of the links on the page" msgstr "ページ上のリンクのジェネレータを返す" -#: ../../page.rst:105 a88637935ff5472bb60d47563b096b5c +#: ../../page.rst:105 112197bda67d45a8b5b0cd5c729abfc0 msgid ":meth:`Page.load_annot`" msgstr "" -#: ../../page.rst:105 83a34bca37a44779b1ceb8184d22de22 +#: ../../page.rst:105 b88e6121a71147b390cb750c15ce247f msgid "PDF only: load a specific annotation" msgstr "PDFのみ:特定のアノテーションを読み込む" -#: ../../page.rst:106 b6bfc3ac2b324b7e89b2a331b51a4d31 +#: ../../page.rst:106 3fbd5da197b848f5ab374679254f8dfc msgid ":meth:`Page.load_widget`" msgstr "" -#: ../../page.rst:106 712e0f9f5971432693883f7224daf8c8 +#: ../../page.rst:106 fa36f08ed59c4325b83e58f854a749c0 msgid "PDF only: load a specific field" msgstr "PDFのみ:特定のフィールドを読み込む" -#: ../../page.rst:107 e9a37c56c00b46eaa9d656818c258c4a +#: ../../page.rst:107 39d6832761aa4287b5d64850020d928c msgid ":meth:`Page.load_links`" msgstr "" -#: ../../page.rst:107 16db05e5da1b45fa83446a83cb58dbb1 +#: ../../page.rst:107 413b2b2b6eda4a3698167d18f7b4e891 msgid "return the first link on a page" msgstr "ページ上の最初のリンクを返す" -#: ../../page.rst:108 14d73950560f4332825035e4852239e4 +#: ../../page.rst:108 4c13634e34bd46e3b244843016470c48 msgid ":meth:`Page.new_shape`" msgstr "" -#: ../../page.rst:108 539043b47b0e46c0a67922742c967da4 +#: ../../page.rst:108 9cbd0e0b071745c5850439c1f35ef327 msgid "PDF only: create a new :ref:`Shape`" msgstr "PDFのみ:新しい :ref:`Shape` を作成" -#: ../../page.rst:109 592d1f5ba80d489bb13be4744f57d2a7 +#: ../../page.rst:109 96e0dd1204ba47f69a9a445946437939 +msgid ":meth:`Page.recolor`" +msgstr "" + +#: ../../page.rst:109 1ce88ace4ed44722943827a8401ea1ab +msgid "PDF only: change the colorspace of objects" +msgstr "" + +#: ../../page.rst:110 6ccde26da750454a97293ed3041ad6d1 msgid ":meth:`Page.remove_rotation`" msgstr "" -#: ../../page.rst:109 f857153bfc3b4ed5a8daab152fc4da05 +#: ../../page.rst:110 24aceefd458c4b668e0fe6ec58877a9f #, fuzzy msgid "PDF only: set page rotation to 0" msgstr "PDFのみ:ページの回転を設定" -#: ../../page.rst:110 e223c4ba420844dfa3956155d24ea960 +#: ../../page.rst:111 d9101243a0af4275b846a09587cf4710 msgid ":meth:`Page.replace_image`" msgstr "" -#: ../../page.rst:110 d19d5b61fa664c8d90cf2f26068e780f +#: ../../page.rst:111 f4790a42d72040a89eac0b0ba1b4538d msgid "PDF only: replace an image" msgstr "PDFのみ:画像を置換" -#: ../../page.rst:111 ../../page.rst:2284 447c113c00954d328f1fef66a92f2b87 -#: a4f8fdda834f42c5a653baa06c2a2ac3 +#: ../../page.rst:112 ../../page.rst:2332 0f30a36bc2514748a56c858439fe79f4 +#: 525cee6c43354472a16bd42a1a903dd8 msgid ":meth:`Page.search_for`" msgstr "" -#: ../../page.rst:111 96dc70529ba14d67bdd87fd4b654be1b +#: ../../page.rst:112 781f1704b9c64dbb94c6c3a01b29a9d8 msgid "search for a string" msgstr "文字列を検索" -#: ../../page.rst:112 9f410cf8bee84c14834bbe6a2836f49d +#: ../../page.rst:113 87639ec8acb448a688d3293a846ada1e msgid ":meth:`Page.set_artbox`" msgstr "" -#: ../../page.rst:112 bc64835b94f34d05b94ea46c8584d136 +#: ../../page.rst:113 2c969d520cdc49339c07163b60947cab msgid "PDF only: modify `/ArtBox`" msgstr "PDFのみ: `/ArtBox` を変更" -#: ../../page.rst:113 aba500421b5445378d0b4911e5ece9d2 +#: ../../page.rst:114 8f77fd2b31ba42069b35c9a2b77be0b5 msgid ":meth:`Page.set_bleedbox`" msgstr "" -#: ../../page.rst:113 8bb8ea37b9de409ea8196757ca6527fb +#: ../../page.rst:114 f94d1b59f9f746ee8e72c85cddb228fa msgid "PDF only: modify `/BleedBox`" msgstr "PDFのみ:/BleedBoxを変更" -#: ../../page.rst:114 e18e208a477f477dbba8b8406d1c608d +#: ../../page.rst:115 5a086c34df134efa9ebec5e7d459d56f msgid ":meth:`Page.set_cropbox`" msgstr "" -#: ../../page.rst:114 6bbc35e8a4974bc2a36bad5f1b6367d0 +#: ../../page.rst:115 07381797f30346adaba78f74c467e565 msgid "PDF only: modify the :data:`cropbox` (visible page)" msgstr "PDFのみ: :data:`cropbox` (可視ページ)を変更" -#: ../../page.rst:115 a9d9aaf22fe94070b16a4fa73a69ff3d +#: ../../page.rst:116 472c229bed474f2b9c42a4f6fd13e843 msgid ":meth:`Page.set_mediabox`" msgstr "" -#: ../../page.rst:115 446bdab853304d04896d6229b7e710ea +#: ../../page.rst:116 f5eb324e693941dab4db95e008824af4 msgid "PDF only: modify `/MediaBox`" msgstr "PDFのみ:/MediaBoxを変更" -#: ../../page.rst:116 4f5de31d0eab480bbcdbe9e8a5ebc370 +#: ../../page.rst:117 a06a6562846e47a0bf3c04461bbec798 msgid ":meth:`Page.set_rotation`" msgstr "" -#: ../../page.rst:116 4a9f3e205dde40b3ac520bb107a754c6 +#: ../../page.rst:117 035ec0f523d54168a0b5e311e7d688a6 msgid "PDF only: set page rotation" msgstr "PDFのみ:ページの回転を設定" -#: ../../page.rst:117 a8d7e481ede44033a6005879ddf85b96 +#: ../../page.rst:118 b4a48031c2d443e3a6a1972b7b6f1700 msgid ":meth:`Page.set_trimbox`" msgstr "" -#: ../../page.rst:117 9d1a66a6565d4917ac8e6244cf72a204 +#: ../../page.rst:118 9d2602670b2f457e96e0cc93b782a2d2 msgid "PDF only: modify `/TrimBox`" msgstr "PDFのみ:`/TrimBox` を変更" -#: ../../page.rst:118 57f3e86a3010460698d1ddc445a4b570 +#: ../../page.rst:119 fe6290e9292144efb8c2512109f958f9 msgid ":meth:`Page.show_pdf_page`" msgstr "" -#: ../../page.rst:118 cfc3f587d7dc4aa1a368d7632c1820cc +#: ../../page.rst:119 e9bf3f416fc745e4aa3e30dd023f95a0 msgid "PDF only: display PDF page image" msgstr "PDFのみ:PDFページ画像を表示" -#: ../../page.rst:119 32892f9a360043a3bc391442c233e326 +#: ../../page.rst:120 da1d26f46e2d4c378278ca146dd9f05d msgid ":meth:`Page.update_link`" msgstr "" -#: ../../page.rst:119 c5ba3adbb7dd4d5d8ca1eba00fcb5f3f +#: ../../page.rst:120 d78d924cefa8438f8978e7a7c549dedc msgid "PDF only: modify a link" msgstr "PDFのみ:リンクを変更" -#: ../../page.rst:120 406c8154763d4312a0d3a1c224b06358 +#: ../../page.rst:121 0168f545ad9e42c3924e1a1e79990629 msgid ":meth:`Page.widgets`" msgstr "" -#: ../../page.rst:120 e8628a7ec90c436aae939a48a74f58f5 +#: ../../page.rst:121 aeb382c4dc584ecd84b68a381a02bf0f msgid "return a generator over the fields on the page" msgstr "ページ上のフィールドのジェネレータを返す" -#: ../../page.rst:121 eb4d1acc10584a9fb452f9d9bbe77420 +#: ../../page.rst:122 746834256a6d47d082af281ca392a879 msgid ":meth:`Page.write_text`" msgstr "" -#: ../../page.rst:121 5189d0c9042841b69298bcf267de26e5 +#: ../../page.rst:122 81600301b67e46a7bf5a0593285b9b42 msgid "write one or more :ref:`Textwriter` objects" msgstr "1つ以上の :ref:`Textwriter` オブジェクトを書き込む" -#: ../../page.rst:122 fd0298a662de4d2587e3bbdbd9be1530 +#: ../../page.rst:123 22fb756f39a640c2961aebbd044fc305 msgid ":attr:`Page.cropbox_position`" msgstr "" -#: ../../page.rst:122 f630947b1e4340148d79b3b4710be30a +#: ../../page.rst:123 641bccf7727e4cbb8a3dea3bc846c009 msgid "displacement of the :data:`cropbox`" msgstr ":data:`cropbox` の位置" -#: ../../page.rst:123 d347e5a26c2f41e894d9e119aac25195 +#: ../../page.rst:124 cd33175e173e4c47a5d6700bfa73cf14 msgid ":attr:`Page.cropbox`" msgstr "" -#: ../../page.rst:123 4af38ce677e745af999306648f75d4f9 +#: ../../page.rst:124 d20dd6b66d8c407484964c12e6fa0297 msgid "the page's :data:`cropbox`" msgstr "ページの :data:`cropbox`" -#: ../../page.rst:124 b5d409b273f6495c8b1e044ec4974e3f +#: ../../page.rst:125 69686837ecb14f98a1717f80065889a9 msgid ":attr:`Page.artbox`" msgstr "" -#: ../../page.rst:124 cdf27b956089479a9bcc357e0758ab8e +#: ../../page.rst:125 8100ded041a0416a8049e54bd42a5705 msgid "the page's `/ArtBox`" msgstr "ページの `/ArtBox`" -#: ../../page.rst:125 ff7be34db5f0484ca9de56a217bf5915 +#: ../../page.rst:126 83dcbd9957ea4abba0df39e6b57ce629 msgid ":attr:`Page.bleedbox`" msgstr "" -#: ../../page.rst:125 b224da059c534b91b8845ef757ee3baa +#: ../../page.rst:126 a4078b6a12e248a2b78385855ae8c427 msgid "the page's `/BleedBox`" msgstr "ページの `/BleedBox`" -#: ../../page.rst:126 a8ecee53e6544959b830fb2af7926b3e +#: ../../page.rst:127 a82a9fe450d847d58ca2a70fa56a7aa6 msgid ":attr:`Page.trimbox`" msgstr "" -#: ../../page.rst:126 2e154aaf0e8f487fa0e390faa6827cec +#: ../../page.rst:127 c3052be687384369ba6383db8b9ab08d msgid "the page's `/TrimBox`" msgstr "ページの `/TrimBox`" -#: ../../page.rst:127 945457ef4d69498792d2999de1e23247 +#: ../../page.rst:128 cb0d3b66e4434a32a5ddb48e95791e78 msgid ":attr:`Page.derotation_matrix`" msgstr "" -#: ../../page.rst:127 26458c309a3644259c997d63ef1804b8 +#: ../../page.rst:128 48ba0ea6ef074bc3b1f13e3ea2867e2f msgid "PDF only: get coordinates in unrotated page space" msgstr "PDFのみ:回転されていないページ空間内の座標を取得" -#: ../../page.rst:128 9ad92ace1f5d4ef99bfb6982729a335b +#: ../../page.rst:129 cf4423e790b5457482f898ae5f16c038 msgid ":attr:`Page.first_annot`" msgstr "" -#: ../../page.rst:128 010c9800a55a4708a664c7ccd8c773b4 +#: ../../page.rst:129 4bb62e3b4ef04de0955c72c3da919eec msgid "first :ref:`Annot` on the page" msgstr "ページ上の最初の :ref:`Annot`" -#: ../../page.rst:129 0d8c37a54fa741409c69f5c8bc22975b +#: ../../page.rst:130 648be33d9f544cff85da2fb47d94ca02 msgid ":attr:`Page.first_link`" msgstr "" -#: ../../page.rst:129 cd4a1a6101bc4352a82c3e53c0069088 +#: ../../page.rst:130 6917d2ca55e646269c31232e1dee233d msgid "first :ref:`Link` on the page" msgstr "ページ上の最初の :ref:`Link`" -#: ../../page.rst:130 89cd472111f148c395a733bac84ad4a5 +#: ../../page.rst:131 9243944617324220a7df0bd88edd7475 msgid ":attr:`Page.first_widget`" msgstr "" -#: ../../page.rst:130 1206588d92034667bab3a4e123f6f542 +#: ../../page.rst:131 e25334201ade412cab91482159e1ba6c msgid "first widget (form field) on the page" msgstr "ページ上の最初のウィジェット(フォームフィールド)" -#: ../../page.rst:131 3efa35f52dfe43fca2b7e3c8c4d344dc +#: ../../page.rst:132 8b9c7af9e8e44c33b50e2e3214e5f38b msgid ":attr:`Page.mediabox_size`" msgstr "" -#: ../../page.rst:131 fcf9b9beedad43d3abc3bdb41b8b77c6 +#: ../../page.rst:132 368e26974b684e56b226340acf738793 msgid "bottom-right point of :data:`mediabox`" msgstr ":data:`mediabox` の右下のポイント" -#: ../../page.rst:132 570a92168e494ba5b8be45c5e67610d6 +#: ../../page.rst:133 3055cedb71d84fce8b387864e6836d8e msgid ":attr:`Page.mediabox`" msgstr "" -#: ../../page.rst:132 2ef4e3cd46094fc7b623a917ae36c416 +#: ../../page.rst:133 3548dad5daec44ce9f377be2892d94f9 msgid "the page's :data:`mediabox`" msgstr "ページの :data:`mediabox`" -#: ../../page.rst:133 b68e2411eb2e4e97b87bc00897ce9130 +#: ../../page.rst:134 01abd03b3cf744afa78b6d62a9355fb5 msgid ":attr:`Page.number`" msgstr "" -#: ../../page.rst:133 484f364b92874eef8f057485cfc535d9 +#: ../../page.rst:134 efde9048b5ca4b989f139b24e557bebc msgid "page number" msgstr "ページ番号" -#: ../../page.rst:134 e253fe4729854632af3c6126a31651a5 +#: ../../page.rst:135 084663951eab42de83414547a4bb2149 msgid ":attr:`Page.parent`" msgstr "" -#: ../../page.rst:134 26be84025dbb49c890127c1b3feac079 +#: ../../page.rst:135 b0a25b0637d04b909532cc18344833bb msgid "owning document object" msgstr "所属するドキュメントオブジェクト" -#: ../../page.rst:135 ea82053832b249b3bc76dd3f3cbbddb9 +#: ../../page.rst:136 4ca2f14abc7c47c8851e6951cec2a839 msgid ":attr:`Page.rect`" msgstr "" -#: ../../page.rst:136 990ee23d2b53475aa9ebc5270be462a5 +#: ../../page.rst:137 8765de0c816349e59c2cbe931de25a06 msgid ":attr:`Page.rotation_matrix`" msgstr "" -#: ../../page.rst:136 fa7dc95cf5444adab4bb0065cffcec00 +#: ../../page.rst:137 b5abd69454164760875080655f9f8c12 msgid "PDF only: get coordinates in rotated page space" msgstr "PDFのみ:回転したページ空間内の座標を取得" -#: ../../page.rst:137 7ac47a6b63df4e6fbef77ced23ce2afe +#: ../../page.rst:138 7645cca626724d5db33a8ad66711119a msgid ":attr:`Page.rotation`" msgstr "" -#: ../../page.rst:137 b673362847f242f8b6fa3c25fe2907e9 +#: ../../page.rst:138 af5ae3c273f14123a95e9a4bd778f9f6 msgid "PDF only: page rotation" msgstr "PDFのみ:ページの回転" -#: ../../page.rst:138 238652055ae3432aadcd1ae5f8d53eaf +#: ../../page.rst:139 4201f9a04eb4428f861e7ffeddcb6a96 msgid ":attr:`Page.transformation_matrix`" msgstr "" -#: ../../page.rst:138 e529c61864b247a1882d882614d0c6b6 +#: ../../page.rst:139 a3490dd1cd944f26a819e0e2fec9a671 msgid "PDF only: translate between PDF and MuPDF space" msgstr "PDFのみ:PDFとMuPDFのスペース間を変換" -#: ../../page.rst:139 0761a264f61b4774b3ef327ef07a3ed6 +#: ../../page.rst:140 ea5a9817a90f41b98f4f78e4aa630f7b msgid ":attr:`Page.xref`" msgstr "" -#: ../../page.rst:139 5c2be30d5b894adbb25c6e7b1327de81 +#: ../../page.rst:140 ac78af1937484fed9a52aecd476ed1a8 msgid "PDF only: page :data:`xref`" msgstr "PDFのみ:ページの :data:`xref`" -#: ../../page.rst:142 377430c78df242c4a7c9e5f70cd6d148 +#: ../../page.rst:143 7aec2adf2a3d4c828601fb1aa79b5c06 msgid "**Class API**" msgstr "**クラス API**" -#: ../../page.rst:148 45342b77da85476b8a051868c72ccc05 +#: ../../page.rst:149 0d7bad78f95c4497b4665fc2b28a203c msgid "" "Determine the rectangle of the page. Same as property :attr:`Page.rect`. " "For PDF documents this **usually** also coincides with :data:`mediabox` " @@ -951,34 +959,34 @@ msgstr "" "と一致しますが、常にそうとは限りません。たとえば、ページが回転している場合、このメソッドに反映されますが、:attr:`Page.cropbox`" " は変更されません。" -#: ../../page.rst 00683e13ed27467d925aa54bb1447cd6 -#: 035214f03ef146539fc2d26c35a22d56 13eb68cf5b6a475db90d7e617d302f95 -#: 161b216658cd40a7b89bbeeb93f1eee1 1813d1eb977442b0af619f44f4383dcc -#: 26295087328248aebb6ca80d2246d9fb 2e723b0be371418d8c0f97886f97bc30 -#: 2ef427f6cc894ce7addd5274003d110d 3220c86b101e46c3a5d37f6ee7c1fd03 -#: 3c50589539b74df1a24dae91c7d60779 40ea3a5a26f94c599917568b4ac4e4bd -#: 572c98274c7f488da1b4ebefa1ecf39e 637b3094679942f3bd3df4cef06bd0ed -#: 696199b1ae324712a157b2e33f32963a 8309e21367024a7b86b7ceda80588847 -#: 9b1f214ffd054ca4a27628703cd82b57 9e762e714de3409db64c1924174baadc -#: a71f0164d47147359f002a1c6a8e014a aa70e420675947108dee10ede3297b52 -#: b8df8f74c9d7446e80d01864d6fc4d2a c635e17a4da948cd9b2574bd253c22a5 -#: c6b11d04c0734cbc83eea2a79b01d84f d218f9dbe37d4328a2378c42b16603a7 -#: d2190371303a4ed8bb07f1d8e318d640 d45bbe14778944529972440dc13c744b -#: ebf55e712472439a9418bdb707cac980 f00fc59dd1bd4752b4c24665b6d14407 -#: f9281258fa654450bb77252e295c77ab f99c3828769a403bb7c3bd0c7643fa9e -#: fae904763de74640b91f7e76f4d7c180 +#: ../../page.rst 09800d915d4f462b814820d9da1c5d1f +#: 1b49bdb9e449440faf4b12601d96673b 22ae66b30841488ba7e417986f398042 +#: 25b12dadc1994b939b5e4b8a2cfd9c85 27ee08bd8ef840f4a6dc060def5f4b8f +#: 288140f4f5a64d62bee924450212d6ef 2a19a07202ff403fa6303b5ae96700d3 +#: 2ba9537e4bf54a6da2ebc84b6935f66e 31cbeb8a7e5a4076b6af7159a75e87f3 +#: 35bd1ee1b82a4388978f998bdaf8b7f0 388f1fd6c75b4742965919a308fd97eb +#: 393caa01e96a427794f0771465370f30 3d998b5fff7c4d8097c282839b5f00d8 +#: 54c821d6f3284303860716473e091571 6101b0a009b347cd9e53cb307fb67032 +#: 842b86c8440a403a8c13645e9a71a2b2 94549fe1b41d4b82a1242332792b2827 +#: 9d065390780446be8b88ad9492c4b0c4 aeed1b5df6cc419fb9a16c85d414fb4d +#: b3ba456f95a945ea880f1a46596b8821 ba4b9a3125574504ac2a6ea814e231e6 +#: cb3097e23be4457c8cf75a1514f49d98 cb5ad1ec68ec41e28d5c239378d3b106 +#: da7c6f3a603046f484165c599b41b8f0 dce99577fa0b47d984f70345cbf5befb +#: dedd2cdbd5224c6ab6dcc6b392a0bb77 e43ae0f434644128ae26009905a32b51 +#: f87bc03a54d64ba98a3fbb74b4385664 fa898c8cb41d4f48877d309373a9007c +#: fdd47076bcd142338b6460a1624e8184 msgid "Return type" msgstr "戻り値の型" -#: ../../page.rst:150 ../../page.rst:2125 ../../page.rst:2135 -#: ../../page.rst:2147 ../../page.rst:2208 ../../page.rst:2214 -#: 07bbae5d84d14ad48f2f8a08d5a055da 2f868d36d34a47b98b37b5cd07d46eb8 -#: 5f15420693224053a78c729e5c210a98 9890f0e5608747f091d0cd9ac1d09284 -#: b0cf00b0f7fb4f88adaad443e431c7e4 e4694e289aa64fdaa31a61c12eea57a3 +#: ../../page.rst:151 ../../page.rst:2173 ../../page.rst:2183 +#: ../../page.rst:2195 ../../page.rst:2256 ../../page.rst:2262 +#: 4dc600c7284a49bd8c350d20bf8e69f2 51eadb017f48474e8e33b93d32d6e29d +#: 85e3363ccace4f7b8bffe6dc225f2f97 ae91e665e95d4a238ba71eccfbab4a1f +#: ddba847f58c046e78eeacb24b25c6abd ff19be16d45445ef830755e944a2abb7 msgid ":ref:`Rect`" msgstr "" -#: ../../page.rst:154 3054a3a7dc81497e926bfc025dbd976c +#: ../../page.rst:155 d3a80abecbe949b4a5de9247e65d61bd msgid "" "PDF only: Add a caret icon. A caret annotation is a visual symbol " "normally used to indicate the presence of text edits on the page." @@ -986,170 +994,171 @@ msgstr "" "PDFのみ: " "ケアットアイコンを追加します。ケアットアノテーションは通常、ページ上でテキストの編集が存在することを示すために使用される視覚的なシンボルです" -#: ../../page.rst 038228e7557f4e49982cd391a603ac25 -#: 0ee94c101b1d4fbe916f3ff3d1a0cbe5 172f01a50916477aa69f67178f5713e0 -#: 18cd3714a7cf46669ff52244bde7f86c 1bc39cd736074194bf2e3c0cf3fbad6c -#: 1f55960f499e4e1dbce34fdfc701504b 263f517d8a704ffda45e77e9dabdfaa5 -#: 27f76b3d46c64d5286ea0f34192df25d 29101bdce62a427db9c6b3b8ead77aa0 -#: 2c5ecabca43945e4afe5c59375908ba8 35c21361158042ae85d6fa2da9693088 -#: 39d645f518944a06bbab1d85bef67cf1 3fd050e408ca49b481fae0e90f57d18d -#: 40b56bcd94dd422e8c9a168511f4ff48 537efc946cdb4f9e8e1f6463748075cb -#: 54b8db29bee4459ba144f6e6e9e60309 5673a19485f6421996fb20813fd95a1f -#: 5d86a0b878f848369bfa844cc4464e3d 5f08093be4cb41858e504406333d67a9 -#: 65fbbd35e1ca48c3b919b4301c3c207d 6c8cae2b00404ee48c3073693b49eb04 -#: 70fa2f16a8e942999a68e5615647c43c 760004031a7d451682a29c235df077a8 -#: 7a778f95c3444627b689db8a07dcb801 7c075b4599f04aaf9e9c50f8f6feec3a -#: 7e6a4f604ec94dabbe3be8ac0b2b18ee 83623ed08ebd43938a4fe24add56c957 -#: 89ddc76badb44fda9fa5215125aee0cf 903b0cb97c154e979213f44498bb5b7a -#: 917dba57de1f4a42b63c67934ca5f450 934bd182ff7f4478a10fdd5fd1541b15 -#: 94b90d7bdf314f48b888d1c14373f481 9545fe5ade8d4addbd5c19aa8e06e485 -#: 9587ceb87127495f9e3d20030da20510 9b793fb54d044951a38b2b5336c5c1a2 -#: a451e8bd957444ccaa57553bb1ec8301 c5769c21f59e4fc284177d1e9092cca6 -#: d55420fcfd3d48d9b7ad273f46e236df dc29b592e77a437a943bc055e9894d7c -#: df9ab9e7f4ec4881b012f9531eeeb63d e2e8a0f457934b81a321dc5084e44623 -#: e3293ff021be4ce7b80031cff7132810 f36602ca2b8a463eb4e7db48680fb760 -#: f4594b48fdb542e08a6b12b87099cda4 fe7a6badf976453cbff451d08d633d89 +#: ../../page.rst 0c759786167649a4bf3a81f586fa575d +#: 1360015bc1ad47848cdac8102dc7df72 1b41e9143c7c48578e46fe316cc7bf83 +#: 1cb20c0ede95405fb7082c75d9860bbc 22dada0918b54eca9e9cb3d4be7a0d2e +#: 261f34b13a1a4f3da090c948f2a18861 2df2025bb6ae4e4cb980e26032bca18a +#: 2e89bf0f52e1457dbb9f24fbf1754764 2fc970dd645e4363b45b446fb4e2c763 +#: 30775b33047941cfbe784fcca2f69808 32b6ef52999c439eb0992551b5ade6f6 +#: 3554d992deeb4877aca677a4d4daf46c 39a7eb384d6845f1b122cbbe8134bc66 +#: 3b1a5e7b0e3e4bbc899e12352c877ca5 494c52c35b0f4e55af0d1a92e1035648 +#: 4e2b075a1d4e46fa96eb321732b7f5a3 557cb315deb8425eb61fb866ccc39f23 +#: 795d24eaae2e4b30a3362f7c07e49413 8402dcc723704327a11971a65f49cc58 +#: 84f540da555e47f9a1f7cfded5352a29 89690857ab554c74928d0200611048f6 +#: 8c2352d5802343cfb825e56aeb1bd14f 924c973064b9421a9d341dd0d4c46d90 +#: 95029237dbbe444983a11a2a6e9f78e5 989965e995504437a63d71f63075bdb4 +#: 98d7f86fa9574070912ba83ee9e173a4 9e7164982bd442b683851914bbb15a22 +#: a0454ac0eccf465894b0951608a3fc09 a1e9f5cf6ee141c9817c274976eab8e4 +#: a2b81a758dcd4107be579c62e8c67d96 a86c46bd997646d885e4ebe816de1a6c +#: aeee3d8ec8254492b75a79713042796b afbed008352c46c2b2d3c4cc43158480 +#: b0aadc53fac64a75b1d112ac5bd4cde7 c31ca655fc42459f87a85d46bd45e4c3 +#: c712e33a9fd84c7b954dee8bd7d7931b c8c73f76a20a40b089ffb1d650561355 +#: cdddccb6cc8d41fdb9deccb437388151 cf9abb78f6a941ed8e44a31f40f52e0b +#: dade00d4a64a4f8d9e0332aa1766e9dd e5a5a6f31a8146899eab5015149bbedd +#: e6d86608de4248daa18a1ae1333f7b1e eeab0d0f14a84bdbb7a525cea72bebfb +#: f0d8c8bdc1a049bda25be5b7540b74c1 f7e0d5f9ca844f59a136e17a638bb2d6 +#: f9876f9d807f4b8f83997d8d94cb325d msgid "Parameters" msgstr "パラメータ" -#: ../../page.rst:156 01e534fd8618482a8002a7a8e09df6b4 +#: ../../page.rst:157 8499d8b15adf4dd6934c93e4bf236beb msgid "" "the top left point of a 20 x 20 rectangle containing the MuPDF-provided " "icon." msgstr "point (point_like) – MuPDFが提供するアイコンを含む20 x 20の長方形の左上のポイント。" -#: ../../page.rst:158 ../../page.rst:179 ../../page.rst:219 ../../page.rst:243 -#: ../../page.rst:252 ../../page.rst:263 ../../page.rst:274 ../../page.rst:315 -#: ../../page.rst:380 ../../page.rst:559 ../../page.rst:1868 -#: ../../page.rst:2183 14c0010524dd4a3a9567d16bd4d214bc -#: 1912577fe9f642218e81bc8b4f3844b8 31ecd187669d4dcc875ed0898cda25fb -#: 521e8bc1ccb74a1c96272c4a92dcfaad 5f67a74d31594314ba9e548a53e6eec0 -#: 713352f982dc41d98e2b873268cb91eb 7477c2ed12bb4ef9b68efbf9855fdac1 -#: 78ab16773c5345d184ce64fafffb9083 a83941ff81ed4c548293a14bb0388de3 -#: cc3ea72e9c7c4c249a7e9dccfd43725e e0e25a2d5bc746b1bab16e36b0709553 -#: fc8547850d7e4654b4e7aa3bf53102b2 +#: ../../page.rst:159 ../../page.rst:180 ../../page.rst:239 ../../page.rst:263 +#: ../../page.rst:272 ../../page.rst:283 ../../page.rst:294 ../../page.rst:322 +#: ../../page.rst:387 ../../page.rst:595 ../../page.rst:1908 +#: ../../page.rst:2231 0dc0330cb4a74731bbac096592ef80ca +#: 2709256c00de49feb1dbd47b11533f3a 29a2ca7ca51d40c392e14bd73f50da77 +#: 3f15bea4dbb440cc9cd6b44168b77108 50d5e614b51749ccbd9eb63ae369eb8b +#: 6f8c93a9f2324cca9e8dafbfa06efaaf 87c51f8fc1a94eb091f036c802a4419f +#: a970feb69ce34240b5756d5933d630ed ab57363b9a874f6a9f6048acdb993f86 +#: b4c57cb71c6d43669faa318baac928fe db6823017380446cb461b1ef24839b7a +#: fc2f2a90ed494ca5979649563a73a969 msgid ":ref:`Annot`" msgstr "" -#: ../../page.rst 03cb281fdbdb494d8d845b2801417f09 -#: 0556c69243164e2fb25f5a83c7983b8d 0e6772923001486bb7fda64ae3279de4 -#: 226729bf8b1c456fa8b280950ad0d0f5 293c37b67cee45a593ce55f6d90d7893 -#: 34f442f3d5ee4349846ca9f0a7a73c17 3a9790865f9546f3a4a5083da5925839 -#: 4431788d6cd84f55b36fc7b0868e26db 5608bf2321d4438eade7e8196b197b31 -#: 5c4815d7722a4ba79104716fbb6e3f66 5d4eb5794c064082a5ff3952497daada -#: 677bc1fe94af4ab695ce60d45366a04f 6b976cdf8f614bdc9191f29d2c83ff4f -#: 753b60a08f9846b985fe216f43a9093c 77e831590b3e408084c67852eff7657f -#: 78b896cfef9b4b7788254a648ced0799 78e58dc708ce419da19c86a2ab4c19e8 -#: 79a68bfd7a174b5f82a05f21a4cefe95 86d049e0fec44b4699367c49fabe9b2b -#: 8d62454f9f76407985f529d98144da8d 92fcabee9e27415e91ba2ec172427324 -#: 9857683d193e44b6bbe185aa6a173c6e 9af50909ddad48978c9f802c78e01485 -#: a2b0b5421d4a403a80db552ada47a0e9 a4755f31f8f0437c83691b0c1a2deb0b -#: a73aeac93736421c9efb45f1bfec0863 acc063c0d0dd49d496096756a0e28e43 -#: af94a8acfc2440bb9ed1177cc49fb776 b70043fc250c4759b420531e06443a10 -#: bbc76ff7dcb0411dada83b3bdc0d5f6d bd444f3afa724e95b21526883438c6b2 -#: bf777039c2074258879bc9c7e94a4eeb c175519a80904339bc15b9fba74a2832 -#: cd2bafad8096408aa0c40cc1c4e02f4f cf65334d4dc941a38a646c143d9c77ee -#: d7534cea6e734cd1a52ef881ba79d15f d8e74113db0542a7a1028a25eb209a86 -#: d948e3ea616a4d8ea663572495a63aa0 e443769d19f64ecca51a0fce3d5deb82 -#: e7cfa55cac0c4102a5ca83790e11aa47 +#: ../../page.rst 08fd9a98fced4ca08b671ef6946d9c7b +#: 0c4936af60b945139fa1f75b5a349bed 10e98b94fd2b4864a4636428f6f21a91 +#: 14e45f8a25604efc9adcb138c8625d54 19f96c9129fb4aef9189e8118ea57aa8 +#: 23df1cc94715493980e364bb9bf61b2e 247b29ff087e468099790862f6e0e106 +#: 28517c3484af4eacb331ad5eba1dd3e1 286a67394e8640e987484f5db767d8fb +#: 2a0d0c84577d4209b1898b4ad5088d2b 363efe9c442b40418dedb9dfd8e7b5bd +#: 3676fb2e715c458d99563b9fcae7b86e 3b545513f08a419dab7cbfe591008596 +#: 3f98b5afa81b4ca9859d67f918c42d7d 4d7033098e2146cd89092ffc55625bd9 +#: 5db0ad2394c0438e837d62e2d335c361 6aa26e52f32e4ab7a79edc5a392fb325 +#: 6f4ab45eb54343fb95b44b705d70b324 7327d2cfa8194d75b919d6b293a45565 +#: 7f95f3e8be19483db9f6a4078be346db 84d0f0c8cc3b475a8953f65caa28f829 +#: 8caf0b51949c45e1938a2763702a7786 9b81051bf528456ab82dcb5a52767b84 +#: a1aa2ca039da42d2a60f817d6818b6f2 a27f9ad9548846eea4bae07422a2ace0 +#: a2b741b58b164ca39bb0215ce5b03249 a5513cd336554892954ed5f805df5eb7 +#: bbfb4866d7ba4181b4c5c29333852530 bee1f1b70c2e482296b45f8864d5a5c3 +#: c3b97140456a43dca8d2be3dd22ff6ef c82bf67c39314e789c103507236d70e9 +#: c9057da2d842400995050db66f2d6614 ca5afaf4816b4f678211dfc38ab5f036 +#: cd9d4cad9eda4e4e9e9fa99bfdb2a2e0 d9c82a64864c4b418b14e7f2d5f159a3 +#: e2a530ad855c4fb5bc41b2bf0854dae0 ea71e9e700e7443c863ac4b1c185d11c +#: eabd95ad26864d429ebcf07e9647b4bc f5111a9bce1448c7b95cca799fe0e007 +#: f6e60b204f5a4246978f5aef943ecc70 msgid "Returns" msgstr "戻り値" -#: ../../page.rst:159 f4c221107f1a46c7a2f0d3f66a043932 +#: ../../page.rst:160 ec1317ff464446759b1258298338f243 msgid "" "the created annotation. Stroke color blue = (0, 0, 1), no fill color " "support." msgstr "作成されたアノテーション。ストロークの色は青=(0, 0, 1)で、塗りつぶしの色はサポートされていません。" -#: ../../page.rst:164 ../../page.rst:222 ../../page.rst:320 ../../page.rst:360 -#: ../../page.rst:510 ../../page.rst:572 ../../page.rst:608 ../../page.rst:630 -#: ../../page.rst:655 ../../page.rst:670 ../../page.rst:692 ../../page.rst:719 -#: ../../page.rst:747 ../../page.rst:812 ../../page.rst:841 ../../page.rst:866 -#: ../../page.rst:891 ../../page.rst:915 ../../page.rst:939 ../../page.rst:964 -#: ../../page.rst:988 ../../page.rst:1013 ../../page.rst:1037 -#: ../../page.rst:1062 ../../page.rst:1087 ../../page.rst:1268 -#: ../../page.rst:1316 ../../page.rst:1340 ../../page.rst:1400 -#: ../../page.rst:1427 ../../page.rst:1449 ../../page.rst:1490 -#: ../../page.rst:1601 ../../page.rst:1624 ../../page.rst:1680 -#: ../../page.rst:1710 ../../page.rst:1730 ../../page.rst:1745 -#: ../../page.rst:1786 ../../page.rst:1827 ../../page.rst:1841 -#: ../../page.rst:1855 ../../page.rst:1873 ../../page.rst:1890 -#: ../../page.rst:1971 ../../page.rst:2008 ../../page.rst:2032 -#: ../../page.rst:2050 ../../page.rst:2097 0499129b0df44ae1ab0f7d05066bfd42 -#: 053aa6622ff14a13bdb4cdc11b9fe27c 08a48f489ded4ee98ae6f78dc7d290b5 -#: 0b854c84cbb241b2882d1b299df342dc 0d3799a6b8e0499cb58019db3a61c152 -#: 1545b59ead014494b0fc06c7ff6beb84 1d3727f1ccae4e53bca438068e0ae972 -#: 1e040b62f51c47fa996a2181fe5e5d88 2e5cb316f9f94a30b73912aaf67baf39 -#: 31778dab0a56434783e7143bb74d30fc 389a379823964550a268f4db707f8d90 -#: 3af43db15970486bad3df71d581c490e 409f90180da84fafbc5c5e75ada80444 -#: 41ad7fc007294e1a932a60054e9bf206 45ad2c0f9a6642339ae5bcedb2744b46 -#: 4c617de2389e451f834897820685159a 50d361d971a24d73b4461f242a2070e6 -#: 555bfe8de85d43228014a8bbe561badb 5891e999a0b849f1b873c6371c493560 -#: 59556e5ba419435d882c6366ae155786 5bbeefb039b648d69f4a70f3dde4ff8f -#: 63dcc8bc74b74841a256d35780254f42 6c7e170fd5d94805afcc9e1168508927 -#: 6d3af5e57add4ab989af4c4ba87ab97a 6e224694f08947e69ca334fa2f93a746 -#: 75012cd799d54fa5933801a07182e485 78c55e7d55a04a449df8ed8b31ccece3 -#: 7b50271e5186441a941d0ca24f9824b7 7d6b8a6d917a4fe3ace5dd74b84c0bb3 -#: 7e5f6f968a4144a5ab507e785e25a93f 8572e42feabf47fba5f90ad0fa81a22f -#: 89b3e7b77eec4791955df63a88b3373c 8a5a7076c5544173840953bbd9175e4d -#: 8bffbfb33d994061bdd5c94f826861a1 918b6310d2e546dea0aed68747be3a4e -#: 9ec777c31b28497c990b13415ed8ae0f a9111855d14747b583dd91eb5fcfe299 -#: af1baeeb54284f9c915c78ea2ba67520 bd119eafd7c44c2bbac0794ee56bda1a -#: bdded10f440b4c17b6887510165f05eb c287e6aa01824d53b0235c57b0e8697d -#: c4e56330ee524b06891cf2a860162c85 d5bbb51b447840049119dba5df2ac29f -#: de1d4163a81c4a66bbf838a63a42f6ad df561bab600d46488073449baba76735 -#: e07d287e19c04ca0bd116c288fdadd28 e2355898e1ef463fb05a5db422f88166 -#: e54346294c5d4336b04b767837ab3df6 fa06c7be50504a49945f6a3d8aca6296 +#: ../../page.rst:165 ../../page.rst:242 ../../page.rst:327 ../../page.rst:367 +#: ../../page.rst:535 ../../page.rst:608 ../../page.rst:644 ../../page.rst:666 +#: ../../page.rst:691 ../../page.rst:706 ../../page.rst:728 ../../page.rst:756 +#: ../../page.rst:785 ../../page.rst:850 ../../page.rst:879 ../../page.rst:904 +#: ../../page.rst:929 ../../page.rst:953 ../../page.rst:977 ../../page.rst:1002 +#: ../../page.rst:1026 ../../page.rst:1051 ../../page.rst:1075 +#: ../../page.rst:1100 ../../page.rst:1125 ../../page.rst:1306 +#: ../../page.rst:1354 ../../page.rst:1378 ../../page.rst:1436 +#: ../../page.rst:1464 ../../page.rst:1486 ../../page.rst:1527 +#: ../../page.rst:1638 ../../page.rst:1661 ../../page.rst:1720 +#: ../../page.rst:1750 ../../page.rst:1770 ../../page.rst:1785 +#: ../../page.rst:1826 ../../page.rst:1867 ../../page.rst:1881 +#: ../../page.rst:1895 ../../page.rst:1913 ../../page.rst:1930 +#: ../../page.rst:2019 ../../page.rst:2056 ../../page.rst:2080 +#: ../../page.rst:2098 ../../page.rst:2145 06acb7525fa345d28f749242f8b47be6 +#: 0f9fc223156b45e4a676ab5eb70b8ead 1a2b3b87c6144bdb8302eb3d58e78c53 +#: 1ab2b1edde3a4d9bb3ca70c6478477a6 21e12500b2924672bfaec8de4de14c00 +#: 22b2de474bf74c85b2f78ed2b44583f3 2717c1a780fd4164bdadbb368f6b07ef +#: 2eba93c648e34c579b7f83abc2bda2d1 338923e792254613a7f78d9be8087cd6 +#: 3b036f07260543d5865755b71a8725f6 409db0684db5497bb6c2b3ef11c48ba8 +#: 42e6978597424fccac4a978fcc1b1d42 4be4b732c92a4ecaac80e62d4c9bb625 +#: 4d1f142369254d80ad029683d5da3a4c 5202ba5596424fa1970e216ea1d101d8 +#: 535b10586d03495a8f754c9db94a0a10 53f75abc965945de8d462439098e3b93 +#: 59c623d3e0274542a3292e9787a1a82e 5a77a9a4b43e4ac5b4d7cfafc208e732 +#: 5af9bc466ac74bb49b8b6d4fa96112ff 5b066106759f4ddba0f96f427ea03bef +#: 5c3c5397df414eccb40e8b119746c75b 628780eec248445ebf4aa425da90f9c1 +#: 6974495fd9db42a0ad2bcec2ab860f09 7bbd1cc816a3433484c45705405ce41d +#: 7e74eae0e1164a3bb85228e8d0098fa4 83c866856f47496890bec21f133a6a29 +#: 89068605cd7b48acba3c666223f108f5 8c0f8b8d788842b39235739f838763c4 +#: 917e90c5f80646bf8abd2dab266a8a6f 989a1f313b07484998fbd8b1d7d93691 +#: a0219846828c4d91add801287a03e08b a5426843c4be4b15ab31c53c9481269a +#: a5b56f38886544b6bd99fc8923267b0e aa440b13daa643b98576c24d9c5b4fa7 +#: ab1c4110f36e47efa1ccbce643199f86 af11443e453048d7a725fdc3282e20e3 +#: b93585a5220c4ed09fc7f3df595369ed b941dcc21b1c4f63ae04575bed58076b +#: c8fa2de2013144f0b54dd67e33d18de4 cce75f64802e475491277a27dedb4780 +#: cf8a35726f5a4c4b8a201622b1d83104 d344985b81444b099355020e85dbf7b3 +#: d64136bd167c4a80b5e211d77fa0b2da dd703e1ef3534437bbf1c68a935d3b09 +#: f032910a6d274521b47cefa8607773cc f1e163b082594cdda50f3084293cd85b +#: f510ba583d734bc08f30d434af29a350 fb517cbc7ba8408194ed6dca086893d7 msgid "|history_begin|" msgstr "" -#: ../../page.rst:166 46a0ee135a2544718b514d29fc344ac2 +#: ../../page.rst:167 0c25bc5956e5427cb892bd9dca5b2dc4 msgid "New in v1.16.0" msgstr "v1.16.0で新たに追加された" -#: ../../page.rst:168 ../../page.rst:226 ../../page.rst:324 ../../page.rst:368 -#: ../../page.rst:515 ../../page.rst:576 ../../page.rst:612 ../../page.rst:634 -#: ../../page.rst:659 ../../page.rst:674 ../../page.rst:696 ../../page.rst:723 -#: ../../page.rst:751 ../../page.rst:817 ../../page.rst:845 ../../page.rst:870 -#: ../../page.rst:895 ../../page.rst:919 ../../page.rst:943 ../../page.rst:968 -#: ../../page.rst:992 ../../page.rst:1017 ../../page.rst:1041 -#: ../../page.rst:1067 ../../page.rst:1091 ../../page.rst:1292 -#: ../../page.rst:1320 ../../page.rst:1344 ../../page.rst:1407 -#: ../../page.rst:1432 ../../page.rst:1454 ../../page.rst:1495 -#: ../../page.rst:1611 ../../page.rst:1632 ../../page.rst:1685 -#: ../../page.rst:1714 ../../page.rst:1738 ../../page.rst:1749 -#: ../../page.rst:1800 ../../page.rst:1831 ../../page.rst:1845 -#: ../../page.rst:1859 ../../page.rst:1877 ../../page.rst:1894 -#: ../../page.rst:1976 ../../page.rst:2015 ../../page.rst:2037 -#: ../../page.rst:2055 ../../page.rst:2101 0067480ba2884334a2933e7bc474cd27 -#: 08aa87ce66cc42aaae1d212eef84964b 0e44055cd318431ea7b93a8b71b14aea -#: 10a528eac4d74286af4485da2dede6b9 19027bf58d904aa3b420007ca07482af -#: 1ddb1dd894f9496f99ee5719bf78f7ec 2690e5aee2404cae88e1d50c6d7433e6 -#: 27fa60fa53154324a6db05ab28109547 2e78a35376294a158fadd83c7c563e36 -#: 336ea75943304435b6d44f1ee59d623c 37df9055cfad47d5b78de9188c3b22a6 -#: 38b978b563334b07b258322ab8c57580 38fffe3bd9c94b66b91f6da5abb4bc44 -#: 3d33fe6cc12e4167922a1121b9f47e66 3e1965f0535e4c6d9cba0cc06d7db398 -#: 5576b46080914604b46a0c260e230721 623532f876bd48be8bc07b093f05ce0e -#: 639b007464614b85b14f6129a2f7b116 6a19103f8b7e4eb6a491600398ecddea -#: 6efc35792deb4aaab8fed98785a4d3ef 731045b53df547688393a9b75a385422 -#: 7649f60bfdb84ae8b0f498ec2053557f 821ce16aa3fa41989fa3c6779c39c70c -#: 844f32f4874c462fa92cb0b67d7d6c06 851eac1b2bce4051b0196723aec758b6 -#: 893e7bfc6f914140800d689eb59f44d7 91c1e36e02e74db4914c929643e82606 -#: 9648c54b06af4f959caef32c2dcca051 968fa74b060346f4b08574628db63bb4 -#: 97d4fc3bff414f578693eab6cf8051a5 a23fede0cdca4b05b9152a0ad5db5708 -#: aa49a57639ce46a4b60378839a7ecf7e ab38c1b72ffb43c58ef8035057d914b3 -#: b5d80be90b294e25b1fd3135943b5413 bb2b9f3a24b547bbb9317e99d560fcf6 -#: c491b95a1a484d79bec54b1a934502dd c6d7bc070be14c0e83b1dad047672919 -#: c94690968b01470cb690b3795a42c47d cae4ce69668849e0a4490007dd9d4013 -#: d987969627cc4e8c983ae389a3e6b221 dc58c384c7da446ca39949dffe65b1ea -#: e67d79be68244bdbb4d550861b477a9c e67e1a02fd014701b5f639aa6a8aeaef -#: eba380de3f1f49ee87b800bf4f706d99 ee211b72d82249788d28d3b44fe29b66 -#: f8fab178e79948d38875fdd2d9d60802 fa90cb4558494fafa689c4b33671b271 -#: ff3206fd25b046a1abe81f8c030d6b4c ffbf7eee81164952ae242007d9bfd07d +#: ../../page.rst:169 ../../page.rst:246 ../../page.rst:331 ../../page.rst:375 +#: ../../page.rst:540 ../../page.rst:612 ../../page.rst:648 ../../page.rst:670 +#: ../../page.rst:695 ../../page.rst:710 ../../page.rst:732 ../../page.rst:760 +#: ../../page.rst:789 ../../page.rst:855 ../../page.rst:883 ../../page.rst:908 +#: ../../page.rst:933 ../../page.rst:957 ../../page.rst:981 ../../page.rst:1006 +#: ../../page.rst:1030 ../../page.rst:1055 ../../page.rst:1079 +#: ../../page.rst:1105 ../../page.rst:1129 ../../page.rst:1330 +#: ../../page.rst:1358 ../../page.rst:1382 ../../page.rst:1444 +#: ../../page.rst:1469 ../../page.rst:1491 ../../page.rst:1532 +#: ../../page.rst:1648 ../../page.rst:1669 ../../page.rst:1725 +#: ../../page.rst:1754 ../../page.rst:1778 ../../page.rst:1789 +#: ../../page.rst:1840 ../../page.rst:1871 ../../page.rst:1885 +#: ../../page.rst:1899 ../../page.rst:1917 ../../page.rst:1934 +#: ../../page.rst:2024 ../../page.rst:2063 ../../page.rst:2085 +#: ../../page.rst:2103 ../../page.rst:2149 036b5a5a97204a56b1a3b988b8afb868 +#: 03c5be9f8ce44383b814ed4e7ccc13fb 06428cdd0f834eeab15e6b2959d8f55e +#: 074be0b70f794bdb94f11e93b20cdd11 09eb1bb0390440519aa0d55c0cf792c6 +#: 0a70f894122a4bc788b2a7edb7d0a125 0c96a8b2e3b14c3495db50e345d6d293 +#: 0ebc94691edd4812bc7541ccacc1e46f 1589d3b9736d4a428e40e3e528ee37f6 +#: 1883c7235e954c47853a5556abdfdfd9 1afae3681abd4479b09753ff86555fe9 +#: 262b2bee02ad461fade53789de66316d 28ad9439cccc43e0849a9b601260dba9 +#: 2b6da634c5894249a6c62f65bf2d942a 2f9ff98fbca448989b8bbe538c03276e +#: 31af1b01f9f84ce7809b3e03cda35b4f 45cf83b4ad3b4949ae98b2589b5853db +#: 4e3e1215560b4191981b3e91736743f9 4f221591c3704a9194271a786eceb634 +#: 56f1f5d0869f4e56b2e09d603889b8a5 5d3b8b846aaf4e25945e631e15539cab +#: 61fda409985b49f3861ef6c20076955e 66fb2b7246c74161a321735562281b9f +#: 67327137618f451c86898f9b3d9f5c5d 762712ff6e6d42d09d1befe35846d2ad +#: 857e3db2cd42451cb445b92d943c21ff 858887558f1248a68d706d588ae80786 +#: 892eed36794f4463ad4c4ccf482267bc 8dd7cbb03aaf4f73b337218ecda15eef +#: 91e1955816cb415296c704c4555a2c31 98ff9eac79cf4b2688967a08e338a409 +#: 9ff49e6fe10e496aad2e9f951e21a508 a050b798d3544202a7e48223fb7a4d13 +#: a0a2df60bc3a4c07b7ccfbeeb75cf31a afb90e55022441a2b9f34150fde93928 +#: b97ee3b2f1e04800a3e2d27efce86df0 be58b3a2161743b68d2e749ef727b67f +#: bf6a97c619c74aa89e82bac2eeae0429 c609886c63de4f8e8e428237073caec6 +#: cadb97971b1c47c88ee4fc1319ff6444 d0c35d48594c46f48839725d4f7eb688 +#: d17ded63f2464b91983626ef0549885e d42708c3d0034e08835a20d77bcfbc56 +#: e288d25695ec441cb7194eb38f71613b e405df27bc3a4601bd14c837b40c68cf +#: f319bb010dad414dba04ba0280a26f90 f927f6ad2f1c4757b1101dea3e1c93db +#: f98bf56729ff4c8dbe144e8f69cfcdf6 fe4913267a064b78bf0422e3323fe479 msgid "|history_end|" msgstr "" -#: ../../page.rst:172 fd1beb6cb2514d7d9156261385a68575 +#: ../../page.rst:173 4fef7e9387ea46dcb9cda8056c3031c2 msgid "" "PDF only: Add a comment icon (\"sticky note\") with accompanying text. " "Only the icon is visible, the accompanying text is hidden and can be " @@ -1158,19 +1167,19 @@ msgstr "" "PDFのみ: " "コメントアイコン(「付箋」)を追加し、それに関連するテキストを含めます。アイコンのみが表示され、関連するテキストは非表示で、多くのPDFビューアではアイコンの上にマウスを重ねることで可視化できます。" -#: ../../page.rst:174 8aed4900560a449099c23cef94312bef +#: ../../page.rst:175 ca5332effd844be1a7fe628bc8b69b4d msgid "" "the top left point of a 20 x 20 rectangle containing the MuPDF-provided " "\"note\" icon." msgstr "提供されたMuPDFアイコンが含まれる20 x 20の矩形の左上の点。" -#: ../../page.rst:176 ca4427ceeb4348bdb38fe5de09523f54 +#: ../../page.rst:177 cc18e4d047de40fe916fa310c149e301 msgid "" "the commentary text. This will be shown on double clicking or hovering " "over the icon. May contain any Latin characters." msgstr "コメントテキスト。これはダブルクリックまたはアイコンの上にカーソルを合わせることで表示されます。ラテン文字を含むことができます。" -#: ../../page.rst:177 1f323f27a31844a38216981d133977b6 +#: ../../page.rst:178 4b1c21cc0c08410fb69b90f47109d4ca msgid "" "choose one of \"Note\" (default), \"Comment\", \"Help\", \"Insert\", " "\"Key\", \"NewParagraph\", \"Paragraph\" as the visual symbol for the " @@ -1180,139 +1189,200 @@ msgstr "" "\"Note\"(デフォルト)、\"Comment\"、\"Help\"、\"Insert\"、\"Key\"、\"NewParagraph\"、\"Paragraph\"" " のいずれかを、具体的なテキストの視覚的なシンボルとして選択してください。 [#f4]_" -#: ../../page.rst:180 d99984b5b86444b79148db825dd780a4 +#: ../../page.rst:181 3787b3da04af4edf834e43f2bc6d3ab1 msgid "" "the created annotation. Stroke color yellow = (1, 1, 0), no fill color " "support." msgstr "作成された注釈。ストロークカラーは黄色(1, 1, 0)、塗りつぶしカラーのサポートはありません。" -#: ../../page.rst:195 895451e85e32476593042c2ec3fef7e4 -msgid "PDF only: Add text in a given rectangle." -msgstr "PDFのみ: 指定された矩形にテキストを追加します。" +#: ../../page.rst:201 a97b1926c3854f8fa349bc8b538f8284 +msgid "" +"PDF only: Add text in a given rectangle. Optionally, the appearance of a " +"\"callout\" shape can be requested by specifying two or three point-like " +"objects -- see below." +msgstr "" -#: ../../page.rst:197 7bb9dc5af90e4c8d8ea163232ec672b4 +#: ../../page.rst:203 8462920b3f21473f87647a9e520dd8fb +#, fuzzy msgid "" "the rectangle into which the text should be inserted. Text is " -"automatically wrapped to a new line at box width. Lines not fitting into " -"the box will be invisible." +"automatically wrapped to a new line at box width. Text portions not " +"fitting into the rectangle will be invisible without warning." msgstr "テキストを挿入する矩形。テキストはボックスの幅で自動的に改行されます。ボックスに収まらない行は見えません。" -#: ../../page.rst:199 25fc1bef58db4541b70aaabddaef2b43 +#: ../../page.rst:205 dd3a17e723d04112897e999518779b02 msgid "" "the text. May contain any mixture of Latin, Greek, Cyrillic, Chinese, " -"Japanese and Korean characters. The respective required font is " -"automatically determined. (New in v1.17.0)" +"Japanese and Korean characters. If `richtext=True` (see below), the " +"string is interpreted as HTML syntax. This adds a plethora of ways for " +"attractive effects." msgstr "" -"テキスト。*(v1.17.0で新規追加)* " -"ラテン文字、ギリシャ文字、キリル文字、中国語、日本語、韓国語の文字を任意の組み合わせで含めることができます。必要なフォントは自動的に決定されます。" -#: ../../page.rst:200 7c19882054ca464c87f4e566027b401c -msgid "the :data:`fontsize`. Default is 12." +#: ../../page.rst:207 d53ac74553044cd28a545203048a9b6a +#, fuzzy +msgid "the :data:`fontsize`. Default is 11. Ignored if `richtext=True`." msgstr ":data:`fontsize`。デフォルトは12です。" -#: ../../page.rst:201 198725f05a1e48eeb5f78d8bc1c9c32b -msgid "" -"the font name. Default is \"Helv\". Accepted alternatives are \"Cour\", " -"\"TiRo\", \"ZaDb\" and \"Symb\". The name may be abbreviated to the first" -" two characters, like \"Co\" for \"Cour\". Lower case is also accepted. " -"Bold or italic variants of the fonts are **not accepted** (changed in " -"v1.16.0). A user-contributed script provides a circumvention for this " -"restriction -- see section *Using Buttons and JavaScript* in chapter " -":ref:`FAQ`. The actual font to use is now determined on a by-character " -"level, and all required fonts (or sub-fonts) are automatically included. " -"Therefore, you should rarely ever need to care about this parameter and " -"let it default (except you insist on a serifed font for your non-CJK text" -" parts). (New in v1.17.0)" -msgstr "" -"フォント名。デフォルトは \"Helv\" です。受け入れられる代替は \"Cour\"、\"TiRo\"、\"ZaDb\"、\"Symb\" " -"です。名前は \"Cour\" " -"のように最初の2文字に省略されることがあります。小文字も受け入れられます。太字やイタリックのバリアントのフォントは受け入れられません(v1.16.0で変更)。ユーザー投稿のスクリプトがこの制限を回避する方法を提供しています" -" - " -"FAQの章の「ボタンとJavaScriptの使用」セクションを参照してください。使用する実際のフォントは、今では文字ごとに決定され、必要なすべてのフォント(またはサブフォント)が自動的に含まれます。したがって、このパラメーターについて心配する必要があることはほとんどありませんし、デフォルトのままにしておくことが推奨されます(非CJKテキスト部分にセリフのあるフォントが必要な場合を除く)。(v1.17.0で新規)" - -#: ../../page.rst:210 0060f3c870b1464baf4d26e1c18a3af2 -msgid "the text color. Default is black. (New in v1.16.0)" +#: ../../page.rst:209 3b444938ed8b469492070e7462c4da5e +msgid "" +"The font name. Default is \"Helv\". Ignored if `richtext=True`, otherwise" +" the following **restritions apply:** * Accepted alternatives are " +"\"Helv\" (Helvetica), \"Cour\" (Courier), \"TiRo\" (Timnes-Roman), " +"\"ZaDb\" (ZapfDingBats) and \"Symb\" (Symbol). The name may be " +"abbreviated to the first two characters, like \"Co\" for \"Cour\", lower " +"case accepted. * Bold or italic variants of the fonts are **not " +"supported.**" +msgstr "" + +#: ../../page.rst:209 61e952813f634b83878e975e4e90bc34 +msgid "" +"The font name. Default is \"Helv\". Ignored if `richtext=True`, otherwise" +" the following **restritions apply:**" +msgstr "" + +#: ../../page.rst:211 492319dbc3c0406f962cbf27312431d1 +msgid "" +"Accepted alternatives are \"Helv\" (Helvetica), \"Cour\" (Courier), " +"\"TiRo\" (Timnes-Roman), \"ZaDb\" (ZapfDingBats) and \"Symb\" (Symbol). " +"The name may be abbreviated to the first two characters, like \"Co\" for " +"\"Cour\", lower case accepted." +msgstr "" + +#: ../../page.rst:213 46678b937e4f448599916282271aa9f3 +msgid "Bold or italic variants of the fonts are **not supported.**" +msgstr "" + +#: ../../page.rst:215 518d715f42794461a396e28d41f3bed4 +#, fuzzy +msgid "the text color. Default is black. Ignored if `richtext=True`." msgstr "テキストの色。デフォルトは黒です。(v1.16.0で新規追加)" -#: ../../page.rst:212 cd55e792c526428c92b365ca1ac5b3ca -msgid "the fill color. Default is white. (New in v1.16.0)" -msgstr "塗りつぶしの色です。デフォルトは白です。(v1.16.0 で新規追加)" +#: ../../page.rst:217 b47440f9874245db918409d99decab29 +msgid "" +"the fill color. This is used for ``rect`` and the end point of the " +"callout lines when applicable. Default is ``None``." +msgstr "" + +#: ../../page.rst:219 64b76c90df86415e96e7d717150dec41 +msgid "" +"This parameter only has an effect if `richtext=True`. Otherwise, " +"``text_color`` is used." +msgstr "" -#: ../../page.rst:213 b445222682c44d1886a3b7fbd4d23978 -msgid "the text color. Default is black." -msgstr "テキストの色。デフォルトは黒です。" +#: ../../page.rst:221 e23ad5b7916a4712b840b98830b8f221 +msgid "" +"the width of border and ``callout`` lines. Default is 0 (no border), in " +"which case callout lines may still appear with some hairline width, " +"depending on the PDF viewer used." +msgstr "" -#: ../../page.rst:214 96d2f773db04467895b840a26e7e17c6 -msgid "the border color. Default is `None`. (New in v1.19.6)" -msgstr "*(v1.19.6で新規追加)* 境界色。デフォルトは `None` です。" +#: ../../page.rst:223 6a8b44d5be6d4cc2ba2cf0e2452e5f57 +msgid "" +"a list of floats specifying how border and callout lines should be " +"dashed. Default is ``None``." +msgstr "" + +#: ../../page.rst:225 bc9f1e66e37a42b18e08131ae60f9ab1 +msgid "" +"a list / tuple of two or three :data:`point_like` objects, which will be " +"interpreted as end point [, knee point] and start point (in this " +"sequence) of up to two line segments, converting this annotation into a " +"call-out shape." +msgstr "" + +#: ../../page.rst:227 7dcaaae52c76488881e81776e8156ff9 +msgid "" +"the line end symbol of the call-out line. It is drawn at the first point " +"specified in the `callout` list. Default is an open arrow. For possible " +"values see :ref:`AnnotationLineEnds`." +msgstr "" + +#: ../../page.rst:229 846b5e256f5b4d1086abdec5ef1d7cb9 +msgid "" +"a float `0 <= opacity < 1` turning the annotation transparent. Default is" +" no transparency." +msgstr "" -#: ../../page.rst:215 b0e2ca216faa42e194a086bd0a1894d1 +#: ../../page.rst:231 3f49fad545744e46be0a305e3fdd4554 msgid "" "text alignment, one of TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, " -"TEXT_ALIGN_RIGHT - justify is **not supported**. (New in v1.17.0)" +"TEXT_ALIGN_RIGHT - justify is **not supported**. Ignored if " +"`richtext=True`." msgstr "" -"テキストの配置は、TEXT_ALIGN_LEFT、TEXT_ALIGN_CENTER、TEXT_ALIGN_RIGHTのいずれかを指定します。ジャスティファイは" -" **サポートされていません** 。(v1.17.0で新規追加)" -#: ../../page.rst:217 729cc38a70cc460cb42fac717742c230 +#: ../../page.rst:233 9ee589cd4b674893a64b76ac9b2f8383 +#, fuzzy msgid "" -"the text orientation. Accepted values are 0, 90, 270, invalid entries are" -" set to zero." +"the text orientation. Accepted values are integer multiples of 90°. " +"Invalid entries receive a rotation of 0." msgstr "テキストの向き。受け入れられる値は0、90、270で、無効なエントリはゼロに設定されます。" -#: ../../page.rst:220 c292bcb68a00466b968719fd5264d0b4 +#: ../../page.rst:235 ae5ec59a9ec944a59d5a682f742b6b1c msgid "" -"the created annotation. Color properties **can only be changed** using " -"special parameters of :meth:`Annot.update`. There, you can also set a " -"border color different from the text color." +"treat ``text`` as HTML syntax. This allows to achieve **bold**, *italic*," +" arbitrary text colors, font sizes, text alignment including justify and " +"more - as far as HTML and styling instructions support this. This is " +"similar to what happens in :meth:`Page.insert_htmlbox`. The base library " +"will for example pull in required fonts if it encounters characters not " +"contained in the standard ones. Some parameters are ignored if this " +"option is set, as mentioned above. Default is ``False``." msgstr "" -"作成された注釈。色のプロパティは、:meth:`Annot.update` の特別なパラメータを使用して " -"**のみ変更できます**。そこでは、テキストの色とは異なる境界色を設定することもできます。" -#: ../../page.rst:224 a6fb25af1809493aba4319dba620c07e +#: ../../page.rst:237 997862c6eac14a6f8c0f69c87ab03307 +msgid "" +"supply optional HTML styling information in CSS syntax. Ignored if " +"`richtext=False`." +msgstr "" + +#: ../../page.rst:240 f9c9742964414f188d59a37e31015ce3 +#, fuzzy +msgid "the created annotation." +msgstr "ウィジェットアノテーション。" + +#: ../../page.rst:244 0c67458bf6a74d07b2ac2a250dbcf720 msgid "Changed in v1.19.6: add border color parameter" msgstr "v1.19.6で変更:境界色パラメータを追加" -#: ../../page.rst:230 a84f4bbf23f84e4c97cd9df115409761 +#: ../../page.rst:250 da7a85dd8f5847ff84884a9fa06b3436 msgid "" "PDF only: Add a file attachment annotation with a \"PushPin\" icon at the" " specified location." msgstr "PDFのみ: 指定された場所に「PushPin」アイコンを持つファイル添付注釈を追加します。" -#: ../../page.rst:232 5b0f77fb033b4cd7b4450878cabb2a77 +#: ../../page.rst:252 e95d2ab63da04ec29a414d3f9313edf2 msgid "" "the top-left point of a 18x18 rectangle containing the MuPDF-provided " "\"PushPin\" icon." msgstr "ムPDFで提供される「PushPin」アイコンを含む18x18の四角形の左上のポイント。" -#: ../../page.rst:234 7ab2600272124f3d82d79a8c263b1d44 +#: ../../page.rst:254 f7c580780fe24629a7d404c86b84b2ce #, fuzzy msgid "" "the data to be stored (actual file content, any data, etc.). Changed in " "v1.14.13: *io.BytesIO* is now also supported." msgstr "格納するデータ(実際のファイルコンテンツ、任意のデータなど)。" -#: ../../page.rst:234 4f2fb8840d89484d88a8928339e5ce16 +#: ../../page.rst:254 22ab37e993ec4cd587c274a0ccd50cca msgid "the data to be stored (actual file content, any data, etc.)." msgstr "格納するデータ(実際のファイルコンテンツ、任意のデータなど)。" -#: ../../page.rst:236 e5a0383baafc48be95389c2f30f54183 +#: ../../page.rst:256 de5774f31906451bb48a1c55e783e54d msgid "Changed in v1.14.13: *io.BytesIO* is now also supported." msgstr "v1.14.13で変更: *io.BytesIO* もサポートされるようになりました。" -#: ../../page.rst:238 ca3da7a71e5243c28d53f857f03582df +#: ../../page.rst:258 b2ae841e83504f929e869fd297843c4e msgid "the filename to associate with the data." msgstr "データに関連付けるファイル名。" -#: ../../page.rst:239 d3d8b8aa8acf430887d3f4e8c1a4a67b +#: ../../page.rst:259 256a665836b94adc868d6fef208f9f80 msgid "the optional PDF unicode version of filename. Defaults to filename." msgstr "ファイルのPDF Unicodeバージョンのオプション。デフォルトはファイル名です。" -#: ../../page.rst:240 87190730a3d048648e46078d3a4e61a0 +#: ../../page.rst:260 f7107a8bf89247a3bef87be543d63a18 msgid "an optional description of the file. Defaults to filename." msgstr "ファイルのオプションの説明。デフォルトはファイル名です。" -#: ../../page.rst:241 262a783397d846c2921457a4d71ceee9 +#: ../../page.rst:261 5267c9bbba4a457a91f36a2eaaf79813 msgid "" "choose one of \"PushPin\" (default), \"Graph\", \"Paperclip\", \"Tag\" as" " the visual symbol for the attached data [#f4]_. (New in v1.16.0)" @@ -1320,17 +1390,17 @@ msgstr "" "v1.16.0で新しく追加された)添付データの視覚的なシンボルとして、次のいずれかを選択します。\"PushPin\"(デフォルト)、\"Graph\"、\"Paperclip\"、\"Tag\"" " [#f4]_。" -#: ../../page.rst:244 aee98dcd23c54060bad802a915febeab +#: ../../page.rst:264 1f60ac3e970f4f6ba6f5de9b8b306024 msgid "" "the created annotation. Stroke color yellow = (1, 1, 0), no fill color " "support." msgstr "作成された注釈。線の色は黄色(1, 1, 0)、塗りつぶしのサポートはありません。" -#: ../../page.rst:248 b4799e74ecbb4dd0a8a97171cb497e13 +#: ../../page.rst:268 ff1b9254d9bd493da66b60588a3edcc0 msgid "PDF only: Add a \"freehand\" scribble annotation." msgstr "PDFのみ: \"freehand\"の落書き注釈を追加します。" -#: ../../page.rst:250 8ca2e8690e934db9bae008d5cfc5cc24 +#: ../../page.rst:270 b3295a497afd46d78d23182ff0caea96 msgid "" "a list of one or more lists, each containing :data:`point_like` items. " "Each item in these sublists is interpreted as a :ref:`Point` through " @@ -1341,25 +1411,25 @@ msgstr "" "アイテムを含むリストの1つです。これらのサブリスト内の各アイテムは、接続された線が描画される :ref:`Point` " "として解釈されます。したがって、個々のサブリストは別々の描画ラインを表します。" -#: ../../page.rst:253 4251dac94ac14b679a780f602a9000d9 +#: ../../page.rst:273 775d0415b79040b1bb8276f940081f99 msgid "" "the created annotation in default appearance black =(0, 0, 0),line width " "1. No fill color support." msgstr "作成された注釈はデフォルトの外観で黒色(0, 0, 0)で、線の幅は1です。塗りつぶしのサポートはありません。" -#: ../../page.rst:257 caad208546034050959cfb3e6a8cb880 +#: ../../page.rst:277 71a135f7d9c04f219408448f604f56f3 msgid "PDF only: Add a line annotation." msgstr "PDFのみ: 直線注釈を追加します。" -#: ../../page.rst:259 a38a33e2a7414b79956aa11000df8eec +#: ../../page.rst:279 a75af95c91b54adba9332de210fbb075 msgid "the starting point of the line." msgstr "直線の開始点。" -#: ../../page.rst:261 6a6ba6d942ff40cf9298ba7b6625ac1c +#: ../../page.rst:281 e9ecf5d843f84e45b6bc2d20b3d6fe38 msgid "the end point of the line." msgstr "直線の終点。" -#: ../../page.rst:264 983ccfbbf4834606b5c9f41adf0dfd55 +#: ../../page.rst:284 b7e961c171f44c1aa71ebddd11b9d2e6 msgid "" "the created annotation. It is drawn with line (stroke) color red = (1, 0," " 0) and line width 1. No fill color support. The **annot rectangle** is " @@ -1369,38 +1439,40 @@ msgstr "" "作成された注釈。線(ストローク)の色は赤色(1, 0, 0)で、線の幅は1です。塗りつぶしのサポートはありません。**アノテーションの四角形** " "は、各点を囲む半径 3 * 線幅の円で作成され、各点の周りにシンボルの線の終わりのためのスペースを確保します。" -#: ../../page.rst:270 70302fc565aa46b4a642c5722aa4158c +#: ../../page.rst:290 a68fe21476654536af0ce17bc4c57311 msgid "PDF only: Add a rectangle, resp. circle annotation." msgstr "PDFのみ: 長方形、または円の注釈を追加します。" -#: ../../page.rst:272 5e4d0c8b5eb04e1d8058649611837a8c +#: ../../page.rst:292 990edeed703445dc8f3da8eac4a63673 msgid "" "the rectangle in which the circle or rectangle is drawn, must be finite " "and not empty. If the rectangle is not equal-sided, an ellipse is drawn." msgstr "円または長方形が描かれる矩形。有限で空でない必要があります。矩形が正方形でない場合、楕円が描画されます。" -#: ../../page.rst:275 2908898cf78142d2a81c461c708c5510 +#: ../../page.rst:295 6daf319f42284361a82c184ee2c1af5d msgid "" "the created annotation. It is drawn with line (stroke) color red = (1, 0," " 0), line width 1, fill color is supported." msgstr "作成された注釈。線(ストローク)の色は赤色(1、0、0)、線の幅は1で、塗りつぶしのサポートがあります" -#: ../../page.rst:280 15f84da9efe348e3b0c994568caa9eed +#: ../../page.rst:300 88b890efe2934fa1bae62007057dc996 msgid "Redactions" msgstr "" -#: ../../page.rst:284 a3a44194d26049f2a30a54e5c26f748f +#: ../../page.rst:304 a73936f86ab1443eac5c895b6bb46c2f +#, fuzzy msgid "" "**PDF only**: Add a redaction annotation. A redaction annotation " -"identifies content to be removed from the document. Adding such an " -"annotation is the first of two steps. It makes visible what will be " -"removed in the subsequent step, :meth:`Page.apply_redactions`." +"identifies an area whose content should be removed from the document. " +"Adding such an annotation is the first of two steps. It makes visible " +"what will be removed in the subsequent step, " +":meth:`Page.apply_redactions`." msgstr "" "**PDFのみ** " ":赤塗り注釈を追加します。赤塗り注釈は、文書から削除されるコンテンツを識別します。このような注釈を追加することは、2つの手順の最初です。次の手順、:meth:`Page.apply_redactions`" " で削除される内容を可視化します。" -#: ../../page.rst:286 9668dcf2f1bf4617a38104391a63c4e8 +#: ../../page.rst:306 dad50a6ce8594b7abc9c14146ad7ae5c msgid "" "specifies the (rectangular) area to be removed which is always equal to " "the annotation rectangle. This may be a :data:`rect_like` or " @@ -1408,59 +1480,21 @@ msgid "" "rectangle is taken." msgstr "常に注釈の矩形と等しい削除する領域を指定します。これはrect_likeまたはquad_likeオブジェクトである必要があります。四角形が指定された場合、包括的な矩形が取られます。" -#: ../../page.rst:288 3155cf293f5342c4a592df1361dccb90 +#: ../../page.rst:308 2caebffbdfea4c6aa7a36594957ea469 msgid "" "text to be placed in the rectangle after applying the redaction (and thus" " removing old content). (New in v1.16.12)" msgstr "*(v1.16.12で新機能)* 赤字を適用した後に矩形に配置するテキスト(従って古いコンテンツを削除します)。" -#: ../../page.rst:290 70b7459d01224056abc42136d64652d0 +#: ../../page.rst:310 b05fc10db5dd4a9896d70c39c34b6d6d msgid "" -"the font to use when *text* is given, otherwise ignored. The same rules " -"apply as for :meth:`Page.insert_textbox` -- which is the method " -":meth:`Page.apply_redactions` internally invokes. The replacement text " -"will be **vertically centered**, if this is one of the CJK or " -":ref:`Base-14-Fonts`. (New in v1.16.12) .. note:: * For an " -"**existing** font of the page, use its reference name as *fontname* (this" -" is *item[4]* of its entry in :meth:`Page.get_fonts`). * For a **new, " -"non-builtin** font, proceed as follows:: page.insert_text(point, " -"# anywhere, but outside all redaction rectangles \"something\"," -" # some non-empty string fontname=\"newname\", # new, unused " -"reference name fontfile=\"...\", # desired font file" -" render_mode=3, # makes the text invisible ) " -"page.add_redact_annot(..., fontname=\"newname\")" +"the font to use when ``text`` is given, otherwise ignored. Only CJK and " +"the :ref:`Base-14-Fonts` are supported. Apart from this, the same rules " +"apply as for :meth:`Page.insert_textbox` -- which is what the method " +":meth:`Page.apply_redactions` internally invokes." msgstr "" -"(新機能 v1.16.12)テキストが指定された場合に使用するフォントで、それ以外の場合は無視されます。 " -":meth:`Page.insert_textbox` に適用されるルールと同じです。:meth:`Page.apply_redactions` " -"が内部的に呼び出すメソッドです。置換テキストは、CJKフォントまたは P :ref:`Base-14-Fonts` " -"の場合、垂直方向に中央揃えになります。" -#: ../../page.rst:290 ff116da6ed074aa5a70a23a5a0242d39 -msgid "" -"the font to use when *text* is given, otherwise ignored. The same rules " -"apply as for :meth:`Page.insert_textbox` -- which is the method " -":meth:`Page.apply_redactions` internally invokes. The replacement text " -"will be **vertically centered**, if this is one of the CJK or " -":ref:`Base-14-Fonts`. (New in v1.16.12)" -msgstr "" -"(新機能 v1.16.12)テキストが指定された場合に使用するフォントで、それ以外の場合は無視されます。 " -":meth:`Page.insert_textbox` に適用されるルールと同じです。:meth:`Page.apply_redactions` " -"が内部的に呼び出すメソッドです。置換テキストは、CJKフォントまたは P :ref:`Base-14-Fonts` " -"の場合、垂直方向に中央揃えになります。" - -#: ../../page.rst:294 20e8b129dd1844c69fa29f6116ebe952 -msgid "" -"For an **existing** font of the page, use its reference name as " -"*fontname* (this is *item[4]* of its entry in :meth:`Page.get_fonts`)." -msgstr "" -"ページの **既存** のフォントの場合、参照名を *fontname* として使用してください(これは " -":meth:`Page.get_fonts` のエントリの *item[4]* です)。" - -#: ../../page.rst:295 7cc74551fdf64d86bc7f2c06406f396d -msgid "For a **new, non-builtin** font, proceed as follows::" -msgstr "**新しいビルトインでない** フォントの場合、次の手順を実行します::" - -#: ../../page.rst:305 5c2de907ff8d4db1925fbf9028506f2f +#: ../../page.rst:312 fbdaaa453db14e15aa8759167d47cce4 msgid "" "the :data:`fontsize` to use for the replacing text. If the text is too " "large to fit, several insertion attempts will be made, gradually reducing" @@ -1471,39 +1505,39 @@ msgstr "" "を4未満にならないように徐々に縮小して、複数の挿入試行が行われます。その後もテキストが収まらない場合、テキストの挿入は行われません。 " "(v1.16.12 で新規追加)" -#: ../../page.rst:307 adeb450fa60440d89e23881ba851ef96 +#: ../../page.rst:314 9665de46198a48619a881db1e7d9b140 +#, fuzzy msgid "" "the horizontal alignment for the replacing text. See " ":meth:`insert_textbox` for available values. The vertical alignment is " -"(approximately) centered if a PDF built-in font is used (CJK or " -":ref:`Base-14-Fonts`). (New in v1.16.12)" +"(approximately) centered." msgstr "" "置換テキストの水平配置です。使用可能な値については、:meth:`insert_textbox` " "を参照してください。PDFの組み込みフォント(CJKまたは :ref:`Base-14-Fonts` " ")を使用する場合、垂直配置は(おおよそ)中央になります。 (v1.16.12で新規)" -#: ../../page.rst:309 c240f4812c0344359827ccb64e695f2f +#: ../../page.rst:316 d6433c292a824ee98f28ed1827a0aa11 msgid "" "the fill color of the rectangle **after applying** the redaction. The " -"default is *white = (1, 1, 1)*, which is also taken if *None* is " -"specified. To suppress a fill color altogether, specify *False*. In this " -"cases the rectangle remains transparent. (New in v1.16.12)" +"default is *white = (1, 1, 1)*, which is also taken if ``None`` is " +"specified. To suppress a fill color altogether, specify ``False``. In " +"this cases the rectangle remains transparent. (New in v1.16.12)" msgstr "" -"**適用後** の赤塗りの四角形の塗りつぶし色です。デフォルトは *white = (1, 1, 1)* で、*None* " -"が指定された場合も同様です。塗りつぶし色を抑制するには、*False* " +"**適用後** の赤塗りの四角形の塗りつぶし色です。デフォルトは *white = (1, 1, 1)* で、``None`` " +"が指定された場合も同様です。塗りつぶし色を抑制するには、``False`` " "を指定します。この場合、四角形は透明のままです。(v1.16.12で新規追加)" -#: ../../page.rst:311 43fa7655116340e7b544bd23aaae5580 +#: ../../page.rst:318 15a5071add544cb3a8ec26aa4b439b39 msgid "" "the color of the replacing text. Default is *black = (0, 0, 0)*. (New in " "v1.16.12)" msgstr "*(新機能 v1.16.12)* 置換テキストの色です。デフォルトは *black = (0, 0, 0)* です。" -#: ../../page.rst:313 da33dfe7d809447da7dc7a56de229d9d +#: ../../page.rst:320 3fcbd0df44e54455a054d5740671837f msgid "add two diagonal lines to the annotation rectangle. (New in v1.17.2)" msgstr "*(新機能 v1.17.2)* アノテーションの矩形に2つの対角線を追加します。" -#: ../../page.rst:316 0c9f0af7b97842ccbf4f6a0c725b4aa6 +#: ../../page.rst:323 6115fef9c8ba4298a8db40a598de818d msgid "" "the created annotation. Its standard appearance looks like a red " "rectangle (no fill color), optionally showing two diagonal lines. Colors," @@ -1514,23 +1548,23 @@ msgstr "" "作成された注釈です。その標準的な外観は、赤い四角形(塗りつぶし色なし)であり、必要に応じて二つの対角線を表示します。色、線の太さ、破線、不透明度、およびブレンドモードは、他の注釈と同様に、:meth:`Annot.update`" " を介して設定および適用できます。(v1.17.2で変更)" -#: ../../page.rst:322 ../../page.rst:362 8113be07b58e4219a220fc456f882be1 -#: c4720412434b4cbc9812e2aeba969ac8 +#: ../../page.rst:329 ../../page.rst:369 3b79729c70104cdba1a9b9d61d69c834 +#: 3d68484d61614169ab07b2d7ad53b0d1 msgid "New in v1.16.11" msgstr "新機能 v1.16.11" -#: ../../page.rst:329 881ae37b9b844ba8b59fe10ca08f16c0 +#: ../../page.rst:336 f3e1f09fccde48fc833028e426216115 #, fuzzy msgid "" "**PDF only**: Remove all **content** contained in any redaction rectangle" " on the page." msgstr "PDFのみ:赤塗りの矩形に含まれるすべての **テキストコンテンツ** を削除します。" -#: ../../page.rst:331 94a9403c66dd452297a237cfcdc3fb40 +#: ../../page.rst:338 ae6d96b72c8946d088788d3cb8fa772b msgid "**This method applies and then deletes all redactions from the page.**" msgstr "**このメソッドは、ページからすべての赤塗りを適用して削除します。**" -#: ../../page.rst:333 3b22fd8e3f204bc5b87bd62b07c35ad9 +#: ../../page.rst:340 a0a5d93de659411790677b9f30bb615a msgid "" "How to redact overlapping images. The default (2) blanks out overlapping " "pixels. `PDF_REDACT_IMAGE_NONE | 0` ignores, and `PDF_REDACT_IMAGE_REMOVE" @@ -1542,22 +1576,22 @@ msgstr "" "は無視し、 `PDF_REDACT_IMAGE_REMOVE | 1` は、いずれかのレダクション注釈と重なる画像を完全に削除します。オプション" " `PDF_REDACT_IMAGE_REMOVE_UNLESS_INVISIBLE | 3` は、実際に見える画像のみを削除します。" -#: ../../page.rst:335 64950bd23a5f4ed8b9dc0b17d571a98c -#, python-format +#: ../../page.rst:342 71ed1f9cb1ef4314968b486d3f91c6d6 +#, fuzzy, python-format msgid "" "How to redact overlapping vector graphics (also called \"line-art\" or " "\"drawings\"). The default (2) removes any overlapping vector graphics. " "`PDF_REDACT_LINE_ART_NONE | 0` ignores, and " -"`PDF_REDACT_LINE_ART_IF_COVERED | 1` removes graphics fully contained in " -"a redaction annotation. When removing line-art, please be aware that " -"**stroked** vector graphics (i.e. type \"s\" or \"sf\") have a **larger " -"wrapping rectangle** than one might expect: first of all, at least 50% of" -" the path's line width have to be added in each direction to truly " -"include all of the drawing. If a so-called \"miter limit\" is provided " -"(see page 121 of the PDF specification), the enlarging value is `miter * " -"width / 2`. So, when letting everything default (width = 1, miter = 10), " -"the redaction rectangle should be at least 5 points larger in every " -"direction." +"`PDF_REDACT_LINE_ART_REMOVE_IF_COVERED | 1` removes graphics fully " +"contained in a redaction annotation. When removing line-art, please be " +"aware that **stroked** vector graphics (i.e. type \"s\" or \"sf\") have a" +" **larger wrapping rectangle** than one might expect: first of all, at " +"least 50% of the path's line width have to be added in each direction to " +"truly include all of the drawing. If a so-called \"miter limit\" is " +"provided (see page 121 of the PDF specification), the enlarging value is " +"`miter * width / 2`. So, when letting everything default (width = 1, " +"miter = 10), the redaction rectangle should be at least 5 points larger " +"in every direction." msgstr "" "重なるベクトルグラフィックス(または「ラインアート」や「図面」とも呼ばれる)を塗りつぶす方法。デフォルト値(2)では、重なるベクトルグラフィックスがすべて削除されます。`PDF_REDACT_LINE_ART_NONE" " | 0` は無視し、`PDF_REDACT_LINE_ART_IF_COVERED | 1` " @@ -1567,7 +1601,7 @@ msgstr "" " `miter * width / " "2`.です。すべてをデフォルト値(幅=1、マイター=10)にする場合、赤塗りの長方形は各方向に少なくとも5ポイント大きくする必要があります。" -#: ../../page.rst:337 efd3e8e07f6649ce8f0a533a23ccbbc9 +#: ../../page.rst:344 947aa9c7b11f4b3ea4bda239847ac1bf msgid "" "Whether to redact overlapping text. The default `PDF_REDACT_TEXT_REMOVE |" " 0` removes all characters whose boundary box overlaps any redaction " @@ -1582,13 +1616,13 @@ msgstr "" "は、境界ボックスが赤塗り四角形と重なるすべての文字を削除します。これは、元の法的/データ保護の意図に適合しています。ただし、他のユースケースでは、ベクトルグラフィックスや画像を赤塗りする一方で**テキストを保持**する必要がある場合があります。これは、`text=True|PDF_REDACT_TEXT_NONE" " | 1` を設定することで実現できます。これは、赤塗り注釈のデータ保護の意図には適合していませんので、自己責任で行ってください。" -#: ../../page.rst:339 48c9131ec8b14c6fb9a9de169a73bdba +#: ../../page.rst:346 7ed20df074354c0c9acc708e66888c88 msgid "" "`True` if at least one redaction annotation has been processed, `False` " "otherwise." -msgstr "少なくとも1つの赤字注釈が処理された場合は *True*、それ以外の場合は *False*。" +msgstr "少なくとも1つの赤字注釈が処理された場合は ``True``、それ以外の場合は ``False``。" -#: ../../page.rst:342 4ce054c3b6b44545bb075a98e9000357 +#: ../../page.rst:349 eaa9a95d1bef4d8aa0a306ac622633eb msgid "" "Text contained in a redaction rectangle will be **physically** removed " "from the page (assuming :meth:`Document.save` with a suitable garbage " @@ -1599,14 +1633,14 @@ msgstr "" "赤塗りの四角に含まれるテキストは、**物理的に** " "ページから削除されます(適切なゴミオプションを使用したDocument.save()の場合)、テキスト抽出などの場所にはもはや表示されません。また、すべての赤塗りの注釈も削除されます。他の注釈には影響しません。" -#: ../../page.rst:344 6a071c53628f42ab9f8b816bcdcbaa5e +#: ../../page.rst:351 f17adf97d56a4a11a48c91a3b2e09513 msgid "" "All overlapping links will be removed. If the rectangle of the link was " "covering text, then only the overlapping part of the text is being " "removed. Similar applies to images covered by link rectangles." msgstr "重なっているすべてのリンクは削除されます。リンクの四角がテキストを覆っている場合、テキストの重なる部分のみが削除されます。画像もリンクの四角によってカバーされている場合、同様のことが適用されます。" -#: ../../page.rst:346 0d8cd66542154e40a5d249d705cb8c32 +#: ../../page.rst:353 b6fb1a37d1a8400bb9459ed7898b8204 msgid "" "The overlapping parts of **images** will be blanked-out for default " "option `PDF_REDACT_IMAGE_PIXELS` (changed in v1.18.0). Option 0 does not " @@ -1615,7 +1649,7 @@ msgstr "" "**画像** の重なり部分は、デフォルトのオプションである `PDF_REDACT_IMAGE_PIXELS` " "では塗りつぶされます(v1.18.0で変更されました)。オプション0は画像を一切変更せず、1は重なり合う画像をすべて削除します。" -#: ../../page.rst:348 da4a61e7aed74892a2b7ce5b4e82faf4 +#: ../../page.rst:355 4c4124a2c2e34a128cb17cb9e7cb5eef msgid "" "For option `images=PDF_REDACT_IMAGE_REMOVE` only this page's **references" " to the images** are removed - not necessarily the images themselves. " @@ -1625,7 +1659,7 @@ msgstr "" "`images=PDF_REDACT_IMAGE_REMOVE` のオプションの場合、このページの **画像への参照** " "のみが削除されます。適切なゴミ収集オプションがあると、画像はファイルから完全に削除されます。" -#: ../../page.rst:350 52e985ef78d04700a6f4291458f17ddc +#: ../../page.rst:357 8b40a7c0e6d34574b9fb5ca1485ce824 msgid "" "For option `images=PDF_REDACT_IMAGE_PIXELS` a new image of format PNG is " "created, which the page will use in place of the original one. The " @@ -1639,20 +1673,21 @@ msgstr "" "のオプションでは、新しいPNG形式の画像が作成され、ページは元の画像の代わりにそれを使用します。このプロセスの一環として、元の画像は削除されず、他のページでは引き続き元の画像が表示される可能性があります。さらに、新しい変更されたPNG画像は現在" " **圧縮されていない状態で保存されています** 。保存時に適切なゴミ収集メソッドと圧縮オプションを選択する際に、これらの側面を考慮してください。" -#: ../../page.rst:352 d8edbe4c262b4b758081cd422963747c +#: ../../page.rst:359 19b6f491d4004af3837ff48b6984c122 msgid "" "**Text removal** is done by character: A character is removed if its bbox" " has a **non-empty overlap** with a redaction rectangle (changed in MuPDF" " v1.17). Depending on the font properties and / or the chosen line " "height, deletion may occur for undesired text parts. Using " -":meth:`Tools.set_small_glyph_heights` with a *True* argument before text " -"search may help to prevent this." +":meth:`Tools.set_small_glyph_heights` with a ``True`` argument before " +"text search may help to prevent this." msgstr "" "**テキストの削除** は文字ごとに行われます:文字のbboxが赤塗りの四角と非空の重なりを持つ場合、文字が削除されます(MuPDF " "v1.17で変更)。フォントの特性や選択した行の高さに応じて、望ましくないテキスト部分が削除される場合があります。テキスト検索前に " -":meth:`Tools.set_small_glyph_heights` を *True* 引数で使用して、これを防ぐのに役立つ場合があります。" +":meth:`Tools.set_small_glyph_heights` を ``True`` " +"引数で使用して、これを防ぐのに役立つ場合があります。" -#: ../../page.rst:354 831d393e236d411d9594732add542025 +#: ../../page.rst:361 ab915d9920f64418b6cde0152fd4bfaa msgid "" "Redactions are a simple way to replace single words in a PDF, or to just " "physically remove them. Locate the word \"secret\" using some text " @@ -1660,13 +1695,13 @@ msgid "" "replacement text for each occurrence." msgstr "赤塗りは、PDF内の単語を置き換えるための簡単な方法であり、単語を物理的に削除するためのものです。テキスト抽出または検索方法を使用して単語「秘密」を見つけ、それぞれの出現ごとに代替テキスト「xxxxxx」を使用して赤塗りを挿入します。" -#: ../../page.rst:356 584ec71ab8e34abebf3b18df3e63f650 +#: ../../page.rst:363 a4860b20cc574fde9ac8fb1b1fe0349b msgid "" "Be wary if the replacement is longer than the original -- this may lead " "to an awkward appearance, line breaks or no new text at all." msgstr "注意が必要です。代替テキストが元のテキストよりも長い場合、見栄えが悪くなったり、改行が発生したり、新しいテキストがまったく表示されなくなる可能性があるためです。" -#: ../../page.rst:358 5f21e5ae52f6497e976cda9b5d93948f +#: ../../page.rst:365 9bcbeb3a84624670b6500eea13b1bed3 msgid "" "For a number of reasons, the new text may not exactly be positioned on " "the same line like the old one -- especially true if the replacement font" @@ -1675,7 +1710,7 @@ msgstr "" "いくつかの理由から、新しいテキストは古いテキストとまったく同じ行に配置されないことがあります。特に、代替フォントがCJKまたはPDF " ":ref:`Base-14-Fonts` の場合には特に当てはまります。" -#: ../../page.rst:363 1d0c24e6a0804d32aebe78e04dbf7bf6 +#: ../../page.rst:370 e623d032e6e4471f9ad3af66e280b5f1 msgid "" "Changed in v1.16.12: The previous *mark* parameter is gone. Instead, the " "respective rectangles are filled with the individual *fill* color of each" @@ -1688,21 +1723,21 @@ msgstr "" "が指定された場合、そのテキストを挿入するために、redactionで提供されたパラメータを使用して :meth:`insert_textbox` " "が呼び出されます。" -#: ../../page.rst:364 4929e25bf88e476bbfc26d59ccaa35de +#: ../../page.rst:371 b59761d1d915436582b45028a61cadf8 msgid "" "Changed in v1.18.0: added option for handling images that overlap " "redaction areas." msgstr "v1.18.0で変更:赤字領域と重なる画像を処理するためのオプションが追加されました。" -#: ../../page.rst:365 80024bb419ca4d7f934c16c20f7a42af +#: ../../page.rst:372 055f2b2de0784443b7706cab98b7a543 msgid "Changed in v1.23.27: added option for removing graphics as well." msgstr "" -#: ../../page.rst:366 c03b5e2b21474aa483eb140da9a8bd60 +#: ../../page.rst:373 9ae33c1ffa7b4959b8a34116adeab4ec msgid "Changed in v1.24.2: added option `keep_text` to leave text untouched." msgstr "" -#: ../../page.rst:376 baf9b1551aa94ac6a8a592bc26208234 +#: ../../page.rst:383 a85096a374e94e7f972f4d5020affbcc msgid "" "PDF only: Add an annotation consisting of lines which connect the given " "points. A **Polygon's** first and last points are automatically " @@ -1716,11 +1751,11 @@ msgstr "" "の最初と最後のポイントは自動的に接続されますが、**PolyLine** ではそれが発生しません。各ポイントは半径3の円で囲まれた最小の " "**四角形** として自動的に作成されます(半径3 = 3 * 線の幅)。以下は、色や線端を変更した「PolyLine」の例を示しています。" -#: ../../page.rst:378 70ca6d5b299a47a7a306dd93884d716b +#: ../../page.rst:385 a2a2f079c20e444fbcbb3ea51d8ba3de msgid "a list of :data:`point_like` objects." msgstr "points(list)– :data:`point_like` オブジェクトのリスト。" -#: ../../page.rst:381 b3af4c6ac938426db8d0fbdc861791b3 +#: ../../page.rst:388 2141b375b4e44822b7da8c5b2d4bebea msgid "" "the created annotation. It is drawn with line color black, line width 1 " "no fill color but fill color support. Use methods of :ref:`Annot` to make" @@ -1729,7 +1764,7 @@ msgstr "" "作成されたアノテーションです。線の色は黒で描画され、線の幅は1で、塗りつぶし色はサポートされています。このような外見を実現するために、:ref:`Annot`" " のメソッドを使用して変更を加えることができます。" -#: ../../page.rst:394 d921ff612e2a4e97ac2716bc3f14e87c +#: ../../page.rst:401 f7c981f6b5f94e548db828bc5a7e531d msgid "" "PDF only: These annotations are normally used for **marking text** which " "has previously been somehow located (for example via " @@ -1739,7 +1774,7 @@ msgstr "" "PDFのみ: これらのアノテーションは通常、以前に何らかの方法で見つかったテキスト(たとえば、:meth:`Page.search_for` " "を使用して)をマーキングするために使用されます。ただし、これは必須ではありません:何でも「マーク」することができます。" -#: ../../page.rst:396 98309735fcc54f928b6c8ac922ab42eb +#: ../../page.rst:403 e7b2f48bdced4ffea73d4b0368c08d10 msgid "" "Standard (stroke only -- no fill color support) colors are chosen per " "annotation type: **yellow** for highlighting, **red** for striking out, " @@ -1748,7 +1783,7 @@ msgstr "" "通常、アノテーションの種類ごとに標準の(ストロークのみで、塗りつぶし色はサポートされていません)色が選択されます。ハイライト用に " "**黄色**、取り消し線用に **赤色**、下線用に **緑色**、波線下線用に **マゼンタ色** です。" -#: ../../page.rst:398 60b3b84d276a42a189ce69977179d731 +#: ../../page.rst:405 d005170f532240aabe56262974081b06 msgid "" "All these four methods convert the arguments into a list of :ref:`Quad` " "objects. The **annotation** rectangle is then calculated to envelop all " @@ -1757,7 +1792,7 @@ msgstr "" "これらの四つのメソッドは、引数を :ref:`Quad` オブジェクトのリストに変換します。その後、アノテーション " "の矩形は、これらの四角形を包含するように計算されます。" -#: ../../page.rst:402 2f811c4e32d246cab2cd5f56a8868948 +#: ../../page.rst:409 7da878601a5b46b4a845004779c4da38 msgid "" ":meth:`search_for` delivers a list of either :ref:`Rect` or :ref:`Quad` " "objects. Such a list can be directly used as an argument for these " @@ -1768,7 +1803,7 @@ msgstr "" "オブジェクトのリストを返します。このようなリストは、これらのアノテーションタイプの引数として直接使用でき、検索文字列のすべての出現に対して " "**共通のアノテーション** を提供します::" -#: ../../page.rst:409 1fa41d3b80e048c6a1dba9d2ff4c23b1 +#: ../../page.rst:416 3861b71ef300487288e3d70275d10a19 msgid "" "Obviously, text marker annotations need to know what is the top, the " "bottom, the left, and the right side of the area(s) to be marked. If the " @@ -1780,7 +1815,7 @@ msgstr "" "明らかに、テキストマーカーアノテーションは、マークされる領域の上部、下部、左部、右部が何であるかを知る必要があります。引数がquadsの場合、この情報は四角形のポイントのシーケンスによって提供されます。対照的に、矩形ははるかに少ない情報を提供します" " - これは、四角形の四つの角を使用して24の異なる四角形が構築できるという事実によって示されています。" -#: ../../page.rst:411 2d2353fc6a69478cb850e74c57bbc74c +#: ../../page.rst:418 6f0906af7d944e8c9f03bfc9e5f70457 msgid "" "Therefore, we **strongly recommend** to use the `quads` option for text " "searches, to ensure correct annotations. A similar consideration applies " @@ -1794,38 +1829,39 @@ msgstr "" "**テキストスパン** をマークする場合にも適用されます。この場合の四角形の計算方法の詳細については、:ref:`FAQ` " "の「非水平テキストのマーキング方法」セクションを参照してください。" -#: ../../page.rst:413 7914c015ed964a169ea85543424f61e7 +#: ../../page.rst:420 428c52b63b1f48e8ba0f8104c9956704 msgid "" "the location(s) -- rectangle(s) or quad(s) -- to be marked. (Changed in " "v1.14.20) A list or tuple must consist of :data:`rect_like` or " ":data:`quad_like` items (or even a mixture of either). Every item must be" " finite, convex and not empty (as applicable). **Set this parameter to** " -"*None* if you want to use the following arguments (Changed in v1.16.14). " -"And vice versa: if not *None*, the remaining parameters must be *None*." +"``None`` if you want to use the following arguments (Changed in " +"v1.16.14). And vice versa: if not ``None``, the remaining parameters must" +" be ``None``." msgstr "" "*(v1.14.20で変更)* マーキングする位置、つまり矩形または四角形。リストまたはタプルは、:data:`rect_like` または " ":data:`quad_like` " "のアイテム(またはその混合)で構成されている必要があります。各アイテムは、適用可能な限り有限で凸面で空でなければなりません " -"*(v1.16.14で変更)* 。このパラメータを *None* " -"に設定すると、次の引数を使用できるようになります。逆もまたしかり:Noneでない場合、残りのパラメータは *None* でなければなりません。" +"*(v1.16.14で変更)* 。このパラメータを ``None`` " +"に設定すると、次の引数を使用できるようになります。逆もまたしかり:Noneでない場合、残りのパラメータは ``None`` でなければなりません。" -#: ../../page.rst:420 24cc926c169949a782365194a8344e1b +#: ../../page.rst:427 7840a32fab07421896c8dc0a7eddb8fd msgid "" "start text marking at this point. Defaults to the top-left point of " -"*clip*. Must be provided if `quads` is *None*. (New in v1.16.14)" +"*clip*. Must be provided if `quads` is ``None``. (New in v1.16.14)" msgstr "" "*(v1.16.14で新規)* このポイントでテキストマーキングを開始します。*clip* の左上のポイントがデフォルトです。`quads` が " -"*None* の場合、提供する必要があります。" +"``None`` の場合、提供する必要があります。" -#: ../../page.rst:421 3485784cc0c74c2f9253f84c2e886621 +#: ../../page.rst:428 2a083d78250a425fbdc27e75f3c168cd msgid "" "stop text marking at this point. Defaults to the bottom-right point of " -"*clip*. Must be used if `quads` is *None*. (New in v1.16.14)" +"*clip*. Must be used if `quads` is ``None``. (New in v1.16.14)" msgstr "" "*(v1.16.14で新規)* このポイントでテキストマーキングを停止します。*clip* の右下のポイントがデフォルトです。quadsが " -"*None* の場合、使用する必要があります。" +"``None`` の場合、使用する必要があります。" -#: ../../page.rst:422 672997c1033e4fa5940a5e02f43ce423 +#: ../../page.rst:429 300412dc0f41420ab8c9bec6f1957e7a msgid "" "only consider text lines intersecting this area. Defaults to the page " "rectangle. Only use if `start` and `stop` are provided. (New in v1.16.14)" @@ -1833,17 +1869,17 @@ msgstr "" "*(v1.16.14で新規)* この領域と交差するテキスト行のみを考慮します。ページの矩形がデフォルトです。`start` および `stop` " "が提供されている場合にのみ使用してください。" -#: ../../page.rst:424 76fe991c8d464b798acf419dc191404b -msgid ":ref:`Annot` or *None* (changed in v1.16.14)." -msgstr ":ref:`Annot` または *(v1.16.14で変更)* *None*" +#: ../../page.rst:431 788debac4b8f4e55a6046455337c7fb9 +msgid ":ref:`Annot` or ``None`` (changed in v1.16.14)." +msgstr ":ref:`Annot` または *(v1.16.14で変更)* ``None``" -#: ../../page.rst:425 dc01f40b08564c04b94fd03e89ca7707 +#: ../../page.rst:432 9f9ec240d6374071abeee1a6eb319084 msgid "" "the created annotation. If *quads* is an empty list, **no annotation** is" " created (changed in v1.16.14)." msgstr "作成された注釈。 *(v1.16.14で変更)* *quads* が空のリストの場合、**アノテーションは作成されません**。" -#: ../../page.rst:428 43c24236c38c44839f842798a031f572 +#: ../../page.rst:435 1d40d37b8a194ec282fbc8b2593f5e7b msgid "" "You can use parameters *start*, *stop* and *clip* to highlight " "consecutive lines between the points *start* and *stop* (starting with " @@ -1856,7 +1892,7 @@ msgstr "" "の間の連続した行をハイライトできます。*clip* " "を使用して、選択した行のbboxをさらに縮小し、たとえば多列のページを扱うことができます。次の多行のハイライトは、2つの赤いポイントを指定し、それに応じてクリップを設定することによって、3つのテキスト列を持つページに作成されました。" -#: ../../page.rst:437 32d883fe0fb14271b9b9ebde5dee9cca +#: ../../page.rst:444 0e979d3ecf6743b1a374782e60b95dbc msgid "" "Cluster vector graphics (synonyms are line-art or drawings) based on " "their geometrical vicinity. The method walks through the output of " @@ -1869,30 +1905,43 @@ msgstr "" ":meth:`Page.get_drawings` の出力を処理し、その中で、`path[\"rect\"]` " "がある許容値(引数で指定された)よりも近いパスを結合します。結果は、各々が表(格子状の線がある)、円グラフ、棒グラフなどのものを包含する長方形のリストです。" -#: ../../page.rst:439 fee7dbec8b8245ac9dafe2065b21ee3e +#: ../../page.rst:446 a7040ace649f46ee82108bfecd0c3652 msgid "only consider paths inside this area. The default is the full page." msgstr "only consider paths inside this area. The default is the full page." -#: ../../page.rst:441 1cfde3a6134a4dbdb5c55f7993f0223a +#: ../../page.rst:448 64579ef398884345a1742b01a40bfe34 msgid "" "(optional) provide a previously generated output of " ":meth:`Page.get_drawings`. If `None` the method will execute the method." msgstr "(任意)以前に生成された :meth:`Page.get_drawings` の出力を提供します。`None` の場合、メソッドが実行されます。" -#: ../../page.rst:447 b5a5b28e074a447499641aa686aac853 +#: ../../page.rst:450 0f126bbeb9054ba39a8b37318af0fa46 +msgid "" +"Assume vector graphics to be close enough neighbors for belonging to the " +"same rectangle. Default is 3 points." +msgstr "" + +#: ../../page.rst:452 affc9ad662c54243a82ab470d5c557b8 +msgid "" +"If `True` (default), the method will to remove rectangles having width or" +" height smaller than the respective tolerance value. If `False` no such " +"filtering is done." +msgstr "" + +#: ../../page.rst:456 91f1da7f15f14121bb9fb836a3acdbd2 msgid "" "Find tables on the page and return an object with related information. " "Typically, the default values of the many parameters will be sufficient. " "Adjustments should ever only be needed in corner case situations." msgstr "ページ上のテーブルを見つけ、関連情報を含むオブジェクトを返します。通常、多くのパラメータのデフォルト値は十分です。調整が必要なのは、極めてまれなケースのみです。" -#: ../../page.rst:449 94ec50bc65e542ad816e26757fc5be88 +#: ../../page.rst:458 24a5c3bd448d49f4926019916cb9228e msgid "" "specify a region to consider within the page rectangle and ignore the " "rest. Default is the full page." msgstr "ページの長方形内で考慮する領域を指定します。デフォルトはページ全体です。" -#: ../../page.rst:451 415063775aab4400acc85b331da21df1 +#: ../../page.rst:460 0bb7556df98e4c67a2fd4f222fd2f6d9 msgid "" "Request a **table detection** strategy. Valid values are \"lines\", " "\"lines_strict\" and \"text\". Default is **\"lines\"** which uses all " @@ -1908,19 +1957,19 @@ msgid "" "the dimensions." msgstr "**テーブル検出**戦略をリクエストします。有効な値は、**「lines」**、**「lines_strict」** 、**「text」** です" -#: ../../page.rst:451 ee2986c9007a4f87806bd5b02a53949a +#: ../../page.rst:460 3a1a4de0bbac4bfb8b4f8e163ddc7272 msgid "" "Request a **table detection** strategy. Valid values are \"lines\", " "\"lines_strict\" and \"text\"." msgstr "**テーブル検出**戦略をリクエストします。有効な値は、**「lines」**、**「lines_strict」** 、**「text」** です。" -#: ../../page.rst:453 7a9e6323796e4e2cb26e3d812219ea05 +#: ../../page.rst:462 61c5f8b592124b55b6f0b034cc9caaa0 msgid "" "Default is **\"lines\"** which uses all vector graphics on the page to " "detect grid lines." msgstr "デフォルトは **「lines」** で、ページ上のすべてのベクトルグラフィックスを使用してグリッド線を検出します。" -#: ../../page.rst:455 c83320b5c56a4f78ae6468514c25bea5 +#: ../../page.rst:464 1cc39b20c5cc4570bf28776257646336 msgid "" "Strategy **\"lines_strict\"** ignores borderless rectangle vector " "graphics. Sometimes single text pieces have background colors which may " @@ -1930,44 +1979,44 @@ msgstr "" "ストラテジー **「lines_strict」** " "は、境界のない四角形のベクトルグラフィックスを無視します。時には、個々のテキスト部分に背景色があることがあり、これが誤った列や行を生じる可能性があります。この戦略はそれらを無視し、したがって検出精度を向上させることができます。" -#: ../../page.rst:457 26a74dd5f0ff45199de1e6d7f51f894f +#: ../../page.rst:466 959245153c024460aa7b36f5f36d500a msgid "" "If **\"text\"** is specified, text positions are used to generate " "\"virtual\" column and / or row boundaries. Use `min_words_*` to request " "the number of words for considering their coordinates." msgstr "検索アルゴリズムを指定します。デフォルトでは「lines」はベクトル描画を探します。指定された場合、「text」ではテキストの位置を使用して「仮想」列境界を生成します。x座標を考慮するための単語数を指定するには、`min_words_*`を使用します。" -#: ../../page.rst:459 4b5f64e4ab4d44adae8466f7f0790145 +#: ../../page.rst:468 b90c42cceb0b42838439fb8ff6094578 msgid "" "Use parameters `vertical_strategy` and `horizontal_strategy` **instead** " "for a more fine-grained treatment of the dimensions." msgstr "サイズの微調整には、`vertical_strategy` と`horizontal_strategy` パラメータを使用してください。" -#: ../../page.rst:461 3f495d8d576f4ea9ba334e8ce0dc290f +#: ../../page.rst:470 ad04c6b855c0406586e92f10415bc468 msgid "" "y-coordinates of rows. If provided, there will be no attempt to identify " "additional table rows. This influences table detection." msgstr "行のy座標を含む浮動小数点数のリスト。指定した場合、追加のテーブル行を識別しないようにします。" -#: ../../page.rst:463 1713e8aa0e70484f918bab8c8b8c48d9 +#: ../../page.rst:472 fc8047d6017c454e9cbbc20b2d15f37c msgid "" "x-coordinates of columns. If provided, there will be no attempt to " "identify additional table columns. This influences table detection." msgstr "列のx座標を含む浮動小数点数のリスト。指定した場合、追加のテーブル列を識別しないようにします。" -#: ../../page.rst:465 617660107c5b42d8a6b4efaedb7eb256 +#: ../../page.rst:474 3e730286d5a14cf0994241e350b6dcf5 msgid "" "relevant for vertical strategy option \"text\": at least this many words " "must coincide to establish a **virtual column** boundary." msgstr "垂直戦略オプション「text」に関連します。少なくともこの数の単語が一致する必要があり、仮想の列境界を確立します。" -#: ../../page.rst:467 898cb18b90ba4fa9b5fbbf1ca2c1f417 +#: ../../page.rst:476 d5f56082b14b41699e3c31a5b2a64e44 msgid "" "relevant for horizontal strategy option \"text\": at least this many " "words must coincide to establish a **virtual row** boundary." msgstr "水平戦略オプション「text」に関連します。少なくともこの数の単語が一致する必要があり、仮想の行境界を確立します。" -#: ../../page.rst:469 e8e5afbb5d564492bed41f25334fc335 +#: ../../page.rst:478 bf9b8525504f4f70bb346c23dcec14a0 msgid "" "Any two horizontal lines whose y-values differ by no more than this value" " will be **snapped** into one. Accordingly for vertical lines. Default is" @@ -1977,7 +2026,7 @@ msgstr "" "各縦線は、y値の差がこの値以下であれば、一つに結合されます。同様に、各横線も結合されます。デフォルトは3です。この値の代わりに、次元ごとに異なる値を指定することもできます。`snap_x_tolerance`" " および `snap_y_tolerance` を使用してください。" -#: ../../page.rst:471 ecc9f243bc1a48f2bed2d5b124688e45 +#: ../../page.rst:480 011cdbb034de49f183f9a5162ec84132 msgid "" "Any two lines will be **joined** to one if the end and the start points " "differ by no more than this value (in points). Default is 3. Instead of " @@ -1988,13 +2037,13 @@ msgstr "" "。デフォルトは3です。この値の代わりに、`join_x_tolerance` と `join_y_tolerance` " "を使用して寸法ごとに別々の値を指定できます。" -#: ../../page.rst:473 4d0a363f9d3542fb92b21e3d2e190c4b +#: ../../page.rst:482 66e8384a75fb449890e51e97fb123f66 msgid "" "Ignore a line if its length does not exceed this value (points). Default " "is 3." msgstr "この値(ポイント単位)を超えない場合、線を無視します。デフォルトは3です" -#: ../../page.rst:475 218e8c99264f4ba3b2cb7d12f1eac15b +#: ../../page.rst:484 f6a1a395da74402380cd680a2f589eea msgid "" "When combining lines into cell borders, orthogonal lines must be within " "this value (points) to be considered intersecting. Default is 3. Instead " @@ -2004,7 +2053,7 @@ msgstr "" "直交するラインをセルの境界線に結合する際に、それらの直交するラインはこの値(ポイント単位)以内である必要があります。デフォルトは3です。この値の代わりに、次元ごとに個別の値を指定することもできます。`intersection_x_tolerance`" " と `intersection_y_tolerance` を使用します。" -#: ../../page.rst:477 e4a0d32a2ba44981a161d51475a5304a +#: ../../page.rst:486 9a4667004af547ee95ce5529ee9c72b1 msgid "" "Characters will be combined into words only if their distance is no " "larger than this value (points). Default is 3. Instead of this value, " @@ -2014,7 +2063,7 @@ msgstr "" "文字が単語に結合されるのは、その距離がこの値(ポイント)を超えない場合のみです。デフォルト値は3です。この値の代わりに、次元ごとに別々の値を指定することもできます。`text_x_tolerance`" " と `text_y_tolerance` を使用します。" -#: ../../page.rst:479 5d01dfe126814619bc527957ac393dce +#: ../../page.rst:488 cb59f0e842e74377952472cc2e16135c msgid "" "Specify a list of \"lines\" (i.e. pairs of :data:`point_like` objects) as" " **additional**, \"virtual\" vector graphics. These lines may help with " @@ -2032,7 +2081,7 @@ msgstr "" "パラメータとは異なり、これらの線は他の方法で行または列を検出するのを妨げません。これらの線は、結合、スナップ、交差、最小長、およびクリップ矩形内への含有の点で、「実際の」ベクトル" " グラフィックスとまったく同様に処理されます。同様に、座標軸のいずれかに平行でない線は無視されます。" -#: ../../page.rst:483 56e5835b58954cc1aa5ed7e5e3bd7d41 +#: ../../page.rst:492 a75a6520928d409c86d1ffe0d924c879 msgid "" "a `TableFinder` object that has the following significant attributes: * " "`cells`: a list of **all bboxes** on the page, that have been identified " @@ -2043,13 +2092,13 @@ msgid "" "is also a sequence of its tables. This means that if `tabs` is a " "`TableFinder` object, then table \"n\" is delivered by `tabs.tables[n]` " "as well as by the shorter `tabs[n]`. * The `Table` object has the " -"following attributes: * `bbox`: the bounding box of the table as a " -"tuple `(x0, y0, x1, y1)`. * `cells`: bounding boxes of the table's " -"cells (list of tuples). A cell may also be `None`. * `extract()`: this " -"method returns the text content of each table cell as a list of list of " -"strings. * `to_markdown()`: this method returns the table as a **string" -" in markdown format** (compatible to Github). Supporting viewers can " -"render the string as a table. This output is optimized for **small " +"following attributes: * ``bbox``: the bounding box of the table as a " +"tuple `(x0, y0, x1, y1)`. * ``cells``: bounding boxes of the table's " +"cells (list of tuples). A cell may also be `None`. * ``extract()``: " +"this method returns the text content of each table cell as a list of list" +" of strings. * ``to_markdown()``: this method returns the table as a " +"**string in markdown format** (compatible to Github). Supporting viewers " +"can render the string as a table. This output is optimized for **small " "token** sizes, which is especially beneficial for LLM/RAG feeds. Pandas " "DataFrames (see method `to_pandas()` below) offer an equivalent markdown " "table output which however is better readable for the human eye. * " @@ -2060,35 +2109,55 @@ msgid "" "and outputs to almost 20 well-known formats, among them Excel files, CSV," " JSON, markdown-formatted tables and more. `DataFrame.to_markdown()` " "generates a Github-compatible markdown format optimized for human " -"readability. This method however requires the package " -"[tablutate](https://pypi.org/project/tabulate/) to installed in addition " -"to pandas itself. * ``header``: a `TableHeader` object containing " -"header information of the table. * `col_count`: an integer containing " -"the number of table columns. * `row_count`: an integer containing the " -"number of table rows. * `rows`: a list of `TableRow` objects containing" -" two attributes, ``bbox`` is the boundary box of the row, and `cells` is " -"a list of table cells contained in this row. * The `TableHeader` object " -"has the following attributes: * ``bbox``: the bounding box of the " -"header. * `cells`: a list of bounding boxes containing the name of the " -"respective column. * `names`: a list of strings containing the text of " -"each of the cell bboxes. They represent the column names -- which are " -"used when exporting the table to pandas DataFrames, markdown, etc. * " -"`external`: a bool indicating whether the header bbox is outside the " -"table body (`True`) or not. Table headers are never identified by the " -"`TableFinder` logic. Therefore, if `external` is true, then the header " -"cells are not part of any cell identified by `TableFinder`. If `external " -"== False`, then the first table row is the header. Please have a look at" -" these `Jupyter notebooks `_, which cover standard situations " -"like multiple tables on one page or joining table fragments across " -"multiple pages." -msgstr "" - -#: ../../page.rst:483 f194cdb41df04b83b752c94d364b938d +"readability. This method however requires the package `tabulate " +"`_ to be installed in addition to " +"pandas itself. * ``header``: a `TableHeader` object containing header " +"information of the table. * ``col_count``: an integer containing the " +"number of table columns. * ``row_count``: an integer containing the " +"number of table rows. * ``rows``: a list of `TableRow` objects " +"containing two attributes, ``bbox`` is the boundary box of the row, and " +"`cells` is a list of table cells contained in this row. * The " +"`TableHeader` object has the following attributes: * ``bbox``: the " +"bounding box of the header. * `cells`: a list of bounding boxes " +"containing the name of the respective column. * `names`: a list of " +"strings containing the text of each of the cell bboxes. They represent " +"the column names -- which are used when exporting the table to pandas " +"DataFrames, markdown, etc. * `external`: a bool indicating whether the " +"header bbox is outside the table body (`True`) or not. Table headers are " +"never identified by the `TableFinder` logic. Therefore, if `external` is " +"true, then the header cells are not part of any cell identified by " +"`TableFinder`. If `external == False`, then the first table row is the " +"header. Please have a look at these `Jupyter notebooks " +"`_, which cover standard situations like multiple tables on one " +"page or joining table fragments across multiple pages. .. caution:: The " +"lifetime of the `TableFinder` object, as well as that of all its tables " +"**equals the lifetime of the page**. If the page object is deleted or " +"reassigned, all tables are no longer valid. The only way to keep " +"table content beyond the page's availability is to **extract it** via " +"methods `Table.to_markdown()`, `Table.to_pandas()` or a copy of " +"`Table.extract()` (e.g. `Table.extract()[:]`). .. note:: Once a " +"table has been extracted to a **Pandas DataFrame** with `to_pandas()` it " +"is easy to convert to other file types with the **Pandas API**: - " +"table to Markdown, use `to_markdown " +"`_" +" - table to JSON, use: `to_json " +"`_" +" - table to Excel, use: `to_excel " +"`_" +" - table to CSV, use: `to_csv " +"`_" +" - table to HTML, use: `to_html " +"`_" +" - table to SQL, use: `to_sql " +"`_" +msgstr "" + +#: ../../page.rst:492 16932db7dc3b4eb29ccd45e227a4ec05 msgid "a `TableFinder` object that has the following significant attributes:" msgstr "`TableFinder` オブジェクトには、次の重要な属性があります:" -#: ../../page.rst:485 89df03cdb1c5485ca60350e8113fc021 +#: ../../page.rst:494 a2ed489c6c8c42de855887a6ad816706 msgid "" "`cells`: a list of **all bboxes** on the page, that have been identified " "as table cells (across all tables). Each cell is a :data:`rect_like` " @@ -2098,7 +2167,7 @@ msgstr "" "ページ上でテーブルのセルとして識別されたすべてのバウンディングボックスのリスト(すべてのテーブルを対象にします)。各セルは座標のタプル (x0, " "y0, x1, y1) または `None` です。" -#: ../../page.rst:486 47d097aecb6943218a40ff2f43915e50 +#: ../../page.rst:495 d1f7203086fc4854afd952de86470e61 msgid "" "`tables`: a list of `Table` objects. This is `[]` if the page has no " "tables. Single tables can be found as items of this list. But the " @@ -2111,40 +2180,45 @@ msgstr "" "オブジェクト自体もそのテーブルのシーケンスです。つまり、`tabs` が `TableFinder` オブジェクトである場合、テーブル番号 " "\"n\" は `tabs.tables[n]` およびより短い `tabs[n]` によって提供されます。" -#: ../../page.rst:489 f291666c54f0402f961da10898fe1075 +#: ../../page.rst:498 4b154dc613f947cb88e167f4a06b0f33 msgid "The `Table` object has the following attributes:" msgstr "`Table` オブジェクトには次の属性があります:" -#: ../../page.rst:491 e3a2801a64fd444289b7c6f68c06e5b4 -msgid "`bbox`: the bounding box of the table as a tuple `(x0, y0, x1, y1)`." +#: ../../page.rst:500 f757cce6ee92448bac1014f23767d26a +#, fuzzy +msgid "``bbox``: the bounding box of the table as a tuple `(x0, y0, x1, y1)`." msgstr "**bbox:** テーブルのバウンディングボックス(タプル)`(x0, y0, x1, y1)`。" -#: ../../page.rst:492 5650270f25f747dd8acf72094f663292 +#: ../../page.rst:501 99bdc3e89f7147caa5684ec85f10669d +#, fuzzy msgid "" -"`cells`: bounding boxes of the table's cells (list of tuples). A cell may" -" also be `None`." +"``cells``: bounding boxes of the table's cells (list of tuples). A cell " +"may also be `None`." msgstr "**cells:** テーブルのセルのバウンディングボックス(タプル)のリスト。セルは `None` である場合もあります。" -#: ../../page.rst:493 f445d9c6b5e94cdba41089eb424689c0 +#: ../../page.rst:502 f7d09b27bdb64f14860acc3b029c3f91 +#, fuzzy msgid "" -"`extract()`: this method returns the text content of each table cell as a" -" list of list of strings." +"``extract()``: this method returns the text content of each table cell as" +" a list of list of strings." msgstr "**extract():** このメソッドは、各テーブルセルのテキストコンテンツを文字列のリストのリストとして返します。" -#: ../../page.rst:494 f12d08472cbd482d8312b94c657ea0b3 +#: ../../page.rst:503 a939bc63ffa54de1a873af990c9ddd5b +#, fuzzy msgid "" -"`to_markdown()`: this method returns the table as a **string in markdown " -"format** (compatible to Github). Supporting viewers can render the string" -" as a table. This output is optimized for **small token** sizes, which is" -" especially beneficial for LLM/RAG feeds. Pandas DataFrames (see method " -"`to_pandas()` below) offer an equivalent markdown table output which " -"however is better readable for the human eye." +"``to_markdown()``: this method returns the table as a **string in " +"markdown format** (compatible to Github). Supporting viewers can render " +"the string as a table. This output is optimized for **small token** " +"sizes, which is especially beneficial for LLM/RAG feeds. Pandas " +"DataFrames (see method `to_pandas()` below) offer an equivalent markdown " +"table output which however is better readable for the human eye." msgstr "" "`to_markdown()` :このメソッドは、テーブルをGitHubと互換性のある **Markdown形式の文字列** " "として返します。サポートされているビューアは、文字列をテーブルとしてレンダリングできます。この出力は、LLM/RAGフィードに特に有益な小さいトークンサイズに最適化されています。PandasのDataFrames(後述の" " `to_pandas()` メソッドを参照)は、同等のMarkdownテーブル出力を提供しますが、人間の目にはより読みやすいです。" -#: ../../page.rst:495 b6ad0dddec4e43cda4f6b7dc20bcbd34 +#: ../../page.rst:504 56d986576a94463da825b0753142c2d0 +#, fuzzy msgid "" "`to_pandas()`: this method returns the table as a `pandas " "`_ `DataFrame " @@ -2153,9 +2227,9 @@ msgid "" "and outputs to almost 20 well-known formats, among them Excel files, CSV," " JSON, markdown-formatted tables and more. `DataFrame.to_markdown()` " "generates a Github-compatible markdown format optimized for human " -"readability. This method however requires the package " -"[tablutate](https://pypi.org/project/tabulate/) to installed in addition " -"to pandas itself." +"readability. This method however requires the package `tabulate " +"`_ to be installed in addition to " +"pandas itself." msgstr "" "`to_pandas()` : このメソッドは、テーブルを `pandas " "`_ `DataFrame " @@ -2166,44 +2240,47 @@ msgstr "" "だけでなく、 [tablutate](https://pypi.org/project/tabulate/) " "パッケージの追加インストールが必要です。" -#: ../../page.rst:496 3356700cf2c244a28b0799edc876741d +#: ../../page.rst:505 2fe23559963f483f90b628aeb166e42f msgid "" "``header``: a `TableHeader` object containing header information of the " "table." msgstr "**header:** テーブルのヘッダー情報を含む `TableHeader` オブジェクト。" -#: ../../page.rst:497 96894f3fb0dc4a8c908cfb9fa70ccf76 -msgid "`col_count`: an integer containing the number of table columns." +#: ../../page.rst:506 9a8e9cae3f0446a09814edd2425fbb2a +#, fuzzy +msgid "``col_count``: an integer containing the number of table columns." msgstr "**col_count:** テーブルの列数を含む整数。" -#: ../../page.rst:498 e7da656e49ca426d9d2f369d7390dc6e -msgid "`row_count`: an integer containing the number of table rows." +#: ../../page.rst:507 c7552851166e4240a60bd234bd64b7ca +#, fuzzy +msgid "``row_count``: an integer containing the number of table rows." msgstr "**row_count:** テーブルの行数を含む整数。" -#: ../../page.rst:499 395645eca8f54e2ea4037d0c2cee3b85 +#: ../../page.rst:508 edb57dea09864a4bb7dd582bb1eee915 +#, fuzzy msgid "" -"`rows`: a list of `TableRow` objects containing two attributes, ``bbox`` " -"is the boundary box of the row, and `cells` is a list of table cells " -"contained in this row." +"``rows``: a list of `TableRow` objects containing two attributes, " +"``bbox`` is the boundary box of the row, and `cells` is a list of table " +"cells contained in this row." msgstr "" "**rows:** `TableRow` オブジェクトのリストで、*bbox* は行の境界ボックスで、*cells* " "はこの行に含まれるテーブルセルのリストです。" -#: ../../page.rst:501 cde291af7412417fb07538e6ffb27a86 +#: ../../page.rst:510 99b759a5609c45cf8676bf10d36b3dd4 msgid "The `TableHeader` object has the following attributes:" msgstr "`TableHeader` オブジェクトには次の属性があります:" -#: ../../page.rst:503 f9aff3bc70194b86a32c289b24b4f820 +#: ../../page.rst:512 5b12b031b3d245b1861bc666e19aa782 msgid "``bbox``: the bounding box of the header." msgstr "**bbox:** ヘッダーのバウンディングボックス。" -#: ../../page.rst:504 01642c1720f84ce9ba3f3d7da4363baf +#: ../../page.rst:513 994ce1dec2fd49d39ac5c1eab5f214f9 msgid "" "`cells`: a list of bounding boxes containing the name of the respective " "column." msgstr "**cells:** 各列の名前を含むバウンディングボックスのリスト。" -#: ../../page.rst:505 c0a9c592647941f78842c0adf6a4267e +#: ../../page.rst:514 4c137fcd2e6b4ec4a7a04f71de1e2f1f msgid "" "`names`: a list of strings containing the text of each of the cell " "bboxes. They represent the column names -- which are used when exporting " @@ -2212,7 +2289,7 @@ msgstr "" "**names:** 各セルのバウンディングボックス内のテキストを含む文字列のリスト。これらは列の名前を表します。これらはテーブルを pandas" " DataFrame または CSV などにエクスポートする際に使用できます。" -#: ../../page.rst:506 3feabc70c0f94b8899746ba8a8387af9 +#: ../../page.rst:515 db42d168398a40d4bb872d6483676957 msgid "" "`external`: a bool indicating whether the header bbox is outside the " "table body (`True`) or not. Table headers are never identified by the " @@ -2225,7 +2302,7 @@ msgstr "" "の場合、ヘッダーセルは `TableFinder` によって識別された任意のセルの一部ではありません。`external == False` " "の場合、最初のテーブル行がヘッダーです。" -#: ../../page.rst:508 703fcd6bc16a493ebe627c33369f1b09 +#: ../../page.rst:517 88395b69cbac4cc982e3ecaf02b10e54 msgid "" "Please have a look at these `Jupyter notebooks " "`_ " "をご覧ください。これらのノートブックでは、1つのページに複数のテーブルがある場合や、複数のページにまたがるテーブル断片を結合するなど、標準的な状況がカバーされています。" -#: ../../page.rst:512 e953e1e873434552b62ef26d96b58799 +#: ../../page.rst:519 10b41ad5dc8e4342b7e28af474508150 +msgid "" +"The lifetime of the `TableFinder` object, as well as that of all its " +"tables **equals the lifetime of the page**. If the page object is deleted" +" or reassigned, all tables are no longer valid." +msgstr "" + +#: ../../page.rst:521 d7e52c98b9f24c4cafa781ff281bb177 +msgid "" +"The only way to keep table content beyond the page's availability is to " +"**extract it** via methods `Table.to_markdown()`, `Table.to_pandas()` or " +"a copy of `Table.extract()` (e.g. `Table.extract()[:]`)." +msgstr "" + +#: ../../page.rst:525 b90b709e2c50442f9fab647656786df8 +msgid "" +"Once a table has been extracted to a **Pandas DataFrame** with " +"`to_pandas()` it is easy to convert to other file types with the **Pandas" +" API**:" +msgstr "" + +#: ../../page.rst:527 b3aee5d67c8b48049ce1b0ce5f8f0cb9 +msgid "" +"table to Markdown, use `to_markdown " +"`_" +msgstr "" + +#: ../../page.rst:528 f30554fd4e254290925725339bc9dd99 +msgid "" +"table to JSON, use: `to_json " +"`_" +msgstr "" + +#: ../../page.rst:529 5df3ccf96e104f07ae9e3312613a2290 +msgid "" +"table to Excel, use: `to_excel " +"`_" +msgstr "" + +#: ../../page.rst:530 628bf1e948334739bbf11d4f72c54bca +msgid "" +"table to CSV, use: `to_csv " +"`_" +msgstr "" + +#: ../../page.rst:531 46ea342a5507459092d02333ec3c8bf9 +msgid "" +"table to HTML, use: `to_html " +"`_" +msgstr "" + +#: ../../page.rst:532 0dd95ceb976842c8973b26a9dbf62899 +msgid "" +"table to SQL, use: `to_sql " +"`_" +msgstr "" + +#: ../../page.rst:537 b38371acb2944f7492c3060989dd22b1 msgid "New in version 1.23.0" msgstr "新機能バージョン1.23.0" -#: ../../page.rst:513 09ba39edef1747ed9776b6ff5fd1b106 +#: ../../page.rst:538 f4ed84bde3c84cbf8f88f0bd85419704 msgid "Changed in version 1.23.19: new argument `add_lines`." msgstr "1.23.19で変更された点:新しい引数 `add_lines` 。" -#: ../../page.rst:519 8f473201c8274ed1812c20d8b7511dcc +#: ../../page.rst:544 06557f142d63455aa8fe7500ceed99a5 msgid "" "There is also the `pdf2docx extract tables method`_ which is capable of " "table extraction if you prefer." msgstr "必要に応じて、テーブル抽出を行う `pdf2docx extract tables method`_ も利" -#: ../../page.rst:524 b08640ff6ac24e43a3e53cb0f8deb0da +#: ../../page.rst:549 a712bec698ca4879b1543ed3a637da15 msgid "" -"PDF only: Add a \"rubber stamp\" like annotation to e.g. indicate the " -"document's intended use (\"DRAFT\", \"CONFIDENTIAL\", etc.)." -msgstr "PDF専用: \"ドラフト\"、\"機密\"などの文書の意図した使用を示すための「スタンプ」のような注釈を追加します。" +"PDF only: Add a \"rubber stamp\" annotation to e.g. indicate the " +"document's intended use (\"DRAFT\", \"CONFIDENTIAL\", etc.). The " +"parameter may be either an integer to select text from a predefined array" +" of standard texts or an image." +msgstr "" -#: ../../page.rst:526 f41653cf18ce458bb5630ca667198959 +#: ../../page.rst:551 09fdd0c608344b09b2f92a24a122bcf1 msgid "rectangle where to place the annotation." msgstr "アノテーションを配置する矩形領域。" -#: ../../page.rst:528 65a7a72b824e4e50923d2ebd41d52907 -msgid "id number of the stamp text. For available stamps see :ref:`StampIcons`." +#: ../../page.rst:552 0a5baef86a0c43b4856a6e1f368743b8 +msgid "" +"The following options are available: * The id number (int) of the stamp " +"text. For available stamps see :ref:`StampIcons`. * A string specifying " +"an image file path. * A ``bytes``, ``bytearray`` or ``io.BytesIO`` " +"object for an image in memory. * A :ref:`Pixmap`." +msgstr "" + +#: ../../page.rst:552 295431e7160d40cba860273eb9bdd292 +msgid "The following options are available:" +msgstr "" + +#: ../../page.rst:554 9e500a32a72148eca055550f446780e7 +#, fuzzy +msgid "" +"The id number (int) of the stamp text. For available stamps see " +":ref:`StampIcons`." msgstr "スタンプテキストのID番号。使用可能なスタンプについては :ref:`StampIcons` を参照してください。" -#: ../../page.rst:532 2dd43d988f294ca5ba60502012ab4470 +#: ../../page.rst:556 fa01387b8c6e4d36a9135715d18de05a +msgid "A string specifying an image file path." +msgstr "" + +#: ../../page.rst:558 0b7af2d61f9f442d9f2eb3b6a2e599e1 +msgid "" +"A ``bytes``, ``bytearray`` or ``io.BytesIO`` object for an image in " +"memory." +msgstr "" + +#: ../../page.rst:560 1cf28c6d0d68474cbc6fc9e428d6aff4 +msgid "A :ref:`Pixmap`." +msgstr "" + +#: ../../page.rst:562 8840f0a2cfc24d4c85537d6840788773 +msgid "**Text-based stamps**" +msgstr "" + +#: ../../page.rst:564 78b6400986c74cc08d79b27755fb7520 msgid "" -"The stamp's text and its border line will automatically be sized and be " -"put horizontally and vertically centered in the given rectangle. " -":attr:`Annot.rect` is automatically calculated to fit the given **width**" -" and will usually be smaller than this parameter." +":attr:`Annot.rect` is automatically calculated as the largest rectangle " +"with an aspect ratio of ``width:height = 3.8`` that fits in the provided " +"``rect``. Its position is vertically and horizontally centered." msgstr "" -"スタンプのテキストとその境界線は、自動的にサイズ変更され、指定された矩形内で水平および垂直方向に中央に配置されます。:attr:`Annot.rect`" -" は指定された **幅** に合わせて自動的に計算され、通常はこのパラメータよりも小さくなります。" -#: ../../page.rst:533 ee99372f34b9484084cd51cb4c13fe91 +#: ../../page.rst:565 8dfc4069af8542acb4c4a2ed381665a0 msgid "The font chosen is \"Times Bold\" and the text will be upper case." msgstr "選択されるフォントは「Times Bold」で、テキストは大文字になります。" -#: ../../page.rst:534 d76dca05d57645f984b8bd1a2fcb6e4a +#: ../../page.rst:566 542dc89152d14966a8cbfddc2438ea7a +#, fuzzy msgid "" -"The appearance can be changed using :meth:`Annot.set_opacity` and by " -"setting the \"stroke\" color (no \"fill\" color supported)." +"The appearance can be modified using :meth:`Annot.set_opacity` and by " +"setting the \"stroke\" color. By PDF specification, stamp annotations " +"have no \"fill\" color." msgstr "" "外観は :meth:`Annot.set_opacity` を使用して変更でき、\"stroke\" " "色を設定することができます(「fill」色はサポートされていません)。" -#: ../../page.rst:535 4b4ba05556e64e0ab3035a43cc46a896 +#: ../../page.rst:570 0ef51375d1544ebb86837770241f2396 +msgid "**Image-based stamps**" +msgstr "" + +#: ../../page.rst:572 5829f548dcc74709b9c6611b7b67d095 +msgid "" +"The image is scaled to fit into the rectangle `rect` such that the " +"image's center and the center of `rect` coincide. The aspect ratio of the" +" image is preserved, so the image may not fill the entire rectangle. " +"However, at least one of the given rectangle's width or height are fully " +"covered." +msgstr "" + +#: ../../page.rst:573 d96d920f471744c2b865aaa647bcb4d6 +msgid "" +"The annotation can be modified via :meth:`Annot.set_opacity`. This method" +" therefore is a way to display images transparently even if no alpha " +"channel is present." +msgstr "" + +#: ../../page.rst:574 28ad3d421ea04a3c8dab3e88531b04b3 +msgid "Setting colors has no effect on image stamps." +msgstr "" + +#: ../../page.rst:575 aa63a66ddca74f08bc0a8bb81d515b56 msgid "" -"This can be used to create watermark images: on a temporary PDF page " -"create a stamp annotation with a low opacity value, make a pixmap from it" -" with *alpha=True* (and potentially also rotate it), discard the " -"temporary PDF page and use the pixmap with :meth:`insert_image` for your " -"target PDF." +"Rotating image-based stamps **is not supported**. Setting the rotation " +"may lead to unexpected results." msgstr "" -"これは透かし画像を作成するために使用できます。一時的なPDFページ上に低い不透明度のスタンプ注釈を作成し、*alpha=True* " -"でそれからピクスマップを作成し(おそらく回転させることもあります)、一時的なPDFページを破棄し、ターゲットのPDFに挿入するためにピクスマップを" -" :meth:`insert_image` で使用します。" -#: ../../page.rst:543 712caf0397ab4d0a95dda49964129978 +#: ../../page.rst:579 0c5ed97b356f46dd8de0a7fd5c6f9a34 msgid "" "PDF only: Add a PDF Form field (\"widget\") to a page. This also **turns " "the PDF into a Form PDF**. Because of the large amount of different " @@ -2309,59 +2495,59 @@ msgstr "" "PDFのみ:ページにPDFフォームフィールド(ウィジェット)を追加します。これにより、PDFがフォームPDFに変換されます。ウィジェットにはさまざまなオプションがあるため、フォームフィールドの作成と更新の両方に使用する必要があるため、可能なPDFフィールド属性を含む新しいクラス" " :ref:`Widget` を開発しました。" -#: ../../page.rst:545 cd71c634f6c34deca3f17f535836aaf5 +#: ../../page.rst:581 51214c25c3d0436caeb09dfe9b797633 msgid "a :ref:`Widget` object which must have been created upfront." msgstr "事前に作成されている必要がある :ref:`Widget` オブジェクト。" -#: ../../page.rst:548 af685b9b6c5241768e2be44dc8d74cb5 +#: ../../page.rst:584 2d0f2a345b054888b02bc8c76d40fb65 msgid "a widget annotation." msgstr "ウィジェットアノテーション。" -#: ../../page.rst:552 1491cb032de6404f8c3bd05a7fa375ad +#: ../../page.rst:588 76be8fa7c33c4d569695619e472103b1 msgid "" "The removal will now include any bound 'Popup' or response annotations " "and related objects (changed in v1.16.6)." msgstr "v1.16.6 で変更: 削除操作には、現在は関連する 'Popup' や応答アノテーションおよび関連するオブジェクトも含まれます。" -#: ../../page.rst:554 a59ff0357084433393f025f67a1c06a3 +#: ../../page.rst:590 ae2072c76db946bd829a24ad54fb47d2 msgid "PDF only: Delete annotation from the page and return the next one." msgstr "PDFのみ:ページから注釈を削除し、次の注釈を返します。" -#: ../../page.rst:556 8bf164c109c04330b8e9e3235fefc2fd +#: ../../page.rst:592 5bfd6638ad47429ea191d4eae833d900 msgid "the annotation to be deleted." msgstr "削除するアノテーション。" -#: ../../page.rst:560 8d68aa05ae2e4cfc93366006dcc4ea8a +#: ../../page.rst:596 c207ee0e3d0546df96a916745e7c80d9 msgid "" "the annotation following the deleted one. Please remember that physical " "removal requires saving to a new file with garbage > 0." msgstr "削除された注釈の後に続く注釈。物理的な削除には、ガベージ> 0で新しいファイルに保存する必要があることを覚えておいてください。" -#: ../../page.rst:564 48f22459a51c4c3fa58830d8748b9881 +#: ../../page.rst:600 d6ace6c66a3f4bf189522f75ebec56d2 msgid "PDF only: Delete field from the page and return the next one." msgstr "PDFのみ:ページからフィールドを削除し、次のフィールドを返します。" -#: ../../page.rst:566 8f7283d1b0c94771af988085a7f01ff8 +#: ../../page.rst:602 f6581342bd364c73b61fbdb7f0948d61 msgid "the widget to be deleted." msgstr "削除するウィジェット。" -#: ../../page.rst:569 ../../page.rst:1885 ../../page.rst:2189 -#: 1b74101588ad439d8f0323ff94371987 9e6f0760ea624346818071df8f7ce67e -#: ea9df65396f749479dbedf5fe7523fcb +#: ../../page.rst:605 ../../page.rst:1925 ../../page.rst:2237 +#: 498cf6d63ef74a7ea4599842cf31d132 c45ad8706e394affa463fa67ff0a65b5 +#: cd59e4459aac4929b101b288eef60e44 msgid ":ref:`Widget`" msgstr "" -#: ../../page.rst:570 5a0501b1071c47bba9f8486365d521f0 +#: ../../page.rst:606 8a0c76914fd8417a83a90dc1ba87de59 msgid "" "the widget following the deleted one. Please remember that physical " "removal requires saving to a new file with garbage > 0." msgstr "削除されたウィジェットの後に続くウィジェット。物理的な削除には、ガベージ> 0で新しいファイルに保存する必要があることを覚えておいてください。" -#: ../../page.rst:574 47c59cc0d7274e3197a8d10cb641a89a +#: ../../page.rst:610 b4e7010005f44db0bac207f84fffcef5 msgid "(New in v1.18.4)" msgstr "v1.18.4で変更" -#: ../../page.rst:581 b5fd30fbd7f04d3bac23d6b46d5f15d5 +#: ../../page.rst:617 2f3972bdd1e349cc893cec8efb4e5f68 msgid "" "PDF only: Delete the specified link from the page. The parameter must be " "an **original item** of :meth:`get_links()`, see " @@ -2371,11 +2557,11 @@ msgstr "" "PDFのみ:ページから指定したリンクを削除します。パラメータは :meth:`get_links()` " "の元のアイテムである必要があります(以下参照)。これは辞書の *「xref」* キーがPDFオブジェクトを識別するための理由です。" -#: ../../page.rst:583 8ca72d0d1c414a83bfa20d678f5fe978 +#: ../../page.rst:619 2a272359bf744f9da47b8eb957b39a0e msgid "the link to be deleted." msgstr "削除するリンクです。" -#: ../../page.rst:587 5fcfe907c8aa493b9a1d2e51367bcb73 +#: ../../page.rst:623 857df9b440cb45a293d89cdc047244b1 msgid "" "PDF only: Insert a new link on this page. The parameter must be a " "dictionary of format as provided by :meth:`get_links()`, see " @@ -2384,11 +2570,11 @@ msgstr "" "PDFのみ:このページに新しいリンクを挿入します。パラメータは :meth:`get_links()` " "で提供される形式の辞書である必要があります(以下参照)。" -#: ../../page.rst:589 8a706805f5d34b2588e1acf0109b9983 +#: ../../page.rst:625 be4800a60e324de6a5d51567284f81c8 msgid "the link to be inserted." msgstr "挿入するリンクです。" -#: ../../page.rst:593 2dae666a78cc4b9bb1e69fd473600208 +#: ../../page.rst:629 b0c4a65cee99442aaf6d3f5ebe136167 msgid "" "PDF only: Modify the specified link. The parameter must be a (modified) " "**original item** of :meth:`get_links()`, see " @@ -2398,11 +2584,11 @@ msgstr "" "PDFのみ:指定されたリンクを変更します。パラメータは :meth:`get_links()` (以下参照)の **元のアイテム** " "である必要があります(変更された場合)。これは辞書の *「xref」* キーがPDFオブジェクトを識別するための理由です。" -#: ../../page.rst:595 dbfebda4162a49448a737c566685187d +#: ../../page.rst:631 81a61a22391e4ea4a23f0688a09e7386 msgid "the link to be modified." msgstr "変更するリンクです。" -#: ../../page.rst:597 80b63eab15ab4fafa298f6360a9b245b +#: ../../page.rst:633 9220974635574c3591cf897be8fbaeb4 msgid "" "If updating / inserting a URI link (`\"kind\": LINK_URI`), please make " "sure to start the value for the `\"uri\"` key with a disambiguating " @@ -2415,23 +2601,23 @@ msgstr "" "`「http://」`、`「https://」`、`「file://」` " "、`「ftp://」`、「mailto:」などの区別可能な文字列で始めるようにしてください。そうしないと、ブラウザや他の「コンシューマ」ソフトウェアによって、予期しないデフォルトの仮定が不要な動作につながる可能性があります。" -#: ../../page.rst:602 d8ed500b950846b89ede504f16020968 +#: ../../page.rst:638 274c9d541ac74e5ea207d3f73a8dc91d msgid "PDF only: Return the label for the page." msgstr "PDFのみ:ページのラベルを返します。" -#: ../../page.rst:606 ab48cb57f0be4693a452fa2248bf0690 +#: ../../page.rst:642 33e5a11d36e1431daf1368c98a576fa2 msgid "the label string like \"vii\" for Roman numbering or \"\" if not defined." msgstr "ローマ数字の「vii」などのラベル文字列、または定義されていない場合は \"\"。" -#: ../../page.rst:610 0d10fc8f751e4456bc0bf9fac51f0894 +#: ../../page.rst:646 adaf8b7f2475449f90e8cd8ec54e039b msgid "New in v1.18.6" msgstr "v1.18.6で新規追加" -#: ../../page.rst:616 385d11e448814998b08e79f777566465 +#: ../../page.rst:652 4a923364460045d5a15187ef3fe102fc msgid "Retrieves **all** links of a page." msgstr "ページの **すべて** のリンクを取得します。" -#: ../../page.rst:619 844aaf6e610542ee91ac4d69790efc42 +#: ../../page.rst:655 bcaa9863f51a4098aceb69d06b292a29 msgid "" "A list of dictionaries. For a description of the dictionary entries, see " ":ref:`link_dict_description`. Always use this or the :meth:`Page.links` " @@ -2440,13 +2626,13 @@ msgstr "" "辞書のリスト。辞書エントリの説明については以下を参照してください。ページのリンクを変更する意図がある場合は、:meth:`Page.links` " "メソッドまたはこれを常に使用してください。" -#: ../../page.rst:623 ab6d16218af94912a9a5fdbef725bf70 +#: ../../page.rst:659 8288bcddbb8148f7bcd061593ce751e1 msgid "" "Return a generator over the page's links. The results equal the entries " "of :meth:`Page.get_links`." msgstr "ページのリンクをイテレーターとして返します。結果は :meth:`Page.get_links` のエントリと同じです。" -#: ../../page.rst:625 d9bb983beea04404b2349a7507aea7ee +#: ../../page.rst:661 90c8aff7d9e74c24931c942581bd0ae3 msgid "" "a sequence of integers to down-select to one or more link kinds. Default " "is all links. Example: *kinds=(pymupdf.LINK_GOTO,)* will only return " @@ -2455,21 +2641,21 @@ msgstr "" "1つ以上のリンク種別をダウン選択するための整数のシーケンス。デフォルトはすべてのリンクです。例:*kinds=(pymupdf.LINK_GOTO,)*" " は内部リンクのみを返します。" -#: ../../page.rst:628 0cf80e14cb834f00852de4c37c31a7f4 +#: ../../page.rst:664 41ba584d31334388b490e36defff9821 msgid "an entry of :meth:`Page.get_links()` for each iteration." msgstr "各イテレーションごとの :meth:`Page.get_links()` のエントリ。" -#: ../../page.rst:632 ../../page.rst:657 ../../page.rst:672 -#: 25bc12b0779c40c5b8dea3c947079623 362d73db0c4a48738967975dcef66c9a -#: a82cfabb597440b4815b9ae6564a5df5 +#: ../../page.rst:668 ../../page.rst:693 ../../page.rst:708 +#: 44ffeea1857d4337b00b3dc93cfdcfa4 812b6e47ac2646d48041bf20b68f8a53 +#: b282370ccf544809b0846adeb39ab92a msgid "New in v1.16.4" msgstr "v1.16.4で新規追加" -#: ../../page.rst:638 0a6f61732bad4543b1c05f9c2845dbcc +#: ../../page.rst:674 3a5b9b887ccc4b38902d0d3380b5be9d msgid "Return a generator over the page's annotations." msgstr "ページの注釈をイテレーターとして返します。" -#: ../../page.rst:640 ec3984eacebc4a4380a72922da777e25 +#: ../../page.rst:676 db4ae3ee5f9440749fabc50395b96538 msgid "" "a sequence of integers to down-select to one or more annotation types. " "Default is all annotations. Example: `types=(pymupdf.PDF_ANNOT_FREETEXT, " @@ -2479,7 +2665,7 @@ msgstr "" "1つ以上の注釈タイプをダウン選択するための整数のシーケンス。デフォルトはすべての注釈です。例:`types=(pymupdf.PDF_ANNOT_FREETEXT," " pymupdf.PDF_ANNOT_TEXT)` は「FreeText」および「Text」注釈のみを返します。" -#: ../../page.rst:643 fbf546d861894cdf9d07fef206e1300b +#: ../../page.rst:679 e6a1f7b4662f4281be60566f06ee60ec msgid "" "an :ref:`Annot` for each iteration. .. caution:: You **cannot " "safely update annotations** from within this generator. This is because " @@ -2492,11 +2678,11 @@ msgid "" " ...: page = doc.reload_page(page) In [6]:" msgstr "" -#: ../../page.rst:643 2ca9463398f9425f8a03d1e5ebad3fca +#: ../../page.rst:679 db414be5c2864845bd7d6e78f019be7a msgid "an :ref:`Annot` for each iteration." msgstr "各イテレーションごとの :ref:`Annot`。" -#: ../../page.rst:646 c919292bcf854e718dddbb994686d3fa +#: ../../page.rst:682 3133ff43da70418ba1788c56adc66272 msgid "" "You **cannot safely update annotations** from within this generator. This" " is because most annotation updates require reloading the page via `page " @@ -2506,11 +2692,11 @@ msgstr "" "このジェネレータ内から **アノテーションを安全に更新することはできません**。これは、ほとんどの注釈の更新にはpage = " "doc.reload_page(page)を介してページを再読み込みする必要があるためです。この制限を回避するために、まず注釈のxref番号のリストを作成し、その後これらの番号を繰り返し処理します::" -#: ../../page.rst:663 e37e33bc67574cc1bd67516537fb4f02 +#: ../../page.rst:699 81535550c47247989662c901596ef387 msgid "Return a generator over the page's form fields." msgstr "フォームフィールドのジェネレーターを返します。" -#: ../../page.rst:665 6f011693ea0f431182502da4dfc6a2be +#: ../../page.rst:701 d983017f69ff441e9168756305961bc3 msgid "" "a sequence of integers to down-select to one or more widget types. " "Default is all form fields. Example: " @@ -2519,53 +2705,53 @@ msgstr "" "1つ以上のウィジェットタイプに選択を絞り込むための整数のシーケンス。デフォルトではすべてのフォームフィールドが対象です。例: " "`types=(pymupdf.PDF_WIDGET_TYPE_TEXT,)` を指定すると 'Text' フィールドのみが返されます。" -#: ../../page.rst:668 e1691d5a8a5c48308035a52ea7f453a5 +#: ../../page.rst:704 4a15f48736184017ad2467c5ed864950 msgid "a :ref:`Widget` for each iteration." msgstr "各イテレーションでの :ref:`Widget`" -#: ../../page.rst:679 7b284f680edc48a4badf8b41bfbbc8a5 +#: ../../page.rst:715 26c2638924b3489bb91702fbcbbe2e7b msgid "" "PDF only: Write the text of one or more :ref:`Textwriter` objects to the " "page." msgstr "PDF のみ: 1つ以上の :ref:`Textwriter` オブジェクトのテキストをページに書き込みます。" -#: ../../page.rst:681 e36a2ec395fd4c4f907ec253fd2edddf +#: ../../page.rst:717 974bf33370534d90b49aa2ec2ca5c149 msgid "" "where to place the text. If omitted, the rectangle union of the text " "writers is used." msgstr "テキストを配置する場所。省略した場合、テキストライターの矩形の合併が使用されます。" -#: ../../page.rst:682 aa4db02ae09c4cdc9a733a637f101e4b +#: ../../page.rst:718 93fc43ed5b744ab69350cb7ad552333f msgid "" "a non-empty tuple / list of :ref:`TextWriter` objects or a single " ":ref:`TextWriter`." msgstr "1つ以上の :ref:`TextWriter` オブジェクトのタプル/リスト、または単一の :ref:`TextWriter` です。" -#: ../../page.rst:683 857e7ad194ec42c9a25ab1d7bc38f7f9 +#: ../../page.rst:719 ee380b54b2674d1e871ea8dea990e399 msgid "set transparency, overwrites resp. value in the text writers." msgstr "透明度を設定し、テキストライターの値を上書きします。" -#: ../../page.rst:684 9deeb3d2482b4ee29586cf5cffb369e5 +#: ../../page.rst:720 be65f4135d184a04893ca56113412b5f msgid "set the text color, overwrites resp. value in the text writers." msgstr "テキストの色を設定し、テキストライターの値を上書きします。" -#: ../../page.rst:685 b68654bf041f473ca01ac40594733382 +#: ../../page.rst:721 74d40e4a94e944e0889dd089382fd5cd msgid "put the text in foreground or background." msgstr "テキストを前景または背景に配置するかどうか。" -#: ../../page.rst:686 061467de091548ed87e7703893e66975 +#: ../../page.rst:722 0e248c98c8fd46cc849dcd8cbe869294 msgid "maintain the aspect ratio." msgstr "アスペクト比を保持するかどうか。" -#: ../../page.rst:687 362732b4c3864666a963074f81a6f2d6 +#: ../../page.rst:723 7c0466e3f39944cf9971d7f909291da0 msgid "rotate the text by an arbitrary angle." msgstr "テキストを任意の角度で回転します。" -#: ../../page.rst:688 1850b7a5b82844e6aa1f393eca49601d +#: ../../page.rst:724 15bd09fd399d4f8f82973b5aaa8a588d msgid "the :data:`xref` of an :data:`OCG` or :data:`OCMD`. (New in v1.18.4)" msgstr "*(v1.18.4 で新たに追加)* :data:`OCG` または :data:`OCMD` の :data:`xref`。" -#: ../../page.rst:690 93de66536c5045ccb800c737f143cd97 +#: ../../page.rst:726 e8d0a9b7e0074058a77c6636a480a8c0 msgid "" "Parameters *overlay, keep_proportion, rotate* and *oc* have the same " "meaning as in :meth:`Page.show_pdf_page`." @@ -2573,32 +2759,33 @@ msgstr "" "*overlay、keep_proportion、rotate、oc* パラメーターは :meth:`Page.show_pdf_page` " "と同じ意味を持ちます。" -#: ../../page.rst:694 9ee2f71705c543ce885808979278b362 +#: ../../page.rst:730 e81046c45a374a3d8d6033bc731a5449 msgid "New in v1.16.18" msgstr "v1.16.18 で追加された新機能です。" -#: ../../page.rst:717 2190bbd74e574ccfb6123e97bda0c5f7 +#: ../../page.rst:754 d4c8cb87f85641eab2bbdc9bfafd9e14 +#, fuzzy msgid "" -"PDF only: Insert text starting at :data:`point_like` *point*. See " -":meth:`Shape.insert_text`." +"PDF only: Insert text lines starting at :data:`point_like` ``point``. See" +" :meth:`Shape.insert_text`." msgstr "" "PDFのみ: :data:`point_like` *point* からテキストを挿入します。:meth:`Shape.insert_text` " "を参照してください。" -#: ../../page.rst:721 ../../page.rst:749 ../../page.rst:843 ../../page.rst:868 -#: ../../page.rst:893 ../../page.rst:917 ../../page.rst:941 ../../page.rst:966 -#: ../../page.rst:990 ../../page.rst:1015 ../../page.rst:1039 -#: ../../page.rst:1064 ../../page.rst:1089 0b1c4c7fd0354c8cbca1747849f7710f -#: 2a4fa709bc6849fdb227505e6742ea30 2b5fbb80198544d9b2147972b056a1e4 -#: 59f2355410664205962cb7ff63199daa 858308fb570f47aba2a6dff33b68aa21 -#: a2cf8233130c44678645a9865d6aa771 b81aea5132074a70a1b1a3745cfe4267 -#: bd981a4b9ca54f749b1dcc03665503cc c132a33f9a4e412b8c5e2dafc692e590 -#: ca4ff0d9b8a14b39904f91de84a21389 e2d3e23966bf4a239420bfb0f644a396 -#: eaff6cba15064d0cab50a6a09680d9c1 f25086b7ae70491f93d99e31119fbd00 +#: ../../page.rst:758 ../../page.rst:787 ../../page.rst:881 ../../page.rst:906 +#: ../../page.rst:931 ../../page.rst:955 ../../page.rst:979 ../../page.rst:1004 +#: ../../page.rst:1028 ../../page.rst:1053 ../../page.rst:1077 +#: ../../page.rst:1102 ../../page.rst:1127 02b5170904bd4f99af539705a7cc7977 +#: 2382959e8b234de98a12d43489b1562d 38788041f0d2408c9e231772bc8f0669 +#: 587229303e2945c883d8b563095c89e0 60e96af2414d4967a924e4bea3cfd6be +#: 6596c22282f94bb5bea1d4416ba6fad1 7758fbd5966c4ee6a58f951670cb510a +#: 7fb78df643f4460a94b58b4a62d612f1 9727b4112dfe459fb816f36ad2176a3d +#: a161493d6c33490597f55ed7743ab9f4 af6fca8ec2db4c2ba79d0123bda84c11 +#: c88d570c43a146efafa45f5f0d3389b5 cd339ccd076840298b9e8e4730627be5 msgid "Changed in v1.18.4" msgstr "v1.18.4 で変更" -#: ../../page.rst:745 7748b328797c49ba9411333c9039d7c8 +#: ../../page.rst:783 e3908054229940c584c7373a709a6f6b msgid "" "PDF only: Insert text into the specified :data:`rect_like` *rect*. See " ":meth:`Shape.insert_textbox`." @@ -2606,7 +2793,7 @@ msgstr "" "PDF のみ:指定された :data:`rect_like` の *rect* " "にテキストを挿入します。:meth:`Shape.insert_textbox` を参照してください。" -#: ../../page.rst:767 21cb6c932d0d4b79aff034a033e57e3e +#: ../../page.rst:805 c30fb417aeb04df7a977911e10637750 msgid "" "**PDF only:** Insert text into the specified rectangle. The method has " "similarities with methods :meth:`Page.insert_textbox` and " @@ -2617,10 +2804,11 @@ msgstr "" ":meth:`TextWriter.fill_textbox` メソッドと類似していますが、はるかに強力です。これは、:ref:`Story` " "(ストーリー) オブジェクトに必要なすべての処理を行わせることで実現されます。" -#: ../../page.rst:769 eb55aed017d44eaf9cc0bf67df3460d6 +#: ../../page.rst:807 bb4e8495727141ab9cfb0d798e5501ce +#, fuzzy msgid "" -"Parameter `text` may be a string as in the other methods. But it will be " -"**interpreted as HTML source** and may therefore also contain HTML " +"Parameter ``text`` may be a string as in the other methods. But it will " +"be **interpreted as HTML source** and may therefore also contain HTML " "language elements -- including styling. The `css` parameter may be used " "to pass in additional styling instructions." msgstr "" @@ -2628,12 +2816,13 @@ msgstr "" "として解釈され、そのためスタイリングを含むHTML言語要素も含まれる可能性があります。`css` " "パラメータを使用して追加のスタイリング指示を渡すことができます。" -#: ../../page.rst:771 adda56309e134aa9b88733536922635c +#: ../../page.rst:809 93b1b192c795409a90b4f05d6832351d +#, fuzzy msgid "" "Automatic line breaks are generated at word boundaries. The \"soft " "hyphen\" character `\"­\"` (or `­`) can be used to cause " "hyphenation and thus may also cause line breaks. **Forced** line breaks " -"however are only achievable via the HTML tag `
` - `\"\\\\n\"` is " +"however are only achievable via the HTML tag ``
`` - ``\\n`` is " "ignored and will be treated like a space." msgstr "" "自動的な改行は単語の境界で生成されます。 \"soft hyphen\" 文字 `\"­\"`(または `­` " @@ -2641,23 +2830,23 @@ msgstr "" "`\"\\\\n\"` を使用してのみ実現可能であり、\"\n" "\"は無視され、空白と同じように扱われます。" -#: ../../page.rst:773 256abde2ae4f4d9aad0b4b4972322e19 +#: ../../page.rst:811 2f03392514de47e0a2ee5d0014e9abea msgid "With this method the following can be achieved:" msgstr "このメソッドでは、次のことが可能です。" -#: ../../page.rst:775 ed48c9f599d344fe98e3b74ae8ff5329 +#: ../../page.rst:813 5484dcc58f144b8e82ec5eea5dd1a10d msgid "" "Styling effects like bold, italic, text color, text alignment, font size " "or font switching." msgstr "太字、斜体、テキストの色、テキストの配置、フォントサイズ、またはフォントの切り替えなどのスタイル効果" -#: ../../page.rst:776 0c187a97b9a846009593c54bf6656234 +#: ../../page.rst:814 91d0a8e0b994498e918cdf6a5d95c1d8 msgid "" "The text may include arbitrary languages -- **including right-to-left** " "languages." msgstr "テキストには、**右から左に書かれる言語を含む** 任意の言語を含めることができます。" -#: ../../page.rst:777 12dfc398a8194b6cb6cc9d11965a0e7b +#: ../../page.rst:815 baa66079b30f45f498e70324c07db8f4 msgid "" "Scripts like `Devanagari `_ and" " several others in Asia have a highly complex system of ligatures, where " @@ -2669,7 +2858,7 @@ msgstr "" "やその他のアジアの文字など、2つ以上のUnicodeが一つのグリフに変換される複雑なリガチャーのあるスクリプトは、正しい出力を生成するためにソフトウェアパッケージ" " `HarfBuzz `_ を使用しています。" -#: ../../page.rst:778 4d29b141fda847298b3028a151b74325 +#: ../../page.rst:816 a767e7dd38ea48ac93aa4a0c8fd7d71f msgid "" "One can also **include images** via HTML tag `` -- the Story will " "take care of the appropriate layout. This is an alternative option to " @@ -2679,35 +2868,35 @@ msgstr "" "を介して含めることができ、Storyが適切なレイアウトを担当します。これは、:meth:`Page.insert_image` " "と比較した画像の挿入の代替オプションです。" -#: ../../page.rst:779 9969ef30facc4aeca2c486159317e55b +#: ../../page.rst:817 94bedd3247f04a0cbb73c85d6c4b9f62 msgid "" "HTML tables (tag ``) may be included in the text and will be " "handled appropriately." msgstr "HTMLテーブル( `
` タグ)をテキストに含めることができ、適切に処理されます。" -#: ../../page.rst:780 3d51eaac2dd245a8ba59d8024a2944e9 +#: ../../page.rst:818 415030cfa2404e04925401570d22f543 msgid "Links are automatically generated when present." msgstr "リンクが存在する場合、自動的にリンクが生成されます。" -#: ../../page.rst:782 9ab0dce9c6a041c89d9cb9c732fef774 +#: ../../page.rst:820 e5157602b09b4c1f8e3f129d0e0b0659 msgid "If content does not fit in the rectangle, the developer has two choices:" msgstr "もしコンテンツが長方形に収まらない場合、開発者には2つの選択肢があります。:" -#: ../../page.rst:784 d4ca9790ce04401ba9697c77bfed7f6a +#: ../../page.rst:822 e61c9426a0894088b5bc0cbafba02e1d msgid "" "**either** only be informed about this (and accept a no-op, just like " "with the other textbox insertion methods)," msgstr "**それとも** 、このことについての情報のみを受け取り(他のテキストボックスの挿入メソッドと同様に、何も起こらないことを受け入れる)、" -#: ../../page.rst:785 facad422b9bc4dfb807a521e5a4863bc +#: ../../page.rst:823 63173984caf042f0a5454b1b1bc0b0d4 msgid "**or** (`scale_low=0` - the default) scale down the content until it fits." msgstr "**または** ( `scale_low=0` - デフォルト)コンテンツを収まるまで縮小します。" -#: ../../page.rst:787 1de90948d21e48d8a3c607f69781b150 +#: ../../page.rst:825 4df5a5c7e930453c8f146bdf455fa600 msgid "rectangle on page to receive the text." msgstr "テキストを配置する長方形の領域。" -#: ../../page.rst:788 b8fde4ca1a5d4053a7f4e7ffdcb40bf3 +#: ../../page.rst:826 a0eaa447bb284b3bb74c0405422c1b7b msgid "" "the text to be written. Can contain a mixture of plain text and HTML tags" " with styling instructions. Alternatively, a :ref:`Story` object may be " @@ -2718,13 +2907,14 @@ msgstr "" "書き込むテキスト。スタイル指示を含むプレーンテキストとHTMLタグの混合物であることができます。代替として、 " ":ref:`Story`(ストーリー)オブジェクトを指定することもできます(その場合、内部のストーリー生成ステップは省略されます)。必要なすべてのスタイリングとアーカイブ情報で生成されたストーリーを指定する必要があります。" -#: ../../page.rst:789 b94fc0430d714a94a6ea1f9e42f846c5 +#: ../../page.rst:827 8cb5eb993afe44c193c4ea151350084e +#, fuzzy msgid "" "optional string containing additional CSS instructions. This parameter is" -" ignored if `text` is a Story." +" ignored if ``text`` is a Story." msgstr "(オプション)追加のCSS指示を含む文字列。`text` がストーリーの場合、このパラメータは無視されます。" -#: ../../page.rst:790 9bc298458a1f407899619cb9eb2b31c3 +#: ../../page.rst:828 3fdf4a9d48d9448ca4f7f01dafc41a5b msgid "" "if necessary, scale down the content until it fits in the target " "rectangle. This sets the down scaling limit. Default is 0, no limit. A " @@ -2732,14 +2922,15 @@ msgid "" "maximum down-scaling by 80%." msgstr "コンテンツがターゲットの長方形に収まるまで必要に応じてコンテンツのスケーリングを行います。これはダウンスケーリングの制限を設定します。デフォルトは0で、制限なしを意味します。値が1の場合、ダウンスケーリングは許可されません。たとえば、0.2の値は、最大で80%のダウンスケーリングを意味します。" -#: ../../page.rst:791 ce1538f60f72473bba8f98af80349660 +#: ../../page.rst:829 08878f73b4174dfaafca50ea0da0b6c9 +#, fuzzy msgid "" "an Archive object that points to locations where to find images or non-" -"standard fonts. If `text` refers to images or non-standard fonts, this " -"parameter is required. This parameter is ignored if `text` is a Story." +"standard fonts. If ``text`` refers to images or non-standard fonts, this " +"parameter is required. This parameter is ignored if ``text`` is a Story." msgstr "画像や非標準のフォントの場所を指すアーカイブオブジェクト。テキストが画像や非標準のフォントを参照する場合、このパラメータが必要です。テキストがストーリーの場合、このパラメータは無視されます" -#: ../../page.rst:792 9962e1b371414d49a7c5acf199378313 +#: ../../page.rst:830 817624538d3c491f95c29bcef7a16924 msgid "" "one of the values 0, 90, 180, 270. Depending on this, text will be " "filled: - 0: top-left to bottom-right. - 90: bottom-left to top-right. -" @@ -2747,27 +2938,27 @@ msgid "" "image:: images/img-rotate.*" msgstr "" -#: ../../page.rst:792 14c3a73cf9aa4373abc9a033b7597c51 +#: ../../page.rst:830 2a02180f07cd4166829b23a8b91ee8c6 msgid "one of the values 0, 90, 180, 270. Depending on this, text will be filled:" msgstr "0、90、180、270のいずれかの値。これに応じて、テキストが埋められます:" -#: ../../page.rst:794 0a8654ddd9594099a2f52909511e39f7 +#: ../../page.rst:832 6836108ad3ce4073b7b8b9a0517e2499 msgid "0: top-left to bottom-right." msgstr "0:左上から右下に。" -#: ../../page.rst:795 91558a0780e849bfb10f3046dfbf8107 +#: ../../page.rst:833 984d5a497dbd492bb070b930b10461be msgid "90: bottom-left to top-right." msgstr "90:左下から右上に。" -#: ../../page.rst:796 53cc3249217f4aaa87e7f523bec62460 +#: ../../page.rst:834 5fd909dd82a64971b5cd264cfa5ab103 msgid "180: bottom-right to top-left." msgstr "180:右下から左上に。" -#: ../../page.rst:797 d0332a2f3c374c738e6794589ca2227f +#: ../../page.rst:835 a991085aac294108a79a9f98653aaa00 msgid "270: top-right to bottom-left." msgstr "270:右上から左下に。" -#: ../../page.rst:801 6a806d58b7544c25a0075571367cc96a +#: ../../page.rst:839 0f04094ba74e4bbe861fbafc64ff4094 msgid "" "the xref of an :data:`OCG` / :data:`OCMD` or 0. Please refer to " ":meth:`Page.show_pdf_page` for details." @@ -2775,19 +2966,19 @@ msgstr "" ":data:`OCG` (オプションコンテンツグループ)/ :data:`OCMD` " "(オプションコンテンツメタデータ)のxrefまたは0。詳細については、 :meth:`Page.show_pdf_page` を参照してください。" -#: ../../page.rst:802 9cdd7e3c296040b098a85d91f72d0335 +#: ../../page.rst:840 7b3f847efe234a29a685509d8ca8766d msgid "" "set the fill and stroke opacity of the content. Only values `0 <= opacity" " < 1` are considered." msgstr "コンテンツの塗りつぶしとストロークの不透明度を設定します。`0 <= opacity < 1` の値のみ考慮されます。" -#: ../../page.rst:803 71ad7f71c4134a3c92409cffbb1390cf +#: ../../page.rst:841 18709a93160c4ea487ef9808bed3654c msgid "" "put the text in front of other content. Please refer to " ":meth:`Page.show_pdf_page` for details." msgstr "テキストを他のコンテンツの前に配置します。詳細については、:meth:`Page.show_pdf_page` を参照してください。" -#: ../../page.rst:805 24579e9bd6de48f1ad5a18f5510000f7 +#: ../../page.rst:843 faaa1b9450d74141b35b9b28f6a0e7ff #, fuzzy msgid "" "A tuple of floats `(spare_height, scale)`. - `spare_height`: -1 if " @@ -2799,11 +2990,11 @@ msgstr "" "`spare_height`: " "コンテンツが収まらなかった場合は-1、そうでない場合は0以上の値です。未使用の(まだ利用可能な)長方形のストライプの高さです。スケール=1の場合にのみ正の値です(ダウンスケーリングが行われなかった場合)。" -#: ../../page.rst:805 a285be894f62405ab8703aa86fcd7524 +#: ../../page.rst:843 c050301d92744179b84a38c265b4c1de msgid "A tuple of floats `(spare_height, scale)`." msgstr "浮動小数点数のタプル `(spare_height, scale)` です。" -#: ../../page.rst:807 17b689145fcc4014b2d505de696f6781 +#: ../../page.rst:845 e47eab27231b4543bd2bad39b1400984 msgid "" "`spare_height`: -1 if content did not fit, else >= 0. It is the height of" " the unused (still available) rectangle stripe. Positive only if scale = " @@ -2812,31 +3003,31 @@ msgstr "" "`spare_height`: " "コンテンツが収まらなかった場合は-1、そうでない場合は0以上の値です。未使用の(まだ利用可能な)長方形のストライプの高さです。スケール=1の場合にのみ正の値です(ダウンスケーリングが行われなかった場合)。" -#: ../../page.rst:808 e0ee581f16444f84ab02f22301ea9d47 +#: ../../page.rst:846 875cd22f27c741b48dd4f9d41bf971a5 msgid "`scale`: down-scaling factor, 0 < scale <= 1." msgstr "`scale`: ダウンスケーリングファクター、0 < scale <= 1。" -#: ../../page.rst:810 661a18447caf4effbbf3cbb66603427b +#: ../../page.rst:848 4ae5ded90acb4f78b78dd292c72a143f msgid "" "Please refer to examples in this section of the recipes: " ":ref:`RecipesText_I_c`." msgstr "このレシピの例を参照してください::ref:`RecipesText_I_c`。" -#: ../../page.rst:814 cb108fdd87c541feb3d7babff7336420 +#: ../../page.rst:852 d17a3f3e796841268773690bae0e39f9 #, fuzzy msgid "New in v1.23.8; rebased-only." msgstr "v1.21.0で新たに追加" -#: ../../page.rst:815 46006f4c830d4d16a599ec8f3e90082c +#: ../../page.rst:853 ffde9008418e4e76863d02fb93d02a03 #, fuzzy msgid "New in v1.23.9: `opacity` parameter." msgstr "v1.19.1で変更:`sort` パラメータを追加" -#: ../../page.rst:820 a4a33fbedc0b48aa9f4768e6d4e5f017 +#: ../../page.rst:858 515a9d34c4e446dd899ffe8b847acb86 msgid "**Drawing Methods**" msgstr "**描画メソッド**" -#: ../../page.rst:839 40010a0e900a4763811b3dd6d2846548 +#: ../../page.rst:877 00308694f18d429ab832ff44993c3aaa msgid "" "PDF only: Draw a line from *p1* to *p2* (:data:`point_like` \\s). See " ":meth:`Shape.draw_line`." @@ -2844,7 +3035,7 @@ msgstr "" "PDF のみ:*p1* から *p2* までの直線を描画します(:data:`point_like` " "\\s)。:meth:`Shape.draw_line` を参照してください。" -#: ../../page.rst:864 1ef92af231be4d70857c9f6e5ea76b65 +#: ../../page.rst:902 313470ae51b740abab720b39136d455c msgid "" "PDF only: Draw a zigzag line from *p1* to *p2* (:data:`point_like` \\s). " "See :meth:`Shape.draw_zigzag`." @@ -2852,7 +3043,7 @@ msgstr "" "PDF のみ:p1 から p2 までのジグザグ線を描画します(:data:`point_like` " "\\s)。:meth:`Shape.draw_zigzag` を参照してください。" -#: ../../page.rst:889 71caac0f111e409c9ab99298eb4cf51b +#: ../../page.rst:927 1112b73c66364a4785f9e683e7573cc4 msgid "" "PDF only: Draw a squiggly (wavy, undulated) line from *p1* to *p2* " "(:data:`point_like` \\s). See :meth:`Shape.draw_squiggle`." @@ -2860,7 +3051,7 @@ msgstr "" "PDF のみ:*p1* から *p2* までの波線(うねり)を描画します(:data:`point_like` " "\\s)。:meth:`Shape.draw_squiggle` を参照してください。" -#: ../../page.rst:913 d2d9a9dd971146698175b01e30efb0fd +#: ../../page.rst:951 7b183b3297614735bc814d96cbfd97dd msgid "" "PDF only: Draw a circle around *center* (:data:`point_like`) with a " "radius of *radius*. See :meth:`Shape.draw_circle`." @@ -2868,7 +3059,7 @@ msgstr "" "PDF のみ:*center* を中心に、半径 *radius* の円を描画します " ":data:`point_like`。:meth:`Shape.draw_circle` を参照してください。" -#: ../../page.rst:937 2fc169694fb748dbb2ed4514806c08a7 +#: ../../page.rst:975 7301c671e109481f9e83a7d776b4a2fe msgid "" "PDF only: Draw an oval (ellipse) within the given :data:`rect_like` or " ":data:`quad_like`. See :meth:`Shape.draw_oval`." @@ -2876,7 +3067,7 @@ msgstr "" "PDF のみ:指定された :data:`rect_like` または :data:`quad_like` " "内に楕円を描画します。:meth:`Shape.draw_oval` を参照してください。" -#: ../../page.rst:962 13c4c677a03b4b0fbb4dffb3b8d470c9 +#: ../../page.rst:1000 990577977c784ba4af997f9ef7c622b6 msgid "" "PDF only: Draw a circular sector, optionally connecting the arc to the " "circle's center (like a piece of pie). See :meth:`Shape.draw_sector`." @@ -2885,7 +3076,7 @@ msgstr "" "円形セクターを描画し、オプションで円の中心とアークを接続します(パイの一部のように)。:meth:`Shape.draw_sector` " "を参照してください。" -#: ../../page.rst:986 a94bc167f8364386b7d999f83e72f075 +#: ../../page.rst:1024 36c61ce67c594c72a371b51e7000e291 msgid "" "PDF only: Draw several connected lines defined by a sequence of " ":data:`point_like` \\s. See :meth:`Shape.draw_polyline`." @@ -2893,7 +3084,7 @@ msgstr "" "PDFのみ: 一連の :data:`point_like` \\s " "ポイントによって定義された接続された複数のラインを描画します。:meth:`Shape.draw_polyline` を参照してください。" -#: ../../page.rst:1011 cfe2189a59ca4e0689cce4629cb363d5 +#: ../../page.rst:1049 ac003f4e9849470697d81c2fa366b1ba msgid "" "PDF only: Draw a cubic Bézier curve from *p1* to *p4* with the control " "points *p2* and *p3* (all are :data:`point_like` \\s). See " @@ -2903,25 +3094,25 @@ msgstr "" "へのキュービックベジエ曲線を描画します(すべてのポイントは :data:`point_like` " "です)。:meth:`Shape.draw_bezier` を参照してください。" -#: ../../page.rst:1035 c77dab73dbca43bfa8ca134ee330f7d1 +#: ../../page.rst:1073 d35edd81ecc442bea63861bbd25eafc9 msgid "" "PDF only: This is a special case of *draw_bezier()*. See " ":meth:`Shape.draw_curve`." msgstr "PDFのみ: これは *draw_bezier()* の特別なケースです。:meth:`Shape.draw_curve` を参照してください。" -#: ../../page.rst:1060 626f0def85c64b47aed0fd47da9e958b +#: ../../page.rst:1098 50418bf7a8534364808a1707e4fe246c msgid "PDF only: Draw a rectangle. See :meth:`Shape.draw_rect`." msgstr "PDFのみ: 四角形を描画します。:meth:`Shape.draw_rect` を参照してください。" -#: ../../page.rst:1065 b43d9fc0c53c49b385c6ba02056458f9 +#: ../../page.rst:1103 eddedc6605ce49809c24d097d2984e2e msgid "Changed in v1.22.0: Added parameter *radius*." msgstr "v1.22.0で変更:パラメーター *radius* を追加しました。" -#: ../../page.rst:1085 29930ad35399427ca2dea764ab5488b2 +#: ../../page.rst:1123 43942d3402274a1eb4c1be77c9fd2cd1 msgid "PDF only: Draw a quadrilateral. See :meth:`Shape.draw_quad`." msgstr "PDFのみ: 四辺形を描画します。:meth:`Shape.draw_quad` を参照してください。" -#: ../../page.rst:1103 70937bde8aa043929be6734dc045d87a +#: ../../page.rst:1141 b2be2fc678494eb39221ea6ff303b6ff msgid "" "PDF only: Add a new font to be used by text output methods and return its" " :data:`xref`. If not already present in the file, the font definition " @@ -2934,7 +3125,7 @@ msgstr "" "フォントがサポートされており、**「予約済み」** " "フォント名を介して使用できます。フォントはファイルパスまたはフォントファイルのイメージを含むメモリ領域として提供することもできます。" -#: ../../page.rst:1105 9c9db68621d246b483a07fc07fbf1bec +#: ../../page.rst:1143 cfdb8edc193d4e79b647f0ac2a0ec79b msgid "" "The name by which this font shall be referenced when outputting text on " "this page. In general, you have a \"free\" choice here (but consult the " @@ -2952,7 +3143,7 @@ msgid "" "on a page." msgstr "" -#: ../../page.rst:1105 47346318501040edb38b514bdfc7a70a +#: ../../page.rst:1143 5049de50208e4d3da2195ba71d574ec8 msgid "" "The name by which this font shall be referenced when outputting text on " "this page. In general, you have a \"free\" choice here (but consult the " @@ -2965,13 +3156,13 @@ msgstr "" "一般的に、ここで「自由な」選択ができます(ただし、:ref:`AdobeManual`、ページ16、セクション7.3.5を参照して正当なPDF名の形式的な説明を確認してください)。ただし、:data:`Base14_Fonts`" " またはCJKフォントのいずれかと一致する場合、*fontfile* および *fontbuffer* は **無視されます。**" -#: ../../page.rst:1107 1d3a4045e680447b8ded968ea9bc4d59 +#: ../../page.rst:1145 13a924ba4f604a85a377adfd67e0e0cb msgid "" "In other words, you cannot insert a font via *fontfile* / *fontbuffer* " "and also give it a reserved *fontname*." msgstr "言い換えれば、フォントを *fontfile* / *fontbuffer* 経由で挿入し、予約されたフォント名も指定することはできません。" -#: ../../page.rst:1109 8176c34ecf954f0fa283655a2eea2c68 +#: ../../page.rst:1147 b250be401d6345a88456aad2bb719047 msgid "" "A reserved fontname can be specified in any mixture of upper or lower " "case and still match the right built-in font definition: fontnames " @@ -2985,13 +3176,13 @@ msgstr "" " **異なる参照** です。同じフォントの異なる *エンコーディング* " "バリアント(ラテン、ギリシャ、キリル文字など)をページ上で使用する場合、この事実を利用できます。" -#: ../../page.rst:1111 c7d196ad90ea482abb6b97580eadc50e +#: ../../page.rst:1149 568a3f9bcac44e76a9cae4c1619c4e19 msgid "" "a path to a font file. If used, *fontname* must be **different from all " "reserved names**." msgstr "フォントファイルへのパス。使用する場合、*fontname* は **すべての予約済みの名前と異なる必要があります**。" -#: ../../page.rst:1113 ecb2815dc6b747e7bd6b4bf8127f7704 +#: ../../page.rst:1151 ef58482888ff4fe88e1ef7e765450281 msgid "" "the memory image of a font file. If used, *fontname* must be **different " "from all reserved names**. This parameter would typically be used with " @@ -3001,7 +3192,7 @@ msgstr "" "必要があります。通常、このパラメーターは :attr:`Font.buffer` を介してサポート/利用可能な :ref:`Font` " "に使用されます。" -#: ../../page.rst:1115 ce7c7ab5b847428282069ef74b34dce9 +#: ../../page.rst:1153 6f5b3ae5c3a04c8496327fa8bc226a29 msgid "" "applicable for *fontfile* / *fontbuffer* cases only: enforce treatment as" " a \"simple\" font, i.e. one that only uses character codes up to 255." @@ -3009,7 +3200,7 @@ msgstr "" "*fontfile* / *fontbuffer* " "ケースにのみ適用可能:「シンプル」フォントとしての扱いを強制します。つまり、文字コードが255までしか使用しないフォントです。" -#: ../../page.rst:1117 d24575e596164846af234b0bdd0352e3 +#: ../../page.rst:1155 72755b828156477f800416c6306a1868 msgid "" "applicable for the \"Helvetica\", \"Courier\" and \"Times\" sets of " ":data:`Base14_Fonts` only. Select one of the available encodings Latin " @@ -3020,21 +3211,21 @@ msgstr "" "の「Helvetica」、「Courier」、「Times」セットにのみ適用可能。利用可能なエンコーディングのうち、ラテン(0)、キリル文字(2)、ギリシャ文字(1)のいずれかを選択します。「Symbol」と「ZapfDingBats」についてはデフォルト(0" " = ラテン)のみを使用してください。" -#: ../../page.rst 37ea2d78e75c4179b5c14271e85c5773 +#: ../../page.rst e88ec146e85641d885204a685c8289b0 msgid "rytpe" msgstr "" -#: ../../page.rst:1119 ../../page.rst:2111 ../../page.rst:2195 -#: 0742fe88884e45f39852c98b5ea8a32d 152f663924734f3fb5cc2ae90055b0a0 -#: f2417f5fb90548b5a8f117a83b585b3e +#: ../../page.rst:1157 ../../page.rst:2159 ../../page.rst:2243 +#: c33017a3f3ef496abb089682dc46c8c7 d7fed09e66ce41c29c43a88139d00fe7 +#: daffa429e0e64da79dd4902e22bed9bf msgid "int" msgstr "" -#: ../../page.rst:1120 97184f94cccc45baa8c45499d2a143a6 +#: ../../page.rst:1158 ed9b6c755819438a8077d348aeb84a27 msgid "the :data:`xref` of the installed font." msgstr "インストールされたフォントの :data:`xref`。" -#: ../../page.rst:1122 ab39dbfe2e654c758525d45e158c4fe3 +#: ../../page.rst:1160 5e42f6c62077464880eed293b24cc14f msgid "" "Built-in fonts will not lead to the inclusion of a font file. So the " "resulting PDF file will remain small. However, your PDF viewer software " @@ -3049,291 +3240,291 @@ msgstr "" "**があります**。これは特にCJKフォントに関して当てはまります。しかし、シンボルとZapfDingbatsも一部のケースで正しく扱われていないことがあります。以下は" " **Font Names** とそれに対応するインストールされた **Base Font** 名です:" -#: ../../page.rst:1124 40efa094c87c4144b09eacabcc00b7f4 +#: ../../page.rst:1162 9cb4875349f94ae19902b56255fc8c2b msgid "**Base-14 Fonts** [#f1]_" msgstr "**ベース14フォント** [1]" -#: ../../page.rst:1127 ../../page.rst:1148 8487aac34c244fc1bd8168db5411890a -#: 9cf7396cd837481792261a9f51595dbf +#: ../../page.rst:1165 ../../page.rst:1186 6720738e43554c81802da4c830a8ccba +#: 6986e89385d149fab8542671dd128e8e msgid "**Font Name**" msgstr "**フォント名**" -#: ../../page.rst:1127 ../../page.rst:1148 58795018da8248a9ab6174293640b658 -#: 7434b988c29b4dddb9f5cf22105b5dd7 +#: ../../page.rst:1165 ../../page.rst:1186 7ac09aaf74a14575b0421131235693f6 +#: d0b80be471b14be0bf35b519683057e1 msgid "**Installed Base Font**" msgstr "**インストールされたベースフォント**" -#: ../../page.rst:1127 ../../page.rst:1148 8064c4fc29b64ecb81e34808ffc7baec -#: fcacf170ac924df9905a96f4af99d054 +#: ../../page.rst:1165 ../../page.rst:1186 87418bfc0da8498488e9e16594122c42 +#: f9ae52653e654f8c9eb0457bf5e47eec msgid "**Comments**" msgstr "**コメント**" -#: ../../page.rst:1129 7448ab7b873a424aaef39c65388eb523 +#: ../../page.rst:1167 022eb19bdd79464b8c4ee99162cfe972 msgid "helv" msgstr "" -#: ../../page.rst:1129 12fa6319a0704c18bf2239018c513196 +#: ../../page.rst:1167 95d6a47466e34411b8e7c0318f132d67 msgid "Helvetica" msgstr "" -#: ../../page.rst:1129 ../../page.rst:1133 ../../page.rst:1137 -#: 3df0234d7b654ada92f9dd3f68556ed8 8babf3f6fee746e087f0c868f9e2d18e -#: bfe71bef533344068775d693be7ec10b +#: ../../page.rst:1167 ../../page.rst:1171 ../../page.rst:1175 +#: 77b1eed45e4344548d6ed7a4d83efd25 8c18d52fa34a4e69b8c9b8ad7c09f59c +#: eef309a4692d4e30ab53bb45615bd29e msgid "normal" msgstr "通常" -#: ../../page.rst:1130 d40eaf1908d54b699ae6c8c018ffaf21 +#: ../../page.rst:1168 788497094287463b8bf205ae8593bc5e msgid "heit" msgstr "" -#: ../../page.rst:1130 5e27c2e4eae746a8b96f648afcaaf5ec +#: ../../page.rst:1168 5eb371ec11504129849683da9800b08c msgid "Helvetica-Oblique" msgstr "" -#: ../../page.rst:1130 ../../page.rst:1134 ../../page.rst:1138 -#: 52ebd81d476c4e4aa3b9af4f3d490b41 5bc6c4218d3248839de47870d4f584b5 -#: cc86865038fa41a8b8745625d9849c46 +#: ../../page.rst:1168 ../../page.rst:1172 ../../page.rst:1176 +#: 3f7703efc3dd4a5bb43dbf83b457a891 c8a1d7a9a1ad4e7fb60af5db5a01933c +#: d86eead4ac5142f89b8f87f459b10017 msgid "italic" msgstr "斜体" -#: ../../page.rst:1131 0ae660d72f5d4785b188e575aec08558 +#: ../../page.rst:1169 3f2281dfdcbd4def87c210af896d596c msgid "hebo" msgstr "" -#: ../../page.rst:1131 cbad3872d2cd4eb8855e0ae9ec2dda1c +#: ../../page.rst:1169 1c4affb6221b4633a98102229d45dee1 msgid "Helvetica-Bold" msgstr "" -#: ../../page.rst:1131 ../../page.rst:1135 ../../page.rst:1139 -#: 493a6c6a2d5148b389443f1978ae5da7 fa5821de59d1445a9e77264c96e335cc -#: fb1bddbd54a14dfca3dfd48a5a6c27d5 +#: ../../page.rst:1169 ../../page.rst:1173 ../../page.rst:1177 +#: 5682d76ea070418d925dbb57f9311ed4 66350aec58d349d09fea687d1c8831c7 +#: be9d473ebffa49e18b13cef0390b9b56 msgid "bold" msgstr "太字" -#: ../../page.rst:1132 b83d8f242bef4832948a9509542feaed +#: ../../page.rst:1170 655ca753669644f8837390cefe236f53 msgid "hebi" msgstr "" -#: ../../page.rst:1132 6984046854464c428fa6c25daa993cb2 +#: ../../page.rst:1170 25bd0ccd507e464d986b308435fb6056 msgid "Helvetica-BoldOblique" msgstr "" -#: ../../page.rst:1132 ../../page.rst:1136 ../../page.rst:1140 -#: 733577611bf54989a34f3dd87ef86275 c3ec2465b6cb4be5955d84aa40fb8632 -#: d757b0c4cebf46f1a177f63a4f938eda +#: ../../page.rst:1170 ../../page.rst:1174 ../../page.rst:1178 +#: 489765fd2ce3405e9aab42f0865104c4 58f0b1985d0a4d8cb13f811671963069 +#: f5aaea9a8b7543be87809b928ad50444 msgid "bold-italic" msgstr "太字斜体" -#: ../../page.rst:1133 91f5177f5f414246980c0f719ab8e9da +#: ../../page.rst:1171 3247fbf800ed4b368627ec2084f18d83 msgid "cour" msgstr "" -#: ../../page.rst:1133 640c7f1ef42342c39572b7878dcb556f +#: ../../page.rst:1171 73dafba6e80d4eb1b9cd1baa1bc639ca msgid "Courier" msgstr "" -#: ../../page.rst:1134 d52f1b529b0d40a4892d4c7e7eded38b +#: ../../page.rst:1172 d1a33abc313a4af3928a859637112332 msgid "coit" msgstr "" -#: ../../page.rst:1134 b584583ec96746b78019b82a64a799c0 +#: ../../page.rst:1172 17dbed1e903444f8b57f0f762513ba1b msgid "Courier-Oblique" msgstr "" -#: ../../page.rst:1135 b30b4866f8794e8e9de1ab6f12b84746 +#: ../../page.rst:1173 a9ab6dbba72d4f65939a2be0cd531ae4 msgid "cobo" msgstr "" -#: ../../page.rst:1135 3cd53fbc106f4498a90899f6a84b7044 +#: ../../page.rst:1173 550ffcaf485a441986728a3f7f36f2b0 msgid "Courier-Bold" msgstr "" -#: ../../page.rst:1136 d362ddf1a37441f3835a819ac8899a45 +#: ../../page.rst:1174 504c1eb964ea429f989c8cbc2c49a302 msgid "cobi" msgstr "" -#: ../../page.rst:1136 8bf351d9168f4f9bb08950afd3a741e6 +#: ../../page.rst:1174 d86aa6bbd7094294ab03f6d7776224f0 msgid "Courier-BoldOblique" msgstr "" -#: ../../page.rst:1137 b81bf8d6298f41a480c8c00623ca60a9 +#: ../../page.rst:1175 bd3b8dd000cf4b218b432ecbc50fce6c msgid "tiro" msgstr "" -#: ../../page.rst:1137 766c55dcbe074a90bce4a6f58801fbbe +#: ../../page.rst:1175 61ba13e1089748c2985086325c9f2c6a msgid "Times-Roman" msgstr "" -#: ../../page.rst:1138 d7b10a6f16084ad380aaf865fd5994b9 +#: ../../page.rst:1176 cbb2cbb175454c499374b756f177832e msgid "tiit" msgstr "" -#: ../../page.rst:1138 7e4d18bced93463ea60346a382f2184b +#: ../../page.rst:1176 e5ae54bf41a847848d5528bd554f0e86 msgid "Times-Italic" msgstr "" -#: ../../page.rst:1139 43a56246bc7847debcc9b9a2fb40f246 +#: ../../page.rst:1177 76bd9fbfa2ca4d61bf8b209db352dde5 msgid "tibo" msgstr "" -#: ../../page.rst:1139 c0f7b935beef4eb9802d6dc38213dd2b +#: ../../page.rst:1177 177eab996c8547119fb98e7cc7ebdc2b msgid "Times-Bold" msgstr "" -#: ../../page.rst:1140 91a71570e2f34f77a1e713e08842fa9e +#: ../../page.rst:1178 7905b1fce0b54bf9863fa59974eabd59 msgid "tibi" msgstr "" -#: ../../page.rst:1140 0303f9dc8f48436485c1dbd1991b0e40 +#: ../../page.rst:1178 8cf39f48d994451e8981e0c4de6cceac msgid "Times-BoldItalic" msgstr "" -#: ../../page.rst:1141 4f75026119c245a783fd218972fb2ecd +#: ../../page.rst:1179 30549b9f54c04294848e2d39d2f719b6 msgid "symb" msgstr "" -#: ../../page.rst:1141 b20c297c52394352ad6290ce5caf7a35 +#: ../../page.rst:1179 e856ae196edb492a995df1c00314ddac msgid "Symbol" msgstr "" -#: ../../page.rst:1141 ../../page.rst:1142 9c2a4e6dbdb54c25bd0076bf8e1d56a7 -#: d1a0b733a6c643c5ae624b4375f49821 +#: ../../page.rst:1179 ../../page.rst:1180 d554ad306b7a44c4bd6be1c6fecf3c66 +#: dd6656eb6a614699b287d81e85634cec msgid "[#f3]_" msgstr "" -#: ../../page.rst:1142 0af0d89c3f1548c5a8e52bd99a8d5909 +#: ../../page.rst:1180 ba39d723a5b14152b295b99792b0d9a9 msgid "zadb" msgstr "" -#: ../../page.rst:1142 561b5babdc0041d4bce0fb0837a15b50 +#: ../../page.rst:1180 844f3371b4874c3eacb106acdcfaaa3a msgid "ZapfDingbats" msgstr "" -#: ../../page.rst:1145 a2231caa253c4008868397c260cc2920 +#: ../../page.rst:1183 1c8b9ab151614e1da52d77751af4107c msgid "**CJK Fonts** [#f2]_ (China, Japan, Korea)" msgstr "**CJKフォント** [2] (中国、日本、韓国)" -#: ../../page.rst:1150 efa6fad4e4d9419dae392eb3f4c2f094 +#: ../../page.rst:1188 597c42b69a7743f896440e2c9134d9e4 msgid "china-s" msgstr "" -#: ../../page.rst:1150 5176342087aa42ccbdb044dca00ee30a +#: ../../page.rst:1188 ea073181e8d6489dbd8dc287c19574a6 msgid "Heiti" msgstr "" -#: ../../page.rst:1150 2c0f5e72ab2344339fdfc035fe0b05c2 +#: ../../page.rst:1188 1c739a248a4d4f099ba8383eeacbc3ac msgid "simplified Chinese" msgstr "簡体字中国語" -#: ../../page.rst:1151 e8696d9d1f32416baa1c6f6b4483dd19 +#: ../../page.rst:1189 0ed0e0fcd4c341efb42dccd4e2881065 msgid "china-ss" msgstr "" -#: ../../page.rst:1151 d46407605772470291404794a2373528 +#: ../../page.rst:1189 f4e34ceb652545779a4e118b771f3e5b msgid "Song" msgstr "" -#: ../../page.rst:1151 c1567e3d82db410093ca464c7cba90b3 +#: ../../page.rst:1189 55a6740952c34dd69fe1283827ed256b msgid "simplified Chinese (serif)" msgstr "簡体字中国語(セリフ)" -#: ../../page.rst:1152 9679c9a40eea4ccbb3de303e0066deb6 +#: ../../page.rst:1190 fdc0a9e7e4214cf68e214e5755c1730b msgid "china-t" msgstr "" -#: ../../page.rst:1152 39fdd0d3cb6a4f31aad1d359e335beb6 +#: ../../page.rst:1190 2196243f1db84774b1d956b644e82c37 msgid "Fangti" msgstr "" -#: ../../page.rst:1152 c6be82ee598542b6998f582db7f2ef0d +#: ../../page.rst:1190 ecce1527276a48dc9f2acc796ac3f059 msgid "traditional Chinese" msgstr "繁体字中国語" -#: ../../page.rst:1153 c4264475c50947d0a68e3dd5118e54b6 +#: ../../page.rst:1191 c51681df733d4692a8069d7f532f4e71 msgid "china-ts" msgstr "" -#: ../../page.rst:1153 a7e6f3d22f7c4a2eafa6280e1d0e3464 +#: ../../page.rst:1191 4a3e421d0ef448169f15eba6008a78b3 msgid "Ming" msgstr "" -#: ../../page.rst:1153 a29702a52fba4fbdb74d628223204cc1 +#: ../../page.rst:1191 ccdd11dc218a45938de6849aaa2f4b49 msgid "traditional Chinese (serif)" msgstr "繁体字中国語(セリフ)" -#: ../../page.rst:1154 d6a7761028ad40128a7185b09eaa86c4 +#: ../../page.rst:1192 b826d71f57f348d3aef4b7f29cf99979 msgid "japan" msgstr "" -#: ../../page.rst:1154 749f77c09ceb4ad389bc6455c89b0355 +#: ../../page.rst:1192 d89eb3d6c6ea408da7fdeb323ca36d1c msgid "Gothic" msgstr "" -#: ../../page.rst:1154 61b763d3ed764a03806007d57295951b +#: ../../page.rst:1192 0ff3d22714e6409d94965e5c28a63ad1 msgid "Japanese" msgstr "" -#: ../../page.rst:1155 32d59a6dfb5e4404bc45a160c6673e3d +#: ../../page.rst:1193 7ae29f221d244557af6ad879260878a3 msgid "japan-s" msgstr "" -#: ../../page.rst:1155 75d800c1a6d1425b981b45db9a14b34b +#: ../../page.rst:1193 2f6e726715dc491db0127e1df1b29277 msgid "Mincho" msgstr "" -#: ../../page.rst:1155 d1bcdd1424b344f79cfd09238238baaf +#: ../../page.rst:1193 1b9852853717404e9ec823331b4bd183 msgid "Japanese (serif)" msgstr "" -#: ../../page.rst:1156 013ffa9fd0df484aacda09190b42e12a +#: ../../page.rst:1194 b3809400d6e24405b6bdb1c43c5bd8f5 msgid "korea" msgstr "" -#: ../../page.rst:1156 f83aec0526244c0a85ac2083729b054b +#: ../../page.rst:1194 883f13d777e848bfa319d36a099924dc msgid "Dotum" msgstr "" -#: ../../page.rst:1156 66253554cbca456badfd233f8043f975 +#: ../../page.rst:1194 2995f7cdc27c4109912a42a3b41e6279 msgid "Korean" msgstr "" -#: ../../page.rst:1157 f19d20ba67964980860e0e531735907b +#: ../../page.rst:1195 0a173da8c6f347a7a0576081a6786325 msgid "korea-s" msgstr "" -#: ../../page.rst:1157 bf94cffc9ceb41baaa00c2a4e70dd6a0 +#: ../../page.rst:1195 1c3e275378b5432dbf80a6b365953a76 msgid "Batang" msgstr "" -#: ../../page.rst:1157 46c2873c9a894ca79857b3d36582f726 +#: ../../page.rst:1195 33bcb0dfb2534179b634faf9384a349d msgid "Korean (serif)" msgstr "" -#: ../../page.rst:1173 3728b45fae6f4fcd80919f1231be1792 +#: ../../page.rst:1211 9b28b2d898fc41d78cc64894c467059e msgid "" "PDF only: Put an image inside the given rectangle. The image may already " "exist in the PDF or be taken from a pixmap, a file, or a memory area." msgstr "PDFのみ:指定された矩形内に画像を配置します。画像はすでにPDF内に存在するか、ピクスマップ、ファイル、またはメモリ領域から取得できます。" -#: ../../page.rst:1176 fecdaf64243c499f9f924b45ec8b0212 +#: ../../page.rst:1214 caf88ed456594f1b8d6120ca2dbaddcf msgid "where to put the image. Must be finite and not empty." msgstr "画像を配置する場所。有限で空でない必要があります。" -#: ../../page.rst:1177 89251cf0b821496cb6af020ad33c7cf3 +#: ../../page.rst:1215 0b25f7eb7d3347bea80fa10d2782c95a msgid "deprecated and ignored." msgstr "非推奨であり、無視されます。" -#: ../../page.rst:1178 29de0c36e8d347669d64b98fdbab2651 +#: ../../page.rst:1216 8a6784f6f8994f6098c6ab8f05179155 msgid "" "name of an image file (all formats supported by MuPDF -- see " ":ref:`ImageFiles`)." msgstr "画像ファイルの名前(MuPDFでサポートされているすべての形式 – :ref:`ImageFiles` を参照)。" -#: ../../page.rst:1182 ca1cfc4a6302471a8a2960a5c660f9f2 +#: ../../page.rst:1220 093fbee1731b4980a3dc9a434b23de1d msgid "maintain the aspect ratio of the image." msgstr "アスペクト比を保持するかどうか。" -#: ../../page.rst:1184 22c6cdfd550e42739bd573d4afbbbe16 +#: ../../page.rst:1222 7fc2324c33734d0f9e5c922f840e6267 msgid "" "image in memory -- to be used as image mask (alpha values) for the base " "image. When specified, the base image must be provided as a filename or a" @@ -3342,7 +3533,7 @@ msgstr "" "メモリ内の画像 -- " "ベース画像のマスク(アルファ値)として使用されます。指定する場合、ベース画像はファイル名またはストリームとして提供する必要があります。また、既にマスクを持つ画像ではない必要があります。" -#: ../../page.rst:1188 0fd11eae1b9343d38129c902666f32a9 +#: ../../page.rst:1226 5424ec6498a84179978f3ad78d40fea1 msgid "" "(:data:`xref`) make image visibility dependent on this :data:`OCG` or " ":data:`OCMD`. Ignored after the first of multiple insertions. The " @@ -3353,15 +3544,15 @@ msgstr "" "に依存させます。複数回の挿入の最初の後には無視されます。このプロパティは生成された PDF 画像オブジェクトに格納されるため、PDF " "全体で画像の表示を制御します。" -#: ../../page.rst:1193 0ed1f8c1a11042e2968d349856dd4141 +#: ../../page.rst:1231 3bfcf48c843c4c5e822db747ef9f09ec msgid "see :ref:`CommonParms`." msgstr ":ref:`CommonParms` を参照してください。" -#: ../../page.rst:1194 00318932a2ff416aa7553f14896f99e5 +#: ../../page.rst:1232 554292f26f1f403f8aa520730fc7859f msgid "a pixmap containing the image." msgstr "画像を含むピクスマップ。" -#: ../../page.rst:1195 643610ec88d6448e8cbffdf48b900c17 +#: ../../page.rst:1233 5e9a51b175dc455cbd9b46d83815641c msgid "" "rotate the image. Must be an integer multiple of 90 degrees. Positive " "values rotate anti-clockwise. If you need a rotation by an arbitrary " @@ -3373,11 +3564,11 @@ msgstr "" "画像を回転させます。90度の整数倍である必要があります。正の値は反時計回りに回転します。任意の角度での回転が必要な場合は、まず画像をPDFに変換(:meth:`Document.convert_to_pdf`)し、:meth:`Page.show_pdf_page`" " を使用することを検討してください。" -#: ../../page.rst:1202 7883a04db29e48f581977e52e3f25dd5 +#: ../../page.rst:1240 71585d3f34ee4f29bcffb1034a53ae60 msgid "image in memory (all formats supported by MuPDF -- see :ref:`ImageFiles`)." msgstr "メモリ内の画像(MuPDFでサポートされているすべての形式 – :ref:`ImageFiles` を参照)。" -#: ../../page.rst:1205 a68e9f29d0f340598e9fa73da6bf19c7 +#: ../../page.rst:1243 8882d90364d1407eb43b03e86f478a4c msgid "" "the :data:`xref` of an image already present in the PDF. If given, " "parameters `filename`, `pixmap`, `stream`, `alpha` and `mask` are " @@ -3386,17 +3577,17 @@ msgstr "" "PDF内にすでに存在する画像の :data:`xref` 。指定された場合、 `filename` 、 `Pixmap` 、 `stream` 、" " `alpha` 、および `mask` パラメータは無視されます。ページは単純に既存の画像への参照を受け取ります。" -#: ../../page.rst:1213 cee3c3ee6db346a190a0dbc71c920f3b +#: ../../page.rst:1251 21c518190825418eab20993f3da6ffbd msgid "" "The `xref` of the embedded image. This can be used as the `xref` argument" " for very significant performance boosts, if the image is inserted again." msgstr "埋め込まれた画像の `xref` です。この値は、画像を再度挿入する場合のxref引数として使用でき、非常に大幅なパフォーマンス向上に役立ちます。" -#: ../../page.rst:1218 acfa87f0d3e044eebefefb53afd950bb +#: ../../page.rst:1256 67fdd5cf494f47478fb1a215525039eb msgid "This example puts the same image on every page of a document::" msgstr "この例では、ドキュメントのすべてのページに同じ画像を配置します:" -#: ../../page.rst:1233 97aaa9cf890f4098aa56ebf42b08e88d +#: ../../page.rst:1271 cee8d80cc9314928998b2c0ceea6e0fd msgid "" "The method detects multiple insertions of the same image (like in the " "above example) and will store its data only on the first execution. This" @@ -3405,20 +3596,20 @@ msgstr "" "このメソッドは、同じ画像が複数回挿入される場合(上記の例のように)を検出し、データは最初の実行時にのみ保存されます。これは、デフォルトの " "`xref=0` を使用している場合でも(性能は劣るが)同様です" -#: ../../page.rst:1238 df5601a7de904475b5d86999e7a076c3 +#: ../../page.rst:1276 ca3862ea700340f99e7ec4a839e571a6 msgid "" "The method cannot detect if the same image had already been part of the " "file before opening it." msgstr "このメソッドは、ファイルを開く前に同じ画像がすでにファイルの一部であるかどうかを検出できません。" -#: ../../page.rst:1242 107b80f356424b13945f19dc41a90f6e +#: ../../page.rst:1280 7e3c094f99ee4af3bcbe01e822ace6f1 msgid "" "You can use this method to provide a background or foreground image for " "the page, like a copyright or a watermark. Please remember, that " "watermarks require a transparent image if put in foreground ..." msgstr "このメソッドを使用して、ページの背景または前景画像(著作権表示や透かしのようなもの)を提供できます。ただし、前景に透明な画像が必要な場合は、そのことを覚えておいてください..." -#: ../../page.rst:1247 6da0af8fdc9943b5bd9160cf628ebae6 +#: ../../page.rst:1285 fc72c486660b45fd82bbf8eef1f04144 msgid "" "The image may be inserted uncompressed, e.g. if a `Pixmap` is used or if " "the image has an alpha channel. Therefore, consider using `deflate=True` " @@ -3426,12 +3617,12 @@ msgid "" "size -- even if transparency comes into play. Have a look at " ":ref:`RecipesImages_O`." msgstr "" -"画像は非圧縮で挿入されることがあります。たとえば、*Pixmap* " +"画像は非圧縮で挿入されることがあります。たとえば、``Pixmap`` " "を使用するか、画像にアルファチャンネルがある場合です。したがって、ファイルを保存する際には *deflate=True* " "を使用することを検討してください。また、透明性が関与する場合でも、画像サイズを効果的に制御する方法が存在します。ドキュメンテーションの " ":ref:`RecipesImages_O` セクションをご覧ください。" -#: ../../page.rst:1254 21fce8adf9ec40b68f33fdb91decc6c8 +#: ../../page.rst:1292 9d70103e5e4d48aa86fa7897f4bbdedc msgid "" "The image is stored in the PDF at its original quality level. This may be" " much better than what you need for your display. Consider **decreasing " @@ -3446,7 +3637,7 @@ msgstr "" "の章を参照)。PILメソッドの *Image.thumbnail()* " "もそのために使用できます。ファイルサイズの節約は非常に大きい場合があります。" -#: ../../page.rst:1263 df3d9b39d7684f8d8b27cf195dc58063 +#: ../../page.rst:1301 19054921957e4475930254e79829a684 msgid "" "Another efficient way to display the same image on multiple pages is " "another method: :meth:`show_pdf_page`. Consult " @@ -3454,92 +3645,92 @@ msgid "" "usable for that method." msgstr "同じ画像を複数のページで効率的に表示する別の方法は、別のメソッドです::meth:`show_pdf_page`。そのメソッドで使用可能な中間のPDFを取得する方法については、:meth:`Document.convert_to_pdf`" -#: ../../page.rst:1270 5be455489662495b877108de564bab7b +#: ../../page.rst:1308 174cfad8dac3422fa1aa8af5f6941b99 msgid "Changed in v1.14.1: By default, the image keeps its aspect ratio." msgstr "v1.14.1で変更:デフォルトでは、画像はアスペクト比を保持します" -#: ../../page.rst:1271 f103b8c183534596a439bbfdc0ec0e50 +#: ../../page.rst:1309 b16ac519a78e423b826fc692d1e479e1 #, fuzzy msgid "Changed in v1.14.11: Added args `keep_proportion`, `rotate`." msgstr "v1.19.1で変更:`sort` パラメータを追加" -#: ../../page.rst:1272 2e8caf10706944f3aec78a39429dd9ff +#: ../../page.rst:1310 1d06a529b4134c8f80e72af90b76fd70 msgid "Changed in v1.14.13:" msgstr "v1.14.17で変更されました" -#: ../../page.rst:1275 ea1084743d104fa5b0d1ebfa1abdb8f8 +#: ../../page.rst:1313 7fe6c3ed323f424f91494aa4a37d0b7f #, fuzzy msgid "" "The image is now always placed **centered** in the rectangle, i.e. the " "centers of image and rectangle are equal." msgstr "v1.14.13で変更:画像は矩形の **中央に** 常に配置されます。つまり、画像と矩形の中心が等しいです。" -#: ../../page.rst:1277 c4baf4d8e2534ce4a41b4b212dcd4380 +#: ../../page.rst:1315 20112854c2d64eaab8fa3b8b5efb9bdb msgid "Added support for `stream` as `io.BytesIO`." msgstr "" -#: ../../page.rst:1279 077788e20d094a5083a90256ac72f4b5 +#: ../../page.rst:1317 6c9255bf24a84d97a7cdd300170d4477 msgid "" "Changed in v1.17.6: Insertion rectangle no longer needs to have a non-" "empty intersection with the page's :attr:`Page.cropbox` [#f5]_." msgstr "v1.17.6で変更:挿入矩形はもはやページの :attr:`Page.cropbox` [#f5]_ と非空の交差を持つ必要はありません。" -#: ../../page.rst:1282 35ef13f07f8e41e6a2f8de6035f34cb2 +#: ../../page.rst:1320 8289824611bb4292866db7fa989dfd1a #, fuzzy msgid "Changed in v1.18.1: Added `mask` arg." msgstr "v1.19.1で変更:`sort` パラメータを追加" -#: ../../page.rst:1283 fdbd2164f6ce40b0a565ac8e9984b438 +#: ../../page.rst:1321 37dea0ca3e704b8195a5da49ae9ab9b8 #, fuzzy msgid "Changed in v1.18.3: Added `oc` arg." msgstr "v1.19.1で変更:`sort` パラメータを追加" -#: ../../page.rst:1284 09aa19e787e044e3990ba215ad7cc641 +#: ../../page.rst:1322 80f881b404dc482bb8588a8d2e1bef0b #, fuzzy msgid "Changed in v1.18.13:" msgstr "v1.18.17で変更" -#: ../../page.rst:1286 c94847551c4d4ab3987b24ae7d080752 +#: ../../page.rst:1324 816e04ec81c14e2c80e993a6c3cea6ca #, fuzzy msgid "Allow providing the image as the xref of an existing one." msgstr "v1.18.13で変更:既存の画像のxrefとして画像を提供できるようになりました。" -#: ../../page.rst:1287 8a33532d798c403b9bbd164de3fac7b5 +#: ../../page.rst:1325 48af6b717fee4dba843bc62c84acf897 msgid "Added `xref` arg." msgstr "" -#: ../../page.rst:1288 96e0a4adbee14ef785a9be2a011de2bd +#: ../../page.rst:1326 c752c95f1d78413a88f08c925b7ecce4 #, fuzzy msgid "Return `xref` of stored image." msgstr "画像の :data:`xref`。" -#: ../../page.rst:1290 0f41cb8dc52d4d5ca7b9cabf7edbee4a +#: ../../page.rst:1328 ba12bdf1aac94b9f9689d2109614acd8 #, fuzzy msgid "Changed in v1.19.3: deprecate and ignore `alpha` arg." msgstr "*(v1.19.3で変更)* 非推奨。指定された場合、無視されます。" -#: ../../page.rst:1303 9661a3cb891544229e7d460da01b082a +#: ../../page.rst:1341 fe0447fc76f0423a80b3ecac6839cd50 msgid "Replace the image at xref with another one." msgstr "xrefで指定された画像を別の画像で置き換えます。" -#: ../../page.rst:1305 ../../page.rst:1330 491b70c1cfad4775be7e580cf197f55f -#: 75888fbccab848d5bac6613fb5b45989 +#: ../../page.rst:1343 ../../page.rst:1368 1b33038c6ee3441395f8dfb708c7665c +#: 43cc5eb02ffa4c4da30b62b8b00abb66 msgid "the :data:`xref` of the image." msgstr "画像の :data:`xref`。" -#: ../../page.rst:1306 343603b6aa6f4838a220a3e685f51b56 +#: ../../page.rst:1344 d1a4c801374244e09171338aef674506 msgid "the filename of the new image." msgstr "新しい画像のファイル名。" -#: ../../page.rst:1307 ba75a3b81c854828aecfeaa8738b7e03 +#: ../../page.rst:1345 6d87a017d82040f2a81f74cd6385b75f msgid "the :ref:`Pixmap` of the new image." msgstr "新しい画像の :ref:`Pixmap`。" -#: ../../page.rst:1308 cc640b723eca4129837b889bb0b90de0 +#: ../../page.rst:1346 945d6f45a57947d98a130b7e2e86749f msgid "the memory area containing the new image." msgstr "新しい画像を含むメモリ領域。" -#: ../../page.rst:1310 6e3ec389d6ab4d18b7d8460ca0f77f3f +#: ../../page.rst:1348 45f68398b3eb4d1390d4c212b48b7f54 msgid "" "Arguments `filename`, `pixmap`, `stream` have the same meaning as in " ":meth:`Page.insert_image`, especially exactly one of these must be " @@ -3548,25 +3739,25 @@ msgstr "" "`filename`、`pixmap`、`stream` の引数は、特に :meth:`Page.insert_image` " "での意味と同じです。特に、これらのうちの1つだけを指定する必要があります。" -#: ../../page.rst:1312 bf06fd0f3ed9413f89921398c7d72879 +#: ../../page.rst:1350 4faf8d6cfb0d4f8eba45531e474028ae msgid "" "This is a **global replacement:** the new image will also be shown " "wherever the old one has been displayed throughout the file." msgstr "これは **グローバルな置換** です:新しい画像は、古い画像がファイル全体で表示されていた場所でも表示されます。" -#: ../../page.rst:1314 4327b59f0b99472d9653345e105e7bed +#: ../../page.rst:1352 7a1d8a0dc96e48fda647ffb83eaa97d1 msgid "" "This method mainly exists for technical purposes. Typical uses include " "replacing large images by smaller versions, like a lower resolution, " "graylevel instead of colored, etc., or changing transparency." msgstr "このメソッドは主に技術的な目的で存在しています。典型的な使用例には、大きな画像を解像度の低いバージョン、カラーではなくグレースケールなど、より小さなバージョンで置き換えることが含まれます。または透明度を変更することもあります。" -#: ../../page.rst:1318 ../../page.rst:1342 02b570bfe6f04acd8ec980deb79c4cb5 -#: 841840c64dd54f5db6bca7b060bc8f10 +#: ../../page.rst:1356 ../../page.rst:1380 17ec989e104f4b95822cfc83a85dc280 +#: b4e1a790d8ed4e22974e6b84fba51c41 msgid "New in v1.21.0" msgstr "v1.21.0で新たに追加" -#: ../../page.rst:1328 e1832a2e58044c6a92dfb5e91997678c +#: ../../page.rst:1366 14e832f315eb4986824ff5f4f4ac7931 msgid "" "Delete the image at xref. This is slightly misleading: actually the image" " is being replaced with a small transparent :ref:`Pixmap` using above " @@ -3575,13 +3766,13 @@ msgstr "" "画像のxrefを削除します。これはわずかに誤解を招くかもしれませんが、実際には、画像は上記の :meth:`Page.replace_image`" " を使用して小さな透明な :ref:`Pixmap` で置き換えられます。しかし、視覚的な効果は同等です。" -#: ../../page.rst:1332 8e6cd438e5034cf78df0ae154f2a9d06 +#: ../../page.rst:1370 a4b4d7becbf344339301e38dc2b7c7bc msgid "" "This is a **global replacement:** the image will disappear wherever the " "old one has been displayed throughout the file." msgstr "これは **グローバルな置換です:** 新しい画像は、古い画像がファイル全体で表示されていた場所でも表示されなくなります。" -#: ../../page.rst:1334 3edf48ef7588486ab04def569d0850fd +#: ../../page.rst:1372 484b23123a444de69b98dfed01566c31 msgid "" "If you inspect / extract a page's images by methods like " ":meth:`Page.get_images`, :meth:`Page.get_image_info` or " @@ -3594,83 +3785,85 @@ msgstr "" "などのメソッドを使用してページの画像を調査/抽出する場合、置き換えられた「ダミー」画像は次のように検出されます`(45, 47, 1, 1, 8," " 'DeviceGray', '', 'Im1', 'FlateDecode')` 、また同じ境界ボックスをページ上に「覆う」ように見えます。" -#: ../../page.rst:1365 d0e5e651f404424a96fd35ae1573761a +#: ../../page.rst:1403 8308a4ff4f504e2fb4ad2ecf24470e38 +#, fuzzy msgid "" -"Retrieves the content of a page in a variety of formats. This is a " -"wrapper for multiple :ref:`TextPage` methods by choosing the output " -"option `opt` as follows:" +"Retrieves the content of a page in a variety of formats. Depending on the" +" ``flags`` value, this may include text, images and several other object " +"types. The method is a wrapper for multiple :ref:`TextPage` methods by " +"choosing the output option `opt` as follows:" msgstr "" "さまざまな形式でページのコンテンツを取得します。出力オプション `opt` を選択することで、複数の :ref:`TextPage` " "メソッドのラッパーとなります。" -#: ../../page.rst:1367 e4e150822bec483eb6770deb70d8a75c -msgid "\"text\" -- :meth:`TextPage.extractTEXT`, default" +#: ../../page.rst:1405 452aad37ecdc4dcf8afcd5b8cbe2ae0c +#, fuzzy +msgid "" +"\"text\" -- :meth:`TextPage.extractTEXT`, default. Always includes **text" +" only.**" msgstr "“text” – :meth:`TextPage.extractTEXT`、デフォルト" -#: ../../page.rst:1368 442e687b43524a8182d0420330f81416 -msgid "\"blocks\" -- :meth:`TextPage.extractBLOCKS`" +#: ../../page.rst:1406 02a7df769f4141dd96b0618120183f52 +msgid "" +"\"blocks\" -- :meth:`TextPage.extractBLOCKS`. Includes text and **may** " +"include image meta information." msgstr "" -#: ../../page.rst:1369 b15f4595a55342daa9f34d0ced099bcc -msgid "\"words\" -- :meth:`TextPage.extractWORDS`" +#: ../../page.rst:1407 434f558853dc4ef297a4bff847f30a94 +msgid "\"words\" -- :meth:`TextPage.extractWORDS`. Always includes **text only.**" msgstr "" -#: ../../page.rst:1370 f499163c8d424169bf0b73e74da580b2 -msgid "\"html\" -- :meth:`TextPage.extractHTML`" +#: ../../page.rst:1408 3632e16a205d4e5e9a5f0cddd5460024 +msgid "\"html\" -- :meth:`TextPage.extractHTML`. May include text and images." msgstr "" -#: ../../page.rst:1371 b350a1846ab7491b8830f186d7683567 -msgid "\"xhtml\" -- :meth:`TextPage.extractXHTML`" +#: ../../page.rst:1409 2981b96bbe90453091a210dc3fce33bb +msgid "\"xhtml\" -- :meth:`TextPage.extractXHTML`. May include text and images." msgstr "" -#: ../../page.rst:1372 c878a243e381468abd94426aa30a3567 -msgid "\"xml\" -- :meth:`TextPage.extractXML`" +#: ../../page.rst:1410 1d41d88d2597445689305faea90a2583 +msgid "\"xml\" -- :meth:`TextPage.extractXML`. Always includes **text only.**" msgstr "" -#: ../../page.rst:1373 d219b0f23eef4b5c84bd21f0844971be -msgid "\"dict\" -- :meth:`TextPage.extractDICT`" +#: ../../page.rst:1411 e552781435524d03bcf6f26ba28a5e15 +msgid "\"dict\" -- :meth:`TextPage.extractDICT`. May include text and images." msgstr "" -#: ../../page.rst:1374 9234b4a982064781bd0f94c25bebce46 -msgid "\"json\" -- :meth:`TextPage.extractJSON`" +#: ../../page.rst:1412 d11fe01ef22a4daba97be9950a45cc43 +msgid "\"json\" -- :meth:`TextPage.extractJSON`. May include text and images." msgstr "" -#: ../../page.rst:1375 375a8351712f47e98f828ce1bcfda364 -msgid "\"rawdict\" -- :meth:`TextPage.extractRAWDICT`" +#: ../../page.rst:1413 bd296e0297d74b9b830e45fb6faa8409 +msgid "" +"\"rawdict\" -- :meth:`TextPage.extractRAWDICT`. May include text and " +"images." msgstr "" -#: ../../page.rst:1376 24ff8a6e64ae4d838d6e7ab86c0e9088 -msgid "\"rawjson\" -- :meth:`TextPage.extractRAWJSON`" +#: ../../page.rst:1414 9c6c9e6fc7c745c3876c959ce393ce8a +msgid "" +"\"rawjson\" -- :meth:`TextPage.extractRAWJSON`. May include text and " +"images." msgstr "" -#: ../../page.rst:1378 83724337b34041be96a5a8749313ccf9 +#: ../../page.rst:1416 ccf6702d5aa0424f9ce5a59cf04577e5 #, fuzzy msgid "" "A string indicating the requested format, one of the above. A mixture of " -"upper and lower case is supported. Values \"words\" and \"blocks\" are " -"also accepted (changed in v1.16.3)." +"upper and lower case is supported. If misspelled, option \"text\" is " +"silently assumed." msgstr "要求される形式を示す文字列、上記のいずれか。大文字と小文字の組み合わせがサポートされています" -#: ../../page.rst:1378 1c400c09994b46859a89dafd6c923f58 +#: ../../page.rst:1418 9142feb79e394e408bb80ef000e1cb99 msgid "" -"A string indicating the requested format, one of the above. A mixture of " -"upper and lower case is supported." -msgstr "要求される形式を示す文字列、上記のいずれか。大文字と小文字の組み合わせがサポートされています" - -#: ../../page.rst:1380 57dca07209f545cba47a3a124eaf5a08 -msgid "Values \"words\" and \"blocks\" are also accepted (changed in v1.16.3)." -msgstr "v1.16.3で変更された値 “words” と “blocks” も受け入れられるようになりました。" - -#: ../../page.rst:1382 88febc70cb4d4ce996176c5b6c1aab20 -msgid "" -"restrict extracted text to this rectangle. If None, the full page is " -"taken. Has **no effect** for options \"html\", \"xhtml\" and \"xml\". " -"(New in v1.17.7)" +"restrict the extraction to this rectangle. If ``None`` (default), the " +"visible part of the page is taken. Any content (text, images) that is " +"**not fully contained** in ``clip`` will be completely omitted. To avoid " +"clipping altogether use ``clip=pymupdf.INFINITE_RECT()``. Only then the " +"extraction will contain all items. This parameter has **no effect** on " +"options \"html\", \"xhtml\" and \"xml\"." msgstr "" -"*(v1.17.7で新たに追加)* 抽出されたテキストをこの矩形に制限します。Noneの場合、フルページが取得されます。 " -"“html”、“xhtml”、“xml”のオプションには **影響しません**。" -#: ../../page.rst:1384 b7b50f6f5ad6489a8d730cc79916f766 +#: ../../page.rst:1420 47940232bda448a5a84ea18382f62861 msgid "" "indicator bits to control whether to include images or how text should be" " handled with respect to white spaces and :data:`ligatures`. See " @@ -3681,35 +3874,32 @@ msgstr "" "使用可能な指示ビットについては、 :ref:`TextPreserve` を参照してください。 また、デフォルト設定については、 " ":ref:`text_extraction_flags` を参照してください。 (v1.16.2で新規追加)" -#: ../../page.rst:1386 3b1b1b75d1fc49c2bc27bb63dd50c92b +#: ../../page.rst:1422 5830c1684d704db0a69122ab1a1dee32 +#, fuzzy msgid "" "use a previously created :ref:`TextPage`. This reduces execution time " "**very significantly:** by more than 50% and up to 95%, depending on the " "extraction option. If specified, the 'flags' and 'clip' arguments are " "ignored, because they are textpage-only properties. If omitted, a new, " -"temporary textpage will be created. (New in v1.19.0)" +"temporary textpage will be created." msgstr "" "(v1.19.0で新たに追加) 事前に作成したTextPageを使用します。これにより、実行時間が **非常に大幅に** " "削減されます:抽出オプションに応じて50%以上、95%まで削減されます。指定した場合、 'flags' および 'clip' " "引数は無視されます。テキストページ専用のプロパティであるためです。省略した場合、新しい一時的なテキストページが作成されます。" -#: ../../page.rst:1388 2476f9ec0fdd4ee49e8c910424d20890 +#: ../../page.rst:1424 9b2d391e568944a5beb94b59e95abd9c msgid "" "sort the output by vertical, then horizontal coordinates. In many cases, " "this should suffice to generate a \"natural\" reading order. Has no " -"effect on (X)HTML and XML. Output option **\"words\"** sorts by `(y1, " -"x0)` of the words' bboxes. Similar is true for \"blocks\", \"dict\", " -"\"json\", \"rawdict\", \"rawjson\": they all are sorted by `(y1, x0)` of " -"the resp. block bbox. If specified for \"text\", then internally " -"\"blocks\" is used. (New in v1.19.1)" +"effect on (X)HTML and XML. For options \"blocks\", \"dict\", \"json\", " +"\"rawdict\", \"rawjson\", sorting happens by coordinates `(y1, x0)` of " +"the respective block bbox. For options \"words\" and \"text\", the text " +"lines are completely re-synthesized to follow the reading sequence and " +"appearance in the document -- which even establishes the original layout " +"to some extent." msgstr "" -"出力を垂直座標、次に水平座標でソートします。多くの場合、これで「自然な」読み取り順序を生成するのに十分です。 " -"(X)HTMLおよびXMLには影響しません。出力オプション「words」は、単語の境界ボックスの `(y1, x0)` " -"でソートされます。\"blocks\"、\"dict\"、\"json\"、\"rawdict\"、\"rawjson\" " -"についても同様であり、それぞれのブロックの境界ボックスの `(y1, x0)` でソートされます。 \"text\" " -"に対して指定された場合、内部的には \"blocks\" が使用されます。 (v1.19.1で新たに追加)" -#: ../../page.rst:1390 b729f6103e8643cd89fb1875a9b68e7e +#: ../../page.rst:1426 9d08f6f3b86e4bac9691d58c3a2dc750 msgid "" "use these characters as *additional* word separators with the \"words\" " "output option (ignored otherwise). By default, all white spaces " @@ -3730,17 +3920,17 @@ msgstr "" "の4つの単語が返されます。その他の可能な用途には、句読点を無視するための `delimiters = string.punctuation` " "があります。\"word\" 文字列には、区切り文字は含まれません。 (v1.23.5で新たに追加)" -#: ../../page.rst:1392 46a588fedeae4016a7453df373258c20 +#: ../../page.rst:1428 d97c42dd73cf44b69c3b867d5b46c8f4 msgid "*str, list, dict*" msgstr "" -#: ../../page.rst:1393 1b6bacfdc24747aeabd103e65d8db226 +#: ../../page.rst:1429 aa4cc9fdf3c94379ac6a8f9eee9211cc msgid "" "The page's content as a string, a list or a dictionary. Refer to the " "corresponding :ref:`TextPage` method for details." msgstr "ページの内容を表す文字列、リスト、または辞書。詳細については対応するTextPageメソッドを参照してください。" -#: ../../page.rst:1397 2f9d0e6c654546b89b3cda0b83418b44 +#: ../../page.rst:1433 3ab1bbe9190a4158ab80a42f8d45f395 msgid "" "You can use this method as a **document conversion tool** from :ref:`any " "supported document type` to one of TEXT, HTML, " @@ -3749,52 +3939,55 @@ msgstr "" "このメソッドを、:ref:`any supported document type` " "からTEXT、HTML、XHTML、またはXMLドキュメントのいずれかに変換する **ドキュメント変換ツール** として使用できます。" -#: ../../page.rst:1398 48f3f843a6e64f5e99f70890b1352371 +#: ../../page.rst:1434 7ab0efc7d9074d6986ec414d7b427423 msgid "" "The inclusion of text via the *clip* parameter is decided on a by-" "character level: a character becomes part of the output, if its bbox is " -"contained in *clip* (changed in v1.18.2). This **deviates** from the " -"algorithm used in redaction annotations: a character will be **removed if" -" its bbox intersects** any redaction annotation." +"contained in `clip`. This **deviates** from the algorithm used in " +"redaction annotations: a character will be **removed if its bbox " +"intersects** any redaction annotation." msgstr "" -"*clip* パラメータを使用したテキストの含み方は、文字ごとのレベルで決定されます:文字のバウンディングボックスが *clip* " -"に含まれる場合、その文字は出力の一部となります(v1.18.2で変更)。 " -"これは、レダクション注釈で使用されるアルゴリズムとは異なります:文字のバウンディングボックスがどのレダクション注釈とも交差する場合、文字は削除されます。" -#: ../../page.rst:1402 2d7169d7c191433cb54e88e8c805838a +#: ../../page.rst:1438 ef4868405e3c4c62b05ec310996bfa02 msgid "Changed in v1.19.0: added `textpage` parameter" msgstr "v1.19.0で変更:`textpage` パラメータを追加" -#: ../../page.rst:1403 8451cdcbf374414fba0f05122f1b7cc8 +#: ../../page.rst:1439 6b7b4fb5d00f4f328d415d3d128830f2 msgid "Changed in v1.19.1: added `sort` parameter" msgstr "v1.19.1で変更:`sort` パラメータを追加" -#: ../../page.rst:1404 6ee2b927e4304168888e695805bcef60 +#: ../../page.rst:1440 fdbbed76abc9428997d44c91c1647c7c msgid "" "Changed in v1.19.6: added new constants for defining default flags per " "method." msgstr "v1.19.6で変更:各メソッドごとのデフォルトフラグを定義するための新しい定数を追加" -#: ../../page.rst:1405 74379d5ac2ca4cc084a9143e37d35023 +#: ../../page.rst:1441 15282d01b33848c1859ed7578c596804 #, fuzzy msgid "Changed in v1.23.5: added `delimiters` parameter" msgstr "v1.19.1で変更:`sort` パラメータを追加" -#: ../../page.rst:1415 64d4432f51c6462eb4e159d552566e17 +#: ../../page.rst:1442 9ddf6015bf36464fbb48c09652673998 +msgid "" +"Changed in v1.24.11: changed the effect of `sort_True` for \"text\" and " +"\"words\" to closely follow natural reading sequence." +msgstr "" + +#: ../../page.rst:1452 5a360b6151a840dabaa9d16fcab011af msgid "Retrieve the text contained in a rectangle." msgstr "指定された矩形に含まれるテキストを取得します。" -#: ../../page.rst:1417 2b9ac512cceb4a71b2f337b03bfaebc6 +#: ../../page.rst:1454 88ad8c824e18426494ab18de0a207e22 msgid "rect-like." msgstr "矩形のようなもの。" -#: ../../page.rst:1418 96d11f4bec804f318fd3ac06dc78087c +#: ../../page.rst:1455 8f3368c15a84497bbe45a6a454e5fccb msgid "" "a :ref:`TextPage` to use. If omitted, a new, temporary textpage will be " "created." msgstr "使用する :ref:`TextPage`。省略した場合、新しい一時的なテキストページが作成されます。" -#: ../../page.rst:1420 567f8a88463b414d8608294640056a28 +#: ../../page.rst:1457 d9487bed71ee497c94721af0708893fb #, fuzzy msgid "" "a string with interspersed linebreaks where necessary. It is based on " @@ -3805,7 +3998,7 @@ msgstr "" "必要に応じて改行が挿入された文字列。v1.19.0 で変更: " "それは専用のコードに基づいています。典型的な使用例は、:meth:`Page.search_for` の結果をチェックすることです" -#: ../../page.rst:1420 d1c71781f22e427db891899709e17ec0 +#: ../../page.rst:1457 52ca51f4545a47a2a05b9db0471547f9 msgid "" "a string with interspersed linebreaks where necessary. It is based on " "dedicated code (changed in v1.19.0). A typical use is checking the result" @@ -3814,41 +4007,41 @@ msgstr "" "必要に応じて改行が挿入された文字列。v1.19.0 で変更: " "それは専用のコードに基づいています。典型的な使用例は、:meth:`Page.search_for` の結果をチェックすることです" -#: ../../page.rst:1429 874fb2b8b3a141fd90815086e7477881 +#: ../../page.rst:1466 7f177e688d9f4fc29242ffe745e69a04 msgid "New in v1.17.7" msgstr "新機能 v1.17.7" -#: ../../page.rst:1430 2887928a8aab4bd29931d01f5dc4fce1 +#: ../../page.rst:1467 81a55c6099654e378c111dd17aa154c7 msgid "Changed in v1.19.0: add `textpage` parameter" msgstr "v1.19.0 で変更: `textpage` パラメータを追加" -#: ../../page.rst:1441 9383564e78824fbb8314fbba42d35b83 +#: ../../page.rst:1478 adbe39b30773441db3e7baa4cf775b66 msgid "Create a :ref:`TextPage` for the page." msgstr "ページ用の :ref:`TextPage` を作成します" -#: ../../page.rst:1443 34603141baaf41d1b1e15ac301fac0d2 +#: ../../page.rst:1480 5b0cf9ded7f84b91aa9caf26fcf202a6 msgid "" "indicator bits controlling the content available for subsequent text " "extractions and searches -- see the parameter of :meth:`Page.get_text`." msgstr "後続のテキスト抽出と検索で使用可能なコンテンツを制御する指示ビット – :meth:`Page.get_text` のパラメータを参照してください。" -#: ../../page.rst:1445 faaac730e4874b8c87959c859f886b29 +#: ../../page.rst:1482 0037c15d3c5b44ff9f8b8c47ab25b23f msgid "restrict extracted text to this area. (New in v1.17.7)" msgstr "*(v1.17.7 で新機能)* 抽出されたテキストをこの領域に制限します。" -#: ../../page.rst:1447 6b144594bfa84d0e8addc7a0a88dd3f8 +#: ../../page.rst:1484 8f8e5c359c7742ffab8a38b67b433c4c msgid ":ref:`TextPage`" msgstr "" -#: ../../page.rst:1451 31b7108485c941d288514eafc826bff5 +#: ../../page.rst:1488 6952e059cfc246a286b4a08861b8cadb msgid "New in v1.16.5" msgstr "v1.16.5 で新機能。" -#: ../../page.rst:1452 261e60eabcd14c65a8e405c60ad7b55b +#: ../../page.rst:1489 c1ba15b30be74e12889195304dea7ce4 msgid "Changed in v1.17.7: introduced `clip` parameter." msgstr "v1.17.7 で変更: `clip` パラメータが導入されました。" -#: ../../page.rst:1466 f555f811a074485397370dd87a5d0863 +#: ../../page.rst:1503 7f911d88a72744b1b229485d4e25336b msgid "" "**Optical Character Recognition** (**OCR**) technology can be used to " "extract text data for documents where text is in a raster image format " @@ -3859,7 +4052,7 @@ msgstr "" ")技術は、ページ全体でテキストがラスター画像形式であるドキュメントからテキストデータを抽出するために使用できます。このメソッドを使用して、テキストの抽出のためにページを" " **OCR** します。" -#: ../../page.rst:1468 d20d0803cd2a4e8994fc5523a42365ca +#: ../../page.rst:1505 ff5001b1bcff456b8148d592a1006daf msgid "" "This method returns a :ref:`TextPage` for the page that includes OCRed " "text. MuPDF will invoke Tesseract-OCR if this method is used. Otherwise " @@ -3868,29 +4061,29 @@ msgstr "" "OCRed テキストを含むページの :ref:`TextPage` を作成します。このメソッドを使用すると、MuPDF は Tesseract-" "OCR を呼び出します。それ以外の場合、これは通常の :ref:`TextPage` オブジェクトです。" -#: ../../page.rst:1470 02d0b1d3f4b64bb2a43e1b5fee73f64a +#: ../../page.rst:1507 2cade91f447846489a035c9db8c19497 msgid "" "indicator bits controlling the content available for subsequent test " "extractions and searches -- see the parameter of :meth:`Page.get_text`." msgstr "後続のテキスト抽出と検索に使用可能なコンテンツを制御する指示ビット – :meth:`Page.get_text` のパラメータを参照してください。" -#: ../../page.rst:1471 435e3ae635bb41d2a053c64bfc646b94 +#: ../../page.rst:1508 31c3b501d1f34d8ebdafbf369eaee2a7 msgid "" "the expected language(s). Use \"+\"-separated values if multiple " "languages are expected, \"eng+spa\" for English and Spanish." msgstr "期待される言語。複数の言語が期待される場合は \"+\" で区切って指定します。たとえば英語とスペイン語の場合は \"eng+spa\" です。" -#: ../../page.rst:1472 d4c24cf190ac43ef9d159fe3a02a1b3f +#: ../../page.rst:1509 fbc77f5dd2a64c9580e379dca42b840b msgid "" "the desired resolution in dots per inch. Influences recognition quality " "(and execution time)." msgstr "インチ当たりのドット数で指定された解像度。認識品質(および実行時間)に影響を与えます。" -#: ../../page.rst:1473 f72245cc0ba54641a9fbf32a3b67474f +#: ../../page.rst:1510 76846001509146cb928d95ea24c6addc msgid "whether to OCR the full page, or just the displayed images." msgstr "ページ全体を OCR するか、表示された画像のみを OCR するかを指定します。" -#: ../../page.rst:1474 708ca0609f31410e84a42095297108c5 +#: ../../page.rst:1511 0da892b6642e40da9665478da7a3cf35 msgid "" "The name of Tesseract's language support folder `tessdata`. If omitted, " "this information must be present as environment variable " @@ -3899,13 +4092,13 @@ msgstr "" "Tesseract の言語サポートフォルダ `tessdata` の名前。省略した場合、この情報は環境変数 `TESSDATA_PREFIX` " "として存在している必要があります。tessdata を取得する関数 :meth:`get_tessdata` によって決定できます。" -#: ../../page.rst:1476 9d13f4a5fd7e4406b298f064f84cb5db +#: ../../page.rst:1513 8e1aa2e10adf43be84b56ac4599bbd59 msgid "" "This method does **not** support a clip parameter -- OCR will always " "happen for the complete page rectangle." msgstr "このメソッドは clip パラメータをサポート **していない** ため、OCR は常に完全なページ矩形に対して行われます" -#: ../../page.rst:1478 f8173471a6694e57a6ebf7e8c52a24e1 +#: ../../page.rst:1515 e893905f0abd451583502b8d296b098d msgid "" "a :ref:`TextPage`. Execution may be significantly longer than " ":meth:`Page.get_textpage`. For a full page OCR, **all text** will have " @@ -3913,19 +4106,19 @@ msgid "" " text will keep its properties, and only text coming from images will " "have the GlyphlessFont. .. note:: **OCRed text is only available** " "to PyMuPDF's text extractions and searches if their `textpage` parameter " -"specifies the output of this method. `This " +"specifies the output of this method. `This Jupyter notebook " "`_ Jupyter notebook walks through an example " -"for using OCR textpages." +"notebooks/partial-ocr.ipynb>`_ walks through an example for using OCR " +"textpages." msgstr "" -#: ../../page.rst:1480 758a7ea298324e9f8a5f159b6eebd187 +#: ../../page.rst:1517 8bb21c9ca89640a8a4036d03c4d9fdc5 msgid "" "a :ref:`TextPage`. Execution may be significantly longer than " ":meth:`Page.get_textpage`." msgstr ":ref:`TextPage`。実行時間は :meth:`Page.get_textpage` よりも大幅に長くなる場合があります。" -#: ../../page.rst:1482 a8120dd4d37d46fa8e868d0564e407a9 +#: ../../page.rst:1519 4ce634db83204890b32edcb9f8467239 msgid "" "For a full page OCR, **all text** will have the font \"GlyphlessFont\" " "from Tesseract. In case of partial OCR, normal text will keep its " @@ -3934,7 +4127,7 @@ msgstr "" "フルページの OCR の場合、**すべてのテキスト** は Tesseract の \"GlyphlessFont\" になります。部分的な " "OCR の場合、通常のテキストはそのプロパティを保持し、画像から来たテキストのみが GlyphlessFont になります。" -#: ../../page.rst:1486 d9da4398cff441d4ae7deabf7e86d1ae +#: ../../page.rst:1523 953ebed17b4c4b1f872503a17886772e msgid "" "**OCRed text is only available** to PyMuPDF's text extractions and " "searches if their `textpage` parameter specifies the output of this " @@ -3943,24 +4136,25 @@ msgstr "" "OCRed textは、PyMuPDFのテキスト抽出と検索でのみ利用可能であり、その `TextPage` " "パラメータがこのメソッドの出力を指定している場合にのみ利用できます。" -#: ../../page.rst:1488 d97586052e5242f790a23b15467e0c69 +#: ../../page.rst:1525 4e52cfd40e2145529ffb872a072bc357 +#, fuzzy msgid "" -"`This `_ Jupyter notebook walks through an example " -"for using OCR textpages." +"`This Jupyter notebook `_ walks " +"through an example for using OCR textpages." msgstr "" "`このJupyter `_ ノートブックは、OCRテキストページを使用する例を説明します。" -#: ../../page.rst:1492 6840024362e94a7baa52e576390d7d7a +#: ../../page.rst:1529 5564269d89fd4527a9d8fac8f4a6e8a5 msgid "New in v.1.19.0" msgstr "v1.19.0 で新機能" -#: ../../page.rst:1493 fdb94f7e5ce743c99688c2fb0e7ccc92 +#: ../../page.rst:1530 e3a425ead27c4c15b2ffb42572282313 msgid "Changed in v1.19.1: support full and partial OCRing a page." msgstr "v1.19.1 で変更: ページのフルと部分的な OCR をサポート" -#: ../../page.rst:1500 6a1c54e4dd8243d29c3c4f6c0fca27b9 +#: ../../page.rst:1537 f899149460444da892e7dd5050576760 msgid "" "Return the vector graphics of the page. These are instructions which draw" " lines, rectangles, quadruples or curves, including properties like " @@ -3968,7 +4162,7 @@ msgid "" "\"line art\" and \"drawings\"." msgstr "ページのベクトルグラフィックスを返します。これらは線、四角形、四角形または曲線を描画するための命令で、色、透明度、線の幅、点線などのプロパティを含みます。代替用語は「ラインアート」と「ドローイング」です。" -#: ../../page.rst:1502 1a8dbb122efa456a9c560c347e9ed6b2 +#: ../../page.rst:1539 ddea020aa19e4cfb9411b83e555d96a9 msgid "" "a list of dictionaries. Each dictionary item contains one or more single " "draw commands belonging together: they have the same properties (colors, " @@ -3978,7 +4172,7 @@ msgstr "" "辞書のリスト。各辞書アイテムには、同じプロパティ(色、破線など)を持つ1つ以上の単一の描画コマンドが含まれます。これらはPDFでは " "**\"path\"** と呼ばれ、ここではその名前を採用していますが、このメソッドは **すべてのドキュメントタイプに対して機能します**。" -#: ../../page.rst:1504 314a8b4365034d8f9de9303e1ad6dd9b +#: ../../page.rst:1541 bd74116303164beeb44f4e4f8fcbf086 msgid "" "The path dictionary for fill, stroke and fill-stroke paths has been " "designed to be compatible with class :ref:`Shape`. There are the " @@ -3987,163 +4181,163 @@ msgstr "" "fill、stroke、fill-strokeパスのパス辞書は、:ref:`Shape` " "クラスと互換性があるように設計されています。次のキーがあります:" -#: ../../page.rst:1507 ../../page.rst:1572 ../../page.rst:1587 -#: 6b98edfc1ddf479ca2acb222da251040 f0cfa595eab64fee9977f8354d76544b -#: f245cb06eaa14a9c8773787d3e8cfc54 +#: ../../page.rst:1544 ../../page.rst:1609 ../../page.rst:1624 +#: 393408d2b822457095e3087546f62541 458dba2523d345e5a88ca32cea9f2563 +#: 71aa6f1d87a14dec9bc593c4852b8b92 msgid "Key" msgstr "キー" -#: ../../page.rst:1507 ../../page.rst:1572 ../../page.rst:1587 -#: c791c064e52f4a8791a331f5ae29fb1d e7d88bb6ef6d4a8a856a5c749dfa72ad -#: fe90a86e9ee142dc87c863400d301386 +#: ../../page.rst:1544 ../../page.rst:1609 ../../page.rst:1624 +#: 13b51a65d0cb4aa6a596d32da8fd7e7d 42168f268feb43eb9865e11f0cbbf1b2 +#: c0187aad35ef4383a39f6386051c5813 msgid "Value" msgstr "値" -#: ../../page.rst:1509 ../../page.rst:1574 26e828a1d17940ca96b646987891103b -#: 47be2008d2684d9ba873a3aed2647d19 +#: ../../page.rst:1546 ../../page.rst:1611 26696677b08447ffbe0b9f71a9decd1b +#: d0b10a7040ac4b17b8132c59a297125a msgid "closePath" msgstr "" -#: ../../page.rst:1509 ../../page.rst:1516 4ae9020640dd4d3eb5a522286d14753a -#: d95bb4db8a784f2ebd9aa31dbb3bddb2 +#: ../../page.rst:1546 ../../page.rst:1553 027accb388bc4b94959cfe7f7db803c4 +#: dc04d87b26674fe088c9f7cfb89d5523 msgid "Same as the parameter in :ref:`Shape`." msgstr ":ref:`Shape` のパラメーターと同じです。" -#: ../../page.rst:1510 c286de369ffa4ca79c41499b7cee4204 +#: ../../page.rst:1547 e1e087cdb53d426fad06bd4f0f085678 msgid "color" msgstr "" -#: ../../page.rst:1510 9a0fce8de0f74f99ae2fe5b032457175 +#: ../../page.rst:1547 a9b159506d3d4cf38106beda57e6d28c msgid "Stroke color (see :ref:`Shape`)." msgstr "ストロークカラー(:ref:`Shape` を参照)。" -#: ../../page.rst:1511 fd3e829a704a4e8a94433140230b3a18 +#: ../../page.rst:1548 a252e93f6e0b48ffa953488444e5a4bb msgid "dashes" msgstr "" -#: ../../page.rst:1511 75a833d16ee54eaa8e968d9cb2452bbf +#: ../../page.rst:1548 8bb14fa16e1845bf935f94c6d4736b01 msgid "Dashed line specification (see :ref:`Shape`)." msgstr "破線の仕様(:ref:`Shape` を参照)。" -#: ../../page.rst:1512 ../../page.rst:1575 32caa8bddff149b9a0276b4c42b95d00 -#: 3beac78796724703ae629130aaaaecfc +#: ../../page.rst:1549 ../../page.rst:1612 aabc659aa5db46d89350b0c21e42c0ec +#: e8709a0b56c94d548479899a2b3094a6 msgid "even_odd" msgstr "" -#: ../../page.rst:1512 bfae0c6d0feb4a9db544e8f5eb63a135 +#: ../../page.rst:1549 1692a5ead1db4cfe96c3a10c2b1a245e msgid "Fill colors of area overlaps -- same as the parameter in :ref:`Shape`." msgstr "領域のオーバーラップの塗りつぶし色(:ref:`Shape` を参照)。" -#: ../../page.rst:1513 5d62db19e8174e27842b38560f5a5d6d +#: ../../page.rst:1550 6b2d98f984794442816100bbcd18f6d4 msgid "fill" msgstr "" -#: ../../page.rst:1513 fbf2303ef45d4d0f9a07302d8e59c185 +#: ../../page.rst:1550 ba3a0087c0984e058fa735b55901644d msgid "Fill color (see :ref:`Shape`)." msgstr "塗りつぶしカラー(:ref:`Shape` を参照)。" -#: ../../page.rst:1514 ../../page.rst:1576 a1264b4fcb2e47e5ac52d1476cc597a5 -#: dfa403ef19a34c078505845c0e9ad68e +#: ../../page.rst:1551 ../../page.rst:1613 2a44968871e149419b600306017f1fef +#: 60e2eb406ea44234a799cfd34b5eb326 msgid "items" msgstr "" -#: ../../page.rst:1514 6b6e2c8a6a6e41eb8d3a3bddd97498f0 +#: ../../page.rst:1551 3a6a1f2e61bf45a49e7f7860c8f095ad msgid "List of draw commands: lines, rectangles, quads or curves." msgstr "描画コマンド(直線、四角形、四角形、曲線など)のリスト。" -#: ../../page.rst:1515 ea408a5b146149a1bedca2eaf984a42d +#: ../../page.rst:1552 cb9b76e8cf524a5c98ca480839f3d46f msgid "lineCap" msgstr "" -#: ../../page.rst:1515 03007a93d78547cfaecd442450dbe08c +#: ../../page.rst:1552 df94fed78bb8464785ae39848ff3f6ce msgid "Number 3-tuple, use its max value on output with :ref:`Shape`." msgstr "3つの数値からなるタプル。出力時に :ref:`Shape` との最大値を使用します。" -#: ../../page.rst:1516 d06763e6a4694b9d91cd639462390794 +#: ../../page.rst:1553 a74d930f12b74359b983626712abe4bb msgid "lineJoin" msgstr "" -#: ../../page.rst:1517 5fec1d8902ba43a6bc03334548906fce +#: ../../page.rst:1554 6eae801db51541a5b15273d2c97236f6 msgid "fill_opacity" msgstr "" -#: ../../page.rst:1517 c868419f174e43ce8d66560dc7aeba52 +#: ../../page.rst:1554 b9c24e4f81fb4f0a915896089b46ea5e msgid "fill color transparency (see :ref:`Shape`). (New in v1.18.17)" msgstr "v1.18.17で新しく追加された塗りつぶしカラーの透明度(:ref:`Shape` を参照)。" -#: ../../page.rst:1518 b747405596f64d9b9f0d5f288085bb68 +#: ../../page.rst:1555 1534d530487d404fb1cb27fcc65e6bad msgid "stroke_opacity" msgstr "" -#: ../../page.rst:1518 0ccd643526c64843b4d1312cd6d7d2aa +#: ../../page.rst:1555 01c66d6eb5194825a65ce561ef2386a6 msgid "stroke color transparency (see :ref:`Shape`). (New in v1.18.17)" msgstr "v1.18.17で新しく追加されたストロークカラーの透明度(:ref:`Shape` を参照)。" -#: ../../page.rst:1519 ../../page.rst:1577 ../../page.rst:1589 -#: 1cb7913edd9143648a2301ed8229a1ee ac19ac2d083245f1a92353d5713218fe -#: d4e718e28c5f41a4bad73153803607e2 +#: ../../page.rst:1556 ../../page.rst:1614 ../../page.rst:1626 +#: 130c57e63d4248269a2d24efddd1dc87 46412bde9048457dbb1dccd27401636d +#: 806a7134a13246b38ff024e7254d053a msgid "rect" msgstr "" -#: ../../page.rst:1519 ba0bd01f57d745d59d71fb45bff3ea72 +#: ../../page.rst:1556 1336dc577f4b46768dd98f3adcc9849a msgid "Page area covered by this path. Information only." msgstr "このパスでカバーされるページ領域。情報のみ。" -#: ../../page.rst:1520 ../../page.rst:1578 ../../page.rst:1590 -#: 0f463bda6054408b996cb1c69684fca6 6f1c45f0d6894612b522e1c7cf1d6077 -#: c05d2831a7e249878980d8f092192d5f +#: ../../page.rst:1557 ../../page.rst:1615 ../../page.rst:1627 +#: 110f5af1db4a400ab89318a54580360c a83adc3a34334bcca12f1710b2b3d8c3 +#: c3151b8cbcf44e8f827889ac3fb4f99c msgid "layer" msgstr "" -#: ../../page.rst:1520 24765720d59a4d8ba806b9fae9eef851 +#: ../../page.rst:1557 4cac8f9bb75c445ebada436459309ae7 msgid "name of applicable Optional Content Group. (New in v1.22.0)" msgstr "v1.22.0で新しく追加された適用可能なオプションコンテンツグループの名前" -#: ../../page.rst:1521 ../../page.rst:1579 ../../page.rst:1591 -#: 1f47100547164b1f959e414199cd0d43 3f179d4cb4494e0fb815514e8107dd0e -#: 730bc99c65444870bccdad171231587f +#: ../../page.rst:1558 ../../page.rst:1616 ../../page.rst:1628 +#: 32a388c0ae9e43b4864436ba5529bb51 6884400e8f7b455a84bd11dc8109d30d +#: a3159f4039944ea495f41a21ba9863b0 msgid "level" msgstr "" -#: ../../page.rst:1521 34cdc445fe1f4ac7b0f14b7c40480be1 +#: ../../page.rst:1558 edae31d7cf5044199b5f797d6674b0ef msgid "the hierarchy level if `extended=True`. (New in v1.22.0)" msgstr "v1.22.0で新しく追加された `extended=True` の場合の階層レベル" -#: ../../page.rst:1522 2f1e619c42864db9857fe90f7ddcfd72 +#: ../../page.rst:1559 098b52475c684292aa26bb7288ead6ce msgid "seqno" msgstr "" -#: ../../page.rst:1522 d0d808bd1d3a48f1bfb800f2b88130e4 +#: ../../page.rst:1559 8f2a52910e614ac0aba436bc05c8db59 msgid "command number when building page appearance. (New in v1.19.0)" msgstr "v1.19.0で新しく追加されたページ表示を構築する際のコマンド番号" -#: ../../page.rst ../../page.rst:1523 ../../page.rst:1581 ../../page.rst:1596 -#: 06fd29e733c24637b35c467376531f15 177c7860a8194286b2fa065cb78738fc -#: 1e571e3a679f48d39d2e31fd0cbe6f36 2aff801c5c874528a9a35fb18fe74312 -#: 30e662d867fa4e56b6403e91dfd429cb 40492d7f4e744fba96409d1f112fec58 -#: 5b819df0f0eb4d0aa8ec5b5f9f86a365 64cbf798588c40b798731fe73cf027ea -#: 9689eb1463674f0fbad51610539f21dd ac5f11afb4834bf6922cb2e9e899c5f1 -#: af5bb1b6799d4152971be0026c751499 b8b6da0420da4afa99855b13054501be -#: c9ad6ef7343245e595c1e1a92e8954a8 d1aa644528b14ebba3456357c3133745 -#: d87e5c0dcd664111880b3c830f705ed3 dd1bf620af244b75b27bb02bf181e6ee -#: e7b934bbea0e4d7fab46e4f343ec54a1 e7f804c253c04514b5f966e809744a35 +#: ../../page.rst ../../page.rst:1560 ../../page.rst:1618 ../../page.rst:1633 +#: 0187845dfd2d4ee084a262cb36b8985c 0eadb3e4525c45bb86f3b1af78e7cf34 +#: 1158885c029f44aaa3aec86f864b90ff 16618b69d5694c7e8c3de116af457f29 +#: 2d3676885927439284814cb8621c96e1 3ad717fc68c14f8dbba07109137899c6 +#: 3bd25acd69dd4c2fb54e978b7031a741 3ccf929dae10448c8b83d52d1f9d984f +#: 54e233a919754060825591f98bd4c900 58befc90975f4205a4182a917cf36d8d +#: 67932413ef2145cba61ec47fa54f7b7e 6840933d410c401dbbd55c4201013c06 +#: 6ded2cd06d63442e8dfd90dfe1b81f98 9de10b64fe424db78eced2a5f76d03ae +#: b897b219782646a68f777df1d12f2e16 cfb41b6757a04aa08b31c12a2aca5952 +#: fc7913bd3618478385f9fbee9046c79a fd791ed75f8d4613941e44c51417f2cf msgid "type" msgstr "" -#: ../../page.rst:1523 b0167656d01c41a9b0b25d3459217f76 +#: ../../page.rst:1560 1209bf05f4134e49be33f9d80ee2c7fb msgid "type of this path. (New in v1.18.17)" msgstr "このパスのタイプ。 (v1.18.17で新規追加)" -#: ../../page.rst:1524 ../../page.rst:1665 4507100c333c48f2864fb1eed6f2c7cc -#: d59a5804ca9444d8be59f11b66c69c19 +#: ../../page.rst:1561 ../../page.rst:1704 53eee255c71e4a8fb09a4bb18a1ef79f +#: 9dc965006ec748258c1a164c5bdc705a msgid "width" msgstr "" -#: ../../page.rst:1524 018528ad7814434a91206a46c4b7ed14 +#: ../../page.rst:1561 1f2f3ef30724469bb3d678374e796801 msgid "Stroke line width. (see :ref:`Shape`)." msgstr "ストロークラインの幅(:ref:`Shape` を参照)。" -#: ../../page.rst:1527 bf279b279cdd4e94ad849af0c82b326e +#: ../../page.rst:1564 81ef9447d1ec4960929d0585a4608a21 msgid "" "Key `\"opacity\"` has been replaced by the new keys `\"fill_opacity\"` " "and `\"stroke_opacity\"`. This is now compatible with the corresponding " @@ -4153,47 +4347,47 @@ msgstr "" "\"stroke_opacity\"` に置き換えられました。これは、:meth:`Shape.finish` " "の対応するパラメーターと互換性があるようになりました。" -#: ../../page.rst:1530 e5caa4fcbf2549f7acc8bb96545b9a7e +#: ../../page.rst:1567 b167ed1c31b143ac9dcf19ad183e37b4 msgid "" "For paths other than groups or clips, key `\"type\"` takes one of the " "following values:" msgstr "グループやクリップ以外のパスに対して、キー `\"type\"` は次のいずれかの値を取ります:" -#: ../../page.rst:1532 89e38fb1c503491b86274895997e2472 +#: ../../page.rst:1569 3b3d69ec50114ee18f0080c18ec9f065 msgid "" "**\"f\"** -- this is a *fill-only* path. Only key-values relevant for " "this operation have a meaning, not applicable ones are present with a " -"value of *None*: `\"color\"`, `\"lineCap\"`, `\"lineJoin\"`, `\"width\"`," -" `\"closePath\"`, `\"dashes\"` and should be ignored." +"value of ``None``: `\"color\"`, `\"lineCap\"`, `\"lineJoin\"`, " +"`\"width\"`, `\"closePath\"`, `\"dashes\"` and should be ignored." msgstr "" "**\"f\"** - これは *fill-only* のパスです。この操作に関連するキーの値のみが意味を持ち、適用されないものは値が " -"*None* で存在します。: " +"``None`` で存在します。: " "`\"color\"`、`\"lineCap\"`、\"lineJoin\"`、`\"width\"`、`\"closePath\"`、`\"dashes\"`" " は無視すべきです。" -#: ../../page.rst:1533 0352fa7a65984bbcbc22ea10988bdd6f +#: ../../page.rst:1570 988a037de5f24f12aec744aacf3cf3e8 msgid "" "**\"s\"** -- this is a *stroke-only* path. Similar to previous, key " -"`\"fill\"` is present with value *None*." +"`\"fill\"` is present with value ``None``." msgstr "" -"**\"s\"** - これは *stroke-only* のパスです。以前と同様に、キー `\"fill\"` は値が *None* " +"**\"s\"** - これは *stroke-only* のパスです。以前と同様に、キー `\"fill\"` は値が ``None`` " "で存在します。" -#: ../../page.rst:1534 29f062fc4a9748ee999955238504880c +#: ../../page.rst:1571 07bfe3bf200d42a2855eceffd0a4fe03 msgid "" "**\"fs\"** -- this is a path performing combined *fill* and *stroke* " "operations." msgstr "**\"fs\"** - これは *fill* と *stroke* の組み合わせ操作を実行するパスです" -#: ../../page.rst:1536 0a2913a3bb5d45878af8f781c84523d4 +#: ../../page.rst:1573 03e22e6694944c63910532f9f142335a msgid "Each item in `path[\"items\"]` is one of the following:" msgstr "`path[\"items\"]` の各アイテムは、次のいずれかです:" -#: ../../page.rst:1538 0bf2b19a4fd84bf7a57b21be950c1f60 +#: ../../page.rst:1575 3c00827256044dbfbc79a52cb11e361b msgid "`(\"l\", p1, p2)` - a line from p1 to p2 (:ref:`Point` objects)." msgstr "`(\"l\", p1, p2)` - p1 から p2 への直線(:ref:`Point` オブジェクト)。" -#: ../../page.rst:1539 69317b0f6fc441e59b97ccfc3761b962 +#: ../../page.rst:1576 91ede118ec4c46d1a6aab2b448107ce7 msgid "" "`(\"c\", p1, p2, p3, p4)` - cubic Bézier curve **from p1 to p4** (p2 and " "p3 are the control points). All objects are of type :ref:`Point`." @@ -4201,7 +4395,7 @@ msgstr "" "`(\"c\", p1, p2, p3, p4)` - **p1 から p4 へ** の三次ベジエ曲線(p2 と p3 " "は制御点です)。すべてのオブジェクトは :ref:`Point` タイプです。" -#: ../../page.rst:1540 4ba2111ddfe04088bcd3205d64e65cad +#: ../../page.rst:1577 9f78d0c38d1c4ed1909ddfafc7d7088f msgid "" "`(\"re\", rect, orientation)` - a :ref:`Rect`. Multiple rectangles within" " the same path are now detected (changed in v1.18.17). Integer " @@ -4213,7 +4407,7 @@ msgstr "" "(v1.18.17で変更)。整数のorientationは、含まれる領域が左に回転しているかどうかを示します (1 = " "反時計回り)。または右に回転しているかどうかを示します [#f7]_ (v1.19.2で変更)" -#: ../../page.rst:1541 3101c3807e5744778172146be5744374 +#: ../../page.rst:1578 371921535bb54730bd6e6ae40f6f0ec6 msgid "" "`(\"qu\", quad)` - a :ref:`Quad`. 3 or 4 consecutive lines are detected " "to actually represent a :ref:`Quad` (changed in v1.19.2:). (New in " @@ -4223,19 +4417,20 @@ msgstr "" ":ref:`Quad`。*バージョン1.18.17で新しく追加され、バージョン1.19.2で変更されました:* 3つまたは4つの連続する線が " "Quad を実際に表すことが検出されます。" -#: ../../page.rst:1545 b893d78688044690b9da30eca6f6ffd5 +#: ../../page.rst:1582 2fdae2c2334145c398860d9a461ae5d0 +#, fuzzy msgid "" "Using class :ref:`Shape`, you should be able to recreate the original " "drawings on a separate (PDF) page with high fidelity under normal, not " "too sophisticated circumstances. Please see the following comments on " -"restrictions. A coding draft can be found in section \"Extractings " -"Drawings\" of chapter :ref:`FAQ`." +"restrictions. A coding draft can be found in :ref:`How to Extract " +"Drawings `." msgstr "" "クラス :ref:`Shape` " "を使用すると、通常の、あまり洗練されていない状況で、高い忠実度で元の図面を別の(PDF)ページに再作成できるはずです。制約事項に関する以下のコメントをご覧ください。コーディングのドラフトは、:ref:`FAQ`" " の「図面の抽出」章のセクションにあります。" -#: ../../page.rst:1547 2ac34fe8cb9a45399cb8e2e75e78248f +#: ../../page.rst:1584 72acac2299b34c81a392f3bccec0e477 msgid "" "Specifying `extended=True` significantly alters the output. Most " "importantly, new dictionary types are present: \"clip\" and \"group\". " @@ -4249,7 +4444,7 @@ msgstr "" "\"level\"、つまり階層レベルでエンコードされた階層構造に組織されます。各グループまたはクリップは、新しい階層を確立し、それ以降のすべてのパスに適用されます。" " (v1.22.0で新規)" -#: ../../page.rst:1549 f53d58ad83d449c6a9fc7223e0fe78a8 +#: ../../page.rst:1586 78f9993923e4497095371055bed7337c msgid "" "Any path with a smaller level value than its predecessor will end the " "scope of (at least) the preceding hierarchy level. A \"clip\" path with " @@ -4259,92 +4454,92 @@ msgstr "" "前任者よりも小さいレベル値を持つパスは、少なくとも前の階層レベルのスコープを終了します。前のクリップと同じレベルの \"clip\" " "パスは、そのクリップのスコープを終了します。同様に、グループも同じです。これは、次の例で最もよく説明されます:" -#: ../../page.rst:1565 3e0821eb40a8421da96052d519c035db +#: ../../page.rst:1602 518670f803774fef8d597ef4f8582fff msgid "" "The clip in line 0 applies to line including line 7. Group in line 2 " "applies to lines 3 to 5, clip in line 3 only applies to line 4." msgstr "行0の「clip」は行7を含む行全体に適用されます。行2の「group」は行3から5までの行に適用され、行3の「clip」は行4にのみ適用されます。" -#: ../../page.rst:1567 46743a7c6d3040aab56ee8b7e1a5a7bd +#: ../../page.rst:1604 ff542185175047f39093ef6713daa77e msgid "" "\"stroke\" in line 4 is under control of \"group\" in line 2 and \"clip\"" " in line 3 (which in turn is a subset of line 0 clip)." msgstr "行4の「stroke」は行2の「group」と行3の「clip」(それ自体が行0の「clip」のサブセットです)の制御下にあります。" -#: ../../page.rst:1569 bc70591c8cb14305916335bbea279ee7 +#: ../../page.rst:1606 4c9eb2889b1341abae507671eeb4430f msgid "" "**\"clip\"** dictionary. Its values (most importantly \"scissor\") remain" " valid / apply as long as following dictionaries have a **larger " "\"level\"** value." msgstr "**「clip」** 辞書。その値(特に「scissor」)は、後続の辞書が「level」の値が大きい限り、有効で適用されます。" -#: ../../page.rst:1574 ../../page.rst:1575 ../../page.rst:1576 -#: ../../page.rst:1577 ../../page.rst:1578 ../../page.rst:1579 -#: ../../page.rst:1589 ../../page.rst:1590 ../../page.rst:1591 -#: 10d3e9e1b4094c77b0f22342e3a67cb2 1fd989fd3f4d411187ef38df044e72b2 -#: 33be775421414ea8951094623a2fe75d 759498343e6c4f778dccde235c0102d3 -#: 92e8787075db44d3a92cb378254cc125 c71dec5a053647b8be30534a5a160dab -#: d407bbcc17784a65a16064a3f17fd3c1 de7985e26c3f49619da10ef6b1ff2a14 -#: f9a8757d46cd416c89606551864811b1 +#: ../../page.rst:1611 ../../page.rst:1612 ../../page.rst:1613 +#: ../../page.rst:1614 ../../page.rst:1615 ../../page.rst:1616 +#: ../../page.rst:1626 ../../page.rst:1627 ../../page.rst:1628 +#: 00708434df3e4b10b0b7ca3b1961e46e 36261a32f85343e18df60acdef3de80e +#: 3b1be494f64548488186845048e73b93 6894568d50fd4817a0495ad67f263519 +#: 6bef9c67c7874524adc53b80c6c509c2 844ec8c3cb634f2a8e56a264fd7c5b76 +#: 97b5b323326742448390087dd206b52e b4a138abbc7547c688d138332903b9bd +#: fe4aa6cbb7544adbad42a2545538a195 msgid "Same as in \"stroke\" or \"fill\" dictionaries" msgstr "「stroke」または「fill」の辞書と同じ" -#: ../../page.rst:1580 12274a70901c4278b440dca5143b1c78 +#: ../../page.rst:1617 5799467150d447b8975d22e3ed57991d msgid "scissor" msgstr "" -#: ../../page.rst:1580 0dc0546181704d24a4498210c28a5310 +#: ../../page.rst:1617 98ed3a3f26a5468e8dd3a2f702b807ce msgid "the clip rectangle" msgstr "クリップ矩形" -#: ../../page.rst:1581 d03c83ec8c854c3080e998b2021d6e49 +#: ../../page.rst:1618 0ac8a416c31246f18dffe4ea218c4f41 msgid "\"clip\"" msgstr "" -#: ../../page.rst:1584 e7bae9a8b3f04f499b36aa9edbe6ce9b +#: ../../page.rst:1621 ab06e320a99a484184c964948f721d12 msgid "" "\"group\" dictionary. Its values remain valid (apply) as long as " "following dictionaries have a **larger \"level\"** value. Any dictionary " "with an equal or lower level end this group." msgstr "「group」辞書。その値は、後続の辞書が「level」の値が大きい限り、有効で適用されます。同じレベルまたはそれ以下の辞書がこのグループを終了します。" -#: ../../page.rst:1592 8f79d301449f4156985f13259ecd819d +#: ../../page.rst:1629 21f70ce4824140369709f403395aeb58 msgid "isolated" msgstr "" -#: ../../page.rst:1592 d25d115f2c3a4c0ebbede9ae1bd91a2a +#: ../../page.rst:1629 305aef306fdd4e899633800405864d16 msgid "(bool) Whether this group is isolated" msgstr "(ブール)このグループが孤立しているかどうか" -#: ../../page.rst:1593 d0563eaf867649e9a30902d3c460d342 +#: ../../page.rst:1630 72571437b8314dd3b58ec87c7e7512eb msgid "knockout" msgstr "" -#: ../../page.rst:1593 9db00f0e1bbc48c3bb0a4093b4d394ce +#: ../../page.rst:1630 a7ec60d6c46a4878be2e0e27e387ecdf msgid "(bool) Whether this is a \"Knockout Group\"" msgstr "(ブール)これが「Knockout Group」であるかどうか" -#: ../../page.rst:1594 296581d751c14ef787243b9e581f0b2d +#: ../../page.rst:1631 a12505526ca0472192aca874933194ea msgid "blendmode" msgstr "" -#: ../../page.rst:1594 09770494d890405589911171d2310d28 +#: ../../page.rst:1631 787b1336af0a45f8ad2739d7489abf1d msgid "Name of the BlendMode, default is \"Normal\"" msgstr "BlendModeの名前、デフォルトは「Normal」" -#: ../../page.rst:1595 add5374f33b543b79508ef8465f16d24 +#: ../../page.rst:1632 bb99f31673f2428baf49ad239fdaef45 msgid "opacity" msgstr "" -#: ../../page.rst:1595 ba5270e2987d4926ac4d0b9953cdc62a +#: ../../page.rst:1632 5cfdfb34fceb40dab8047cfe1567f318 msgid "Float value in range [0, 1]." msgstr "範囲[0、1]内の浮動小数点値" -#: ../../page.rst:1596 51c751c306a647149b6a99487ea25333 +#: ../../page.rst:1633 e7316c83d8c7478bb2e00fdd22c6b896 msgid "\"group\"" msgstr "" -#: ../../page.rst:1599 1529a2e784dc4351b4eb6a95bdff53c7 +#: ../../page.rst:1636 da8f4621891e416f828a89cb326b02ab msgid "" "The method is based on the output of :meth:`Page.get_cdrawings` -- which " "is much faster, but requires somewhat more attention processing its " @@ -4353,19 +4548,19 @@ msgstr "" "このメソッドは、 :meth:`Page.get_cdrawings` " "の出力に基づいています。これははるかに高速ですが、出力の処理には多少の注意が必要です。" -#: ../../page.rst:1603 9a74db901bab4e81bdd191c79aba05a6 +#: ../../page.rst:1640 32a464cfe34343d9b6204cad42d58265 msgid "New in v1.18.0" msgstr "v1.18.0で新規追加" -#: ../../page.rst:1604 05e2f23f0c144ed6bc5d92f1411a2b4b +#: ../../page.rst:1641 5557f6c323b047e8a79e12a115c5e18d msgid "Changed in v1.18.17" msgstr "v1.18.17で変更" -#: ../../page.rst:1605 32d864b05e1b470aa1dd8a510e6fbf86 +#: ../../page.rst:1642 d7882895ef5c47d9ac796cd7abccab8c msgid "Changed in v1.19.0: add \"seqno\" key, remove \"clippings\" key" msgstr "v1.19.0で変更: “seqno”キーを追加、“clippings”キーを削除" -#: ../../page.rst:1606 3e755a5be0744fada20a1a03ed435766 +#: ../../page.rst:1643 2917e8fbf31d401eb7239aa8197386d5 msgid "" "Changed in v1.19.1: \"color\" / \"fill\" keys now always are either are " "RGB tuples or `None`. This resolves issues caused by exotic colorspaces." @@ -4373,25 +4568,25 @@ msgstr "" "v1.19.1で変更: “color” / " "“fill”キーは常にRGBタプルまたはNoneのいずれかであるように変更。これにより、異常なカラースペースに起因する問題が解消されます。" -#: ../../page.rst:1607 880b11fd13ce4e3d84762190eeb8f4e1 +#: ../../page.rst:1644 f91d5d6bf1454c399ff142ef9d09ac82 msgid "" "Changed in v1.19.2: add an indicator for the *\"orientation\"* of the " "area covered by an \"re\" item." msgstr "v1.19.2で変更: \"re\" アイテムでカバーされる領域の *\"orientation\"* を示すインジケーターを追加" -#: ../../page.rst:1608 7f78489ec69647cca93b59f0e83ea2ab +#: ../../page.rst:1645 25ed451c52654edb900e8f2b2c3f6975 msgid "" "Changed in v1.22.0: add new key `\"layer\"` which contains the name of " "the Optional Content Group of the path (or `None`)." msgstr "v1.22.0で変更: 新しいキー `\"layer\"` を追加。これにはパスのオプションコンテンツグループの名前が含まれます(またはNone)。" -#: ../../page.rst:1609 5e00311a68734d759761de3229d881d7 +#: ../../page.rst:1646 87f19548799a4a4caf065edc85c41c04 msgid "" "Changed in v1.22.0: add parameter `extended` to also return clipping and " "group paths." msgstr "v1.22.0で変更: クリッピングとグループパスも返すようにするためのパラメーター `extended` を追加" -#: ../../page.rst:1617 f7306efeac304f20ada9b160862a6a2e +#: ../../page.rst:1654 7c7f3eeb00d74a00b9419f994f8d9534 msgid "" "Extract the vector graphics on the page. Apart from following technical " "differences, functionally equivalent to :meth:`Page.get_drawings`, but " @@ -4400,7 +4595,7 @@ msgstr "" "ページ上のベクトルグラフィックスを抽出します。技術的な違いを除いて、:meth:`Page.get_drawings` " "と機能的に同等ですが、はるかに高速です:" -#: ../../page.rst:1619 db5bc5cd18474634af5d7d71405cc879 +#: ../../page.rst:1656 023de9744ac9411b958d3054d8e3c115 msgid "" "Every path type only contains the relevant keys, e.g. a stroke path has " "no `\"fill\"` color key. See comment in method :meth:`Page.get_drawings`." @@ -4408,7 +4603,7 @@ msgstr "" "各パスタイプには関連するキーのみ含まれます。たとえば、ストロークパスには `\"fill\"` カラーキーはありません。 " ":meth:`Page.get_drawings` メソッドのコメントを参照してください。" -#: ../../page.rst:1620 b0ed39eab7424578be51b55eb2842c7b +#: ../../page.rst:1657 ae5e1a20ce2349fd85b839dec6d625e9 msgid "" "Coordinates are given as :data:`point_like`, :data:`rect_like` and " ":data:`quad_like` **tuples** -- not as :ref:`Point`, :ref:`Rect`, " @@ -4417,7 +4612,7 @@ msgstr "" "座は :data:`point_like`、:data:`rect_like`、:data:`quad_like` の **tuples** " "として与えられます。:ref:`Point`、:ref:`Rect`、:ref:`Quad` オブジェクトとしてではなく。" -#: ../../page.rst:1622 fa3c41c0d2c4447694693cf7103cbc87 +#: ../../page.rst:1659 672220608ee04133868cae370cffa4de msgid "" "If performance is a concern, consider using this method: Compared to " "versions earlier than 1.18.17, you should see much shorter response " @@ -4425,54 +4620,50 @@ msgid "" " ms with this method." msgstr "性能が懸念される場合、このメソッドを使用することを検討してください。バージョン1.18.17より前と比較して、応答時間が大幅に短縮されるはずです。以前は2秒かかったページが、このメソッドを使用すると200ミリ秒で完了する場合もあります。" -#: ../../page.rst:1626 0b2e9d214f834c25943410ec3b7a5248 +#: ../../page.rst:1663 ba2fc7d605a447d68614c99ed6bcf5a4 msgid "New in v1.18.17" msgstr "新機能(v1.18.17)" -#: ../../page.rst:1627 b78d895d460c47129fde3b4d83587851 +#: ../../page.rst:1664 36e4da9e6b204e919d667956b868c5bb msgid "Changed in v1.19.0: removed \"clippings\" key, added \"seqno\" key." msgstr "v1.19.0で変更:「clippings」キーを削除、新たに「seqno」キーを追加。" -#: ../../page.rst:1628 f6bf5ae310ff419bb2892287ef4fbb46 +#: ../../page.rst:1665 088a36a4a3a64ca5ad2314d3b87b768b msgid "Changed in v1.19.1: always generate RGB color tuples." msgstr "v1.19.1で変更:常にRGBカラータプルを生成します。" -#: ../../page.rst:1629 eb07c2c3ffbd4a059574c3b4764dca0f +#: ../../page.rst:1666 5e3d920ef2fa413c9c20d2da38d1d0c9 msgid "" "Changed in v1.22.0: added new key `\"layer\"` which contains the name of " "the Optional Content Group of the path (or `None`)." msgstr "v1.22.0で変更:新たに「layer」というキーが追加され、パスのオプションコンテンツグループの名前(またはNone)が含まれます。" -#: ../../page.rst:1630 c44c65937a5d4d238a01d6ad266bae49 +#: ../../page.rst:1667 443a908c4dfb4f3e82db28d4019f2bd8 #, fuzzy msgid "" "Changed in v1.22.0: added parameter `extended` to also return clipping " "paths." msgstr "v1.22.0で変更:クリッピングパスを返すためのパラメータ「extended」が追加されました。" -#: ../../page.rst:1637 7a5f76a7ea60433180a970fc12a5010f +#: ../../page.rst:1674 471ae179e62947fe816a041b22a17f96 msgid "" "PDF only: Return a list of fonts referenced by the page. Wrapper for " ":meth:`Document.get_page_fonts`." msgstr "PDFのみ:ページで参照されているフォントのリストを返します。:meth:`Document.get_page_fonts` のラッパーです。" -#: ../../page.rst:1642 7d6f6d1c743b4f959250ce4da7d4bd04 +#: ../../page.rst:1679 678652f759594090a964a286b0eb5416 msgid "" "PDF only: Return a list of images referenced by the page. Wrapper for " ":meth:`Document.get_page_images`." msgstr "PDFのみ:ページで参照されているイメージのリストを返します。:meth:`Document.get_page_images` のラッパーです。" -#: ../../page.rst:1651 e1418bb537224353bd2b5ddb109ef24b +#: ../../page.rst:1688 3f5a4bd61cb647f89854e64498c7d4bc msgid "" -"Return a list of meta information dictionaries for all images shown on " -"the page. This works for all document types. Technically, this is a " -"subset of the dictionary output of :meth:`Page.get_text`: the image " -"binary content and any text on the page are ignored." +"Return a list of meta information dictionaries for all images displayed " +"by the page. This works for all document types." msgstr "" -"ページ上に表示されているすべてのイメージに関するメタ情報辞書のリストを返します。これはすべての文書タイプで機能します。技術的には、これは " -":meth:`Page.get_text` の辞書出力のサブセットであり、画像のバイナリコンテンツとページ上のテキストは無視されます。" -#: ../../page.rst:1653 895b84b3a9e34b3fab9932c0646e1908 +#: ../../page.rst:1690 62d3cc2b9c8b4122a4b3c7bd6e6f6244 msgid "" "Compute the MD5 hashcode for each encountered image, which allows " "identifying image duplicates. This adds the key `\"digest\"` to the " @@ -4481,51 +4672,51 @@ msgstr "" "*新機能(v1.18.13)*:各イメージのMD5ハッシュコードを計算し、イメージの重複を識別できるようにします。これにより、出力に " "`\"digest\"` キーが追加され、その値は16バイトのバイトオブジェクトです。" -#: ../../page.rst:1655 ed68382748774adbadcf8af8c7ca3b9f +#: ../../page.rst:1692 212bbe5e3a9e4a398d240ae31071e3a1 msgid "" "**PDF only.** Try to find the :data:`xref` for each image. Implies " "`hashes=True`. Adds the `\"xref\"` key to the dictionary. If not found, " -"the value is 0, which means, the image is either \"inline\" or otherwise " -"undetectable. Please note that this option has an extended response time," -" because the MD5 hashcode will be computed at least two times for each " -"image with an xref. (New in v1.18.13)" +"the value is 0, which means, the image is either \"inline\" or its xref " +"is undetectable for some reason. Please note that this option has an " +"extended response time, because the MD5 hashcode will be computed at " +"least two times for each image with an xref. (New in v1.18.13)" msgstr "" -"**PDFのみ。** 各画像の :data:`xref` を見つけようとします。`hashes=True` を意味します。辞書に " -"`\"xref\"` " -"キーを追加します。見つからない場合、値は0で、画像が「インライン」であるか、または他の方法で検出できないことを意味します。このオプションは、少なくとも各画像に対してMD5ハッシュコードが2回計算されるため、応答時間が延びることに注意してください。(v1.18.13で新規追加)" -#: ../../page.rst:1658 24ebc3daa82a449b9e5f7352404541b9 +#: ../../page.rst:1695 80d27211efe549a2bba271837f108080 msgid "" "A list of dictionaries. This includes information for **exactly those** " -"images, that are shown on the page -- including *\"inline images\"*. In " -"contrast to images included in :meth:`Page.get_text`, image **binary " -"content** is not loaded, which drastically reduces memory usage. The " +"images, that are shown on the page -- including *\"inline images\"*. The " "dictionary layout is similar to that of image blocks in " -"`page.get_text(\"dict\")`. =============== " +"`page.get_text(\"dict\")`. In contrast to images included in " +":meth:`Page.get_text`, image **binary content** is not loaded by this " +"method, which drastically reduces memory usage. Another difference is " +"that image detection is not restricted to the visible part of the page or" +" any ``clip`` parameter: method :meth:`Page.get_text` will only extract " +"images **fully contained** in the provided ``clip``. =============== " "=============================================================== **Key**" " **Value** =============== " "=============================================================== number" -" block number *(int)* bbox image bbox on page, " -":data:`rect_like` width original image width *(int)* height" -" original image height *(int)* cs-name colorspace name " -"*(str)* colorspace colorspace.n *(int)* xres resolution " -"in x-direction *(int)* yres resolution in y-direction *(int)* " -"bpc bits per component *(int)* size storage " -"occupied by image *(int)* digest MD5 hashcode *(bytes)*, if " -"*hashes* is true xref image :data:`xref` or 0, if *xrefs* is " -"true transform matrix transforming image rect to bbox, " -":data:`matrix_like` =============== " +" block number (``int``) bbox image bbox on page, " +":data:`rect_like` width original image width (``int``) height" +" original image height (``int``) cs-name colorspace name" +" (``str``) colorspace colorspace.n (``int``) xres " +"resolution in x-direction (``int``) yres resolution in " +"y-direction (``int``) bpc bits per component (``int``) size" +" storage occupied by image (``int``) digest MD5 " +"hashcode (``bytes``), if ``hashes`` is true xref image " +":data:`xref` or 0, if *xrefs* is true transform matrix transforming" +" image rect to bbox, :data:`matrix_like` has-mask whether the " +"image is transparent and has a mask (``bool``) =============== " "=============================================================== Multiple" " occurrences of the same image are always reported. You can detect " "duplicates by comparing their `digest` values." msgstr "" -#: ../../page.rst:1658 3c4ca97d948e4782a3f6b8a25bf5209e +#: ../../page.rst:1695 df3d733c760b42caae6ddeb348dad159 +#, fuzzy msgid "" "A list of dictionaries. This includes information for **exactly those** " -"images, that are shown on the page -- including *\"inline images\"*. In " -"contrast to images included in :meth:`Page.get_text`, image **binary " -"content** is not loaded, which drastically reduces memory usage. The " +"images, that are shown on the page -- including *\"inline images\"*. The " "dictionary layout is similar to that of image blocks in " "`page.get_text(\"dict\")`." msgstr "" @@ -4533,131 +4724,159 @@ msgstr "" "で含まれている画像ブロックとは異なり、画像の **binary content** " "は読み込まれないため、メモリの使用量が大幅に削減されます。辞書のレイアウトは、ページ.get_text(\"dict\")内のイメージブロックと似ています。" -#: ../../page.rst:1661 92f5f36aa36d49f5ba29d32c6101275f +#: ../../page.rst:1697 bb7f0eb8920446e2a95b41dad2cd03aa +msgid "" +"In contrast to images included in :meth:`Page.get_text`, image **binary " +"content** is not loaded by this method, which drastically reduces memory " +"usage. Another difference is that image detection is not restricted to " +"the visible part of the page or any ``clip`` parameter: method " +":meth:`Page.get_text` will only extract images **fully contained** in the" +" provided ``clip``." +msgstr "" + +#: ../../page.rst:1700 d6808dea01c2462db5d3f26ea9e8ce99 msgid "**Key**" msgstr "**キー**" -#: ../../page.rst:1661 180086fa9430449cab396bdd7e0b0998 +#: ../../page.rst:1700 47eb29fdafe740e1bc3b6ad8db5aaa19 msgid "**Value**" msgstr "**値**" -#: ../../page.rst:1663 cd1b8424f3b04113817a60d463696922 +#: ../../page.rst:1702 c8347895111c4af184ddba4555adb866 msgid "number" msgstr "" -#: ../../page.rst:1663 3d1989921b57405da0dbb9d73b4cd14a -msgid "block number *(int)*" +#: ../../page.rst:1702 828deab1c726405abdb2e4101d57e251 +#, fuzzy +msgid "block number (``int``)" msgstr "ブロック番号 *(整数)*" -#: ../../page.rst:1664 9e5c1a5c29c84ea38a7cf18f7bf45855 +#: ../../page.rst:1703 784154b86fb047a98620096b1802e3b4 msgid "bbox" msgstr "" -#: ../../page.rst:1664 aa34e344ef1c4978aef92930e736a977 +#: ../../page.rst:1703 635228e6f5b64be6836b3b52a61020c0 msgid "image bbox on page, :data:`rect_like`" msgstr "ページ上の画像の境界ボックス、:data:`rect_like`" -#: ../../page.rst:1665 c6c372b17df44488a258978195821e9d -msgid "original image width *(int)*" +#: ../../page.rst:1704 32b217ddd7ea4689b499fa074a537239 +#, fuzzy +msgid "original image width (``int``)" msgstr "元の画像の幅 *(整数)*" -#: ../../page.rst:1666 7c1c9e41278f4de4a65d71f45a4c1938 +#: ../../page.rst:1705 856cc2edb6404f7b8efd5d034d3c33b3 msgid "height" msgstr "" -#: ../../page.rst:1666 3c62ecbc6c3b44b48818b6bb17469f54 -msgid "original image height *(int)*" +#: ../../page.rst:1705 0fcad0d7aecc4417a327e0391c7baca0 +#, fuzzy +msgid "original image height (``int``)" msgstr "元の画像の高さ *(整数*" -#: ../../page.rst:1667 a6c952e605f2417aac694f12bb6e587e +#: ../../page.rst:1706 15bfa86900ab44958e5e421c870cc709 msgid "cs-name" msgstr "" -#: ../../page.rst:1667 6d92cfb0d1e24c819679610b68a75b85 -msgid "colorspace name *(str)*" +#: ../../page.rst:1706 ba058ffc7e2b44fda9eb69e699988a0d +#, fuzzy +msgid "colorspace name (``str``)" msgstr "カラースペース名 *(文字列)*" -#: ../../page.rst:1668 ae26eb01760746da8c7a4f517a2a494c +#: ../../page.rst:1707 7dff7ef3d704460ba32f37e2c4c42757 msgid "colorspace" msgstr "" -#: ../../page.rst:1668 4f4a7ec196a84de2b892b886660719fa -msgid "colorspace.n *(int)*" +#: ../../page.rst:1707 c9e510a635cf4f55a06406539518ac8a +#, fuzzy +msgid "colorspace.n (``int``)" msgstr "colorspace.n *(整数)*" -#: ../../page.rst:1669 39b9e44e67fe42d79690dec9403449cc +#: ../../page.rst:1708 4e9e21dec18a471894429e8831d92398 msgid "xres" msgstr "" -#: ../../page.rst:1669 7febd045cb144df6bf67ad5517d3989c -msgid "resolution in x-direction *(int)*" +#: ../../page.rst:1708 6183ea28a0f94b6ba7bec837d338a1d7 +#, fuzzy +msgid "resolution in x-direction (``int``)" msgstr "x方向の解像度 *(整数)*" -#: ../../page.rst:1670 89b0775be1394b4eb3928c179f2a244f +#: ../../page.rst:1709 3f1c22a1d82f4c27868a8058a370756b msgid "yres" msgstr "" -#: ../../page.rst:1670 809e7eb916ec47749bf5f9c675e83a59 -msgid "resolution in y-direction *(int)*" +#: ../../page.rst:1709 0766826d58a84e3d89b3143c5393d545 +#, fuzzy +msgid "resolution in y-direction (``int``)" msgstr "y方向の解像度 *(整数)*" -#: ../../page.rst:1671 07c549f0f8f745fba636c1f1eec265ec +#: ../../page.rst:1710 ae01cbb1647e4a2e91845e39036178f6 msgid "bpc" msgstr "" -#: ../../page.rst:1671 39782c2e87a94e0e86b52126873d14ec -msgid "bits per component *(int)*" +#: ../../page.rst:1710 3308071e1b894f5da96b0e69d9c7e20d +#, fuzzy +msgid "bits per component (``int``)" msgstr "コンポーネントごとのビット数 *(整数)*" -#: ../../page.rst:1672 c13eb9cb47164dfab0e5603205298cbd +#: ../../page.rst:1711 c8e5eb4d00bc44708d3f5230422b946e msgid "size" msgstr "" -#: ../../page.rst:1672 1c0da9361210441fb80e9a0fbd5bb6ed -msgid "storage occupied by image *(int)*" +#: ../../page.rst:1711 f816c64b60fc4726b7fcfa2e8ff41661 +#, fuzzy +msgid "storage occupied by image (``int``)" msgstr "画像が占めるストレージ容量 *(整数)*" -#: ../../page.rst:1673 0ce4960d6c8d4509aefc74b73ba48f0f +#: ../../page.rst:1712 062e8140ddd54d8ca8c3949837c8fccb msgid "digest" msgstr "" -#: ../../page.rst:1673 d60a377bd41d4358aebf8d60fd5a4f23 -msgid "MD5 hashcode *(bytes)*, if *hashes* is true" +#: ../../page.rst:1712 147f3d5fe07a482bbc68b41c972925e0 +#, fuzzy +msgid "MD5 hashcode (``bytes``), if ``hashes`` is true" msgstr "MD5ハッシュコード(バイト)、*hashes* がtrueの場合" -#: ../../page.rst:1674 2275952165654a40afd57b9fa9c1efdd +#: ../../page.rst:1713 851b93bd375b4505a170f6c83584e6f4 msgid "xref" msgstr "" -#: ../../page.rst:1674 e5b880669b5344d68a4becd10227fc4c +#: ../../page.rst:1713 9ec3c23efd3f4c1c816d68aca11e1d0e msgid "image :data:`xref` or 0, if *xrefs* is true" msgstr "画像の :data:`xref` または0、*xrefs* がtrueの場合" -#: ../../page.rst:1675 1b3bb3caa6f543da890a969ff5d41c68 +#: ../../page.rst:1714 e490715ce16c43d891f3ddd27a7cfa36 msgid "transform" msgstr "" -#: ../../page.rst:1675 99ccdf65c1354468a183008322b124c2 +#: ../../page.rst:1714 fd7ef4ea5f644766af5e84743c319664 msgid "matrix transforming image rect to bbox, :data:`matrix_like`" msgstr "画像の境界ボックスをbboxに変換するための行列、:data:`matrix_like`" -#: ../../page.rst:1678 7ebe4d357dcb4b4aa403004e204f72a0 +#: ../../page.rst:1715 c529fa1784e349fd8bf0d11b9d0a28da +msgid "has-mask" +msgstr "" + +#: ../../page.rst:1715 9ee4fd2f5e3a45bc8b7d9f1c1e033133 +msgid "whether the image is transparent and has a mask (``bool``)" +msgstr "" + +#: ../../page.rst:1718 b4e862f8f943414eb557a737640e444a msgid "" "Multiple occurrences of the same image are always reported. You can " "detect duplicates by comparing their `digest` values." msgstr "同じ画像の複数の出現は常に報告されます。digestの値を比較して重複を検出できます。" -#: ../../page.rst:1682 875b5379495d4447b8bab20e0bffd268 +#: ../../page.rst:1722 0c95320613674728b7f2d34d98acbc80 msgid "New in v1.18.11" msgstr "*新機能(v1.18.11)*" -#: ../../page.rst:1683 57d4fc4c32c4484da719951384912992 +#: ../../page.rst:1723 e07cc51bcf1b47f6b2085199addd75ce msgid "" "Changed in v1.18.13: added image MD5 hashcode computation and " ":data:`xref` search." msgstr "*v1.18.13で変更:* イメージのMD5ハッシュコードの計算と :data:`xref` の検索が追加されました。" -#: ../../page.rst:1690 a7660c5465ae464982a7503790aeb64a +#: ../../page.rst:1730 5c8ef65bf74b405e9f9fd6a701444e1e msgid "" "PDF only: Return a list of Form XObjects referenced by the page. Wrapper " "for :meth:`Document.get_page_xobjects`." @@ -4665,7 +4884,7 @@ msgstr "" "PDFのみ:ページで参照されているフォームXObjectのリストを返します。:meth:`Document.get_page_xobjects` " "のラッパーです。" -#: ../../page.rst:1698 81e63a6dfefc40f1a892ce6fc721794c +#: ../../page.rst:1738 111cc4a11e304e0cbdc5d409a89bf667 msgid "" "PDF only: Return boundary boxes and transformation matrices of an " "embedded image. This is an improved version of " @@ -4674,7 +4893,7 @@ msgstr "" "PDFのみ:埋め込み画像の境界ボックスと変換行列を返します。これは :meth:`Page.get_image_bbox` " "の改良バージョンで、次の違いがあります:" -#: ../../page.rst:1700 1759b578552a4af8b2f2b355e9a0fb29 +#: ../../page.rst:1740 041da4952e984e1e8d4504ee464794af msgid "" "There is no restriction on **how** the image is invoked (by the page or " "one of its Form XObjects). The result is always complete and correct." @@ -4682,7 +4901,7 @@ msgstr "" "画像が **どのように** " "呼び出されるかに制限はありません(ページまたはそのフォームXObjectのいずれかによって)。結果は常に完全かつ正確です。" -#: ../../page.rst:1701 6e9a2961eb3f4948b701142877f5e500 +#: ../../page.rst:1741 b0d24a61fd924429baec834bb3136faf msgid "" "The result is a list of :ref:`Rect` or (:ref:`Rect`, :ref:`Matrix`) " "objects -- depending on *transform*. Each list item represents one " @@ -4693,7 +4912,7 @@ msgstr "" "に応じて異なります)。各リスト項目は、ページ上の画像の1つの場所を表します。:meth:`Page.get_image_bbox` " "では複数の出現を検出できない場合があります。" -#: ../../page.rst:1702 ef63015dd2e6447c85faa6a9e4340f71 +#: ../../page.rst:1742 675b184de839446d8241dc2643bead1a msgid "" "The method invokes :meth:`Page.get_image_info` with `xrefs=True` and " "therefore has a noticeably longer response time than " @@ -4702,7 +4921,7 @@ msgstr "" "このメソッドは、`xrefs=True` で :meth:`Page.get_image_info` " "を呼び出すため、:meth:`Page.get_image_bbox` よりも明らかに長い応答時間がかかります。" -#: ../../page.rst:1704 0031820702214c4c9082c2fedb0475b7 +#: ../../page.rst:1744 5cf64fdd46de46ba9b4a4e4b18950e0e msgid "" "an item of the list :meth:`Page.get_images`, or the reference **name** " "entry of such an item (item[7]), or the image :data:`xref`." @@ -4710,31 +4929,31 @@ msgstr "" ":meth:`Page.get_images` のリストアイテム、そのようなアイテムの参照 **name** " "エントリ(item[7])、または画像の :data:`xref`。" -#: ../../page.rst:1705 096b2fd5945f4490b06ee3240c6a1d83 +#: ../../page.rst:1745 b5c476d3b5434c67ac0f8cda2819b352 msgid "" "also return the matrix used to transform the image rectangle to the bbox " "on the page. If true, then tuples `(bbox, matrix)` are returned." msgstr "画像の矩形をbboxに変換するために使用される行列も返すかどうか。trueの場合、タプル `(bbox, matrix)` が返されます。" -#: ../../page.rst:1708 ebcbfde3b41541d4a40cd0184c8690f4 +#: ../../page.rst:1748 db71cfbadd6a4e8c9547136da73da74c msgid "" "Boundary boxes and respective transformation matrices for each image " "occurrence on the page. If the item is not on the page, an empty list " "`[]` is returned." msgstr "ページ上の各画像出現に対する境界ボックスとそれに対応する変換行列。アイテムがページ上にない場合、空のリスト `[]` が返されます。" -#: ../../page.rst:1712 2f69be86ef2544859e9d3f698cf500d5 +#: ../../page.rst:1752 78b5451c3e764c18b742e71138eff3b1 #, fuzzy msgid "New in v1.18.13" msgstr "*v1.18.13で新規追加*" -#: ../../page.rst:1722 85a597d76d274d4e88c19809540e06e4 +#: ../../page.rst:1762 64c2680b84764f1c8c93f2ad607ac44b msgid "" "PDF only: Return boundary box and transformation matrix of an embedded " "image." msgstr "PDFのみ:埋め込まれたイメージの境界ボックスと変換行列を返します。" -#: ../../page.rst:1724 f71aaa0a3e8f4482a707e0fcb1514173 +#: ../../page.rst:1764 692329adf807444293146b7cf42686eb msgid "" "an item of the list :meth:`Page.get_images` with *full=True* specified, " "or the reference **name** entry of such an item, which is item[-3] (or " @@ -4743,7 +4962,7 @@ msgstr "" ":meth:`Page.get_images` のリストのアイテムで *full=True* " "が指定されているもの、またはそのようなアイテムの参照名 **name** エントリ、つまりitem[-3](またはitem[7])。" -#: ../../page.rst:1725 4e6e1f07073a4a94983900df276da8b9 +#: ../../page.rst:1765 83bfa287d98c4c21b0148f5687ce47c8 msgid "" "return the matrix used to transform the image rectangle to the bbox on " "the page (new in v1.18.11). Default is just the bbox. If true, then a " @@ -4752,11 +4971,11 @@ msgstr "" "*(v1.18.11で新規)* イメージの矩形をページのbboxに変換するために使用される行列も返すかどうか。デフォルトはbboxのみです。 " "trueの場合、タプル `(bbox, matrix)` が返されます。" -#: ../../page.rst:1727 8016c9e3181b4cfb9175d71262087801 +#: ../../page.rst:1767 dc06cbcf6ec247c69b6112d38ceb8610 msgid ":ref:`Rect` or (:ref:`Rect`, :ref:`Matrix`)" msgstr ":ref:`Rect` または(:ref:`Rect`、:ref:`Matrix`)" -#: ../../page.rst:1728 f7595af31b7c42279bacdb23227d047b +#: ../../page.rst:1768 cbbf9a59b1394b85bbaa0936b1c976ac msgid "" "the boundary box of the image -- optionally also its transformation " "matrix. |history_begin| * (Changed in v1.16.7): If the page in fact " @@ -4774,13 +4993,13 @@ msgid "" "transform)`. |history_end|" msgstr "" -#: ../../page.rst:1728 9e266182b2cd4cafb4c8a25e5de2b2a9 +#: ../../page.rst:1768 78cc0ccf99754626b7f93f18aa358e3d msgid "" "the boundary box of the image -- optionally also its transformation " "matrix." msgstr "イメージの境界ボックス - オプションでその変換行列も。" -#: ../../page.rst:1732 3d08fcdc2a75475c88b5f688baa98cb0 +#: ../../page.rst:1772 157bed932e804690af8e0f684d405ce0 #, fuzzy msgid "" "(Changed in v1.16.7): If the page in fact does not display this image, an" @@ -4790,7 +5009,7 @@ msgstr "" "*(v1.16.7で変更)* " "–実際にはこのイメージを表示していない場合、無限の矩形が返されるようになりました。以前のバージョンでは、例外が発生しました。形式的に無効なパラメータは引き続き例外を発生させます。" -#: ../../page.rst:1733 af9fff69abba44428a14f0824bb68b18 +#: ../../page.rst:1773 39aa3e88687f4a0f961dbb8c58e03085 #, fuzzy msgid "" "(Changed in v1.17.0): Only images referenced directly by the page are " @@ -4800,14 +5019,14 @@ msgstr "" "*(v1.17.0で変更)* " "–ページで直接参照されているイメージのみが考慮されます。これは、埋め込まれたPDFページに存在するイメージは無視され、例外が発生します。" -#: ../../page.rst:1734 d69454151e1d4372b563fbc727ab2ce4 +#: ../../page.rst:1774 dc88a76dc5d847df8103277879e64b3c #, fuzzy msgid "" "(Changed in v1.18.5): Removed the restriction introduced in v1.17.0: any " "item of the page's image list may be specified." msgstr "*(v1.18.5で変更)* –v1.17.0で導入された制限を削除しました:ページのイメージリストの任意のアイテムを指定できます。" -#: ../../page.rst:1735 c5e3277a5f6241848d1a1a4532c88187 +#: ../../page.rst:1775 d9feb315fe16451fa2e1ee6123c8cc03 #, fuzzy msgid "" "(Changed in v1.18.11): Partially re-instated a restriction: only those " @@ -4817,14 +5036,14 @@ msgstr "" "*(v1.18.11で変更)* " "–一部の制限を部分的に再導入しました:ページで直接参照されるイメージまたはページで直接参照されるフォームXObjectによって参照されるイメージのみが考慮されます。" -#: ../../page.rst:1736 9e03b9479b4a48aaafa669c27cc2037f +#: ../../page.rst:1776 0f1ccad6d7874577a5b4a5e28faef7b2 #, fuzzy msgid "" "(Changed in v1.18.11): Optionally also return the transformation matrix " "together with the bbox as the tuple `(bbox, transform)`." msgstr "*(v1.18.11で変更)* –オプションでbboxと一緒に変換行列も返すことができます(タプルとして)。" -#: ../../page.rst:1742 71db7d76e5814c958237a941cb2fd6ae +#: ../../page.rst:1782 32dd7086bbec409fa23a3f4ab705f284 msgid "" "Be aware that :meth:`Page.get_images` may contain \"dead\" entries i.e. " "images, which the page **does not display**. This is no error, but " @@ -4836,7 +5055,7 @@ msgstr "" "には「不要な」エントリが含まれている場合があることに注意してください。これはPDF作成者によって意図的に設定されたものであり、エラーではありません。この場合、例外は発生しませんが、無限の矩形が返されます。このような状況を回避するには、このメソッドの前に" " :meth:`Page.clean_contents` を実行することができます。" -#: ../../page.rst:1743 e9d8d61510914377bb85230fd571cbe3 +#: ../../page.rst:1783 7863c77d70684c50b665e2193bccdd9e msgid "" "The image's \"transformation matrix\" is defined as the matrix, for which" " the expression `bbox / transform == pymupdf.Rect(0, 0, 1, 1)` is true, " @@ -4845,38 +5064,38 @@ msgstr "" "イメージの「変換行列」は、`bbox / transform == pymupdf.Rect(0, 0, 1, 1)` " "という式が真であるための行列であり、詳細はこちらを参照してください::ref:`ImageTransformation`。" -#: ../../page.rst:1747 c4402fdfb7c640d9ae0fe3e4e07ed7f9 +#: ../../page.rst:1787 0f47d38ff23b463fad5ec3b1a3d8bfba msgid "Changed in v1.18.11: return image transformation matrix" msgstr "変更点 v1.18.11:イメージの変換行列を返すようになりました" -#: ../../page.rst:1756 f0d644a9475f4183a1f532c25a11d08b +#: ../../page.rst:1796 294f09963ba24bf18361007a46123547 msgid "" "Create an SVG image from the page. Only full page images are currently " "supported." msgstr "ページからSVGイメージを作成します。現在、フルページのイメージのみがサポートされています。" -#: ../../page.rst:1758 11d78aeb2c044dfaa17367320592e897 +#: ../../page.rst:1798 5cc04087a9144ff68401bb2066002698 msgid "a matrix, default is :ref:`Identity`." msgstr "行列、デフォルトは :ref:`Identity` です。" -#: ../../page.rst:1759 c7412802a44142178b1bf5bc69521430 +#: ../../page.rst:1799 e2035718de414f338fdbcc01496a7665 msgid "" -"-- controls how text is represented. *True* outputs each character as a " -"series of elementary draw commands, which leads to a more precise text " +"-- controls how text is represented. ``True`` outputs each character as a" +" series of elementary draw commands, which leads to a more precise text " "display in browsers, but a **very much larger** output for text-oriented " -"pages. Display quality for *False* relies on the presence of the " +"pages. Display quality for ``False`` relies on the presence of the " "referenced fonts on the current system. For missing fonts, the internet " "browser will fall back to some default -- leading to unpleasant " -"appearances. Choose *False* if you want to parse the text of the SVG. " +"appearances. Choose ``False`` if you want to parse the text of the SVG. " "(New in v1.17.5)" msgstr "" -"テキストの表現方法を制御します。*True* " -"は、各文字を一連の基本的な描画コマンドとして出力し、これによりブラウザでのテキスト表示がより正確になりますが、テキスト指向のページの場合、非常に大きな出力になります。*False*" +"テキストの表現方法を制御します。``True`` " +"は、各文字を一連の基本的な描画コマンドとして出力し、これによりブラウザでのテキスト表示がより正確になりますが、テキスト指向のページの場合、非常に大きな出力になります。``False``" " " "の場合、表示品質は現在のシステムに参照されるフォントの存在に依存します。欠落しているフォントの場合、インターネットブラウザはいくつかのデフォルトにフォールバックします" -" -- これにより見栄えが悪くなります。SVGのテキストを解析したい場合は *False* を選択してください。(v1.17.5で新規追加)" +" -- これにより見栄えが悪くなります。SVGのテキストを解析したい場合は ``False`` を選択してください。(v1.17.5で新規追加)" -#: ../../page.rst:1761 7c5f682e4da74094af5a3f8fecfa6184 +#: ../../page.rst:1801 e5cac2bee2274605a5a2eaa00d1a850c msgid "" "a UTF-8 encoded string that contains the image. Because SVG has XML " "syntax it can be saved in a text file, the standard extension is `.svg`." @@ -4885,7 +5104,7 @@ msgid "" "method." msgstr "" -#: ../../page.rst:1761 eef8193300bc46b1afd93875d3f9e944 +#: ../../page.rst:1801 b8650b6da460403c94f3cdef21fb84ff msgid "" "a UTF-8 encoded string that contains the image. Because SVG has XML " "syntax it can be saved in a text file, the standard extension is `.svg`." @@ -4893,34 +5112,34 @@ msgstr "" "UTF-8エンコードされた文字列で、イメージを含みます。 SVGにはXML構文があるため、テキストファイルに保存でき、標準の拡張子は `.svg`" " です。" -#: ../../page.rst:1763 f7e3dda0e40549ae864da4691b097c45 +#: ../../page.rst:1803 afae168aaaa34e41a2bd3c0ddb4d6656 msgid "" "In case of a PDF, you can circumvent the \"full page image only\" " "restriction by modifying the page's CropBox before using the method." msgstr "PDFの場合、メソッドを使用する前に、ページのCropBoxを変更して「フルページイメージのみ」制限を回避できます。" -#: ../../page.rst:1775 121420c8390b4714b8866060f1173705 +#: ../../page.rst:1815 7815d15406e34873b6f746aa3d0e663c msgid "" "Create a pixmap from the page. This is probably the most often used " "method to create a :ref:`Pixmap`." msgstr "ページからピクスマップを作成します。おそらく、:ref:`Pixmap` を作成するために最も頻繁に使用されるメソッドでしょう。" -#: ../../page.rst:1777 2eafdb7bc2b74ede9cda77c367a7ce16 +#: ../../page.rst:1817 a37543741184408cb72d2fb84c118f18 msgid "All parameters are *keyword-only.*" msgstr "すべてのパラメータは *keyword-only.* です。" -#: ../../page.rst:1779 a447ae8aa076466386fb8446bbdbd518 +#: ../../page.rst:1819 246c4dc3a2d74918b8d706bd45d0e7b9 msgid "default is :ref:`Identity`." msgstr "デフォルトは :ref:`Identity` です。" -#: ../../page.rst:1780 535db6741a254db096f17b5073aef2e6 +#: ../../page.rst:1820 614bb0010d02467e9b70a7ee68f93a10 #, fuzzy msgid "" "desired resolution in x and y direction. If not `None`, the `\"matrix\"` " "parameter is ignored. (New in v1.19.2)" msgstr "(v1.19.2で新たに追加) x方向およびy方向の所望の解像度。`None` でない場合、`\"matrix\"` パラメータは無視されます。" -#: ../../page.rst:1781 3c056936792b474fb83185a93dbace61 +#: ../../page.rst:1821 32c84baad8cb41058b9ef83f5bffd363 msgid "" "The desired colorspace, one of \"GRAY\", \"RGB\" or \"CMYK\" (case " "insensitive). Or specify a :ref:`Colorspace`, ie. one of the predefined " @@ -4929,79 +5148,79 @@ msgstr "" "所望のカラースペース、\"GRAY\"、\"RGB\"、または\"CMYK\"のいずれか(大文字/小文字を区別しない)。または、:ref:`Colorspace`" " のように、事前定義されたもののいずれかを指定できます::data:`csGRAY`、:data:`csRGB`、:data:`csCMYK`。" -#: ../../page.rst:1783 5521eaa54e3341ecbb32eb9530133817 +#: ../../page.rst:1823 3daf3b67c2654e7883f9cc4742712dfb msgid "" "restrict rendering to the intersection of this area with the page's " "rectangle." msgstr "ページの矩形とこの領域の交差に描画を制限します。" -#: ../../page.rst:1784 02b46e3c5355430eb56b553cee9f5c65 +#: ../../page.rst:1824 618a9cdeb06f496c99cdcd4d8fb37d6c #, fuzzy, python-format msgid "" -"whether to add an alpha channel. Always accept the default *False* if you" -" do not really need transparency. This will save a lot of memory (25% in " -"case of RGB ... and pixmaps are typically **large**!), and also " +"whether to add an alpha channel. Always accept the default ``False`` if " +"you do not really need transparency. This will save a lot of memory (25% " +"in case of RGB ... and pixmaps are typically **large**!), and also " "processing time. Also note an **important difference** in how the image " -"will be rendered: with *True* the pixmap's samples area will be pre-" +"will be rendered: with ``True`` the pixmap's samples area will be pre-" "cleared with *0x00*. This results in **transparent** areas where the page" -" is empty. With *False* the pixmap's samples will be pre-cleared with " +" is empty. With ``False`` the pixmap's samples will be pre-cleared with " "*0xff*. This results in **white** where the page has nothing to show. " "|history_begin| Changed in v1.14.17 The default alpha value is now " -"*False*. * Generated with *alpha=True* .. image:: images/img-" +"``False``. * Generated with *alpha=True* .. image:: images/img-" "alpha-1.* * Generated with *alpha=False* .. image:: images/img-" "alpha-0.* |history_end|" msgstr "" -"透明チャネルを追加するかどうか。本当に透明性が必要でない場合は、常にデフォルトの *False* " +"透明チャネルを追加するかどうか。本当に透明性が必要でない場合は、常にデフォルトの ``False`` " "を受け入れてください。これにより、メモリ(RGBの場合25%…ピクスマップは通常大きいです!)と処理時間が大幅に節約されます。また、画像がレンダリングされる方法についても重要な違いに注意してください:" -" *True* " +" ``True`` " "の場合、ピクスマップのサンプル領域は0x00で事前クリアされます。これにより、ページが空白の場所には透明な領域が表示されます。Falseの場合、ピクスマップのサンプルは" " *0xff* で事前クリアされます。これにより、ページに表示する内容がない場所には **white** が表示されます。" -#: ../../page.rst:1784 15efda0baab340daae5ace2b8323f884 +#: ../../page.rst:1824 069a0ac3dc8a4df2b04f4be4c53e1a1b #, python-format msgid "" -"whether to add an alpha channel. Always accept the default *False* if you" -" do not really need transparency. This will save a lot of memory (25% in " -"case of RGB ... and pixmaps are typically **large**!), and also " +"whether to add an alpha channel. Always accept the default ``False`` if " +"you do not really need transparency. This will save a lot of memory (25% " +"in case of RGB ... and pixmaps are typically **large**!), and also " "processing time. Also note an **important difference** in how the image " -"will be rendered: with *True* the pixmap's samples area will be pre-" +"will be rendered: with ``True`` the pixmap's samples area will be pre-" "cleared with *0x00*. This results in **transparent** areas where the page" -" is empty. With *False* the pixmap's samples will be pre-cleared with " +" is empty. With ``False`` the pixmap's samples will be pre-cleared with " "*0xff*. This results in **white** where the page has nothing to show." msgstr "" -"透明チャネルを追加するかどうか。本当に透明性が必要でない場合は、常にデフォルトの *False* " +"透明チャネルを追加するかどうか。本当に透明性が必要でない場合は、常にデフォルトの ``False`` " "を受け入れてください。これにより、メモリ(RGBの場合25%…ピクスマップは通常大きいです!)と処理時間が大幅に節約されます。また、画像がレンダリングされる方法についても重要な違いに注意してください:" -" *True* " +" ``True`` " "の場合、ピクスマップのサンプル領域は0x00で事前クリアされます。これにより、ページが空白の場所には透明な領域が表示されます。Falseの場合、ピクスマップのサンプルは" " *0xff* で事前クリアされます。これにより、ページに表示する内容がない場所には **white** が表示されます。" -#: ../../page.rst:1798 5631a46133c0454f877d1e9f764b303a +#: ../../page.rst:1838 da257fd66b7e48739cdd552eb7e5a295 msgid "Changed in v1.14.17" msgstr "v1.14.17で変更されました" -#: ../../page.rst:1789 a7bb480c4dc6492ab77b7ed34fe35574 -msgid "The default alpha value is now *False*." -msgstr "デフォルトのalpha値は *False* になりました。" +#: ../../page.rst:1829 22b4255c80b94f27932cd1d3f34f50ca +msgid "The default alpha value is now ``False``." +msgstr "デフォルトのalpha値は ``False`` になりました。" -#: ../../page.rst:1791 672906a4055f4d20823d42fe57607f68 +#: ../../page.rst:1831 95ba89d42805403a8f650ea9c10add4e msgid "Generated with *alpha=True*" msgstr "*alpha=True* で生成されたもの" -#: ../../page.rst:1796 2b740e7aca054b34afc5e6bc7ffea7bf +#: ../../page.rst:1836 6bcccaa32cfd4e0788d48d8a91bc8d23 msgid "Generated with *alpha=False*" msgstr "*alpha=False* で生成されたもの" -#: ../../page.rst:1802 bbf857931918418a96bf73559c508bc8 +#: ../../page.rst:1842 2fd0d0a18782432e8785e426b7380d5e msgid "" "*(new in version 1.16.0)* whether to also render annotations or to " "suppress them. You can create pixmaps for annotations separately." msgstr "*(v1.16.0で新たに追加)* アノテーションをレンダリングするか抑制するか。注釈用に個別にピクスマップを作成できます。" -#: ../../page.rst:1804 36152f7b671d4cbc821c9a12bfec14fa +#: ../../page.rst:1844 77575780aa6b4b16a7e33696709a1b27 msgid ":ref:`Pixmap`" msgstr "" -#: ../../page.rst:1805 21a1a9183146436e814caf22cc8c7383 +#: ../../page.rst:1845 212f7e146ee648499ad0c93a71f4f5ca msgid "" "Pixmap of the page. For fine-controlling the generated image, the by far " "most important parameter is **matrix**. E.g. you can increase or decrease" @@ -5017,14 +5236,14 @@ msgstr "" "1の場合、より高い解像度が得られ、zoom=2はその方向のピクセル数を2倍にし、したがって2倍の大きさのイメージを生成します。非正の値は水平または垂直に反転させます。同様に、行列は回転やシアーも可能にし、行列の乗算を介して効果を組み合わせることもできます。詳細については、:ref:`Matrix`" " セクションをご覧ください。" -#: ../../page.rst:1809 688372d577ea4fed835b1856bebbb7b1 +#: ../../page.rst:1849 7f082dc993f84e9e8d5de381c38bd61d msgid "" "The pixmap will have *\"premultiplied\"* pixels if `alpha=True`. To learn" " about some background, e.g. look for \"Premultiplied alpha\" `here " "`_." msgstr "" -#: ../../page.rst:1811 b83f1e4544c44263a734b83351c3f0f3 +#: ../../page.rst:1851 133dee7d819e41a29b8b465e0745173f msgid "" "The method will respect any page rotation and will not exceed the " "intersection of `clip` and :attr:`Page.cropbox`. If you need the page's " @@ -5034,11 +5253,11 @@ msgstr "" "このメソッドはページの回転を尊重し、`clip` と :attr:`Page.cropbox` " "の交差を超えません。ページのmediaboxが必要な場合(およびこれが異なる矩形の場合)、次のようなスニペットを使用してこれを実現できます::" -#: ../../page.rst:1829 650c96cc259d417eaa60043bc78dc038 +#: ../../page.rst:1869 4a385dde3eab4da39c6b4c9622418506 msgid "Changed in v1.19.2: added support of parameter dpi." msgstr "v1.19.2で変更:dpiパラメータのサポートを追加。" -#: ../../page.rst:1837 b964ee124e1f4365b1cf3e65aa14acd5 +#: ../../page.rst:1877 a09dc5780d704f0197d5c57f5fb35dfc msgid "" "PDF only: return a list of the names of annotations, widgets and links. " "Technically, these are the */NM* values of every PDF object found in the " @@ -5047,11 +5266,11 @@ msgstr "" "PDFのみ:アノテーション、ウィジェット、およびリンクの名前のリストを返します。技術的には、これらはページの */Annots* " "配列で見つかるすべてのPDFオブジェクトの */NM* 値です。" -#: ../../page.rst:1843 b63a899180c84457911d9e95030041e2 +#: ../../page.rst:1883 1b87c2dc9b9d41e78f762c9729b9b970 msgid "New in v1.16.10" msgstr "新機能 v1.16.10" -#: ../../page.rst:1850 274efd39ed59452b83a2e2923fd541c7 +#: ../../page.rst:1890 ce93fd825c634b47948f985d718eeb3d msgid "" "PDF only: return a list of the :data:`xref` numbers of annotations, " "widgets and links -- technically of all entries found in the page's " @@ -5060,7 +5279,7 @@ msgstr "" "PDFのみ:アノテーション、ウィジェット、およびリンクの :data:`xref` " "番号のリストを返します。技術的には、これらはページの/Annots配列で見つかるすべてのエントリのxrefです。" -#: ../../page.rst:1853 4e78d3ce46f942e38287f0deec8fabf3 +#: ../../page.rst:1893 a5a0cce75c0943078217f1c00674b8c9 msgid "" "a list of items *(xref, type)* where type is the annotation type. Use the" " type to tell apart links, fields and annotations, see " @@ -5070,26 +5289,26 @@ msgstr "" "のリスト。リンク、フィールド、およびアノテーションを区別するためにタイプを使用します。:ref:`AnnotationTypes` " "を参照してください。" -#: ../../page.rst:1857 ../../page.rst:1875 c9773250804948f4aaaab3acded36894 -#: fb1925e32df44f76a735bd0e16343d2d +#: ../../page.rst:1897 ../../page.rst:1915 2854fc280ceb47b982e13f84dca08c72 +#: 57bb6341ff60410796aabd0615bd3270 msgid "New in v1.17.1" msgstr "新機能 v1.17.1" -#: ../../page.rst:1864 f6aee3de9fca47c4ac924e7cef4c379d +#: ../../page.rst:1904 60f61f29857141e09389fc75cdd0e088 msgid "" "PDF only: return the annotation identified by *ident*. This may be its " "unique name (PDF `/NM` key), or its :data:`xref`." msgstr "PDFのみ:*ident* で識別されるアノテーションを返します。これはその一意の名前(PDF `/NM` キー)またはxrefかもしれません。" -#: ../../page.rst:1866 6a07a681436c40e99877c8497c556972 +#: ../../page.rst:1906 67b38a72f9c04b64bb66ea64241948a9 msgid "the annotation name or xref." msgstr "アノテーションの名前またはxref。" -#: ../../page.rst:1869 fbb76b8723dc4c5695c575248927c063 -msgid "the annotation or *None*." -msgstr "アノテーションまたは *None*。" +#: ../../page.rst:1909 7a262c80da2142dba6fc49085cdca2a6 +msgid "the annotation or ``None``." +msgstr "アノテーションまたは ``None``。" -#: ../../page.rst:1871 03b84a64cf054c1899144dd872c05745 +#: ../../page.rst:1911 805fc360e59046df81cbcfe8c29b8096 msgid "" "Methods :meth:`Page.annot_names`, :meth:`Page.annot_xrefs` provide lists " "of names or xrefs, respectively, from where an item may be picked and " @@ -5098,59 +5317,78 @@ msgstr "" "メソッド :meth:`Page.annot_names`、:meth:`Page.annot_xrefs` " "は、アイテムが取得およびこのメソッドを介して読み込まれる名前またはxrefのリストを提供します。" -#: ../../page.rst:1881 c404de3538934916bed8ce9f9400f32c -msgid "PDF only: return the field identified by *xref*." -msgstr "PDFのみ:*xref* で識別されるフィールドを返します。" +#: ../../page.rst:1921 8780cca4e0634efb990c28b20e367329 +msgid "PDF only: return the field identified by :data:`xref`." +msgstr "PDFのみ::data:`xref` で識別されるフィールドを返します。" -#: ../../page.rst:1883 77b3910884f340c4bb2d7629556a04e1 +#: ../../page.rst:1923 914a5c9b8e1643329ad85d0c7e4a7ca0 msgid "the field's xref." msgstr "フィールドのxref。" -#: ../../page.rst:1886 b2326cf612e44d79974ada1ce6c36888 -msgid "the field or *None*." -msgstr "フィールドまたは *None*。" +#: ../../page.rst:1926 d38fefc2959a4768b1584dda7ed9b4a0 +msgid "the field or ``None``." +msgstr "フィールドまたは ``None``。" -#: ../../page.rst:1888 64d39649ee3340efa3fbd56837a3b5b5 +#: ../../page.rst:1928 dc6660eb6ef74ab6a22ceef976a165e8 msgid "" "This is similar to the analogous method :meth:`Page.load_annot` -- except" " that here only the xref is supported as identifier." msgstr "これはメソッド :meth:`Page.load_annot` と同様ですが、ここでは識別子としてxrefのみがサポートされています。" -#: ../../page.rst:1892 a52938b728154396a1f508a170aeddd3 +#: ../../page.rst:1932 33d61d3d65074e4fb8add503dab4ff4d msgid "New in v1.19.6" msgstr "新機能 v1.19.6" -#: ../../page.rst:1898 b549858c34e14b5686804e71095cfaf2 +#: ../../page.rst:1938 f50d8824983c4a3994c20d5375a05de4 msgid "Return the first link on a page. Synonym of property :attr:`first_link`." msgstr "最初のリンクを返します。プロパティ :attr:`first_link` の同義語です。" -#: ../../page.rst:1900 ../../page.rst:2177 252325e628434407af7818f31e6b68bd -#: 446d8da6f22a495eb799c715bd939c36 +#: ../../page.rst:1940 ../../page.rst:2225 0d2d8e040fd04a768cb811991ae06180 +#: ff75620ea3274e4096e1070d096ff3ac msgid ":ref:`Link`" msgstr "" -#: ../../page.rst:1901 b6d7520b0efb406e8d282539daef67f3 -msgid "first link on the page (or *None*)." -msgstr "ページ上の最初のリンク(または *None*)。" +#: ../../page.rst:1941 37237376de794ce781b6aac906a17582 +msgid "first link on the page (or ``None``)." +msgstr "ページ上の最初のリンク(または ``None``)。" -#: ../../page.rst:1908 ca50a18176bf48789e466c717eca2d02 +#: ../../page.rst:1948 fe1f4977f63f47c99547c0a1080c79dc msgid "PDF only: Set the rotation of the page." msgstr "PDFのみ:ページの回転を設定します。" -#: ../../page.rst:1910 7d56301b42ed4cd185e938208b5e0870 +#: ../../page.rst:1950 9e379a1317de4372b79f47c8c7150fcb msgid "" "An integer specifying the required rotation in degrees. Must be an " "integer multiple of 90. Values will be converted to one of 0, 90, 180, " "270." msgstr "度数で指定された必要な回転を表す整数。90の整数倍である必要があります。値は0、90、180、270のいずれかに変換されます。" -#: ../../page.rst:1914 528cecd3b53d4032aa2e8da9221d6f7c +#: ../../page.rst:1954 c34897ef582e44d995e004a75d625d61 +#, fuzzy +msgid "PDF only: Change the colorspace components of all objects on page." +msgstr "PDFのみ: ページの表示領域を変更します。" + +#: ../../page.rst:1956 527cc0e7c9794aabb7a723d883d56e42 +msgid "" +"The desired count of color components. Must be one of 1, 3 or 4, which " +"results in color spaces DeviceGray, DeviceRGB or DeviceCMYK respectively." +" The method affects text, images and vector graphics. For instance, with " +"the default value 1, a page will be converted to grayscale. If a page is " +"already grayscale, the method will not cause visible changes -- " +"independent of the value of ``components``." +msgstr "" + +#: ../../page.rst:1958 b2b4968561df4134b86804c0e86146eb +msgid "These changes are **permanent** and cannot be reverted." +msgstr "" + +#: ../../page.rst:1962 8faaf3431e604048bf7ab373e633fb0f msgid "" "PDF only: Set page rotation to 0 while maintaining appearance and page " "content." msgstr "PDFのみ:外観とページ内容を維持しながらページの回転を0に設定します。" -#: ../../page.rst:1916 09e26e00feb7420891330363a6db087b +#: ../../page.rst:1964 f487132c0602407890443e4f4be1d062 msgid "" "The inverted matrix used to achieve this change. If the page was not " "rotated (rotation 0), :ref:`Identity` is returned. The method " @@ -5161,7 +5399,7 @@ msgstr "" "この変更を実現するために使用される反転した行列。ページが回転していない場合(回転0)、:ref:`Identity` " "が返されます。メソッドは、ページに存在するアノテーション、リンク、およびウィジェットの矩形を自動的に再計算します" -#: ../../page.rst:1916 31d6c8c6a4374cf8b65da327181fe4f0 +#: ../../page.rst:1964 0b610a12deba4ca9a0cef1fc0fcd8ee9 msgid "" "The inverted matrix used to achieve this change. If the page was not " "rotated (rotation 0), :ref:`Identity` is returned. The method " @@ -5171,13 +5409,13 @@ msgstr "" "この変更を実現するために使用される反転した行列。ページが回転していない場合(回転0)、:ref:`Identity` " "が返されます。メソッドは、ページに存在するアノテーション、リンク、およびウィジェットの矩形を自動的に再計算します。" -#: ../../page.rst:1918 1aeb98c991f94c598d75147f9aad7ca0 +#: ../../page.rst:1966 786ba8c828c5424893773c7c91b7f588 msgid "" "This method may come in handy when e.g. used with " ":meth:`Page.show_pdf_page`." msgstr "このメソッドは、たとえば :meth:`Page.show_pdf_page` と一緒に使用する場合に便利です。" -#: ../../page.rst:1928 fe440de766944f29b6f98ab38ba4116d +#: ../../page.rst:1976 a55c2adc8a884012a6ac999de952eb08 #, fuzzy msgid "" "PDF only: Display a page of another PDF as a **vector image** (otherwise " @@ -5187,7 +5425,7 @@ msgstr "" "PDFのみ:別のPDFのページをベクトルイメージとして表示します(それ以外は :meth:`Page.insert_image` " "に類似)。これは多目的なメソッドです。たとえば、次のようなことに使用できます。" -#: ../../page.rst:1930 750c4eaa0c9f4feb9d1dae4411699aae +#: ../../page.rst:1978 605dfd2041954e059252cb3e52b4a8bd msgid "" "create \"n-up\" versions of existing PDF files, combining several input " "pages into **one output page** (see example `combine.py " @@ -5198,7 +5436,7 @@ msgstr "" "`_ を参照)。" -#: ../../page.rst:1931 1c86b4bda7644114abbc16e05e3177ab +#: ../../page.rst:1979 c872d3edfaf84c1ca6c7bb36a489d61a msgid "" "create \"posterized\" PDF files, i.e. every input page is split up in " "parts which each create a separate output page (see `posterize.py " @@ -5209,7 +5447,7 @@ msgstr "" "`_ を参照)。" -#: ../../page.rst:1932 130ca120cb2b4825809ff8f975426f6d +#: ../../page.rst:1980 5b2ea4251e0a49b49af4185cd4fa5520 msgid "" "include PDF-based vector images like company logos, watermarks, etc., see" " `svg-logo.py `_ " "は、各ページにSVGベースのロゴを配置します(SVGからPDFへの変換を処理するために追加のパッケージが必要です)。" -#: ../../page.rst:1934 267afb503e354553b5a89458a7e77e44 +#: ../../page.rst:1982 5465d0ecb03849a499c0e18c0fa169de msgid "" "where to place the image on current page. Must be finite and its " "intersection with the page must not be empty." msgstr "現在のページに画像を配置する場所。有限である必要があり、ページとの交差部分が空でない必要があります。" -#: ../../page.rst:1935 4e76f1c505c34620aea093647b46da3f +#: ../../page.rst:1983 1c227ce40fc145828629a96e7dbb48d9 msgid "" "source PDF document containing the page. Must be a different document " "object, but may be the same file." msgstr "ページを含むソースPDFドキュメント。異なるドキュメントオブジェクトである必要がありますが、同じファイルであることもあります。" -#: ../../page.rst:1938 cc9ce0ac2b114420b06ffafd98c996ce +#: ../../page.rst:1986 20704113b4da4d179731bc4cd4d50efe msgid "page number (0-based, in `-∞ < pno < docsrc.page_count`) to be shown." msgstr "表示するページ番号(0から始まる、`-∞ < pno < docsrc.page_count`)。指定されたページ。" -#: ../../page.rst:1940 935cf369a7534f658ca010b5104597f3 +#: ../../page.rst:1988 2d89fa1daf624951b22d8ee2dbb09d6c msgid "" "whether to maintain the width-height-ratio (default). If false, all 4 " "corners are always positioned on the border of the target rectangle -- " @@ -5245,11 +5483,11 @@ msgid "" "/or non-rectangular images." msgstr "幅高さ比率を維持するかどうか(デフォルト)。falseの場合、4つの角は常にターゲット矩形の境界に配置されます(回転値に関係なく)。一般的に、これは歪んだおよび/または非四角形の画像を提供します。" -#: ../../page.rst:1942 59f19355a0e04247b728874876232c89 +#: ../../page.rst:1990 0b7025689ec541c8ad3cbab422ac6c44 msgid "put image in foreground (default) or background." msgstr "画像を前景(デフォルト)または背景に配置します。" -#: ../../page.rst:1944 c8f3951410cb4a0986b3e3cd722eb698 +#: ../../page.rst:1992 fe37ba37dc4f421486814c0d60fd61a0 msgid "" "(:data:`xref`) make visibility dependent on this :data:`OCG` / " ":data:`OCMD` (which must be defined in the target PDF) [#f9]_. (New in " @@ -5258,20 +5496,20 @@ msgstr "" "*(v1.18.3で新機能)* (:data:`xref`)この :data:`OCG` / :data:`OCMD` " "(ターゲットPDFで定義されている必要があります)に依存する可視性を作成します [#f9]_。" -#: ../../page.rst:1945 18a328778ba34656b89d52c54df3c81b +#: ../../page.rst:1993 e0401613a480439684d35d98fb8d6921 msgid "" "show the source rectangle rotated by some angle. Any angle is supported " "(changed in v1.14.11). (New in v1.14.10)" msgstr "*(v1.14.10で新機能)* ソースの矩形を一定の角度で表示します" -#: ../../page.rst:1947 1f86855d247d44a6b4f27d92d8baf34c +#: ../../page.rst:1995 1afca8d881af4012a739a00fa83ca2cd msgid "" "choose which part of the source page to show. Default is the full page, " "else must be finite and its intersection with the source page must not be" " empty." msgstr "表示するソースページの一部を選択します。デフォルトはフルページですが、有限である必要があり、ソースページとの交差部分が空でない必要があります。" -#: ../../page.rst:1949 a7fb4409f4e94dcc98ea4366b25df134 +#: ../../page.rst:1997 165e7ba9c93e42efb22bc7eb6e632e91 msgid "" "In contrast to method :meth:`Document.insert_pdf`, this method does not " "copy annotations, widgets or links, so these are not included in the " @@ -5286,38 +5524,38 @@ msgstr "" "[#f6]_。ただし、その他のすべてのリソース(テキスト、画像、フォントなど)は現在のPDFにインポートされます。したがって、テキストの抽出と " ":meth:`get_fonts` および :meth:`get_images` リストに表示されます。表示領域に含まれていなくても。" -#: ../../page.rst:1951 a93c4f98387a448fb0c7af64f0d85530 +#: ../../page.rst:1999 91dcf1cf496547dda9448d7d92de25bd msgid "Example: Show the same source page, rotated by 90 and by -90 degrees:" msgstr "例:同じソースページを90度と-90度回転して表示します。" -#: ../../page.rst:1973 392d8c14b86e4120b18042e49581397d +#: ../../page.rst:2021 e1a5d31c40634d7ca0a5b13c4c486cd9 msgid "" "Changed in v1.14.11: Parameter *reuse_xref* has been deprecated. Position" " the source rectangle centered in target rectangle. Any rotation angle is" " now supported." msgstr "v1.14.11で変更:パラメータreuse_xrefは非推奨となりました。ソースの矩形をターゲットの矩形の中央に配置します。任意の回転角度がサポートされます。" -#: ../../page.rst:1974 ecd2353d664e41b99359085e8d0fb06c +#: ../../page.rst:2022 e34ab43ae3344596a1cf974cf096efd8 msgid "Changed in v1.18.3: New parameter `oc`." msgstr "v1.18.3で変更:新しいパラメータ `oc` が追加されました。" -#: ../../page.rst:1980 6b07b2149a8143a3b9c6b51dd177daf4 +#: ../../page.rst:2028 1f75825b2fa8496f8d7838a79dcb59d1 msgid "PDF only: Create a new :ref:`Shape` object for the page." msgstr "PDFのみ:ページ用の新しい :ref:`Shape` オブジェクトを作成します。" -#: ../../page.rst:1982 f68ccaa663e94fc594654f35b6654161 +#: ../../page.rst:2030 448a4d9e36ed4f388fd9281af5fa6163 msgid ":ref:`Shape`" msgstr "" -#: ../../page.rst:1983 a621d98b0a604d1fa03cae943a1c2abd +#: ../../page.rst:2031 2e8e49e396304e859679ff624ea5332f msgid "a new :ref:`Shape` to use for compound drawings. See description there." msgstr "複合描画に使用する新しい :ref:`Shape` オブジェクト。詳細はそちらの説明を参照してください。" -#: ../../page.rst:1994 f4831754189e41df9d293261e8f43650 +#: ../../page.rst:2042 ae3bfa9248a44159b596cff72b4cb764 msgid "Search for *needle* on a page. Wrapper for :meth:`TextPage.search`." msgstr "ページ上で *needle* を検索します。:meth:`TextPage.search` のラッパーです。" -#: ../../page.rst:1996 769a81965c2940eda18ea0b2e7d737a0 +#: ../../page.rst:2044 561a8b22613b4e0fab9c07fe560b9b39 msgid "" "Text to search for. May contain spaces. Upper / lower case is ignored, " "but only works for ASCII characters: For example, \"COMPÉTENCES\" will " @@ -5325,16 +5563,16 @@ msgid "" "will. Similar is true for German umlauts and the like." msgstr "検索対象のテキスト。スペースを含めることができます。大文字/小文字は無視されますが、ASCII文字に対してのみ機能します:たとえば、needleが「COMPÉTENCES」の場合、needleが「compétences」の場合には見つかりません。「compÉtences」の場合は見つかります。同様に、ドイツ語のウムラウトなどにも当てはまります。" -#: ../../page.rst:1997 f6a31e2ec3634bab9e3846a029867546 +#: ../../page.rst:2045 a74b6d07b4ca426c9c6a2ff29c389fdc #, fuzzy msgid "only search within this area. (New in v1.18.2)" msgstr "*(v1.18.2で新規追加)* この領域内でのみ検索します。" -#: ../../page.rst:1998 b12a6d09ea6c4e8c88c4cf649182a6a7 +#: ../../page.rst:2046 cc4bceee8bcc400495ae347f1428ca33 msgid "Return object type :ref:`Quad` instead of :ref:`Rect`." msgstr "四角形の代わりに :ref:`Quad` オブジェクトのタイプを返します。" -#: ../../page.rst:1999 fd27a957ae94498bba266f289849b6a2 +#: ../../page.rst:2047 5e2cb8a4a4534227890a3a20f7d790fa msgid "" "Control the data extracted by the underlying :ref:`TextPage`. By default," " ligatures and white spaces are kept, and hyphenation [#f8]_ is detected." @@ -5342,7 +5580,7 @@ msgstr "" "基本となる :ref:`TextPage` によって抽出されるデータを制御します。デフォルトでは、リガチャと空白を保持し、ハイフン化 [#f8]_" " が検出されます。" -#: ../../page.rst:2000 5d223ff2c94a4c359dcaf16952a1841c +#: ../../page.rst:2048 f4f5f3480369432797d931a09ae0bd08 msgid "" "use a previously created :ref:`TextPage`. This reduces execution time " "**significantly.** If specified, the 'flags' and 'clip' arguments are " @@ -5352,7 +5590,7 @@ msgstr "" "以前に作成された :ref:`TextPage` (テキストページ)を使用します。これにより、実行時間が大幅に短縮されます。指定された場合、 " "'flags'および 'clip'引数は無視されます。省略された場合、一時的なテキストページが作成されます。 (v1.19.0で新規)" -#: ../../page.rst:2004 337524b7e4d34646a06a7d4e1d2c70ae +#: ../../page.rst:2052 d915c2467304441f8e652132ac02f5b9 msgid "" "A list of :ref:`Rect` or :ref:`Quad` objects, each of which -- " "**normally!** -- surrounds one occurrence of *needle*. **However:** if " @@ -5367,7 +5605,7 @@ msgid "" "\"od\". |history_end|" msgstr "" -#: ../../page.rst:2006 ceece4d074fb4a1689a45ace1506e6ba +#: ../../page.rst:2054 77656e09591c4d1f980f7b07d90ee220 msgid "" "A list of :ref:`Rect` or :ref:`Quad` objects, each of which -- " "**normally!** -- surrounds one occurrence of *needle*. **However:** if " @@ -5379,18 +5617,18 @@ msgstr "" "オブジェクトのリストで、通常、needleの一致を1つ囲みます。ただし、needleの一部が複数の行にまたがる場合、それぞれの部分に対して別のアイテムが生成されます。したがって、`needle" " = \"search string\"` の場合、2つの四角形が生成される可能性があります。" -#: ../../page.rst:2010 efcb534a773c4dc3bcc4f322d1539e44 +#: ../../page.rst:2058 cdd97cbacd9746f9842747b461ef916d #, fuzzy msgid "Changes in v1.18.2:" msgstr "**v1.18.2の変更点:**" -#: ../../page.rst:2012 e16b6d9c2c7d4e7a86946bf6970247ce +#: ../../page.rst:2060 09d4f787268146a6af0c882bd73cec00 msgid "" "There no longer is a limit on the list length (removal of the `hit_max` " "parameter)." msgstr "リストの長さに制限はもうありません(`hit_max` パラメータの削除)。" -#: ../../page.rst:2013 d164339003054ea5b1fa927765d30d19 +#: ../../page.rst:2061 69338b4777fe432e9ead49881456e85d msgid "" "If a word is **hyphenated** at a line break, it will still be found. E.g." " the needle \"method\" will be found even if hyphenated as \"meth-od\" at" @@ -5400,14 +5638,14 @@ msgstr "" "単語が行の区切りでハイフン化されている場合でも、検出されます。たとえば、needleが行の区切りで「meth-" "od」としてハイフン化されていても、「method」としてハイフン化されていない部分を囲む1つの四角形と、「od」としてハイフン化されていない部分を囲む別の四角形が返されます。" -#: ../../page.rst:2017 32b23f61224444dfbcdd265412d2c6c5 +#: ../../page.rst:2065 afad5936869b45ce8fada25fae4af13f msgid "" "The method supports multi-line text marker annotations: you can use the " "full returned list as **one single** parameter for creating the " "annotation." msgstr "このメソッドは、複数行のテキストマーカーアノテーションをサポートしており、返されたリスト全体を1つのパラメータとして使用してアノテーションを作成できます。" -#: ../../page.rst:2021 aa966a4c3d564cb7b252022254105bd4 +#: ../../page.rst:2069 ca7c4e5131f7455a8d09e18eeb7866e4 msgid "" "There is a tricky aspect: the search logic regards **contiguous multiple " "occurrences** of *needle* as one: assuming *needle* is \"abc\", and the " @@ -5417,13 +5655,13 @@ msgstr "" "トリッキーな側面があります。検索ロジックは、連続した複数の *needle* の出現を1つと見なします。つまり、*needle* " "が「abc」で、ページに「abc」と「abcabc」が含まれている場合、2つの矩形のみが返され、1つは「abc」に、もう1つは「abcabc」になります。" -#: ../../page.rst:2022 ea020b9c26cd411786e3b116c67710b3 +#: ../../page.rst:2070 a4ab315bd8484981b8e5859e86e06dc8 msgid "" "You can always use :meth:`Page.get_textbox` to check what text actually " "is being surrounded by each rectangle." msgstr "常に :meth:`Page.get_textbox` を使用して、各矩形で実際に囲まれているテキストを確認できます。" -#: ../../page.rst:2024 e8b04f60f87648dca449d2be30aa4cdd +#: ../../page.rst:2072 2f59c4bd6c354c979632dcdffc850183 msgid "" "A feature repeatedly asked for is supporting **regular expressions** when" " specifying the `\"needle\"` string: **There is no way to do this.** If " @@ -5434,7 +5672,7 @@ msgstr "" "`\"needle\"` " "文字列を指定する際に正規表現をサポートする機能が何度も要求されていますが、これを行う方法はありません。この方向性の何かが必要な場合は、まず希望の形式でテキストを抽出し、それを正規表現パターンと一致させて結果をサブセレクトしてください。単語を一致させる例を以下に示します。" -#: ../../page.rst:2030 cfe596ed4c9a4a0b9d4c971e3ab3ff30 +#: ../../page.rst:2078 d96b1e2b4cd04bf190f0253c6e6bbee2 msgid "" "The `matches` list will contain the words matching the given pattern. In " "the same way you can select `span[\"text\"]` from the output of " @@ -5443,53 +5681,53 @@ msgstr "" "`matches` リストには、指定されたパターンに一致する単語が含まれます。同様の方法で、`page.get_text(\"dict\")` " "の出力から `span[\"text\"]` を選択できます。" -#: ../../page.rst:2034 505ddbe24f7f43128a72dad9489dc4d4 +#: ../../page.rst:2082 b7a76108e8fd4fd39baf37a8d5756c85 msgid "" "Changed in v1.18.2: added `clip` parameter. Remove `hit_max` parameter. " "Add default \"dehyphenate\"." msgstr "v1.18.2で変更:`clip` パラメータを追加。`hit_max` パラメータを削除。デフォルトの「デハイフェネート」を追加。" -#: ../../page.rst:2035 34a5dfecbbeb48a09d6ba57c0f80bed6 +#: ../../page.rst:2083 5a3460e1977445b1ad77eab57ea183c0 msgid "Changed in v1.19.0: added `textpage` parameter." msgstr "v1.19.0で変更:`textpage` パラメータを追加。" -#: ../../page.rst:2042 d5649c110baf44d8831ff8390734916a +#: ../../page.rst:2090 5052dee6a0e746a1b38d4abab9f078fc msgid "" "PDF only: Change the physical page dimension by setting :data:`mediabox` " "in the page's object definition." msgstr "PDFのみ: ページのオブジェクト定義内で :data:`mediabox` を設定することにより、物理ページの寸法を変更します。" -#: ../../page.rst:2044 42afd115a700492d8a50a0783e91f38f +#: ../../page.rst:2092 8bfd058d5d0d4593b0d0e5474dd55b15 msgid "the new :data:`mediabox` value." msgstr "新しい :data:`mediabox` の値。" -#: ../../page.rst:2046 458df7ee60e145ecb05c0b8ffa3e4e49 +#: ../../page.rst:2094 e2cbffaad0654201b64464a89d720253 msgid "" "This method also removes the page's other (optional) rectangles " "(:data:`cropbox`, ArtBox, TrimBox and Bleedbox) to prevent inconsistent " "situations. This will cause those to assume their default values." msgstr "このメソッドは、ページの他の(オプションの)矩形(:data:`cropbox`、ArtBox、TrimBox、Bleedbox)も削除し、一貫性のない状況を防ぐためにそれらをデフォルト値に戻します。" -#: ../../page.rst:2048 151de395ebd64e63b4baf4c3343b2e07 +#: ../../page.rst:2096 a2958ab783fb4b0b9c2c379a48d1d301 msgid "" "For non-empty pages this may have undesired effects, because the location" " of all content depends on this value and will therefore change position " "or even disappear." msgstr "これにより、非空のページでは望ましくない効果が発生する可能性があるため、すべてのコンテンツの位置がこの値に依存し、したがって位置が変わるか、完全に消える可能性があります。" -#: ../../page.rst:2052 e2c51861a88a4e308be7e49eb061917a +#: ../../page.rst:2100 d8769a93b9b54728a06f34c303a15b32 msgid "New in v1.16.13" msgstr "v1.16.13で新規追加" -#: ../../page.rst:2053 0dc8dfc2c89847f08e26914398723afe +#: ../../page.rst:2101 7ae9c86319004190b34044348164ecfc msgid "Changed in v1.19.4: remove all other rectangle definitions." msgstr "v1.19.4で変更: 他のすべての矩形定義を削除しました。" -#: ../../page.rst:2060 37e4896a83c64cb8bd9fbda48d04aeec +#: ../../page.rst:2108 7ba1cd4d86ec4c01983f0067f7c51e34 msgid "PDF only: change the visible part of the page." msgstr "PDFのみ: ページの表示領域を変更します。" -#: ../../page.rst:2062 ee43ebe7b6e04d92a96b510814634e1e +#: ../../page.rst:2110 c42f5429f28a46b9a8eb0ed655c4e2ae msgid "" "the new visible area of the page. Note that this **must** be specified in" " **unrotated coordinates**, not empty, nor infinite and be completely " @@ -5498,7 +5736,7 @@ msgstr "" "ページの新しい表示領域。これは回転していない座標で指定する必要があり、空ではなく、無限ではなく、:attr:`Page.mediabox` " "に完全に含まれている必要があります。" -#: ../../page.rst:2064 1e027163879048c089ea0e3ba1d221cc +#: ../../page.rst:2112 dd15508eaae2499d8d7c81145ba2b252 msgid "" "After execution **(if the page is not rotated)**, :attr:`Page.rect` will " "equal this rectangle, but be shifted to the top-left position (0, 0) if " @@ -5507,7 +5745,7 @@ msgstr "" "実行後(ページが回転していない場合)、:attr:`Page.rect` " "はこの矩形と等しくなりますが、必要に応じて左上の位置(0、0)にシフトされます。以下は例セッションです:" -#: ../../page.rst:2095 0ebc4d33376e47ad8d565858121090eb +#: ../../page.rst:2143 cc950b3dfa33495eb30fa27778dfb205 msgid "" "PDF only: Set the resp. rectangle in the page object. For the meaning of " "these objects see :ref:`AdobeManual`, page 77. Parameter and restrictions" @@ -5516,42 +5754,42 @@ msgstr "" "PDFのみ: ページオブジェクト内の対応する矩形を設定します。これらのオブジェクトの意味については、:ref:`AdobeManual` " "の77ページを参照してください。パラメータと制約は :meth:`Page.set_cropbox` と同じです。" -#: ../../page.rst:2099 860e082c1b7f4ccaa6facc5477392ef8 +#: ../../page.rst:2147 be83b97e21e24302b50e38b065f0de37 msgid "New in v1.19.4" msgstr "v1.19.4で新規追加" -#: ../../page.rst:2105 a82feb789d9e4a13beb7ce30b706c516 +#: ../../page.rst:2153 bf9fbfb5f3d548d19aae0c10a8918ffa msgid "" "Contains the rotation of the page in degrees (always 0 for non-PDF " "types). This is a copy of the value in the PDF file. The PDF " "documentation says:" msgstr "ページの回転角度を度数で含みます(非PDFタイプでは常に0)。" -#: ../../page.rst:2107 0d1ee47c9ed644cb9991c17647d008f4 +#: ../../page.rst:2155 593ae6fa82f848c7a753dba02c68d0ab msgid "" "*\"The number of degrees by which the page should be rotated clockwise " "when displayed or printed. The value must be a multiple of 90. Default " "value: 0.\"*" msgstr "*「ページを表示または印刷する際に、時計回りに回転させる度数。値は90の倍数でなければなりません。デフォルト値:0」* " -#: ../../page.rst:2109 712fcc881e6f4e838e0606a24e1864a9 +#: ../../page.rst:2157 b25012b1d7b647fb95377e29f135d955 msgid "" "In PyMuPDF, we make sure that this attribute is always one of 0, 90, 180 " "or 270." msgstr "PyMuPDFでは、この属性が常に0、90、180、または270のいずれかであることを確認しています。" -#: ../../page.rst:2115 3c243faa3f53454e863031befc545b17 +#: ../../page.rst:2163 a420975fc5304c84b4311ea7438f2838 msgid "" "Contains the top-left point of the page's `/CropBox` for a PDF, otherwise" " *Point(0, 0)*." msgstr "PDFの場合、ページの `/CropBox` の左上の点を含みます。それ以外の場合は *Point(0, 0)*。" -#: ../../page.rst:2117 ../../page.rst:2141 302e8ff2f8d3480c9099757384c935ce -#: 613259cce7874f65a99d79c59efc6b6f +#: ../../page.rst:2165 ../../page.rst:2189 14b42064952e495f86517d524fb9bf7d +#: a1e439e66ea94339a4584e5d84acfceb msgid ":ref:`Point`" msgstr "" -#: ../../page.rst:2121 929bcceaa9e94120ba50e88c694b0401 +#: ../../page.rst:2169 d7a7ecfe84a64514a731bcaf26fb9f4b msgid "" "The page's `/CropBox` for a PDF. Always the **unrotated** page rectangle " "is returned. For a non-PDF this will always equal the page rectangle." @@ -5559,7 +5797,7 @@ msgstr "" "PDFのページの `/CropBox` です。常に **回転していない** " "ページの矩形が返されます。非PDFの場合、これは常にページの矩形と等しいです。" -#: ../../page.rst:2123 9181a4a59211481bb904302ca625fdd3 +#: ../../page.rst:2171 00ff97efefe14656a544e0787ea997c2 msgid "" "In PDF, the relationship between `/MediaBox`, `/CropBox` and page " "rectangle may sometimes be confusing, please do lookup the glossary for " @@ -5568,7 +5806,7 @@ msgstr "" "PDFでは、`/MediaBox`、`/CropBox`、およびページの矩形の関係は混乱することがあります。:data:`MediaBox` " "の用語集を参照してください。" -#: ../../page.rst:2133 cd75bb86c21c42aabc606976b56ba8de +#: ../../page.rst:2181 3fe46310939e47b2ae6afd93da61ddef msgid "" "The page's `/ArtBox`, `/BleedBox`, `/TrimBox`, respectively. If not " "provided, defaulting to :attr:`Page.cropbox`." @@ -5576,7 +5814,7 @@ msgstr "" "PDFのページの/ArtBox、/BleedBox、/TrimBoxです。指定されていない場合、:attr:`Page.cropbox` " "にデフォルトで設定されます。" -#: ../../page.rst:2139 bba6647576184bf3914a40fae008c8e0 +#: ../../page.rst:2187 edac8cd9d72347c2bddffd9f0bea44e7 msgid "" "Contains the width and height of the page's :attr:`Page.mediabox` for a " "PDF, otherwise the bottom-right coordinates of :attr:`Page.rect`." @@ -5584,11 +5822,11 @@ msgstr "" "PDFのページの :attr:`Page.mediabox` の幅と高さを含みます。それ以外の場合、:attr:`Page.rect` " "の右下の座標です。" -#: ../../page.rst:2145 47d57486e844433f896e7d079ceb7aca +#: ../../page.rst:2193 bb0f8c84a70647398ac8d07b1b07a718 msgid "The page's :data:`mediabox` for a PDF, otherwise :attr:`Page.rect`." msgstr "PDFのページの :data:`mediabox`、それ以外の場合は :attr:`Page.rect` です。" -#: ../../page.rst:2149 56ee8de5222b418abfbf5f374ecad960 +#: ../../page.rst:2197 84f1b8e8aec84fbdaa06100cba90416e msgid "" "For most PDF documents and for **all other document types**, `page.rect " "== page.cropbox == page.mediabox` is true. However, for some PDFs the " @@ -5601,7 +5839,7 @@ msgstr "" "の真の部分集合である場合があります。また、ページが回転している場合、`Page.rect` は `Page.cropbox` " "と等しくないかもしれません。これらの場合、上記の属性はページの要素を正しく位置付けるのに役立ちます。" -#: ../../page.rst:2153 f9774bf1d01c4c02b1c49c073e08e4af +#: ../../page.rst:2201 ffcef36971a148b38bb9a735082a427f msgid "" "This matrix translates coordinates from the PDF space to the MuPDF space." " For example, in PDF `/Rect [x0 y0 x1 y1]` the pair (x0, y0) specifies " @@ -5613,12 +5851,12 @@ msgstr "" "この行列は、PDF空間からMuPDF空間への座標の変換に使用されます。たとえば、PDFの `/Rect [x0 y0 x1 y1]` " "では、ペア(x0、y0)が矩形の左下の点を指定します。これはMuPDFのシステムとは異なり、ここでは(x0、y0)は左上を指定します。PDF座標をこの行列で掛け算すると、(Py-)MuPDF矩形バージョンが得られます。明らかに、逆行列は再びPDF矩形を返します。" -#: ../../page.rst:2155 ../../page.rst:2171 7f797d3bdc8c4d7ab5669d4476a9da04 -#: 931bd9675ed34ad193f2c722aa3e9ec2 +#: ../../page.rst:2203 ../../page.rst:2219 9c48ca4e33ac45efacad2e7435706737 +#: eb6073a66b17463dbfbbca88a268af92 msgid ":ref:`Matrix`" msgstr "" -#: ../../page.rst:2161 3adc88a41fc84ec4bc02dfd8bbf19478 +#: ../../page.rst:2209 a878eb1463294598b1c5c285f2c1844c msgid "" "These matrices may be used for dealing with rotated PDF pages. When " "adding / inserting anything to a PDF page, the coordinates of the " @@ -5631,51 +5869,51 @@ msgstr "" "ページの座標が常に使用されます。これらの行列は、2つの状態間での変換を支援します。例:ページが90度回転した場合、A4ページの左上のPoint(0," " 0)の座標は何になりますか?" -#: ../../page.rst:2175 84f7a3d8658e4f4f82bdf5285eed3af4 -msgid "Contains the first :ref:`Link` of a page (or *None*)." -msgstr "ページの最初の :ref:`Link` を含みます(または *None*)。" +#: ../../page.rst:2223 00863695e6124d6cba58ee5e6628a66d +msgid "Contains the first :ref:`Link` of a page (or ``None``)." +msgstr "ページの最初の :ref:`Link` を含みます(または ``None``)。" -#: ../../page.rst:2181 ee35f4b3987a4bc5af3c0259409588f1 -msgid "Contains the first :ref:`Annot` of a page (or *None*)." -msgstr "ページの最初の :ref:`Annot` を含みます(または *None*)。" +#: ../../page.rst:2229 7c3edf6a8463452683307122e26a0048 +msgid "Contains the first :ref:`Annot` of a page (or ``None``)." +msgstr "ページの最初の :ref:`Annot` を含みます(または ``None``)。" -#: ../../page.rst:2187 a6b99c51fcce4613835b9d56c2c7863e -msgid "Contains the first :ref:`Widget` of a page (or *None*)." -msgstr "ページの最初の :ref:`Widget` を含みます(または *None*)。" +#: ../../page.rst:2235 f9288c63a9544b60863128ddc0e278c9 +msgid "Contains the first :ref:`Widget` of a page (or ``None``)." +msgstr "ページの最初の :ref:`Widget` を含みます(または ``None``)。" -#: ../../page.rst:2193 68955e85ac3540258ef7980bb78cd47b +#: ../../page.rst:2241 c5a61c437e804ce98569fae44f541bb3 msgid "The page number." msgstr "ページ番号。" -#: ../../page.rst:2199 201ceea97de94dbe850fc99a865a69dc +#: ../../page.rst:2247 a32f1b5ed58542fdbf98aec4d2bc782a msgid "The owning document object." msgstr "所属するドキュメントオブジェクト。" -#: ../../page.rst:2201 a470faa25d0c4a618cf8b646b9373e7f +#: ../../page.rst:2249 56a8b14cf1e14ae180ffde01047fadc8 msgid ":ref:`Document`" msgstr "" -#: ../../page.rst:2206 1e264da8f30e412aa0dc9128ec570fe5 +#: ../../page.rst:2254 6074ff47c8244957a9f82c80e79b7a77 msgid "" "Contains the rectangle of the page. Same as result of " ":meth:`Page.bound()`." msgstr "ページの矩形を含みます。:meth:`Page.bound()` の結果と同じです。" -#: ../../page.rst:2212 44a7f8eca77c44d59581196f97600859 +#: ../../page.rst:2260 860e65f83b5a4fe88ae89093d4988c2c msgid "The page's PDF :data:`xref`. Zero if not a PDF." msgstr "ページのPDF :data:`xref`。PDFでない場合はゼロです。" -#: ../../page.rst:2221 a1837f904159437988560bb0ec3bbed9 +#: ../../page.rst:2269 6d139a4bb5274ecc80cf0a71b09dad34 msgid "Description of *get_links()* Entries" msgstr "*get_links()* エントリの説明" -#: ../../page.rst:2222 48f7cbae46664357be42667a289367bf +#: ../../page.rst:2270 2f3db543ce7349c88fc7f283957eb869 msgid "" "Each entry of the :meth:`Page.get_links` list is a dictionary with the " "following keys:" msgstr ":meth:`Page.get_links` リストの各エントリは、以下のキーを持つ辞書です:" -#: ../../page.rst:2224 5bfe79304a5a4395afe22f364cda650e +#: ../../page.rst:2272 03738b38c13c40ecb311b8775f9ede72 msgid "" "*kind*: (required) an integer indicating the kind of link. This is one " "of *LINK_NONE*, *LINK_GOTO*, *LINK_GOTOR*, *LINK_LAUNCH*, or *LINK_URI*. " @@ -5684,7 +5922,7 @@ msgstr "" "*kind*:(必須)リンクの種類を示す整数。*LINK_NONE*、*LINK_GOTO*、*LINK_GOTOR*、*LINK_LAUNCH*、または" " *LINK_URI* のいずれかです。" -#: ../../page.rst:2226 b32397264e59439d8656c623e8fa3d0b +#: ../../page.rst:2274 03b31ab2794f4c1d801a0d3ff2d468b1 msgid "" "*from*: (required) a :ref:`Rect` describing the \"hot spot\" location on" " the page's visible representation (where the cursor changes to a hand " @@ -5693,13 +5931,13 @@ msgstr "" "*from*:(必須)ページの可視な表現上の「ホットスポット」の場所を示す :ref:`Rect` " "(通常、カーソルが手のイメージに変わる場所です)。" -#: ../../page.rst:2228 982705a28a354d4d9be1ad84910d85e8 +#: ../../page.rst:2276 2e837820055d4bb8af5be74dc8193389 msgid "" "*page*: a 0-based integer indicating the destination page. Required for " "*LINK_GOTO* and *LINK_GOTOR*, else ignored." msgstr "page:宛先ページを示す0ベースの整数。*LINK_GOTO*および *LINK_GOTOR* の場合に必要ですが、それ以外の場合は無視されます。" -#: ../../page.rst:2230 9fb72c8d35624ba28d0c54c07e540626 +#: ../../page.rst:2278 dce39dda894c43e3b2c4670c7306e0ae msgid "" "*to*: either a *pymupdf.Point*, specifying the destination location on " "the provided page, default is *pymupdf.Point(0, 0)*, or a symbolic " @@ -5712,13 +5950,13 @@ msgstr "" "が必要で、名前はPDFで定義されている必要があります。*LINK_GOTO* および *LINK_GOTOR* " "の場合に必要ですが、それ以外の場合は無視されます。" -#: ../../page.rst:2232 d6437604221f47429daac474d331b78b +#: ../../page.rst:2280 1b901ce50408445883b29e399681fcd4 msgid "" "*file*: a string specifying the destination file. Required for " "*LINK_GOTOR* and *LINK_LAUNCH*, else ignored." msgstr "file:宛先ファイルを指定する文字列。LINK_GOTORおよびLINK_LAUNCHの場合に必要ですが、それ以外の場合は無視されます。" -#: ../../page.rst:2234 ae5e18ff46e44d478f64bd7d8d4805db +#: ../../page.rst:2282 45804997184e4049a34060e0bb1bf783 msgid "" "*uri*: a string specifying the destination internet resource. Required " "for *LINK_URI*, else ignored. You should make sure to start this string " @@ -5733,25 +5971,25 @@ msgstr "" " " "など、URLのサブタイプを識別する明確なサブストリングで始めるようにしてください。そうしないと、ブラウザがテキストを解釈し、意図しない/予期しない結論に達する可能性があります。" -#: ../../page.rst:2236 de52a0b80c6e4b37a157c39ad0e2164a +#: ../../page.rst:2284 f1d4c1775f844474ba8f468712d8c8c8 msgid "" -"*xref*: an integer specifying the PDF :data:`xref` of the link object. Do" -" not change this entry in any way. Required for link deletion and update," -" otherwise ignored. For non-PDF documents, this entry contains *-1*. It " -"is also *-1* for **all** entries in the *get_links()* list, if **any** of" -" the links is not supported by MuPDF - see " +":data:`xref`: an integer specifying the PDF :data:`xref` of the link " +"object. Do not change this entry in any way. Required for link deletion " +"and update, otherwise ignored. For non-PDF documents, this entry contains" +" *-1*. It is also *-1* for **all** entries in the *get_links()* list, if " +"**any** of the links is not supported by MuPDF - see " ":ref:`notes_on_supporting_links`." msgstr "" -"*xref*: リンクオブジェクトのPDF :data:`xref` " +":data:`xref`: リンクオブジェクトのPDF :data:`xref` " "を指定する整数。このエントリを何らかの方法で変更しないでください。リンクの削除と更新に必要で、それ以外の場合は無視されます。非PDFドキュメントの場合、このエントリには" " *-1* が含まれます。また、MuPDFがサポートしていないリンクがある場合、*get_links()* " "リストのすべてのエントリに対しても-1になります。詳細については以下の注釈を参照してください。" -#: ../../page.rst:2241 e5a3d9cc2a474223a7166d0a4350c238 +#: ../../page.rst:2289 a0a340eff9134da98b3a440610ab37fd msgid "Notes on Supporting Links" msgstr "リンクのサポートに関する注記" -#: ../../page.rst:2242 221906a1d8b84a4fa02c33c8091fa7f5 +#: ../../page.rst:2290 2b1ffa9e5c5a4e339bbe59d6c18661ed msgid "" "MuPDF's support for links has changed in **v1.10a**. These changes affect" " link types :data:`LINK_GOTO` and :data:`LINK_GOTOR`." @@ -5759,13 +5997,13 @@ msgstr "" "**v1.10a** 以降、MuPDFのリンクサポートが変更されました。これらの変更は :data:`LINK_GOTO` および " ":data:`LINK_GOTOR` というリンクタイプに影響を与えます。" -#: ../../page.rst:2245 79b2f1747fe4464cae2d8486bd6bcd26 +#: ../../page.rst:2293 e605547c21b540dfa11ed9f44cafb707 msgid "" "Reading (pertains to method *get_links()* and the *first_link* property " "chain)" msgstr "読み取り *get_links()* メソッドおよび*first_link* プロパティチェーンに関連)" -#: ../../page.rst:2247 e8302dda55054e4482b5fc97ceecb1d0 +#: ../../page.rst:2295 aa4ccddb768b43429d798d7b48ce0377 msgid "" "If MuPDF detects a link to another file, it will supply either a " "*LINK_GOTOR* or a *LINK_LAUNCH* link kind. In case of *LINK_GOTOR* " @@ -5776,7 +6014,7 @@ msgstr "" "リンクの種類を提供します。*LINK_GOTOR* " "の場合、宛先の詳細はページ番号(位置情報を含むことがある)または間接的な宛先として指定できます。" -#: ../../page.rst:2249 ccac9bad29024ca192f750c7da5e745f +#: ../../page.rst:2297 250ef4abe3404260ac50f121a9956dbf msgid "" "If an indirect destination is given, then this is indicated by *page = " "-1*, and *link.dest.dest* will contain this name. The dictionaries in the" @@ -5785,7 +6023,7 @@ msgstr "" "間接的な宛先が指定された場合、page = -1で示され、*link.dest.dest* にこの名前が含まれます。 *get_links()* " "リスト内の辞書には、この情報がto値として含まれます。" -#: ../../page.rst:2251 f3f25752681b44fdaabd3b72cb45710d +#: ../../page.rst:2299 298a64a6454e491fbeb1b9965b58c5f9 msgid "" "**Internal links are always** of kind *LINK_GOTO*. If an internal link " "specifies an indirect destination, it **will always be resolved** and the" @@ -5794,11 +6032,11 @@ msgid "" "link to be ignored." msgstr "内部リンクは常にLINK_GOTOの種類です。内部リンクが間接的な宛先を指定した場合、常に解決され、結果の直接的な宛先が返されます。内部リンクには名前は返されず、未定義の宛先はリンクが無視される原因になります。" -#: ../../page.rst:2254 44e2b415320d47268ffba15684ad3d96 +#: ../../page.rst:2302 1b529c20ff1d4c0687b091a553627f85 msgid "Writing" msgstr "書き込み" -#: ../../page.rst:2256 a22388f373e844fd993125214a7e7c17 +#: ../../page.rst:2304 038c28789f044556b4134db72f888939 msgid "" "PyMuPDF writes (updates, inserts) links by constructing and writing the " "appropriate PDF object **source**. This makes it possible to specify " @@ -5809,7 +6047,7 @@ msgstr "" " *LINK_GOTOR* および *LINK_GOTO* リンク種別に対して間接的な宛先を指定できます(**PDF 1.2** " "ファイル形式以前はサポートされていません)。" -#: ../../page.rst:2258 cc384348fb554a9fba37b53638227b85 +#: ../../page.rst:2306 48933c3fc42d43febf79d2a54cced857 msgid "" "If a *LINK_GOTO* indirect destination specifies an undefined name, this " "link can later on not be found / read again with MuPDF / PyMuPDF. Other " @@ -5818,31 +6056,31 @@ msgstr "" "*LINK_GOTO* の間接的な宛先が未定義の名前を指定した場合、このリンクは後でMuPDF / " "PyMuPDFで再び見つけることはできません。ただし、他のリーダーはそれを検出し、エラーとしてフラグ付けます。" -#: ../../page.rst:2260 e4428be7acc1406f848db5102fa555bb +#: ../../page.rst:2308 5a5898a48b284c999670d3b92fe1c0b8 msgid "" "Indirect *LINK_GOTOR* destinations can in general of course not be " "checked for validity and are therefore **always accepted**." msgstr "一般的な注意: 間接的な *LINK_GOTOR* の宛先は一般的に有効性を確認できないため、常に受け入れられます。" -#: ../../page.rst:2262 59167224e39442fc8fe96686e9dd5fce +#: ../../page.rst:2310 206140c8e16346429b497db8f7ecc4b0 msgid "" "**Example: How to insert a link pointing to another page in the same " "document**" msgstr "**例: 同じドキュメント内の別のページを指すリンクを挿入する方法**" -#: ../../page.rst:2264 c9143257a8fa49a9b876a5602a09f774 +#: ../../page.rst:2312 ce035c3ccbc04027b704a1be3baab857 msgid "" "Determine the rectangle on the current page, where the link should be " "placed. This may be the bbox of an image or some text." msgstr "リンクを配置する現在のページの矩形を決定します。これは画像または一部のテキストのbboxである場合があります。" -#: ../../page.rst:2266 b04a196c44984443b6d0bcb9b872dc8c +#: ../../page.rst:2314 17034ec326d24de19f8f569f04502acd msgid "" "Determine the target page number (\"pno\", 0-based) and a :ref:`Point` on" " it, where the link should be directed to." msgstr "ターゲットページ番号(0から始まる)と、リンクを指定するためのそのページ上の :ref:`Point` を決定します。" -#: ../../page.rst:2268 ca06347d303b46988f7b468e4382c6fc +#: ../../page.rst:2316 891ee313cd244aba8c84cc9388e8bed9 msgid "" "Create a dictionary `d = {\"kind\": pymupdf.LINK_GOTO, \"page\": pno, " "\"from\": bbox, \"to\": point}`." @@ -5850,53 +6088,53 @@ msgstr "" "辞書 `d = {\"kind\": pymupdf.LINK_GOTO, \"page\": pno, \"from\": bbox, " "\"to\": point}` を作成します。" -#: ../../page.rst:2270 8f6ecc9b0b444430bda911ea7c88823b +#: ../../page.rst:2318 35505ce21ebb4b94b4b66f1d61a78619 msgid "Execute `page.insert_link(d)`." msgstr "page.insert_link(d)を実行します。" -#: ../../page.rst:2274 0c6f8ee4837743829cd7aa9b0908cae0 +#: ../../page.rst:2322 95a3bb206a1c46a58ff4b1108cfe3b07 msgid "Homologous Methods of :ref:`Document` and :ref:`Page`" msgstr ":ref:`Document` と :ref:`Page` の同様のメソッドに関する説明です。" -#: ../../page.rst:2275 c24675bc8cab4300ac203a2cd1bdc497 +#: ../../page.rst:2323 5a4a99de9f6a46fc8ca01c4a18782712 msgid "" "This is an overview of homologous methods on the :ref:`Document` and on " "the :ref:`Page` level." msgstr "これは、:ref:`Document` と :ref:`Page` レベルでの同様のメソッドの概要です。" -#: ../../page.rst:2278 8b5b272af0b94e34a9e3d4d234706b28 +#: ../../page.rst:2326 4837b7e49e7840229a2cbee44724f774 msgid "**Document Level**" msgstr "**Document Level(ドキュメントレベル)**" -#: ../../page.rst:2278 0a4d2155fe7e4f2ea0cb74fc5546ff56 +#: ../../page.rst:2326 bb0c90432beb487aaec3b85fd8cbc5c4 msgid "**Page Level**" msgstr "**Page Level(ページレベル)**" -#: ../../page.rst:2280 966084cff7cd451dac0843752cb156a0 +#: ../../page.rst:2328 2d0a3d11246749ec86131260bee9feec msgid "*Document.get_page_fonts(pno)*" msgstr "" -#: ../../page.rst:2281 b45a7dd422cd4325b56eff9448db749f +#: ../../page.rst:2329 d11b933611e54b058edce56da847b5a7 msgid "*Document.get_page_images(pno)*" msgstr "" -#: ../../page.rst:2282 98ce1acf55754eadae491e9770fda241 +#: ../../page.rst:2330 059e7f23d9eb4a86ab24dd99863bf354 msgid "*Document.get_page_pixmap(pno, ...)*" msgstr "" -#: ../../page.rst:2283 a403c7b4becc46a0b876299ff0699ee8 +#: ../../page.rst:2331 2cadf132cee3443fbf711668c1fa6b4e msgid "*Document.get_page_text(pno, ...)*" msgstr "" -#: ../../page.rst:2284 967f57bb53fe4b42842c0a432867afc8 +#: ../../page.rst:2332 258818fb4e74478fbb4538b405bf2a9c msgid "*Document.search_page_for(pno, ...)*" msgstr "" -#: ../../page.rst:2287 c1911433e1d34945b720a860e138f836 +#: ../../page.rst:2335 0f67d85503cc449b89d3c0d1161f1e63 msgid "The page number \"pno\" is a 0-based integer `-∞ < pno < page_count`." msgstr "ページ番号「pno」は0から始まる整数であり、`-∞ < pno < page_count` です。" -#: ../../page.rst:2291 f4b9208181dc43b08bdfd4ddccd1904f +#: ../../page.rst:2339 88eab71df0714ee485f28f425f71657e msgid "" "Most document methods (left column) exist for convenience reasons, and " "are just wrappers for: *Document[pno].*. So they **load and " @@ -5905,7 +6143,7 @@ msgstr "" "多くのドキュメントメソッド(左側の列)は利便性のために存在し、*Document[pno].* " "のラッパーであるだけで、各実行でページを読み込んで破棄します。" -#: ../../page.rst:2293 d23f1224bc8e492296904ce7c085cda4 +#: ../../page.rst:2341 e3550b328290420c9cb06a736000111a msgid "" "However, the first two methods work differently. They only need a page's " "object definition statement - the page itself will **not** be loaded. So " @@ -5916,18 +6154,18 @@ msgstr "" " は逆に定義され、次のようになります: *page.get_fonts == " "page.parent.get_page_fonts(page.number)*。" -#: ../../page.rst:2296 bb67b048ab8441218534aa16ccd06ba2 +#: ../../page.rst:2344 05d1a718ae2d4d59ab848e33409726e4 msgid "Footnotes" msgstr "脚注" -#: ../../page.rst:2297 12dbbff5feed4c32a8ecba95cd53ad82 +#: ../../page.rst:2345 e15be7f2fd234149b3e60381e98fac47 msgid "" "If your existing code already uses the installed base name as a font " "reference (as it was supported by PyMuPDF versions earlier than 1.14), " "this will continue to work." msgstr "既存のコードがフォントの参照としてインストール済みのベース名を使用している場合(これはPyMuPDFバージョン1.14以前でサポートされていました)、これは引き続き機能します。" -#: ../../page.rst:2299 c3fa8dc4ece649079fb90ece2b2835e1 +#: ../../page.rst:2347 58bef5078de14949addbcf32c02d2b3d msgid "" "Not all PDF reader software (including internet browsers and office " "software) display all of these fonts. And if they do, the difference " @@ -5937,19 +6175,19 @@ msgid "" "your specific PDF viewer." msgstr "PDFリーダーソフトウェア(インターネットブラウザやオフィスソフトウェアを含む)がすべてのこれらのフォントを表示するわけではありません。そして、表示されても、セリフ付きとセリフなしバージョンの違いはほとんど気付かれないかもしれません。ただし、セリフ付きとセリフなしバージョンは異なるインストール済みベースのフォントにリードするため、特定のPDFビューアで表示可能なオプションが提供されます。" -#: ../../page.rst:2301 1ebfce283354490bb815db7d2820e6ed +#: ../../page.rst:2349 e7925013b16b48198bba6f2a828f75c8 msgid "" "Not all PDF readers display these fonts at all. Some others do, but use a" " wrong character spacing, etc." msgstr "すべてのPDFリーダーがこれらのフォントを表示するわけではありません。一部の他のソフトウェアは表示するかもしれませんが、文字間隔が間違っているなどの問題が発生する場合があります。" -#: ../../page.rst:2303 8a9599ac5eb74908ac83df5588a34c75 +#: ../../page.rst:2351 bf496c2253e84ed280ba206ddc534300 msgid "" "You are generally free to choose any of the :ref:`mupdficons` you " "consider adequate." msgstr "適切と思われるMuPDFの注釈アイコンのいずれを選択することは自由です。" -#: ../../page.rst:2305 bbd39be1642146df97cc65839a994b67 +#: ../../page.rst:2353 2dcee6d5f66e46d6aa8e90828fd8a02a msgid "" "The previous algorithm caused images to be **shrunk** to this " "intersection. Now the image can be anywhere on :attr:`Page.mediabox`, " @@ -5959,7 +6197,7 @@ msgstr "" "以前のアルゴリズムでは、画像がこの交差点に縮小されることがありました。今では画像は :attr:`Page.mediabox` " "のどこにでも配置でき、cropbox(表示ページ部分を表す)が小さい場合、画像は見えないか部分的にしか見えない可能性があります。" -#: ../../page.rst:2307 9a20908da00e49f6a7ac2d6bea8bab7a +#: ../../page.rst:2355 a6cb78d77d014c9e89386abcc9878c38 msgid "" "If you need to also see annotations or fields in the target page, you can" " convert the source PDF using :meth:`Document.bake`. The underlying MuPDF" @@ -5970,7 +6208,7 @@ msgstr "" "を使用してみることができます。そのメソッドの基本となるMuPDFの機能は、これらのオブジェクトを通常のページコンテンツに変換します。その後、変換されたPDFページを使用して" " :meth:`Page.show_pdf_page` を使用します。" -#: ../../page.rst:2309 79476f03f4ef4689934e921c64ef57fe +#: ../../page.rst:2357 d053987c44a74feeb4ea14fd1db9fd0a msgid "" "In PDF, an area enclosed by some lines or curves can have a property " "called \"orientation\". This is significant for switching on or off the " @@ -5985,7 +6223,7 @@ msgstr "" "(non-zero winding number)ルール」を使用した :meth:`Shape.finish` " "メソッドの議論で詳しく説明されています。曲線、四角形、三角形などの線で囲まれた形状の方向性は常に検出可能でしたが、これまでは「re」(長方形)アイテムに対しては不可能でした。orientationパラメータを追加することで、この不足していた情報を提供できるようになりました。" -#: ../../page.rst:2311 2ed8b6853ee4404fb7e19f168a9361d5 +#: ../../page.rst:2359 e95c484cd25c417782b03f2f75c9867c msgid "" "Hyphenation detection simply means that if the last character of a line " "is \"-\", it will be assumed to be a continuation character. That " @@ -6000,7 +6238,7 @@ msgstr "" " *line* " "を構成する可能性があります。その後、これらの単語のいずれかがハイフンで終わる場合、ハイフネーションがオフになっていない限り、テキスト検索でのみ見つかるでしょう。" -#: ../../page.rst:2313 4c0336a1139a4bc0a4e0cc29dd4f40d4 +#: ../../page.rst:2361 0910e3da442545cea526ff2e404e88b2 msgid "" "Objects inside the source page, like images, text or drawings, are never " "aware of whether their owning page now is under OC control inside the " @@ -6009,14 +6247,10 @@ msgid "" "unconditionally visible." msgstr "ソースページ内のオブジェクト、例えば画像、テキスト、または図面などは、所有ページがターゲットPDF内でOC(オプションコンテンツ)制御下にあるかどうかを認識することは決してありません。ソースページのオブジェクトがソースPDF内でOCに制御されている場合、これはターゲットに保持されないため、それらは無条件に表示されます。" -#: ../../footer.rst:60 83b90e7dbe634387a51408735fdab71e +#: ../../footer.rst:60 6b5dfc62c0974e1db350511c1379b041 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 3fce0f04cc254377a36fe9a1360ff6ed -msgid "Discord logo" -msgstr "" - #~ msgid "" #~ "image in memory (all formats supported" #~ " by MuPDF -- see :ref:`ImageFiles`). " @@ -6187,16 +6421,16 @@ msgstr "" #~ "of the rectangle **after applying** the" #~ " redaction. The default is *white =" #~ " (1, 1, 1)*, which is also " -#~ "taken if *None* is specified. *(Changed" -#~ " in v1.16.13)* To suppress a fill " -#~ "color altogether, specify *False*. In " -#~ "this cases the rectangle remains " -#~ "transparent." +#~ "taken if ``None`` is specified. " +#~ "*(Changed in v1.16.13)* To suppress a" +#~ " fill color altogether, specify ``False``." +#~ " In this cases the rectangle remains" +#~ " transparent." #~ msgstr "" #~ "*(新機能 v1.16.12)* レッドアクションを **適用した後** " #~ "の矩形の塗りつぶし色です。デフォルトは *white = (1, 1, 1)*" -#~ " で、*None* が指定された場合もこれが適用されます。 *(新機能 v1.16.13)*" -#~ " 塗りつぶし色を抑制するには、*False* を指定します。この場合、矩形は透明のままです。" +#~ " で、``None`` が指定された場合もこれが適用されます。 *(新機能 v1.16.13)*" +#~ " 塗りつぶし色を抑制するには、``False`` を指定します。この場合、矩形は透明のままです。" #~ msgid "" #~ "the created annotation. *(Changed in " @@ -6620,50 +6854,50 @@ msgstr "" #~ msgid "" #~ "*(new in v1.17.5)* -- controls how " -#~ "text is represented. *True* outputs each" -#~ " character as a series of elementary" -#~ " draw commands, which leads to a " -#~ "more precise text display in browsers," -#~ " but a **very much larger** output" -#~ " for text-oriented pages. Display " -#~ "quality for *False* relies on the " -#~ "presence of the referenced fonts on " -#~ "the current system. For missing fonts," -#~ " the internet browser will fall back" -#~ " to some default -- leading to " -#~ "unpleasant appearances. Choose *False* if " -#~ "you want to parse the text of " -#~ "the SVG." +#~ "text is represented. ``True`` outputs " +#~ "each character as a series of " +#~ "elementary draw commands, which leads to" +#~ " a more precise text display in " +#~ "browsers, but a **very much larger** " +#~ "output for text-oriented pages. Display" +#~ " quality for ``False`` relies on the" +#~ " presence of the referenced fonts on" +#~ " the current system. For missing " +#~ "fonts, the internet browser will fall" +#~ " back to some default -- leading " +#~ "to unpleasant appearances. Choose ``False``" +#~ " if you want to parse the text" +#~ " of the SVG." #~ msgstr "" #~ "*(v1.17.5で新規)* " #~ "–テキストの表現方法を制御します。Trueは、各文字を基本的な描画コマンドのシリーズとして出力し、ブラウザでより正確なテキスト表示を提供しますが、テキスト指向のページでは非常に大きな出力になります。" -#~ " *False* " +#~ " ``False`` " #~ "の表示品質は、現在のシステム上の参照フォントの存在に依存しています。不足しているフォントの場合、インターネットブラウザはデフォルトにフォールバックし、不快な外観になります。" -#~ " SVGのテキストを解析する場合は *False* を選択してください。" +#~ " SVGのテキストを解析する場合は ``False`` を選択してください。" #~ msgid "" #~ "whether to add an alpha channel. " -#~ "Always accept the default *False* if " -#~ "you do not really need transparency. " -#~ "This will save a lot of memory " -#~ "(25% in case of RGB ... and " -#~ "pixmaps are typically **large**!), and " +#~ "Always accept the default ``False`` if" +#~ " you do not really need transparency." +#~ " This will save a lot of memory" +#~ " (25% in case of RGB ... and" +#~ " pixmaps are typically **large**!), and " #~ "also processing time. Also note an " #~ "**important difference** in how the " -#~ "image will be rendered: with *True* " -#~ "the pixmap's samples area will be " -#~ "pre-cleared with *0x00*. This results " -#~ "in **transparent** areas where the page" -#~ " is empty. With *False* the pixmap's" -#~ " samples will be pre-cleared with " -#~ "*0xff*. This results in **white** where" -#~ " the page has nothing to show. " -#~ "Changed in v1.14.17 The default alpha" -#~ " value is now *False*. * " -#~ "Generated with *alpha=True* .. image:: " -#~ "images/img-alpha-1.* * Generated with " -#~ "*alpha=False* .. image:: images/img-" -#~ "alpha-0.*" +#~ "image will be rendered: with ``True``" +#~ " the pixmap's samples area will be" +#~ " pre-cleared with *0x00*. This " +#~ "results in **transparent** areas where " +#~ "the page is empty. With ``False`` " +#~ "the pixmap's samples will be pre-" +#~ "cleared with *0xff*. This results in " +#~ "**white** where the page has nothing " +#~ "to show. Changed in v1.14.17 The " +#~ "default alpha value is now ``False``." +#~ " * Generated with *alpha=True* .." +#~ " image:: images/img-alpha-1.* * " +#~ "Generated with *alpha=False* .. image::" +#~ " images/img-alpha-0.*" #~ msgstr "" #~ msgid "" @@ -6803,3 +7037,444 @@ msgstr "" #~ "images will be incorrectly handled!" #~ msgstr "" +#~ msgid "PDF only: Add text in a given rectangle." +#~ msgstr "PDFのみ: 指定された矩形にテキストを追加します。" + +#~ msgid "" +#~ "the text. May contain any mixture " +#~ "of Latin, Greek, Cyrillic, Chinese, " +#~ "Japanese and Korean characters. The " +#~ "respective required font is automatically " +#~ "determined. (New in v1.17.0)" +#~ msgstr "" +#~ "テキスト。*(v1.17.0で新規追加)* " +#~ "ラテン文字、ギリシャ文字、キリル文字、中国語、日本語、韓国語の文字を任意の組み合わせで含めることができます。必要なフォントは自動的に決定されます。" + +#~ msgid "" +#~ "the font name. Default is \"Helv\". " +#~ "Accepted alternatives are \"Cour\", \"TiRo\"," +#~ " \"ZaDb\" and \"Symb\". The name may" +#~ " be abbreviated to the first two " +#~ "characters, like \"Co\" for \"Cour\". " +#~ "Lower case is also accepted. Bold " +#~ "or italic variants of the fonts " +#~ "are **not accepted** (changed in " +#~ "v1.16.0). A user-contributed script " +#~ "provides a circumvention for this " +#~ "restriction -- see section *Using " +#~ "Buttons and JavaScript* in chapter " +#~ ":ref:`FAQ`. The actual font to use " +#~ "is now determined on a by-" +#~ "character level, and all required fonts" +#~ " (or sub-fonts) are automatically " +#~ "included. Therefore, you should rarely " +#~ "ever need to care about this " +#~ "parameter and let it default (except " +#~ "you insist on a serifed font for" +#~ " your non-CJK text parts). (New " +#~ "in v1.17.0)" +#~ msgstr "" +#~ "フォント名。デフォルトは \"Helv\" です。受け入れられる代替は " +#~ "\"Cour\"、\"TiRo\"、\"ZaDb\"、\"Symb\" です。名前は \"Cour\" " +#~ "のように最初の2文字に省略されることがあります。小文字も受け入れられます。太字やイタリックのバリアントのフォントは受け入れられません(v1.16.0で変更)。ユーザー投稿のスクリプトがこの制限を回避する方法を提供しています" +#~ " - " +#~ "FAQの章の「ボタンとJavaScriptの使用」セクションを参照してください。使用する実際のフォントは、今では文字ごとに決定され、必要なすべてのフォント(またはサブフォント)が自動的に含まれます。したがって、このパラメーターについて心配する必要があることはほとんどありませんし、デフォルトのままにしておくことが推奨されます(非CJKテキスト部分にセリフのあるフォントが必要な場合を除く)。(v1.17.0で新規)" + +#~ msgid "the fill color. Default is white. (New in v1.16.0)" +#~ msgstr "塗りつぶしの色です。デフォルトは白です。(v1.16.0 で新規追加)" + +#~ msgid "the text color. Default is black." +#~ msgstr "テキストの色。デフォルトは黒です。" + +#~ msgid "the border color. Default is `None`. (New in v1.19.6)" +#~ msgstr "*(v1.19.6で新規追加)* 境界色。デフォルトは `None` です。" + +#~ msgid "" +#~ "text alignment, one of TEXT_ALIGN_LEFT, " +#~ "TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT - justify " +#~ "is **not supported**. (New in v1.17.0)" +#~ msgstr "" +#~ "テキストの配置は、TEXT_ALIGN_LEFT、TEXT_ALIGN_CENTER、TEXT_ALIGN_RIGHTのいずれかを指定します。ジャスティファイは" +#~ " **サポートされていません** 。(v1.17.0で新規追加)" + +#~ msgid "" +#~ "the created annotation. Color properties " +#~ "**can only be changed** using special" +#~ " parameters of :meth:`Annot.update`. There, " +#~ "you can also set a border color" +#~ " different from the text color." +#~ msgstr "" +#~ "作成された注釈。色のプロパティは、:meth:`Annot.update` の特別なパラメータを使用して " +#~ "**のみ変更できます**。そこでは、テキストの色とは異なる境界色を設定することもできます。" + +#~ msgid "" +#~ "the font to use when *text* is " +#~ "given, otherwise ignored. The same rules" +#~ " apply as for :meth:`Page.insert_textbox` " +#~ "-- which is the method " +#~ ":meth:`Page.apply_redactions` internally invokes. " +#~ "The replacement text will be " +#~ "**vertically centered**, if this is one" +#~ " of the CJK or :ref:`Base-14-Fonts`. " +#~ "(New in v1.16.12) .. note:: * " +#~ "For an **existing** font of the " +#~ "page, use its reference name as " +#~ "*fontname* (this is *item[4]* of its " +#~ "entry in :meth:`Page.get_fonts`). * For " +#~ "a **new, non-builtin** font, proceed " +#~ "as follows:: page.insert_text(point, # " +#~ "anywhere, but outside all redaction " +#~ "rectangles \"something\", # some " +#~ "non-empty string fontname=\"newname\", " +#~ "# new, unused reference name " +#~ "fontfile=\"...\", # desired font file" +#~ " render_mode=3, # makes the text" +#~ " invisible ) page.add_redact_annot(..., " +#~ "fontname=\"newname\")" +#~ msgstr "" +#~ "(新機能 v1.16.12)テキストが指定された場合に使用するフォントで、それ以外の場合は無視されます。 " +#~ ":meth:`Page.insert_textbox` " +#~ "に適用されるルールと同じです。:meth:`Page.apply_redactions` " +#~ "が内部的に呼び出すメソッドです。置換テキストは、CJKフォントまたは P :ref:`Base-14-Fonts`" +#~ " の場合、垂直方向に中央揃えになります。" + +#~ msgid "" +#~ "the font to use when *text* is " +#~ "given, otherwise ignored. The same rules" +#~ " apply as for :meth:`Page.insert_textbox` " +#~ "-- which is the method " +#~ ":meth:`Page.apply_redactions` internally invokes. " +#~ "The replacement text will be " +#~ "**vertically centered**, if this is one" +#~ " of the CJK or :ref:`Base-14-Fonts`. " +#~ "(New in v1.16.12)" +#~ msgstr "" +#~ "(新機能 v1.16.12)テキストが指定された場合に使用するフォントで、それ以外の場合は無視されます。 " +#~ ":meth:`Page.insert_textbox` " +#~ "に適用されるルールと同じです。:meth:`Page.apply_redactions` " +#~ "が内部的に呼び出すメソッドです。置換テキストは、CJKフォントまたは P :ref:`Base-14-Fonts`" +#~ " の場合、垂直方向に中央揃えになります。" + +#~ msgid "" +#~ "For an **existing** font of the " +#~ "page, use its reference name as " +#~ "*fontname* (this is *item[4]* of its " +#~ "entry in :meth:`Page.get_fonts`)." +#~ msgstr "" +#~ "ページの **既存** のフォントの場合、参照名を *fontname* " +#~ "として使用してください(これは :meth:`Page.get_fonts` のエントリの " +#~ "*item[4]* です)。" + +#~ msgid "For a **new, non-builtin** font, proceed as follows::" +#~ msgstr "**新しいビルトインでない** フォントの場合、次の手順を実行します::" + +#~ msgid "" +#~ "a `TableFinder` object that has the " +#~ "following significant attributes: * `cells`:" +#~ " a list of **all bboxes** on " +#~ "the page, that have been identified " +#~ "as table cells (across all tables). " +#~ "Each cell is a :data:`rect_like` tuple" +#~ " `(x0, y0, x1, y1)` of coordinates" +#~ " or `None`. * `tables`: a list " +#~ "of `Table` objects. This is `[]` " +#~ "if the page has no tables. Single" +#~ " tables can be found as items " +#~ "of this list. But the `TableFinder` " +#~ "object itself is also a sequence " +#~ "of its tables. This means that if" +#~ " `tabs` is a `TableFinder` object, " +#~ "then table \"n\" is delivered by " +#~ "`tabs.tables[n]` as well as by the " +#~ "shorter `tabs[n]`. * The `Table` " +#~ "object has the following attributes: " +#~ "* `bbox`: the bounding box of the" +#~ " table as a tuple `(x0, y0, x1," +#~ " y1)`. * `cells`: bounding boxes of" +#~ " the table's cells (list of tuples)." +#~ " A cell may also be `None`. *" +#~ " `extract()`: this method returns the " +#~ "text content of each table cell as" +#~ " a list of list of strings. *" +#~ " `to_markdown()`: this method returns the" +#~ " table as a **string in markdown " +#~ "format** (compatible to Github). Supporting" +#~ " viewers can render the string as " +#~ "a table. This output is optimized " +#~ "for **small token** sizes, which is " +#~ "especially beneficial for LLM/RAG feeds. " +#~ "Pandas DataFrames (see method `to_pandas()`" +#~ " below) offer an equivalent markdown " +#~ "table output which however is better " +#~ "readable for the human eye. * " +#~ "`to_pandas()`: this method returns the " +#~ "table as a `pandas " +#~ "`_ `DataFrame " +#~ "`_. " +#~ "DataFrames are very versatile objects " +#~ "allowing a plethora of table " +#~ "manipulation methods and outputs to " +#~ "almost 20 well-known formats, among " +#~ "them Excel files, CSV, JSON, " +#~ "markdown-formatted tables and more. " +#~ "`DataFrame.to_markdown()` generates a Github-" +#~ "compatible markdown format optimized for " +#~ "human readability. This method however " +#~ "requires the package " +#~ "[tablutate](https://pypi.org/project/tabulate/) to " +#~ "installed in addition to pandas itself." +#~ " * ``header``: a `TableHeader` object " +#~ "containing header information of the " +#~ "table. * `col_count`: an integer " +#~ "containing the number of table columns." +#~ " * `row_count`: an integer containing " +#~ "the number of table rows. * " +#~ "`rows`: a list of `TableRow` objects " +#~ "containing two attributes, ``bbox`` is " +#~ "the boundary box of the row, and" +#~ " `cells` is a list of table " +#~ "cells contained in this row. * " +#~ "The `TableHeader` object has the " +#~ "following attributes: * ``bbox``: the " +#~ "bounding box of the header. * " +#~ "`cells`: a list of bounding boxes " +#~ "containing the name of the respective" +#~ " column. * `names`: a list of " +#~ "strings containing the text of each " +#~ "of the cell bboxes. They represent " +#~ "the column names -- which are used" +#~ " when exporting the table to pandas" +#~ " DataFrames, markdown, etc. * `external`:" +#~ " a bool indicating whether the header" +#~ " bbox is outside the table body " +#~ "(`True`) or not. Table headers are " +#~ "never identified by the `TableFinder` " +#~ "logic. Therefore, if `external` is true," +#~ " then the header cells are not " +#~ "part of any cell identified by " +#~ "`TableFinder`. If `external == False`, " +#~ "then the first table row is the" +#~ " header. Please have a look at " +#~ "these `Jupyter notebooks `_, which" +#~ " cover standard situations like multiple" +#~ " tables on one page or joining " +#~ "table fragments across multiple pages." +#~ msgstr "" + +#~ msgid "" +#~ "PDF only: Add a \"rubber stamp\" " +#~ "like annotation to e.g. indicate the " +#~ "document's intended use (\"DRAFT\", " +#~ "\"CONFIDENTIAL\", etc.)." +#~ msgstr "PDF専用: \"ドラフト\"、\"機密\"などの文書の意図した使用を示すための「スタンプ」のような注釈を追加します。" + +#~ msgid "" +#~ "The stamp's text and its border " +#~ "line will automatically be sized and " +#~ "be put horizontally and vertically " +#~ "centered in the given rectangle. " +#~ ":attr:`Annot.rect` is automatically calculated " +#~ "to fit the given **width** and " +#~ "will usually be smaller than this " +#~ "parameter." +#~ msgstr "" +#~ "スタンプのテキストとその境界線は、自動的にサイズ変更され、指定された矩形内で水平および垂直方向に中央に配置されます。:attr:`Annot.rect`" +#~ " は指定された **幅** に合わせて自動的に計算され、通常はこのパラメータよりも小さくなります。" + +#~ msgid "" +#~ "This can be used to create " +#~ "watermark images: on a temporary PDF " +#~ "page create a stamp annotation with " +#~ "a low opacity value, make a pixmap" +#~ " from it with *alpha=True* (and " +#~ "potentially also rotate it), discard the" +#~ " temporary PDF page and use the " +#~ "pixmap with :meth:`insert_image` for your " +#~ "target PDF." +#~ msgstr "" +#~ "これは透かし画像を作成するために使用できます。一時的なPDFページ上に低い不透明度のスタンプ注釈を作成し、*alpha=True* " +#~ "でそれからピクスマップを作成し(おそらく回転させることもあります)、一時的なPDFページを破棄し、ターゲットのPDFに挿入するためにピクスマップを" +#~ " :meth:`insert_image` で使用します。" + +#~ msgid "\"blocks\" -- :meth:`TextPage.extractBLOCKS`" +#~ msgstr "" + +#~ msgid "\"words\" -- :meth:`TextPage.extractWORDS`" +#~ msgstr "" + +#~ msgid "\"html\" -- :meth:`TextPage.extractHTML`" +#~ msgstr "" + +#~ msgid "\"xhtml\" -- :meth:`TextPage.extractXHTML`" +#~ msgstr "" + +#~ msgid "\"xml\" -- :meth:`TextPage.extractXML`" +#~ msgstr "" + +#~ msgid "\"dict\" -- :meth:`TextPage.extractDICT`" +#~ msgstr "" + +#~ msgid "\"json\" -- :meth:`TextPage.extractJSON`" +#~ msgstr "" + +#~ msgid "\"rawdict\" -- :meth:`TextPage.extractRAWDICT`" +#~ msgstr "" + +#~ msgid "\"rawjson\" -- :meth:`TextPage.extractRAWJSON`" +#~ msgstr "" + +#~ msgid "" +#~ "A string indicating the requested " +#~ "format, one of the above. A " +#~ "mixture of upper and lower case is" +#~ " supported. Values \"words\" and " +#~ "\"blocks\" are also accepted (changed in" +#~ " v1.16.3)." +#~ msgstr "要求される形式を示す文字列、上記のいずれか。大文字と小文字の組み合わせがサポートされています" + +#~ msgid "Values \"words\" and \"blocks\" are also accepted (changed in v1.16.3)." +#~ msgstr "v1.16.3で変更された値 “words” と “blocks” も受け入れられるようになりました。" + +#~ msgid "" +#~ "restrict extracted text to this " +#~ "rectangle. If None, the full page " +#~ "is taken. Has **no effect** for " +#~ "options \"html\", \"xhtml\" and \"xml\". " +#~ "(New in v1.17.7)" +#~ msgstr "" +#~ "*(v1.17.7で新たに追加)* 抽出されたテキストをこの矩形に制限します。Noneの場合、フルページが取得されます。 " +#~ "“html”、“xhtml”、“xml”のオプションには **影響しません**。" + +#~ msgid "" +#~ "sort the output by vertical, then " +#~ "horizontal coordinates. In many cases, " +#~ "this should suffice to generate a " +#~ "\"natural\" reading order. Has no effect" +#~ " on (X)HTML and XML. Output option" +#~ " **\"words\"** sorts by `(y1, x0)` of" +#~ " the words' bboxes. Similar is true" +#~ " for \"blocks\", \"dict\", \"json\", " +#~ "\"rawdict\", \"rawjson\": they all are " +#~ "sorted by `(y1, x0)` of the resp." +#~ " block bbox. If specified for " +#~ "\"text\", then internally \"blocks\" is " +#~ "used. (New in v1.19.1)" +#~ msgstr "" +#~ "出力を垂直座標、次に水平座標でソートします。多くの場合、これで「自然な」読み取り順序を生成するのに十分です。 " +#~ "(X)HTMLおよびXMLには影響しません。出力オプション「words」は、単語の境界ボックスの `(y1, " +#~ "x0)` " +#~ "でソートされます。\"blocks\"、\"dict\"、\"json\"、\"rawdict\"、\"rawjson\" " +#~ "についても同様であり、それぞれのブロックの境界ボックスの `(y1, x0)` でソートされます。" +#~ " \"text\" に対して指定された場合、内部的には \"blocks\" が使用されます。" +#~ " (v1.19.1で新たに追加)" + +#~ msgid "" +#~ "The inclusion of text via the " +#~ "*clip* parameter is decided on a " +#~ "by-character level: a character becomes " +#~ "part of the output, if its bbox" +#~ " is contained in *clip* (changed in" +#~ " v1.18.2). This **deviates** from the " +#~ "algorithm used in redaction annotations: " +#~ "a character will be **removed if " +#~ "its bbox intersects** any redaction " +#~ "annotation." +#~ msgstr "" +#~ "*clip* パラメータを使用したテキストの含み方は、文字ごとのレベルで決定されます:文字のバウンディングボックスが " +#~ "*clip* に含まれる場合、その文字は出力の一部となります(v1.18.2で変更)。 " +#~ "これは、レダクション注釈で使用されるアルゴリズムとは異なります:文字のバウンディングボックスがどのレダクション注釈とも交差する場合、文字は削除されます。" + +#~ msgid "" +#~ "a :ref:`TextPage`. Execution may be " +#~ "significantly longer than :meth:`Page.get_textpage`." +#~ " For a full page OCR, **all " +#~ "text** will have the font " +#~ "\"GlyphlessFont\" from Tesseract. In case " +#~ "of partial OCR, normal text will " +#~ "keep its properties, and only text " +#~ "coming from images will have the " +#~ "GlyphlessFont. .. note:: **OCRed text " +#~ "is only available** to PyMuPDF's text" +#~ " extractions and searches if their " +#~ "`textpage` parameter specifies the output " +#~ "of this method. `This " +#~ "`_ Jupyter " +#~ "notebook walks through an example for" +#~ " using OCR textpages." +#~ msgstr "" + +#~ msgid "" +#~ "Return a list of meta information " +#~ "dictionaries for all images shown on " +#~ "the page. This works for all " +#~ "document types. Technically, this is a" +#~ " subset of the dictionary output of" +#~ " :meth:`Page.get_text`: the image binary " +#~ "content and any text on the page" +#~ " are ignored." +#~ msgstr "" +#~ "ページ上に表示されているすべてのイメージに関するメタ情報辞書のリストを返します。これはすべての文書タイプで機能します。技術的には、これは" +#~ " :meth:`Page.get_text` " +#~ "の辞書出力のサブセットであり、画像のバイナリコンテンツとページ上のテキストは無視されます。" + +#~ msgid "" +#~ "**PDF only.** Try to find the " +#~ ":data:`xref` for each image. Implies " +#~ "`hashes=True`. Adds the `\"xref\"` key " +#~ "to the dictionary. If not found, " +#~ "the value is 0, which means, the" +#~ " image is either \"inline\" or " +#~ "otherwise undetectable. Please note that " +#~ "this option has an extended response " +#~ "time, because the MD5 hashcode will " +#~ "be computed at least two times for" +#~ " each image with an xref. (New " +#~ "in v1.18.13)" +#~ msgstr "" +#~ "**PDFのみ。** 各画像の :data:`xref` " +#~ "を見つけようとします。`hashes=True` を意味します。辞書に `\"xref\"` " +#~ "キーを追加します。見つからない場合、値は0で、画像が「インライン」であるか、または他の方法で検出できないことを意味します。このオプションは、少なくとも各画像に対してMD5ハッシュコードが2回計算されるため、応答時間が延びることに注意してください。(v1.18.13で新規追加)" + +#~ msgid "" +#~ "A list of dictionaries. This includes" +#~ " information for **exactly those** images," +#~ " that are shown on the page --" +#~ " including *\"inline images\"*. In contrast" +#~ " to images included in " +#~ ":meth:`Page.get_text`, image **binary content** " +#~ "is not loaded, which drastically reduces" +#~ " memory usage. The dictionary layout " +#~ "is similar to that of image blocks" +#~ " in `page.get_text(\"dict\")`. =============== " +#~ "=============================================================== " +#~ "**Key** **Value** =============== " +#~ "=============================================================== " +#~ "number block number *(int)* bbox" +#~ " image bbox on page, " +#~ ":data:`rect_like` width original image " +#~ "width *(int)* height original image" +#~ " height *(int)* cs-name colorspace" +#~ " name *(str)* colorspace colorspace.n " +#~ "*(int)* xres resolution in " +#~ "x-direction *(int)* yres resolution " +#~ "in y-direction *(int)* bpc bits" +#~ " per component *(int)* size " +#~ "storage occupied by image *(int)* digest" +#~ " MD5 hashcode *(bytes)*, if " +#~ "*hashes* is true xref image " +#~ ":data:`xref` or 0, if *xrefs* is " +#~ "true transform matrix transforming image" +#~ " rect to bbox, :data:`matrix_like` " +#~ "=============== " +#~ "=============================================================== " +#~ "Multiple occurrences of the same image" +#~ " are always reported. You can detect" +#~ " duplicates by comparing their `digest` " +#~ "values." +#~ msgstr "" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/pixmap.mo b/docs/locales/ja/LC_MESSAGES/pixmap.mo index 85fc4302f..3c79519e5 100644 Binary files a/docs/locales/ja/LC_MESSAGES/pixmap.mo and b/docs/locales/ja/LC_MESSAGES/pixmap.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/pixmap.po b/docs/locales/ja/LC_MESSAGES/pixmap.po index 140526ac1..c183a58c5 100644 --- a/docs/locales/ja/LC_MESSAGES/pixmap.po +++ b/docs/locales/ja/LC_MESSAGES/pixmap.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 c88d56b8fda94093bd816a9dc049b237 +#: ../../header.rst:-1 f1b1a7f0a4634aaeb54cc0b5874ab28c msgid "Artifex" msgstr "" -#: ../../header.rst:-1 92f55755fbdb431eafa600b24733ca52 +#: ../../header.rst:-1 9b7f06cdc04a4af28bf3417f5859a599 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 aaa90a55459e4c1996c05d4d64635f27 +#: ../../header.rst:-1 6c224f6a8b5d41c9b69fa3daecfaa92b msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../pixmap.rst:7 022ca64ccf2145e8ba4c7c88b86f3cc4 +#: ../../pixmap.rst:7 d95251aabeda466d86e4a43f44a77fcb msgid "Pixmap" msgstr "" -#: ../../pixmap.rst:9 becab09cb361477ba6ca03e508dbfd53 +#: ../../pixmap.rst:9 1919b532b8ab404da458c9f170fddff1 msgid "" "Pixmaps (\"pixel maps\") are objects at the heart of MuPDF's rendering " "capabilities. They represent plane rectangular sets of pixels. Each pixel" @@ -47,42 +47,42 @@ msgid "" "plus an optional alpha byte defining its transparency." msgstr "Pixmap(「ピクセルマップ」)は、MuPDFの描画機能の中心にあるオブジェクトです。それらは平面的な長方形のピクセルセットを表します。各ピクセルは、その色を定義するバイト数(「コンポーネント」)と、透明度を定義するオプションのアルファバイトで説明されます" -#: ../../pixmap.rst:11 498b5643c837404ab2bfd917365af88f +#: ../../pixmap.rst:11 9486bfc43c4846ee9e7e44f6fea9705c msgid "" "In PyMuPDF, there exist several ways to create a pixmap. Except the first" " one, all of them are available as overloaded constructors. A pixmap can " "be created ..." msgstr "PyMuPDFでは、ピクセルマップを作成するためのいくつかの方法が存在します。最初の方法を除いて、すべての方法はオーバーロードされたコンストラクタとして使用できます。ピクセルマップは、以下の方法で作成できます..." -#: ../../pixmap.rst:13 7f3957f1bc684f8fb76f466c726db9c5 +#: ../../pixmap.rst:13 5856db6b457648038a199c62b3682e92 msgid "from a document page (method :meth:`Page.get_pixmap`)" msgstr "ドキュメントページから(メソッド :meth:`Page.get_pixmap` を使用)" -#: ../../pixmap.rst:14 42db51cd46454e4a9cbe04938e646c1c +#: ../../pixmap.rst:14 90fe46c3478d4b96b209fbdaf5081b7b msgid "empty, based on :ref:`Colorspace` and :ref:`IRect` information" msgstr ":ref:`Colorspace` と :ref:`IRect` 情報に基づいて空のものを作成" -#: ../../pixmap.rst:15 cc9da9a4d2ad4ce2b4fca46685b27adc +#: ../../pixmap.rst:15 3e34e939b62e44afaf21e619fb10ad36 msgid "from a file" msgstr "ファイルから" -#: ../../pixmap.rst:16 9f1bfd87bc49402086c5bc8cdbe97573 +#: ../../pixmap.rst:16 d09799bf949f48f6abb5dcf83b49481a msgid "from an in-memory image" msgstr "メモリ内のイメージから" -#: ../../pixmap.rst:17 6a598fc0fe894ba7bb39385f5fb132d2 +#: ../../pixmap.rst:17 2eee9e4101a948b79a0075e4240d5a73 msgid "from a memory area of plain pixels" msgstr "平易なピクセルのメモリ領域から" -#: ../../pixmap.rst:18 6d99af4ec94d4414a1f1c3f679c6a155 +#: ../../pixmap.rst:18 2d3e24e4928c499cb236455abd0cd31c msgid "from an image inside a PDF document" msgstr "PDFドキュメント内のイメージから" -#: ../../pixmap.rst:19 ad75eec4e77e4ba99ddc7543abc8493a +#: ../../pixmap.rst:19 54101a4bc1c84b02bd4da615683275df msgid "as a copy of another pixmap" msgstr "他のピクセルマップのコピーとして" -#: ../../pixmap.rst:21 60585ec8293d4dafa79c9828a4cab267 +#: ../../pixmap.rst:21 b17903252e15401bb880d1a57830b7cc msgid "" "A number of image formats is supported as input for points 3. and 4. " "above. See section :ref:`ImageFiles`." @@ -90,342 +90,352 @@ msgstr "" "3.と4.のポイントに対する入力として多くの画像フォーマットがサポートされています。サポートされている入力画像フォーマットの詳細については、:ref:`ImageFiles`" " のセクションを参照してください。" -#: ../../pixmap.rst:23 e1ed5390e50e414eaa7e0118291964a0 +#: ../../pixmap.rst:23 a656abca152d4678928047358a2885fa msgid "" "Have a look at the :ref:`FAQ` section to see some pixmap usage \"at " "work\"." msgstr "ピクセルマップの使用例については、:ref:`FAQ` セクションをご覧ください。" -#: ../../pixmap.rst:26 89e29591f97e4cbfaac27c7d0665a7b2 +#: ../../pixmap.rst:26 9776682c8c63410182791a7931cc6ea8 msgid "**Method / Attribute**" msgstr "**メソッド / 属性**" -#: ../../pixmap.rst:26 0c4bc121cd374ab6b91adc1218e8fe3b +#: ../../pixmap.rst:26 efacb9c8b8604d5082365a84df87f288 msgid "**Short Description**" msgstr "**短い説明**" -#: ../../pixmap.rst:28 20faa317f9c341f7bfa3945379578e56 +#: ../../pixmap.rst:28 a663d99b6c2a46d0962d0c909af2a40e msgid ":meth:`Pixmap.clear_with`" msgstr "" -#: ../../pixmap.rst:28 4f91d4d010614f8f8413c02aaf228565 +#: ../../pixmap.rst:28 3c0d7d8f0a5b4906855b1a2d36b5fea2 msgid "clear parts of the pixmap" msgstr "ピクセルマップの一部をクリアします。" -#: ../../pixmap.rst:29 f8650255bfac40b784d24d43953b8496 +#: ../../pixmap.rst:29 52cbee35a17e4e12909328f7fcf6aa77 msgid ":meth:`Pixmap.color_count`" msgstr "" -#: ../../pixmap.rst:29 a5ead3603940415891c166d016ac5b5a +#: ../../pixmap.rst:29 14d1d9f70b254f81a3abe5c43a1e537e msgid "determine used colors" msgstr "使用された色を決定します。" -#: ../../pixmap.rst:30 ac9ee8f33abb43b78c6f68058dd34a72 +#: ../../pixmap.rst:30 7a6da5837cc5436ca5b86185921412ef msgid ":meth:`Pixmap.color_topusage`" msgstr "" -#: ../../pixmap.rst:30 d8f3584698a74ff0bf4bc72d1e3f2fa3 +#: ../../pixmap.rst:30 ec4d405a88d44d9ebd213e83aca42234 msgid "determine share of most used color" msgstr "最も使用される色のシェアを決定します。" -#: ../../pixmap.rst:31 b957b20f8dff45d6b5f145ea0132085b +#: ../../pixmap.rst:31 58a2bb4580f24606adf63bb3fee24c2a msgid ":meth:`Pixmap.copy`" msgstr "" -#: ../../pixmap.rst:31 0454a2fe45294572b8ccf6aeecb70dec +#: ../../pixmap.rst:31 ff8f9de2afc740448705f85ba7dd034a msgid "copy parts of another pixmap" msgstr "別のピクセルマップの一部をコピーします。" -#: ../../pixmap.rst:32 650ee635a4344173aa2a77cc384b5142 +#: ../../pixmap.rst:32 4996b53890524fcdbcc26b9c2afe9b1d msgid ":meth:`Pixmap.gamma_with`" msgstr "" -#: ../../pixmap.rst:32 47d94c5b09a84836864111709246cf32 +#: ../../pixmap.rst:32 22029953270f41a6807854232050de16 msgid "apply a gamma factor to the pixmap" msgstr "ピクセルマップにガンマ係数を適用します。" -#: ../../pixmap.rst:33 bfe48ab49a74498ba0adaf1406721bdc +#: ../../pixmap.rst:33 40cf6037eadb4832a1b44506d8d01399 msgid ":meth:`Pixmap.invert_irect`" msgstr "" -#: ../../pixmap.rst:33 1ede392454cc47f58284223f2362b251 +#: ../../pixmap.rst:33 0707ed5e821a4a4d81f4ea9a52658267 msgid "invert the pixels of a given area" msgstr "指定された領域のピクセルを反転させます。" -#: ../../pixmap.rst:34 df42100d1e804e16a1bd7869f55570bc +#: ../../pixmap.rst:34 d23537d6fee14f07aa66138511dc6c65 msgid ":meth:`Pixmap.pdfocr_save`" msgstr "" -#: ../../pixmap.rst:34 ../../pixmap.rst:35 0e4e34d1f97c4f9597e14c2c17a9bab8 -#: 6944f767ac0c4ddcae2b98412431c0d3 +#: ../../pixmap.rst:34 ../../pixmap.rst:35 8f6ccda63f43474180b9586a57391f58 +#: 945e614e77b64eb482a19001cb8de49f msgid "save the pixmap as an OCRed 1-page PDF" msgstr "OCR処理済みの1ページのPDFとしてピクセルマップを保存します。" -#: ../../pixmap.rst:35 504ed4638dff4cfd8807922bf88f6316 +#: ../../pixmap.rst:35 d5176b33c73340a6a2906f65b588a4f7 msgid ":meth:`Pixmap.pdfocr_tobytes`" msgstr "" -#: ../../pixmap.rst:36 a56c230be18344aaa1be4b358e92ecc2 +#: ../../pixmap.rst:36 2da9bdc5ad864f37b2c62da533d67cf6 +msgid ":meth:`Pixmap.pil_image`" +msgstr "" + +#: ../../pixmap.rst:36 29e69cbd73be44089903ba1740e2cf07 +msgid "create a Pillow Image" +msgstr "" + +#: ../../pixmap.rst:37 6b929dd44136455a858f7179f537c18a msgid ":meth:`Pixmap.pil_save`" msgstr "" -#: ../../pixmap.rst:36 d2060fbd55744021b21b7f433076dd63 -msgid "save as image using pillow" +#: ../../pixmap.rst:37 37b0e24c872346ae9f1a647c4bd24012 +#, fuzzy +msgid "save as a Pillow Image" msgstr "Pillowを使用してイメージとして保存します。" -#: ../../pixmap.rst:37 0419ca2c4595427d99163ba21c95f6c5 +#: ../../pixmap.rst:38 c3921105394e4b3eb76fdc5cb6ad144a msgid ":meth:`Pixmap.pil_tobytes`" msgstr "" -#: ../../pixmap.rst:37 3745ecc34d894b3b8e3282108fd14696 -msgid "write to `bytes` object using pillow" +#: ../../pixmap.rst:38 36ae1252a8db4e1b9277468406a618fb +#, fuzzy +msgid "write to `bytes` as a Pillow Image" msgstr "Pillowを使用してバイトオブジェクトに書き込みます。" -#: ../../pixmap.rst:38 42963d9ff31846bfad4d49dac1934445 +#: ../../pixmap.rst:39 7c75d4ea1f1a4fb58bad635407d3e379 msgid ":meth:`Pixmap.pixel`" msgstr "" -#: ../../pixmap.rst:38 bfb13086459b4e16914f4f7412e6ed0e +#: ../../pixmap.rst:39 04aafaa7a54f4026bb9e10428ea2e587 msgid "return the value of a pixel" msgstr "ピクセルの値を返します。" -#: ../../pixmap.rst:39 aa727520b4144dc2843e094bb84829e7 +#: ../../pixmap.rst:40 07d7d6018e0345919ffa6c3ddb7ff4c0 msgid ":meth:`Pixmap.save`" msgstr "" -#: ../../pixmap.rst:39 c538b8459f3b41f79cb866eabf9280a5 +#: ../../pixmap.rst:40 cbe561326c8a448cb7de762f58476155 msgid "save the pixmap in a variety of formats" msgstr "さまざまな形式でピクセルマップを保存します。" -#: ../../pixmap.rst:40 7987c96ad2024cb5a5251362c5c9e078 +#: ../../pixmap.rst:41 696958d881f14015aa1faf107f4bc044 msgid ":meth:`Pixmap.set_alpha`" msgstr "" -#: ../../pixmap.rst:40 d65d4f1cf1564514b2738fa44036b6e1 +#: ../../pixmap.rst:41 ab4fdc89e97142e182425396b40ef97a msgid "set alpha values" msgstr "アルファ値を設定します。" -#: ../../pixmap.rst:41 b7d9daa9d17447f2933d3aeb7c1a5a0c +#: ../../pixmap.rst:42 3817002ddb67438ab6df965afcb5320a msgid ":meth:`Pixmap.set_dpi`" msgstr "" -#: ../../pixmap.rst:41 963d5e6c326a4b8096a0f90dbe8bfc82 +#: ../../pixmap.rst:42 8a12351eeb954305980a638264a4fd54 msgid "set the image resolution" msgstr "イメージの解像度を設定します。" -#: ../../pixmap.rst:42 bdb840a286d042388ce593f5da668d4f +#: ../../pixmap.rst:43 a7301742a2114f6f8ab65df62129d10c msgid ":meth:`Pixmap.set_origin`" msgstr "" -#: ../../pixmap.rst:42 8799ddcb316b4cab9a5084360da7167b +#: ../../pixmap.rst:43 aee6bba31fc04b56b7c710c5f095b7f5 msgid "set pixmap x,y values" msgstr "ピクセルマップのx、y値を設定します。" -#: ../../pixmap.rst:43 183c5bc97ac948a9b70fcacdc58078da +#: ../../pixmap.rst:44 e0ac8dd1a57f40d0945b8173d48c4570 msgid ":meth:`Pixmap.set_pixel`" msgstr "" -#: ../../pixmap.rst:43 9efadedc5f544f7690f3defbd8ec1ed0 +#: ../../pixmap.rst:44 cb2f37a2a7d44bb580341d508b707253 msgid "set color and alpha of a pixel" msgstr "ピクセルの色とアルファを設定します。" -#: ../../pixmap.rst:44 8ea87da8561f4e5595a1ba284a9af232 +#: ../../pixmap.rst:45 95436967c5a14d328b60e860cb021fd5 msgid ":meth:`Pixmap.set_rect`" msgstr "" -#: ../../pixmap.rst:44 23071734de9a42ff9955900d73437cca +#: ../../pixmap.rst:45 3001983c35d54c1c885c6bbb3caec2a9 msgid "set color and alpha of all pixels in a rectangle" msgstr "四角形内のすべてのピクセルの色とアルファを設定します。" -#: ../../pixmap.rst:45 d03a908a194c4a4093ec0d3029b5c166 +#: ../../pixmap.rst:46 7eb6d64ab1c8421ab755cfccb2c22809 msgid ":meth:`Pixmap.shrink`" msgstr "" -#: ../../pixmap.rst:45 3c2d3e63694049a88991bfb6364cc8cb +#: ../../pixmap.rst:46 a5e458763b8647049d6747f7cd17b090 msgid "reduce size keeping proportions" msgstr "比率を保持しながらサイズを縮小します。" -#: ../../pixmap.rst:46 8450eaee23484577bc647c7643dee72b +#: ../../pixmap.rst:47 2ff2589ddd7d456c9bc8b6cbaebb6e4b msgid ":meth:`Pixmap.tint_with`" msgstr "" -#: ../../pixmap.rst:46 0ada3dad959d4a1698ea4bf90b568a38 +#: ../../pixmap.rst:47 29e0e49cd2c04309950e986eda59b280 msgid "tint the pixmap" msgstr "ピクセルマップに色調を付けます。" -#: ../../pixmap.rst:47 35bbecb7a7f743f8a57d776f8ecab80a +#: ../../pixmap.rst:48 b7cae291504143d78af18adba4d49907 msgid ":meth:`Pixmap.tobytes`" msgstr "" -#: ../../pixmap.rst:47 13acf96feea44ba7b121b6bf667fc6ee +#: ../../pixmap.rst:48 a26221b5a3bc43099df949aca8048bdb msgid "return a memory area in a variety of formats" msgstr "さまざまな形式のメモリ領域を返します。" -#: ../../pixmap.rst:48 d7a59679fa064542b405f1aeb186f992 +#: ../../pixmap.rst:49 ae2d32cf29374accbbc65429417194f4 msgid ":meth:`Pixmap.warp`" msgstr "" -#: ../../pixmap.rst:48 94ab6f2887404530b8ae746640f5aab4 +#: ../../pixmap.rst:49 6b5e465bd6d247cebcdf5944e094d2b7 msgid "return a pixmap made from a quad inside" msgstr "内部の四角形から作成されたピクセルマップを返します。" -#: ../../pixmap.rst:49 10fccc962d5346beb13feddf94bc05ad +#: ../../pixmap.rst:50 6ba96e42ecd541fdaa95d63b609c3f41 msgid ":attr:`Pixmap.alpha`" msgstr "" -#: ../../pixmap.rst:49 74819afed8454d6c8077955fa866e252 +#: ../../pixmap.rst:50 3b7c2ea159d14c73b409a6a1dc1b8534 msgid "transparency indicator" msgstr "透明度指示子" -#: ../../pixmap.rst:50 c12468603a314899bb9c2665160eda90 +#: ../../pixmap.rst:51 fa9053d32e4c45e8a8eccc4f38ca49a9 msgid ":attr:`Pixmap.colorspace`" msgstr "" -#: ../../pixmap.rst:50 61663bc5059e40349bc12e84081222f3 +#: ../../pixmap.rst:51 33f9f6c061f842418df3b7806886b98b msgid "pixmap's :ref:`Colorspace`" msgstr "ピクセルマップの :ref:`Colorspace`" -#: ../../pixmap.rst:51 ee1735dd83cb4d9c8c1a48ffeb7d9ca2 +#: ../../pixmap.rst:52 20cad8a8d6484916abe2f4ba0d63ace9 msgid ":attr:`Pixmap.digest`" msgstr "" -#: ../../pixmap.rst:51 13d23d52ffb34d89a3244bd04de0e87c +#: ../../pixmap.rst:52 489c06ce324645d88ed77246e571757e msgid "MD5 hashcode of the pixmap" msgstr "ピクセルマップのMD5ハッシュコード" -#: ../../pixmap.rst:52 ef7ec1c3af02402a983878267968e473 +#: ../../pixmap.rst:53 234a88bff92c4e49846b2048d469c54c msgid ":attr:`Pixmap.height`" msgstr "" -#: ../../pixmap.rst:52 9eb538b8ebec46ae89bbf5ced5c6119c +#: ../../pixmap.rst:53 18a053aba3ec43c8afd44bf4be96c026 msgid "pixmap height" msgstr "ピクセルマップの高さ" -#: ../../pixmap.rst:53 aa06d648c4bb40eb8419c19a16985596 +#: ../../pixmap.rst:54 398b74503d5b49879f02786a35330b11 msgid ":attr:`Pixmap.interpolate`" msgstr "" -#: ../../pixmap.rst:53 6fae42e121464c8b8a420664fb0aa6f4 +#: ../../pixmap.rst:54 91977f5e1b7543f8a2b03b19e18d1501 msgid "interpolation method indicator" msgstr "補間メソッド指示子" -#: ../../pixmap.rst:54 0c54071996a341cca852ba51e7978085 +#: ../../pixmap.rst:55 54b207f4eab2405b816d884877ad9c4c msgid ":attr:`Pixmap.is_monochrome`" msgstr "" -#: ../../pixmap.rst:54 fbd5dd4bf2ad48edae7aa4b3317c04a8 +#: ../../pixmap.rst:55 fb08d786db114396b984c5d030c45d02 msgid "check if only black and white occur" msgstr "黒と白だけが存在するか確認します。" -#: ../../pixmap.rst:55 5ec012b7848548ef8ad6f8fc2670ce11 +#: ../../pixmap.rst:56 3832489ec6eb4347921772d35d4cfd59 msgid ":attr:`Pixmap.is_unicolor`" msgstr "" -#: ../../pixmap.rst:55 39b1bfe8ddd048cfb650f403a7bb04fb +#: ../../pixmap.rst:56 ff68226cd8014c249ae8fdd8c2cff414 msgid "check if only one color occurs" msgstr "単一の色しか存在しないか確認します。" -#: ../../pixmap.rst:56 a68fe192718f4b3aa244e537c3ff7f21 +#: ../../pixmap.rst:57 fa0770af685443109d3f4640946c8159 msgid ":attr:`Pixmap.irect`" msgstr "" -#: ../../pixmap.rst:56 4ab56d0437d247d59ab5e77f070f8798 +#: ../../pixmap.rst:57 f8e324284a7d40e6955f1b8ddd6f2315 msgid ":ref:`IRect` of the pixmap" msgstr "ピクセルマップの :ref:`IRect` " -#: ../../pixmap.rst:57 c0685ce1f49c4f47bb9a18786ed564b6 +#: ../../pixmap.rst:58 7c2c5f3990c44ab0968a07d38671855d msgid ":attr:`Pixmap.n`" msgstr "" -#: ../../pixmap.rst:57 fe50345b574f4d6bb19f01c69d279d4b +#: ../../pixmap.rst:58 428d23880e74446f9a312a5881b14f3f msgid "bytes per pixel" msgstr "ピクセルごとのバイト数" -#: ../../pixmap.rst:58 a7b82b34cd054d61b9792c717fbf8d77 +#: ../../pixmap.rst:59 c49a0d0f062c42668552f8ecb5da0b9e msgid ":attr:`Pixmap.samples_mv`" msgstr "" -#: ../../pixmap.rst:58 01778e9aa1ce4483bdf3d9cbd8b8064a +#: ../../pixmap.rst:59 f30d3be26197416bb0fb72016cd0d7ec msgid "`memoryview` of pixel area" msgstr "ピクセル領域の `memoryview` " -#: ../../pixmap.rst:59 ab0ee7ed8a734ac88571726c438c77b6 +#: ../../pixmap.rst:60 07c58756a4814330a53d2862c3dc9eb0 msgid ":attr:`Pixmap.samples_ptr`" msgstr "" -#: ../../pixmap.rst:59 82b8384c101b4c34b5fc3635595f968f +#: ../../pixmap.rst:60 72404d375527475bb8ba045f0a4ff0d6 msgid "Python pointer to pixel area" msgstr "ピクセル領域へのPythonポインタ" -#: ../../pixmap.rst:60 b2d9ef6aef394d5aadf9ede38ee8f15a +#: ../../pixmap.rst:61 6c6478b2c83846a09684bd5f600e8915 msgid ":attr:`Pixmap.samples`" msgstr "" -#: ../../pixmap.rst:60 72c2b3fe96fb4e3db873e4799f48b7a9 +#: ../../pixmap.rst:61 5822f1f53ba74e128e75ce40d18e9440 msgid "`bytes` copy of pixel area" msgstr "ピクセル領域の `bytes` コピー" -#: ../../pixmap.rst:61 50f5502492714fadbd4be9ea93e54f9b +#: ../../pixmap.rst:62 94a4d840ade34b14a05adda1fcc8e4c4 msgid ":attr:`Pixmap.size`" msgstr "" -#: ../../pixmap.rst:61 95aa6913b6c241d4b41be8efd875c810 +#: ../../pixmap.rst:62 89478a5e4ab546798cd82132e9309e3d msgid "pixmap's total length" msgstr "ピクセルマップの合計長さ" -#: ../../pixmap.rst:62 e1e4bcef3fb54127a8dff9dfd7b2e0d4 +#: ../../pixmap.rst:63 73c0d5608362402887a7c810885470e0 msgid ":attr:`Pixmap.stride`" msgstr "" -#: ../../pixmap.rst:62 d0efa6af72b04ef0a1fc0f18c9e8e8ca +#: ../../pixmap.rst:63 62b855ce82e24e63b8d146ac28be7489 msgid "size of one image row" msgstr "1つの画像行のサイズ" -#: ../../pixmap.rst:63 03dbdd074de64eec878c8e085040443c +#: ../../pixmap.rst:64 d1467286769b4d3ea7798bffedc07b8e msgid ":attr:`Pixmap.width`" msgstr "" -#: ../../pixmap.rst:63 e18424019d6c4773813b166dd4c901d7 +#: ../../pixmap.rst:64 dbb3847a398f49c786d38b316353a732 msgid "pixmap width" msgstr "ピクセルマップの幅" -#: ../../pixmap.rst:64 eb9e9689345a4295b0dced53c3923c27 +#: ../../pixmap.rst:65 7a3a9ef923b3497592409c890367e1ad msgid ":attr:`Pixmap.x`" msgstr "" -#: ../../pixmap.rst:64 652694ff719f4cd2b3a1590887de2883 +#: ../../pixmap.rst:65 e00e9a4607a14feead94f7ba401671f0 msgid "X-coordinate of top-left corner" msgstr "左上隅のX座標" -#: ../../pixmap.rst:65 985549c795f64100a323861364967f4d +#: ../../pixmap.rst:66 1337a114bbf34fbfa97d3fea51fe5ee2 msgid ":attr:`Pixmap.xres`" msgstr "" -#: ../../pixmap.rst:65 79c926d7b21f4613a3c362f25e4c4a8f +#: ../../pixmap.rst:66 af03d65619b640d2aafc512876ee5094 msgid "resolution in X-direction" msgstr "X方向の解像度" -#: ../../pixmap.rst:66 0912e7e7d34a49328081300b49ba8710 +#: ../../pixmap.rst:67 a8d8d3f044dd41fdb06c38ba95356e2b msgid ":attr:`Pixmap.y`" msgstr "" -#: ../../pixmap.rst:66 84ff7260dee34edb9451a45a7492f070 +#: ../../pixmap.rst:67 88ca23844fdd4a13a0c82946ea9d9604 msgid "Y-coordinate of top-left corner" msgstr "左上隅のY座標" -#: ../../pixmap.rst:67 a386033ddb664d3e80260ac7c6df9741 +#: ../../pixmap.rst:68 937853506029460e923b4840f23b6172 msgid ":attr:`Pixmap.yres`" msgstr "" -#: ../../pixmap.rst:67 e6b9b703d2f34e52a9c254a9b819403d +#: ../../pixmap.rst:68 eca2b563beb946958293e50aba010c60 msgid "resolution in Y-direction" msgstr "Y方向の解像度" -#: ../../pixmap.rst:70 e9ef25daa8ab4f94a2ca39567c36af9d +#: ../../pixmap.rst:71 3831cc44d77c448483fb36609c531af8 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../pixmap.rst:76 bc83d7a5f02e48cf8086ed52ba36e9d1 +#: ../../pixmap.rst:77 e82689d4f22140fda01d0a1f1f961166 msgid "" "**New empty pixmap:** Create an empty pixmap of size and origin given by " "the rectangle. So, *irect.top_left* designates the top left corner of the" @@ -438,102 +448,102 @@ msgstr "" "**初期化されず** 、データが格納されます。データを初期化するには、:meth:`clear_with` や :meth:`set_rect` " "などを使用してください。" -#: ../../pixmap.rst 231178ce8cc442159dfc334a6042953b -#: 28ec7e65903f46b38929be7029ed10da 313e2303a953449993a3a254bb7f0d6e -#: 4c7e2e8b5a6144ec81ed9c5e42eaa071 591d233a700c4bc2935e19c6796929bd -#: 62443f836a0843448eae5559e1906420 63022277f25341aabb9d3029143af4e8 -#: 651133bac95041bbbde484f6ace01771 765c5aaf22484203ad4863f659d3df17 -#: 77f3c8b72a0e4ee7b0d1e1b1c0ad63fb 78562d21f2ad472cb6d3da9e8b2a3483 -#: 87af99022f9d4f67a00ba2e6cc32f1d5 8ec7fb5ba8414993b16dfbff41a9c4cf -#: 909726df26ae4b4eb5d6ec3dd0ac948c 97d2ae49d9c64f6abaf05b381a7de973 -#: adc46bd37a0d422e83e44f3c95707f0c adef458707ee4058bdfa27b56bfb466c -#: baf68248ccf5415795017eb09345b1eb c904da7089be4e169a7089c6638de9bf -#: cca5d62b8302404fa49973b0cc49420c d6bc984f4cbb4c5a87ec167c5f886e19 -#: dba3efe082ac43d189a7b22b724f61e4 e143d142c8994aeead105de733aa309b -#: e1ac658f17fb4fab9f0a9f8cb3e60084 e4008073c88d466e9df1a86f078d5856 -#: e87d206edd0c48f1b29972eb8fb71289 ebaf21187bb642a58082c0f4de5e1809 -#: f522a6868513427197cd02d7073ddc06 +#: ../../pixmap.rst 04c82acbb0704deb9b8e5c18165b6bf8 +#: 3727ed9732064cdbbdf44c77c088bed4 43ec6c91b1d64ca8974534981e3cb2fe +#: 46501be6a08942d4ba0f524dd9f99336 598ec9d89b3844acaa2768e506e1ef84 +#: 649475c8ecfb464c9a6ae739de94f281 6b985c0bf351436a9cfa625a54c1663b +#: 744515809c7f4c24be498f9282730a42 89e68a41c4ab45c7ba0df17aa9e45060 +#: 8b28e1c83aa64bdc848974dc2794c508 8f78a6d5a5404e2cb7a1664e7dfbe25c +#: 97edca6f7e0d4f258235e00ff34dcfc2 9940b74d0d8b4c70bb697f48c9e9759d +#: 9ce878d378ba480d9776dfa61598d068 a0e92ef5f10048548aab0373bdbeac5c +#: a19bfcafbcfa4894833112ca5e9c4b14 a68d91085636432db6ebe4af6b1d1eed +#: ae311133670f4224a80bdacc16dd9421 b2e3cbd6ddeb4711961585117e6bdf75 +#: c2f1342870c0459a8f8f4548dec2e90e d3f6dc68b14b4fd7a9992ed78ef26d74 +#: daba744043af44fe9f3519358e39f5b5 de7213366a444b92a8e0027f86b8ed23 +#: df96a79ef0f04acf842a1d57511a32d3 e3c085f3fcd64c96bb4c6c637182193f +#: e4c967fecb7c4109b1bd470f975a0b97 f48cc9d057a74523a74a4fb856788ddb +#: fd47620a6c93482dbb9a81e5019c6d94 msgid "Parameters" msgstr "" -#: ../../pixmap.rst:78 fb3cbc93a91b4546adfe457604e35ca9 +#: ../../pixmap.rst:79 d6bdcdbc91ee45fb94a2a9582c61fc21 msgid "colorspace." msgstr "カラースペース。" -#: ../../pixmap.rst:81 1994e85a3eab4b39994a5edbf47ef2fd +#: ../../pixmap.rst:82 5402c078cd664e5da159da173e297681 msgid "The pixmap's position and dimension." msgstr "ピクマップの位置と寸法。" -#: ../../pixmap.rst:83 e675e8b40c614575a6467d7adbab7466 +#: ../../pixmap.rst:84 d9476783cc2e430a87b9e0fbdd157a2d msgid "" "Specifies whether transparency bytes should be included. Default is " -"*False*." -msgstr "透明度バイトを含めるかどうかを指定します。デフォルトは *False* です。" +"``False``." +msgstr "透明度バイトを含めるかどうかを指定します。デフォルトは ``False`` です。" -#: ../../pixmap.rst:87 eed5de98cfda427bab6eb165b67cfd61 +#: ../../pixmap.rst:88 4eb4292d85c2465492ae894a48bdd47c msgid "" "**Copy and set colorspace:** Copy *source* pixmap converting colorspace. " "Any colorspace combination is possible, but source colorspace must not be" -" *None*." +" ``None``." msgstr "" "**コピーとカラースペースの設定:** カラースペースを変換しながら *ソース* " -"ピクマップをコピーします。どのカラースペースの組み合わせでも可能ですが、ソースカラースペースは *None* であってはいけません。" +"ピクマップをコピーします。どのカラースペースの組み合わせでも可能ですが、ソースカラースペースは ``None`` であってはいけません。" -#: ../../pixmap.rst:89 81e9b0558fe549d89145823bbd70d282 +#: ../../pixmap.rst:90 d46ac4b8cb6448e3b6b89babd13d2f7c msgid "" -"desired **target** colorspace. This **may also be** *None*. In this case," -" a \"masking\" pixmap is created: its :attr:`Pixmap.samples` will consist" -" of the source's alpha bytes only." +"desired **target** colorspace. This **may also be** ``None``. In this " +"case, a \"masking\" pixmap is created: its :attr:`Pixmap.samples` will " +"consist of the source's alpha bytes only." msgstr "" -"**ターゲット** となるカラースペース。これは *None* **である場合もあります** 。この場合、 \"マスク\" " +"**ターゲット** となるカラースペース。これは ``None`` **である場合もあります** 。この場合、 \"マスク\" " "ピクマップが作成されます。その :attr:`Pixmap.samples` は、ソースのアルファバイトだけで構成されます。" -#: ../../pixmap.rst:92 ../../pixmap.rst:111 3d95b72c0e1c4c10921ced354248ebaf -#: 917804f4ede54a8e898583a01154e8da +#: ../../pixmap.rst:93 ../../pixmap.rst:112 37a3a54715b24a98ae2d3e3568ab220b +#: d14a39f52b72446da45629a3f0106813 msgid "the source pixmap." msgstr "ソースピクマップ。" -#: ../../pixmap.rst:97 93bd380b89324af9aaafe3454f81cab3 +#: ../../pixmap.rst:98 3d9371c0866044dbb696026132fda243 msgid "New in v1.18.18" msgstr "バージョン 1.18.18 で新規追加" -#: ../../pixmap.rst:99 a6a987c7720c485a83519c0b97ef4e5f +#: ../../pixmap.rst:100 9adab13dd6aa458eb5007fa2d87356be msgid "" "**Copy and add image mask:** Copy *source* pixmap, add an alpha channel " "with transparency data from a mask pixmap." msgstr "**コピーとイメージマスクの追加:** ソースピクマップをコピーし、マスクピクマップから透明度データを持つアルファチャネルを追加します。" -#: ../../pixmap.rst:101 1dc2507fcc584dd788cc1a02839f87ee +#: ../../pixmap.rst:102 9032a54c3bbe423889497b70db24173e msgid "pixmap without alpha channel." msgstr "アルファチャネルを持たないピクマップ。" -#: ../../pixmap.rst:104 8a83c9d5c28549bf8b3192321551a13a +#: ../../pixmap.rst:105 b3628e7ef37d4f59bd58c1706097c9d4 msgid "a mask pixmap. Must be a graysale pixmap." msgstr "マスクピクマップ。グレースケールのピクマップである必要があります。" -#: ../../pixmap.rst:109 4f6844c9f9954ff5aec77b67c6c1ea56 +#: ../../pixmap.rst:110 b2fa248a54904ef7bf47c4b6485fa524 msgid "" "**Copy and scale:** Copy *source* pixmap, scaling new width and height " "values -- the image will appear stretched or shrunk accordingly. Supports" -" partial copying. The source colorspace may be *None*." +" partial copying. The source colorspace may be ``None``." msgstr "" "**コピーとスケーリング:** " "ソースピクマップをコピーし、新しい幅と高さの値にスケーリングします。イメージはそれに応じてストレッチまたは縮小されます。部分的なコピーをサポートしています。ソースカラースペースは" -" *None* であってもかまいません。" +" ``None`` であってもかまいません。" -#: ../../pixmap.rst:114 add02cdc16184f8b93aab2e6868113de +#: ../../pixmap.rst:115 fb20f915c5c34d8eb95a37f556c276db msgid "desired target width." msgstr "ターゲットの幅。" -#: ../../pixmap.rst:116 d2e7ba5cac0f489087c7c4be70476054 +#: ../../pixmap.rst:117 369c74bc223b4d638f825842f16c1702 msgid "desired target height." msgstr "ターゲットの高さ。" -#: ../../pixmap.rst:118 13baf2086e0549ea81f370de6fe0b17a +#: ../../pixmap.rst:119 317c6cb2f5b94e99946548f9f90c0874 msgid "restrict the resulting pixmap to this region of the **scaled** pixmap." msgstr "**スケーリングされた** ピクマップのこの領域に制限します。" -#: ../../pixmap.rst:120 d8ed70c5ab55420eb98c3ae3b0ad3a6d +#: ../../pixmap.rst:121 8567b7f81bb14779aa9cef3108556966 msgid "" "If width or height do not *represent* integers (i.e. `value.is_integer() " "!= True`), then the resulting pixmap **will have an alpha channel**." @@ -541,7 +551,7 @@ msgstr "" "幅または高さが整数を *表していない* 場合(つまり、`value.is_integer() != True` の場合)、結果のピクマップには " "**アルファチャンネルが含まれます** 。" -#: ../../pixmap.rst:124 6569d43ca31f49cba350c8dd2cbdee87 +#: ../../pixmap.rst:125 76c709b8b48042c58ce3db57a8f83ddf msgid "" "**Copy and add or drop alpha:** Copy *source* and add or drop its alpha " "channel. Identical copy if *alpha* equals *source.alpha*. If an alpha " @@ -550,18 +560,18 @@ msgstr "" "**コピーしてアルファの追加または削除:** *ソース* をコピーし、そのアルファチャンネルを追加または削除します。*alpha* が " "*source.alpha* と等しい場合、同一のコピーになります。アルファチャンネルが追加される場合、その値は255に設定されます。" -#: ../../pixmap.rst:126 ../../pixmap.rst:304 3dcdb226c8cd4e09b81346a07726303f -#: 8a82f87ae225453885f3a4bd8a611d5f +#: ../../pixmap.rst:127 ../../pixmap.rst:305 cf7368bac4e641b1a0cf7dd4a638d7c6 +#: d49c796034f54eb4b7f1e43679eb0288 msgid "source pixmap." msgstr "ソースのピクマップ。" -#: ../../pixmap.rst:129 9d0d3020d95644419270f242bd10e721 +#: ../../pixmap.rst:130 efb80ba0754740939eaab8d979f6b613 msgid "" "whether the target will have an alpha channel, default and mandatory if " -"source colorspace is *None*." -msgstr "対象にアルファチャンネルがあるかどうか、デフォルトで、ソースのcolorspaceが *None* の場合は必須です。" +"source colorspace is ``None``." +msgstr "対象にアルファチャンネルがあるかどうか、デフォルトで、ソースのcolorspaceが ``None`` の場合は必須です。" -#: ../../pixmap.rst:131 ecb350af29e94c7c86bd9302cd3741ef +#: ../../pixmap.rst:132 79e713cd359b428f85275cf68ed67f18 msgid "" "A typical use includes separation of color and transparency bytes in " "separate pixmaps. Some applications require this like e.g. " @@ -570,7 +580,7 @@ msgstr "" "典型的な使用例には、カラーと透明バイトを別々のピクマップに分離することが含まれます。一部のアプリケーションでは、*wxPython* の " "*wx.Bitmap.FromBufferAndAlpha()* など、これが必要です。" -#: ../../pixmap.rst:141 53b4b33c334b4f1a84eb65fe6cf135ff +#: ../../pixmap.rst:142 46408f56f93c41a092af425f5ed67231 msgid "" "**From a file:** Create a pixmap from *filename*. All properties are " "inferred from the input. The origin of the resulting pixmap is *(0, 0)*." @@ -578,11 +588,11 @@ msgstr "" "**ファイルから:** ファイル名から pixmap を作成します。すべてのプロパティは入力から推測されます。生成される pixmap の原点は " "*(0, 0)* です。" -#: ../../pixmap.rst:143 eb769848fad741bdb3e212b036b1aeb4 +#: ../../pixmap.rst:144 d3fbb1369429407bbceaf1dbeccd451f msgid "Path of the image file." msgstr "画像ファイルのパス。" -#: ../../pixmap.rst:147 275e859559634e45ac79a7662396f57c +#: ../../pixmap.rst:148 d6a2b16b581a44f4bbc0f0f4b98cd818 msgid "" "**From memory:** Create a pixmap from a memory area. All properties are " "inferred from the input. The origin of the resulting pixmap is *(0, 0)*." @@ -590,7 +600,7 @@ msgstr "" "**メモリから:** メモリ領域から pixmap を作成します。すべてのプロパティは入力から推測されます。生成される pixmap の原点は " "*(0, 0)* です。" -#: ../../pixmap.rst:149 841094aa8cd84895a9bac8810904510f +#: ../../pixmap.rst:150 0284b771e4d64adb8514224b52cdbb59 msgid "" "Data containing a complete, valid image. Could have been created by e.g. " "*stream = bytearray(open('image.file', 'rb').read())*. Type *bytes* is " @@ -599,7 +609,7 @@ msgid "" "1.14.13:* *io.BytesIO* is now also supported." msgstr "" -#: ../../pixmap.rst:149 760749eaffe346ddb7c2890d13b47d6b +#: ../../pixmap.rst:150 e85d94e7e7724fed90ad33c9a06b8970 msgid "" "Data containing a complete, valid image. Could have been created by e.g. " "*stream = bytearray(open('image.file', 'rb').read())*. Type *bytes* is " @@ -611,11 +621,11 @@ msgstr "" "対応しています。なぜなら、Python 2 では *bytes == str* " "となり、このメソッドはストリームをファイル名と解釈する可能性があるからです。" -#: ../../pixmap.rst:151 e0bd35965cb14b148d9d44c5cdfcb263 +#: ../../pixmap.rst:152 8f9e9f6db15b440ab212e1a2626983a5 msgid "*Changed in version 1.14.13:* *io.BytesIO* is now also supported." msgstr "*バージョン 1.14.13 で変更:* *io.BytesIO* もサポートされるようになりました。" -#: ../../pixmap.rst:156 f85be260e8cf42cc8791be52b6dd708d +#: ../../pixmap.rst:157 c8766adeba194cd0aa61ddff1e42b371 msgid "" "**From plain pixels:** Create a pixmap from *samples*. Each pixel must be" " represented by a number of bytes as controlled by the *colorspace* and " @@ -627,19 +637,19 @@ msgstr "" "パラメーターによって制御されるバイト数で表現される必要があります。生成される pixmap の原点は *(0, 0)* " "です。このメソッドは、他のプログラムによって生の画像データが提供される場合に有用です - :ref:`FAQ` を参照してください。" -#: ../../pixmap.rst:158 9ac5b5d9114f4185a9b8da577b1c8633 +#: ../../pixmap.rst:159 748eae75794c4310900a51b65cc9be9d msgid "Colorspace of image." msgstr "画像のカラースペース。" -#: ../../pixmap.rst:161 5ac3ae91051243ba8c55bbcb695a2b30 +#: ../../pixmap.rst:162 b9049341bb784d6391fd8770cfe62e9b msgid "image width" msgstr "画像の幅" -#: ../../pixmap.rst:163 33c556541cbf42169c9609a0f7ff2353 +#: ../../pixmap.rst:164 bbf94fa288d949db8b7c860097c779e0 msgid "image height" msgstr "画像の高さ" -#: ../../pixmap.rst:165 8ee060766185415f96997c50902aaf80 +#: ../../pixmap.rst:166 49f8235d84c4479baa637c94f5801efe msgid "" "an area containing all pixels of the image. Must include alpha values if " "specified. *Changed in version 1.14.13:* (1) *io.BytesIO* can now also " @@ -647,13 +657,13 @@ msgid "" "deleted or become unavailable." msgstr "" -#: ../../pixmap.rst:165 61154601c77b4e3f9e40b99e1fd10454 +#: ../../pixmap.rst:166 fdfde73a7ead42b98a6f0ba2474a0302 msgid "" "an area containing all pixels of the image. Must include alpha values if " "specified." msgstr "画像のすべてのピクセルを含む領域。指定されている場合はアルファ値を含める必要があります。" -#: ../../pixmap.rst:167 d0fc8000e58e45c3a7b9565f6f9f67b7 +#: ../../pixmap.rst:168 8db70acf22fe4db7922f7ac5d3710a37 msgid "" "*Changed in version 1.14.13:* (1) *io.BytesIO* can now also be used. (2) " "Data are now **copied** to the pixmap, so may safely be deleted or become" @@ -662,11 +672,11 @@ msgstr "" "*バージョン 1.14.13 で変更:* (1) *io.BytesIO* も使用できるようになりました。 (2) データは pixmap に " "**コピーされる** ようになり、安全に削除または利用不可能になります。" -#: ../../pixmap.rst:169 6301b16df6204022beb9ae9e1efa1e02 +#: ../../pixmap.rst:170 3dc4a28f2cb64370bf2b37f89021c8d4 msgid "whether a transparency channel is included." msgstr "透明チャネルを含めるかどうか。" -#: ../../pixmap.rst:173 0bb4e450d17b47659ec597df23b4a849 +#: ../../pixmap.rst:174 4572fc41779d42daab5dc8f513e35d38 msgid "" "The following equation **must be true**: *(colorspace.n + alpha) * width " "* height == len(samples)*." @@ -674,13 +684,13 @@ msgstr "" "以下の式が **成り立つ必要があります** : *(colorspace.n + alpha) * width * height == " "len(samples)*。" -#: ../../pixmap.rst:174 fcfa55b174684ec2b06f7cc1cab447af +#: ../../pixmap.rst:175 91c653a957194cf9aad7b1c2ec50024d msgid "" "Starting with version 1.14.13, the samples data are **copied** to the " "pixmap." msgstr "バージョン 1.14.13 以降、サンプルデータは pixmap に **コピーされます** 。" -#: ../../pixmap.rst:179 18459219d1ef4f878ed913a4398d5e78 +#: ../../pixmap.rst:180 fd23748ab8c64e67b31168fc0f996533 msgid "" "**From a PDF image:** Create a pixmap from an image **contained in PDF** " "*doc* identified by its :data:`xref`. All pimap properties are set by the" @@ -697,11 +707,11 @@ msgstr "" "`_ " "をご覧ください。これにより、PDFのすべてのイメージを復元できます。" -#: ../../pixmap.rst:181 6f929fa13fee4991a1d5b0be02119c89 -msgid "an opened **PDF** document." -msgstr "開かれた **PDF** ドキュメント。" +#: ../../pixmap.rst:182 e57129f36fc442d7baabec0f51abc872 +msgid "an opened |PDF| document." +msgstr "開かれた |PDF| ドキュメント。" -#: ../../pixmap.rst:184 e937d117978049858e1d2adb5355a9cf +#: ../../pixmap.rst:185 9384428260114615b87eaa0f8f724b7c msgid "" "the :data:`xref` of an image object. For example, you can make a list of " "images used on a particular page with :meth:`Document.get_page_images`, " @@ -710,11 +720,11 @@ msgstr "" "画像オブジェクトの :data:`xref`。たとえば、:meth:`Document.get_page_images` " "を使用して特定のページで使用されるすべてのイメージのリストを作成し、各イメージの :data:`xref` 番号も表示できます。" -#: ../../pixmap.rst:188 9456332df3d941f6bdbc6b344fa61cd1 +#: ../../pixmap.rst:189 1981e302f46a4610b7a2e501f8e6239c msgid "Initialize the samples area." msgstr "サンプル領域を初期化します。" -#: ../../pixmap.rst:190 239c8ba02b6b43a7a430dbc3cf495082 +#: ../../pixmap.rst:191 5e1dbe6c76e94fd9a2abfa5fe50a04fb msgid "" "if specified, values from 0 to 255 are valid. Each color byte of each " "pixel will be set to this value, while alpha will be set to 255 (non-" @@ -724,13 +734,13 @@ msgstr "" "指定された場合、0から255の値が有効です。各ピクセルの各カラーバイトはこの値に設定され、存在する場合はアルファが255(非透明)に設定されます。省略された場合、すべてのバイト(アルファを含む)が" " *0x00* にクリアされます。" -#: ../../pixmap.rst:192 44a66a6ce6cd4b079e68c301c2789748 +#: ../../pixmap.rst:193 9d7e7d36e32f479e80f5409d40483a8c msgid "" "the area to be cleared. Omit to clear the whole pixmap. Can only be " "specified, if *value* is also specified." msgstr "クリアする領域。ピクスマップ全体をクリアするには省略します。*value* も指定されている場合のみ指定できます。" -#: ../../pixmap.rst:196 e2af079de17d42e1a3099cdfdc38b44c +#: ../../pixmap.rst:197 1867b419449b4b1b809f327a5dc3a5a2 msgid "" "Colorize a pixmap by replacing black and / or white with colors given as " "**sRGB integer** values. Only colorspaces :data:`CS_GRAY` and " @@ -739,101 +749,101 @@ msgstr "" "ピクスマップを色付けして、黒と/または白を **sRGB整数値** として指定された色で置き換えます。:data:`CS_GRAY` と " ":data:`CS_RGB` のカラースペースのみサポートされており、他のカラースペースは警告付きで無視されます。" -#: ../../pixmap.rst:198 9b8f7a3d7d6f46dc9ac8934964dc6917 +#: ../../pixmap.rst:199 ee0538d709654cafb0022a5998e893c5 msgid "" "If the colorspace is :data:`CS_GRAY`, the average *(red + green + " "blue)/3* will be taken. The pixmap will be changed in place." msgstr "カラースペースが :data:`CS_GRAY` の場合、平均(赤+緑+青)/3が取得されます。ピクスマップはその場で変更されます。" -#: ../../pixmap.rst:200 3745075c603e465b9eb0619fcc6d1e51 +#: ../../pixmap.rst:201 c70e75dfe0c3421eb54e30276f0284f5 msgid "replace black with this value. Specifying 0x000000 makes no changes." msgstr "黒をこの値で置き換えます。0x000000を指定しても変更はありません。" -#: ../../pixmap.rst:201 be5dc93a7a2f4e2ab99653d3d5f227f2 +#: ../../pixmap.rst:202 f27cad4bd7904458a7a1fe6ba0ed6956 msgid "replace white with this value. Specifying 0xFFFFFF makes no changes." msgstr "白をこの値で置き換えます。0xFFFFFFを指定しても変更はありません。" -#: ../../pixmap.rst:203 6ca4382dcfd2482c8f60752e5cf9abe5 +#: ../../pixmap.rst:204 4177fb0e3b154e05ab526555cd5cd17b msgid "Examples:" msgstr "例:" -#: ../../pixmap.rst:205 7152941ab47348c199fa7a7b4e191c00 +#: ../../pixmap.rst:206 e5c1b2331953426b92f104ec7b4eefea msgid "`tint_with(0x000000, 0xFFFFFF)` is a no-op." msgstr "`tint_with(0x000000, 0xFFFFFF)` は操作なしです。" -#: ../../pixmap.rst:206 33195afc76c24e27b3512ea4d47a34b0 +#: ../../pixmap.rst:207 484345c4ad054003bdd3963f19c34815 msgid "" "`tint_with(0x00FF00, 0xFFFFFF)` changes black to green, leaves white " "intact." msgstr "`tint_with(0x00FF00, 0xFFFFFF)` は黒を緑に変更し、白はそのままです。" -#: ../../pixmap.rst:207 abe2da909ca340ac8e7160db602b4281 +#: ../../pixmap.rst:208 a66550a8ae304016b8440aadfc19ff9f msgid "`tint_with(0xFF0000, 0x0000FF)` changes black to red and white to blue." msgstr "`tint_with(0xFF0000, 0x0000FF)` は黒を赤に変更し、白を青に変更します。" -#: ../../pixmap.rst:212 1b72d750c0614bfa96598cf9b92e0a9f +#: ../../pixmap.rst:213 6f6c315eb07246bebf541517bef1c9af msgid "" "Apply a gamma factor to a pixmap, i.e. lighten or darken it. Pixmaps with" -" colorspace *None* are ignored with a warning." -msgstr "ピクセルマップにガンマ係数を適用し、つまり明るくしたり暗くしたりします。色空間が *None* のピクセルマップは警告とともに無視されます。" +" colorspace ``None`` are ignored with a warning." +msgstr "ピクセルマップにガンマ係数を適用し、つまり明るくしたり暗くしたりします。色空間が ``None`` のピクセルマップは警告とともに無視されます。" -#: ../../pixmap.rst:214 f7f82e1500894678ab67e9463845319f +#: ../../pixmap.rst:215 ab0e5804c9284ea4b62d73c90c08e97c msgid "" "*gamma = 1.0* does nothing, *gamma < 1.0* lightens, *gamma > 1.0* darkens" " the image." msgstr "*gamma = 1.0* は何も行いません。*gamma < 1.0* は明るくし、*gamma > 1.0* は暗くします。" -#: ../../pixmap.rst:218 76ec15b024ca4bd7b290786cc6e40738 +#: ../../pixmap.rst:219 dcf93c5b5fc74c65b0e7e7a38afb730e #, fuzzy msgid "" "Shrink the pixmap by dividing both, its width and height by 2\\ " ":sup:``n``." msgstr "Pixmapを2の :sup:`n` 乗で縮小します。" -#: ../../pixmap.rst:220 0127172dbd894ae39201a4fead4b64f8 +#: ../../pixmap.rst:221 ed3452ecabbb456a9a4125ec50244103 msgid "" "determines the new pixmap (samples) size. For example, a value of 2 " "divides width and height by 4 and thus results in a size of one 16\\ " ":sup:`th` of the original. Values less than 1 are ignored with a warning." msgstr "新しいPixmap(サンプル)のサイズを決定します。例えば、値が2の場合、幅と高さを4分の1に分割し、元のサイズの16分の1のサイズになります。1未満の値は警告として無視されます。" -#: ../../pixmap.rst:222 fe0dac8e6dea479fa6c4b13602681909 +#: ../../pixmap.rst:223 622d36faf6a84ca784a5f39e4a6afecf msgid "" "Use this methods to reduce a pixmap's size retaining its proportion. The " "pixmap is changed \"in place\". If you want to keep original and also " "have more granular choices, use the resp. copy constructor above." msgstr "これを使用して比を保持したままPixmapのサイズを縮小します。Pixmapは「その場で」変更されます。元のピクセルを保持し、より詳細な選択肢を持つ場合は、上記のコピーコンストラクタを使用してください。" -#: ../../pixmap.rst:226 8ad00ae6574d4a8ea6bfdb99184ef21d +#: ../../pixmap.rst:227 b41a23c5cbcf4851a4dfea41bebbd818 msgid "" "*New in version:: 1.14.5:* Return the value of the pixel at location (x, " "y) (column, line)." msgstr "*バージョン1.14.5* で新規追加:位置(x、y)(列、行)のピクセルの値を返します。" -#: ../../pixmap.rst:228 ../../pixmap.rst:238 1971446da433412bbd307550a6c603f4 -#: 86c4e766984c4247b89837a8908d7b2c +#: ../../pixmap.rst:229 ../../pixmap.rst:239 34e3f8a207914947b7ae864e627f476b +#: b5899296b9574931a00793fcbed8a228 msgid "the column number of the pixel. Must be in `range(pix.width)`." msgstr "ピクセルの列番号。範囲 `range(pix.width)` 内である必要があります。" -#: ../../pixmap.rst:229 20d7d1c92b2145dc913797c28d746779 +#: ../../pixmap.rst:230 de7004ec9480408d817e9173d2aeec9a msgid "the line number of the pixel, Must be in `range(pix.height)`." msgstr "ピクセルの行番号、範囲 `range(pix.height)` 内である必要があります。" -#: ../../pixmap.rst 12961d6bfb384feaa2b0562637b4cd59 -#: 38191700d9dc48d88818ee62f64d3f8c 965f8b86a5b54b398a81bb47e8a59622 -#: a32bd1bf3ece4893a7c3f0433525a3d5 a580aa26ea4a4b739b6e2ec55820352d -#: b2c4e1d97aa946b894e9ff3621a43b77 d7fcfe5519d947b2b024eb58356d29a5 +#: ../../pixmap.rst 0f003f56bf334c439f6f6b6a7574e806 +#: 39f61f7639f54885b80b47c9b688e4fd 4c2d78f00b5545afa93b0237d9d3f83c +#: 5b0451f6760948e99e3a479b036bd134 6199399248b547f8b31035934dea477b +#: 6ffebba666d245319137b3f60b558d14 ab7d935cf0014d7e923fde5f07eaf8c0 msgid "Return type" msgstr "" -#: ../../pixmap.rst 3bdf6579c5114034a3b00dbb2f8cf0ea -#: 54698519eed04068afe6042f10d4d526 6e5ce6b2f76843a788a84030ddfb6fb8 -#: 6f0842ab7f9046218095aa6cdc504191 79c15baa29bc466fab8ee6ff258ff0d2 -#: b0c0a8b382d047428f41a3ca1a5e6a1e +#: ../../pixmap.rst 525feb713e504326aa9bdf81dc095cf5 +#: 575a0ab6647f45edaadc1b402789c2dc 6c245aebb10e4bc68e2466b7ce643745 +#: 778f2bee2f0047eea3156192ee064a3a 82376bcf78494f7781128fcd3cf9c925 +#: e30edb3a24a94205b22864eec8be09dd f0c8fa3e3758421bbf20f90fd89c5d98 msgid "Returns" msgstr "" -#: ../../pixmap.rst:232 257e952e9ee54ae8a940a91d128c4709 +#: ../../pixmap.rst:233 e34cdb0ee52b442b8342283c7fd67240 msgid "" "a list of color values and, potentially the alpha value. Its length and " "content depend on the pixmap's colorspace and the presence of an alpha. " @@ -844,17 +854,17 @@ msgstr "" "の色空間とアルファの存在に依存します。RGBAピクセルマップの場合、結果は例えば *[r、g、b、a]* となります。すべてのアイテムは " "`range(256)` の整数です。" -#: ../../pixmap.rst:236 cf49dee16aa140ea900ae82da823e941 +#: ../../pixmap.rst:237 1214d4d289dd487e8e37d0008feabd3f msgid "" "*New in version 1.14.7:* Manipulate the pixel at location (x, y) (column," " line)." msgstr "*バージョン1.14.7で新規追加:* 位置(x、y)(列、行)のピクセルを操作します。" -#: ../../pixmap.rst:239 1ea8cdf4a6224d4287ca9057da800e8e +#: ../../pixmap.rst:240 415c7880cf0d47f99f160198e045cea4 msgid "the line number of the pixel. Must be in `range(pix.height)`." msgstr "ピクセルの行番号、`range(pix.height)` 内である必要があります。" -#: ../../pixmap.rst:240 ce79c7adf5ec40bcbaad7771737db7d6 +#: ../../pixmap.rst:241 4e3a399db293443d8dcbf77d7fff982c msgid "" "the desired pixel value given as a sequence of integers in `range(256)`. " "The length of the sequence must equal :attr:`Pixmap.n`, which includes " @@ -863,11 +873,11 @@ msgstr "" "`range(256)` の整数で表されるシーケンスとして指定された所望のピクセル値。シーケンスの長さは :attr:`Pixmap.n` " "に等しくなければならず、これにはアルファバイトも含まれます。" -#: ../../pixmap.rst:244 9b35c179c17a4eeca55e8fc401617149 +#: ../../pixmap.rst:245 da97d5dacdf44c3ca5094216f3abd5ef msgid "*New in version 1.14.8:* Set the pixels of a rectangle to a value." msgstr "*新しいバージョン1.14.8で導入されました:* 特定の値で長方形のピクセルを設定します。" -#: ../../pixmap.rst:246 cbde01d98e65436a8a041fbccc51f5d0 +#: ../../pixmap.rst:247 a72865e349784eb693a3f0fa93ad1e88 msgid "" "the rectangle to be filled with the value. The actual area is the " "intersection of this parameter and :attr:`Pixmap.irect`. For an empty " @@ -876,7 +886,7 @@ msgstr "" "値で埋める長方形。実際のエリアはこのパラメータと :attr:`Pixmap.irect` " "の交差です。空の交差(または無効なパラメータ)の場合、変更は行われません。" -#: ../../pixmap.rst:247 79bb17328264402593021947cb619810 +#: ../../pixmap.rst:248 c5c5f7d02f6740ba8b971722477d6cb6 msgid "" "the desired value, given as a sequence of integers in `range(256)`. The " "length of the sequence must equal :attr:`Pixmap.n`, which includes any " @@ -885,13 +895,13 @@ msgstr "" "`range(256)` 内の整数のシーケンスとして指定された所望の値。シーケンスの長さは :attr:`Pixmap.n` " "と等しくなければならず、これにはアルファバイトも含まれます。" -#: ../../pixmap.rst:250 cad89ee4645d4720b61f0a3a07a69556 +#: ../../pixmap.rst:251 8cdc83e7d0e345d7867dcbaba407f32d msgid "" -"*False* if the rectangle was invalid or had an empty intersection with " -":attr:`Pixmap.irect`, else *True*." -msgstr "irectが無効であるか、:attr:`Pixmap.irect` と交差しない場合は *False*、それ以外の場合は *True* 。" +"``False`` if the rectangle was invalid or had an empty intersection with " +":attr:`Pixmap.irect`, else ``True``." +msgstr "irectが無効であるか、:attr:`Pixmap.irect` と交差しない場合は ``False``、それ以外の場合は ``True`` 。" -#: ../../pixmap.rst:254 ca74972e297e469bb23db2acebeda0de +#: ../../pixmap.rst:255 6ba322bc83d8475eaa533372fdfd7a32 msgid "" "This method is equivalent to :meth:`Pixmap.set_pixel` executed for each " "pixel in the rectangle, but is obviously **very much faster** if many " @@ -900,7 +910,7 @@ msgstr "" "このメソッドは、多くのピクセルが関与する場合に **非常に高速** であるため、長方形内の各ピクセルに対して実行される " ":meth:`Pixmap.set_pixel` と同等です。" -#: ../../pixmap.rst:255 6e3fa36af26e4849ade88ad2847d67fe +#: ../../pixmap.rst:256 1deb34875fc84aa495a7d4d8f851a8f8 msgid "" "This method can be used similar to :meth:`Pixmap.clear_with` to " "initialize a pixmap with a certain color like this: " @@ -911,53 +921,53 @@ msgstr "" "のように、次のようにして特定の色でピクセルマップを初期化するために使用できます。 *pix.set_rect(pix.irect, (255, " "255, 0))* (RGBの例、ピクセルマップ全体を黄色で色付けします)。" -#: ../../pixmap.rst:259 88f155c27c974317ab923164d505a88a +#: ../../pixmap.rst:260 52fe6e363b2b455d9c586691ba4152db msgid "New in v1.17.7" msgstr "v1.17.7で新規導入" -#: ../../pixmap.rst:261 ef564fdd1b124f6a8a5300d055339885 +#: ../../pixmap.rst:262 0c090e71bae74209acd402089dcc45dd msgid "Set the x and y values of the pixmap's top-left point." msgstr "ピクセルマップの左上の点のxとyの値を設定します。" -#: ../../pixmap.rst:263 f46c33bf7e7d4f68a0226a60b78a1342 +#: ../../pixmap.rst:264 dfef8fa4195648868405de776251cd14 msgid "x coordinate" msgstr "x座標" -#: ../../pixmap.rst:264 950fbd84136c43d2ad55e8e2ade0a635 +#: ../../pixmap.rst:265 f312425c39dc4a46a348ec79c872dc81 msgid "y coordinate" msgstr "y座標" -#: ../../pixmap.rst:269 7bf1def8457849df9c8d3047ac1919ca +#: ../../pixmap.rst:270 5ff12410d1164a1c9a9c7864cbbe4b54 msgid "New in v1.16.17" msgstr "v1.16.17で新規導入." -#: ../../pixmap.rst:271 2f5dbb9777e7443fa4a217a9dea6baca +#: ../../pixmap.rst:272 423bf464c80345aba348c96dc8bcb0e6 msgid "" "Changed in v1.18.0: When saving as a PNG image, these values will be " "stored now." msgstr "v1.18.0で変更:PNGイメージとして保存する場合、これらの値が保存されるようになりました。" -#: ../../pixmap.rst:273 1ff0e86c9132426380cc7bdf87062a9b +#: ../../pixmap.rst:274 90228b29c1c540bbbf78a622f0227699 msgid "Set the resolution (dpi) in x and y direction." msgstr "xおよびy方向の解像度(dpi)を設定します。" -#: ../../pixmap.rst:275 fd8f3431bcff4ea98427e8ffc73dfb6d +#: ../../pixmap.rst:276 d61cbba5abb14f57906f7489c1c2d1dd msgid "resolution in x direction." msgstr "x方向の解像度。" -#: ../../pixmap.rst:276 ea49f8ccf9b34aadb481e7b726d769dd +#: ../../pixmap.rst:277 c20a6df47d304b2ba8d5138d14639369 msgid "resolution in y direction." msgstr "y方向の解像度。" -#: ../../pixmap.rst:281 6b73645dae514edcbba08727092fef73 +#: ../../pixmap.rst:282 97a47c5d70e64ccd923e2b02e57d4c1c msgid "Changed in v 1.18.13" msgstr "変更内容:v1.18.13で変更" -#: ../../pixmap.rst:283 bae9f05fdc2a49d7800f13597f7260a9 +#: ../../pixmap.rst:284 031092ad74ad47b6980a495da9db7978 msgid "Change the alpha values. The pixmap must have an alpha channel." msgstr "アルファ値を変更します。ピクマップにはアルファチャンネルが必要です。" -#: ../../pixmap.rst:285 4f3720b3e79542c9adfa572d61d27bff +#: ../../pixmap.rst:286 a3a1d0280e85483da4e2198c4fe3d4c4 msgid "" "the new alpha values. If provided, its length must be at least *width * " "height*. If omitted (`None`), all alpha values are set to 255 (no " @@ -968,34 +978,36 @@ msgstr "" "さでなければなりません。省略した場合(`None`)、すべてのアルファ値が255(透明でない)に設定されます。*バージョン1.14.13で変更:*" " *io.BytesIO* も受け入れられるようになりました。" -#: ../../pixmap.rst:286 fcdbd039a27943cd944d48a3c2a3a137 +#: ../../pixmap.rst:287 be097376a4b64098bf04631d15d8d255 msgid "" "*New in v1.18.13:* whether to premultiply color components with the alpha" " value." msgstr "*v1.18.13で新登場:* カラーコンポーネントをアルファ値と乗算するかどうか。" -#: ../../pixmap.rst:287 2fda89ee4eb84dfd858c404df3a35daa +#: ../../pixmap.rst:288 faeff545849749908ec45bb759eb4afc msgid "" "ignore the alpha value and set this color to fully transparent. A " "sequence of integers in `range(256)` with a length of :attr:`Pixmap.n`. " -"Default is *None*. For example, a typical choice for RGB would be " +"Default is ``None``. For example, a typical choice for RGB would be " "`opaque=(255, 255, 255)` (white)." msgstr "" "アルファ値を無視し、この色を完全に透明に設定します。長さが :attr:`Pixmap.n` で `range(256)` " -"内の整数のシーケンスです。デフォルトは *None* です。たとえば、RGBの典型的な選択肢は `opaque=(255, 255, 255)` " -"(白)です。" +"内の整数のシーケンスです。デフォルトは ``None`` です。たとえば、RGBの典型的な選択肢は `opaque=(255, 255, " +"255)` (白)です。" -#: ../../pixmap.rst:292 446c70bfb33b412b9c5217ca057edebf +#: ../../pixmap.rst:293 b21513eb6af641f6a87a82d6f13d64af msgid "" "Invert the color of all pixels in :ref:`IRect` *irect*. Will have no " -"effect if colorspace is *None*." -msgstr ":ref:`IRect` *irect* 内のすべてのピクセルの色を反転させます。colorspaceが *None* の場合は効果がありません。" +"effect if colorspace is ``None``." +msgstr "" +":ref:`IRect` *irect* 内のすべてのピクセルの色を反転させます。colorspaceが ``None`` " +"の場合は効果がありません。" -#: ../../pixmap.rst:294 13be9b8c0ac44f05ab5a593374d05e0e +#: ../../pixmap.rst:295 31dacab7f6084c39b9a628fedb660dd6 msgid "The area to be inverted. Omit to invert everything." msgstr "反転する領域。すべて反転するには省略します。" -#: ../../pixmap.rst:298 3c3735c1e7504294a6ace5610a8dccbf +#: ../../pixmap.rst:299 16aece860cd84bf184bfdb1d5db2ab65 msgid "" "Copy the *irect* part of the *source* pixmap into the corresponding area " "of this one. The two pixmaps may have different dimensions and can each " @@ -1008,7 +1020,7 @@ msgstr "" "または :data:`CS_RGB` カラースペースを持つことができますが、現在は同じアルファプロパティ [#f2]_ " "を持っている必要があります。コピー機構は、次のようにソースとターゲットの間の不一致を自動的に調整します。" -#: ../../pixmap.rst:300 e8938909ef67420288a4361ccd64d8eb +#: ../../pixmap.rst:301 73f9ee74e599424998d07298e0817340 msgid "" "If copying from :data:`CS_GRAY` to :data:`CS_RGB`, the source gray-shade " "value will be put into each of the three rgb component bytes. If the " @@ -1019,7 +1031,7 @@ msgstr "" "にコピーする場合、ソースのグレーシェード値は、3つのRGBコンポーネントバイトの各々に配置されます。逆の場合、*(r + g + b)/ 3* " "がターゲットのグレーシェード値として取られます。" -#: ../../pixmap.rst:302 6f75061a4e494cc49b3c422aceef887a +#: ../../pixmap.rst:303 7dd1e495b0d348aab71b77210668e6b4 msgid "" "Between *irect* and the target pixmap's rectangle, an \"intersection\" is" " calculated at first. This takes into account the rectangle coordinates " @@ -1034,11 +1046,11 @@ msgstr "" ":meth:`Pixmap.set_origin` " "を介して自由に変更できます)を考慮に入れます。その後、この交差のデータがコピーされます。交差が空の場合、何も起こりません。" -#: ../../pixmap.rst:307 7c62da663de24b58abbc142cd040bcf5 +#: ../../pixmap.rst:308 dd184b119e5248d5920ac872de33ada1 msgid "The area to be copied." msgstr "コピーする領域。" -#: ../../pixmap.rst:309 0197da702e2d4c88960e1ec56801397a +#: ../../pixmap.rst:310 d4e8ddacfc5a40b49f665af44c36940a msgid "" "Example: Suppose you have two pixmaps, `pix1` and `pix2` and you want to " "copy the lower right quarter of `pix2` to `pix1` such that it starts at " @@ -1047,20 +1059,20 @@ msgstr "" "例: `pix1` と `pix2` という2つのピクマップがあるとし、`pix2` の右下の四半期を `pix1` にコピーし、それが " "`pix1` の左上の点から開始するようにしたい場合、次のスニペットを使用します::" -#: ../../pixmap.rst:328 21851b3dc9b14eb6b0aa4b4100e61d0e +#: ../../pixmap.rst:329 c6bd487346be451f86926fcdc1cd0c70 msgid "" "Changed in v1.22.0: Added **direct support of JPEG** images. Image " "quality can be controlled via parameter \"jpg_quality\"." msgstr "v1.22.0で変更:**JPEG画像の直接サポート** が追加されました。画像の品質は「jpg_quality」パラメータを使用して制御できます。" -#: ../../pixmap.rst:330 4629869515894b038a21462b2327124e +#: ../../pixmap.rst:331 590ed99d62e2415ba0874b02ba3aacbc msgid "" "Save pixmap as an image file. Depending on the output chosen, only some " "or all colorspaces are supported and different file extensions can be " "chosen. Please see the table below." msgstr "Pixmapを画像ファイルとして保存します。選択した出力に応じて、一部またはすべてのカラースペースがサポートされ、異なるファイル拡張子を選択できます。詳細については以下の表をご覧ください。" -#: ../../pixmap.rst:332 c3b31c9279ac4978a41f569e7f2c6227 +#: ../../pixmap.rst:333 0f576e9f35364fc19691c25253f80a05 msgid "" "The file to save to. May be provided as a string, as a ``pathlib.Path`` " "or as a Python file object. In the latter two cases, the filename is " @@ -1070,7 +1082,7 @@ msgstr "" "保存先のファイル。文字列、``pathlib.Path`` " "、またはPythonファイルオブジェクトとして提供できます。後の2つの場合、ファイル名は対応するオブジェクトから取得されます。ファイル名の拡張子は画像フォーマットを決定し、出力パラメータで上書きできます。" -#: ../../pixmap.rst:334 e952c46806ec4732a23cf1735dbf3b80 +#: ../../pixmap.rst:335 be2871f35d3642ffbc1bd779953e07e2 msgid "" "The desired image format. The default is the filename's extension. If " "both, this value and the file extension are unsupported, an exception is " @@ -1079,26 +1091,26 @@ msgstr "" "望ましい画像フォーマット。デフォルトはファイル名の拡張子です。この値とファイル拡張子の両方がサポートされていない場合、例外が発生します。:ref:`PixmapOutput`" " を参照してください。" -#: ../../pixmap.rst:335 ../../pixmap.rst:345 289fadfd8ee448b7adb6c82212304c00 -#: 79b51bbd619e4fab89b7c4af903fd1ce +#: ../../pixmap.rst:336 ../../pixmap.rst:346 1e7816aef8254a35a92b20bbc9bae993 +#: b6b1cfa84bb1478fba319137e9812cfb msgid "" "The desired image quality, default 95. Only applies to JPEG images, else " "ignored. This parameter trades quality against file size. A value of 98 " "is close to lossless. Higher values should not lead to better quality." msgstr "望ましい画像品質、デフォルトは95です。JPEG画像にのみ適用され、それ以外の場合は無視されます。このパラメータは品質とファイルサイズをトレードオフにします。値が98の場合、ほぼロスレスです。より高い値は品質を向上させることはありません。" -#: ../../pixmap.rst 3cc0dc775ed14be4a886e815c15594a8 -#: 4153fafc7a3a4ecb9efee6b0a04f23cd 7d1da7af434244a78603776bb9ae7442 -#: a8abf9364b1e4c7ebab825c8cd656153 +#: ../../pixmap.rst 0049f315abdb4f7ebc9ae0144d80cfc6 +#: 03e24b9c91d045aabfa1397d65835db9 203b2007acbe498383e4c61b7bd3c90d +#: 9ac540976ca14e449083f2459c8e1023 a4be174bfa2f490c960f79c93a378b50 msgid "Raises" msgstr "例外" -#: ../../pixmap.rst:337 ../../pixmap.rst:347 46e65aa810c04774b0e4cbbce31bb4b1 -#: 5e237975bb7142f791ed6720ccdf86f6 +#: ../../pixmap.rst:338 ../../pixmap.rst:348 21ee933f9485440588050de142bf7403 +#: 754a7250ef82449d803a1defc433b02f msgid "For unsupported image formats." msgstr "サポートされていない画像フォーマットの場合。" -#: ../../pixmap.rst:341 e231769e0b5645bd9b2ffd648612bc0c +#: ../../pixmap.rst:342 be739c75501040f2a079dfbdb48f4cc9 msgid "" "New in version 1.14.5: Return the pixmap as a *bytes* memory object of " "the specified format -- similar to :meth:`save`." @@ -1106,7 +1118,7 @@ msgstr "" "新機能(バージョン1.14.5):指定されたフォーマットのピクマップをバイトメモリオブジェクトとして返します。これは :meth:`save` " "と似ています。" -#: ../../pixmap.rst:342 0da140d09ca643e385ec54649150f659 +#: ../../pixmap.rst:343 9dab17ea3bef4aa1ac4db2370bd6acc5 msgid "" "Changed in v1.22.0: Added **direct JPEG support**. Image quality can be " "influenced via new parameter \"jpg_quality\"." @@ -1114,35 +1126,35 @@ msgstr "" "v1.22.0で変更: **JPEG画像の直接サポート** " "が追加されました。画像の品質は「jpg_quality」パラメータを使用して制御できます。" -#: ../../pixmap.rst:344 0d85fa3f2a604ebc88dbadb52b3f72bc +#: ../../pixmap.rst:345 f867093c639347c6beaf8ee355647985 msgid "" "The desired image format. The default is \"png\". For possible values see" " :ref:`PixmapOutput`." msgstr "望ましい画像フォーマット。デフォルトは \"png\" です。:ref:`PixmapOutput` を参照してください。" -#: ../../pixmap.rst:350 748bf47e005d4f6a8234e35fff27e0d8 +#: ../../pixmap.rst:351 50414751cdad4f979734b28d6ea70d38 msgid "" "The requested image format. The default is \"png\". For other possible " "values see :ref:`PixmapOutput`." msgstr "リクエストされた画像フォーマットです。デフォルトは \"png\" です。:ref:`PixmapOutput` を参照してください。" -#: ../../pixmap.rst:354 ../../pixmap.rst:369 3234c1e7471f483c87903137f97fe870 -#: ff7ac5d976d24472b1d5b7bb8a0dff1b +#: ../../pixmap.rst:355 ../../pixmap.rst:370 5d835438e5e14ea183646da2c545e117 +#: 8aa55ac28fb04c2eb37abffc6662f510 msgid "New in v1.19.0" msgstr "v1.19.0 で新規追加" -#: ../../pixmap.rst:356 ../../pixmap.rst:371 06fde4358eac45d49177b28d6e3263c9 -#: 0a55a9a4cb684c1daf97b0a7d82d1ae6 +#: ../../pixmap.rst:357 ../../pixmap.rst:372 0d701da722c848208fb1fdca1ef0cbc3 +#: 5741b6f174484e07881ec1c6e310293c msgid "Changed in v1.22.5: Support of new parameter for Tesseract's tessdata." msgstr "v1.22.5 で変更:Tesseract の tessdata に関する新しいパラメータのサポート。" -#: ../../pixmap.rst:358 a8fd10cb09b14e5ab98fbbebfe7c9124 +#: ../../pixmap.rst:359 20e9cb25cc134e988d4ee64fb854485d msgid "" "Perform text recognition using Tesseract and save the image as a 1-page " "PDF with an OCR text layer." msgstr "Tesseract を使用してテキスト認識を実行し、OCR テキスト レイヤーを持つ 1 ページの PDF として画像を保存します。" -#: ../../pixmap.rst:360 e6bd4066be2c4cbaa42bc00d53689eb0 +#: ../../pixmap.rst:361 eed00e99897b441594fad5c8b5410f4a msgid "" "identifies the file to save to. May be either a string or a pointer to a " "file opened with \"wb\" (includes `io.BytesIO()` objects)." @@ -1150,11 +1162,11 @@ msgstr "" "保存先のファイルを識別します。文字列または \"wb\" で開かれたファイルへのポインタ (`io.BytesIO()` " "オブジェクトを含む)のいずれかである必要があります。" -#: ../../pixmap.rst:361 0347b7aca8414e5c9f121cb97fb52d88 +#: ../../pixmap.rst:362 cd441e3bfe8c4037af7676f03e04caf0 msgid "whether to compress the resulting PDF, default is `True`." msgstr "結果の PDF を圧縮するかどうか。デフォルトは `True` です。" -#: ../../pixmap.rst:362 03700e3e38b143269c427a675a773b30 +#: ../../pixmap.rst:363 96b9a6ac7dd04d56a1a8d2950c1415f2 msgid "" "the languages occurring in the image. This must be specified in Tesseract" " format. Default is \"eng\" for English. Use \"+\"-separated Tesseract " @@ -1165,7 +1177,7 @@ msgstr "" "\"eng\"(英語)です。複数の言語を使用する場合、\"eng+spa\" のように \"+\" で区切った Tesseract " "言語コードを使用します(英語とスペイン語の場合など)。" -#: ../../pixmap.rst:363 412441c9a92a440fb4df66a3a92195af +#: ../../pixmap.rst:364 da78e16ab51946d2a085c5e5f1292d45 #, fuzzy msgid "" "folder name of Tesseract's language support. If omitted, this information" @@ -1174,7 +1186,7 @@ msgstr "" ":arg str tessdata: Tesseractの言語サポートフォルダーの名前です。省略した場合、この情報は環境変数 " "`TESSDATA_PREFIX` として存在している必要があります。" -#: ../../pixmap.rst:365 1ab1c32b9f9c4628b91284229f3442c7 +#: ../../pixmap.rst:366 2701e093822949dcad9f7e0bcbc5d043 msgid "" "**Will fail** if Tesseract is not installed or if the environment " "variable \"TESSDATA_PREFIX\" is not set to the `tessdata` folder name and" @@ -1183,7 +1195,7 @@ msgstr "" "Tesseract がインストールされていない場合や、環境変数 \"TESSDATA_PREFIX\" が `tessdata` " "フォルダ名に設定されておらず、またはパラメータとして提供されていない場合、この関数は **失敗します** 。" -#: ../../pixmap.rst:373 59d566d9c82043d881ebaba9af6e83c2 +#: ../../pixmap.rst:374 f06b9cc64aad479c87a29ada5e866651 msgid "" "Perform text recognition using Tesseract and convert the image to a " "1-page PDF with an OCR text layer. Internally invokes " @@ -1192,29 +1204,30 @@ msgstr "" "Tesseractを使用してテキスト認識を実行し、画像をOCRテキストレイヤーを持つ1ページのPDFに変換します。内部的には " ":meth:`Pixmap.pdfocr_save` を呼び出します" -#: ../../pixmap.rst:375 77ba82a299fe4002813ed86bd11edfbc +#: ../../pixmap.rst:376 680223ff3239437a81388de854f6edcd msgid "" -"A 1-page PDF file in memory. Could be opened like `doc=pymupdf.open(\"pdf\"," -" pix.pdfocr_tobytes())`, and text extractions could be performed on its " -"`page=doc[0]`. .. note:: Another possible use is insertion into some" -" pdf. The following snippet reads the images of a folder and stores them " -"as pages in a new PDF that contain an OCR text layer:: doc = " -"pymupdf.open() for imgfile in os.listdir(folder): pix = " -"pymupdf.Pixmap(imgfile) imgpdf = pymupdf.open(\"pdf\", " -"pix.pdfocr_tobytes()) doc.insert_pdf(imgpdf) pix = None" -" imgpdf.close() doc.save(\"ocr-images.pdf\")" +"A 1-page PDF file in memory. Could be opened like " +"`doc=pymupdf.open(\"pdf\", pix.pdfocr_tobytes())`, and text extractions " +"could be performed on its `page=doc[0]`. .. note:: Another possible " +"use is insertion into some pdf. The following snippet reads the images of" +" a folder and stores them as pages in a new PDF that contain an OCR text " +"layer:: doc = pymupdf.open() for imgfile in " +"os.listdir(folder): pix = pymupdf.Pixmap(imgfile) " +"imgpdf = pymupdf.open(\"pdf\", pix.pdfocr_tobytes()) " +"doc.insert_pdf(imgpdf) pix = None imgpdf.close() " +"doc.save(\"ocr-images.pdf\")" msgstr "" -#: ../../pixmap.rst:375 dde41f5dc562440d9e6a25da1b5e0400 +#: ../../pixmap.rst:376 035e29c89b8947a4938f0def16d20c20 msgid "" -"A 1-page PDF file in memory. Could be opened like `doc=pymupdf.open(\"pdf\"," -" pix.pdfocr_tobytes())`, and text extractions could be performed on its " -"`page=doc[0]`." +"A 1-page PDF file in memory. Could be opened like " +"`doc=pymupdf.open(\"pdf\", pix.pdfocr_tobytes())`, and text extractions " +"could be performed on its `page=doc[0]`." msgstr "" "メモリ内の1ページのPDFファイル。次のようにして開くことができます: `doc=pymupdf.open(\"pdf\", " "pix.pdfocr_tobytes())` 、そしてそのページ=doc[0]でテキストの抽出が行えます。" -#: ../../pixmap.rst:379 7c22bd99c6bd4c7eaccee6de4d0b4026 +#: ../../pixmap.rst:380 d5488ec9ed704e57806aab8bb8151fa0 msgid "" "Another possible use is insertion into some pdf. The following snippet " "reads the images of a folder and stores them as pages in a new PDF that " @@ -1223,12 +1236,21 @@ msgstr "" "別の可能性として、PDF に挿入することが考えられます。次のスニペットは、フォルダ内の画像を読み取り、OCR テキスト レイヤーを含む新しい " "PDF ページとして保存します::" -#: ../../pixmap.rst:393 ../../pixmap.rst:414 58412d61f17f42ec80d3d1118e23c6de -#: 64f0054ff2764b758adfb6a2908ebd63 -msgid "New in v1.17.3" -msgstr "v1.17.3 で新しく追加されました" +#: ../../pixmap.rst:394 745b1318fcc7495cb968031ca6bbcf1e +msgid "Create a Pillow Image from the pixmap. PIL / Pillow must be installed." +msgstr "" + +#: ../../pixmap.rst:396 ../../pixmap.rst:416 ../../pixmap.rst:424 +#: 3b635a6f7f364e478d4844dd4120de50 c7b56b17e4394785a408110c3609519d +#: d56c7e5220b440128dbe66467e450e13 +msgid "if Pillow is not installed." +msgstr "Pillow がインストールされていない場合" + +#: ../../pixmap.rst:397 82d1388ec50c4f7486bb6d61d8b119a4 +msgid "a ˇˇPIL.Imageˇˇ object" +msgstr "" -#: ../../pixmap.rst:395 b90b2cadccaa4acc9dcaf813f3d7fb5d +#: ../../pixmap.rst:401 d1bff7b145cf49259879515c8961e6d2 msgid "" "Write the pixmap as an image file using Pillow. Use this method for " "output unsupported by MuPDF. Examples are" @@ -1236,21 +1258,21 @@ msgstr "" "Pillow を使用して pixmap を画像ファイルとして書き込みます。これは MuPDF " "でサポートされていない出力に使用します。例として、以下が挙げられます。" -#: ../../pixmap.rst:397 06b9e95765034a3392481def96264bf1 +#: ../../pixmap.rst:403 01f026e6ce964eddab44d42bc5e97ffb msgid "Formats JPX, J2K, WebP, etc." msgstr "JPX、J2K、WebP などの形式" -#: ../../pixmap.rst:398 883c3a9823964ae7b5ff13165ac48584 +#: ../../pixmap.rst:404 ea133fada434413d89120b525a33b8ac msgid "Storing EXIF information." msgstr "EXIF 情報の保存" -#: ../../pixmap.rst:399 5ffb31a9982f4fe6bc3236ae006e53d5 +#: ../../pixmap.rst:405 cb2a01d50a48427badd26e679d9c0943 msgid "" "If you do not provide dpi information, the values *xres*, *yres* stored " "with the pixmap are automatically used." msgstr "dpi 情報を提供しない場合、pixmap に格納されている *xres*、*yres* の値が自動的に使用されます。" -#: ../../pixmap.rst:401 8ef395dcc71b4033ae0f4ca2212eef19 +#: ../../pixmap.rst:407 148e41347b5b4b0a8a811716d7543ac6 #, fuzzy msgid "" "A simple example: `pix.pil_save(\"some.webp\", optimize=True, dpi=(150, " @@ -1259,7 +1281,7 @@ msgstr "" "簡単な例: `pix.pil_save(\"some.webp\", optimize=True, dpi=(150, 150))` " "。他のパラメータの詳細については、Pillow のドキュメンテーションを参照してください。" -#: ../../pixmap.rst:403 71a2f4d35f7b4e00abc6aea5c03e5f5b +#: ../../pixmap.rst:409 c98713fd3fb24a9d81551f753eba41a3 msgid "" "If the pixmap's colorspace is RGB with transparency, the alpha values may" " or may not already be multiplied into the color components " @@ -1269,23 +1291,22 @@ msgid "" "`_." msgstr "" -#: ../../pixmap.rst:406 37ed3b73d3be48cbbc98ceb05c03758d +#: ../../pixmap.rst:412 9e01652a4c8143718d808823e0196d13 msgid "For details on other parameters see the Pillow documentation." msgstr "" -#: ../../pixmap.rst:408 aa249221eb95464bac3f88f5b2d62c05 +#: ../../pixmap.rst:414 6a52588a2f3a43e8b86982c3f13c8fbe msgid "" "Since v1.22.0, PyMuPDF supports JPEG output directly. We recommended to " "no longer use this method for JPEG output -- for performance reasons and " "for avoiding unnecessary external dependencies." msgstr "" -#: ../../pixmap.rst:410 ../../pixmap.rst:418 97f4cb8757b549f49737ad289d861e35 -#: b94e97d6317742a6b8562c098d6ecab2 -msgid "if Pillow is not installed." -msgstr "Pillow がインストールされていない場合" +#: ../../pixmap.rst:420 915be2ac4cef41b187533b3ba635d674 +msgid "New in v1.17.3" +msgstr "v1.17.3 で新しく追加されました" -#: ../../pixmap.rst:416 ff400eb0514d4413a667609104d9e5e0 +#: ../../pixmap.rst:422 d0b1024f3b884c3fa578196e425b8d43 #, fuzzy msgid "" "Return an image as a bytes object in the specified format using Pillow. " @@ -1297,12 +1318,12 @@ msgstr "" "pix.pil_tobytes(format=\"WEBP\", optimize=True)` 。詳細なパラメータについては、Pillow " "のドキュメンテーションを参照してください。" -#: ../../pixmap.rst:425 ../../pixmap.rst:460 381600f659d24bebaba452f7c27559f9 -#: 96a3b6c9f5d64b05aa31886e6bdffcd5 +#: ../../pixmap.rst:431 ../../pixmap.rst:466 db4bc8ea97bd4e009133c4e33f686f46 +#: e5cc0fd9f6484bbc86f3395950e5c7c9 msgid "New in v1.19.3" msgstr "v1.19.3 で新しく追加されました" -#: ../../pixmap.rst:427 6be8cb3a17b446d58c13dd7970b20c4e +#: ../../pixmap.rst:433 d4188d9ac11948548ba79cd4118136c1 msgid "" "Return a new pixmap by \"warping\" the quad such that the quad corners " "become the new pixmap's corners. The target pixmap's `irect` will be `(0," @@ -1311,21 +1332,21 @@ msgstr "" "四角形を \"ワープ\" して、四角形の角が新しい pixmap の角になるようにします。対象 pixmap の `irect` は `(0, " "0, width, height)` になります。" -#: ../../pixmap.rst:429 bcee60fc2f45405fa40ee18f6e865390 +#: ../../pixmap.rst:435 b16ac0435a794bbba491838cd086698c msgid "" "a convex quad with coordinates inside :attr:`Pixmap.irect` (including the" " border points)." msgstr ":attr:`Pixmap.irect` の内部にある座標を持つ凸四角形(境界点も含む)" -#: ../../pixmap.rst:430 370d1ed60809427bb6bcee210b33ec10 +#: ../../pixmap.rst:436 07826d60127a4d3a9f2dc58f845323e5 msgid "desired resulting width." msgstr "望ましい幅" -#: ../../pixmap.rst:431 18c5ff367d874e42af15bd7f52da4448 +#: ../../pixmap.rst:437 ee90eecd90714bf7a889988bf2f0f5ed msgid "desired resulting height." msgstr "望ましい高さ" -#: ../../pixmap.rst:432 f93894bc188e4c78a08f5bff4cec226f +#: ../../pixmap.rst:438 e86d8fee5e064e7ca21a864637a15e0a msgid "" "A new pixmap where the quad corners are mapped to the pixmap corners in a" " clockwise fashion: `quad.ul -> irect.tl`, `quad.ur -> irect.tr`, etc." @@ -1333,37 +1354,37 @@ msgstr "" "新しいピクスマップで、四角形の角が時計回りにピクスマップの角にマップされます: `quad.ul -> irect.tl`、`quad.ur ->" " irect.tr` など。" -#: ../../pixmap.rst:433 641dfbb04afb4911aef52bdc21fc5573 +#: ../../pixmap.rst:439 734dc253be574678afcc4555204015a8 msgid "" ":ref:`Pixmap` .. image:: images/img-warp.* :scale: 40 :align: " "center" msgstr "" -#: ../../pixmap.rst:433 b3fc84452c5445bfb73c267bfa93d3e7 +#: ../../pixmap.rst:439 b610c28724094330bcf1554cabdb88d9 msgid ":ref:`Pixmap`" msgstr "" -#: ../../pixmap.rst:442 ../../pixmap.rst:499 ../../pixmap.rst:508 -#: 32fd1f1f82694a24874c50cafb0260b5 a50f971e16ff4bf78e5130cf2818ca5d -#: db0468fc2a6a4f219bbe153ff81b452d +#: ../../pixmap.rst:448 ../../pixmap.rst:505 ../../pixmap.rst:514 +#: 61f8c546e87a48c0a8e6da6d8f649f8e bbf5f7b837184e65a1f543ff2f40aec3 +#: d0456b5401584cf99608ad02462eedc0 msgid "New in v1.19.2" msgstr "v1.19.2で導入" -#: ../../pixmap.rst:443 2a6c5002da8f4917af7bd96346dd1fd8 +#: ../../pixmap.rst:449 4e0e845959da4fff83068ba57b335e6c msgid "Changed in v1.19.3" msgstr "v1.19.3で変更" -#: ../../pixmap.rst:445 82bec4730b3449f6b341cf003f7804d2 +#: ../../pixmap.rst:451 fe27ad1c40bf403babc8d30e3af2ac21 msgid "Determine the pixmap's unique colors and their count." msgstr "Pixmapのユニークな色とそのカウントを特定します。" -#: ../../pixmap.rst:447 4c0bd367e05e4bf1837609a864ea4733 +#: ../../pixmap.rst:453 7ee90af6b2ae4386a6c7553bb618eebd msgid "" "*(changed in v1.19.3)* If `True` return a dictionary of color pixels and " "their usage count, else just the number of unique colors." msgstr "*(v1.19.3で変更)* `True` の場合、色ピクセルとその使用回数の辞書を返し、それ以外の場合はユニークな色の数だけを返します。" -#: ../../pixmap.rst:448 28e840024476403c8e8157b4e0fe7a82 +#: ../../pixmap.rst:454 0dfa03e10a9b45a8ab24b74c8e8fc5ab msgid "" "a rectangle inside :attr:`Pixmap.irect`. If provided, only those pixels " "are considered. This allows inspecting sub-rectangles of a given pixmap " @@ -1372,7 +1393,7 @@ msgstr "" ":attr:`Pixmap.irect` " "内の四角形。指定した場合、そのピクセルのみが考慮されます。これにより、指定されたPixmapのサブ四角形を直接調査できます。" -#: ../../pixmap.rst:450 45e14ac5b9d54e988aa695bc9ab49b96 +#: ../../pixmap.rst:456 4c326412d6c0448985b8e87ce4638409 msgid "" "either the number of colors, or a dictionary with the items `pixel: " "count`. The pixel key is a `bytes` object of length :attr:`Pixmap.n`. .." @@ -1383,7 +1404,7 @@ msgid "" "values will be treated as different colors." msgstr "" -#: ../../pixmap.rst:450 acd86c8b95234b4b9928f8cda05d1cd8 +#: ../../pixmap.rst:456 7db22ff7cf05486982b356633b77da57 msgid "" "either the number of colors, or a dictionary with the items `pixel: " "count`. The pixel key is a `bytes` object of length :attr:`Pixmap.n`." @@ -1391,29 +1412,29 @@ msgstr "" "色の数、または `pixel: count` の項目を持つ辞書。pixelキーは :attr:`Pixmap.n` の長さの `bytes` " "オブジェクトです。" -#: ../../pixmap.rst:452 ead91f93207a4392a8f65a224019cafa +#: ../../pixmap.rst:458 bd48043357324c3897234a7b756ba1e5 msgid "" "To recover the **tuple** of a pixel, use `tuple(colors.keys()[i])` for " "the i-th item." msgstr "ピクセルのタプルを復元するには、i番目の項目に対して `tuple(colors.keys()[i])` を使用します。" -#: ../../pixmap.rst:454 cbd4c4523fa04766bc41a819f829269e +#: ../../pixmap.rst:460 a13116d89eb9439faa675e352ace52fc msgid "" "The response time depends on the pixmap's samples size and may be more " "than a second for very large pixmaps." msgstr "応答時間はPixmapのsamplesサイズに依存し、非常に大きなPixmapの場合は1秒以上かかることがあります。" -#: ../../pixmap.rst:455 4918d92125c144f4b55202107daf829a +#: ../../pixmap.rst:461 2664635a30434ebe86e382e0611358ad msgid "" "Where applicable, pixels with different alpha values will be treated as " "different colors." msgstr "該当する場合、異なるアルファ値を持つピクセルは異なる色として扱われます。" -#: ../../pixmap.rst:462 4e5a4679aacc485a9c6ed2f92ae57993 +#: ../../pixmap.rst:468 656ee402dc71457bbba7b9ef2aeb0021 msgid "Return the most frequently used color and its relative frequency." msgstr "最も頻繁に使用される色とその相対頻度を返します。" -#: ../../pixmap.rst:464 e3163be823aa4fbd8310983ec9a04894 +#: ../../pixmap.rst:470 f6d914f0fcd947929c311e3e02c6ad91 msgid "" "A rectangle inside :attr:`Pixmap.irect`. If provided, only those pixels " "are considered. This allows inspecting sub-rectangles of a given pixmap " @@ -1422,7 +1443,7 @@ msgstr "" ":attr:`Pixmap.irect` " "内の四角形。指定した場合、そのピクセルのみが考慮されます。これにより、指定されたPixmapのサブ四角形を直接調査できます。" -#: ../../pixmap.rst:466 550fe759d81b43df9bb4a696e84940bf +#: ../../pixmap.rst:472 9964a69b1bdf469f90fb138cb7640f67 #, python-format msgid "" "A tuple `(ratio, pixel)` where `0 < ratio <= 1` and *pixel* is the pixel " @@ -1434,86 +1455,86 @@ msgstr "" "`(0.95, b\"\\x00\\x00\\x00\")` " "は、すべてのピクセルの95%が黒であることを示します。こちらの例を参照してください:「Pixmapsの使用方法:テキストの可視性の確認」" -#: ../../pixmap.rst:471 f909c5a1f207419d8cf5a4d343d9615c +#: ../../pixmap.rst:477 5616759facc741ffb03d12a74ed68b50 msgid "Indicates whether the pixmap contains transparency information." msgstr "Pixmapに透明情報が含まれているかどうかを示します。" -#: ../../pixmap.rst 02fdb32c74194d0f938b973d811033de -#: 14b3da8e41f749db8375cebe18f3efef 155c5bc9ff304806873464d216bf24a3 -#: 2a2ff624b4d3495b8677342ab17520cd 342ad08cd3254a7d8d5ea07196b16d57 -#: 4bc2ffdb069b4e74a3552498e7dfd984 4cd846cd775b4c909e316334e338ed98 -#: 5c82100d5b904ef4a73734e6c06f5512 6ac3d4d732a44c2f9f4b2d7e16c2effd -#: 6c5977dfd18d4d81934e80c36bece58d 74aa8fc933a9466cbceba75c359a0e6d -#: 75479bb7197142a8a4300b7f597edde0 95b8e6b675164e05801847da3b98e3ed -#: 982cf7531b0c4f74806ae86c65379a42 9bc52e32f0694644bba5ce65e88c67f3 -#: c84671e7afbf4d728db8572e9c10d708 e2579b826f1e44dcb393659eea1a4b44 -#: e598c92088924a0e834902066c19238e f5ca81b7d9af4854bd71a2936e5322a2 +#: ../../pixmap.rst 09caf267bf0c4357b1d649f5223f0568 +#: 0a138b7070ab4b32be0424aecfd9db4f 100b6ea398d843d3a06b27c024d52b65 +#: 17ac16b6b1ee49a2ae806e8b755d2c0a 2feafeac0755436793da55055a5a913d +#: 31c5f6e06c4b4ee48c1288e3ef6e1c29 332118753d2b48b1bd58d13b3cf2a606 +#: 34f5bb9bf1354edc89835fecb1053a19 36498f0405d54e41a96ac186b2ba68cf +#: 4e3f7658060449c08c1ae6538550b1ab 8c19fc922781430d84ddbaf21fe68a52 +#: 929eb43a19974fe1937ab13e00ba01f3 931f0353c59a4a4aa0870b827533484c +#: a4275da98b5341abbdd6518cf95c282a d555ab3229a14a38a8ce8e47be6d6d21 +#: dc660e5a536f43078522d21269142def e7cb73487d0a48d885810f976fd00e7b +#: f29ab1c336f341b69dc8d8d4a7a5c50f ffc816d2b9b8492c9ac1e6826265fd47 msgid "type" msgstr "" -#: ../../pixmap.rst:473 ../../pixmap.rst:503 ../../pixmap.rst:512 -#: ../../pixmap.rst:621 51be8a1dbb7a4cdb9e4b16f2b216e5db -#: ca011dafe2a14319befff475ce50cb93 e0017c9744904a5b82103a5e7b38443a -#: f7f80212a7b84bf79d2ccad2d1f45217 +#: ../../pixmap.rst:479 ../../pixmap.rst:509 ../../pixmap.rst:518 +#: ../../pixmap.rst:633 097f8175747d43b4b4cc6268485d439b +#: 3301afce71724277906a27e29996ca0b 906a5684d73f429aa18a5cef6b00c69a +#: cdd7b921fc1f4f559e75ac5b81d65d9a msgid "bool" msgstr "" -#: ../../pixmap.rst:477 b29f4289a9a442aba45e51a3f8114b5e +#: ../../pixmap.rst:483 e70a00b3dcb84a4599d6d0b697bd2687 msgid "" "The MD5 hashcode (16 bytes) of the pixmap. This is a technical value used" " for unique identifications." msgstr "PixmapのMD5ハッシュコード(16バイト)。これは一意の識別に使用される技術的な値です。" -#: ../../pixmap.rst:479 ../../pixmap.rst:531 64a49ebcd31e4f63bfbc8f0d3b04cecd -#: d0493a317f5a43ba937c1178be5a4f38 +#: ../../pixmap.rst:485 ../../pixmap.rst:537 b6c9900d9c1a4a6b9515506c0f668a22 +#: f48e7f527cae4721a3094b4c7abb52a4 msgid "bytes" msgstr "" -#: ../../pixmap.rst:483 3d4e13c745cc4e8ba14296d6a8d93459 +#: ../../pixmap.rst:489 660ed52ce4964afba3b92ff355adc428 msgid "" -"The colorspace of the pixmap. This value may be *None* if the image is to" -" be treated as a so-called *image mask* or *stencil mask* (currently " +"The colorspace of the pixmap. This value may be ``None`` if the image is " +"to be treated as a so-called *image mask* or *stencil mask* (currently " "happens for extracted PDF document images only)." msgstr "" -"Pixmapのカラースペース。この値は、イメージが *イメージマスク* または *ステンシルマスク* として扱われる場合、*None* " +"Pixmapのカラースペース。この値は、イメージが *イメージマスク* または *ステンシルマスク* として扱われる場合、``None`` " "になることがあります(現在、抽出されたPDFドキュメントイメージのみが該当)。" -#: ../../pixmap.rst:485 447b6aee475846cd87f965e0f410851c +#: ../../pixmap.rst:491 a4ece184f5c7444c8e2a416ae04b77b0 msgid ":ref:`Colorspace`" msgstr "" -#: ../../pixmap.rst:489 846048de894d43cc9171ee5fa44acc57 +#: ../../pixmap.rst:495 692b9515c569482d912774bf56826035 msgid "" "Contains the length of one row of image data in :attr:`Pixmap.samples`. " "This is primarily used for calculation purposes. The following " "expressions are true:" msgstr ":attr:`Pixmap.samples` 内の画像データの1行の長さを含みます。これは主に計算目的で使用されます。次の式が真です:" -#: ../../pixmap.rst:491 9dca603c697347f3937b5d3600633a40 +#: ../../pixmap.rst:497 ceaed632b88e4fa49ceeed66aa285cef msgid "`len(samples) == height * stride`" msgstr "" -#: ../../pixmap.rst:492 cf50b14e87ba45ec81d4d76834dad38c +#: ../../pixmap.rst:498 6ae73ce100ff468ea52549907fae423e msgid "`width * n == stride`" msgstr "" -#: ../../pixmap.rst:494 ../../pixmap.rst:563 ../../pixmap.rst:569 -#: ../../pixmap.rst:577 ../../pixmap.rst:585 ../../pixmap.rst:591 -#: ../../pixmap.rst:597 ../../pixmap.rst:603 ../../pixmap.rst:609 -#: ../../pixmap.rst:615 0f964de14ff145bd987e2facb2b87437 -#: 19330b87f76c4440b56c193dc8811626 63c07d7cffe6487db5cbf3c493010e70 -#: 74bc4c0827504e01bd5fb8ca93807eae ab2e7889f6fb451980ae6220301953a7 -#: b171ac64d26949a08c55c83024611868 b4b951483af749e590597562f0824fe5 -#: c1524ac529c547b3a702085e7fcdc53b cafccd0558b94f7b858a6b836e3ac274 -#: d4d5c517bbb14a17892df6ca37995e8d +#: ../../pixmap.rst:500 ../../pixmap.rst:575 ../../pixmap.rst:581 +#: ../../pixmap.rst:589 ../../pixmap.rst:597 ../../pixmap.rst:603 +#: ../../pixmap.rst:609 ../../pixmap.rst:615 ../../pixmap.rst:621 +#: ../../pixmap.rst:627 14a8ec2123834004bd050c5b71fc43e2 +#: 4e1c7461f5294586954882c7d881ad27 69a7ebcad393482b8639888cc114b2e6 +#: 7e59cf4ded1a4cf2a190bcb6bdce063b 83a375d7ea0c4debac94399f760a51cb +#: d9aa2f62a5a14398952c00f62e342eb7 db17dced3d7e409089921c9861c4f6f2 +#: dc8282e0ad8249658e7762e577b3c60f ecfbf5db4ab54047b7430bc9ace8ea93 +#: fa05ddd43a3a4f878fcd48c6f02d6aa1 msgid "int" msgstr "" -#: ../../pixmap.rst:501 4d9b04bfa85f47978999b716e1e26971 +#: ../../pixmap.rst:507 2d5d22c11dad4b19b5234e8072ba2eed msgid "Is `True` for a gray pixmap which only has the colors black and white." msgstr "灰色のピクマップで、黒と白の色しか持たない場合は `True` です。" -#: ../../pixmap.rst:510 43b204567eb741f896eacfa0353c6c09 +#: ../../pixmap.rst:516 1febbc7fac8b4fb2a67b32cec3fdc940 msgid "" "Is `True` if all pixels are identical (any colorspace). Where applicable," " pixels with different alpha values will be treated as different colors." @@ -1521,15 +1542,15 @@ msgstr "" "すべてのピクセルが同じ場合、`True` " "です(どのカラースペースでも適用)。該当する場合、異なるアルファ値を持つピクセルは異なる色として扱われます。" -#: ../../pixmap.rst:517 786ac4f72e1b4d189c69a728c8867798 +#: ../../pixmap.rst:523 97ae6ecbc323433d8c92f114f45225f0 msgid "Contains the :ref:`IRect` of the pixmap." msgstr "ピクマップの :ref:`IRect` を含みます。" -#: ../../pixmap.rst:519 15468a95f0794cfdb06c9a345d4813ce +#: ../../pixmap.rst:525 c584049378344137a7e02b6f2b80c61d msgid ":ref:`IRect`" msgstr "" -#: ../../pixmap.rst:523 04113f807715437fac3aea0b4967e180 +#: ../../pixmap.rst:529 a0770be995ff49a98077b54eda3622d8 msgid "" "The color and (if :attr:`Pixmap.alpha` is true) transparency values for " "all pixels. It is an area of `width * height * n` bytes. Each n bytes " @@ -1544,7 +1565,7 @@ msgstr "" "バイトの領域です。各nバイトは1つのピクセルを定義します。各続くnバイトは、スキャンラインの順序で別のピクセルを生成します。連続するスキャンラインはパディングなしで続きます。たとえばRGBAカラースペースの場合、*samples*" " は *…、R、G、B、A、…* のようなバイトのシーケンスで、4つのバイト値R、G、B、Aが1つのピクセルを定義します。" -#: ../../pixmap.rst:525 112c7511472145fdb26eb6dba877ba02 +#: ../../pixmap.rst:531 4a9b9ac67b8449c7ab86e821fa247e3e msgid "" "This area can be passed to other graphics libraries like PIL (Python " "Imaging Library) to do additional processing like saving the pixmap in " @@ -1553,7 +1574,7 @@ msgstr "" "この領域は、PIL(Python Imaging " "Library)などの他のグラフィックライブラリに渡すことができ、ピクマップを他の画像形式で保存するなどの追加の処理を行うのに使用できます。" -#: ../../pixmap.rst:528 7952164f353e46c0bd47ffadc528dbce +#: ../../pixmap.rst:534 c3655424982d452eb78367c16d7e66b9 msgid "" "The underlying data is typically a **large** memory area, from which a " "`bytes` copy is made for this attribute ... each time you access it: for " @@ -1566,19 +1587,19 @@ msgstr "" "MBです。したがって、新しい変数に代入するか、`memoryview` バージョン :attr:`Pixmap.samples_mv` " "(v1.18.17で新機能)を使用するか、などの検討が必要です。" -#: ../../pixmap.rst:529 b52f27b6dba241a3997f55dd3e25d776 +#: ../../pixmap.rst:535 8c32c5335d7c447496e0e1d5be88c933 msgid "" "Any changes to the underlying data are available only after accessing " "this attribute again. This is different from using the memoryview " "version." msgstr "基本データへの変更は、この属性に再度アクセスするまで利用できません。これは `memoryview` バージョンを使用する場合とは異なります。" -#: ../../pixmap.rst:535 ../../pixmap.rst:554 2a5dc1044a43477fb45a4fe913855b47 -#: 2db67dc50ea84283a1a0f6c9dd3615b6 +#: ../../pixmap.rst:541 ../../pixmap.rst:563 3c9854d4dc0d4bf7909094bb8076d42f +#: beae6012398647cfa8be41387af7d018 msgid "New in v1.18.17" msgstr "新機能 v1.18.17" -#: ../../pixmap.rst:537 0b359dc42d8c4efba295d161010736c4 +#: ../../pixmap.rst:543 2492575ba835437f8ef3c780ed587dcd msgid "" "Like :attr:`Pixmap.samples`, but in Python `memoryview` format. It is " "built pointing to the memory in the pixmap -- not from a copy of it. So " @@ -1588,7 +1609,7 @@ msgstr "" ":attr:`Pixmap.samples` と同様ですが、Pythonの `memoryview` " "形式です。これはピクマップ内のメモリを指すように構築されており、コピーではありません。そのため、作成速度はピクマップのサイズに依存せず、ピクセルへの変更はすぐに利用可能です。" -#: ../../pixmap.rst:539 fac93af5e1ea4ac5b3e174c0d9505845 +#: ../../pixmap.rst:545 83d376fd4a9e4ea5930ad4bfbb750db0 msgid "" "Copies like `bytearray(pix.samples_mv)`, or `bytes(pixmap.samples_mv)` " "are equivalent to and can be used in place of `pix.samples`." @@ -1596,21 +1617,27 @@ msgstr "" "`bytearray(pix.samples_mv)` や `bytes(pixmap.samples_mv)` " "などのコピーは、`pix.samples` の代わりに使用でき、同等です。" -#: ../../pixmap.rst:541 a3ac5377faf741d49452ea39fe24d326 +#: ../../pixmap.rst:547 5fe293540fee4e4a9327990904d98658 msgid "We also have `len(pix.samples) == len(pix.samples_mv)`." msgstr "また、`len(pix.samples) == len(pix.samples_mv)` です。" -#: ../../pixmap.rst:543 361bdaba95584d5d922ff804548ddea7 +#: ../../pixmap.rst:549 6210a926a737475aa3dc6044387a1b72 msgid "" "Look at this example from a 2 MB JPEG: the memoryview is **ten thousand " "times faster**::" msgstr "この2 MBのJPEGからのこの例をご覧ください: `memoryview` は **10000倍高速** です::" -#: ../../pixmap.rst:550 c3d573b3052c44eba5ca414457e3e6c4 +#: ../../pixmap.rst:556 16ccebe16d504d85bbdac9f4ec187d39 +msgid "" +"After the Pixmap has been destroyed, any attempt to use the memoryview " +"will fail with ValueError." +msgstr "" + +#: ../../pixmap.rst:559 0f7b50383018415a90d003dec7b43fc8 msgid "memoryview" msgstr "" -#: ../../pixmap.rst:556 24dca760b69940fb974761cf04b0ab6c +#: ../../pixmap.rst:565 0e5cda1c402b4f95b89aea3cb932e255 msgid "" "Python pointer to the pixel area. This is a special integer format, which" " can be used by supporting applications (such as PyQt) to directly " @@ -1618,14 +1645,20 @@ msgid "" "example::" msgstr "ピクセル領域へのPythonポインターです。これは特別な整数形式で、サポートするアプリケーション(PyQtなど)がサンプル領域に直接アクセスし、非常に高速に画像を構築できるように使用できます。例えば::" -#: ../../pixmap.rst:561 b9e54405f1ef40c2a21fa66f7c7fbcec +#: ../../pixmap.rst:570 c273781241c7435680ec26d5f2e174b5 msgid "" "Both of the above lead to the same Qt image, but (2) can be **many " "hundred times faster**, because it avoids an additional copy of the pixel" " area." msgstr "以下はQtイメージへの2つの方法ですが、(2)はピクセル領域の追加のコピーを回避するため、通常 **何百倍も高速** です。" -#: ../../pixmap.rst:567 0ddf72fed62443c298cbd7f3ce3200ea +#: ../../pixmap.rst:572 da5db87ce00549ef8c367574db178362 +msgid "" +"Warning: after the Pixmap has been destroyed, the Python pointer will be " +"invalid and attempting to use it may crash the Python interpreter." +msgstr "" + +#: ../../pixmap.rst:579 64910abafc9b4a16b94a32c6195d3796 msgid "" "Contains *len(pixmap)*. This will generally equal *len(pix.samples)* plus" " some platform-specific value for defining other attributes of the " @@ -1634,39 +1667,39 @@ msgstr "" "これは *pixmap の長さ* を含んでいます。通常、これは *pix.samples の長さ* " "にプラットフォーム固有の他の属性を定義するためのいくつかの値を加えたものです。" -#: ../../pixmap.rst:575 1641da87df7e43198391470acd7feb02 +#: ../../pixmap.rst:587 1bd872d4e7fb42c6be71ce643ea628e5 msgid "Width of the region in pixels." msgstr "ピクセル単位の領域の幅。" -#: ../../pixmap.rst:583 6e4221d5eece4785b0bbbc5a283d5ade +#: ../../pixmap.rst:595 614de35cac294b5aa4a3cac39fb96f4a msgid "Height of the region in pixels." msgstr "ピクセル単位の領域の高さ。" -#: ../../pixmap.rst:589 ac74bf36245246eeb5bc77c0c3f9917c +#: ../../pixmap.rst:601 c18ef180c3d14a8f9e7893891ebe6488 msgid "" "X-coordinate of top-left corner in pixels. Cannot directly be changed -- " "use :meth:`Pixmap.set_origin`." msgstr "ピクセル単位での左上隅のX座標。直接変更できません。:meth:`Pixmap.set_origin` を使用してください。" -#: ../../pixmap.rst:595 95da10e4580748b5aa014fa3753d1f5b +#: ../../pixmap.rst:607 808f56c9f61b4a3fb2c275b735746bb6 msgid "" "Y-coordinate of top-left corner in pixels. Cannot directly be changed -- " "use :meth:`Pixmap.set_origin`." msgstr "ピクセル単位での左上隅のY座標。直接変更できません。:meth:`Pixmap.set_origin` を使用してください。" -#: ../../pixmap.rst:601 2fca958de2dc49f5a57fd4a2a3af7fb5 +#: ../../pixmap.rst:613 458068ce6d7b4c7d9398081bd77874e7 #, fuzzy msgid "" "Number of components per pixel. This number depends on colorspace and " -"alpha. If colorspace is not *None* (stencil masks), then *Pixmap.n - " -"Pixmap.alpha == pixmap.colorspace.n* is true. If colorspace is *None*, " +"alpha. If colorspace is not ``None`` (stencil masks), then *Pixmap.n - " +"Pixmap.alpha == pixmap.colorspace.n* is true. If colorspace is ``None``, " "then *n == alpha == 1*." msgstr "" -"ピクセルごとのコンポーネントの数。この数は色空間とアルファに依存します。色空間が *None* でない場合(ステンシルマスク)、*Pixmap.n" -" - Pixmap.alpha == pixmap.colorspace.n* がtrueです。色空間が *None* の場合、*n == " -"alpha == 1* です。" +"ピクセルごとのコンポーネントの数。この数は色空間とアルファに依存します。色空間が ``None`` " +"でない場合(ステンシルマスク)、*Pixmap.n - Pixmap.alpha == pixmap.colorspace.n* " +"がtrueです。色空間が ``None`` の場合、*n == alpha == 1* です。" -#: ../../pixmap.rst:607 cc7c26c6084046dd95eccd6b73266f99 +#: ../../pixmap.rst:619 4537136a8d5b482983ba8a93e445f390 msgid "" "Horizontal resolution in dpi (dots per inch). Please also see " ":data:`resolution`. Cannot directly be changed -- use " @@ -1675,7 +1708,7 @@ msgstr "" "水平解像度(dpi単位)。:data:`resolution` " "も参照してください。直接変更できません。:meth:`Pixmap.set_dpi` を使用してください。" -#: ../../pixmap.rst:613 107a9439559c4789844262e4db9acdb8 +#: ../../pixmap.rst:625 eefd9342350049919e25e277d6c3b3fb msgid "" "Vertical resolution in dpi (dots per inch). Please also see " ":data:`resolution`. Cannot directly be changed -- use " @@ -1684,20 +1717,20 @@ msgstr "" "垂直解像度(dpi単位)。:data:`resolution` " "も参照してください。直接変更できません。:meth:`Pixmap.set_dpi` を使用してください。" -#: ../../pixmap.rst:619 b9356239952842f9a41847e818bae505 +#: ../../pixmap.rst:631 2575f6edfd324a92bd5a447fec1e31df msgid "" -"An information-only boolean flag set to *True* if the image will be drawn" -" using \"linear interpolation\". If *False* \"nearest neighbour " +"An information-only boolean flag set to ``True`` if the image will be " +"drawn using \"linear interpolation\". If ``False`` \"nearest neighbour " "sampling\" will be used." msgstr "" -"情報のみのブールフラグで、イメージが「線形補間」を使用して描画される場合に *True* に設定されます。*False* " +"情報のみのブールフラグで、イメージが「線形補間」を使用して描画される場合に ``True`` に設定されます。``False`` " "の場合、「最近傍サンプリング」が使用されます。" -#: ../../pixmap.rst:626 c20f7877ee8e4aca8232d0e33111a52b +#: ../../pixmap.rst:638 fb19a5d83a8049128d4b83c24c65dbf6 msgid "Supported Input Image Formats" msgstr "サポートされている入力画像フォーマット" -#: ../../pixmap.rst:627 0491f3d796d042c0adb3c7121a48faf3 +#: ../../pixmap.rst:639 6d47997ec58540749bc7a5f1eacaa3b6 msgid "" "The following file types are supported as **input** to construct pixmaps:" " **BMP, JPEG, GIF, TIFF, JXR, JPX**, **PNG**, **PAM** and all of the " @@ -1708,7 +1741,7 @@ msgstr "" "としてサポートされています:**BMP、JPEG、GIF、TIFF、JXR、JPX**、**PNG**、**PAM**、およびすべての " "**Portable Anymap** ファミリー(**PBM、PGM、PNM、PPM**)。このサポートは二重の方法で提供されています:" -#: ../../pixmap.rst:629 623699fa7e5c4f7ba08eff9d8c4d5289 +#: ../../pixmap.rst:641 9ea7a063be4547c18c258b2d3177008e msgid "" "Directly create a pixmap with *Pixmap(filename)* or *Pixmap(byterray)*. " "The pixmap will then have properties as determined by the image." @@ -1716,17 +1749,17 @@ msgstr "" "*Pixmap(ファイル名)* または *Pixmap(バイト配列)* " "を使用してピクスマップを直接作成します。その後、ピクスマップには画像によって決定されるプロパティが含まれます。" -#: ../../pixmap.rst:631 c46375fc31bf4ffeaf1998e065b9192d +#: ../../pixmap.rst:643 732ebf18eb7d4514920c5f29ae06e8fc msgid "" -"Open such files with *pymupdf.open(...)*. The result will then appear as a " -"document containing one single page. Creating a pixmap of this page " +"Open such files with *pymupdf.open(...)*. The result will then appear as " +"a document containing one single page. Creating a pixmap of this page " "offers all the options available in this context: apply a matrix, choose " "colorspace and alpha, confine the pixmap to a clip area, etc." msgstr "" "*pymupdf.open(...)* " "を使用してこのようなファイルを開きます。その結果、単一のページを含むドキュメントとして表示されます。このページのピクスマップを作成すると、このコンテキストで利用可能なすべてのオプションを使用できます:行列を適用、色空間とアルファを選択、ピクスマップをクリップエリアに制限などが含まれます。" -#: ../../pixmap.rst:633 48b0e0afee874aeeaee50f7046457bf4 +#: ../../pixmap.rst:645 980d86630c2c44de8e6d19e5467a0ce6 msgid "" "**SVG images** are only supported via method 2 above, not directly as " "pixmaps. But remember: the result of this is a **raster image** as is " @@ -1735,11 +1768,11 @@ msgstr "" "**SVG画像** は、直接ピクスマップとしてではなく、上記の方法2でのみサポートされています。ただし、ピクスマップの場合と同様、その結果は " "**ラスターイメージ** です [#f1]_。" -#: ../../pixmap.rst:638 e5162d5cc53b4a4b8887e60670b0434f +#: ../../pixmap.rst:650 a908d73cc347496b82241f304fa3fe2a msgid "Supported Output Image Formats" msgstr "サポートされている出力画像フォーマット" -#: ../../pixmap.rst:639 19a520db79874619a1f9f4c6bcbce162 +#: ../../pixmap.rst:651 73fac07184704c369cc728f98e3f5c2f msgid "" "A number of image **output** formats are supported. You have the option " "to either write an image directly to a file (:meth:`Pixmap.save`), or to " @@ -1753,163 +1786,163 @@ msgstr "" " **フォーマット** " "を識別する文字列を受け入れます(下のフォーマット列)。ただし、すべてのピクスマップの色空間、透明度サポート(アルファ)、および画像フォーマットの組み合わせが可能であるわけではないことに注意してください。" -#: ../../pixmap.rst:642 3383aee40bb246f18d50a1a8ec0ce0af +#: ../../pixmap.rst:654 a87afb44cc5e4b73ab588b5b11f9ccfd msgid "**Format**" msgstr "**フォーマット**" -#: ../../pixmap.rst:642 196d64e56b55468f95181850d452cecd +#: ../../pixmap.rst:654 1f2cded3b1b44c0b937fa0032e9cdae6 msgid "**Colorspaces**" msgstr "**カラースペース**" -#: ../../pixmap.rst:642 ba97f490b98845d28ae78f047864e4eb +#: ../../pixmap.rst:654 49b0734f82764d6990cf44c77df6c570 msgid "**alpha**" msgstr "**アルファ**" -#: ../../pixmap.rst:642 ae7a1d9fea58487fb63d095f663d1b24 +#: ../../pixmap.rst:654 83f92d8a4a7a4760a8e40ed6c0f06f42 msgid "**Extensions**" msgstr "**拡張子**" -#: ../../pixmap.rst:642 b949c3de314442a7869909df568e9a06 +#: ../../pixmap.rst:654 0fd30df7107b4f34935e701d014dbe14 msgid "**Description**" msgstr "**説明**" -#: ../../pixmap.rst:644 5f6288e7944d4315bfc256d37bd5c5ea +#: ../../pixmap.rst:656 5418f8bbb77c4279bb7e54b0467ed853 msgid "jpg, jpeg" msgstr "" -#: ../../pixmap.rst:644 ../../pixmap.rst:645 ../../pixmap.rst:651 -#: ../../pixmap.rst:652 093c1d69b03641549c7a2181b3ba9d02 -#: 7d4926d5d9eb465a9af8f9d81f21d2a0 b2da44f7eec74378b606c112c439f563 -#: f704cbabd69d4a24b52f57520e9d4bd7 +#: ../../pixmap.rst:656 ../../pixmap.rst:657 ../../pixmap.rst:663 +#: ../../pixmap.rst:664 32dc7fd5ff4044589a06da6569985cbb +#: 446d676d4cb746debc50ec9080b3bd59 85b80fa1ebd1428896973689aeb0152f +#: f60599eee436479ea2ac04183c71f206 msgid "gray, rgb, cmyk" msgstr "" -#: ../../pixmap.rst:644 ../../pixmap.rst:646 ../../pixmap.rst:647 -#: ../../pixmap.rst:649 ../../pixmap.rst:650 ../../pixmap.rst:651 -#: 045c2b0beca24cebba2535db610c9bcd 243fe2fb92a540c4839c78a2a6921f6b -#: 2831b8ba977f4e2c96b670f25a2d117e 504d03a438b34f7cb447a316abfc24e8 -#: a75b1933124644be926f154f740378b6 f2f43436a07941ab9a08ba6668fae97f +#: ../../pixmap.rst:656 ../../pixmap.rst:658 ../../pixmap.rst:659 +#: ../../pixmap.rst:661 ../../pixmap.rst:662 ../../pixmap.rst:663 +#: 1ff87a7445e842ef87f801374ff82433 5f411ac1900d4a828a2adc5f8d66e217 +#: 8189a51b7a194649810e0d7d577bd10d c8609d9e76144b8c95dc48aded05950e +#: d62197f6b05c43c8b9e1dec64faf9443 d70b4f54e80348028d6fae84243c3789 msgid "no" msgstr "なし" -#: ../../pixmap.rst:644 0724cfdfc25047f3b2b16f2e3cef2135 +#: ../../pixmap.rst:656 ea88730047b74e13b318b9c914e5b2a3 msgid ".jpg, .jpeg" msgstr "" -#: ../../pixmap.rst:644 b7bcdb8c5a4b431389c460a11ba445c1 +#: ../../pixmap.rst:656 4b3d4bb369ed4ff58e4947e367cf2da8 msgid "Joint Photographic Experts Group" msgstr "" -#: ../../pixmap.rst:645 8440e69d128242c79851f21cef3acaed +#: ../../pixmap.rst:657 69193e09d372420faa98f2f58eb9ad36 msgid "pam" msgstr "" -#: ../../pixmap.rst:645 ../../pixmap.rst:648 ../../pixmap.rst:652 -#: 0680901701384fcebd5c3623ccb18e5b 9c6ce88ed40f4b2cb83c58a11886b564 -#: aa3bb322b5354cfaa11d9a1c6018e0ce +#: ../../pixmap.rst:657 ../../pixmap.rst:660 ../../pixmap.rst:664 +#: 6b1dd7ce634b4293a39d364858cc0a39 939ff0c9a94043c8bd74794b59b4f53e +#: fb225f76ad8f4ddd91435f0958c1ad46 msgid "yes" msgstr "あり" -#: ../../pixmap.rst:645 08d7d1721e294591bc1def47e8e7b8c7 +#: ../../pixmap.rst:657 6df33eaa96db4f4885c2c1ac36d3898b msgid ".pam" msgstr "" -#: ../../pixmap.rst:645 71bf16345e6c422eb8e098f8a2ff0f1b +#: ../../pixmap.rst:657 a77956d10e0045d7938da7707a785c51 msgid "Portable Arbitrary Map" msgstr "" -#: ../../pixmap.rst:646 136832cb3b1749009267952922ae9981 +#: ../../pixmap.rst:658 56d719af8b2c472dbf9841d1a146f690 msgid "pbm" msgstr "" -#: ../../pixmap.rst:646 ../../pixmap.rst:647 ../../pixmap.rst:648 -#: ../../pixmap.rst:649 ../../pixmap.rst:650 09f4bd0a521d4dbfa9137cf82c5650bc -#: 569661c4430a4592aeebbd48ecf12873 9162db170b8043e9bbb52faa3817e171 -#: 9f0449de868249fe989af6fe56f690c8 ca4d038b0d4644eba0cb93e38fa5c902 +#: ../../pixmap.rst:658 ../../pixmap.rst:659 ../../pixmap.rst:660 +#: ../../pixmap.rst:661 ../../pixmap.rst:662 04315e33b77d48308ccfbc95ed57967a +#: 1f4054fd2a684269bb85dd145f27277b 67c49422d7ab4404bd940af064c350cc +#: c5b3279ea5204093993c92e0c7175e94 fd213587a48240199094d468ced8cb88 msgid "gray, rgb" msgstr "" -#: ../../pixmap.rst:646 054432b3094c4e3fbbd806fa8b6b9336 +#: ../../pixmap.rst:658 7efc47baf20c4d478cdd93f72ee19691 msgid ".pbm" msgstr "" -#: ../../pixmap.rst:646 aa3a960d507346ae94a78480a899ff1c +#: ../../pixmap.rst:658 aac42bc50ded46558fa5a3a6dc28a2c9 msgid "Portable Bitmap" msgstr "" -#: ../../pixmap.rst:647 cf273c3f0f4e416ebb71b90b2ac9096b +#: ../../pixmap.rst:659 ebae291f38a045c3918f18364e7a764c msgid "pgm" msgstr "" -#: ../../pixmap.rst:647 3910fed1c57a43c18dbb31b309ff8065 +#: ../../pixmap.rst:659 207e7dda0de94db1bac522dbd9d144ad msgid ".pgm" msgstr "" -#: ../../pixmap.rst:647 b8bfda1517ab4e4c9bc37cd70dfed431 +#: ../../pixmap.rst:659 09c87d4fef0c43e4a030ac46f2866496 msgid "Portable Graymap" msgstr "" -#: ../../pixmap.rst:648 fe8853cbe05f42b0bd952417dabf78d4 +#: ../../pixmap.rst:660 44c71e50c1264ec8a777d16b34baa514 msgid "png" msgstr "" -#: ../../pixmap.rst:648 da1b6a9612ff4d75b9eecf990fc31754 +#: ../../pixmap.rst:660 9f7ea19523f842bb9952da3a40937a8d msgid ".png" msgstr "" -#: ../../pixmap.rst:648 eef3e055a4384f66a0b114f1991139e5 +#: ../../pixmap.rst:660 ecff212519374cc3b31feca734f5c127 msgid "Portable Network Graphics" msgstr "" -#: ../../pixmap.rst:649 efba2f0cada44ae6b697ba3a83bbfbfb +#: ../../pixmap.rst:661 07ee9232b2f14f0f806ee8375c5bcdb6 msgid "pnm" msgstr "" -#: ../../pixmap.rst:649 2fbcdd11b79a43cb8f102ca5f0e7a2b6 +#: ../../pixmap.rst:661 eaeeabaace0b40c78d19fcd2df7d76c6 msgid ".pnm" msgstr "" -#: ../../pixmap.rst:649 372af7a0de4b4b769bff5c5e02c4a281 +#: ../../pixmap.rst:661 7a9977ee828a437197675289f095f034 msgid "Portable Anymap" msgstr "" -#: ../../pixmap.rst:650 1ee1f905785e47f7bec08fb198659c88 +#: ../../pixmap.rst:662 c2cd3c5ddeaa476d91b20222d5d597b5 msgid "ppm" msgstr "" -#: ../../pixmap.rst:650 825fe237e2a44c6884f6a91a70443e19 +#: ../../pixmap.rst:662 b0c3f4646d8d4d8d83ba3c0744754ce8 msgid ".ppm" msgstr "" -#: ../../pixmap.rst:650 9a77c74f6fae4e19abbc4f2a03bf7fe2 +#: ../../pixmap.rst:662 54edec4bccd54b978d33acc89db3cd5b msgid "Portable Pixmap" msgstr "" -#: ../../pixmap.rst:651 e9ee55d3b0724ca6bbd5fc005c3d667b +#: ../../pixmap.rst:663 6ff874d1305245f2a5549175dce6ea0a msgid "ps" msgstr "" -#: ../../pixmap.rst:651 37812473fadd469caa988388bdf5fcba +#: ../../pixmap.rst:663 8a5fbceab8824142abcedeb7cdca4d7a msgid ".ps" msgstr "" -#: ../../pixmap.rst:651 30202bea5f04446abb11ae6e1b598f7b +#: ../../pixmap.rst:663 c23c6e92c41d45f39702eb0ea2a4b820 msgid "Adobe PostScript Image" msgstr "" -#: ../../pixmap.rst:652 cbc89803c85e4c95a3777c9a7021bd51 +#: ../../pixmap.rst:664 26727475505643169225164d63ce07c1 msgid "psd" msgstr "" -#: ../../pixmap.rst:652 deb5c03817e741f0b89bb940b416df9c +#: ../../pixmap.rst:664 147e407f9ce444a4a7d31d01b067a810 msgid ".psd" msgstr "" -#: ../../pixmap.rst:652 e58b784d62234749bc63f284dc7d3abb +#: ../../pixmap.rst:664 3eac54f79f7844d7973d5597d36ff81a msgid "Adobe Photoshop Document" msgstr "" -#: ../../pixmap.rst:656 8a648022947e4c04bd37958d17f623f5 +#: ../../pixmap.rst:668 db2ea52051144bffbd7d5732d79a7cb7 msgid "" "Not all image file types are supported (or at least common) on all OS " "platforms. E.g. PAM and the Portable Anymap formats are rare or even " @@ -1918,7 +1951,7 @@ msgstr "" "すべての画像ファイル形式がすべてのOSプラットフォームでサポートされているわけではありません(または少なくとも一般的ではありません)。たとえば、PAMおよびPortable" " Anymap形式はWindowsでは珍しいか、またはまったく知られていません。" -#: ../../pixmap.rst:657 4d4fdeeaf65d484c80e248690b90dfb8 +#: ../../pixmap.rst:669 6fb758ded39b4629aa4b829ca8e18c06 msgid "" "Especially pertaining to CMYK colorspaces, you can always convert a CMYK " "pixmap to an RGB pixmap with *rgb_pix = pymupdf.Pixmap(pymupdf.csRGB, " @@ -1927,14 +1960,14 @@ msgstr "" "特にCMYKカラースペースに関連することについて、常にCMYK pixmapを *rgb_pix = " "pymupdf.Pixmap(pymupdf.csRGB、cmyk_pix)* に変換し、その後、その形式で保存できます。" -#: ../../pixmap.rst:658 7224739092ce429387b684341a7fb5c3 +#: ../../pixmap.rst:670 21ad7f33d55e40579a6d2a8fe62ca5f9 msgid "" "As can be seen, MuPDF's image support range is different for input and " "output. Among those supported both ways, PNG and JPEG are probably the " "most popular." msgstr "ご覧のように、MuPDFの画像サポート範囲は入力と出力で異なります。両方の方法でサポートされているものの中で、PNGとJPEGはおそらく最も人気があります。" -#: ../../pixmap.rst:659 b5f16f74391e40ecbe9bdbe02da6e40f +#: ../../pixmap.rst:671 6d3a484e6d2249c29360c66b0455e207 msgid "" "We also recommend using \"ppm\" formats as input to tkinter's " "*PhotoImage* method like this: *tkimg = " @@ -1945,11 +1978,11 @@ msgstr "" "tkinter.PhotoImage(data=pix.tobytes(\"ppm\"))* のように(チュートリアルも参照してください)。これは" " **非常に** 高速です(PNGよりも60倍速いです)。" -#: ../../pixmap.rst:664 3a69787b37c04aa19169ad20982f1db7 +#: ../../pixmap.rst:676 5d6b6387a4fe46f6b30d61a232534941 msgid "Footnotes" msgstr "脚注" -#: ../../pixmap.rst:665 5105a350f44e4840acb5ba1275945eba +#: ../../pixmap.rst:677 07abc9afd1ba4f3db4c1a2e0cb7be2f6 msgid "" "If you need a **vector image** from the SVG, you must first convert it to" " a PDF. Try :meth:`Document.convert_to_pdf`. If this is not good enough, " @@ -1969,20 +2002,16 @@ msgstr "" " 、またはJavaソリューションである `Apache Batik `_ " "などがあります。詳細な例についてはWikiをご覧ください。" -#: ../../pixmap.rst:667 b3da70dd54894af995fdef08a3fa263c +#: ../../pixmap.rst:679 3abb171feca64cf8a913cc117dd0b7e8 msgid "" "To also set the alpha property, add an additional step to this method by " "dropping or adding an alpha channel to the result." msgstr "アルファプロパティも設定する場合は、このメソッドに追加ステップを追加し、結果にアルファチャンネルを追加または削除してください。" -#: ../../footer.rst:71 05289c9e696040edab2a8d5b394c5c59 +#: ../../footer.rst:60 d8a58e5d5f2e49aebde3f03934825fdd msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 b48328dccf5641fc9180767a3b68c31b -msgid "Discord logo" -msgstr "" - #~ msgid "" #~ "Since v1.22.0, PyMuPDF supports JPEG " #~ "output directly. For both, performance " @@ -1998,3 +2027,6 @@ msgstr "" #~ msgid ".raises ImportError: if Pillow is not installed." #~ msgstr "**ImportError** -- Pillow がインストールされていない場合" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/point.mo b/docs/locales/ja/LC_MESSAGES/point.mo index e1826d540..bc78b1937 100644 Binary files a/docs/locales/ja/LC_MESSAGES/point.mo and b/docs/locales/ja/LC_MESSAGES/point.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/point.po b/docs/locales/ja/LC_MESSAGES/point.po index 63fb6396d..5ccd76df0 100644 --- a/docs/locales/ja/LC_MESSAGES/point.po +++ b/docs/locales/ja/LC_MESSAGES/point.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,109 +19,109 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 21c298fbc95649eaae9bd728ad28ed8e +#: ../../header.rst:-1 0d500c9fea194e18bdf21282347590bd msgid "Artifex" msgstr "" -#: ../../header.rst:-1 e6f01a9c1b7849ec9da1178957fd0b3c +#: ../../header.rst:-1 e33c40891e6e4d32874b82f04358d0c3 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 1357135939e045aebb19f5903e153b35 +#: ../../header.rst:-1 66e5e2ad40694dd291575cb985997e52 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../point.rst:7 c6b6b54e089d4107a5c2ba6b63f953f9 +#: ../../point.rst:7 1a7b12dde1344c6b8af9cf30d960d3a2 msgid "Point" msgstr "Point (ポイント)" -#: ../../point.rst:9 a568050afbc04be2977489b48396a060 +#: ../../point.rst:9 9373b96698944d69a97d4aa9025c1380 msgid "" "*Point* represents a point in the plane, defined by its x and y " "coordinates." msgstr "*Point* は、そのx座標とy座標で定義される平面上のポイントを表します。" -#: ../../point.rst:12 61d5275f0c0f429bac181c715bee503a +#: ../../point.rst:12 ddd49ef47c8f4f308f1ddf551cc2e567 msgid "**Attribute / Method**" msgstr "**属性/メソッド**" -#: ../../point.rst:12 3976de3943bb4b0fb7999ec791bd4435 +#: ../../point.rst:12 ed814359d1e345869d70ff6ee4cdc137 msgid "**Description**" msgstr "**説明**" -#: ../../point.rst:14 52428846ecf8490392767cb8746bef7b +#: ../../point.rst:14 4032a33dd2b0453585391c0e32c93025 msgid ":meth:`Point.distance_to`" msgstr "" -#: ../../point.rst:14 47d27fbec3374a8d8895454d90c4d5c7 +#: ../../point.rst:14 9b1b84ecc1484fa58a5bd82f7efcc3e0 msgid "calculate distance to point or rect" msgstr "ポイントまたは長方形までの距離を計算します" -#: ../../point.rst:15 aeb02665fc98414e9f656cf7714474b9 +#: ../../point.rst:15 1d732af9b4494df9b35b7fc90450942a msgid ":meth:`Point.norm`" msgstr "" -#: ../../point.rst:15 a64d01e9380c4aad8a670b72123b2368 +#: ../../point.rst:15 24cca31dc32d48ebb45024fe75817652 msgid "the Euclidean norm" msgstr "ユークリッドノルム" -#: ../../point.rst:16 a2a2664f345f4243930147c04b49c130 +#: ../../point.rst:16 a4fdce716744491d81882b1974682151 msgid ":meth:`Point.transform`" msgstr "" -#: ../../point.rst:16 4e9952e2dd7f4b7fa3d31b2f5a95ed9b +#: ../../point.rst:16 0af15635b5b848668ada5ffbe0cbd6df msgid "transform point with a matrix" msgstr "行列でポイントを変換します" -#: ../../point.rst:17 b5f4d73a0e5e4eddbd5a98f4349ff07c +#: ../../point.rst:17 d888e3fab54a4373b8feaaf91ebd5ae1 msgid ":attr:`Point.abs_unit`" msgstr "" -#: ../../point.rst:17 421cbb4dc1fb45c2bd6e20e516907deb +#: ../../point.rst:17 183111208bb2467cb4b0394b7b4ab584 msgid "same as unit, but positive coordinates" msgstr "ユニットと同じですが、座標が正です" -#: ../../point.rst:18 12e6a7fa475f47d99937091aacdf4c73 +#: ../../point.rst:18 9d60bb6c9d1c47ab98ee6fa40c9e579e msgid ":attr:`Point.unit`" msgstr "" -#: ../../point.rst:18 e898c21273d44b4191dafab53e3134cb +#: ../../point.rst:18 3d36d8d93e024d4fb909fb12f00b7ff2 msgid "point coordinates divided by *abs(point)*" msgstr "座標を *abs(point)* で割ったもの" -#: ../../point.rst:19 1c22894ecc484687a0fc3f25bacebb36 +#: ../../point.rst:19 0f6cbe3e87d741b298d27c89be5c87cd msgid ":attr:`Point.x`" msgstr "" -#: ../../point.rst:19 45c0fad07748438cbf3cb4c9f8793998 +#: ../../point.rst:19 ed960716ff06486ba3d689e34b3796e3 msgid "the X-coordinate" msgstr "X座標" -#: ../../point.rst:20 9187f6d6b9854480bb2af32389632321 +#: ../../point.rst:20 dafbd6c6033d4c93957636f1b93bbb34 msgid ":attr:`Point.y`" msgstr "" -#: ../../point.rst:20 02520fddcbe341238409e32fb7fd5663 +#: ../../point.rst:20 14468a77b47b4dd6befbf66696bd10e2 msgid "the Y-coordinate" msgstr "Y座標" -#: ../../point.rst:23 9877648c64ee4a21ba27a0dedfe4d2e1 +#: ../../point.rst:23 d7c7ec15f0c64ec0bde77f8040a3949b msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../point.rst:35 ce7d5b830cdf40d2b8f1a82c8556c1df +#: ../../point.rst:35 4f945447bee6442cad5956d1a6846689 msgid "Overloaded constructors." msgstr "オーバーロードされたコンストラクタ。" -#: ../../point.rst:37 6f890077e8e449939d5e4298067ac3f7 +#: ../../point.rst:37 67c4744696474b708d6c7b4519ea6369 msgid "Without parameters, *Point(0, 0)* will be created." msgstr "パラメーターなしで、*Point(0, 0)* が作成されます。" -#: ../../point.rst:39 32dbba3bbb9f4db2985b784e3c166868 +#: ../../point.rst:39 83a7b067d7034877898de81fa905a27b msgid "" "With another point specified, a **new copy** will be created, " "\"sequence\" is a Python sequence of 2 numbers (see " @@ -130,20 +130,20 @@ msgstr "" "他のポイントが指定された場合、**新しいコピー** が作成され、 " "\"sequence\"は2つの数値からなるPythonシーケンスです(:ref:`SequenceTypes`)。" -#: ../../point.rst 448260858f7a4ebd8bd0dc887fb23e1f -#: 63bf2b3909f248358459dc1c5dccc366 7b1a6b4224594b4aa447c0feb50381b9 +#: ../../point.rst 019a616c168b4a2f861f9af0ee399ea7 +#: 2bca886d5a7047579d56cd8ca0b2d161 e9644af7e0554639a33a4f730ebd999f msgid "Parameters" msgstr "" -#: ../../point.rst:41 602212d3291040658bbefddcfde76ee0 +#: ../../point.rst:41 016a723eaaa64a778d1da1aaff44c2c0 msgid "x coordinate of the point" msgstr "ポイントのx座標" -#: ../../point.rst:43 653bd3bb300547938bc144d327bed36e +#: ../../point.rst:43 043d8b3675e44b1b8a995cfffb851812 msgid "y coordinate of the point" msgstr "ポイントのy座標" -#: ../../point.rst:47 db8f5fd849314b9b9d763ae6a528b647 +#: ../../point.rst:47 bda3f4adf4774b85838e3f7624d90d0c msgid "" "Calculate the distance to *x*, which may be :data:`point_like` or " ":data:`rect_like`. The distance is given in units of either pixels " @@ -152,24 +152,24 @@ msgstr "" "*x* までの距離を計算します。 *x* は :data:`point_like` または :data:`rect_like` " "である可能性があります。距離は、ピクセル(デフォルト)、インチ、センチメートル、ミリメートルのいずれかの単位で指定されます。" -#: ../../point.rst:49 f7b94081510c40c682ca819b4e290329 +#: ../../point.rst:49 51eb5b1d201a4f12a44618b02b2f0ac7 msgid "to which to compute the distance." msgstr "距離を計算する対象" -#: ../../point.rst:51 0d5f094e123141a0b63ae1624db800af +#: ../../point.rst:51 0ae910e1ebbb43498a2d28bc4183b6b8 msgid "the unit to be measured in. One of \"px\", \"in\", \"cm\", \"mm\"." msgstr "測定単位。 \"px\"、 \"in\"、 \"cm\"、 \"mm\"のいずれか" -#: ../../point.rst 431d381db76249da947b4e5f3d09d61a -#: bde2eb42a1a940b6bb2a54321c379e42 +#: ../../point.rst 3a555709592f4392804556d4a3ec4e27 +#: 73ea2dd2fe974651a11d7cc2de129e1b msgid "Return type" msgstr "" -#: ../../point.rst 7029a025ecc34e4082bbc5ac5b3e0322 +#: ../../point.rst 477b136a22ab4265a3da36bf573fe39d msgid "Returns" msgstr "" -#: ../../point.rst:54 6c5b53057e4149bc81e6a7630fa100fe +#: ../../point.rst:54 2030d7a487e149959a154537312a572e msgid "" "the distance to *x*. If this is :data:`rect_like`, then the distance * " "is the length of the shortest line connecting to one of the rectangle " @@ -177,49 +177,49 @@ msgid "" "**contains** the point" msgstr "" -#: ../../point.rst:54 06a6b06e1c6844438af2950bed643414 +#: ../../point.rst:54 af0a3e229e7e43cebbe0f3ab85666636 msgid "the distance to *x*. If this is :data:`rect_like`, then the distance" msgstr "*x* までの距離。これが :data:`rect_like` の場合、距離" -#: ../../point.rst:56 332b8343afb548958acb9edbba939d6a +#: ../../point.rst:56 35dd44147c624976886941cec496f10d msgid "" "is the length of the shortest line connecting to one of the rectangle " "sides" msgstr "長方形の任意の辺に接続する最短線の長さ" -#: ../../point.rst:57 2747a3dbf4ca48c8aeee9751b5ba2e94 +#: ../../point.rst:57 b958d1db25694ade9997b6fb88065cb1 msgid "is calculated to the **finite version** of it" msgstr "その **有限バージョン** が計算されます" -#: ../../point.rst:58 ad60dbf7c2444133a5a1edf6ba479e85 +#: ../../point.rst:58 50b8b68670d44ab58ff2a5e1471a2375 msgid "is zero if it **contains** the point" msgstr "ポイントを **含む** 場合はゼロ" -#: ../../point.rst:62 350ea765a5f548d296de2139ff2dd27c +#: ../../point.rst:62 961b212deb1f4d2ab46a27116cacccab msgid "New in version 1.16.0" msgstr "バージョン1.16.0で新規追加" -#: ../../point.rst:64 7337e91d0fd64f6494a8bdc7c37e7987 +#: ../../point.rst:64 ebf5e01ee8414746b3bc426ee94ea1b3 msgid "" "Return the Euclidean norm (the length) of the point as a vector. Equals " "result of function *abs()*." msgstr "ベクトルとしてのポイントのユークリッドノルム(長さ)を返します。 *abs()* 関数の結果と等しいです。" -#: ../../point.rst:68 2bfd688e36d745e6a7a4dcc99a4da91a +#: ../../point.rst:68 74d77a8f32a14ab58d2ea6a9d9fbd224 msgid "Apply a matrix to the point and replace it with the result." msgstr "ポイントに行列を適用して、その結果で置き換えます。" -#: ../../point.rst:70 1da5deb56c4740edbfff956c054f42c8 +#: ../../point.rst:70 781600b0f789421093c8d211a828214c msgid "The matrix to be applied." msgstr "適用する行列。" #: ../../point.rst:72 ../../point.rst:80 ../../point.rst:86 -#: 1cbdec85a6124e26b80fb615ef280efc 570776edf78d4862a3ad05e5549f7915 -#: 7999ff31070247008255fb35dfaef7fd +#: 5bb59ebd897348deb9ddbeecd467559a 93624a23e8f049d89ba4d5f25f6d5ca5 +#: f42faeb785d84a6aa8ca09b294d45d72 msgid ":ref:`Point`" msgstr "" -#: ../../point.rst:76 5e33f9a6764542d8829a79b7053a0be5 +#: ../../point.rst:76 ffda14407cc94228ab7552a1ff1596ad msgid "" "Result of dividing each coordinate by *norm(point)*, the distance of the " "point to (0,0). This is a vector of length 1 pointing in the same " @@ -231,32 +231,32 @@ msgstr "" "、ポイントが(0、0)からの距離で割った結果です。これは、ポイント自体がx軸との角度を持つベクトルと同じ方向を指す長さ1のベクトルです。そのx、resp。" " yの値は、このベクトル(およびポイント自体)がx軸とどのような角度を持っているかに等しいです。" -#: ../../point.rst 178d51040b4943b0ae6b4d75cc1ea0a5 -#: 745042ba8071466cab17dc26f135c949 9b9ea1800c7245bdb7bdab890167710b -#: c2d93c1ba66a4e90a62e044a0540154d +#: ../../point.rst 365fd452be064ca7b35dd82343f61722 +#: 61aabb3fb7b242c483bcbc3dfbf244a5 ee619eddf0ff4ef4b1cb279d8fa7a6f3 +#: f4ef146bdd194e079d0bbdb3fe0a7a02 msgid "type" msgstr "" -#: ../../point.rst:84 0046ca6c73934670ad118722d34763f5 +#: ../../point.rst:84 98dd11ae2ded46fba9aa5bc2f6b1667e msgid "" "Same as :attr:`unit` above, replacing the coordinates with their absolute" " values." msgstr "同じく、上記の :attr:`unit` と同様のもので、座標をそれぞれの絶対値に置き換えたものです。" -#: ../../point.rst:90 f3cca5421bc84395927cef4d94ff2596 +#: ../../point.rst:90 19dceabb090d4f1db7c2c31ba2634756 msgid "The x coordinate" msgstr "x座標" -#: ../../point.rst:92 ../../point.rst:98 b302d56e18c04593928ee11f9b1d11fa -#: fe77870e2c6843cc833901c2d12f5712 +#: ../../point.rst:92 ../../point.rst:98 3c19788c87c14335baeb6e261c4491a0 +#: d9f4c536626243e68f4e6c81133e0338 msgid "float" msgstr "" -#: ../../point.rst:96 a67963e783b54473b42e37394cf5ffed +#: ../../point.rst:96 6300e816dea5405293aee117b39c4d79 msgid "The y coordinate" msgstr "y座標" -#: ../../point.rst:102 8fe928c946bc41a69aedc039bf9a35aa +#: ../../point.rst:102 c67aba539e2441e1b48edda3875e6285 msgid "" "This class adheres to the Python sequence protocol, so components can be " "accessed via their index, too. Also refer to :ref:`SequenceTypes`." @@ -264,17 +264,16 @@ msgstr "" "このクラスはPythonのシーケンスプロトコルに従っており、コンポーネントはインデックスを使用してアクセスできます。また、PyMuPDFでの引数としてPythonのシーケンスを使用する方法については、:ref:`SequenceTypes`" " を参照してください。" -#: ../../point.rst:103 ca903ec1bff044cb8c82c6ab5d7582ac +#: ../../point.rst:103 b49de5b5939f4ea2b4916b2303345e68 msgid "" "Rectangles can be used with arithmetic operators -- see chapter " ":ref:`Algebra`." msgstr "長方形は算術演算子と共に使用できます - 幾 :ref:`Algebra` を参照してください。" -#: ../../footer.rst:71 020a89d7932a4e24bd73668a4c786cae +#: ../../footer.rst:60 6e7a0e3f1a044447ac39d419d2f8145a msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 d7dcbb50d51c46ddabc38d6a04fbb880 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/pymupdf-pro.mo b/docs/locales/ja/LC_MESSAGES/pymupdf-pro.mo index f29b94b30..fbc03995d 100644 Binary files a/docs/locales/ja/LC_MESSAGES/pymupdf-pro.mo and b/docs/locales/ja/LC_MESSAGES/pymupdf-pro.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/pymupdf-pro.po b/docs/locales/ja/LC_MESSAGES/pymupdf-pro.po index 041e938c2..06b3959d5 100644 --- a/docs/locales/ja/LC_MESSAGES/pymupdf-pro.po +++ b/docs/locales/ja/LC_MESSAGES/pymupdf-pro.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.24.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: ja\n" @@ -19,145 +19,198 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 15aba27bd5b4410f9ed3284add02bb65 +#: ../../header.rst:-1 0dfe01c73aa0450484e10fe2c161a22f msgid "Artifex" msgstr "" -#: ../../header.rst:-1 e97c5db839914515b9d2c81eac3cb5bd +#: ../../header.rst:-1 b4ed4e93bf294eb098966f465bc797c5 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "" -#: ../../header.rst:-1 bd5b2f9d28f3431fbd798a9b502d9930 +#: ../../header.rst:-1 ec46200e47134602a82ee60a1118c156 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "" -#: ../../pymupdf-pro.rst:9 934904753b0a4da3b2cb52b94cc445ee +#: ../../pymupdf-pro.rst:9 26812dee4da947c7918d490500c2067c msgid "PyMuPDF Pro" msgstr "" -#: ../../pymupdf-pro.rst:12 beb1ff0a04e54f6b91ac55a647c1fe94 -msgid "Enhance |PyMuPDF| capability with **Office** document support." +#: ../../pymupdf-pro.rst:12 aa17b9e367774bb89e40e6d34d5ec0fe +msgid "|PyMuPDF Pro| is a set of *commercial extensions* for |PyMuPDF|." msgstr "" -#: ../../pymupdf-pro.rst:14 120a77e0c6d14cfcb01ca3cb6ef502ae +#: ../../pymupdf-pro.rst:14 11f22babd0e94a46b70d2de6efd179bc msgid "" -"|PyMuPDF Pro| offers all the features of |PyMuPDF|, plus enhanced " -"functionality to support **Office** documents." +"Enhance |PyMuPDF| capability with **Office** document support & " +"**RAG/LLM** integrations." msgstr "" -#: ../../pymupdf-pro.rst:16 f979155e501148108b1877d9e23fc066 -msgid "Load, parse and extract text data from **Office** files" +#: ../../pymupdf-pro.rst:16 38e3e965f4184ecc965744d00c2568d5 +msgid "" +"Enables Office document handling, including ``doc``, ``docx``, ``hwp``, " +"``hwpx``, ``ppt``, ``pptx``, ``xls``, ``xlsx``, and others." +msgstr "" + +#: ../../pymupdf-pro.rst:17 0a12a5f74ed941a9be6cef8798aa2cbd +msgid "Supports text and table extraction, document conversion and more." +msgstr "" + +#: ../../pymupdf-pro.rst:18 49a700600f224867985cf301867199d8 +msgid "Includes the commercial version of |PyMuPDF4LLM|." +msgstr "" + +#: ../../pymupdf-pro.rst:20 9450c9107df04fe5bc38e0324bf54c01 +msgid "" +"To enquire about obtaining a commercial license, then `use this contact " +"page `_." +msgstr "" + +#: ../../pymupdf-pro.rst:25 1321bc95b45541b48337e44f78b58020 +msgid "" +"A licensed version of |PyMuPDF Pro| also gives you a licensed version of " +"|PyMuPDF4LLM|. If you are interested in using the |PyMuPDF4LLM| package " +"you should install it separately." +msgstr "" + +#: ../../pymupdf-pro.rst:29 f655cf9fdd1f48dd9e890f8c5aef653f +msgid "Platform support" +msgstr "" + +#: ../../pymupdf-pro.rst:31 367befe5f1a34b7fb9665758548f6448 +msgid "Available for these platforms only:" +msgstr "" + +#: ../../pymupdf-pro.rst:33 a256db349f5242a38297eda82fd9ee71 +msgid "Windows x86_64." +msgstr "" + +#: ../../pymupdf-pro.rst:34 9e2ffb09f61f430f9594a418d1ee8ab0 +msgid "Linux x86_64 (glibc)." +msgstr "" + +#: ../../pymupdf-pro.rst:35 97423a8756fc40408f80993fce6a1fc6 +msgid "MacOS x86_64." msgstr "" -#: ../../pymupdf-pro.rst:17 8446b19235b041f4bf59687b707f0488 -msgid "Ablility to render **Office** files" +#: ../../pymupdf-pro.rst:36 1a59aca2bbc44194b2dde06a89fac54f +msgid "MacOS arm64." msgstr "" -#: ../../pymupdf-pro.rst:21 7005cb49f9be4fddb9c6f304fdb749a4 +#: ../../pymupdf-pro.rst:40 0abf65ed31ca4a949b4b81e0bb521522 msgid "Office file support" msgstr "" -#: ../../pymupdf-pro.rst:23 3a3c03f47a1f40c0b56d047be39bdda6 +#: ../../pymupdf-pro.rst:42 b8f3023035f74b3dacbf2e3210f2c12f msgid "" "In addition to the `standard file types supported by PyMuPDF " "`, |PyMuPDF Pro| supports:" msgstr "" -#: ../../pymupdf-pro.rst:28 d883ec88c7b64f75ad3135c29e877afc +#: ../../pymupdf-pro.rst:47 45349c74355f48c0abf3ae8f486843a6 msgid "**DOC/DOCX**" msgstr "" -#: ../../pymupdf-pro.rst:29 69fa3fa20679492e9dade69fa7b002d7 +#: ../../pymupdf-pro.rst:48 777b729313244ad298c7b6d5bb49c369 msgid "**XLS/XLSX**" msgstr "" -#: ../../pymupdf-pro.rst:30 5975308d2b56417f9f7cfb737d36768f +#: ../../pymupdf-pro.rst:49 371c1c089e4c475caf8acc946169b878 msgid "**PPT/PPTX**" msgstr "" -#: ../../pymupdf-pro.rst:31 0e6321974a6443698318a1b3f95bb0cb +#: ../../pymupdf-pro.rst:50 d6ec7208ebdc4049815db59e7ec6641e msgid "**HWP/HWPX**" msgstr "" -#: ../../pymupdf-pro.rst:48 e653422e7a0f4260a4af9880fcac6129 +#: ../../pymupdf-pro.rst:67 097b80f124fa49fd92bab9375f53b975 msgid "Usage" msgstr "" -#: ../../pymupdf-pro.rst:51 092bb3dadc6543d383f6fb4a26d49ba0 +#: ../../pymupdf-pro.rst:70 f5c7cbdc4f62456199de7159bd404d58 msgid "Installation" msgstr "" -#: ../../pymupdf-pro.rst:53 088dd18e950b42ab8616f7595ffc36a1 +#: ../../pymupdf-pro.rst:72 dabefb8cfac54dabb7e1859dbc4578ed msgid "Install via pip with:" msgstr "" -#: ../../pymupdf-pro.rst:61 0524afe84c4a4185b769d26c2269d41b +#: ../../pymupdf-pro.rst:80 47d8f70087754faa8e60ff7f7e0d1b2a msgid "Loading an **Office** document" msgstr "" -#: ../../pymupdf-pro.rst:63 ea52fe5b89264ec79fb531f0d302d694 +#: ../../pymupdf-pro.rst:82 f5cf1df845294870b35e718fadf85b1f msgid "" "Import |PyMuPDF Pro| and you can then reference **Office** documents " "directly, e.g.:" msgstr "" -#: ../../pymupdf-pro.rst:74 16152e68593e4e4b89cb632e7e07eb4b +#: ../../pymupdf-pro.rst:93 470f5d9c683947b2b97f3e90e42f8a5d msgid "" "All standard |PyMuPDF| functionality is exposed as expected - |PyMuPDF " "Pro| handles the extended **Office** file types" msgstr "" -#: ../../pymupdf-pro.rst:77 2c4fb3206a3b430096156a8757b92132 +#: ../../pymupdf-pro.rst:96 72c50a703f314197b00a1d336392d8dc msgid "" "From then on you can work with document pages just as you would do " "normally, but with respect to the `restrictions " "`." msgstr "" -#: ../../pymupdf-pro.rst:83 2bb4d3d764ec42c4ad23e4f109c90176 +#: ../../pymupdf-pro.rst:100 5b447b0138f849efa8d4cb7a1cfd910b +msgid "Converting an **Office** document to |PDF|" +msgstr "" + +#: ../../pymupdf-pro.rst:102 b8e5b07700944b9da32ae37ca9175e00 +msgid "" +"The following code snippet can convert your **Office** document to |PDF| " +"format:" +msgstr "" + +#: ../../pymupdf-pro.rst:120 26c5a530a9a54f56bc28027850958f25 msgid "Restrictions" msgstr "" -#: ../../pymupdf-pro.rst:86 0973bccb9928417aaf8bdff4af44f3cd +#: ../../pymupdf-pro.rst:123 2391a063f21c4de092b0beca7b94377e msgid "" "|PyMuPDF Pro| functionality is restricted without a license key as " "follows:" msgstr "" -#: ../../pymupdf-pro.rst:88 c94500b884d14e78b74f84333a171c55 +#: ../../pymupdf-pro.rst:125 1e6b67342d31405ab0f72646252650df msgid "**Only the first 3 pages of any document will be available.**" msgstr "" -#: ../../pymupdf-pro.rst:90 14a031b937104968b429c77c71ac3ff3 +#: ../../pymupdf-pro.rst:127 c176b676614c4507959f495c339a3e71 msgid "" "To unlock full functionality you should `obtain a trial key " "`_." msgstr "" -#: ../../pymupdf-pro.rst:96 8f7b8eac61fc4182bbe91c4f8b3cdf2e +#: ../../pymupdf-pro.rst:133 9a01dcbd3af143b6bad7400a98e6b69d msgid "Trial keys" msgstr "" -#: ../../pymupdf-pro.rst:98 eb4bda75979d4231b4212d5313e2cf24 +#: ../../pymupdf-pro.rst:135 89e312aa37bd4b749727cd14913e2e70 msgid "" "To obtain a license key `please fill out the form on this page " "`_. You will then have the trial key " "emailled to the address you submitted." msgstr "" -#: ../../pymupdf-pro.rst:102 4bfe2709db104527ae2559d14d26bd29 +#: ../../pymupdf-pro.rst:139 371fa0ea70f44d9e8e6e9155a631426f msgid "Using a key" msgstr "" -#: ../../pymupdf-pro.rst:105 d9bcb667b5264ae898636ae8dbb2bb3d +#: ../../pymupdf-pro.rst:142 25f50e294ef5429e86781bea1e1b1e29 msgid "Initialize |PyMuPDF Pro| with a key as follows:" msgstr "" -#: ../../pymupdf-pro.rst:113 aa672485148041dab38483e1c382cac3 +#: ../../pymupdf-pro.rst:150 b01044f9b9f34927892044fa1c007b7f msgid "" "This will allow you to evaluate the product for a limited time. If you " "want to use |PyMuPDF Pro| after this time you should then `enquire about " @@ -165,11 +218,59 @@ msgid "" "pro/>`_." msgstr "" -#: ../../footer.rst:60 fd03c6fb57854b028b47bd07e141d4cd -msgid "This documentation covers all versions up to |version|." +#: ../../pymupdf-pro.rst:154 fcfee54b997f4b5a8368464ac33e8568 +msgid "Fonts" +msgstr "" + +#: ../../pymupdf-pro.rst:156 c22971d466c14a31aeb4f6e851c88144 +msgid "" +"By default `pymupdf.pro.unlock()` searches for all installed font " +"directories." msgstr "" -#: ../../footer.rst:-1 78493c6dfb794dbca9deed2c063a5c8e -msgid "Discord logo" +#: ../../pymupdf-pro.rst:158 c388a7575cdf4d709d86899170008a23 +msgid "This can be controlled with keyword-only args:" +msgstr "" + +#: ../../pymupdf-pro.rst:160 9c1f44585d134e12bb9b74ce4a83121b +msgid "" +"`fontpath`: specific font directories, either as a list/tuple or " +"`os.sep`-separated string. If None (the default), we use " +"`os.environ['PYMUPDFPRO_FONT_PATH']` if set." +msgstr "" + +#: ../../pymupdf-pro.rst:162 ae8654a3d7f14d329aa5caf0f2ccde78 +msgid "" +"`fontpath_auto`: Whether to append system font directories. If None (the " +"default) we use true if `os.environ['PYMUPDFPRO_FONT_PATH_AUTO']` is '1'." +" If true we append all system font directories." msgstr "" +#: ../../pymupdf-pro.rst:166 28aa600bf1164c318f946da4d23619db +msgid "" +"Function `pymupdf.pro.get_fontpath()` returns a tuple of all font " +"directories used by `unlock()`." +msgstr "" + +#: ../../footer.rst:60 fdcd80e27b7c41f882a85b921e2ee500 +msgid "This documentation covers all versions up to |version|." +msgstr "" + +#~ msgid "Enhance |PyMuPDF| capability with **Office** document support." +#~ msgstr "" + +#~ msgid "" +#~ "|PyMuPDF Pro| offers all the features" +#~ " of |PyMuPDF|, plus enhanced functionality" +#~ " to support **Office** documents." +#~ msgstr "" + +#~ msgid "Load, parse and extract text data from **Office** files" +#~ msgstr "" + +#~ msgid "Ablility to render **Office** files" +#~ msgstr "" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/pymupdf4llm/api.mo b/docs/locales/ja/LC_MESSAGES/pymupdf4llm/api.mo index f29b94b30..fbc03995d 100644 Binary files a/docs/locales/ja/LC_MESSAGES/pymupdf4llm/api.mo and b/docs/locales/ja/LC_MESSAGES/pymupdf4llm/api.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/pymupdf4llm/api.po b/docs/locales/ja/LC_MESSAGES/pymupdf4llm/api.po index 6eb64f496..853d7abb6 100644 --- a/docs/locales/ja/LC_MESSAGES/pymupdf4llm/api.po +++ b/docs/locales/ja/LC_MESSAGES/pymupdf4llm/api.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.24.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: ja\n" @@ -19,35 +19,35 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 8afebcb38f0147ab89d4b950593b4aa6 +#: ../../header.rst:-1 161fa590288f4fd0b6ddb48d1fcf5000 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 aa606b3e1f134b5c895174dc8755cdaa +#: ../../header.rst:-1 2f1e24042a8a417186402dba23a28c1a msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "" -#: ../../header.rst:-1 768e371610c34128a9e96d7e117dcebb +#: ../../header.rst:-1 1ead176e0cf24a12aa54d5bd556c6eba msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "" -#: ../../pymupdf4llm/api.rst:9 2f20dd68093f4023978ec523792b18ad +#: ../../pymupdf4llm/api.rst:9 dd1b10222a314b44977b976d86511926 msgid "API" msgstr "" -#: ../../pymupdf4llm/api.rst:12 5ccf4f49885246f9b7fce14520df07d9 +#: ../../pymupdf4llm/api.rst:12 308ebba9a9b747ec98873583cc86d573 msgid "The |PyMuPDF4LLM| API" msgstr "" -#: ../../pymupdf4llm/api.rst:17 dd174663f7fb4f118048b564615ecebc +#: ../../pymupdf4llm/api.rst:17 29230644e34341699ebb41eda2822f8b msgid "Prints the version of the library." msgstr "" -#: ../../pymupdf4llm/api.rst:21 60fef68123794a43afec5b6a6f0b1914 +#: ../../pymupdf4llm/api.rst:21 7a3872169c9342cd931823dbc9b0c9db msgid "" "Read the pages of the file and outputs the text of its pages in " "|Markdown| format. How this should happen in detail can be influenced by " @@ -55,11 +55,13 @@ msgid "" "building page chunks** from the |Markdown| text." msgstr "" -#: ../../pymupdf4llm/api.rst cba906c6a0e446f28ec497f6951f6a58 +#: ../../pymupdf4llm/api.rst 941ff3e5d21144598a204c133232c827 +#: f8a657b6752e41dba12869934f34b892 fd61c3859cb646a5a245a80966304da4 msgid "Parameters" msgstr "" -#: ../../pymupdf4llm/api.rst:23 273df82f7e124f879848f6a1078317cb +#: ../../pymupdf4llm/api.rst:23 ../../pymupdf4llm/api.rst:117 +#: 34f6f50149e945258b44f54dd7171378 bf4d0f40f7ea4522bc4209d74f4d470c msgid "" "the file, to be specified either as a file path string, or as a |PyMuPDF|" " Document (created via `pymupdf.open`). In order to use `pathlib.Path` " @@ -67,13 +69,13 @@ msgid "" "**must** use a |PyMuPDF| Document." msgstr "" -#: ../../pymupdf4llm/api.rst:25 5a31839413434b36ad65c8b6ec6580ad +#: ../../pymupdf4llm/api.rst:25 6efdf54f275f45698e578a73fc418ff9 msgid "" "optional, the pages to consider for output (caution: specify 0-based page" " numbers). If omitted all pages are processed." msgstr "" -#: ../../pymupdf4llm/api.rst:27 40a7cdb2ab4e41f0b296524e6b99a21f +#: ../../pymupdf4llm/api.rst:27 dfc90f44dd6d48dbaa8f4932cc65c126 msgid "" "optional. Use this if you want to provide your own header detection " "logic. This may be a callable or an object having a method named " @@ -86,7 +88,7 @@ msgid "" "specify `hdr_info=lambda s, page=None: \"\"` or `hdr_info=False`." msgstr "" -#: ../../pymupdf4llm/api.rst:29 25295eaa921243348fe32059165c65ce +#: ../../pymupdf4llm/api.rst:29 df8708774f1d47c4a5c89b81744fd416 msgid "" "when encountering images or vector graphics, images will be created from " "the respective page area and stored in the specified folder. Markdown " @@ -96,19 +98,51 @@ msgid "" "written on full page images, make sure to set this parameter to `False`." msgstr "" -#: ../../pymupdf4llm/api.rst:31 158f40a4d91b413186c434049ddbd428 +#: ../../pymupdf4llm/api.rst:31 7d5b9c4adcdf4b978bdede054e4b208a +msgid "" +"like `write_images`, but images will be included in the markdown text as " +"base64-encoded strings. Ignores `write_images` and `image_path` if used. " +"This may drastically increase the size of your markdown text." +msgstr "" + +#: ../../pymupdf4llm/api.rst:33 13da05a3d8474a6da6180273be172342 +msgid "" +"(New in v.0.0.20) Disregard images on the page. This may help detecting " +"text correctly when pages are very crowded (often the case for documents " +"representing presentation slides). Also speeds up processing time." +msgstr "" + +#: ../../pymupdf4llm/api.rst:35 093a637de1f94e6b9662bb50238e3509 +msgid "" +"(New in v.0.0.20) Disregard vector graphics on the page. This may help " +"detecting text correctly when pages are very crowded (often the case for " +"documents representing presentation slides). Also speeds up processing " +"time. Vector graphics are still used for table detection." +msgstr "" + +#: ../../pymupdf4llm/api.rst:37 1b13e6911f7a493881726a6c198e6a6f +#, python-format +msgid "" +"this must be a positive value less than 1. Images are ignored if `width /" +" page.rect.width <= image_size_limit` or `height / page.rect.height <= " +"image_size_limit`. For instance, the default value 0.05 means that to be " +"considered for inclusion, an image's width and height must be larger than" +" 5% of the page's width and height, respectively." +msgstr "" + +#: ../../pymupdf4llm/api.rst:39 c90a083414394044a30a65e82b80b02b msgid "" "specify the desired image resolution in dots per inch. Relevant only if " "`write_images=True`. Default value is 150." msgstr "" -#: ../../pymupdf4llm/api.rst:33 f0e8c2344ef94d9e889de2694bfec3fd +#: ../../pymupdf4llm/api.rst:41 fb19d8fd4e6e44688a5677a3b7bfa5e1 msgid "" "store images in this folder. Relevant if `write_images=True`. Default is " "the path of the script directory." msgstr "" -#: ../../pymupdf4llm/api.rst:35 1fee89b79047494f8150749cb9118f3c +#: ../../pymupdf4llm/api.rst:43 9f8ca9ade66c4e6f84cc5e70869c3015 msgid "" "specify the desired image format via its extension. Default is \"png\" " "(portable network graphics). Another popular format may be \"jpg\". " @@ -116,41 +150,41 @@ msgid "" "`." msgstr "" -#: ../../pymupdf4llm/api.rst:37 03a758a2f9a741618cf20dd47f266be7 +#: ../../pymupdf4llm/api.rst:45 c2184864835d4f2f830f1d7d39fe25b8 msgid "" "generate text output even when overlapping images / graphics. This text " "then appears after the respective image. If `write_images=True` this " "parameter may be `False` to suppress repetition of text on images." msgstr "" -#: ../../pymupdf4llm/api.rst:39 65c8369e089f4fdfb3d0933550e54d62 +#: ../../pymupdf4llm/api.rst:47 75d9541669704af890db0d2712359ad3 msgid "" "a float or a sequence of 2 or 4 floats specifying page borders. Only " "objects inside the margins will be considered for output. * `margin=f` " "yields `(f, f, f, f)` for `(left, top, right, bottom)`. * `(top, bottom)`" -" yields `(0, top, 0, bottom)`. * To always read full pages, use " -"`margins=0`." +" yields `(0, top, 0, bottom)`. * To always read full pages " +"**(default)**, use `margins=0`." msgstr "" -#: ../../pymupdf4llm/api.rst:39 f3c27bb69c734802a1b28831727534c7 +#: ../../pymupdf4llm/api.rst:47 4ee549281ffb40acac6450df14f68ad2 msgid "" "a float or a sequence of 2 or 4 floats specifying page borders. Only " "objects inside the margins will be considered for output." msgstr "" -#: ../../pymupdf4llm/api.rst:41 fba4d995c2184708870334d7257cd94c +#: ../../pymupdf4llm/api.rst:49 68496561cfa84781b9daf4f2baf057b5 msgid "`margin=f` yields `(f, f, f, f)` for `(left, top, right, bottom)`." msgstr "" -#: ../../pymupdf4llm/api.rst:42 1e89e5ef9e9c47d5a50329dfd719168a +#: ../../pymupdf4llm/api.rst:50 a0d0c48ee9f046bb8b64d202127a7386 msgid "`(top, bottom)` yields `(0, top, 0, bottom)`." msgstr "" -#: ../../pymupdf4llm/api.rst:43 43f16f43d8124795b307351931283b20 -msgid "To always read full pages, use `margins=0`." +#: ../../pymupdf4llm/api.rst:51 a9b037ad3086480a99f975d52c507035 +msgid "To always read full pages **(default)**, use `margins=0`." msgstr "" -#: ../../pymupdf4llm/api.rst:45 e7a65283e3e54470a97b48a01f0943b9 +#: ../../pymupdf4llm/api.rst:53 9cde949c00e44ababef22b54e7f08589 msgid "" "if `True` the output will be a list of `Document.page_count` dictionaries" " (one per page). Each dictionary has the following structure: - " @@ -169,16 +203,21 @@ msgid "" "**\"graphics\"** - a list of vector graphics rectangles on the page. This" " is a list of boundary boxes of clustered vector graphics as delivered by" " method :meth:`Page.cluster_drawings`. - **\"text\"** - page content as " -"|Markdown| text." +"|Markdown| text. - **\"words\"** - if `extract_words=True` was used. " +"This is a list of tuples `(x0, y0, x1, y1, \"wordstring\", bno, lno, " +"wno)` as delivered by `page.get_text(\"words\")`. The **sequence** of " +"these tuples however is the same as produced in the markdown text string " +"and thus honors multi-column text. This is also true for text in tables: " +"words are extracted in the sequence of table row cells." msgstr "" -#: ../../pymupdf4llm/api.rst:45 63a2813e0fda42f8961480384cdcfe1c +#: ../../pymupdf4llm/api.rst:53 abc8f7f8a91e4d97b93a9eab887bc295 msgid "" "if `True` the output will be a list of `Document.page_count` dictionaries" " (one per page). Each dictionary has the following structure:" msgstr "" -#: ../../pymupdf4llm/api.rst:47 f15e83e5e84a4c378d538bab5152ea80 +#: ../../pymupdf4llm/api.rst:55 01581b16bd3849528107486df1e89416 msgid "" "**\"metadata\"** - a dictionary consisting of the document's metadata " ":attr:`Document.metadata`, enriched with additional keys " @@ -186,7 +225,7 @@ msgid "" " document), and **\"page_number\"** (1-based page number)." msgstr "" -#: ../../pymupdf4llm/api.rst:49 8a94428d141941f098dec4c87d9ffb67 +#: ../../pymupdf4llm/api.rst:57 f3be96984c334a7b918bebbc9fb08cc4 msgid "" "**\"toc_items\"** - a list of Table of Contents items pointing to this " "page. Each item of this list has the format `[lvl, title, pagenumber]`, " @@ -194,41 +233,58 @@ msgid "" "a 1-based page number." msgstr "" -#: ../../pymupdf4llm/api.rst:51 e8ec6641456647cea13d71c9d0dfded0 +#: ../../pymupdf4llm/api.rst:59 b7213edeefad4d1ea798afc49d6991e9 msgid "" "**\"tables\"** - a list of tables on this page. Each item is a dictionary" " with keys \"bbox\", \"row_count\" and \"col_count\". Key \"bbox\" is a " "`pymupdf.Rect` in tuple format of the table's position on the page." msgstr "" -#: ../../pymupdf4llm/api.rst:53 5dcea29c996b43b8b144b0f3fdd34bb0 +#: ../../pymupdf4llm/api.rst:61 91dc6a17d4bc40ed9d06b1a8356b42b1 msgid "" "**\"images\"** - a list of images on the page. This a copy of page method" " :meth:`Page.get_image_info`." msgstr "" -#: ../../pymupdf4llm/api.rst:55 78ce8c10f74443aea43616d44d02e9ca +#: ../../pymupdf4llm/api.rst:63 c54878d36f5146adb1fe1b606d4791bc msgid "" "**\"graphics\"** - a list of vector graphics rectangles on the page. This" " is a list of boundary boxes of clustered vector graphics as delivered by" " method :meth:`Page.cluster_drawings`." msgstr "" -#: ../../pymupdf4llm/api.rst:57 d6068786455041fcb68a8f184fa1d05d +#: ../../pymupdf4llm/api.rst:65 3ac5b97ce14e432eb3a16cf5a66f7bbc msgid "**\"text\"** - page content as |Markdown| text." msgstr "" -#: ../../pymupdf4llm/api.rst:59 7399e1a707f24c5db3474ba20094699e +#: ../../pymupdf4llm/api.rst:67 a5cfe753b006454aa357cbbe832c210a +msgid "" +"**\"words\"** - if `extract_words=True` was used. This is a list of " +"tuples `(x0, y0, x1, y1, \"wordstring\", bno, lno, wno)` as delivered by " +"`page.get_text(\"words\")`. The **sequence** of these tuples however is " +"the same as produced in the markdown text string and thus honors multi-" +"column text. This is also true for text in tables: words are extracted in" +" the sequence of table row cells." +msgstr "" + +#: ../../pymupdf4llm/api.rst:69 133ebcf3b9294b2b8366a8aba0b23ff0 +msgid "" +"(New in v.0.0.19) Overwrites or sets the desired image file name of " +"written images. Useful when the document is provided as a memory object " +"(which has no inherent file name)." +msgstr "" + +#: ../../pymupdf4llm/api.rst:71 3940dc63e1554b3d9d74de2b17a78718 msgid "" "specify a desired page width. This is ignored for documents with a fixed " "page width like PDF, XPS etc. **Reflowable** documents however, like " -"e-books, office or text files have no fixed page dimensions and by " -"default are assumed to have Letter format width (612) and an " -"**\"infinite\"** page height. This means that the full document is " -"treated as one large page." +"e-books, office [#f2]_ or text files have no fixed page dimensions and by" +" default are assumed to have Letter format width (612) and an " +"**\"infinite\"** page height. This means that the **full document is " +"treated as one large page.**" msgstr "" -#: ../../pymupdf4llm/api.rst:61 a85e3721f7604144a46e253b5c3a2f37 +#: ../../pymupdf4llm/api.rst:73 6acbf074eb9d4865a46a6022c941a389 msgid "" "specify a desired page height. For relevance see the `page_width` " "parameter. If using the default `None`, the document will appear as one " @@ -237,33 +293,37 @@ msgid "" "only one page chunk will be returned." msgstr "" -#: ../../pymupdf4llm/api.rst:63 ad30de63ce9f42a1a17b23489d85bbc4 +#: ../../pymupdf4llm/api.rst:75 b4f7575c9b304d5c85bb2720b91f43a1 msgid "" -"table detection strategy. Default is `\"lines_strict\"` which ignores " -"background colors. In some occasions, other strategies may be more " -"successful, for example `\"lines\"` which uses all vector graphics " -"objects for detection." +"`table detection strategy " +"`_. " +"Default is `\"lines_strict\"` which ignores background colors. In some " +"occasions, other strategies may be more successful, for example " +"`\"lines\"` which uses all vector graphics objects for detection. " +"**Changed in v0.0.19:** A value of `None` will not perform any table " +"detection at all. This may be useful when you know that your document " +"contains no tables. Execution time savings can be significant." msgstr "" -#: ../../pymupdf4llm/api.rst:65 b32cc29ce7634fa78423415e084760f1 +#: ../../pymupdf4llm/api.rst:77 551ad070a28c4c4bbef0cf2630c6e10c msgid "" "use this to limit dealing with excess amounts of vector graphics " -"elements. Typically, scientific documents or pages simulating text using " -"graphics commands may contain tens of thousands of these objects. As " -"vector graphics are used for table detection mainly, analyzing pages of " -"this kind may result in excessive runtimes. You can exclude problematic " -"pages via for instance `graphics_limit=5000` or even a smaller value as " -"desired. The respective pages will then be ignored and be represented by " -"one message line in the output text." +"elements. Scientific documents, or pages simulating text via graphics " +"commands may contain tens of thousands of these objects. As vector " +"graphics are analyzed for multiple purposes, runtime may quickly become " +"intolerable. With this parameter, all vector graphics will be ignored if " +"their count exceeds the threshold. **Changed in v0.0.19:** The page will " +"still be processed, and text, tables and images should be extracted." msgstr "" -#: ../../pymupdf4llm/api.rst:67 e8beeb129d634a32a65d24bdbcca9f49 +#: ../../pymupdf4llm/api.rst:79 d0103d4e9c6946cf8321f2294f23fcf2 msgid "" -"if `True` then mono-spaced text does not receive special formatting " -"treatment. Code blocks will also no longer be generated." +"if `True` then mono-spaced text does not receive special formatting. Code" +" blocks will no longer be generated. This value is set to `True` if " +"`extract_words=True` is used." msgstr "" -#: ../../pymupdf4llm/api.rst:69 4adc3832ccb04f61b5b1b8a030e35903 +#: ../../pymupdf4llm/api.rst:81 8f48ac78fc384c959709db63b5730a8f msgid "" "a value of `True` enforces `page_chunks=True` and adds key \"words\" to " "each page dictionary. Its value is a list of words as delivered by " @@ -271,60 +331,67 @@ msgid "" "in this list is the same as the extracted text." msgstr "" -#: ../../pymupdf4llm/api.rst:71 d35ede38bf244031ae3ca7709e408e60 +#: ../../pymupdf4llm/api.rst:83 1779ec1e4ae04f0c804b23ba2da9cbec msgid "" -"a value of `True` (the default) displays a text-based progress bar as " -"pages are being converted to Markdown. It will look similar to the " +"Default is `False`. A value of `True` displays a text-based progress bar " +"as pages are being converted to Markdown. It will look similar to the " "following:: Processing input.pdf... [====================" " ] (148/291)" msgstr "" -#: ../../pymupdf4llm/api.rst:71 fa6fa12db10e4be798a4327dcab4425e +#: ../../pymupdf4llm/api.rst:83 c653a2e980b64aa785be22f126457523 msgid "" -"a value of `True` (the default) displays a text-based progress bar as " -"pages are being converted to Markdown. It will look similar to the " +"Default is `False`. A value of `True` displays a text-based progress bar " +"as pages are being converted to Markdown. It will look similar to the " "following::" msgstr "" -#: ../../pymupdf4llm/api.rst:73 4b61464437a44008ad42e40949c76b77 +#: ../../pymupdf4llm/api.rst:85 60a64f73ce9e4e36b6104e04ab4832a6 msgid "" "Processing input.pdf... [==================== ] " "(148/291)" msgstr "" -#: ../../pymupdf4llm/api.rst 92fcb9f73e684409a83b7bab7310558e -#: 961734fec55b40c6b7bf77ed1027de07 98eb05aed91c4be4a49e611793e8c9ec +#: ../../pymupdf4llm/api.rst:88 6bb91dff3b59492082791509607679a4 +msgid "" +"(New in v.0.0.19) Default is `False`. A value of `True` will use the " +"glyph number of the characters instead of the character itself." +msgstr "" + +#: ../../pymupdf4llm/api.rst 7488db8324964ad488f9fafb1dd92f9c +#: 7587197f19fe4c238ed9e365ad329b65 9df1c3b59d134dd9be4aeae849c5c46e +#: b9e22ae716c742b2a0a6d7706e7d35c1 msgid "Returns" msgstr "" -#: ../../pymupdf4llm/api.rst:76 abf0a2df38bb4240a41dbf3a9847c458 +#: ../../pymupdf4llm/api.rst:90 d1f8b5ca3d924f048a6f59cde9e2be0d msgid "" -"Either a string of the combined text of all selected document pages or a " -"list of dictionaries." +"Either a string of the combined text of all selected document pages, or a" +" list of dictionaries." msgstr "" -#: ../../pymupdf4llm/api.rst:80 59bfdfbfe633484da7deab6b1a02fb62 +#: ../../pymupdf4llm/api.rst:94 8220254dd0384d59ac22680bb9256286 msgid "" "Create a `pdf_markdown_reader.PDFMarkdownReader` using the `LlamaIndex`_ " "package. Please note that this package will **not automatically be " "installed** when installing **pymupdf4llm**." msgstr "" -#: ../../pymupdf4llm/api.rst:82 f926e33acb2a42a8b4c8da4554c925ea +#: ../../pymupdf4llm/api.rst:96 c58efce17afb4f5da0df5be15f065deb msgid "" "For details on the possible arguments, please consult the LlamaIndex " "documentation [#f1]_." msgstr "" -#: ../../pymupdf4llm/api.rst 068d41e421f44803a35260557da9d22f +#: ../../pymupdf4llm/api.rst ad546a9c3d0049e796fd7b47e8a1108d msgid "raises" msgstr "" -#: ../../pymupdf4llm/api.rst:84 a6d54720ddf94129b4614a05af84a990 +#: ../../pymupdf4llm/api.rst:98 2c059472fef84384bd37e55710ca095c msgid "`NotImplementedError`: Please install required `LlamaIndex`_ package." msgstr "" -#: ../../pymupdf4llm/api.rst:85 dc8916ef922e447a9f22b0a2341bb648 +#: ../../pymupdf4llm/api.rst:99 9118c323bb1448fc9adbafad8b6ffbad msgid "" "a `pdf_markdown_reader.PDFMarkdownReader` and issues message " "\"Successfully imported LlamaIndex\". Please note that this method needs " @@ -332,7 +399,126 @@ msgid "" "please see below." msgstr "" -#: ../../pymupdf4llm/api.rst:94 18fdf8f984e54cb6a75c66f8eb3934d6 +#: ../../pymupdf4llm/api.rst:108 134f6dcec56b4f5a83b7fdc905a221bf +msgid "" +"Create an object which maps text font sizes to the respective number of " +"'#' characters which are used by Markdown syntax to indicate header " +"levels. The object is created by scanning the document for font size " +"\"popularity\". The most popular font size and all smaller sizes are used" +" for body text. Larger font sizes are mapped to the respective header " +"levels - which correspond to the HTML tags `

` to `

`." +msgstr "" + +#: ../../pymupdf4llm/api.rst:110 f7c809d6de944ff9bcb30e6fbec94a4b +msgid "All font sizes are rounded to integer values." +msgstr "" + +#: ../../pymupdf4llm/api.rst:112 b499cbba0af94b69b8af0f94cd8863cc +msgid "" +"If more than 6 header levels would be required, then the largest number " +"smaller than the `
` font size is used for body text." +msgstr "" + +#: ../../pymupdf4llm/api.rst:114 50bd2d2ded7a490e820b5930fb174b45 +msgid "" +"Please note that creating the object will read and inspect the text of " +"the entire document - independently of reading the document again in the " +"`to_markdown()` method subsequently. Method `to_markdown()` by default " +"**will create this object** if you do not override its `hdr_info=None` " +"parameter." +msgstr "" + +#: ../../pymupdf4llm/api.rst:119 812f574b306a47c486655e86ff50596c +msgid "optional, the pages to consider. If omitted all pages are processed." +msgstr "" + +#: ../../pymupdf4llm/api.rst:121 8a5e1a0685b149b1af66ad795d69f955 +msgid "" +"the default font size limit for body text. Only used when the document " +"scan does not deliver valid information." +msgstr "" + +#: ../../pymupdf4llm/api.rst:123 564f318802954586965f8ec524f6af29 +msgid "" +"the maximum number of header levels to be used. Valid values are in " +"`range(1, 7)`. The default is 6, which corresponds to the HTML tags " +"`

` to `

`. A smaller value will limit the number of generated " +"header levels. For instance, a value of 3 will only generate header tags " +"\"#\", \"##\" and \"###\". Body text will be assumed for all font sizes " +"smaller than the one corresponding to \"###\"." +msgstr "" + +#: ../../pymupdf4llm/api.rst:128 ddb0ae41e91f44618b88dea05580fed3 +msgid "" +"Return appropriate markdown header prefix. This is either \"\" or a " +"string of \"#\" characters followed by a space." +msgstr "" + +#: ../../pymupdf4llm/api.rst:130 38868ba2c7784951a15fe8d1ef2011ae +msgid "" +"Given a text span from a \"dict\"\" extraction, determine the markdown " +"header prefix string of 0 to n concatenated '#' characters." +msgstr "" + +#: ../../pymupdf4llm/api.rst:133 96186998ca204d6b95c983eaec78baab +msgid "" +"a dictionary containing the text span information. This is the same " +"dictionary as returned by `page.get_text(\"dict\")`." +msgstr "" + +#: ../../pymupdf4llm/api.rst:135 e91180aa37384fbd8d76c061b1b0b50c +msgid "" +"the owning page object. This can be used when additional information " +"needs to be extracted." +msgstr "" + +#: ../../pymupdf4llm/api.rst:137 876fd6dd009f40bb888c26996ad84fee +msgid "a string of \"#\" characters followed by a space." +msgstr "" + +#: ../../pymupdf4llm/api.rst:141 e9f0fbb3d9914a14b20acd8c93aecb8d +msgid "" +"A dictionary mapping (integer) font sizes to Markdown header strings like" +" ``{14: '# ', 12: '## '}``. The dictionary is created by the " +"`IdentifyHeaders` constructor. The keys are the font sizes of the text " +"spans in the document. The values are the respective header strings." +msgstr "" + +#: ../../pymupdf4llm/api.rst:145 a387e9ca8cf6422694f17f11b8900f8d +msgid "" +"An integer value indicating the font size limit for body text. This is " +"computed as ``min(header_id.keys()) - 1``. In the above example, " +"body_limit would be 11." +msgstr "" + +#: ../../pymupdf4llm/api.rst:148 12b6e9b778b142108500f8b3aca00951 +msgid "**How to limit header levels (example)**" +msgstr "" + +#: ../../pymupdf4llm/api.rst:150 97f840c665744d5aa56345bd771df406 +msgid "Limit the generated header levels to 3::" +msgstr "" + +#: ../../pymupdf4llm/api.rst:160 12e402ed008d42198663e949e45c9049 +msgid "**How to provide your own header logic (example 1)**" +msgstr "" + +#: ../../pymupdf4llm/api.rst:162 c2d130c42052420c80db16b810beb9c6 +msgid "Provide your own function which uses pre-determined, fixed font sizes::" +msgstr "" + +#: ../../pymupdf4llm/api.rst:189 89cb7ad3a36644e7934dc0bb4c12ee88 +msgid "**How to provide your own header logic (example 2)**" +msgstr "" + +#: ../../pymupdf4llm/api.rst:191 cf9a2b58e9ce4086a9ab3af9f16990f8 +msgid "" +"This user function uses the document's Table of Contents -- under the " +"assumption that the bookmark text is also present as a header line on the" +" page (which certainly need not be the case!)::" +msgstr "" + +#: ../../pymupdf4llm/api.rst:231 70402737f5cc4a82acff6c74929cbce2 msgid "" "This is the only method of the markdown reader you should currently use " "to extract markdown data. Please in any case ignore methods " @@ -341,27 +527,163 @@ msgid "" "consult the LlamaIndex documentation [#f1]_." msgstr "" -#: ../../pymupdf4llm/api.rst:96 ffac621f35e24c0fb4488ed62356de97 +#: ../../pymupdf4llm/api.rst:233 6d6bfa39899e46da9ee69ca8102c340c msgid "Under the hood the method will execute `to_markdown()`." msgstr "" -#: ../../pymupdf4llm/api.rst:98 ea72c593bc11481ab244fcea8b024adb +#: ../../pymupdf4llm/api.rst:235 089f629a239748b1a011c9cc4d45e47a msgid "a list of `LlamaIndexDocument` documents - one for each page." msgstr "" -#: ../../pymupdf4llm/api.rst:102 f7e3889b196e4bdf91ee7bc7a88d6bde +#: ../../pymupdf4llm/api.rst:239 96a7245167a64bc9937198ad512201c5 +msgid "" +"For a list of changes, please see file `CHANGES.md " +"`_." +msgstr "" + +#: ../../pymupdf4llm/api.rst:242 bd4edb68eae44ad8989bfb56e9320b2d msgid "Footnotes" msgstr "" -#: ../../pymupdf4llm/api.rst:103 bea90f2acc534ecc8a28a8ccb55f7f6d +#: ../../pymupdf4llm/api.rst:243 b746861d660d446ab994c8904d5d41e2 msgid "`LlamaIndex documentation `_" msgstr "" -#: ../../footer.rst:60 3faedde686fd4e8fb544ab6c545644ee -msgid "This documentation covers all versions up to |version|." +#: ../../pymupdf4llm/api.rst:245 6ac5aea47ace4dd795a865534c09ea86 +msgid "" +"When using PyMuPDF-Pro, supported office documents are converted " +"internally into a PDF-like format. Therefore, they **will have fixed page" +" dimensions** and be no longer \"reflowable\". Consequently, the page " +"width and page height specifications will be ignored as well in these " +"cases." msgstr "" -#: ../../footer.rst:-1 5197f5b28c7e4fb4a895d2f9e50cea57 -msgid "Discord logo" +#: ../../footer.rst:60 9b34609a103941c9ba673a283a4b70b4 +msgid "This documentation covers all versions up to |version|." msgstr "" +#~ msgid "" +#~ "a float or a sequence of 2 " +#~ "or 4 floats specifying page borders. " +#~ "Only objects inside the margins will " +#~ "be considered for output. * `margin=f`" +#~ " yields `(f, f, f, f)` for " +#~ "`(left, top, right, bottom)`. * `(top," +#~ " bottom)` yields `(0, top, 0, " +#~ "bottom)`. * To always read full " +#~ "pages, use `margins=0`." +#~ msgstr "" + +#~ msgid "To always read full pages, use `margins=0`." +#~ msgstr "" + +#~ msgid "" +#~ "if `True` the output will be a " +#~ "list of `Document.page_count` dictionaries " +#~ "(one per page). Each dictionary has " +#~ "the following structure: - **\"metadata\"**" +#~ " - a dictionary consisting of the " +#~ "document's metadata :attr:`Document.metadata`, " +#~ "enriched with additional keys " +#~ "**\"file_path\"** (the file name), " +#~ "**\"page_count\"** (number of pages in " +#~ "document), and **\"page_number\"** (1-based " +#~ "page number). - **\"toc_items\"** - a" +#~ " list of Table of Contents items " +#~ "pointing to this page. Each item " +#~ "of this list has the format `[lvl," +#~ " title, pagenumber]`, where `lvl` is " +#~ "the hierarchy level, `title` a string" +#~ " and `pagenumber` as a 1-based page" +#~ " number. - **\"tables\"** - a list" +#~ " of tables on this page. Each " +#~ "item is a dictionary with keys " +#~ "\"bbox\", \"row_count\" and \"col_count\". Key" +#~ " \"bbox\" is a `pymupdf.Rect` in " +#~ "tuple format of the table's position " +#~ "on the page. - **\"images\"** - a" +#~ " list of images on the page. " +#~ "This a copy of page method " +#~ ":meth:`Page.get_image_info`. - **\"graphics\"** -" +#~ " a list of vector graphics rectangles" +#~ " on the page. This is a list" +#~ " of boundary boxes of clustered " +#~ "vector graphics as delivered by method" +#~ " :meth:`Page.cluster_drawings`. - **\"text\"** -" +#~ " page content as |Markdown| text." +#~ msgstr "" + +#~ msgid "" +#~ "specify a desired page width. This " +#~ "is ignored for documents with a " +#~ "fixed page width like PDF, XPS " +#~ "etc. **Reflowable** documents however, like" +#~ " e-books, office or text files have" +#~ " no fixed page dimensions and by " +#~ "default are assumed to have Letter " +#~ "format width (612) and an " +#~ "**\"infinite\"** page height. This means " +#~ "that the full document is treated " +#~ "as one large page." +#~ msgstr "" + +#~ msgid "" +#~ "table detection strategy. Default is " +#~ "`\"lines_strict\"` which ignores background " +#~ "colors. In some occasions, other " +#~ "strategies may be more successful, for" +#~ " example `\"lines\"` which uses all " +#~ "vector graphics objects for detection." +#~ msgstr "" + +#~ msgid "" +#~ "use this to limit dealing with " +#~ "excess amounts of vector graphics " +#~ "elements. Typically, scientific documents or" +#~ " pages simulating text using graphics " +#~ "commands may contain tens of thousands" +#~ " of these objects. As vector graphics" +#~ " are used for table detection mainly," +#~ " analyzing pages of this kind may " +#~ "result in excessive runtimes. You can" +#~ " exclude problematic pages via for " +#~ "instance `graphics_limit=5000` or even a " +#~ "smaller value as desired. The respective" +#~ " pages will then be ignored and " +#~ "be represented by one message line " +#~ "in the output text." +#~ msgstr "" + +#~ msgid "" +#~ "if `True` then mono-spaced text " +#~ "does not receive special formatting " +#~ "treatment. Code blocks will also no " +#~ "longer be generated." +#~ msgstr "" + +#~ msgid "" +#~ "a value of `True` (the default) " +#~ "displays a text-based progress bar " +#~ "as pages are being converted to " +#~ "Markdown. It will look similar to " +#~ "the following:: Processing input.pdf... " +#~ "[==================== ] (148/291)" +#~ msgstr "" + +#~ msgid "" +#~ "a value of `True` (the default) " +#~ "displays a text-based progress bar " +#~ "as pages are being converted to " +#~ "Markdown. It will look similar to " +#~ "the following::" +#~ msgstr "" + +#~ msgid "" +#~ "Either a string of the combined " +#~ "text of all selected document pages " +#~ "or a list of dictionaries." +#~ msgstr "" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/pymupdf4llm/index.mo b/docs/locales/ja/LC_MESSAGES/pymupdf4llm/index.mo index ca2960ee2..fb005278b 100644 Binary files a/docs/locales/ja/LC_MESSAGES/pymupdf4llm/index.mo and b/docs/locales/ja/LC_MESSAGES/pymupdf4llm/index.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/pymupdf4llm/index.po b/docs/locales/ja/LC_MESSAGES/pymupdf4llm/index.po index 95f19fce9..4bceb515c 100644 --- a/docs/locales/ja/LC_MESSAGES/pymupdf4llm/index.po +++ b/docs/locales/ja/LC_MESSAGES/pymupdf4llm/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,60 +19,82 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../pymupdf4llm/index.rst:8 5b8fb9003a704ca6b7fdb23f05023024 +#: ../../header.rst:-1 a84d929820f24736805d1a33254caaa4 +msgid "Artifex" +msgstr "" + +#: ../../header.rst:-1 a1b9b769f9164850b5833a74b4609b4f +msgid "" +"PyMuPDF is a high-performance Python library for data extraction, " +"analysis, conversion & manipulation of PDF (and other) documents." +msgstr "" + +#: ../../header.rst:-1 80467e59d59b4910b2d8cf9af1052bd1 +msgid "" +"PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " +"PDF Splitting, PDF Creation, Pyodide, PyScript" +msgstr "" + +#: ../../pymupdf4llm/index.rst:8 703ddb8e7e9548e2b22644982881c8e8 msgid "PyMuPDF4LLM" msgstr "" -#: ../../pymupdf4llm/index.rst:10 5489e517df2f47f498f82040822ba124 +#: ../../pymupdf4llm/index.rst:10 dae2ff70c8bd479fb23e2d60283f0739 msgid "" -"|PyMuPDF4LLM| is aimed to make it easier to extract **PDF** content in " -"the format you need for **LLM** & **RAG** environments. It supports " +"|PyMuPDF4LLM| is aimed to make it easier to extract |PDF| content in the " +"format you need for **LLM** & **RAG** environments. It supports " ":ref:`Markdown extraction ` as well as :ref:`LlamaIndex" " document output `." -msgstr "|PyMuPDF4LLM| は、**LLM** や **RAG** 環境で必要な形式で **PDF** コンテンツを簡単に抽出できるようにすることを目的としています。 **Markdown** 形式での抽出や、 **LlamaIndex** ドキュメント出力もサポートしています。" +msgstr "" +"|PyMuPDF4LLM| は、**LLM** や **RAG** 環境で必要な形式で |PDF| " +"コンテンツを簡単に抽出できるようにすることを目的としています。 **Markdown** 形式での抽出や、 **LlamaIndex** " +"ドキュメント出力もサポートしています。" -#: ../../pymupdf4llm/index.rst:14 69882351177c40e28baed2d5997c44b9 +#: ../../pymupdf4llm/index.rst:14 479be0d6bcbf423a8f21eaad1099d850 msgid "" "You can extend the supported file types to also include **Office** " "document formats (DOC/DOCX, XLS/XLSX, PPT/PPTX, HWP/HWPX) by :ref:`using " "PyMuPDF Pro with PyMuPDF4LLM `." -msgstr ":ref:`PyMuPDF ProをPyMuPDF4LLMと併用することで `、対応するファイル形式を拡張し、 **Office** ドキュメント形式(DOC/DOCX、XLS/XLSX、PPT/PPTX、HWP/HWPX)も含めることができます。" +msgstr "" +":ref:`PyMuPDF ProをPyMuPDF4LLMと併用することで " +"`、対応するファイル形式を拡張し、 **Office** " +"ドキュメント形式(DOC/DOCX、XLS/XLSX、PPT/PPTX、HWP/HWPX)も含めることができます。" -#: ../../pymupdf4llm/index.rst:17 7a616078fd824010ad54f3558207a1b5 +#: ../../pymupdf4llm/index.rst:17 88bc23fd6aab4c13999f607fcaa24fe8 msgid "Features" msgstr "特徴" -#: ../../pymupdf4llm/index.rst:19 400c06ae14c349aaacd8f5424376525f +#: ../../pymupdf4llm/index.rst:19 0e7d39d10d844ea190a65305e8a5383b msgid "Support for multi-column pages" msgstr "マルチカラムページのサポート" -#: ../../pymupdf4llm/index.rst:20 a7b127916a6647809cc5f7c630db6697 +#: ../../pymupdf4llm/index.rst:20 e86a689a833942978ed6351570c186ae msgid "" "Support for image and vector graphics extraction (and inclusion of " "references in the MD text)" msgstr "画像およびベクターグラフィックスの抽出のサポート(MDテキストへの参照の挿入を含む)" -#: ../../pymupdf4llm/index.rst:21 49db5c47138d4af4827f9d33a97299ac +#: ../../pymupdf4llm/index.rst:21 89e0c9f4fa2142d0a8d1601280872394 msgid "Support for page chunking output." msgstr "ページ分割出力のサポート" -#: ../../pymupdf4llm/index.rst:22 0f60a9dbc1cd40b2bcc7cab3076a8f28 +#: ../../pymupdf4llm/index.rst:22 eafc188f9e984c3a848b1c1a7e6f199f msgid "" "Direct support for output as :ref:`LlamaIndex Documents " "`." msgstr ":ref:`LlamaIndexドキュメント ` としての直接出力のサポート" -#: ../../pymupdf4llm/index.rst:26 e17e5cab17dc47f196f6a94fa23ff7b1 +#: ../../pymupdf4llm/index.rst:26 2ad1f7d1302746ae8e8f83b14dcdba8d msgid "Functionality" msgstr "機能" -#: ../../pymupdf4llm/index.rst:28 53e904952e964eecb34f58916c83aec1 +#: ../../pymupdf4llm/index.rst:28 3e1817178ea248cf8606c0aece719045 msgid "" "This package converts the pages of a file to text in **Markdown** format " "using |PyMuPDF|." -msgstr "このパッケージは、**PyMuPDF** を使用して **PDF** のページを **Markdown** 形式のテキストに変換します。" +msgstr "このパッケージは、|PyMuPDF| を使用して |PDF| のページを **Markdown** 形式のテキストに変換します。" -#: ../../pymupdf4llm/index.rst:30 28ffd2e3f3c74f1089cdd35d3db7a45f +#: ../../pymupdf4llm/index.rst:30 81a05398d1ca436485386081b8062dcd msgid "" "Standard text and tables are detected, brought in the right reading " "sequence and then together converted to **GitHub**-compatible " @@ -81,47 +103,49 @@ msgstr "" "標準のテキストやテーブルが検出され、適切な読み取り順序で取り込まれ、その後一緒に **GitHub** 互換の **Markdown** " "テキストに変換されます。" -#: ../../pymupdf4llm/index.rst:32 f8f07e7e7e9d4f6fa5d28e1eee7d7eb9 +#: ../../pymupdf4llm/index.rst:32 593eab1fb0214b6294964584b13a0083 msgid "" "Header lines are identified via the font size and appropriately prefixed " "with one or more `#` tags." msgstr "ヘッダー行はフォントサイズで識別され、適切に1つまたは複数の#タグで接頭語が付けられます。" -#: ../../pymupdf4llm/index.rst:34 a9bc3e297256481d882567b0e464a3b8 +#: ../../pymupdf4llm/index.rst:34 bfbac5aee5e7496f852f4de536a8db8f msgid "" "Bold, italic, mono-spaced text and code blocks are detected and formatted" " accordingly. Similar applies to ordered and unordered lists." msgstr "太字、斜体、等幅テキスト、およびコードブロックが検出され、それに応じて書式が付けられます。順序付けられたリストと順不同リストにも同様のことが適用されます。" -#: ../../pymupdf4llm/index.rst:36 f40de678033c4ac99eb72054a4f6becc +#: ../../pymupdf4llm/index.rst:36 740e76221d1448b38d46122f1776001d msgid "" "By default, all document pages are processed. If desired, a subset of " "pages can be specified by providing a list of `0`-based page numbers." msgstr "デフォルトでは、すべての文書ページが処理されます。必要に応じて、`0` から始まるページ番号のリストを指定してサブセットのページを指定できます。" -#: ../../pymupdf4llm/index.rst:40 2d939cfb6eb04904bae00df0c3f92134 +#: ../../pymupdf4llm/index.rst:40 06d164779ff94a568128a9db39c9030a msgid "Installation" msgstr "インストール" -#: ../../pymupdf4llm/index.rst:43 7a4ae15762224602accc03800171f6fe +#: ../../pymupdf4llm/index.rst:43 ea858ab3ed1f41b69849b46d74d8143c msgid "Install the package via **pip** with:" msgstr "パッケージを **pip** を使用してインストールするには、次のコマンドを使用します:" -#: ../../pymupdf4llm/index.rst:54 9fe67d7e6a0d485290197a3b4e9ebf86 +#: ../../pymupdf4llm/index.rst:54 513f20b7a04e437098ca66ee416eac9f msgid "Extracting a file as **Markdown**" msgstr "ファイルをMarkdown形式で抽出する" -#: ../../pymupdf4llm/index.rst:56 620f51ebd7bd492581a361a00bdc14c5 +#: ../../pymupdf4llm/index.rst:56 39ff5fad6dd14f639b8373ad18f3c56a msgid "" "To retrieve your document content in **Markdown** simply install the " "package and then use a couple of lines of **Python** code to get results." -msgstr "ドキュメントの内容を **Markdown** で取得するには、パッケージをインストールし、数行の **Python** コードを使用するだけで結果を得ることができます。" +msgstr "" +"ドキュメントの内容を **Markdown** で取得するには、パッケージをインストールし、数行の **Python** " +"コードを使用するだけで結果を得ることができます。" -#: ../../pymupdf4llm/index.rst:60 c1eb2d7417d14757a0ee1807899c7972 +#: ../../pymupdf4llm/index.rst:60 faf1cd9fbd964a95a8f649660c300162 msgid "Then in your **Python** script do:" msgstr "**Python** スクリプトでは:" -#: ../../pymupdf4llm/index.rst:71 a0450ade72524ebe95797db73a5dda99 +#: ../../pymupdf4llm/index.rst:71 539fd84130c04d1989f863d170eeaedd msgid "" "Instead of the filename string as above, one can also provide a " ":ref:`PyMuPDF Document `. A second parameter may be a list of " @@ -132,77 +156,84 @@ msgstr "" "を指定することもできます。2番目のパラメータは、`0` から始まるページ番号のリストであり、例えば `[0,1]` " "はドキュメントの最初のページと2番目のページを選択します。" -#: ../../pymupdf4llm/index.rst:74 c2110a48a53f42ad8a763f0b7d47395e +#: ../../pymupdf4llm/index.rst:74 6e32f37e871245878caa0a76588c0a22 msgid "" "If you want to store your **Markdown** file, e.g. store as a UTF8-encoded" " file, then do:" msgstr "**Markdown** ファイルを保存したい場合、例えばUTF8でエンコードされたファイルとして保存する場合は、次のようにします。" -#: ../../pymupdf4llm/index.rst:87 ce66fa78070f4b069dee4ee7a06e4d46 +#: ../../pymupdf4llm/index.rst:87 13ab2d0739c946ae8bb9c7775c73eb63 msgid "Extracting a file as a **LlamaIndex** document" msgstr "ファイルをLlamaIndexドキュメントとして抽出する" -#: ../../pymupdf4llm/index.rst:89 a6e64ac317cb4d47be831a483551a55e +#: ../../pymupdf4llm/index.rst:89 e385dbe676fa489b9173ab587b03cdaa msgid "" "|PyMuPDF4LLM| supports direct conversion to a **LLamaIndex** document. A " "document is first converted into **Markdown** format and then a " "**LlamaIndex** document is returned as follows:" -msgstr "|PyMuPDF4LLM| は **LlamaIndex** ドキュメントへの直接変換をサポートしています。ドキュメントはまず **Markdown** 形式に変換され、その後、以下のように **LlamaIndex** ドキュメントとして返されます。" +msgstr "" +"|PyMuPDF4LLM| は **LlamaIndex** ドキュメントへの直接変換をサポートしています。ドキュメントはまず " +"**Markdown** 形式に変換され、その後、以下のように **LlamaIndex** ドキュメントとして返されます。" -#: ../../pymupdf4llm/index.rst:103 3b3da1d1ea184fe893f569542a283b78 +#: ../../pymupdf4llm/index.rst:103 fe38b9668c864ec2b663fd24fc489e3a msgid "Using with |PyMuPDF Pro|" msgstr "PyMuPDF Proとの使用 " -#: ../../pymupdf4llm/index.rst:106 49ac5a3bf11b434ab14b9382035daa90 +#: ../../pymupdf4llm/index.rst:106 ac7b2b319a75411bbed7864c904b30ec msgid "" "For **Office** document support, |PyMuPDF4LLM| works seamlessly with " "|PyMuPDF Pro|. Assuming you have :doc:`../pymupdf-pro` installed you will" " be able to work with **Office** documents as expected:" -msgstr "**Office** ドキュメントのサポートのために、|PyMuPDF4LLM| は |PyMuPDF Pro| とシームレスに動作します。:doc:`../pymupdf-pro` がインストールされている場合、期待通りに **Office** ドキュメントを操作できます。" +msgstr "" +"**Office** ドキュメントのサポートのために、|PyMuPDF4LLM| は |PyMuPDF Pro| " +"とシームレスに動作します。:doc:`../pymupdf-pro` がインストールされている場合、期待通りに **Office** " +"ドキュメントを操作できます。" -#: ../../pymupdf4llm/index.rst:117 07d4d1e29ca74026b0876fbca84bee45 +#: ../../pymupdf4llm/index.rst:117 e192eeb9c87d4c5c9bdfce1a07c20cee msgid "" "As you can see |PyMuPDF Pro| functionality will be available within the " "|PyMuPDF4LLM| context!" msgstr "ご覧のとおり、|PyMuPDF Pro| の機能は |PyMuPDF4LLM| のコンテキスト内で利用可能になります!" -#: ../../pymupdf4llm/index.rst:122 ad2bb3f07e2d4eaa9d6007a9ef49cd50 +#: ../../pymupdf4llm/index.rst:122 d36b718aca944afe8346bd4e994359c6 msgid "API" msgstr "" -#: ../../pymupdf4llm/index.rst:124 b1a56eb7953743348477b8776ee757d9 +#: ../../pymupdf4llm/index.rst:124 909e996df58542a2a27e35eb6cd018fd msgid "See :ref:`the PyMuPDF4LLM API `." msgstr ":ref:`PyMuPDF4LLM API ` をご覧ください。" -#: ../../pymupdf4llm/index.rst:127 f0dfd6180e04469e85e7e092cba6a112 +#: ../../pymupdf4llm/index.rst:127 cd8ef0dca8034281a46603d2d4eb7fab msgid "Further Resources" msgstr "追加リソース" -#: ../../pymupdf4llm/index.rst:131 550ae136e65e49f49ed46d2687ab4cfc +#: ../../pymupdf4llm/index.rst:131 b22cbb362d6d40f5b0948407ab7c9181 msgid "Sample code" msgstr "サンプルコード" -#: ../../pymupdf4llm/index.rst:133 12b1c1ea770a44c88722ee1841815177 +#: ../../pymupdf4llm/index.rst:133 d7cfdfa3054c49a1bd12d190550076a0 +#, fuzzy msgid "" "`Command line RAG Chatbot with PyMuPDF " -"`_" +"`_" msgstr "" "`PyMuPDFを使用したコマンドラインRAGチャットボット `_" -#: ../../pymupdf4llm/index.rst:134 8652d218208447b4a3806ed032cccc19 +#: ../../pymupdf4llm/index.rst:134 4e68994fede248e1ad26e816a6603f09 +#, fuzzy msgid "" "`Example of a Browser Application using Langchain and PyMuPDF " -"`_" +"`_" msgstr "" "`LangchainとPyMuPDFを使用したブラウザアプリケーションの例 " "`_" -#: ../../pymupdf4llm/index.rst:138 7b37408477ee496eb25cb7dc7f603075 +#: ../../pymupdf4llm/index.rst:138 70432248c1a84d729f6836dbf522d9e6 msgid "Blogs" msgstr "ブログ" -#: ../../pymupdf4llm/index.rst:140 8d90b87f32874ad6a27b9ed073dde7d2 +#: ../../pymupdf4llm/index.rst:140 72e25633aa344939ae72cb881f754bfe msgid "" "`RAG/LLM and PDF: Enhanced Text Extraction `_" @@ -210,7 +241,7 @@ msgstr "" "`RAG/LLMとPDF: テキスト抽出の強化 `_" -#: ../../pymupdf4llm/index.rst:141 507e8befa06b4d4c8f80da8c1650a038 +#: ../../pymupdf4llm/index.rst:141 2f216379d0ed46a682a7b58f7f31ac5d msgid "" "`Creating a RAG Chatbot with ChatGPT and PyMuPDF " "`_" -#: ../../pymupdf4llm/index.rst:142 06422ac2815641a2a66438250f1ea4ff +#: ../../pymupdf4llm/index.rst:142 3ce05b35ac46423ebeaeee45e9fedebe msgid "" "`Building a RAG Chatbot GUI with the ChatGPT API and PyMuPDF " "`_" -#: ../../pymupdf4llm/index.rst:143 70bc717e6af048a4b32795386b9dbb81 +#: ../../pymupdf4llm/index.rst:143 a9e4304031124d608de6572eba56224f msgid "" "`RAG/LLM and PDF: Conversion to Markdown Text with PyMuPDF " "`_" -#: ../../footer.rst:60 4d1bb6b57d3946d19254fcf3f4486bf1 +#: ../../footer.rst:60 d3e889c035a6497bbfee92a94a12fe1c msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 450942a8ed68488683e30fe733d11816 -msgid "Discord logo" -msgstr "" - +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/pyodide.mo b/docs/locales/ja/LC_MESSAGES/pyodide.mo index 591b15367..c3c2bdeca 100644 Binary files a/docs/locales/ja/LC_MESSAGES/pyodide.mo and b/docs/locales/ja/LC_MESSAGES/pyodide.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/pyodide.po b/docs/locales/ja/LC_MESSAGES/pyodide.po index 0470b1693..c32de47d8 100644 --- a/docs/locales/ja/LC_MESSAGES/pyodide.po +++ b/docs/locales/ja/LC_MESSAGES/pyodide.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.24.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-06 22:50+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -18,154 +18,165 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 2745b7998ac74329b6e618e30f951139 +#: ../../header.rst:-1 14998f025d1148cda63f25bfef057aa2 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 f8c12cab9ad2437d8e9aa6344b8af46f +#: ../../header.rst:-1 5c54bd9a0f054a82914a040bee536ad6 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF(およびその他の)ドキュメントのデータ抽出、解析、変換、および操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 984297a6bc5e42469f1d034a3581de5e +#: ../../header.rst:-1 ce438b15da5b4a318f4e36069383eb06 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDF テキスト抽出、PDF 画像抽出、PDF 変換、PDF テーブル、PDF 分割、PDF 作成、Pyodide、PyScript" -#: ../../pyodide.rst:4 c5fe362fa46048e78f3c1936ce31967e +#: ../../pyodide.rst:4 92e84ecde2114f28830f75ff139cc150 msgid "Pyodide" msgstr "" -#: ../../pyodide.rst:8 838e8b69c35a43c2847d61d273456976 +#: ../../pyodide.rst:8 3c7cff0a2616443fbc6d49b71a7d5ef9 msgid "Overview" msgstr "概要" -#: ../../pyodide.rst:11 84f8f30948ed4e4cb73b2ba6f4c3a521 +#: ../../pyodide.rst:11 e962a3c031f2439688768b2b5d926e9a msgid "" "`Pyodide `_ is a client-side Python implementation " "that runs in a web browser." msgstr "`Pyodide `_ は、ウェブブラウザで実行されるクライアントサイドの Python 実装です" -#: ../../pyodide.rst:14 0b4f3e45fd7b43d4ba834c2e8393eecd +#: ../../pyodide.rst:14 e26bc674818d456fb786a4cc5b979023 msgid "The Pyodide build of PyMuPDF is currently experimental." msgstr "PyMuPDF の Pyodide ビルドは現在実験的な段階です。" -#: ../../pyodide.rst:18 f44b35eb18764cd4a8afac561ea0e3eb +#: ../../pyodide.rst:18 d8c36794d9a943e19a0cd695b98e4172 msgid "Building a PyMuPDF wheel for Pyodide" msgstr "Pyodide 用の PyMuPDF ホイールの構築" -#: ../../pyodide.rst:20 40a7ecfc6b484029bcaf3ebecb7b1315 +#: ../../pyodide.rst:20 1dcd6f33eb094fc284df0d904ce1cefa msgid "" "A PyMuPDF wheel for Pyodide can be built by running " "`scripts/gh_release.py` with some environmental variable settings. This " "is regularly tested on Github by `.github/workflows/test_pyodide.yml`." -msgstr "Pyodide 用の PyMuPDF ホイールは、いくつかの環境変数設定を使用して `scripts/gh_release.py` を実行することで構築できます。これは、`.github/workflows/test_pyodide.yml` によって定期的に GitHub 上でテストされています。" +msgstr "" +"Pyodide 用の PyMuPDF ホイールは、いくつかの環境変数設定を使用して `scripts/gh_release.py` " +"を実行することで構築できます。これは、`.github/workflows/test_pyodide.yml` によって定期的に GitHub " +"上でテストされています。" -#: ../../pyodide.rst:24 4831ed5a9b4246679ee9fdf9b0ce34f6 +#: ../../pyodide.rst:24 04f1fabb002143fb9a715d8db14af45a msgid "" "Here is an example of this, a single Linux command (to be run with the " "current directory set to a PyMuPDF checkout), that builds a Pyodide " "wheel::" msgstr "以下は、これの例です。現在のディレクトリが PyMuPDF のチェックアウトに設定されている場合に実行される単一の Linux コマンドです。" -#: ../../pyodide.rst:34 aa67f27964e148f48aa1cfbcf773dafd +#: ../../pyodide.rst:33 eef89f5827ec4b709ca1d2e0ac5c097f msgid "This does the following (all inside Python venv's):" msgstr "これは以下の作業を行います(すべて Python venv 内で実行):" -#: ../../pyodide.rst:36 25a80206d6744d0f89669884b6d87c77 +#: ../../pyodide.rst:35 12858012b88247c7bb3c683954628295 msgid "" "Download (git clone and pip install) and customise a Pyodide build " "environment." msgstr "Pyodide ビルド環境をダウンロード(git clone および pip install)し、カスタマイズします" -#: ../../pyodide.rst:37 b6e3f8b5791b45d3a7edb674e9541406 +#: ../../pyodide.rst:36 3e87e7f44f7545bbbb191af42283fe54 msgid "Download (git clone) the latest MuPDF." msgstr "最新の MuPDF をダウンロード(git clone)します。" -#: ../../pyodide.rst:38 51f0ba82e13845c2a24fbe64670d7602 +#: ../../pyodide.rst:37 160cb2ec1c1c4a209a7fba7562c0d145 msgid "Build MuPDF and PyMuPDF in the Pyodide build environment." msgstr "MuPDF と PyMuPDF を Pyodide ビルド環境でビルドします。" -#: ../../pyodide.rst:39 a6e5c5e35ada4d2f9fd92ac2d957736e +#: ../../pyodide.rst:38 ccad3592e88243efab0d160923ed215a msgid "Create a wheel in `dist/`." msgstr "`dist/` にホイールを作成します" -#: ../../pyodide.rst:41 d5946c4d517e48ebab06b8cbcfecb916 +#: ../../pyodide.rst:40 5a3384a91a534d249a926eb839230cea msgid "" "For more information, see the comments for functions " "`build_pyodide_wheel()` and `pyodide_setup()` in `scripts/gh_release.py`." -msgstr "詳細については、`scripts/gh_release.py` 内の関数 `build_pyodide_wheel()` と `pyodide_setup()` のコメントを参照してください。" +msgstr "" +"詳細については、`scripts/gh_release.py` 内の関数 `build_pyodide_wheel()` と " +"`pyodide_setup()` のコメントを参照してください。" -#: ../../pyodide.rst:46 6483174053e246b99c0d3578648bb083 +#: ../../pyodide.rst:45 b46c76365b9046c195143674ad6f9337 msgid "Using a Pyodide wheel" msgstr "Pyodide ホイールの使用方法" -#: ../../pyodide.rst:49 8d76d7e0aa7d406184be496c323cc980 +#: ../../pyodide.rst:48 6a5b9ebd00244e88809b7cddb3efb929 msgid "" "Upload the wheel (for example " "`PyMuPDF/dist/PyMuPDF-1.24.2-cp311-cp311-emscripten_3_1_32_wasm32.whl`) " "to a webserver which has been configured to allow Cross-origin resource " "sharing (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)." -msgstr "`PyMuPDF/dist/PyMuPDF-1.24.2-cp311-cp311-emscripten_3_1_32_wasm32.whl` のようなホイールを、Cross-origin resource sharing(https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)を許可するように構成されたウェブサーバにアップロードします。" +msgstr "" +"`PyMuPDF/dist/PyMuPDF-1.24.2-cp311-cp311-emscripten_3_1_32_wasm32.whl` " +"のようなホイールを、Cross-origin resource sharing(https://en.wikipedia.org/wiki" +"/Cross-origin_resource_sharing)を許可するように構成されたウェブサーバにアップロードします。" -#: ../../pyodide.rst:55 3745d239e68c44c38632823fe1352307 +#: ../../pyodide.rst:54 12bd07e412b5464e9cd32cbc111e2a26 msgid "" "The wheel can be used in a Pyodide console running in a web browser, or a" " JupyterLite notebook running in a web browser." msgstr "このホイールは、ウェブブラウザで実行されている Pyodide コンソールまたは JupyterLite ノートブックで使用できます。" -#: ../../pyodide.rst:58 0e2f414692e543e8accd3e621c7e6f7f +#: ../../pyodide.rst:57 fe96c467a1374441b725c5ed97d79a57 msgid "To create a Pyodide console, go to:" msgstr "Pyodide コンソールを作成するには、次のURLにアクセスしてください:" -#: ../../pyodide.rst:60 d8f11578ec374322a3063a60f0021753 +#: ../../pyodide.rst:59 910ab71af3894948a37af8412a6954fb msgid "https://pyodide.org/en/stable/console.html" msgstr "" -#: ../../pyodide.rst:62 a6ca99c19b0b4b2a90b3cbbbc49bcda9 +#: ../../pyodide.rst:61 6433c259686c469bac6c3f3a824351f2 msgid "To create a JupyterLite notebook, go to:" msgstr "JupyterLite ノートブックを作成するには、次のURLにアクセスしてください:" -#: ../../pyodide.rst:64 36d14162034e4a1f84755b839c88d27c +#: ../../pyodide.rst:63 4903ffff457f434691fffa07bd2f73a5 msgid "https://jupyterlite.readthedocs.io/en/latest/_static/lab/index.html" msgstr "" -#: ../../pyodide.rst:67 5772fccf07374895affc3e8c6257536c +#: ../../pyodide.rst:66 09c760f53c434ee6b3ce75b594a85cad msgid "" "In both these cases, one can use the following code to download the wheel" " (replace `url` with the URL of the uploaded wheel) and import it::" msgstr "れらの場合、以下のコードを使用してホイールをダウンロード(`url` をアップロードされたホイールの URL に置き換える)し、インポートできます:" -#: ../../pyodide.rst:75 142592469bfc46799ef407e5e750f1e7 +#: ../../pyodide.rst:74 dbd55ab15c224387b85ff3b29f3fd2c7 msgid "" "Note that `micropip.install()` does not work, because of PyMuPDF's use of" " shared libraries." msgstr "`micropip.install()` は PyMuPDF が共有ライブラリを使用しているため機能しないことに注意してください。" -#: ../../pyodide.rst:80 2fdba7706df24a829f3753d40cfef214 +#: ../../pyodide.rst:79 d9fce175d654431a9a455df1cddc005f msgid "Loading a PDF document from a URL into PyMuPDF" msgstr "PyMuPDF にURLからPDFドキュメントを読み込む" -#: ../../pyodide.rst:83 12691e8a3bd84e6e8598f42bb42ae8ec +#: ../../pyodide.rst:82 5e286969bc7e464ab645cff0b5e85861 msgid "" "Pyodide browser console does not have generic network access, so for " "example `urllib.request.urlopen(url)` fails. But Pyodide has a built-in " "`pyodide.http` module that uses javascript internally, which one can use " "to download into a `bytes` instance, which can be used to create a " "PyMuPDF `Document` instance::" -msgstr "Pyodide ブラウザコンソールには一般的なネットワークアクセスがないため、例えば `urllib.request.urlopen(url)` は失敗します。しかし、Pyodide には JavaScript を内部で使用する組み込みの `pyodide.http` モジュールがあります。これを使用して `bytes` インスタンスにダウンロードし、それを使用して PyMuPDF `Document` インスタンスを作成できます:" +msgstr "" +"Pyodide ブラウザコンソールには一般的なネットワークアクセスがないため、例えば `urllib.request.urlopen(url)` " +"は失敗します。しかし、Pyodide には JavaScript を内部で使用する組み込みの `pyodide.http` " +"モジュールがあります。これを使用して `bytes` インスタンスにダウンロードし、それを使用して PyMuPDF `Document` " +"インスタンスを作成できます:" -#: ../../pyodide.rst:94 9b2e92638ebb431a8641d067fa9df1dc +#: ../../pyodide.rst:93 9022520dcaa9430fb6e28b813ef995c2 msgid "It looks like this only works with `https://`, not `http://`." msgstr "これは `https://` でのみ機能するようです。`http://` では機能しません。" -#: ../../footer.rst:60 cff04745d8c348f2b39f3d643df2b573 +#: ../../footer.rst:60 84f62677a793440aa7ea160b7c3c1a2f msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは、|version| までのすべてのバージョンをカバーしています" -#: ../../footer.rst:-1 e4e95d4831e14ddbb5238d4d87f4e5b7 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/quad.mo b/docs/locales/ja/LC_MESSAGES/quad.mo index 2b6269537..5b47ba903 100644 Binary files a/docs/locales/ja/LC_MESSAGES/quad.mo and b/docs/locales/ja/LC_MESSAGES/quad.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/quad.po b/docs/locales/ja/LC_MESSAGES/quad.po index e1d9f7440..e4e4ec9bc 100644 --- a/docs/locales/ja/LC_MESSAGES/quad.po +++ b/docs/locales/ja/LC_MESSAGES/quad.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 e95c20024d6343e0bef6909148663749 +#: ../../header.rst:-1 3ad4b4dd8a9d444dbdb71d2f893d147d msgid "Artifex" msgstr "" -#: ../../header.rst:-1 565cbd2eee03433fa54692283a990958 +#: ../../header.rst:-1 8e281561019a467090b604cbf8c25baa msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 e7fe4191a69747cc9c2e27137dd9bba9 +#: ../../header.rst:-1 7a22fe4efbda4a6e9221d09c9a1e31f5 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../quad.rst:7 0f90c612cb5e4bc5bfb0687de8c578f0 +#: ../../quad.rst:7 35e2527763ab458fa5ba06887a186967 msgid "Quad" msgstr "Quad (クアッド)" -#: ../../quad.rst:9 efc5594935a24772aff425afdfa3e71f +#: ../../quad.rst:9 7800e12444f748a6831e1efc77128fa3 msgid "" "Represents a four-sided mathematical shape (also called \"quadrilateral\"" " or \"tetragon\") in the plane, defined as a sequence of four " @@ -49,7 +49,7 @@ msgstr "" "Quad(四角形または四辺形とも呼ばれる)は、平面上の数学的な四角形を表すもので、ul(上部左側)、ur(上部右側)、ll(下部左側)、lr(下部右側)の4つの" " :ref:`Point` オブジェクトのシーケンスとして定義されます。" -#: ../../quad.rst:11 4b6974f4c7194d8d99fed2a89dd0ae07 +#: ../../quad.rst:11 4d17c9c46c584b239de386721cba1810 msgid "" "Quads can **be obtained** as results of text search methods " "(:meth:`Page.search_for`), and they **are used** to define text marker " @@ -63,7 +63,7 @@ msgstr "" "などを参照)の定義や、:meth:`Page.draw_oval` / :meth:`Shape.draw_quad` " "などのいくつかの描画メソッドで使用されます。" -#: ../../quad.rst:15 5ca01c594297426a94f11d64704b32eb +#: ../../quad.rst:15 7b24b5db8f874de9a5211dce20991a59 msgid "" "If the corners of a rectangle are transformed with a **rotation**, " "**scale** or **translation** :ref:`Matrix`, then the resulting quad is " @@ -76,14 +76,14 @@ msgstr "" "です(長方形と合同の意味)、つまりそのすべての角は再び90度の角度を囲んでいます。:attr:`Quad.is_rectangular` " "プロパティは、四角形がこのような操作の結果であるかどうかを確認します。" -#: ../../quad.rst:17 ce84faeb75524cfe986b91491492a497 +#: ../../quad.rst:17 688788bd21fd45f692790d0473acb161 msgid "" "This is not true for all matrices: e.g. shear matrices produce " "parallelograms, and non-invertible matrices deliver \"degenerate\" " "tetragons like triangles or lines." msgstr "これはすべての行列に対して当てはまるわけではありません。例えば、シア行列は平行四辺形を生成し、非可逆行列は三角形や線のような「退化」した四角形を提供します。" -#: ../../quad.rst:19 f9edec5efa444f0aaf0f2e63c18103a9 +#: ../../quad.rst:19 cf1183ff01fc48bf97106c5a287a5ff7 msgid "" "Attribute :attr:`Quad.rect` obtains the enveloping rectangle. Vice versa," " rectangles now have attributes :attr:`Rect.quad`, resp. " @@ -92,115 +92,115 @@ msgstr "" "属性 :attr:`Quad.rect` は包括的な長方形を取得します。その逆も成り立ち、長方形には " ":attr:`Rect.quad`、:attr:`IRect.quad` 属性が含まれ、それぞれそれらの四辺形バージョンを取得できます。" -#: ../../quad.rst:23 bc17e1df2c8b46e4900685b1cc18b140 +#: ../../quad.rst:23 50d7d842d9734fa599c188cc646d7b45 msgid "**Methods / Attributes**" msgstr "**メソッド / 属性**" -#: ../../quad.rst:23 dddec3cadd404ccd8f4dbe953ed55f68 +#: ../../quad.rst:23 19f74f68bb13495c8ebf6c8b0b42f965 msgid "**Short Description**" msgstr "**短い説明**" -#: ../../quad.rst:25 35ad107d586d472084b0b674d1453a51 +#: ../../quad.rst:25 e538183055244dc08b0b15c4b8912add msgid ":meth:`Quad.transform`" msgstr "" -#: ../../quad.rst:25 37beab6bccff49bcbf2cd1118649c951 +#: ../../quad.rst:25 9f2dd03a77524dfd9b216fbb23b9cda3 msgid "transform with a matrix" msgstr "行列を使用して変換します" -#: ../../quad.rst:26 8f52bb40542b45658c51b0a961c99607 +#: ../../quad.rst:26 6235ae5796024a74a6be5aa7991d9d4e msgid ":meth:`Quad.morph`" msgstr "" -#: ../../quad.rst:26 7c4e0921a951456fa142c748acbbf393 +#: ../../quad.rst:26 ee610799d4d446bc8e8b0e6c5bbbb1d6 msgid "transform with a point and matrix" msgstr "ポイントと行列を使用して変換します" -#: ../../quad.rst:27 49acf50efa384cc096934a272415ca22 +#: ../../quad.rst:27 046b52453a10469e8acd23a2744d436c msgid ":attr:`Quad.ul`" msgstr "" -#: ../../quad.rst:27 82492428865243478d14ee3951f2a6f3 +#: ../../quad.rst:27 6a03caf34312460985dc2fa98abdf184 msgid "upper left point" msgstr "左上のポイント" -#: ../../quad.rst:28 4cbf7ece3b044e4e92c789ec36fe6a46 +#: ../../quad.rst:28 4ccf2ab7cc924c399255bcdbd26f5233 msgid ":attr:`Quad.ur`" msgstr "" -#: ../../quad.rst:28 74608d5018ed4731b63df972c5457814 +#: ../../quad.rst:28 be0476ca60a84fc08b7232ed236c4a76 msgid "upper right point" msgstr "右上のポイント" -#: ../../quad.rst:29 f7ec59cba0484f67a50508d4fdc77608 +#: ../../quad.rst:29 a9835aa97d1b4882af33c92e9119563a msgid ":attr:`Quad.ll`" msgstr "" -#: ../../quad.rst:29 2c97a33a2c5d40d9baeab784ae9276eb +#: ../../quad.rst:29 b7fffd7413fc4d0cafb1f629cf052760 msgid "lower left point" msgstr "左下のポイント" -#: ../../quad.rst:30 bcaff376e8664b208b3c9d557e53aeac +#: ../../quad.rst:30 c28f7725993c42398e1efe0361e4cd0c msgid ":attr:`Quad.lr`" msgstr "" -#: ../../quad.rst:30 2a264e9584ca4e65b24360a066770d89 +#: ../../quad.rst:30 928da6d5fb114af49b9f822994eeca25 msgid "lower right point" msgstr "右下のポイント" -#: ../../quad.rst:31 ec4389b04f814af7b4e4d988de3c5fdd +#: ../../quad.rst:31 b6205ef513fc4875b98f196a42177c78 msgid ":attr:`Quad.is_convex`" msgstr "" -#: ../../quad.rst:31 d30b9c7bf357446b81c5689ee449690c +#: ../../quad.rst:31 5b826a02006c4d41b209de06b14a5189 msgid "true if quad is a convex set" msgstr "四角形が凸集合である場合は true" -#: ../../quad.rst:32 94046eb87dbc42ebb2b522806299c763 +#: ../../quad.rst:32 51d60aeda5e54bcbaf2e39b528354d95 msgid ":attr:`Quad.is_empty`" msgstr "" -#: ../../quad.rst:32 d4424ef3beea4bdda97d58f5ec1eda05 +#: ../../quad.rst:32 352c6bcfc0894aaeb7400e72b81e1e94 msgid "true if quad is an empty set" msgstr "四角形が空の集合である場合は true" -#: ../../quad.rst:33 a96717e598764a179e4913f947b12dcb +#: ../../quad.rst:33 36eca873465943169ce2e899cbb1a5e6 msgid ":attr:`Quad.is_rectangular`" msgstr "" -#: ../../quad.rst:33 b0e2af666d3d4989a533348a5270936e +#: ../../quad.rst:33 bc110a7f43304b5f9cf4b9e5f348d237 msgid "true if quad is congruent to a rectangle" msgstr "四角形が長方形と合同である場合は true" -#: ../../quad.rst:34 7832d65b69644e898c044c1da910109f +#: ../../quad.rst:34 42b941820433460aa6e4f0939cbd93a7 msgid ":attr:`Quad.rect`" msgstr "" -#: ../../quad.rst:34 ba8c0846c614476ba5353f67d96017fa +#: ../../quad.rst:34 6870fe5a0464469ab8425e8f89f7a530 msgid "smallest containing :ref:`Rect`" msgstr "最も小さい包含 :ref:`Rect`" -#: ../../quad.rst:35 1048a066272b43b2b61b43fb0a67c852 +#: ../../quad.rst:35 79aa77876e4d45a289d673fe00a95995 msgid ":attr:`Quad.width`" msgstr "" -#: ../../quad.rst:35 6c6c65ac063d43a2a3b6432f617573f0 +#: ../../quad.rst:35 1082a3b6b72b40888b3797974c6f1191 msgid "the longest width value" msgstr "最も長い幅の値" -#: ../../quad.rst:36 5015befd02134643a1bf93cddc18bed8 +#: ../../quad.rst:36 7a4558a4427841528a563259add0a04b msgid ":attr:`Quad.height`" msgstr "" -#: ../../quad.rst:36 4e65b460672c4feb92386c9f4eb9ab2a +#: ../../quad.rst:36 a3081f95dafb42188a9b34f2e0664367 msgid "the longest height value" msgstr "最も長い高さの値" -#: ../../quad.rst:39 6ec17b9b6d66463990d41426f98e0dfe +#: ../../quad.rst:39 b2cf4d9a187b48ff8960c68e29a2f5ce msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../quad.rst:51 61d6f2f4abe94d089a96a0b263fe6062 +#: ../../quad.rst:51 5500a6189d9147a996038ae4dccde288 msgid "" "Overloaded constructors: \"ul\", \"ur\", \"ll\", \"lr\" stand for " ":data:`point_like` objects (the four corners), \"sequence\" is a Python " @@ -210,108 +210,108 @@ msgstr "" "オブジェクト(4つの角)を表し、\"sequence\" は4つの :data:`point_like` " "オブジェクトを持つPythonのシーケンスです。" -#: ../../quad.rst:53 8367fb0b67844658a938ea6eac9b2167 +#: ../../quad.rst:53 93948e27f11149d3b2de812391df3cbe msgid "If \"quad\" is specified, the constructor creates a **new copy** of it." msgstr "\"quad\" が指定されている場合、コンストラクターはそれの **新しいコピー** を作成します。" -#: ../../quad.rst:55 c5683bdeab45485bb99bb82d74494418 +#: ../../quad.rst:55 f2671c8b3169475cb8037f714c6b1f02 msgid "" "Without parameters, a quad consisting of 4 copies of *Point(0, 0)* is " "created." msgstr "パラメーターが指定されていない場合、4つの *Point(0, 0)* のコピーからなる四角形が作成されます。" -#: ../../quad.rst:60 e178d8fe3ee245948a91f064394ef924 +#: ../../quad.rst:60 111c1f817d0f46f4a18dcfd6c663c18a msgid "" "Modify the quadrilateral by transforming each of its corners with a " "matrix." msgstr "四角形の各角を行列で変換して四角形を変更します。" -#: ../../quad.rst b72955fe74ae47e8aac52e0b8cad1708 -#: cf48cc5d11854b37bda58cea2b0dda2e +#: ../../quad.rst 8266d43d9f56420bb2aa23d082c0b121 +#: 8b1eac95560f446b8e20b55dd12a6816 msgid "Parameters" msgstr "" -#: ../../quad.rst:62 ../../quad.rst:69 64ae1e2e875b4ff3a962b3b516ad67ce -#: 859f009a32c442b9a6809b8c1933e90b +#: ../../quad.rst:62 ../../quad.rst:69 0d634d4d35d54c30baabad227f22028f +#: 9a047b3f95b14bb7b64ad40042d33edf msgid "the matrix." msgstr "行列。" -#: ../../quad.rst:66 658221a789d44bbba1498f4ec9db1d55 +#: ../../quad.rst:66 3267067416df4dd8b8c8377a0d0e60c2 msgid "" "*(New in version 1.17.0)* \"Morph\" the quad with a matrix-like using a " "point-like as fixed point." msgstr "*(バージョン1.17.0で新たに導入)* マトリクスのようなものを使用して四角形を\"変形\"させ、固定ポイントとしてポイントライクを使用します。" -#: ../../quad.rst:68 0c029db0f71a4d12b956fc7c3d4b188b +#: ../../quad.rst:68 d59f47deb52f43bbaac3720001127772 msgid "the point." msgstr "ポイント。" -#: ../../quad.rst 88705309609043f7bc4bb3e0050d3b57 +#: ../../quad.rst aa094e5057b24cf88c8f90ad40d9a6cb msgid "Returns" msgstr "" -#: ../../quad.rst:70 a6658402390a49de97f9ced45086378a +#: ../../quad.rst:70 c0beb373c7644f0aa60225c4310d6f7e msgid "a new quad (no operation if this is the infinite quad)." msgstr "新しい四角形(これが無限の四角形の場合、操作は行われません)。" -#: ../../quad.rst:75 ec85c8a8e3544b3096c16ca987284181 +#: ../../quad.rst:75 dddc8689476548da8e50846d44537f2d msgid "" "The smallest rectangle containing the quad, represented by the blue area " "in the following picture." msgstr "四角形を含む最小の長方形で、以下の図の青い領域で表されます。" -#: ../../quad.rst 0f533166392149feaac34abdde896ae8 -#: 3474a6d855754832b1d326b8e2c96bde 79c318f7c9204d128c65ebdb53cfccdf -#: 95249516f364466bb95826111aea9c99 96af8c1b557541cd89181b5384ccfc1c -#: af3f4cdba6944a6e8d8fe829dfa5f48d d4683e57a69d46af8f33829844efeaa3 -#: ee43161b6eae4210828483de3b42b09c f91572cd723c4ab29cbdc0c1deb3ce87 -#: ff36ee142d2a484bb23cb4008da3c1a0 +#: ../../quad.rst 0d91757c4c9c4ded9d29ce0f2a2c7b6e +#: 25ea7b95ca1c470bbd0c8c43d4724eb8 3608dfc13924419a90f0f72f4942d4bb +#: 46bbb10a82e94600b8fc797424ddd669 47c64c1542614109b19d7cfe7ff52b48 +#: 8c84322b6cca4f0aaeb2da2b9c139ad2 9c0e2fe975e94117ad5671c3ae223f92 +#: d3ab357c8c344e4fbbffbbf6e592d8f7 d6db0b6368ce47b28d082a226b28263e +#: ea8761efdea544869198ae33343519b9 msgid "type" msgstr "" -#: ../../quad.rst:79 f9a224e948ed48ddad6a03c19c97fc30 +#: ../../quad.rst:79 a447749ed60c435c945ea6d5ac0e1531 msgid ":ref:`Rect`" msgstr "" -#: ../../quad.rst:83 59ad51a4e6ad4039ab36cc502e6509cb +#: ../../quad.rst:83 44f1f1d4404e42f0a16619c78d94e880 msgid "Upper left point." msgstr "左上のポイント" #: ../../quad.rst:85 ../../quad.rst:91 ../../quad.rst:97 ../../quad.rst:103 -#: 742e21a2e4a246e28c22917311e58d7f 9fbcb19bbd5747ff90f1cf4c82605436 -#: a007f77e7a124827a0ec8fd2353e1226 a5a2f8b19c3c4c23b8b69af84a47adff +#: 03736f05a8f5421189f98f0b2563c031 a6060101e92f44bf89658804e52b0c6c +#: cd76cb6712a84b878c58e674036c6b57 e745c97cd50f406d99f625378bc07267 msgid ":ref:`Point`" msgstr "" -#: ../../quad.rst:89 1e0c9f5e23cc4e7a97c5c8040ccdfe42 +#: ../../quad.rst:89 a15d9aa488ac46398e1300d7a621789d msgid "Upper right point." msgstr "右上のポイント" -#: ../../quad.rst:95 a4f026759ea24dc1a1187eb09d2fcf5e +#: ../../quad.rst:95 e58949b5a6124ea7b84c82246b331fa5 msgid "Lower left point." msgstr "左下のポイント" -#: ../../quad.rst:101 b64b9832bf5a4547a45cabdddb549fa0 +#: ../../quad.rst:101 459751b609574eee8992e1f4ed63a8be msgid "Lower right point." msgstr "右下のポイント" -#: ../../quad.rst:107 bec16c7eb50f49fd95811e0ba7b05432 +#: ../../quad.rst:107 42081dff926d4b2dbfc85eebd7c6b91c msgid "New in version 1.16.1" msgstr "新しいバージョン1.16.1で追加されました" -#: ../../quad.rst:109 be208a63407d4d0bae97bb51a89b4d10 +#: ../../quad.rst:109 18727351228e45f18f66be1e6b1a0431 msgid "" "Checks if for any two points of the quad, all points on their connecting " "line also belong to the quad." msgstr "このクアッドの任意の2点について、それらを結ぶ直線上のすべての点もこのクアッドに属するかどうかをチェックします。" #: ../../quad.rst:114 ../../quad.rst:120 ../../quad.rst:126 -#: 1fefa098adaa467a885e60276fa20857 6c9033da8cc041fe980345c0553eef0b -#: fe02b2b2d1494f21ba1b64b828dd9537 +#: 269c1e4494824e2cb5936c9aeaae79e7 c41948d6f881462aac8ced961485b1ec +#: dea8b14143c94257a8c383e3f0c1f9a2 msgid "bool" msgstr "" -#: ../../quad.rst:118 6c1b175fb21c4a1ab5ace624ca9b3553 +#: ../../quad.rst:118 fb252aa17185476b93956d6738fff2e7 msgid "" "True if enclosed area is zero, which means that at least three of the " "four corners are on the same line. If this is false, the quad may still " @@ -321,30 +321,30 @@ msgstr "" "Enclosed " "areaがゼロの場合はTrueで、これは4つの角のうち少なくとも3つが同じ直線上にあることを意味します。これがfalseの場合、クアッドは依然として退化しているか、全くテトラゴンのようには見えないかもしれません(三角形、平行四辺形、台形など)。" -#: ../../quad.rst:124 4cc8db4bb56549449189787a2f9f5ec3 +#: ../../quad.rst:124 df1dab125bdf4e06b610448db4325b06 msgid "" "True if all corner angles are 90 degrees. This implies that the quad is " "**convex and not empty**." msgstr "4つの角のすべての角度が90度の場合はTrueです。これは、クアッドが **凸面であり、空ではない** ことを意味します。" -#: ../../quad.rst:130 10b0cf7e771f4578a72eba2ea2bda6ee +#: ../../quad.rst:130 4f39bb3710a4402da4e1c2a2d8e7f5f4 msgid "The maximum length of the top and the bottom side." msgstr "上辺と下辺の最大の長さ。" -#: ../../quad.rst:132 ../../quad.rst:138 62779d76cd034f969a115841f6b4a773 -#: 6c863636854d4a4da52a951ba63bb0d4 +#: ../../quad.rst:132 ../../quad.rst:138 dbf8525cf293442a8ac2170ef5d5830b +#: dc2fb941fd18465297cb72af2629fce0 msgid "float" msgstr "" -#: ../../quad.rst:136 52a2d763b6d64562b4ab2199c2ed3ec5 +#: ../../quad.rst:136 637d9c47fc5448c6b6b12ed59410f8cf msgid "The maximum length of the left and the right side." msgstr "上辺と下辺の最大の長さ。" -#: ../../quad.rst:141 09144acf5e004852ae0ebe42929e77c8 +#: ../../quad.rst:141 deee9fb98ab34d4494ac466fabaea29d msgid "Remark" msgstr "リマーク" -#: ../../quad.rst:142 71ac55cf22784537b6a2f78bcf5769ef +#: ../../quad.rst:142 1b61ac0c866a4df28afb4a722645cf08 msgid "" "This class adheres to the sequence protocol, so components can be dealt " "with via their indices, too. Also refer to :ref:`SequenceTypes`." @@ -352,11 +352,11 @@ msgstr "" "このクラスはシーケンスプロトコルに従っており、要素にはインデックスを使用できます。また、:ref:`SequenceTypes` " "を参照してください。" -#: ../../quad.rst:145 354a89ca9487438db8d18797bf206173 +#: ../../quad.rst:145 6215145a706f4cd4a73d3ab4595807a9 msgid "Algebra and Containment Checks" msgstr "代数と包含チェック" -#: ../../quad.rst:146 be059691eaca4788850eba35d726f4c4 +#: ../../quad.rst:146 fb0679a33ccb4fdb98427f9407938675 msgid "" "Starting with v1.19.6, quads can be used in algebraic expressions like " "the other geometry object -- the respective restrictions have been " @@ -366,15 +366,15 @@ msgstr "" "v1.19.6から、クアッドは他のジオメトリオブジェクトと同様に代数的な式で使用できるようになりました - " "対応する制限が解除されました。特に、次の包含チェックの組み合わせがすべて可能になりました。" -#: ../../quad.rst:148 a8b8a0d5a9d447509b64ac73490c5f2b +#: ../../quad.rst:148 0e4401adcb5f4fc485e655c876a8ae28 msgid "`{Point | IRect | Rect | Quad} in {IRect | Rect | Quad}`" msgstr "" -#: ../../quad.rst:150 1f39f8c6055f4ed2bef035cd5eebc9b8 +#: ../../quad.rst:150 7f8244052cb6402a939f0594f0b6a759 msgid "Please note the following interesting detail:" msgstr "次の興味深い詳細に注意してください:" -#: ../../quad.rst:152 1c54ac1af6e04444ac161b6a483e0870 +#: ../../quad.rst:152 9671396ad46747c2ae802633663007ee msgid "" "For a rectangle, only its top-left point belongs to it. Since v1.19.0, " "rectangles are defined to be \"open\", such that its bottom and its right" @@ -385,11 +385,10 @@ msgstr "" "長方形の場合、その上辺のみがそれに属しています。v1.19.0以降、長方形は「オープン」であると定義されており、その底辺と右端はそれに属していません" " - それには対応する角も含まれます。しかし、クアッドには「オープン」のような概念が存在しないため、次のようなやや驚くべき含意があります:" -#: ../../footer.rst:71 241096aafde54083b992889c37cc6f5d +#: ../../footer.rst:60 cc3f6c4d45844fe8ad36b35c6e3bd3ab msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 8a3e6b3040204cf3a03fca80392574ba -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/rag.mo b/docs/locales/ja/LC_MESSAGES/rag.mo index 23c3a939c..150a7d365 100644 Binary files a/docs/locales/ja/LC_MESSAGES/rag.mo and b/docs/locales/ja/LC_MESSAGES/rag.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/rag.po b/docs/locales/ja/LC_MESSAGES/rag.po index 8ca495649..b381e8770 100644 --- a/docs/locales/ja/LC_MESSAGES/rag.po +++ b/docs/locales/ja/LC_MESSAGES/rag.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.24.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -18,27 +18,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 f032bf30ed9142289a862925518f5b31 +#: ../../header.rst:-1 d58a444fc92843a18660ede50d62d095 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 ea22b77e9dbf4a6285e3e32135e0a37e +#: ../../header.rst:-1 6e2254ee60a14d48a1348f2b46d484d2 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDFは、PDF(およびその他)ドキュメントのデータ抽出、解析、変換、および操作のための高性能なPythonライブラリです。" -#: ../../header.rst:-1 112f6ca0a87941ecb5ad834584495d4c +#: ../../header.rst:-1 bc86116b658f4d3fb0e20919e6179a1e msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDF画像抽出、PDF変換、PDFテーブル、PDF分割、PDF作成、Pyodide、PyScript" -#: ../../rag.rst:6 8aceb8a4a1554f7f98c014c03cd8c211 +#: ../../rag.rst:6 1e69d82c08b049a6b539ae49ee8df24e msgid "PyMuPDF, LLM & RAG" msgstr "PyMuPDF、LLM、およびRAG" -#: ../../rag.rst:9 4cee612223fd4ff8bfaf22df84989cb1 +#: ../../rag.rst:9 056a5c68abb744c7863c87748f5cc0b1 msgid "" "Integrating |PyMuPDF| into your :title:`Large Language Model (LLM)` " "framework and overall :title:`RAG (Retrieval-Augmented Generation`) " @@ -48,7 +48,7 @@ msgstr "" "|PyMuPDF| を :title:`大規模言語モデル(LLM)` フレームワークおよび全体的な :title:`RAG(Retrieval-" "Augmented Generation)` ソリューションに統合することで、文書データを提供する最も高速かつ信頼性の高い方法が提供されます。" -#: ../../rag.rst:11 833c3495c1d34b92bad70b007d886850 +#: ../../rag.rst:11 fee93922167c4b2d9d9054f8565193f4 msgid "" "There are a few well known :title:`LLM` solutions which have their own " "interfaces with |PyMuPDF| - it is a fast growing area, so please let us " @@ -57,23 +57,23 @@ msgstr "" "いくつかのよく知られた :title:`LLM` ソリューションは、|PyMuPDF| " "と独自のインターフェースを持っています。この分野は急速に成長しているため、もっと見つけた場合はお知らせください。" -#: ../../rag.rst:13 fc88fce4b4304886b8e469acbbb0c0af +#: ../../rag.rst:13 87158dfd9b9a4174a93d56546e871f72 msgid "" "If you need to export to :title:`Markdown` or obtain a " ":title:`LlamaIndex` Document from a file:" msgstr ":title:`Markdown` へのエクスポートやファイルから :title:`LlamaIndex` ドキュメントを取得する必要がある場合は:" -#: ../../rag.rst:31 1dea71fa597e4f018ac60f80c04c4461 +#: ../../rag.rst:31 51971a71e3ca420db71fb2080da653ad msgid "Integration with :title:`LangChain`" msgstr ":title:`LangChain` との統合" -#: ../../rag.rst:33 6b7d62a573f64a2bb03641729fa38c5c +#: ../../rag.rst:33 9e2065dc5185491abcf869e4a276c5be msgid "" "It is simple to integrate directly with :title:`LangChain` by using their" " dedicated loader as follows:" msgstr ":title:`LangChain` の専用ローダーを使用して直接統合するのは簡単です。以下のようにします:" -#: ../../rag.rst:43 6fd2bc431ceb45ddbe27a16bbd2f7756 +#: ../../rag.rst:43 236dcfb83a264f6c83e921a7905a29bc msgid "" "See `LangChain Using PyMuPDF " "`_ を参照してください。" -#: ../../rag.rst:47 5ca73199324b4625bc90a11753be427c +#: ../../rag.rst:47 f9ce52737bda4fc5b4075b6ad14b9e2e msgid "Integration with :title:`LlamaIndex`" msgstr ":title:`LlamaIndex` との統合" -#: ../../rag.rst:50 7cdf18569ec24f8d94e31d2084320f85 +#: ../../rag.rst:50 1b7d2270a3c74a44b70efbcee8b0d37f msgid "" "Use the dedicated `PyMuPDFReader` from :title:`LlamaIndex` 🦙 to manage " "your document loading." msgstr ":title:`LlamaIndex` 🦙 の専用 `PyMuPDFReader` を使用して、文書の読み込みを管理します。" -#: ../../rag.rst:58 64b07c5fa5494110911e682998ee7ca6 +#: ../../rag.rst:58 40923d58ee41475bb0ee10e7014a578a msgid "" "See `Building RAG from Scratch " "`_" @@ -103,11 +103,11 @@ msgstr "" "`_" " をご覧ください。" -#: ../../rag.rst:62 955d502129074b2c8fb6f7a9fc3df0a4 +#: ../../rag.rst:62 3055cf26690d4e289489b37eaf7b5333 msgid "Preparing Data for Chunking" msgstr "データのチャンキングの準備" -#: ../../rag.rst:64 c0aa532e08294b64a319ba28351e4980 +#: ../../rag.rst:64 e37920b16364455dad472a5c99218cda msgid "" "Chunking (or splitting) data is essential to give context to your " ":title:`LLM` data and with :title:`Markdown` output now supported by " @@ -122,11 +122,11 @@ msgstr "" "strategies-in-rag-notes-from-gregs-video-7b735895694d#b123>`_ " "がサポートされることを意味します。" -#: ../../rag.rst:71 6e9f40dfe36b4e979ad54d74ac49b588 +#: ../../rag.rst:71 9a8d957771b04869afd1441e12a280be msgid "Outputting as :title:`Markdown`" msgstr ":title:`Markdown` 形式で出力" -#: ../../rag.rst:73 5ebe999aae1d4280a49f362e8c98df2e +#: ../../rag.rst:73 6076246f267449deace88b822ddabfe0 #, fuzzy msgid "" "In order to export your document in :title:`Markdown` format you will " @@ -140,18 +140,18 @@ msgstr "" "は、各ページに対して標準テキストとテーブルテキストを統合されたMarkdown形式の文字列で出力する、|PyMuPDF| " "関数の高レベルなラッパーです。" -#: ../../rag.rst:87 c568327b53524b52adfa07243e7d0cba +#: ../../rag.rst:87 58590b8ebc244b9db1cc83c63adc2d1b #, fuzzy msgid "For further information please refer to: :doc:`pymupdf4llm/index`." msgstr "" "詳細については、次を参照してください: `pymupdf4llmのドキュメント " "`_。" -#: ../../rag.rst:91 5bc9a063eef74bb59525ea8258940c4d +#: ../../rag.rst:91 b32a1b079e794491a5e021d26fb18453 msgid "How to use :title:`Markdown` output" msgstr ":title:`Markdown` 出力の使用方法" -#: ../../rag.rst:93 541255844d5444e0af095ed416a53f3c +#: ../../rag.rst:93 8045470b5fa04886b83960e80fc71aae msgid "" "Once you have your data in :title:`Markdown` format you are ready to " "chunk/split it and supply it to your :title:`LLM`, for example, if this " @@ -160,7 +160,7 @@ msgstr "" ":title:`Markdown` 形式のデータが準備できたら、データをチャンク化/分割して :title:`LLM` " "に供給する準備が整います。例えば、:title:`LangChain` の場合は、次の手順を行います。" -#: ../../rag.rst:109 5c8fa8a3300a4c14b5b482cce05e741d +#: ../../rag.rst:109 4d0c5d7c2dc04c059fbdb5ad0709c2af msgid "" "For more see `5 Levels of Text Splitting `_" " を参照してください。" -#: ../../rag.rst:113 98f572f4e9144ea0b42dc6120ecfb497 +#: ../../rag.rst:113 896b1dd74ff24363becbdac98144b86c msgid "Related Blogs" msgstr "関連ブログ" -#: ../../rag.rst:115 0bca2292f16d4bf4b98296f9ee22df1a +#: ../../rag.rst:115 a036501ebb68414192f47e189aec5f3d msgid "" "To find out more about |PyMuPDF|, :title:`LLM` & :title:`RAG` check out " "our blogs for implementations & tutorials." @@ -182,17 +182,17 @@ msgstr "" "|PyMuPDF| 、 :title:`LLM` 、および :title:`RAG` " "について詳しく知りたい場合は、実装やチュートリアルに関するブログをチェックしてください。" -#: ../../rag.rst:119 c8d7f6fd882042649895107cb597934e +#: ../../rag.rst:119 a8b36bcfa4c746e4b21ffd62e4c38618 msgid "Methodologies to Extract Text" msgstr "テキストを抽出するための方法論" -#: ../../rag.rst:121 52dc74f018564ebc98b53bd28dc86240 +#: ../../rag.rst:121 f69b739e4b764e0b856de55aa7f97093 msgid "" "`Enhanced Text Extraction `_" msgstr "`テキスト抽出の強化 `_ " -#: ../../rag.rst:122 e495b248bc83443a9b3b969c4d0be098 +#: ../../rag.rst:122 3ae24a0e46354d408bcdaf4deb16af33 msgid "" "`Conversion to Markdown Text with PyMuPDF `_" @@ -200,11 +200,11 @@ msgstr "" "`PyMuPDFを使用したMarkdownテキストへの変換 `_" -#: ../../rag.rst:127 16faac60219a4c1cbc09da5212d905ca +#: ../../rag.rst:127 bbe057c5d511484c8b9bd0b656c6216c msgid "Create a Chatbot to discuss your documents" msgstr "文書を議論するためのチャットボットを作成する" -#: ../../rag.rst:129 62eb98c3df4943118965715f004b491b +#: ../../rag.rst:129 1255eb5a25064e6c8ae8ca5b8af9b0a4 msgid "" "`Make a simple command line Chatbot `_" @@ -212,7 +212,7 @@ msgstr "" "`シンプルなコマンドラインのチャットボットを作成するシンプルなコマンドラインのチャットボットを作成する `_" -#: ../../rag.rst:130 cfe692f5e4c54aac8c7c73c23be59272 +#: ../../rag.rst:130 569c7f488bc747a2801a4b6532a9c3dd msgid "" "`Make a Chatbot GUI `_" @@ -220,14 +220,13 @@ msgstr "" "`チャットボットGUIを作成する `_" -#: ../../footer.rst:60 dc73f90c9e0e41ecb3a92d670aaac3da +#: ../../footer.rst:60 45a2c818f8ae4c1fa455751e51ab3e21 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは、|version| までのすべてのバージョンをカバーしています。" -#: ../../footer.rst:-1 a810e0f1a9ba4e6d996a8ac59df4b0d8 -msgid "Discord logo" -msgstr "" - #~ msgid "If you need to export to :title:`Markdown`:" #~ msgstr ":title:`Markdown` にエクスポートする必要がある場合:" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/recipes-annotations.mo b/docs/locales/ja/LC_MESSAGES/recipes-annotations.mo index e1f354ebd..f2040cb9e 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes-annotations.mo and b/docs/locales/ja/LC_MESSAGES/recipes-annotations.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes-annotations.po b/docs/locales/ja/LC_MESSAGES/recipes-annotations.po index cea797406..a61441bca 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes-annotations.po +++ b/docs/locales/ja/LC_MESSAGES/recipes-annotations.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,31 +19,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 b30d67b84f874988a12b7a59b40f98d4 +#: ../../header.rst:-1 d1ad502e2163461abd37b8e0afad7b09 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 e854971fa5f9419ea68f3d4664a98d6b +#: ../../header.rst:-1 9b5018bc6d0347e3ac0dca7c86ee8578 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 b9e25d0af27e4e2c9bf9df2e5a941d69 +#: ../../header.rst:-1 9215720d8e8043e38ff196c7e9cfe5f0 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../recipes-annotations.rst:7 37a64cac46ad48f4ad05547164b55be6 +#: ../../recipes-annotations.rst:7 43c8624c55e14be2aac3624caf95357e msgid "Annotations" msgstr "注釈" -#: ../../recipes-annotations.rst:12 5cca87224cf34f69aa1b5460597f61eb +#: ../../recipes-annotations.rst:12 3eb67bbfa6584d6e8bfe087440a64e64 msgid "How to Add and Modify Annotations" msgstr "注釈の追加と変更方法" -#: ../../recipes-annotations.rst:14 f67b8eec6f82487c830bf5f84ace1934 +#: ../../recipes-annotations.rst:14 0e7efcdb24c74719b4c01251f4a59aa5 msgid "" "In |PyMuPDF|, new annotations can be added via :ref:`Page` methods. Once " "an annotation exists, it can be modified to a large extent using methods " @@ -52,69 +52,54 @@ msgstr "" "PyMuPDFでは、新しい注釈を :ref:`Page` メソッドを介して追加することができます。一度注釈が存在すると、 :ref:`Annot`" " クラスのメソッドを使用して大幅に変更できます。" -#: ../../recipes-annotations.rst:16 7dc16e88892b4f448beafe9df9df23da +#: ../../recipes-annotations.rst:16 2bf001f41c6b451b9937901bb58f7e23 msgid "" "Annotations can **only** be inserted in |PDF| pages - other document " "types do not support annotation insertion." -msgstr "⚠️" +msgstr "注釈は PDF ページにのみ 挿入可能です。他のドキュメント形式では、注釈の挿入はサポートされていません。" -#: ../../recipes-annotations.rst:18 6abc732997354a09847424a04739f839 +#: ../../recipes-annotations.rst:18 ba516eb1a56945e5a9bac7e9fa24fed1 msgid "" "In contrast to many other tools, initial insert of annotations happens " "with a minimum number of properties. We leave it to the programmer to " "e.g. set attributes like author, creation date or subject." msgstr "他の多くのツールとは異なり、注釈の初期挿入は最小限のプロパティで行われます。例えば、著者、作成日、サブジェクトなどの属性をプログラマーが設定することができます。" -#: ../../recipes-annotations.rst:20 e066a5f5812841d895a3389d272568a6 +#: ../../recipes-annotations.rst:20 bc78178891f1440fbfa8e0aaff01e11c msgid "" "As an overview for these capabilities, look at the following script that " "fills a PDF page with most of the available annotations. Look in the next" " sections for more special situations:" msgstr "これらの機能の概要については、次のスクリプトを参照してください。このスクリプトはPDFページに利用可能な注釈のほとんどを埋めるものです。より特殊な状況については、次のセクションをご覧ください。" -#: ../../recipes-annotations.rst:26 adc7f2f3b75447b19110233507e391aa +#: ../../recipes-annotations.rst:26 c8504dce5bb44372b1c68fe8f9b98fb7 msgid "This script should lead to the following output:" msgstr "このスクリプトは次のような出力を生成します:" -#: ../../recipes-annotations.rst:36 c4e5ef73955443b886830bf8202fab89 +#: ../../recipes-annotations.rst:36 96b9bb9ba45a444c973060143fc425cf msgid "How to Use FreeText" msgstr "FreeTextの使用方法" -#: ../../recipes-annotations.rst:37 d124bbc19dfe43d68b9d14f7a58d53b8 -#, fuzzy -msgid "This script shows a couple of ways to deal with 'FreeText' annotations:" +#: ../../recipes-annotations.rst:37 e91fc84e2d79457190b40cbf621719b3 +msgid "" +"This script shows a couple of basic ways to deal with 'FreeText' " +"annotations:" msgstr "このスクリプトは、'FreeText'注釈を扱ういくつかの方法を示しています::" -#: ../../recipes-annotations.rst:42 2f62b1fb5c7d4cd8935daa75d606d2fe +#: ../../recipes-annotations.rst:41 ../../recipes-annotations.rst:50 +#: 2cdef3691b1341f4a6850d9d8de067bb 350586a50d5144a2b8d9db627bd71e24 msgid "The result looks like this:" msgstr "結果は次のようになります。" -#: ../../recipes-annotations.rst:53 9466ac5175e74810ba6e82b977dd9336 -msgid "Using Buttons and JavaScript" -msgstr "ボタンとJavaScriptの使用" - -#: ../../recipes-annotations.rst:54 ef939135da674d19bfdcc86d6338d272 -msgid "" -"Since MuPDF v1.16, 'FreeText' annotations no longer support bold or " -"italic versions of the Times-Roman, Helvetica or Courier fonts." -msgstr "" -"MuPDF v1.16以降、'FreeText'注釈はもはやTimes-" -"Roman、Helvetica、Courierフォントの太字や斜体バージョンをサポートしていません。" - -#: ../../recipes-annotations.rst:56 6a1c6575e6254b3cb656369dcad43c3f -msgid "" -"A big **thank you** to our user `@kurokawaikki " -"`_, who contributed the following script" -" to **circumvent this restriction**." +#: ../../recipes-annotations.rst:46 e86ede73d664430791e03da9a5d63702 +msgid "Here is an example for using rich text and call-out lines:" msgstr "" -"この制限を回避するために、次のスクリプトを提供してくれたユーザー `@kurokawaikki " -"`_ さんに心から感謝します。" -#: ../../recipes-annotations.rst:67 367a6368d0ee421da20f4c14e848c83f +#: ../../recipes-annotations.rst:63 f49b197275794adaa27d02d5ac0b32cf msgid "How to Use Ink Annotations" msgstr "インク注釈の使用方法" -#: ../../recipes-annotations.rst:68 f50134d0461e4cddb8597f1f0c8bc79f +#: ../../recipes-annotations.rst:64 e0df9dc619c746da9593612a87cd3f0a msgid "" "Ink annotations are used to contain freehand scribbling. A typical " "example may be an image of your signature consisting of first name and " @@ -124,28 +109,48 @@ msgid "" "segments of the annotation." msgstr "インク注釈は、自由な手書きの落書きを含むために使用されます。典型的な例として、名前と姓からなる署名の画像が挙げられます。技術的には、インク注釈は点のリストのリストとして実装されます。各点のリストは、点を結んだ連続的な線と見なされます。異なる点のリストは、注釈の独立した線セグメントを表します。" -#: ../../recipes-annotations.rst:70 b2bc47c6d2b24e329d337add84016439 +#: ../../recipes-annotations.rst:66 dbdd441a25c44bd4aae5f2367cf85f3d #, fuzzy msgid "" "The following script creates an ink annotation with two mathematical " "curves (sine and cosine function graphs) as line segments:" msgstr "以下のスクリプトは、二つの数学的な曲線(正弦関数と余弦関数のグラフ)を線セグメントとして持つインク注釈を作成します::" -#: ../../recipes-annotations.rst:74 b9629efc3ae946618bc85c6ba3ce3433 +#: ../../recipes-annotations.rst:70 bb6171a96157475f875163c29bc8e76f msgid "This is the result:" msgstr "これが結果です:" -#: ../../footer.rst:60 63d20955ec094ccfb152012e24fc2a93 +#: ../../footer.rst:60 79b679f62bef466ea3444589a3f3ef6f msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 582357df2ef34c8c917bd85ea840e239 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Using Buttons and JavaScript" +#~ msgstr "ボタンとJavaScriptの使用" + +#~ msgid "" +#~ "Since MuPDF v1.16, 'FreeText' annotations " +#~ "no longer support bold or italic " +#~ "versions of the Times-Roman, Helvetica" +#~ " or Courier fonts." +#~ msgstr "" +#~ "MuPDF v1.16以降、'FreeText'注釈はもはやTimes-" +#~ "Roman、Helvetica、Courierフォントの太字や斜体バージョンをサポートしていません。" + +#~ msgid "" +#~ "A big **thank you** to our user" +#~ " `@kurokawaikki `_, " +#~ "who contributed the following script to" +#~ " **circumvent this restriction**." +#~ msgstr "" +#~ "この制限を回避するために、次のスクリプトを提供してくれたユーザー `@kurokawaikki " +#~ "`_ さんに心から感謝します。" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/recipes-common-issues-and-their-solutions.mo b/docs/locales/ja/LC_MESSAGES/recipes-common-issues-and-their-solutions.mo index 0de321fcf..df4c7069e 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes-common-issues-and-their-solutions.mo and b/docs/locales/ja/LC_MESSAGES/recipes-common-issues-and-their-solutions.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes-common-issues-and-their-solutions.po b/docs/locales/ja/LC_MESSAGES/recipes-common-issues-and-their-solutions.po index bdba00a48..2018b70e5 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes-common-issues-and-their-solutions.po +++ b/docs/locales/ja/LC_MESSAGES/recipes-common-issues-and-their-solutions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,34 +19,34 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 4a76b00bf3f94b92aa6e15008bdea8d2 +#: ../../header.rst:-1 4668aba35041418d9985c1a35575a6b3 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 f6be4c58da894389a9989bce78461185 +#: ../../header.rst:-1 1011e86add0c4e648dea40533c7fd1a2 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 1032198883c54b9781e642fbf016348c +#: ../../header.rst:-1 10324b8854a4413791056120093832e9 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #: ../../recipes-common-issues-and-their-solutions.rst:7 -#: 598d0669e14d401ab2f8eb16a4ff2978 +#: 20bc28cec0154c7c9136122bd912f369 msgid "Common Issues and their Solutions" msgstr "一般的な問題とその解決方法" #: ../../recipes-common-issues-and-their-solutions.rst:10 -#: 50abc29b848142f9a9b5b19ab45ac164 +#: 7f1290c0169445d78461fff755cfc034 msgid "How To Dynamically Clean Up Corrupt :title:`PDFs`" msgstr "壊れた |PDF| を動的にクリーンアップする方法" #: ../../recipes-common-issues-and-their-solutions.rst:12 -#: 960668afb53744c8a318fe8b1d3f1291 +#: ce6827f92d194d24abb5efce34f05be9 msgid "" "This shows a potential use of |PyMuPDF| with another Python PDF library " "(the excellent pure Python package `pdfrw " @@ -57,7 +57,7 @@ msgstr "" "を例として使用しています)と組み合わせてPyMuPDFを潜在的に使用する方法を示しています。" #: ../../recipes-common-issues-and-their-solutions.rst:14 -#: bd0506edf1e94e0d9b95e595244639bb +#: 4b79f85178e14c0bada317304b337db0 msgid "" "If a clean, non-corrupt / decompressed PDF is needed, one could " "dynamically invoke PyMuPDF to recover from many problems like so::" @@ -66,7 +66,7 @@ msgstr "" "解凍されていないPDFが必要な場合、次のようにしてPyMuPDFを動的に呼び出して多くの問題から回復することができます::" #: ../../recipes-common-issues-and-their-solutions.rst:50 -#: 26448ba640704cac88d38bde9eefb915 +#: e6d9c9e53bdc4e6ea4fff95948a77ce0 msgid "" "With the command line utility *pdftk* (`available " "`_ for Windows " @@ -83,12 +83,12 @@ msgstr "" "をご覧ください。ただし、stdinとstdoutを通信手段として使用して別のプロセスとしてsubprocess.Popenを介して呼び出す必要があります。" #: ../../recipes-common-issues-and-their-solutions.rst:55 -#: cbfb7ba21ad44b8aa2422b6bf3383a6b +#: 3f9ab9bf78a74d9781937269cf8ef3cb msgid "How to Convert Any Document to |PDF|" msgstr "どの文書も |PDF| に変換する方法" #: ../../recipes-common-issues-and-their-solutions.rst:57 -#: 85e15228bb8c44159db0e8bd685da285 +#: ca2811011d7b40808c8a55f65188b25f msgid "" "Here is a script that converts any |PyMuPDF| :ref:`supported " "document` to a |PDF|. These include XPS, EPUB, FB2," @@ -98,110 +98,43 @@ msgstr "" "文書をPDFに変換するスクリプトです。これにはXPS、EPUB、FB2、CBZ、および複数ページのTIFFイメージを含む画像フォーマットが含まれます。" #: ../../recipes-common-issues-and-their-solutions.rst:59 -#: 83284a29b4fd4c80b1d4edf149ce1744 +#: d7e2dfdcb75b40739daf46856a819f58 msgid "" "It features maintaining any metadata, table of contents and links " "contained in the source document::" msgstr "これにはソース文書に含まれるメタデータ、目次、リンクを保持する機能が備わっています::" #: ../../recipes-common-issues-and-their-solutions.rst:131 -#: eca2c26062b843b790749e318e5ccb23 -msgid "How to Deal with Messages Issued by :title:`MuPDF`" -msgstr ":title:`MuPDF` から発行されるメッセージの処理方法" - -#: ../../recipes-common-issues-and-their-solutions.rst:133 -#: ed27c8192a46446fb33a69d06afdb9b8 -msgid "" -"Since |PyMuPDF| v1.16.0, **error messages** issued by the underlying " -":title:`MuPDF` library are being redirected to the Python standard device" -" *sys.stderr*. So you can handle them like any other output going to this" -" devices." -msgstr "" -"PyMuPDF v1.16.0以降、基盤となるMuPDFライブラリから発行されるエラーメッセージは、Python標準デバイス " -"*sys.stderr* にリダイレクトされます。したがって、これらのメッセージはこのデバイスに出力される他の出力と同様に扱うことができます。" - -#: ../../recipes-common-issues-and-their-solutions.rst:135 -#: c8e895d1ded94b2d84a469ead0480115 -msgid "" -"In addition, these messages go to the internal buffer together with any " -":title:`MuPDF` warnings -- see below." -msgstr "さらに、これらのメッセージはMuPDFの警告とともに内部バッファに送られます - 以下を参照してください。" - -#: ../../recipes-common-issues-and-their-solutions.rst:137 -#: ca239a1faf98453ab35cac85353a00ad -msgid "" -"We always prefix these messages with an identifying string *\"mupdf:\"*. " -"If you prefer to not see recoverable MuPDF errors at all, issue the " -"command `pymupdf.TOOLS.mupdf_display_errors(False)`." -msgstr "" -"これらのメッセージは常に識別用の文字列 `\"mupdf:\"` で始まります。復旧可能なMuPDFエラーを全く表示したくない場合は、コマンド " -"`pymupdf.TOOLS.mupdf_display_errors(False)` を発行してください。" - -#: ../../recipes-common-issues-and-their-solutions.rst:140 -#: a5012ed81a07428ea3ef464155aad1a2 -msgid "" -"MuPDF warnings continue to be stored in an internal buffer and can be " -"viewed using :meth:`Tools.mupdf_warnings`." -msgstr "MuPDFの警告は引き続き内部バッファに保存され、 :meth:`Tools.mupdf_warnings` を使用して表示できます。" - -#: ../../recipes-common-issues-and-their-solutions.rst:142 -#: b805d2e264d24c15858f296533e18ab6 -msgid "" -"Please note that MuPDF errors may or may not lead to Python exceptions. " -"In other words, you may see error messages from which MuPDF can recover " -"and continue processing." -msgstr "MuPDFのエラーがPython例外につながる場合とつながらない場合があることに注意してください。言い換えれば、MuPDFが回復して処理を続けることができるエラーメッセージが表示される可能性があります。" - -#: ../../recipes-common-issues-and-their-solutions.rst:144 -#: 05f4c85ec19c4fc19028454e46907c8c -msgid "" -"Example output for a **recoverable error**. We are opening a damaged PDF," -" but MuPDF is able to repair it and gives us a little information on what" -" happened. Then we illustrate how to find out whether the document can " -"later be saved incrementally. Checking the :attr:`Document.is_dirty` " -"attribute at this point also indicates that during `pymupdf.open` the " -"document had to be repaired:" -msgstr "" -"回復可能なエラーの例出力です。損傷したPDFを開いていますが、MuPDFはそれを修復し、何が起こったかに関する少しの情報を提供しています。その後、ドキュメントが後で増分保存できるかどうかを調べる方法も示しています。この時点で" -" :attr:`Document.is_dirty` 属性をチェックすることも、 `pymupdf.open` " -"の際にドキュメントを修復する必要があったことを示しています::" - -#: ../../recipes-common-issues-and-their-solutions.rst:165 -#: 3839e4baa4a245eabad26a3348faad7a -msgid "Example output for an **unrecoverable error**:" -msgstr "**復旧できないエラー**の例出力:" - -#: ../../recipes-common-issues-and-their-solutions.rst:181 -#: 0879feeb3b384d7b9b7e78881e9a6d16 +#: a41bc630ff314f64bcfa4150a08c3c84 msgid "Changing Annotations: Unexpected Behaviour" msgstr "注釈の変更:予期しない動作" -#: ../../recipes-common-issues-and-their-solutions.rst:184 -#: e8073de2ac554ff09ab8a3b10e6e68d6 +#: ../../recipes-common-issues-and-their-solutions.rst:134 +#: 9b87b714c12948aa94ae2868604c760c msgid "Problem" msgstr "問題" -#: ../../recipes-common-issues-and-their-solutions.rst:185 -#: fb532abf0e604121ade6844861ee144d +#: ../../recipes-common-issues-and-their-solutions.rst:135 +#: 5870f9a9b1184a3cb1849e71b71e5026 msgid "There are two scenarios:" msgstr "2つのシナリオがあります:" -#: ../../recipes-common-issues-and-their-solutions.rst:187 -#: 24aaaffb30d340cda6555bf86d9cb93a +#: ../../recipes-common-issues-and-their-solutions.rst:137 +#: b360eb295e35468b9a48ce456cc717e7 msgid "" "**Updating** an annotation with PyMuPDF which was created by some other " "software." msgstr "他のソフトウェアで作成された注釈をPyMuPDFで**更新**する。" -#: ../../recipes-common-issues-and-their-solutions.rst:188 -#: c73dfe6ab16a49ab9ceb7a4fda87bdd0 +#: ../../recipes-common-issues-and-their-solutions.rst:138 +#: c2f4bd673f784318906b6982c2873fdf msgid "" "**Creating** an annotation with PyMuPDF and later changing it with some " "other software." msgstr "PyMuPDFで注釈を**作成**し、後で他のソフトウェアで変更する。" -#: ../../recipes-common-issues-and-their-solutions.rst:190 -#: 8f053d4069084176b090587ae93470bb +#: ../../recipes-common-issues-and-their-solutions.rst:140 +#: 3a2c5f9ca0da4058b2119d1e5ee6432c msgid "" "In both cases you may experience unintended changes, like a different " "annotation icon or text font, the fill color or line dashing have " @@ -209,16 +142,16 @@ msgid "" "disappeared too, etc." msgstr "どちらの場合でも、異なる注釈アイコンやテキストフォント、塗りつぶしの色や線の破線が消えたり、線の端のシンボルのサイズが変わったり、さらには消えたりするなど、意図しない変更が発生する可能性があります。" -#: ../../recipes-common-issues-and-their-solutions.rst:193 -#: ../../recipes-common-issues-and-their-solutions.rst:232 -#: ../../recipes-common-issues-and-their-solutions.rst:245 -#: 9df2fa82be814e5fbbbaccf28970a510 a1397594ffcc4b9083f08d3f70bd59fb -#: f07ae0882e5f42ac8c56a9dcfe8b509b +#: ../../recipes-common-issues-and-their-solutions.rst:143 +#: ../../recipes-common-issues-and-their-solutions.rst:182 +#: ../../recipes-common-issues-and-their-solutions.rst:195 +#: 0ec3d7b289ed40d1b1c9a6e6509cb81c 3db222ba67d34ffe8b9c76049639a28f +#: 4947608029184f4eacde97cb22e6b0a0 msgid "Cause" msgstr "原因" -#: ../../recipes-common-issues-and-their-solutions.rst:194 -#: e3091a6ad010460e94824696b3fc3b23 +#: ../../recipes-common-issues-and-their-solutions.rst:144 +#: 580b99ed7b294df89844c876e4930bb6 msgid "" "Annotation maintenance is handled differently by each PDF maintenance " "application. Some annotation types may not be supported, or not be " @@ -226,16 +159,16 @@ msgid "" " another application. **There is no standard.**" msgstr "注釈の保守は、各PDF保守アプリケーションごとに異なる方法で処理されます。一部の注釈タイプはサポートされないか、完全にはサポートされていない場合もあり、また、他のアプリケーションとは異なる方法で詳細が処理される場合もあります。標準規格は存在しません。" -#: ../../recipes-common-issues-and-their-solutions.rst:196 -#: ec8ab891c1e840dfa2c8e7cdf1fe49c6 +#: ../../recipes-common-issues-and-their-solutions.rst:146 +#: 0d39ed4b97424a2a87eb4bec722728b0 msgid "" "Almost always a PDF application also comes with its own icons (file " "attachments, sticky notes and stamps) and its own set of supported text " "fonts. For example:" msgstr "ほとんどの場合、PDFアプリケーションには独自のアイコン(ファイル添付、付箋、スタンプなど)とサポートされるテキストフォントのセットが付属しています。例えば:" -#: ../../recipes-common-issues-and-their-solutions.rst:198 -#: e12ea3f137f9462e8cafca4e2769d79b +#: ../../recipes-common-issues-and-their-solutions.rst:148 +#: 65134846c0a240acb342d722b107de3f msgid "" "(Py-) MuPDF only supports these 5 basic fonts for 'FreeText' annotations:" " Helvetica, Times-Roman, Courier, ZapfDingbats and Symbol -- no italics /" @@ -247,8 +180,8 @@ msgstr "" "Roman、Courier、ZapfDingbats、Symbol - 斜体や太字のバリエーションはありません。他のアプリで作成された " "'FreeText' 注釈を変更する際、そのフォントはおそらく認識されず、Helveticaに置き換えられる可能性があります。" -#: ../../recipes-common-issues-and-their-solutions.rst:200 -#: e24080f0c7ba4211a995d6a114dffe9c +#: ../../recipes-common-issues-and-their-solutions.rst:150 +#: e2cbd8bfb3d14500a0612d1d8d2c5ec6 msgid "" "PyMuPDF supports all PDF text markers (highlight, underline, strikeout, " "squiggly), but these types cannot be updated with Adobe Acrobat Reader." @@ -256,37 +189,37 @@ msgstr "" "PyMuPDFはすべてのPDFテキストマーカー(ハイライト、下線、取り消し線、波線)をサポートしていますが、これらのタイプはAdobe " "Acrobat Readerで更新することはできません。" -#: ../../recipes-common-issues-and-their-solutions.rst:202 -#: 6b520fe7d6ca43269f1d0a3af9a316fc +#: ../../recipes-common-issues-and-their-solutions.rst:152 +#: 5f42aed9c005492a92b5b6aa0cbcd03e msgid "" "In most cases there also exists limited support for line dashing which " "causes existing dashes to be replaced by straight lines. For example:" msgstr "ほとんどの場合、破線には限定的なサポートが存在し、既存の破線が直線に置き換えられることがあります。例えば:" -#: ../../recipes-common-issues-and-their-solutions.rst:204 -#: 789157f2b8324c9a862233cb4d634ec3 +#: ../../recipes-common-issues-and-their-solutions.rst:154 +#: 7651dba336694614afc84cba3418f5cc msgid "" "PyMuPDF fully supports all line dashing forms, while other viewers only " "accept a limited subset." msgstr "PyMuPDFはすべての線の破線形式を完全にサポートしていますが、他のビューアは一部の形式しか受け入れません。" -#: ../../recipes-common-issues-and-their-solutions.rst:208 -#: 10a02bff6f4e4ca498c5feb516c8ad17 +#: ../../recipes-common-issues-and-their-solutions.rst:158 +#: 01eaf095c9b6491d88ab187baa0e5739 msgid "Solutions" msgstr "解決策" -#: ../../recipes-common-issues-and-their-solutions.rst:209 -#: f5579bccc09649d4bf04c5a8ceb344d9 +#: ../../recipes-common-issues-and-their-solutions.rst:159 +#: ecb162091bfd40ba807179842faf6a91 msgid "Unfortunately there is not much you can do in most of these cases." msgstr "残念ながら、これらの多くの場合、あまり対処できることはありません。" -#: ../../recipes-common-issues-and-their-solutions.rst:211 -#: a483556c3acf4bf381a4c176ff6bf9a1 +#: ../../recipes-common-issues-and-their-solutions.rst:161 +#: f4ff16b309524593aafb3a90fa47384c msgid "Stay with the same software for **creating and changing** an annotation." msgstr "注釈の作成と変更に同じソフトウェアを使用してください。" -#: ../../recipes-common-issues-and-their-solutions.rst:212 -#: 732771af92d54ff9898772c9421bba3e +#: ../../recipes-common-issues-and-their-solutions.rst:162 +#: ddc8bae66d8249efbc79df236e51d0d0 msgid "" "When using PyMuPDF to change an \"alien\" annotation, try to **avoid** " ":meth:`Annot.update`. The following methods **can be used without it,** " @@ -295,50 +228,51 @@ msgstr "" "\"異なる\"注釈を変更する際にPyMuPDFを使用する場合、:meth:`Annot.update` " "を避けるようにしてください。次のメソッドは、元の外観を維持するために、:meth:`Annot.update` を使用せずに使用できます:" -#: ../../recipes-common-issues-and-their-solutions.rst:214 -#: eb25b55aebb849108fb2dff02af57865 +#: ../../recipes-common-issues-and-their-solutions.rst:164 +#: 57c092ce6a7d45d4952de8c67279fa4f msgid ":meth:`Annot.set_rect` (location changes)" msgstr ":meth:`Annot.set_rect` (位置の変更)" -#: ../../recipes-common-issues-and-their-solutions.rst:215 -#: f73f9469982443eba228271c6fea8ef0 +#: ../../recipes-common-issues-and-their-solutions.rst:165 +#: d313ef9ae75449729e1849ab57d05a32 msgid ":meth:`Annot.set_flags` (annotation behaviour)" msgstr ":meth:`Annot.set_flags` (注釈の動作)" -#: ../../recipes-common-issues-and-their-solutions.rst:216 -#: 097edbd2431c4b31b705286ea19abdb9 +#: ../../recipes-common-issues-and-their-solutions.rst:166 +#: ff9f33feb2224cd69192417071637524 msgid ":meth:`Annot.set_info` (meta information, except changes to *content*)" msgstr ":meth:`Annot.set_info` (メタ情報、*コンテンツ* の変更以外)" -#: ../../recipes-common-issues-and-their-solutions.rst:217 -#: 948d37d70a994b6eaaa89bf0f01bca5c +#: ../../recipes-common-issues-and-their-solutions.rst:167 +#: 90c72eaaebfa4a848238a0cd487b74e6 msgid ":meth:`Annot.set_popup` (create popup or change its rect)" msgstr ":meth:`Annot.set_popup` (ポップアップの作成または位置の変更)" -#: ../../recipes-common-issues-and-their-solutions.rst:218 -#: 185d9a2b08784af6acb6de3087585191 +#: ../../recipes-common-issues-and-their-solutions.rst:168 +#: fea8fa06e33040f2b13ce9a7b5306f8f +#, fuzzy msgid "" -":meth:`Annot.set_optional_content` (add / remove reference to optional " -"content information)" +":meth:`Annot.set_oc` (add / remove reference to optional content " +"information)" msgstr ":meth:`Annot.set_optional_content` (オプションコンテンツ情報への参照の追加/削除)" -#: ../../recipes-common-issues-and-their-solutions.rst:219 -#: 5f2e1e918a47471d8b83edc4b3671bba +#: ../../recipes-common-issues-and-their-solutions.rst:169 +#: cee27cf68bda482690d014a3468ad911 msgid ":meth:`Annot.set_open`" msgstr "" -#: ../../recipes-common-issues-and-their-solutions.rst:220 -#: d72efcd45bc54232b962d8fbf403123f +#: ../../recipes-common-issues-and-their-solutions.rst:170 +#: 85c766ba5c7c4ec9a875af07684f5f8f msgid ":meth:`Annot.update_file` (file attachment changes)" msgstr ":meth:`Annot.update_file` (ファイル添付の変更)" -#: ../../recipes-common-issues-and-their-solutions.rst:224 -#: bd921b674bbf48d9b6095929db1fb853 +#: ../../recipes-common-issues-and-their-solutions.rst:174 +#: 6e6d7441feb444b08da4f309c51f2989 msgid "Missing or Unreadable Extracted Text" msgstr "欠落または読み取り不可能な抽出テキスト" -#: ../../recipes-common-issues-and-their-solutions.rst:225 -#: cceafca488094bee9c2bac66938738e0 +#: ../../recipes-common-issues-and-their-solutions.rst:175 +#: 01ae9eb704e14a1e8f24cf021dc91c0e msgid "" "Fairly often, text extraction does not work text as you would expect: " "text may be missing, or may not appear in the reading sequence visible on" @@ -346,27 +280,27 @@ msgid "" "symbol), etc. This can be caused by a number of different problems." msgstr "非常にしばしば、テキスト抽出が期待通りに機能しないことがあります。テキストが欠落しているか、画面上で表示される読み取り順序に表示されないか、文字が文字化けしている(「?」や「TOFU」シンボルなど)ことがあります。これはさまざまな問題が原因で起こる可能性があります。" -#: ../../recipes-common-issues-and-their-solutions.rst:228 -#: c799fbb8e3a24b449a5114569f0eb9a6 +#: ../../recipes-common-issues-and-their-solutions.rst:178 +#: e80411b38d4845d9b2714609a65db94c msgid "Problem: no text is extracted" msgstr "問題:テキストが抽出されない" -#: ../../recipes-common-issues-and-their-solutions.rst:229 -#: d3ef157b73684f088d13444112539a6f +#: ../../recipes-common-issues-and-their-solutions.rst:179 +#: 29d32a1dea084e1886b86272d02868c8 msgid "" "Your PDF viewer does display text, but you cannot select it with your " "cursor, and text extraction delivers nothing." msgstr "PDFビューアはテキストを表示しているが、カーソルで選択できず、テキストの抽出結果が何も表示されない。" -#: ../../recipes-common-issues-and-their-solutions.rst:233 -#: 9de39bc31c60459995f132966be968da +#: ../../recipes-common-issues-and-their-solutions.rst:183 +#: 407916e2cc0148868141e8b6e9837feb msgid "" "You may be looking at an image embedded in the PDF page (e.g. a scanned " "PDF)." msgstr "PDFページに埋め込まれた画像を表示している可能性がある(例:スキャンされたPDF)。" -#: ../../recipes-common-issues-and-their-solutions.rst:234 -#: 5ae6d86e441643078b049ddd31586262 +#: ../../recipes-common-issues-and-their-solutions.rst:184 +#: 94397a359e604251a6ce3e563fe0ef48 msgid "" "The PDF creator used no font, but **simulated** text by painting it, " "using little lines and curves. E.g. a capital \"D\" could be painted by a" @@ -374,14 +308,14 @@ msgid "" "on." msgstr "PDFの作成者がフォントを使用せず、テキストをペイントして小さな線と曲線を使用して模倣している場合がある。たとえば、大文字の「D」は縦棒「|」と左開きの半円で描かれ、「o」は楕円で描かれるなど。" -#: ../../recipes-common-issues-and-their-solutions.rst:237 -#: ../../recipes-common-issues-and-their-solutions.rst:250 -#: 39a25d82ca4343f4a4bafaf6d689c1ef 3daf9cb2cbfd4c4381a2f854fa891bdb +#: ../../recipes-common-issues-and-their-solutions.rst:187 +#: ../../recipes-common-issues-and-their-solutions.rst:200 +#: 4fedb4cf875041c2a5e70dae89f7991f fb8a38a5ca084321aac57be8d1ebb7bb msgid "Solution" msgstr "解決策" -#: ../../recipes-common-issues-and-their-solutions.rst:238 -#: 6d158d99a4ca4888bb3e03e7f20cd617 +#: ../../recipes-common-issues-and-their-solutions.rst:188 +#: 3ab64c25a2be4f59907562b0f68b24dc msgid "" "Use an OCR software like `OCRmyPDF `_" " to insert a hidden text layer underneath the visible page. The resulting" @@ -390,20 +324,20 @@ msgstr "" "`OCRmyPDF `_ " "のようなOCRソフトウェアを使用して、表示ページの下に非表示のテキストレイヤーを挿入します。その結果のPDFは期待どおりに動作するはずです。" -#: ../../recipes-common-issues-and-their-solutions.rst:241 -#: 5be38868fb1b40feb213cf544ef8a67e +#: ../../recipes-common-issues-and-their-solutions.rst:191 +#: a8f6e51df1dc464fbb0f7475eba7a54b msgid "Problem: unreadable text" msgstr "問題:読み取れないテキスト" -#: ../../recipes-common-issues-and-their-solutions.rst:242 -#: 3ff21051c06e4901bc605d24ab426342 +#: ../../recipes-common-issues-and-their-solutions.rst:192 +#: 7e6f3f7dc9964fac985a7fb4c533b3f2 msgid "" "Text extraction does not deliver the text in readable order, duplicates " "some text, or is otherwise garbled." msgstr "テキストの抽出が読みやすい順序で行われず、一部のテキストが重複しているか、その他の理由で文字化けしている。" -#: ../../recipes-common-issues-and-their-solutions.rst:246 -#: e965061132ac41409ed04dd5f2db8b31 +#: ../../recipes-common-issues-and-their-solutions.rst:196 +#: 060884ca10f34a9fa6daba7b2794c592 msgid "" "The single characters are readable as such (no \"\" symbols), but the " "sequence in which the text is **coded in the file** deviates from the " @@ -411,8 +345,8 @@ msgid "" "data against unwanted copies." msgstr "個々の文字はそのまま読み取れるが(「」シンボルがない)、テキストがファイル内でコード化された順序が読み取り順序と異なる場合がある。その背後には技術的な問題やデータの不正なコピーからの保護がある可能性がある。" -#: ../../recipes-common-issues-and-their-solutions.rst:247 -#: ee53f1d5b3d84c5694b505a7623390a9 +#: ../../recipes-common-issues-and-their-solutions.rst:197 +#: 99dd9930809d4551bfe5d806b32e28bc msgid "" "Many \"\" symbols occur, indicating MuPDF could not interpret these " "characters. The font may indeed be unsupported by MuPDF, or the PDF " @@ -420,26 +354,22 @@ msgid "" " obfuscates the originating corresponding unicode character." msgstr "多くの「」シンボルが表示され、MuPDFがこれらの文字を解釈できないことを示している場合。フォントがMuPDFでサポートされていない可能性があるか、PDFの作成者が読み取り可能なテキストを表示するフォントを使用しているが、意図的に元の対応するUnicode文字を曖昧にしている場合があります。" -#: ../../recipes-common-issues-and-their-solutions.rst:251 -#: 7cd3ef6dc8b64a29bff55764e4d8f5c1 +#: ../../recipes-common-issues-and-their-solutions.rst:201 +#: 7e9a1b033ba149c29732bf6d66164707 msgid "Use layout preserving text extraction: `python -m fitz gettext file.pdf`." msgstr "レイアウトを保持するテキスト抽出を使用します: `python -m fitz gettext file.pdf`。" -#: ../../recipes-common-issues-and-their-solutions.rst:252 -#: cf96a6ef7fe9404eaff75ed1854c9a14 +#: ../../recipes-common-issues-and-their-solutions.rst:202 +#: 05bbf78e0c8c447794e360a1dda9f6df msgid "" "If other text extraction tools also don't work, then the only solution " "again is OCRing the page." msgstr "他のテキスト抽出ツールも機能しない場合は、再びOCRでページを処理するのが唯一の解決策です。" -#: ../../footer.rst:60 a3d31e7092684eaf823f9e7cb492ce42 +#: ../../footer.rst:60 8010577d7dfe46e7ab6edda3adc1976a msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 d7c4e9584b4141b086394d26afc41b7a -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" @@ -529,7 +459,7 @@ msgstr "" #~ msgstr "v1.16.0以降、プロパティPage.is_wrappedがあり、ページの内容がその文字列ペアでラップされているかどうかを確認できます。" #~ msgid "" -#~ "If it is *False* or if you " +#~ "If it is ``False`` or if you " #~ "want to be on the safe side, " #~ "pick one of the following:" #~ msgstr "それが `False` であるか、安全側に立ちたい場合、次のいずれかを選択してください:" @@ -612,3 +542,73 @@ msgstr "" #~ msgid "We recommend the following snippet to get the situation under control:" #~ msgstr "次のスニペットを使用して状況をコントロールすることをお勧めします:" +#~ msgid "How to Deal with Messages Issued by :title:`MuPDF`" +#~ msgstr ":title:`MuPDF` から発行されるメッセージの処理方法" + +#~ msgid "" +#~ "Since |PyMuPDF| v1.16.0, **error messages**" +#~ " issued by the underlying :title:`MuPDF`" +#~ " library are being redirected to the" +#~ " Python standard device *sys.stderr*. So" +#~ " you can handle them like any " +#~ "other output going to this devices." +#~ msgstr "" +#~ "PyMuPDF v1.16.0以降、基盤となるMuPDFライブラリから発行されるエラーメッセージは、Python標準デバイス" +#~ " *sys.stderr* " +#~ "にリダイレクトされます。したがって、これらのメッセージはこのデバイスに出力される他の出力と同様に扱うことができます。" + +#~ msgid "" +#~ "In addition, these messages go to " +#~ "the internal buffer together with any" +#~ " :title:`MuPDF` warnings -- see below." +#~ msgstr "さらに、これらのメッセージはMuPDFの警告とともに内部バッファに送られます - 以下を参照してください。" + +#~ msgid "" +#~ "We always prefix these messages with " +#~ "an identifying string *\"mupdf:\"*. If " +#~ "you prefer to not see recoverable " +#~ "MuPDF errors at all, issue the " +#~ "command `pymupdf.TOOLS.mupdf_display_errors(False)`." +#~ msgstr "" +#~ "これらのメッセージは常に識別用の文字列 `\"mupdf:\"` " +#~ "で始まります。復旧可能なMuPDFエラーを全く表示したくない場合は、コマンド " +#~ "`pymupdf.TOOLS.mupdf_display_errors(False)` を発行してください。" + +#~ msgid "" +#~ "MuPDF warnings continue to be stored " +#~ "in an internal buffer and can be" +#~ " viewed using :meth:`Tools.mupdf_warnings`." +#~ msgstr "MuPDFの警告は引き続き内部バッファに保存され、 :meth:`Tools.mupdf_warnings` を使用して表示できます。" + +#~ msgid "" +#~ "Please note that MuPDF errors may " +#~ "or may not lead to Python " +#~ "exceptions. In other words, you may " +#~ "see error messages from which MuPDF " +#~ "can recover and continue processing." +#~ msgstr "MuPDFのエラーがPython例外につながる場合とつながらない場合があることに注意してください。言い換えれば、MuPDFが回復して処理を続けることができるエラーメッセージが表示される可能性があります。" + +#~ msgid "" +#~ "Example output for a **recoverable " +#~ "error**. We are opening a damaged " +#~ "PDF, but MuPDF is able to repair" +#~ " it and gives us a little " +#~ "information on what happened. Then we" +#~ " illustrate how to find out whether" +#~ " the document can later be saved " +#~ "incrementally. Checking the " +#~ ":attr:`Document.is_dirty` attribute at this " +#~ "point also indicates that during " +#~ "`pymupdf.open` the document had to be" +#~ " repaired:" +#~ msgstr "" +#~ "回復可能なエラーの例出力です。損傷したPDFを開いていますが、MuPDFはそれを修復し、何が起こったかに関する少しの情報を提供しています。その後、ドキュメントが後で増分保存できるかどうかを調べる方法も示しています。この時点で" +#~ " :attr:`Document.is_dirty` 属性をチェックすることも、 `pymupdf.open`" +#~ " の際にドキュメントを修復する必要があったことを示しています::" + +#~ msgid "Example output for an **unrecoverable error**:" +#~ msgstr "**復旧できないエラー**の例出力:" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/recipes-drawing-and-graphics.mo b/docs/locales/ja/LC_MESSAGES/recipes-drawing-and-graphics.mo index f1815206f..91b8e3020 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes-drawing-and-graphics.mo and b/docs/locales/ja/LC_MESSAGES/recipes-drawing-and-graphics.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes-drawing-and-graphics.po b/docs/locales/ja/LC_MESSAGES/recipes-drawing-and-graphics.po index 6bf96f014..d3271a98c 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes-drawing-and-graphics.po +++ b/docs/locales/ja/LC_MESSAGES/recipes-drawing-and-graphics.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,44 +19,44 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 59f4cac3e4f14bfca0a0dfba3746a8c6 +#: ../../header.rst:-1 cb49434c487144e990e8778af438e31c msgid "Artifex" msgstr "" -#: ../../header.rst:-1 bf599dd936654a30864e9fd2daba8fad +#: ../../header.rst:-1 b51ec2c5bec0471caa6c704e84d440e8 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 83179227ff46400db9fe7dfafcfe04b0 +#: ../../header.rst:-1 5049a6512fcf48e592552896861b4264 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../recipes-drawing-and-graphics.rst:7 4b286e295a484e81a84515d5d3e0094d +#: ../../recipes-drawing-and-graphics.rst:7 c0b1ffca482b4acc93f866d4c279b9d4 msgid "Drawing and Graphics" msgstr "描画とグラフィックス" -#: ../../recipes-drawing-and-graphics.rst:11 95cdf4a4c103444ebe938abef842d057 +#: ../../recipes-drawing-and-graphics.rst:11 cead69fa4d944be19c81d6669a194971 msgid "" "When the terms \"Drawings\" or \"Graphics\" are mentioned here we are " "referring to \"Vector Graphics\" or \"Line Art\"." msgstr "ここで「Drawings」や「Graphics」という用語が言及されている場合、それは「ベクトルグラフィックス」や「線画」を指しています。" -#: ../../recipes-drawing-and-graphics.rst:13 4f851f467f2d4b9a9fc7139ab87ea710 +#: ../../recipes-drawing-and-graphics.rst:13 688ad77eb281436f8d8c2e421a35ccae msgid "Therefore please consider these terms as being synonymous!" msgstr "したがって、これらの用語を同義語として考えてください。" -#: ../../recipes-drawing-and-graphics.rst:16 d6999484bd4d4b79ac0422c98d0eecf0 +#: ../../recipes-drawing-and-graphics.rst:16 d4e85709e4c54144a43b7930cee0c0b5 msgid "" "PDF files support elementary drawing operations as part of their syntax. " "These are **vector graphics** and include basic geometrical objects like " "lines, curves, circles, rectangles including specifying colors." msgstr "PDFファイルは、その構文の一部として基本的な描画操作をサポートしています。これらは**ベクトルグラフィックス**であり、線、曲線、円、長方形などの基本的な幾何学的オブジェクトを含み、色の指定も可能です。" -#: ../../recipes-drawing-and-graphics.rst:18 6c00375b63f842218c599b6b49ddbaee +#: ../../recipes-drawing-and-graphics.rst:18 9cd89e5c62e34160bf2adcbf9cb4d393 msgid "" "The syntax for such operations is defined in \"A Operator Summary\" on " "page 643 of the :ref:`AdobeManual`. Specifying these operators for a PDF " @@ -66,7 +66,7 @@ msgstr "" "Summary」のページ643で定義されています。PDFページのためのこれらのオペレータは、その内容 " "(:data:`contents`)オブジェクト内で指定されます。" -#: ../../recipes-drawing-and-graphics.rst:20 f1e9321cbe7043758b4a594d5cd0b8b2 +#: ../../recipes-drawing-and-graphics.rst:20 4a3ebf96479040d49b72aa665e43f8a3 msgid "" "|PyMuPDF| implements a large part of the available features via its " ":ref:`Shape` class, which is comparable to notions like \"canvas\" in " @@ -75,7 +75,7 @@ msgstr "" "PyMuPDFは、 :ref:`Shape` クラスを介して利用可能な多くの機能を実装しており、これは他のパッケージ(例: `reportlab " "`_ など)の「キャンバス」のような概念と類似しています。" -#: ../../recipes-drawing-and-graphics.rst:22 e2eaa8df53b147a0b2bf125e380c81ae +#: ../../recipes-drawing-and-graphics.rst:22 1bcec4ef8d0a4c69a61128221389abfa msgid "" "A shape is always created as a **child of a page**, usually with an " "instruction like `shape = page.new_shape()`. The class defines numerous " @@ -88,7 +88,7 @@ msgstr "" " shape.draw_rect(rect)` は、適切に定義された `rect = pymupdf.Rect(…)` " "の境界に沿って四角形を描画します。" -#: ../../recipes-drawing-and-graphics.rst:24 48d720a104d04d9c9b7cdf9467eefe0f +#: ../../recipes-drawing-and-graphics.rst:24 522b5200167c42fc91bcda96ab482884 msgid "" "The returned *last_point* **always** is the :ref:`Point` where drawing " "operation ended (\"last point\"). Every such elementary drawing requires " @@ -99,7 +99,7 @@ msgstr "" "(「最後のポイント」)です。このような基本的な描画ごとに、それを「閉じる」ために :meth:`Shape.finish` " "が必要ですが、1つの共通の``finish()``メソッドを持つ複数の描画があるかもしれません。" -#: ../../recipes-drawing-and-graphics.rst:26 ac46898bacd949ebb3cd5385fb039506 +#: ../../recipes-drawing-and-graphics.rst:26 a1a6cf576e374185b575ac29ef915ceb msgid "" "In fact, :meth:`Shape.finish` *defines* a group of preceding draw " "operations to form one -- potentially rather complex -- graphics object. " @@ -114,25 +114,25 @@ msgstr "" "Utilities/blob/master/shapes/shapes_and_symbols.py>`_ " "内のいくつかの事前定義されたグラフィックスを提供しています。" -#: ../../recipes-drawing-and-graphics.rst:28 328ce6db0a3241d1aad696f89e34d1b1 +#: ../../recipes-drawing-and-graphics.rst:28 6682ec89ed0243e1a7c05a40ab825358 msgid "" "If you import this script, you can also directly use its graphics as in " "the following example::" msgstr "このスクリプトをインポートすると、次の例のようにそのグラフィックスを直接使用することもできます::" -#: ../../recipes-drawing-and-graphics.rst:86 82d61f734dda4b9ebef7cb28a5334862 +#: ../../recipes-drawing-and-graphics.rst:86 ccbd2af5bfaa46dcbe5f2f15e412fc23 msgid "This is the script's outcome:" msgstr "これがスクリプトの結果です:" -#: ../../recipes-drawing-and-graphics.rst:97 35e0dc3bc8a94d81a69ffcaf89be11e5 +#: ../../recipes-drawing-and-graphics.rst:97 65b162adbc52489e95a0170bada6afe9 msgid "How to Extract Drawings" msgstr "描画の抽出方法" -#: ../../recipes-drawing-and-graphics.rst:99 c0b10066311e4cc2b00e40d590fd0555 +#: ../../recipes-drawing-and-graphics.rst:99 8373533f008548a89798eddeba96f9d8 msgid "New in v1.18.0" msgstr "v1.18.0で新登場" -#: ../../recipes-drawing-and-graphics.rst:101 c72e626e224345d281bc7ad6a03849ed +#: ../../recipes-drawing-and-graphics.rst:101 0acd4de5d8554ebaa10b1347a50cf1de msgid "" "Drawing commands (**vector graphics**) issued by a page can be extracted " "as a list of dictionaries. Interestingly, this is possible for :ref:`all " @@ -142,7 +142,7 @@ msgstr "" "ページから発行された描画コマンドを抽出できます。興味深いことに、これはすべての :ref:`サポートされている " "` ドキュメントタイプに対して可能です – PDFだけでなく、XPS、EPUBなどにも使用できます。" -#: ../../recipes-drawing-and-graphics.rst:103 fd065d07baed4a50b55226fd327b5249 +#: ../../recipes-drawing-and-graphics.rst:103 7a07bc7541854578ad35f95ad5dfc330 msgid "" "Page method, :meth:`Page.get_drawings()` accesses draw commands and " "converts them into a list of Python dictionaries. Each dictionary -- " @@ -154,7 +154,7 @@ msgstr "" "は描画コマンドにアクセスし、それらをPythonの辞書のリストに変換します。各辞書 – 「パス」と呼ばれる – は個別の描画を表します – " "それは単純な単一の線であるか、前のセクションの形状の1つを表す線と曲線の複雑な組み合わせであるかもしれません。" -#: ../../recipes-drawing-and-graphics.rst:105 8c4447033f3e457baec6e3937d9166d3 +#: ../../recipes-drawing-and-graphics.rst:105 7ffb5ff050964de093cfe20336fa283d msgid "" "The *path* dictionary has been designed such that it can easily be used " "by the :ref:`Shape` class and its methods. Here is an example for a page " @@ -165,7 +165,7 @@ msgstr "" "クラスとそのメソッドで簡単に使用できるように設計されています。以下は、1つのパスを持つページの例で、そのパスは `Rect(100, 100, " "200, 200)` の内側に赤い境界線の黄色い円を描画します::" -#: ../../recipes-drawing-and-graphics.rst:140 cca9c6a288804894a796b6caefac6a03 +#: ../../recipes-drawing-and-graphics.rst:140 c1f4f56de6e1441f988e21f4184bed57 msgid "" "You need (at least) 4 Bézier curves (of 3rd order) to draw a circle with " "acceptable precision. See this `Wikipedia article " @@ -174,13 +174,13 @@ msgstr "" "適切な精度で円を描画するには、(少なくとも)4つの3次ベジエ曲線が必要です。背景については、この `Wikipediaの記事 " "`_ を参照してください。" -#: ../../recipes-drawing-and-graphics.rst:143 0c22ec867fe346f3912d9c9f4695866e +#: ../../recipes-drawing-and-graphics.rst:143 be59d541be214b669a9c6663ca6abcd1 msgid "" "The following is a code snippet which extracts the drawings of a page and" " re-draws them on a new page::" msgstr "以下は、ページの描画を抽出し、それらを新しいページに再描画するコードの断片です::" -#: ../../recipes-drawing-and-graphics.rst:194 3eb8b5b99f4242fab3854a98cdcf2d2a +#: ../../recipes-drawing-and-graphics.rst:194 660c9c99b6864b26ad3a377cf1d1f343 msgid "" "As can be seen, there is a high congruence level with the :ref:`Shape` " "class. With one exception: For technical reasons `lineCap` is a tuple of " @@ -190,19 +190,19 @@ msgstr "" "ご覧の通り、 :ref:`Shape` クラスとの高い一致度があります。ただし1つ例外があります。技術的な理由から、ここでは `lineCap` " "は3つの数字のタプルですが、 :ref:`Shape` クラス(およびPDF内)では整数です。そのため、そのタプルの最大値を単純に取得します。" -#: ../../recipes-drawing-and-graphics.rst:196 5e8af22a1a4245bc85da53a0e69bc4cb +#: ../../recipes-drawing-and-graphics.rst:196 d8e69210bfb24c3ebf97b7efbc549af6 msgid "" "Here is a comparison between input and output of an example page, created" " by the previous script:" msgstr "以下は、前のスクリプトで作成された例のページの入力と出力の比較です。" -#: ../../recipes-drawing-and-graphics.rst:201 25f256ed151a49f892074af640e40826 +#: ../../recipes-drawing-and-graphics.rst:201 9fc8264dcf1f4bfd98a7c1ad1aa9aee3 msgid "" "The reconstruction of graphics, like shown here, is not perfect. The " "following aspects will not be reproduced as of this version:" msgstr "ここに示されているようなグラフィックスの再構築は完璧ではありません。次の点は、このバージョンでは再現されません:" -#: ../../recipes-drawing-and-graphics.rst:203 6cf34e611fbe46bb88992f2124a6346a +#: ../../recipes-drawing-and-graphics.rst:203 8166cbf0fbaf40bb8343e4d7155fc0ce msgid "" "Page definitions can be complex and include instructions for not showing " "/ hiding certain areas to keep them invisible. Things like this are " @@ -211,72 +211,76 @@ msgstr "" "ページの定義は複雑になる可能性があり、特定の領域を表示しない/非表示にするための指示を含むことがあります。こうしたことは、 " ":meth:`Page.get_drawings` によって無視されます – このメソッドは常にすべてのパスを返します。" -#: ../../recipes-drawing-and-graphics.rst:205 9c910a58a1984c418c81501a5805457a +#: ../../recipes-drawing-and-graphics.rst:205 fd360aa336ff48d2b72658c63221a561 msgid "" "You can use the path list to make your own lists of e.g. all lines or all" " rectangles on the page and subselect them by criteria, like color or " "position on the page etc." msgstr "パスのリストを使用して、ページ上のすべての線またはすべての四角形などのリストを作成し、色やページ上の位置などの基準でサブセレクトすることができます。" -#: ../../recipes-drawing-and-graphics.rst:210 3a9d4909dbae4d3e8b32ccedb7d287b1 +#: ../../recipes-drawing-and-graphics.rst:210 93b3944bb9e543f48ca901f90fb021e4 msgid "How to Delete Drawings" msgstr "描画の削除方法" -#: ../../recipes-drawing-and-graphics.rst:212 90002c6b09dc4a57a7059843116ba374 +#: ../../recipes-drawing-and-graphics.rst:212 094bb3cfc57b4461b8e1fea1652d63a5 msgid "" "To delete drawings/vector graphics we must use a :ref:`Redaction " "Annotation ` with the bounding box of the drawing " "and then **add and apply** a redaction to it to delete it." -msgstr "描画やベクトルグラフィックスを削除するには、その描画の境界ボックスを持つ :ref:`赤字アノテーション` を使用し、それに赤字を **追加して適用する** 必要があります。" - +msgstr "" +"描画やベクトルグラフィックスを削除するには、その描画の境界ボックスを持つ " +":ref:`赤字アノテーション` を使用し、それに赤字を **追加して適用する** 必要があります。" -#: ../../recipes-drawing-and-graphics.rst:215 52251d6b4da34f95a776f5c28b5b5d29 +#: ../../recipes-drawing-and-graphics.rst:215 2f4f8d0e3e694181a5ce64ea3ccbe672 msgid "" "The following code shows an example of deleting the first drawing found " "on the page::" msgstr "以下のコードは、ページ上で最初に見つかった描画を削除する例を示しています:" -#: ../../recipes-drawing-and-graphics.rst:225 b39a815341b6455f93ff6b156013613f +#: ../../recipes-drawing-and-graphics.rst:225 edf0ff01d38248c8b9f6608213f47b52 msgid "" "See :meth:`Page.apply_redactions` for the parameter options which can be " "sent - you are able to apply deletion options to image, drawing and text " "objects which are bound by the annotation area." -msgstr ":meth:`Page.apply_redactions` には送信できるパラメータオプションがあります。アノテーション領域によって境界付けられたイメージ、描画、テキストオブジェクトに削除オプションを適用できます。" - +msgstr "" +":meth:`Page.apply_redactions` " +"には送信できるパラメータオプションがあります。アノテーション領域によって境界付けられたイメージ、描画、テキストオブジェクトに削除オプションを適用できます。" -#: ../../recipes-drawing-and-graphics.rst:229 2900fd9fe1ff4f40bd472abac92ad86e +#: ../../recipes-drawing-and-graphics.rst:229 ada7ddfefd1344ee94d178c3df118ae1 msgid "How to Draw Graphics" msgstr "グラフィックスを描画する方法" -#: ../../recipes-drawing-and-graphics.rst:231 91d3c9688fad42c4a11e68c9983519e3 +#: ../../recipes-drawing-and-graphics.rst:231 4606dbe6b222488fac1f4948be78ee37 msgid "" "Drawing graphics is as simple as calling the type of :meth:`Drawing " "Method ` you may want. You can draw graphics directly on " "pages or within shape objects." -msgstr "グラフィックスを描画することは、必要な :meth:`描画方法 ` の種類を呼び出すだけです。グラフィックスは、ページ上または形状オブジェクト内に直接描画できます。" +msgstr "" +"グラフィックスを描画することは、必要な :meth:`描画方法 ` " +"の種類を呼び出すだけです。グラフィックスは、ページ上または形状オブジェクト内に直接描画できます。" -#: ../../recipes-drawing-and-graphics.rst:234 8f34536c9ce24ffdbb717576a4b63b36 +#: ../../recipes-drawing-and-graphics.rst:234 55d0693f8fc14f2e8744839a6f7afe99 msgid "For example, to draw a circle::" msgstr "例えば、円を描画するには:" -#: ../../recipes-drawing-and-graphics.rst:245 541e33c7470748588b394739019e6c65 +#: ../../recipes-drawing-and-graphics.rst:245 1426496584b041f18b185bc3ee064f75 msgid "" "The :ref:`Shape` object can be used to combine multiple drawings that " "should receive common properties as specified by :meth:`Shape.finish`." -msgstr ":ref:`Shape` オブジェクトは、:meth:`Shape.finish` で指定された共通のプロパティを受け取る必要がある複数の描画を組み合わせるために使用できます。" - +msgstr "" +":ref:`Shape` オブジェクトは、:meth:`Shape.finish` " +"で指定された共通のプロパティを受け取る必要がある複数の描画を組み合わせるために使用できます。" -#: ../../footer.rst:60 6948efd7c60041dc97a51b07dbeb7351 +#: ../../footer.rst:60 15d9c97491bd46d9806555b60b5da2ed msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 34e6ecb7557d4a72be4fda164825258e -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/recipes-images.mo b/docs/locales/ja/LC_MESSAGES/recipes-images.mo index 8f8bcbd4d..08b058801 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes-images.mo and b/docs/locales/ja/LC_MESSAGES/recipes-images.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes-images.po b/docs/locales/ja/LC_MESSAGES/recipes-images.po index 09e8564f0..0a3f35745 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes-images.po +++ b/docs/locales/ja/LC_MESSAGES/recipes-images.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,48 +19,48 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 b79b8f4355ca439794fe7845e0e70386 +#: ../../header.rst:-1 e08ff8c04b304218ac81d35f41292ac6 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 500d31126de540e9acaa752091d040e0 +#: ../../header.rst:-1 a1f1910f4f4b427c872afb309d8717ae msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 7e0216b9afd74634af4be7d1e25f0379 +#: ../../header.rst:-1 067d19d0feee4d3ea790680243bcadde msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../recipes-images.rst:7 75b96aa841a3488fb7ee5a38943b93c6 +#: ../../recipes-images.rst:7 57931bcbe871420b8981b5294574c1f6 msgid "Images" msgstr "画像" -#: ../../recipes-images.rst:14 a298c66d96d64df98340aecb6f5861e4 +#: ../../recipes-images.rst:14 c30d7e40298f4ae28b6931514dcdda2d msgid "How to Make Images from Document Pages" msgstr "ドキュメントページから画像を作成する方法" -#: ../../recipes-images.rst:16 944163981c0d4d7d8b16fd07cd1db5e4 +#: ../../recipes-images.rst:16 a5b0953e89e6485ea0cc82a8785e31cf msgid "" "This little script will take a document filename and generate a PNG file " "from each of its pages." msgstr "この小さなスクリプトは、文書のファイル名を取得し、各ページからPNGファイルを生成します。" -#: ../../recipes-images.rst:18 aa126f958ac749d3b2a9b675b5100f8d +#: ../../recipes-images.rst:18 f1183a990e834decbf12969a97c76cf8 msgid "The document can be any :ref:`supported type`." msgstr "文書の種類は、:ref:`サポートされている ` どんな形式でも構いません。" -#: ../../recipes-images.rst:20 a350535948514ff4892d1e10dd21d21e +#: ../../recipes-images.rst:20 86fd95ad8dba47ed87f53ab293cc7058 msgid "" "The script works as a command line tool which expects the filename being " "supplied as a parameter. The generated image files (1 per page) are " "stored in the directory of the script::" msgstr "このスクリプトはコマンドラインツールとして動作し、ファイル名をパラメータとして指定することを期待しています。生成された画像ファイル(1ページごとに1つ)は、スクリプトが格納されているディレクトリに保存されます。::" -#: ../../recipes-images.rst:29 09dcb969f6284b1997613fa11bc2456e +#: ../../recipes-images.rst:29 3e69a1bf5a8d49978cfc9c8dabfc3648 msgid "" "The script directory will now contain PNG image files named *page-0.png*," " *page-1.png*, etc. Pictures have the dimension of their pages with width" @@ -74,11 +74,11 @@ msgstr "" " x 842ピクセルとなります。これらの画像は水平方向と垂直方向の解像度が96 " "dpiで、透明度はありません。これらの設定を変更することもできます。詳細については、次のセクションをお読みください。" -#: ../../recipes-images.rst:37 ae6c1ace6e87407a83f1bded1aae3b0b +#: ../../recipes-images.rst:37 338b2dd52c564f7d9850839bb2b6e0c9 msgid "How to Increase :index:`Image Resolution `" msgstr "画像の解像度を上げる方法" -#: ../../recipes-images.rst:39 09f38ded1efc49f9a61591849b5c1fba +#: ../../recipes-images.rst:39 4770c88fce1d4a0782d7b461b2a4c8b6 msgid "" "The image of a document page is represented by a :ref:`Pixmap`, and the " "simplest way to create a pixmap is via method :meth:`Page.get_pixmap`." @@ -86,27 +86,27 @@ msgstr "" "文書ページの画像はPixmapによって表されます。 :ref:`Pixmap` を作成するもっとも簡単な方法は、メソッド " ":meth:`Page.get_pixmap` を使うことです。" -#: ../../recipes-images.rst:41 82108f268cc64541ae6c64f0a7219b73 +#: ../../recipes-images.rst:41 fe71e979e90a4e36ab7e012b4e4cfbaf msgid "" "This method has many options to influence the result. The most important " "among them is the :ref:`Matrix`, which lets you :index:`zoom`, rotate, " "distort or mirror the outcome." msgstr "このメソッドには結果に影響を与える多くのオプションがあります。その中でも最も重要なのは行列(Matrix)であり、これによって結果を拡大、回転、歪ませる、または反転することができます。" -#: ../../recipes-images.rst:43 cecaf62aa76c4282bcd139dc8326e6d7 +#: ../../recipes-images.rst:43 879c14c6b55746e184a6a3659ddb8624 msgid "" ":meth:`Page.get_pixmap` by default will use the :ref:`Identity` matrix, " "which does nothing." msgstr ":meth:`Page.get_pixmap` はデフォルトで :ref:`Identity` 行列を使用しますが、これは何も行いません。" -#: ../../recipes-images.rst:45 aa1334f4b61e420c9ed1ae531363324d +#: ../../recipes-images.rst:45 7ae61bca1b914ef58650814764c86556 msgid "" "In the following, we apply a :index:`zoom factor `" " of 2 to each dimension, which will generate an image with a four times " "better resolution for us (and also about 4 times the size)::" msgstr "以下では、各次元に2倍のズームを適用し、結果として解像度が4倍向上した画像を生成します(そしてサイズも約4倍になります)。::" -#: ../../recipes-images.rst:53 a1ad4e2be3c54c15b32c54fdf0a95f68 +#: ../../recipes-images.rst:53 a015d3083e624dd0bb52595296bcda69 msgid "" "Since version 1.19.2 there is a more direct way to set the resolution: " "Parameter `\"dpi\"` (dots per inch) can be used in place of `\"matrix\"`." @@ -121,25 +121,25 @@ msgstr "" "page.get_pixmap(dpi=300)` " "と指定します。略記法の利便性に加えて、この方法の追加の利点は、dpiの値が画像ファイルとともに保存されることです。これはMatrixの記法を使用する場合に自動的に行われることはありません。" -#: ../../recipes-images.rst:61 b3ef6e1d5e4743bf959b7d3dea48f476 +#: ../../recipes-images.rst:61 8e820a068673426d8b07c503b4b9b1eb msgid "How to Create :index:`Partial Pixmaps` (Clips)" msgstr "部分的なPixmap(クリップ)の作成方法" -#: ../../recipes-images.rst:62 2119c85e3efc44a2aa0cbbdbf9e8c236 +#: ../../recipes-images.rst:62 3575f660d7f34fcf8740261d5cc13939 msgid "" "You do not always need or want the full image of a page. This is the case" " e.g. when you display the image in a GUI and would like to fill the " "respective window with a zoomed part of the page." msgstr "常にページの完全な画像が必要なわけではありませんし、必要ともしない場合があります。例えば、GUIで画像を表示し、ページのズームされた部分でウィンドウを埋めたい場合などが該当します。" -#: ../../recipes-images.rst:64 b0c96ccb67494f4aa006dce47fe105d2 +#: ../../recipes-images.rst:64 91a6b74e53dc47bba254ef54f6903677 msgid "" "Let's assume your GUI window has room to display a full document page, " "but you now want to fill this room with the bottom right quarter of your " "page, thus using a four times better resolution." msgstr "GUIウィンドウにフルの文書ページを表示するスペースがあると仮定しましょうが、現在はページの右下の四分の一でこのスペースを埋めたいとします。これにより、解像度が4倍向上します。" -#: ../../recipes-images.rst:66 e59f0a8cd5224970a7139421b63ae353 +#: ../../recipes-images.rst:66 0c121baa24eb407eb7c91b5f481189c8 msgid "" "To achieve this, define a rectangle equal to the area you want to appear " "in the GUI and call it \"clip\". One way of constructing rectangles in " @@ -147,7 +147,7 @@ msgid "" " are doing here." msgstr "これを実現するために、GUIに表示したい領域に等しい矩形を定義し、「クリップ」と呼びます。PyMuPDFでは、矩形を構築する方法の1つは、対角線上にある2つの角を指定することです。これがここで行っていることです。" -#: ../../recipes-images.rst:79 a31f4f0c73cb4cbe82cc4a2a37b9be59 +#: ../../recipes-images.rst:79 355e4acbef614ba299f86cec24da6c88 msgid "" "In the above we construct *clip* by specifying two diagonally opposite " "points: the middle point *mp* of the page rectangle, and its bottom " @@ -156,11 +156,11 @@ msgstr "" "上記では、 `clip` を構築するために、2つの対角線上の点を指定しています:ページ矩形の中心点である `mp` と、その右下の点である " "`rect.br` です。" -#: ../../recipes-images.rst:87 d3c74c4cc760494d8af99f5a3eaf5d21 +#: ../../recipes-images.rst:87 39c83e942ce74cb9baddcc259d24777e msgid "How to Zoom a Clip to a GUI Window" msgstr "GUIウィンドウにクリップをズームする方法" -#: ../../recipes-images.rst:88 d6d2b703e69a4550851724a8c250c7af +#: ../../recipes-images.rst:88 5ffea1d8340c4a08939f161390fd42ae msgid "" "Please also read the previous section. This time we want to **compute the" " zoom factor** for a clip, such that its image best fits a given GUI " @@ -170,13 +170,13 @@ msgid "" " clip rectangle." msgstr "前のセクションもお読みください。今回は、クリップのズームファクターを計算して、その画像が指定されたGUIウィンドウに最適にフィットするようにします。つまり、画像の幅または高さ(または両方)がウィンドウの寸法と等しくなります。次のコードスニペットでは、GUIウィンドウのWIDTHとHEIGHTを提供する必要があります。それらはページのクリップ矩形を受け取る必要があります。" -#: ../../recipes-images.rst:105 31a3e0cb40ac4c5ab83e1f155622da23 +#: ../../recipes-images.rst:105 61635a6d0bae4040986c0bd5b66441a2 msgid "" "For the other way round, now assume you **have** the zoom factor and need" " to **compute the fitting clip**." msgstr "逆の場合は、ズームファクターがあると仮定し、フィッティングクリップを計算する必要があります。" -#: ../../recipes-images.rst:107 521e1e4a30214c75a0e66cd0f1458be8 +#: ../../recipes-images.rst:107 2903b44af458484da6825578d79b1da4 msgid "" "In this case we have `zoom = HEIGHT/clip.height = WIDTH/clip.width`, so " "we must set `clip.height = HEIGHT/zoom` and, `clip.width = WIDTH/zoom`. " @@ -187,23 +187,23 @@ msgstr "" " = HEIGHT/zoom` および `clip.width = WIDTH/zoom` " "と設定する必要があります。クリップ内のページ上の左上の点 tl を選択して、適切なピクマップを計算します。" -#: ../../recipes-images.rst:124 61135fbb826645a0bd0b0046d663b3f2 +#: ../../recipes-images.rst:124 956b4a0c798e4b199a96b3f962fadf70 msgid "How to Create or Suppress Annotation Images" msgstr "注釈画像の作成または抑制方法" -#: ../../recipes-images.rst:125 768fa61d60d64abb8bd4504bb8e7bba8 +#: ../../recipes-images.rst:125 88238495026f4e289613d5e50b81a474 msgid "" "Normally, the pixmap of a page also shows the page's annotations. " "Occasionally, this may not be desirable." msgstr "通常、ページのピクマップにはページの注釈も表示されます。しかし、時にはこれが望ましくない場合があります。" -#: ../../recipes-images.rst:127 fc07bc38b84c4958b75f2a969157d7c0 +#: ../../recipes-images.rst:127 7cec58430afd46ed9e720d3b6fa029db msgid "" "To suppress the annotation images on a rendered page, just specify " "`annots=False` in :meth:`Page.get_pixmap`." msgstr "描画されたページから注釈画像を抑制するには、 :meth:`Page.get_pixmap` で `annots=False` を指定します。" -#: ../../recipes-images.rst:129 b5bfbe940028429a9c3ee6e1e8f7ff65 +#: ../../recipes-images.rst:129 f75aaef8eaa54984a2d2fe045e60d421 msgid "" "You can also render annotations separately: they have their own " ":meth:`Annot.get_pixmap` method. The resulting pixmap has the same " @@ -212,30 +212,30 @@ msgstr "" "注釈を個別にレンダリングすることもできます。注釈には独自の :meth:`Annot.get_pixmap` " "メソッドがあります。結果のピクマップは注釈の矩形と同じ寸法です。" -#: ../../recipes-images.rst:141 495413965a72428cb44d4f8bbc0334f2 +#: ../../recipes-images.rst:141 9ff376603198474f97ccc539fa162925 msgid "How to Extract Images: Non-PDF Documents" msgstr "画像の抽出方法:非PDFドキュメント" -#: ../../recipes-images.rst:143 e465392a6a4d4b98ab7d171382bf758e +#: ../../recipes-images.rst:143 e1ee913277e849ab932b9b97874133c3 msgid "" "In contrast to the previous sections, this section deals with " "**extracting** images **contained** in documents, so they can be " "displayed as part of one or more pages." msgstr "前のセクションとは対照的に、このセクションではドキュメントに含まれる画像の抽出に取り組みます。これにより、これらの画像を1つ以上のページの一部として表示することができます。" -#: ../../recipes-images.rst:145 d958b2143f92441c980704720d9dd8fc +#: ../../recipes-images.rst:145 a1a829c4fe444807b6db244124c9137d msgid "" "If you want to recreate the original image in file form or as a memory " "area, you have basically two options:" msgstr "元の画像をファイル形式またはメモリ領域として再作成したい場合、基本的に2つのオプションがあります:" -#: ../../recipes-images.rst:147 f09bdef45f724ba2893a30d56cb21f6a +#: ../../recipes-images.rst:147 773185000e944e7daeaf940ca6fda472 msgid "" "Convert your document to a PDF, and then use one of the PDF-only " "extraction methods. This snippet will convert a document to PDF::" msgstr "ドキュメントをPDFに変換し、その後PDF専用の抽出方法のいずれかを使用します。以下のスニペットはドキュメントをPDFに変換します::" -#: ../../recipes-images.rst:153 cff657b0b4d64d64894f593967871b63 +#: ../../recipes-images.rst:153 6416afce3c7447f98cbcd8b2d98214dd msgid "" "Use :meth:`Page.get_text` with the \"dict\" parameter. This works for all" " document types. It will extract all text and images shown on the page, " @@ -250,11 +250,11 @@ msgstr "" " :ref:`TextPage` " "を参照してください。この方法はPDFファイルにも同じくうまく機能します。これにより、ページに表示されているすべての画像のリストが作成されます::" -#: ../../recipes-images.rst:182 7ebc294861924e2b9b47d6c377cff067 +#: ../../recipes-images.rst:182 28308796e3ad4f7abf4d6c2b939aca48 msgid "How to Extract Images: PDF Documents" msgstr "画像の抽出方法:PDFドキュメント" -#: ../../recipes-images.rst:184 125671b65cf24a649783c846d92d5338 +#: ../../recipes-images.rst:184 0fc3745f79b8438d9b922c7957f09651 msgid "" "Like any other \"object\" in a PDF, images are identified by a cross " "reference number (:data:`xref`, an integer). If you know this number, you" @@ -263,7 +263,7 @@ msgstr "" "PDF内の他のオブジェクトと同様に、画像は交差参照番号( :data:`xref` " "、整数)によって識別されます。この番号を知っていれば、画像のデータにアクセスする方法が2つあります:" -#: ../../recipes-images.rst:186 13aa08e716de4b16a2758745ec9c89d9 +#: ../../recipes-images.rst:186 f2a6f39609bb4bcb838f8d7a34a28da5 msgid "" "**Create** a :ref:`Pixmap` of the image with instruction *pix = " "pymupdf.Pixmap(doc, xref)*. This method is **very** fast (single digit " @@ -275,7 +275,7 @@ msgstr "" "。この方法は非常に高速です(単桁のマイクロ秒)。 :ref:`Pixmap` " "のプロパティ(幅、高さなど)は、画像のものと同じになります。この場合、埋め込まれたオリジナルの画像形式を判別する方法はありません。" -#: ../../recipes-images.rst:188 80b36adc5ecd4cfb849eb2ba9532875b +#: ../../recipes-images.rst:188 903b6e9628bb4a0ea1ad4d2ff2f35557 msgid "" "**Extract** the image with *img = doc.extract_image(xref)*. This is a " "dictionary containing the binary image data as *img[\"image\"]*. A number" @@ -285,8 +285,8 @@ msgid "" "\"jpeg\", \"bmp\", \"tiff\", etc. can also occur. Use this string as the " "file extension if you want to store to disk. The execution speed of this " "method should be compared to the combined speed of the statements *pix = " -"pymupdf.Pixmap(doc, xref);pix.tobytes()*. If the embedded image is in PNG " -"format, the speed of :meth:`Document.extract_image` is about the same " +"pymupdf.Pixmap(doc, xref);pix.tobytes()*. If the embedded image is in PNG" +" format, the speed of :meth:`Document.extract_image` is about the same " "(and the binary image data are identical). Otherwise, this method is " "**thousands of times faster**, and the **image data is much smaller**." msgstr "" @@ -299,13 +299,13 @@ msgstr "" "と比較する必要があります。埋め込まれた画像がPNG形式の場合、 :meth:`Document.extract_image` " "の速度はほぼ同じで(バイナリ画像データも同じです)、それ以外の場合は、このメソッドは数千倍高速であり、画像データも小さくなります" -#: ../../recipes-images.rst:190 c3436a4ae428484a983d168a48d73185 +#: ../../recipes-images.rst:190 110186a162f04f83955d7d59285d446b msgid "" "The question remains: **\"How do I know those 'xref' numbers of " "images?\"**. There are two answers to this:" msgstr "**「どのようにして画像の'xref'番号を知るのか?」** これには2つの答えがあります:" -#: ../../recipes-images.rst:192 e4d5be479fe34238a935de2b2d70f282 +#: ../../recipes-images.rst:192 ad8338028ef944a19307f2547e05528f msgid "" "**\"Inspect the page objects:\"** Loop through the items of " ":meth:`Page.get_images`. It is a list of list, and its items look like " @@ -320,7 +320,7 @@ msgstr "" ":data:`xref` を含んでいます。この :data:`xref` " "を上記の方法の1つで使用できます。これは有効(損傷していない)なドキュメントに使用しますが、同じ画像が複数回(異なるページで)参照されることがあるため、複数回の抽出を避けるメカニズムを提供することが望ましいかもしれません。" -#: ../../recipes-images.rst:193 57cbb5f1a07d405c8e3e1c654d24c89b +#: ../../recipes-images.rst:193 afeb949615fb470d958fdfc35b1fe9dd msgid "" "**\"No need to know:\"** Loop through the list of **all xrefs** of the " "document and perform a :meth:`Document.extract_image` for each one. If " @@ -336,13 +336,13 @@ msgstr "" "を処理します。この :data:`xref` " "は画像ではありません。これはPDFが損傷している(使用できないページがある)場合に使用します。PDFにはしばしば他の画像の透明度を定義する特別な目的の「擬似画像」(ステンシルマスク)が含まれていることに注意してください。これらを抽出から除外するためのロジックを提供することがあるかもしれません。次のセクションも参照してください。" -#: ../../recipes-images.rst:195 ebf24f783e70477fbb81d7b228565a63 +#: ../../recipes-images.rst:195 6d656f35aa69461f8e47b7f4bf499261 msgid "" "For both extraction approaches, there exist ready-to-use general purpose " "scripts:" msgstr "これらの抽出方法の両方に対して、一般的な用途のスクリプトが存在します。" -#: ../../recipes-images.rst:197 60507efd2a2c42cab53a8d415f064423 +#: ../../recipes-images.rst:197 490e93536036437fab679b20daac6f6a msgid "" "`extract-from-pages.py `_ " @@ -352,7 +352,7 @@ msgstr "" "Utilities/blob/master/examples/extract-images/extract-from-pages.py>`_ " "はページごとに画像を抽出します。" -#: ../../recipes-images.rst:202 62fd9dffcd964f00b3b5376882ea97b9 +#: ../../recipes-images.rst:202 87adba5350a8467e87dc3f0e80cae1e4 msgid "" "and `extract-from-xref.py `_ " @@ -362,11 +362,11 @@ msgstr "" "Utilities/blob/master/examples/extract-images/extract-from-xref.py>`_ " "はxrefテーブルによって画像を抽出します。" -#: ../../recipes-images.rst:213 71511e777a3b48e7abf8445f5146f0ae +#: ../../recipes-images.rst:213 b53c02001e2f4f7391e6e9e880b0631f msgid "How to Handle Image Masks" msgstr "画像マスクの処理方法" -#: ../../recipes-images.rst:214 e74ff92b3e224b1181b7651cf65f59ef +#: ../../recipes-images.rst:214 32034dc3accf4622b51ead4c06f67509 msgid "" "Some images in PDFs are accompanied by **image masks**. In their simplest" " form, masks represent alpha (transparency) bytes stored as separate " @@ -375,23 +375,23 @@ msgid "" "mask." msgstr "PDF内の一部の画像には画像マスクが付属しています。最も単純な形式では、マスクは別の画像として格納されたアルファ(透明度)バイトを表します。画像の元の形を復元するには、そのマスクから取得した透明度バイトを使用して画像を「補完」する必要があります。" -#: ../../recipes-images.rst:216 5c186870ecdc4a5a8cffa9b38ffd90d4 +#: ../../recipes-images.rst:216 e0828025961548d4a2ed0f2e5b9cedf6 msgid "" "Whether an image does have such a mask can be recognized in one of two " "ways in PyMuPDF:" msgstr "PyMuPDFでは、画像にそのようなマスクがあるかどうかは次の2つの方法で認識できます:" -#: ../../recipes-images.rst:218 a4f56f945e124bb6b57ecb8a0f76e66a +#: ../../recipes-images.rst:218 4c26a844692448d6818018bc8e19f652 msgid "" "An item of :meth:`Document.get_page_images` has the general format " -"`(xref, smask, ...)`, where *xref* is the image's :data:`xref` and " +"`(xref, smask, ...)`, where :data:`xref` is the image's :data:`xref` and " "*smask*, if positive, then it is the :data:`xref` of a mask." msgstr "" ":meth:`Document.get_page_images` の項目は一般的な形式 `(xref、smask、...)` " "を持ちます。ここで、xrefは画像の :data:`xref` であり、 「smask」 が正の場合、それはマスクの :data:`xref` " "です。" -#: ../../recipes-images.rst:219 566b2d5dfd694ecdb43fd3aa3f6b0c9a +#: ../../recipes-images.rst:219 8011ba0428cc4b87a64b8031ea34ea90 msgid "" "The (dictionary) results of :meth:`Document.extract_image` have a key " "*\"smask\"*, which also contains any mask's :data:`xref` if positive." @@ -399,26 +399,26 @@ msgstr "" ":meth:`Document.extract_image` の結果(辞書)には、キー「smask」があります。このキーには、マスクの " ":data:`xref` が含まれています。" -#: ../../recipes-images.rst:221 38e96b6c37d848cba39becf9e6c34d83 +#: ../../recipes-images.rst:221 65aadf1969e44334a7c86d7524a50702 msgid "" "If *smask == 0* then the image encountered via :data:`xref` can be " "processed as it is." msgstr "`smask == 0` の場合、 :data:`xref` を介して遭遇した画像はそのまま処理できます。" -#: ../../recipes-images.rst:223 4c94f9fc8b164c48b3fe64e15c6001d7 +#: ../../recipes-images.rst:223 302ce99937d44ca995fcedb51c11aaae msgid "" "To recover the original image using PyMuPDF, the procedure depicted as " "follows must be executed:" msgstr "PyMuPDFを使用して元の画像を復元するためには、以下に示す手順を実行する必要があります:" -#: ../../recipes-images.rst:232 83b69748e428405c90e52479ca5e9edb +#: ../../recipes-images.rst:232 df80dda6fd5a4c4db985e0cfa929ee0a msgid "" "Step (1) creates a pixmap of the basic image. Step (2) does the same with" " the image mask. Step (3) adds an alpha channel and fills it with " "transparency information." msgstr "ステップ(1)では、基本画像のピクマップを作成します。ステップ(2)では、同じことを画像マスクで行います。ステップ(3)では、アルファチャンネルを追加し、透明情報で埋めます。" -#: ../../recipes-images.rst:234 c315c2eed263410298ebb9fce137b356 +#: ../../recipes-images.rst:234 4a160a9c64ac45caa88c66099e2af1b1 msgid "" "The scripts `extract-from-pages.py `_, " @@ -432,21 +432,21 @@ msgstr "" "Utilities/blob/master/examples/extract-images/extract-from-xref.py>`_ " "というスクリプトにもこのロジックが含まれています。" -#: ../../recipes-images.rst:250 70d7fe15c7d6423996578130e4ce2927 +#: ../../recipes-images.rst:250 0f2b285905974f1b99efded1652e0905 msgid "How to Make one PDF of all your Pictures (or Files)" msgstr "すべての写真(またはファイル)を1つのPDFにする方法" -#: ../../recipes-images.rst:251 f21fa587c5104b31b9ba286019d2684b +#: ../../recipes-images.rst:251 8d8107e9ab0942c88a4abccc8f7092dc msgid "" "We show here **three scripts** that take a list of (image and other) " "files and put them all in one PDF." msgstr "以下に、(画像およびその他の)ファイルのリストを受け取り、それらをすべて1つのPDFに結合する3つのスクリプトを示します。" -#: ../../recipes-images.rst:253 9eeaede8a4a9426d936b8103e27d3acc +#: ../../recipes-images.rst:253 3df4d9f329c4453f9ca02d580bd2b3ba msgid "**Method 1: Inserting Images as Pages**" msgstr "**方法1:画像をページとして挿入する方法**" -#: ../../recipes-images.rst:255 d18d3da4b6894cdea4e80fdcda5a580f +#: ../../recipes-images.rst:255 0bbd32458c89450b9f8adc7638530473 msgid "" "The first one converts each image to a PDF page with the same dimensions." " The result will be a PDF with one page per image. It will only work for " @@ -455,19 +455,19 @@ msgstr "" "最初の方法では、各画像を同じ寸法のPDFページに変換します。結果は、1つの画像に1ページのPDFとなります。ただし、 " ":ref:`サポートされている ` 画像ファイル形式のみで動作します。::" -#: ../../recipes-images.rst:278 d0fea7d483754acf806cec4d50ef2f71 +#: ../../recipes-images.rst:278 959fd3ad51dc45daa6b1f1310ad95124 msgid "" "This will generate a PDF only marginally larger than the combined " "pictures' size. Some numbers on performance:" msgstr "これにより、結合された画像のサイズとほとんど変わらないPDFが生成されます。パフォーマンスに関するいくつかの数値:" -#: ../../recipes-images.rst:280 9077d4d15df94d8f8a8362ea83160214 +#: ../../recipes-images.rst:280 4996fb148b334e01b2a6baaedf636b52 msgid "" "The above script needed about 1 minute on my machine for 149 pictures " "with a total size of 514 MB (and about the same resulting PDF size)." msgstr "上記のスクリプトは、149枚の画像で合計サイズが514 MBの場合、私のマシン上で約1分かかりました(生成されたPDFのサイズもほぼ同じです)。" -#: ../../recipes-images.rst:285 ed6d395eb97a421fba84e629255c7e15 +#: ../../recipes-images.rst:285 b684aa875c574e47bc3fc5f6c15767d1 msgid "" "Look `here `_ for a more " @@ -478,7 +478,7 @@ msgstr "" "Utilities/blob/master/examples/insert-images/insert.py>`_ " "をご覧ください:ディレクトリ選択ダイアログを提供し、サポートされていないファイルやファイルでないエントリをスキップします。" -#: ../../recipes-images.rst:287 b8d7d09a8a554e49b37b07202716570d +#: ../../recipes-images.rst:287 03c855c845f74ac1bcf9ce3a7ee420c1 msgid "" "We might have used :meth:`Page.insert_image` instead of " ":meth:`Page.show_pdf_page`, and the result would have been a similar " @@ -493,11 +493,11 @@ msgstr "" " `deflate = True` " "を使用する必要がありますが、これにより大量の画像の場合、実行時間が大幅に増加します。そのため、この代替方法はお勧めできません。" -#: ../../recipes-images.rst:289 7891a26e4b2b48fd9625bcdb7825ba6d +#: ../../recipes-images.rst:289 41c532d33e8f42a39bb7560b25d00787 msgid "**Method 2: Embedding Files**" msgstr "**方法2:ファイルの埋め込み**" -#: ../../recipes-images.rst:291 603d5ff7f9394d65a92050bbd664ad96 +#: ../../recipes-images.rst:291 490c3dd2b7d64db682e9ea9f27e723df msgid "" "The second script **embeds** arbitrary files -- not only images. The " "resulting PDF will have just one (empty) page, required for technical " @@ -505,7 +505,7 @@ msgid "" "suitable PDF viewer that can display and / or extract embedded files::" msgstr "2つ目のスクリプトは、画像だけでなく、任意のファイルを埋め込みます。技術的な理由で必要なので、結果として得られるPDFには1つだけ(空の)ページがあります。埋め込まれたファイルに後でアクセスするためには、埋め込まれたファイルを表示または抽出できる適切なPDFビューアが必要です::" -#: ../../recipes-images.rst:316 ea92969e9ddc44c18d462cb3def6b307 +#: ../../recipes-images.rst:316 aa85ab6a4d7f4c068e437bc62ecde2f7 msgid "" "This is by far the fastest method, and it also produces the smallest " "possible output file size. The above pictures needed 20 seconds on my " @@ -519,11 +519,11 @@ msgstr "" "Utilities/tree/master/examples/embed-images/embed.py>`_ " "をご覧ください:ディレクトリ選択ダイアログを提供し、ファイルでないエントリをスキップします。" -#: ../../recipes-images.rst:318 38574d99e53b4199936a6017e680e85b +#: ../../recipes-images.rst:318 a5e66a78eac4476db9b235257835f444 msgid "**Method 3: Attaching Files**" msgstr "**方法3:ファイルの添付**" -#: ../../recipes-images.rst:320 fc99220d834749fca6587728f1314e3b +#: ../../recipes-images.rst:320 25dd45dc2fc5483686500405d2daa76a msgid "" "A third way to achieve this task is **attaching files** via page " "annotations see `here `_ をご覧ください。" -#: ../../recipes-images.rst:322 819726f4dd2e4cfc8b3d96f062587cb4 +#: ../../recipes-images.rst:322 fde0ae6309414feb89541d4ee22f054a msgid "" "This has a similar performance as the previous script and it also " "produces a similar file size. It will produce PDF pages which show a " "'FileAttachment' icon for each attached file." msgstr "これは前のスクリプトと同様のパフォーマンスを持ち、似たようなファイルサイズも生成します。それぞれの添付ファイルに対して「FileAttachment」アイコンが表示されるPDFページを生成します。" -#: ../../recipes-images.rst:326 3e7fdff8b27f44a69c67b168de97ec59 +#: ../../recipes-images.rst:326 807309e9b6e0443c892b7a6d9f92f145 msgid "" "Both, the **embed** and the **attach** methods can be used for " "**arbitrary files** -- not just images." msgstr "埋め込みと添付の両方の方法は、画像だけでなく任意のファイルにも使用できます。" -#: ../../recipes-images.rst:328 b6368c76a5f24d44ac0210341678a0ff +#: ../../recipes-images.rst:328 26ac29237c8d43398109384507fd51a8 msgid "" "We strongly recommend using the awesome package `PySimpleGUI " "`_ to display a progress meter for" @@ -559,11 +559,11 @@ msgstr "" "`_ " "の使用を強くお勧めします。これは純粋なPythonであり、Tkinter(追加のGUIパッケージは不要)を使用し、たった1行のコードを追加するだけで使えます!" -#: ../../recipes-images.rst:342 7733c7f20e90493c806630e66a1c21b8 +#: ../../recipes-images.rst:342 ebad9685f21841c2b8ee9ac84740ecf2 msgid "How to Create Vector Images" msgstr "ベクター画像の作成方法" -#: ../../recipes-images.rst:343 e64115395f224b348ffa400fb6c95149 +#: ../../recipes-images.rst:343 40ce7c0f9b0044e3939ba507d3f936fd msgid "" "The usual way to create an image from a document page is " ":meth:`Page.get_pixmap`. A pixmap represents a raster image, so you must " @@ -573,7 +573,7 @@ msgstr "" "ドキュメントページから画像を作成する通常の方法は、 :meth:`Page.get_pixmap` " "を使用することです。ピクマップはラスター画像を表しますので、作成時にその品質(つまり解像度)を決定する必要があります。後から変更することはできません。" -#: ../../recipes-images.rst:345 a72b1c57dc0e469eb055873c27980d29 +#: ../../recipes-images.rst:345 35c05b06ad73440aa94313c3f527dc97 msgid "" "PyMuPDF also offers a way to create a **vector image** of a page in SVG " "format (scalable vector graphics, defined in XML syntax). SVG images " @@ -581,203 +581,203 @@ msgid "" " raster graphic elements embedded therein)." msgstr "PyMuPDFはまた、SVG形式(XML構文で定義されたスケーラブルベクターグラフィックス)でページのベクター画像を作成する方法を提供しています。SVG画像はズームレベルで正確性を保持します(もちろん、埋め込まれたラスターグラフィックス要素を除く)。" -#: ../../recipes-images.rst:347 fac566640b2942dfbc2f872a42e8d8ff +#: ../../recipes-images.rst:347 3664556134d441ee8ca7d943fe0e97b5 msgid "" -"Instruction *svg = page.get_svg_image(matrix=pymupdf.Identity)* delivers a " -"UTF-8 string *svg* which can be stored with extension \".svg\"." +"Instruction *svg = page.get_svg_image(matrix=pymupdf.Identity)* delivers " +"a UTF-8 string *svg* which can be stored with extension \".svg\"." msgstr "" "指示 `svg = page.get_svg_image(matrix=pymupdf.Identity)` はUTF-8文字列 *svg* " "を提供します。これは \".svg\" の拡張子で保存できます。" -#: ../../recipes-images.rst:363 45d87535148148a7887ec6f678612ae7 +#: ../../recipes-images.rst:363 2e788e908541456db558a6d1e638447c msgid "How to Convert Images" msgstr "画像の変換方法" -#: ../../recipes-images.rst:364 9ef67ddbc4fc47a7b4f4c2e3b84e8104 +#: ../../recipes-images.rst:364 eaecfbf3be504291831504c4b64f18ba msgid "" "Just as a feature among others, PyMuPDF's image conversion is easy. It " "may avoid using other graphics packages like PIL/Pillow in many cases." msgstr "PyMuPDFの画像変換も他の機能と同様に簡単です。多くの場合、PIL/Pillowなどの他のグラフィックスパッケージを使用する必要がないかもしれません。" -#: ../../recipes-images.rst:366 6d91e8bbda8342ce820ee4c36fcb67d0 +#: ../../recipes-images.rst:366 c3f0f2ee44ad425e8ec5c957c779fbd5 msgid "Notwithstanding that interfacing with Pillow is almost trivial." msgstr "ただし、Pillowとの連携はほとんど自明です。" -#: ../../recipes-images.rst:369 3f42b8ff237540478d4deb54b4c69f22 +#: ../../recipes-images.rst:369 6b90048732484c0bb7bfd07609cd24ce msgid "**Input Formats**" msgstr "**入力フォーマット**" -#: ../../recipes-images.rst:369 8a4ea0d9878641319c469606890fa7ce +#: ../../recipes-images.rst:369 07a5c9395a4c45299d51e3bd83222984 msgid "**Output Formats**" msgstr "**出力フォーマット**" -#: ../../recipes-images.rst:369 ec2476cee20c4e7da53c857c4661a6c7 +#: ../../recipes-images.rst:369 8350dc457b254b8291594699ce54839d msgid "**Description**" msgstr "**説明**" -#: ../../recipes-images.rst:371 4607d5289d0c426e912bc22f304ec077 +#: ../../recipes-images.rst:371 0979a1ef86ea4e20a05e557a7442a3b2 msgid "BMP" msgstr "" #: ../../recipes-images.rst:371 ../../recipes-images.rst:373 #: ../../recipes-images.rst:374 ../../recipes-images.rst:375 #: ../../recipes-images.rst:376 ../../recipes-images.rst:383 -#: ../../recipes-images.rst:384 2ead7c36ab0c4053918c72ce66362785 -#: 4e660c8914e843ee9a2e4fb49925bc0a 5f3fe6b0196d41079205ede3fe06230b -#: 6793c4c049124e9eadf7cae689c3d697 c7641e5643f1484c96af3f75c1cfd32e -#: e9b2b89a79ed446ab7e45ef636c230be ef4927cf8f9a4ae3ba605110c6b585a6 +#: ../../recipes-images.rst:384 0bacf30757bb4f319e65010549478182 +#: 3ad593408aa445ce99d7f7d9479bca6d 55dc892386e3401f95cd320419c8edc9 +#: 7df71f3343174cfb84397536f4af3a84 84d138cd65ae497681d5c605ce8f2af7 +#: 95f327688bc1431c9523ec2101e353b0 c96232bb6e7340e2a5eb85364348a2a0 msgid "." msgstr "" -#: ../../recipes-images.rst:371 3f7a345b61134be69c763f944b86f625 +#: ../../recipes-images.rst:371 5897545255814fd5ba5a65241d15eced msgid "Windows Bitmap" msgstr "" -#: ../../recipes-images.rst:372 81c936be96654750bb37dfa90371fea7 -#: f512eb7d04484c9381abbd53ab0814d2 +#: ../../recipes-images.rst:372 41f6b3399986413abe65e2869c4053ea +#: d00191a3adf74e71b0459460b1c2e159 msgid "JPEG" msgstr "" -#: ../../recipes-images.rst:372 060a94640eff454db28d53d4d8512bae +#: ../../recipes-images.rst:372 d3b57018b2e3452080901854b19d1342 msgid "Joint Photographic Experts Group" msgstr "" -#: ../../recipes-images.rst:373 5a5bce5762334dccaac717a138600a11 +#: ../../recipes-images.rst:373 a3bdd964789b43cbad6247e119a6c54a msgid "JXR" msgstr "" -#: ../../recipes-images.rst:373 8084a429a67b400e95869b5b8e813071 +#: ../../recipes-images.rst:373 bbea31de8177475b8158cf220a94abcb msgid "JPEG Extended Range" msgstr "" -#: ../../recipes-images.rst:374 ac0008b96fc84574ac51851dde019bf6 +#: ../../recipes-images.rst:374 809526ac7ac74d2fb28e089e82a225d7 msgid "JPX/JP2" msgstr "" -#: ../../recipes-images.rst:374 ae20d82fbf9946b1a117506f920957ca +#: ../../recipes-images.rst:374 9bf0ef68929647cd85f92ab8f862d849 msgid "JPEG 2000" msgstr "" -#: ../../recipes-images.rst:375 7737f497c488449c83644f7befb01c86 +#: ../../recipes-images.rst:375 c791169bcfe4452e80b2573539c06ef1 msgid "GIF" msgstr "" -#: ../../recipes-images.rst:375 773d369d80ed49c6825c3b4703b47a7e +#: ../../recipes-images.rst:375 4a2960cefc3b47e496db085a39846137 msgid "Graphics Interchange Format" msgstr "" -#: ../../recipes-images.rst:376 a69e97410ed649af8078c860300897c4 +#: ../../recipes-images.rst:376 4dcf6574e1574eaf922b9851c56ab035 msgid "TIFF" msgstr "" -#: ../../recipes-images.rst:376 80854bcacce1484e8055ecd1120618cf +#: ../../recipes-images.rst:376 df65730301314c1f95cb3c5315179281 msgid "Tagged Image File Format" msgstr "" -#: ../../recipes-images.rst:377 62535ec2b89647b3a1dbfcd2fd445425 -#: fd46daf3b36a4436b9a46a70f48d5a89 +#: ../../recipes-images.rst:377 492608579f5a466e93c3441942845056 +#: 671fbf03f46c46f6a82cc000cfea3b33 msgid "PNG" msgstr "" -#: ../../recipes-images.rst:377 3a16243f47ff4cc19d7774e1b3a1faf8 +#: ../../recipes-images.rst:377 6800194509e449b699a2f117857a1789 msgid "Portable Network Graphics" msgstr "" -#: ../../recipes-images.rst:378 28d47af9538c4bbb8b24f7ef8d21dea7 -#: d647c3224e764ff28b22133a4e7e697c +#: ../../recipes-images.rst:378 12727b15f7504523b43a9f77cc9a9923 +#: 221349ddd94740f18dc2a986e2f63e53 msgid "PNM" msgstr "" -#: ../../recipes-images.rst:378 6432a408390f4b53bcf19e951c798432 +#: ../../recipes-images.rst:378 7b091d14802241e4bba073bd5e0dc0d6 msgid "Portable Anymap" msgstr "" -#: ../../recipes-images.rst:379 761c152c5cf94d1daad6980ed000fd05 -#: 7e5987d02baf45f18aa1084fc12247ef +#: ../../recipes-images.rst:379 bf3bacb00fbe43da9d560e7fbe4f78f4 +#: ed77816ad90043ff838934fe85431860 msgid "PGM" msgstr "" -#: ../../recipes-images.rst:379 f636f061523b4376926720d5c091f9fb +#: ../../recipes-images.rst:379 37c68be55f8c46a3a92da90ed0894ded msgid "Portable Graymap" msgstr "" -#: ../../recipes-images.rst:380 2b6d0620de5b405c96cbfebc923c2627 -#: ea5467c853494cf293d646b04188bd0d +#: ../../recipes-images.rst:380 6f4d332905c643b9899a52fd96de577c +#: 8530d6f66aaf4ed8b8e74e8de3aaf662 msgid "PBM" msgstr "" -#: ../../recipes-images.rst:380 2606e0029c144ddca789ec1c87bb1df3 +#: ../../recipes-images.rst:380 78f4ada30b5940558d7575226b665930 msgid "Portable Bitmap" msgstr "" -#: ../../recipes-images.rst:381 865e5c5173304f8f80504ce5c297c844 -#: cc80910e9f4d47fd828f4b9bea327b7b +#: ../../recipes-images.rst:381 18ad666221cb4e268aac5b2adcb051bc +#: e4ac66013a6b40ef8f5f8dbcc44cbf3d msgid "PPM" msgstr "" -#: ../../recipes-images.rst:381 d046e70faf6349e0945912120d4f3fae +#: ../../recipes-images.rst:381 46c1b8ed50c14c30b04706c0bcee355d msgid "Portable Pixmap" msgstr "" -#: ../../recipes-images.rst:382 18d6ff4d6bba469c9b80a8f9ee0f3f09 -#: fd78c57b6d484f2c88a4a1042082d292 +#: ../../recipes-images.rst:382 4eee3125b6b24045bf368e25ea1ccfe7 +#: 65190b879c2b49ce893b4dd5d72947a4 msgid "PAM" msgstr "" -#: ../../recipes-images.rst:382 e8a77ca7da264a5fa6381654737a6c19 +#: ../../recipes-images.rst:382 9cb3d8054e01459bad986a5ff4b72d76 msgid "Portable Arbitrary Map" msgstr "" -#: ../../recipes-images.rst:383 1231d144c5e843608669c22ec8201d1e +#: ../../recipes-images.rst:383 172c0b24c3c74558b48cecb435b62a71 msgid "PSD" msgstr "" -#: ../../recipes-images.rst:383 94f903822a6b44b89ed4e3f4221a3de7 +#: ../../recipes-images.rst:383 d957051043af4e16a05d1bab3b7846e0 msgid "Adobe Photoshop Document" msgstr "" -#: ../../recipes-images.rst:384 2c28ad129a7847059eadbc8e05b5cbf2 +#: ../../recipes-images.rst:384 61adad659533407383e3030a6a26682a msgid "PS" msgstr "" -#: ../../recipes-images.rst:384 faf1a2c21a6d4bffaa1cd7b2f5907da2 +#: ../../recipes-images.rst:384 bd96837df2984e15953ba98f2ce8e7ca msgid "Adobe Postscript" msgstr "" -#: ../../recipes-images.rst:387 583a4be61a2c4bafa4479cdce669865e +#: ../../recipes-images.rst:387 2e9599f2f28e412f95d48fc8a90716c0 msgid "The general scheme is just the following two lines::" msgstr "一般的なスキームは以下の2行です::" -#: ../../recipes-images.rst:392 3049609de6bc4e1db7867c7976b3e7a8 +#: ../../recipes-images.rst:392 6a1955099311437ea3d6c722779fe787 msgid "**Remarks**" msgstr "**コメント**" -#: ../../recipes-images.rst:394 9a4100622e7342b7b668ac0a89525c03 +#: ../../recipes-images.rst:394 5e7c8ed9975341bb9b398e94977a1c35 msgid "" -"The **input** argument of *pymupdf.Pixmap(arg)* can be a file or a bytes / " -"io.BytesIO object containing an image." +"The **input** argument of *pymupdf.Pixmap(arg)* can be a file or a bytes " +"/ io.BytesIO object containing an image." msgstr "`pymupdf.Pixmap(arg)` の入力引数は、画像を含むファイルまたはbytes/io.BytesIOオブジェクトを指定できます。" -#: ../../recipes-images.rst:395 0ce176989427408ba2c8d5c22fd12e88 +#: ../../recipes-images.rst:395 29c03f633e3c4f85905a883594780a1a msgid "" "Instead of an output **file**, you can also create a bytes object via " "*pix.tobytes(\"yyy\")* and pass this around." msgstr "出力ファイルの代わりに、 `pix.tobytes(\"yyy\")` を使用してbytesオブジェクトを作成し、それを渡すこともできます。" -#: ../../recipes-images.rst:396 013d948a6a4f43628638f2bca596e77e +#: ../../recipes-images.rst:396 08d941cbdcde49e7894c7cd54dceeb12 msgid "" "As a matter of course, input and output formats must be compatible in " -"terms of colorspace and transparency. The *Pixmap* class has batteries " +"terms of colorspace and transparency. The ``Pixmap`` class has batteries " "included if adjustments are needed." msgstr "" "もちろん、入力と出力のフォーマットは、色空間と透過性の面で互換性が必要です。 :ref:`Pixmap` " "クラスには、必要に応じて調整を行うための組み込みの機能が備わっています。" -#: ../../recipes-images.rst:399 db5afa95c954491b847c9558b4f467a0 +#: ../../recipes-images.rst:399 3264d7f4236e472d9acb18b03a6c378f msgid "**Convert JPEG to Photoshop**::" msgstr "**JPEGをPhotoshopに変換する**::" -#: ../../recipes-images.rst:405 5dab59f4100e47dcad8ec5cf2303da65 +#: ../../recipes-images.rst:405 03352131b8ff486f8481486724d51437 msgid "" "Convert **JPEG to Tkinter PhotoImage**. Any **RGB / no-alpha** image " "works exactly the same. Conversion to one of the **Portable Anymap** " @@ -785,17 +785,17 @@ msgid "" "all Tkinter versions::" msgstr "アルファ付きのPNGをTkinterのPhotoImageに変換してください。これには、PPMへの変換を行う前にアルファバイトを削除する必要があります。" -#: ../../recipes-images.rst:412 35df4de09bcb4e389281f0f6440531ea +#: ../../recipes-images.rst:412 1d8ba60c17ef4537a879f8880ddf842e msgid "" "Convert **PNG with alpha** to Tkinter PhotoImage. This requires " "**removing the alpha bytes**, before we can do the PPM conversion::" msgstr "アルファ付きのPNGをTkinterのPhotoImageに変換します。このためには、PPMへの変換を行う前にアルファバイトを取り除く必要があります。" -#: ../../recipes-images.rst:429 0ec56a6c3048426fbc82def0f2b46171 +#: ../../recipes-images.rst:429 e998a366000347d1b54bed12c09423fd msgid "How to Use Pixmaps: Gluing Images" msgstr "ピクスマップの使用方法:画像の結合" -#: ../../recipes-images.rst:431 1e71cdb5ae8f43cab911444027de4a0e +#: ../../recipes-images.rst:431 f97460e4da964505a4f7c1625d462e07 msgid "" "This shows how pixmaps can be used for purely graphical, non-document " "purposes. The script reads an image file and creates a new image which " @@ -804,19 +804,19 @@ msgstr "" "これは、ピクスマップを純粋にグラフィカルで、文書ではない目的で使用する方法を示しています。スクリプトは画像ファイルを読み込み、元の画像の3 * " "4タイルからなる新しい画像を作成します。" -#: ../../recipes-images.rst:451 29a688c26cad4830ba8d587bc5b135e3 +#: ../../recipes-images.rst:451 4e2ddaf362f641b79cccb12467620742 msgid "This is the input picture:" msgstr "これが入力画像です。" -#: ../../recipes-images.rst:456 94a92ebed7104c9a9d87232b415a6579 +#: ../../recipes-images.rst:456 517480af4baf43568e79bdb13b6ab85c msgid "Here is the output:" msgstr "こちらが出力結果です。" -#: ../../recipes-images.rst:473 c78d07ca0d0645fe8ce5283291ff7138 +#: ../../recipes-images.rst:473 172a0fbba4984e9cb6d93f6ed02742fa msgid "How to Use Pixmaps: Making a Fractal" msgstr "ピクスマップの使用方法:フラクタルの作成" -#: ../../recipes-images.rst:475 1382f75b7284462d9d90d8c19fad1320 +#: ../../recipes-images.rst:475 18c71aef80304611bec96e98bcd38669 msgid "" "Here is another Pixmap example that creates **Sierpinski's Carpet** -- a " "fractal generalizing the **Cantor Set** to two dimensions. Given a square" @@ -828,32 +828,32 @@ msgstr "" "ここでは、もう一つのピクスマップの例を紹介します。シェルピンスキーのカーペット(Sierpinski's " "Carpet)と呼ばれるフラクタルで、カントール集合を2次元に一般化したものです。正方形のカーペットにおいて、9つの部分正方形(3行3列)をマークし、中央の正方形を切り抜きます。残りの8つの部分正方形に対しても同じ操作を行い、無限に続けます。その結果、面積がゼロであり、フラクタル次元は1.8928...となります。" -#: ../../recipes-images.rst:477 1a8fccd933a24fb29b7405b992f2c17c +#: ../../recipes-images.rst:477 53c09705945d4ed3bec2d17b7c9f1581 msgid "" "This script creates an approximate image of it as a PNG, by going down to" " one-pixel granularity. To increase the image precision, change the value" " of n (precision)::" msgstr "このスクリプトは、1ピクセルの精度にまで細かくなったPNGの近似画像を作成します。画像の精度を高めるには、n(精度)の値を変更してください::" -#: ../../recipes-images.rst:531 c2785789191f4680adb1d3888a3040e5 +#: ../../recipes-images.rst:531 68789bca8b624ff491e93d5a400ff3ac msgid "The result should look something like this:" msgstr "結果は以下のようになるはずです:" -#: ../../recipes-images.rst:541 3f11a635eefb4f1dbe8652ab23d84d32 +#: ../../recipes-images.rst:541 93a642a1f6fb4a578a82d7b7baf97ad3 msgid "How to Interface with NumPy" msgstr "NumPyとのインターフェース方法" -#: ../../recipes-images.rst:543 365b84100b8e45429a7578c8e237bd0d +#: ../../recipes-images.rst:543 8f95a3058d5348dfa20391d4596a676e msgid "" "This shows how to create a PNG file from a numpy array (several times " "faster than most other methods)::" msgstr "これは、NumPy配列からPNGファイルを作成する方法を示しています(他の方法よりも数倍高速です)。" -#: ../../recipes-images.rst:570 41f6a0f4ce414d4eb3f4d770433f425a +#: ../../recipes-images.rst:570 fe1a53c3297d463785209cfc2a811f98 msgid "How to Add Images to a PDF Page" msgstr "PDFページに画像を追加する方法" -#: ../../recipes-images.rst:572 fc1f5cd9c6fc4d9783077fd7864755b2 +#: ../../recipes-images.rst:572 c4977664b53940488eefb7c79db6760f msgid "" "There are two methods to add images to a PDF page: " ":meth:`Page.insert_image` and :meth:`Page.show_pdf_page`. Both methods " @@ -862,123 +862,123 @@ msgstr "" "PDFページに画像を追加するには、2つの方法があります: :meth:`Page.insert_image` と " ":meth:`Page.show_pdf_page` です。両方の方法には共通点がありますが、違いもあります。" -#: ../../recipes-images.rst:575 f6bed4d92b4447548f8e685b63873544 +#: ../../recipes-images.rst:575 05867b3cbf1e4cfbb8b56cd82480ca49 msgid "**Criterion**" msgstr "**基準**" -#: ../../recipes-images.rst:575 03eeb849f2fb416b902b8d32988ea350 +#: ../../recipes-images.rst:575 1a4fb4ba40034ec697f3f519a1472c05 msgid ":meth:`Page.insert_image`" msgstr "" -#: ../../recipes-images.rst:575 4d3cad53d72841ec90aeccebf7483b58 +#: ../../recipes-images.rst:575 c77d016df1554917b7a351e1213d6d30 msgid ":meth:`Page.show_pdf_page`" msgstr "" -#: ../../recipes-images.rst:577 e7e40ce8c4b948f09365129796d9fcfb +#: ../../recipes-images.rst:577 adaf610a08404152879eecde101b3358 msgid "displayable content" msgstr "表示可能なコンテンツ" -#: ../../recipes-images.rst:577 551e6603672c4e0dafe0e0d7a7298c0a +#: ../../recipes-images.rst:577 be7f0aa395a84ea0967b19ea32e118ad msgid "image file, image in memory, pixmap" msgstr "画像ファイル、メモリ内の画像、ピクスマップ " -#: ../../recipes-images.rst:577 a8634d2d9eac41189d0ccd8fb7bb6f1f +#: ../../recipes-images.rst:577 5dcf084c5bf14f44b42f33e83b39ffb0 msgid "PDF page" msgstr "PDFページ" -#: ../../recipes-images.rst:578 99d8289af4a7498d81841e09e222846d +#: ../../recipes-images.rst:578 b21f95bfb2da4d1da8dc1a8de8fcd793 msgid "display resolution" msgstr "表示解像度 " -#: ../../recipes-images.rst:578 f7ee2430134e4899b54983345ce20135 +#: ../../recipes-images.rst:578 e5fb57d9b06e415496d5fdd4ad9d2860 msgid "image resolution" msgstr "画像の解像度 " -#: ../../recipes-images.rst:578 66e86a84353841ada79831c1ce7f4dc8 +#: ../../recipes-images.rst:578 f162cd0a2ec54a14bc65d19390efb3ab msgid "vectorized (except raster page content)" msgstr "ベクトル化(ラスターページコンテンツを除く)" -#: ../../recipes-images.rst:579 a85104d948b143249aa5cf73d16f6688 +#: ../../recipes-images.rst:579 8f71139fa4184451a269095eaf3b024d msgid "rotation" msgstr "回転" -#: ../../recipes-images.rst:579 607ea8bf8b014bd684619f32b956a1a3 +#: ../../recipes-images.rst:579 e07ae649fe5a43b98128e34d2b7295f4 msgid "0, 90, 180 or 270 degrees" msgstr "0度、90度、180度または270度" -#: ../../recipes-images.rst:579 2db9fe6f73574ee7b33649bb0ba9ca21 +#: ../../recipes-images.rst:579 6f5358e1760c4bfca5a3a418b8c268ff msgid "any angle" msgstr "任意の角度" -#: ../../recipes-images.rst:580 92cb77d48fbb4c63af24d009bdae1683 +#: ../../recipes-images.rst:580 fd811b11808e4d7fa0b6e434c51cc9de msgid "clipping" msgstr "クリッピング" -#: ../../recipes-images.rst:580 6a869dfb1ec94eb597192e33bca23bf5 +#: ../../recipes-images.rst:580 c2558fbbf1774081b28e0116ee882210 msgid "no (full image only)" msgstr "いいえ(全体の画像のみ)" #: ../../recipes-images.rst:580 ../../recipes-images.rst:585 -#: c8dd80f20a02432186369babe3d3c61c faee3b7bab8242d9a19e15a2f9ac4464 +#: a907ff72bff14ccab44936c7756bc1a0 dc5568a67d5546399d10903c2198e7b1 msgid "yes" msgstr "はい" -#: ../../recipes-images.rst:581 1ee1a2e6211f486a90c386bef7dec18f +#: ../../recipes-images.rst:581 9be3b939efd74eb9b064149922973fd7 msgid "keep aspect ratio" msgstr "アスペクト比を保持" -#: ../../recipes-images.rst:581 adc4a995440d4da496aea4bce6b82466 -#: f332b08e187747f09d8b98a35ef9a0c0 +#: ../../recipes-images.rst:581 90e967a63c944ad2a4d5d5e1a1e1f586 +#: ae736e0e2d874c22a9ff0e8ec0eafd07 msgid "yes (default option)" msgstr "はい(デフォルトオプション)" -#: ../../recipes-images.rst:582 05e8dfc30dbe40748aea71fc9619f7af +#: ../../recipes-images.rst:582 149cd46d36314fd9983779124a4b00a5 msgid "transparency (water marking)" msgstr "透明性(ウォーターマーキング)" -#: ../../recipes-images.rst:582 050f6199006e4ccfacee78df76a8d05c +#: ../../recipes-images.rst:582 f5ee92e1f762447294b068b3151cf8ba msgid "depends on the image" msgstr "画像による" -#: ../../recipes-images.rst:582 81369e59d75d491e8d678432a35e6e74 +#: ../../recipes-images.rst:582 48bce5fbaea9451c8a0205e90189408b msgid "depends on the page" msgstr "ページによる" -#: ../../recipes-images.rst:583 49aa81a6bb824fd2b3db842c1d2c7b29 +#: ../../recipes-images.rst:583 b0cc7970f86848258e39444054ac610b msgid "location / placement" msgstr "位置/配置 " -#: ../../recipes-images.rst:583 a9be6f31c65f49b5b9c2b547af896a26 -#: e8a28741c85c44668a45bdf05a37e4ad +#: ../../recipes-images.rst:583 3d965dc24e154178970ddf5ed7662f16 +#: 5a690d8091e446ac921b5a5e97de9884 msgid "scaled to fit target rectangle" msgstr "ターゲットの矩形にフィットするようにスケーリング" -#: ../../recipes-images.rst:584 d93700c638204849bddde53668374202 +#: ../../recipes-images.rst:584 78fa2e33851d443584542c9de0f6ea73 msgid "performance" msgstr "パフォーマンス" -#: ../../recipes-images.rst:584 1d9f1a8e4a694746aa7059ff5ad1e25f -#: 5e4b8fd3e2f7483ab2c70701a52a3948 +#: ../../recipes-images.rst:584 07bc6beb376d4561bf3ed4427bfeada8 +#: 883bd897a4de4ed2a0f2af42a61dd792 msgid "automatic prevention of duplicates;" msgstr "重複の自動防止" -#: ../../recipes-images.rst:585 cb5b45d5d50f4260a253739da3341799 +#: ../../recipes-images.rst:585 7ef2987d846a48a9a38bb80ba9ee36be msgid "multi-page image support" msgstr "マルチページ画像のサポート" -#: ../../recipes-images.rst:585 831d03ce54e546b1b3aa02ef72a7a47b +#: ../../recipes-images.rst:585 02be9acec59f4fa3adf501ba7f63438f msgid "no" msgstr "いいえ" -#: ../../recipes-images.rst:586 d93e83a8c44d4e559acf150584aa5766 +#: ../../recipes-images.rst:586 018cb20575654c4aa10c951f189464f3 msgid "ease of use" msgstr "使いやすさ" -#: ../../recipes-images.rst:586 11960f62e46047faa5006a43340aabcd +#: ../../recipes-images.rst:586 c28d925902ab48b389c171a05aca19c6 msgid "simple, intuitive;" msgstr "シンプルで直感的" -#: ../../recipes-images.rst:586 e98055097b174ba5935e1c02fea4d6f5 +#: ../../recipes-images.rst:586 afc67eb6d74a495c9dc4e53eb661ae08 msgid "" "simple, intuitive; **usable for all document types** (including images!) " "after conversion to PDF via :meth:`Document.convert_to_pdf`" @@ -986,7 +986,7 @@ msgstr "" "シンプルで直感的; :meth:`Document.convert_to_pdf` " "を介してPDFに変換後、すべてのドキュメントタイプ(画像を含む!)に使用可能" -#: ../../recipes-images.rst:592 ccbaf150ba1b4d9192ce0dcbc8afa5c0 +#: ../../recipes-images.rst:592 e4d67c78bd67458c84faeb0c8e6ea5f5 msgid "" "Basic code pattern for :meth:`Page.insert_image`. **Exactly one** of the " "parameters **filename / stream / pixmap** must be given, if not re-" @@ -995,7 +995,7 @@ msgstr "" ":meth:`Page.insert_image` の基本的なコードパターン。 **filename / stream / pixmap** " "のうち、1つだけを指定する必要があります(既存の画像を再挿入しない場合)::" -#: ../../recipes-images.rst:607 95fc1f1fe4614a4aa9e56ad6f7fc38ea +#: ../../recipes-images.rst:607 a7bbf44ff07e494bb6788af779c4f19f msgid "" "Basic code pattern for :meth:`Page.show_pdf_page`. Source and target PDF " "must be different :ref:`Document` objects (but may be opened from the " @@ -1004,42 +1004,42 @@ msgstr "" ":meth:`Page.show_pdf_page` の基本的なコードパターン。ソースとターゲットのPDFは異なる :ref:`Document`" " オブジェクトである必要があります(ただし、同じファイルから開くこともできます)::" -#: ../../recipes-images.rst:623 9e922a74c489421099a0e702712fdd58 +#: ../../recipes-images.rst:623 247c3cb945de42e3977137d8975573b2 msgid "How to Use Pixmaps: Checking Text Visibility" msgstr "ピクスマップの使用方法:テキストの表示可否の確認" -#: ../../recipes-images.rst:625 2bdafc651bac41318b4a34e153c824e1 +#: ../../recipes-images.rst:625 265feb286a04491a9466ccd75f125d7a msgid "" "Whether or not a given piece of text is actually visible on a page " "depends on a number of factors:" msgstr "特定のテキストが実際にページ上で表示されるかどうかは、いくつかの要因に依存します:" -#: ../../recipes-images.rst:627 5a50d5aa11034a22b35e0f10a00c889c +#: ../../recipes-images.rst:627 cb95f70cf5474c549b283bb06a5b637d msgid "" "Text is not covered by another object but may have the same color as the " "background i.e., white-on-white etc." msgstr "テキストは他のオブジェクトによって隠されていないが、背景と同じ色を持っている場合があります。例えば、白文字が白地になっているなどです。" -#: ../../recipes-images.rst:628 d2afd2e720a942cdbb8b824f28ad2f88 +#: ../../recipes-images.rst:628 d8c9eec28274456bbae7dfd39049394b msgid "" "Text may be covered by an image or vector graphics. Detecting this is an " "important capability, for example to uncover badly anonymized legal " "documents." msgstr "テキストは画像やベクトルグラフィックスによって隠されている場合があります。これを検出することは重要な機能であり、例えば不適切に匿名化された法的文書を解明するために使用されます。" -#: ../../recipes-images.rst:629 60b73873bc724ab3bca737b319b30616 +#: ../../recipes-images.rst:629 54573a8eea4e421ca5e82c476f55b0e9 msgid "" "Text is created hidden. This technique is usually used by OCR tools to " "store the recognized text in an invisible layer on the page." msgstr "テキストが非表示に作成される場合があります。これは通常、OCRツールが認識されたテキストをページ上の非表示レイヤーに保存するために使用されます。" -#: ../../recipes-images.rst:631 2eff9fc0d32f452f9ba37cc0aea8fe8e +#: ../../recipes-images.rst:631 421ec6799ba94504a184bb6003eeeac8 msgid "" "The following shows how to detect situation 1. above, or situation 2. if " "the covering object is unicolor::" msgstr "以下では、1.の状況を検出する方法、または2.の状況を検出する方法(カバーしているオブジェクトが単色である場合)を示します::" -#: ../../recipes-images.rst:645 ecfb16ad4ba0444ca956718194752f84 +#: ../../recipes-images.rst:645 a958215274f14ffc9a1039c6445e57ec msgid "" "Method :meth:`Pixmap.color_topusage` returns a tuple `(ratio, pixel)` " "where 0 < ratio <= 1 and *pixel* is the pixel value of the color. Please " @@ -1050,7 +1050,7 @@ msgstr "" "(比率、ピクセル)を返します。ここで、0 < ratio <= " "1であり、pixelは色のピクセル値です。複数のヒット矩形がある場合、ピクスマップを1回だけ作成することに注意してください。これにより、処理時間を大幅に節約できます。" -#: ../../recipes-images.rst:647 0eb5d30aaa1f4989aa211ee2351dc258 +#: ../../recipes-images.rst:647 675626a41d9f4ee49cee5bb637261c3f msgid "" "The logic of the above code is: If the needle's rectangle is (\"almost\":" " > 95%) unicolor, then the text cannot be visible. A typical result for " @@ -1060,17 +1060,16 @@ msgstr "" "上記のコードのロジックは次の通りです:もしニードルの矩形が「ほぼ」(95%以上)単色であれば、テキストは表示されないと判断します。テキストが表示される場合の典型的な結果は、背景の色(主に白)と比率が0.7から0.8程度で返されることがあります。例えば、`(0.685," " b'xffxffxff')` のような結果が得られます。" -#: ../../footer.rst:71 e62bf15bea60489ba6796a439b0c5337 +#: ../../footer.rst:60 20230f8c88394d47a41e985bb5942765 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 267d34b8252a473fa583fd41bd935e06 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/recipes-journalling.mo b/docs/locales/ja/LC_MESSAGES/recipes-journalling.mo index c19b15198..93c897003 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes-journalling.mo and b/docs/locales/ja/LC_MESSAGES/recipes-journalling.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes-journalling.po b/docs/locales/ja/LC_MESSAGES/recipes-journalling.po index 145e65534..152923ac0 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes-journalling.po +++ b/docs/locales/ja/LC_MESSAGES/recipes-journalling.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,33 +19,33 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 c9ea67f61cbe4b93925046695a1bc24f +#: ../../header.rst:-1 1dec65ff7f144a209a6670156424f1bd msgid "Artifex" msgstr "" -#: ../../header.rst:-1 feac7bfc799b46deab21500b1062f628 +#: ../../header.rst:-1 a2496778c1824e0d8507743948d5699d msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 8c87257b98614455b89f51f9478b44e8 +#: ../../header.rst:-1 d11779a821a640a9b5f1a505bdf860e4 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../recipes-journalling.rst:7 1c1bed105a19499090547ca288fc6458 +#: ../../recipes-journalling.rst:7 71340aa0c4f8460eb610827b5dd6a0e2 msgid "Journalling" msgstr "ジャーナリング" -#: ../../recipes-journalling.rst:10 7e8aebfe482c481298e1b3888fdd3346 +#: ../../recipes-journalling.rst:10 982db193623640f18388d6961fe5fc64 msgid "" "Starting with version 1.19.0, journalling is possible when updating PDF " "documents." msgstr "バージョン1.19.0から、PDFドキュメントの更新時にジャーナリングが可能になりました。" -#: ../../recipes-journalling.rst:12 a85187462bcb4a509ce57b9ea2298b9f +#: ../../recipes-journalling.rst:12 239c97bb5a8f4f329aa3e2fcd8a01db7 msgid "" "Journalling is a logging mechanism which permits either **reverting** or " "**re-applying** changes to a PDF. Similar to LUWs \"Logical Units of " @@ -54,7 +54,7 @@ msgid "" "LUW." msgstr "ジャーナリングは、PDFへの変更を元に戻したり再適用したりするためのログ記録メカニズムです。近代的なデータベースシステムにおける「論理ユニット・オブ・ワーク(LUW)」のように、一連の更新を「操作」としてグループ化することができます。MuPDFジャーナリングでは、操作がLUWの役割を果たします。" -#: ../../recipes-journalling.rst:14 f1bd5ae490dd487aa0220769d27910ca +#: ../../recipes-journalling.rst:14 2e4f6dca544a400cb7dc16a559d9e182 msgid "" "In contrast to LUW implementations found in database systems, MuPDF " "journalling happens on a **per document level**. There is no support for " @@ -62,14 +62,14 @@ msgid "" "one's own logic here." msgstr "データベースシステムで見られるLUWの実装とは異なり、MuPDFジャーナリングはドキュメント単位で行われます。複数のPDFで同時に更新するためのサポートはありません。それぞれのPDFに対して独自のロジックを確立する必要があります。" -#: ../../recipes-journalling.rst:16 dd62330704ba4d7989b74434ca04ec8b +#: ../../recipes-journalling.rst:16 001589c65f8641d5a1bc838871c82e35 msgid "" "Journalling must be *enabled* via a document method. Journalling is " "possible for existing or new documents. Journalling **can be disabled " "only** by closing the file." msgstr "ジャーナリングは、ドキュメントメソッドを介して有効にする必要があります。既存のドキュメントまたは新規ドキュメントのジャーナリングが可能です。ファイルを閉じることでのみジャーナリングを無効にすることができます。" -#: ../../recipes-journalling.rst:17 10fb6b2454ac480eacf1393233d0c015 +#: ../../recipes-journalling.rst:17 a4f5223ab97d41c0a62d52cebe7f3f76 msgid "" "Once enabled, every change must happen inside an *operation* -- otherwise" " an exception is raised. An operation is started and stopped via document" @@ -78,26 +78,26 @@ msgid "" "\"undone\" resp. \"redone\"." msgstr "有効になると、すべての変更は操作の内部で行われる必要があります。そうでない場合、例外が発生します。操作はドキュメントメソッドを介して開始および停止されます。これらの呼び出し間で行われる更新はLUWを形成し、集合的に元に戻すか再適用するために使用できます。MuPDFの用語で言えば、「元に戻す」または「やり直す」ことができます。" -#: ../../recipes-journalling.rst:18 2f3df92db9dc464da7ca2d03eb425d34 +#: ../../recipes-journalling.rst:18 25ef245260a64a689f1ba395d0478ac2 msgid "" "At any point, the journalling status can be queried: whether journalling " "is active, how many operations have been recorded, whether \"undo\" or " "\"redo\" is possible, the current position inside the journal, etc." msgstr "いつでも、ジャーナリングの状態をクエリできます。ジャーナリングがアクティブかどうか、いくつの操作が記録されたか、元に戻すかやり直すかが可能か、ジャーナル内の現在位置などがわかります。" -#: ../../recipes-journalling.rst:19 f55aba99119f45ec8ade758def1674fb +#: ../../recipes-journalling.rst:19 892e3b69463b47138a6b723746d7696b msgid "" "The journal can be **saved to** or **loaded from** a file. These are " "document methods." msgstr "ジャーナルはファイルに保存またはロードできます。これらはドキュメントメソッドです。" -#: ../../recipes-journalling.rst:20 69d767f6eb404d0d98265c4669b3aea6 +#: ../../recipes-journalling.rst:20 cdc871b87c994a95b38a0893539bf950 msgid "" "When loading a journal file, compatibility with the document is checked " "and journalling is automatically enabled upon success." msgstr "ジャーナルファイルをロードする際には、ドキュメントとの互換性がチェックされ、成功した場合に自動的にジャーナリングが有効になります。" -#: ../../recipes-journalling.rst:21 f7b025c60e7a46ed9d42749c5ac74ed8 +#: ../../recipes-journalling.rst:21 1196a86518ec42bca06599556dfdd95a msgid "" "For an **existing** PDF being journalled, a special new save method is " "available: :meth:`Document.save_snapshot`. This performs a special " @@ -111,7 +111,7 @@ msgstr "" " " "これにより、これまでにジャーナリングされたすべての更新を含む特別なインクリメンタル保存が行われます。そのジャーナルも同時に保存される場合(ドキュメントスナップショットの直後に保存)、ドキュメントとジャーナルは同期され、後で操作を元に戻したりやり直したりするために一緒に使用できるようになります。まるで中断がなかったかのように。" -#: ../../recipes-journalling.rst:22 db18529a0c844b35bf6eaff7559ce8d7 +#: ../../recipes-journalling.rst:22 9d858c95d29142a3a507fa019d4e9d37 msgid "" "The snapshot PDF is a valid PDF in every aspect and fully usable. If the " "document is however changed in any way without using its journal file, " @@ -119,7 +119,7 @@ msgid "" "unusable." msgstr "スナップショットPDFは、あらゆる側面で有効なPDFであり、完全に使用可能です。ただし、ジャーナルファイルを使用せずにドキュメントが変更された場合、同期が取れなくなり、ジャーナルは利用できなくなります。" -#: ../../recipes-journalling.rst:23 52515e19761c4cdfbee5029c3943f61c +#: ../../recipes-journalling.rst:23 4e9981f3904e441abb451168eda31059 msgid "" "Snapshot files are structured like incremental updates. Nevertheless, the" " internal journalling logic requires, that saving **must happen to a new " @@ -133,56 +133,55 @@ msgstr "" "snap1.log` 、 `original-snap2.pdf` / `original-snap2.log` " "など)の間に認識可能な関係をサポートするためのファイル命名規則を開発する必要があります。" -#: ../../recipes-journalling.rst:26 44fec7bd34a24d9380fd2191ee3ae346 +#: ../../recipes-journalling.rst:26 264672a5144c439aa2688cf062e5a892 msgid "Example Session 1" msgstr "例セッション1" #: ../../recipes-journalling.rst:27 ../../recipes-journalling.rst:98 -#: 16fc6ea3287a4fdab3630a9b910b5a19 d0ad8008dcc1466fb2321d7364aa02a6 +#: 8fc51b450a4641898c023ca78938b76c b070a7f183aa43c1952ff72bd0f73150 msgid "Description:" msgstr "説明:" -#: ../../recipes-journalling.rst:29 aee1edf4691740dfb322a61f3294c45c +#: ../../recipes-journalling.rst:29 47b36e04f5904ef6b8e643c6c2931dc9 msgid "" "Make a new PDF and enable journalling. Then add a page and some text " "lines -- each as a separate operation." msgstr "新しいPDFを作成し、ジャーナリングを有効にします。次に、ページを追加し、いくつかのテキスト行を別々の操作として追加します。" -#: ../../recipes-journalling.rst:30 ef2ac509d78942d7932e263f143d8b90 +#: ../../recipes-journalling.rst:30 d39c4b27b3da4f7d87244024fe21133e msgid "" "Navigate within the journal, undoing and redoing these updates and " "displaying status and file results::" msgstr "ジャーナル内を移動し、これらの更新を元に戻したりやり直したりし、状態やファイルの結果を表示します::" -#: ../../recipes-journalling.rst:97 4b7d3cfb67c14c2b9d2e07841b11e4bb +#: ../../recipes-journalling.rst:97 7f4dff6cd221460f9f0864bb65418846 msgid "Example Session 2" msgstr "例セッション2" -#: ../../recipes-journalling.rst:100 c5a76cbf8aa6439ca18fd29dd5a01988 +#: ../../recipes-journalling.rst:100 739153cf7c154739af31ab2abb5d842f msgid "" "Similar to previous, but after undoing some operations, we now add a " "different update. This will cause:" msgstr "前回と同様ですが、いくつかの操作を元に戻した後、異なる更新を追加します。これにより、次のことが起こります:" -#: ../../recipes-journalling.rst:102 c062b7d8897e43c39810eefd02397e9d +#: ../../recipes-journalling.rst:102 d1dfb6a4d5d948b6981dc9765882191b msgid "permanent removal of the undone journal entries" msgstr "元に戻されたジャーナルエントリが永久に削除されます。" -#: ../../recipes-journalling.rst:103 70eeb05d4334440ab01885b7948894d4 +#: ../../recipes-journalling.rst:103 19eab643d86a4d72b86f188ae3dd2592 msgid "the new update operation will become the new last entry." msgstr "新しい更新操作は新しい最後のエントリになります。" -#: ../../footer.rst:71 69af626b25f54afa805f443e5e8d8c73 +#: ../../footer.rst:60 187a959e74914bfe8f8d8164226852bd msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 03353894540d40c2a597c0f859c72d96 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/recipes-low-level-interfaces.mo b/docs/locales/ja/LC_MESSAGES/recipes-low-level-interfaces.mo index 5b1c0dd0d..d6f38323d 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes-low-level-interfaces.mo and b/docs/locales/ja/LC_MESSAGES/recipes-low-level-interfaces.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes-low-level-interfaces.po b/docs/locales/ja/LC_MESSAGES/recipes-low-level-interfaces.po index ead3a0a63..b9d33bef1 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes-low-level-interfaces.po +++ b/docs/locales/ja/LC_MESSAGES/recipes-low-level-interfaces.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 63a8868f6bef45f4b9ee572281ebfe04 +#: ../../header.rst:-1 7f129fba564145f8954ab3f7e226f0ec msgid "Artifex" msgstr "" -#: ../../header.rst:-1 8aaab44ecce44e0099842f63630e99c3 +#: ../../header.rst:-1 c67d240759fd40d187a0308599adeca9 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 5482b2e50c4d4769a2cf18d70e23b32f +#: ../../header.rst:-1 076a135f5e7c4cc5bd9192d710ce8cdb msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../recipes-low-level-interfaces.rst:7 5469707b07014cf496b9c72889f5afe5 +#: ../../recipes-low-level-interfaces.rst:7 4f7ca622e5254dcb820080c8ec29fe16 msgid "Low-Level Interfaces" msgstr "低レベルインターフェース" -#: ../../recipes-low-level-interfaces.rst:10 1004b2d12dcf40a9a9b21306fa310bb6 +#: ../../recipes-low-level-interfaces.rst:10 1fea1e3b7f2f4f31a3c902bf61e962c9 msgid "" "Numerous methods are available to access and manipulate PDF files on a " "fairly low level. Admittedly, a clear distinction between \"low level\" " @@ -47,7 +47,7 @@ msgid "" "personal taste." msgstr "PDFファイルにアクセスして操作するための多くのメソッドが低レベルで利用可能です。正直なところ、「低レベル」機能と「通常」機能の明確な区別は常にできるわけではなく、個人の好みによるところもあります。" -#: ../../recipes-low-level-interfaces.rst:12 092206e1c51d4b3b9f06bb1688adab61 +#: ../../recipes-low-level-interfaces.rst:12 1de25fa4e10d4576a94ca8b7096618bd msgid "" "It also may happen, that functionality previously deemed low-level is " "later on assessed as being part of the normal interface. This has " @@ -57,18 +57,18 @@ msgstr "" "また、以前は低レベルと考えられていた機能が後に通常のインターフェースの一部として評価されることもあります。例えば、バージョン1.14.0ではクラス" " :ref:`Tools` についてそのようなことが起きており、現在では「Classes」のセクションで見つけることができます。" -#: ../../recipes-low-level-interfaces.rst:14 5d0506fb02a84df4b377ada36b204e7a +#: ../../recipes-low-level-interfaces.rst:14 1007d8a4ff5c4147805c1dc892b9b29c msgid "" "It is a matter of documentation only in which chapter of the " "documentation you find what you are looking for. Everything is available " "and always via the same interface." msgstr "何を探しているかに関しては、ドキュメントのどのセクションにあるかはドキュメンテーションのみの問題です。すべての情報は同じインターフェースを介して常に利用可能です。" -#: ../../recipes-low-level-interfaces.rst:19 6af40282994c469bbfda640d3395f1cf +#: ../../recipes-low-level-interfaces.rst:19 f087f3a96eec4b1a9dd86d6e8a3cffd7 msgid "How to Iterate through the :data:`xref` Table" msgstr ":data:`xref` テーブルのイテレーション方法" -#: ../../recipes-low-level-interfaces.rst:20 052c71493a6e43aba1e87845e0d77155 +#: ../../recipes-low-level-interfaces.rst:20 0027f20fcd894b3f921d205dbf3c6fbb msgid "" "A PDF's :data:`xref` table is a list of all objects defined in the file. " "This table may easily contain many thousands of entries -- the manual " @@ -81,26 +81,26 @@ msgstr "" ":ref:`AdobeManual` " "マニュアルには127,000のオブジェクトが含まれています。テーブルのエントリ「0」は予約されており、触れてはいけません" -#: ../../recipes-low-level-interfaces.rst:32 f3c1348ad2d34cd8babc0eb28c7e4a32 +#: ../../recipes-low-level-interfaces.rst:32 bf35a4cef5db4592ba20e8879d737aff msgid "This produces the following output::" msgstr "これにより、以下の出力が生成されます::" -#: ../../recipes-low-level-interfaces.rst:72 d9e8a84e3421464e99dff496884cb2b0 +#: ../../recipes-low-level-interfaces.rst:72 b83975ea49a84c1a8993fd6918a32c64 msgid "A PDF object definition is an ordinary ASCII string." msgstr "PDFオブジェクトの定義は通常のASCII文字列です。" -#: ../../recipes-low-level-interfaces.rst:77 994ce17a00e840fb8b05195b16a8d4fc +#: ../../recipes-low-level-interfaces.rst:77 2cab525052174e5889a8b5eeea539330 msgid "How to Handle Object Streams" msgstr "オブジェクトストリームの処理方法" -#: ../../recipes-low-level-interfaces.rst:78 0baeb83b0abd47d0b29848fa1b5772a0 +#: ../../recipes-low-level-interfaces.rst:78 658c13e1cc6947b09fc237301c2bc678 msgid "" "Some object types contain additional data apart from their object " "definition. Examples are images, fonts, embedded files or commands " "describing the appearance of a page." msgstr "オブジェクトストリームの処理方法一部のオブジェクトタイプには、オブジェクト定義以外に追加のデータが含まれています。例として、画像、フォント、埋め込みファイル、またはページの外観を記述するコマンドが挙げられます。" -#: ../../recipes-low-level-interfaces.rst:80 a2d7878bb0874d468e245aa36747dcdf +#: ../../recipes-low-level-interfaces.rst:80 2796bcc0f1ed4c599541dd675171586e msgid "" "Objects of these types are called \"stream objects\". PyMuPDF allows " "reading an object's stream via method :meth:`Document.xref_stream` with " @@ -112,13 +112,13 @@ msgstr "" "を引数としてオブジェクトのストリームを読み取ることができます。また、:meth:`Document.update_stream` " "を使用して、ストリームの変更されたバージョンを書き戻すことも可能です。" -#: ../../recipes-low-level-interfaces.rst:82 9013aa1daeb740e48f3a6a542573599b +#: ../../recipes-low-level-interfaces.rst:82 3771d4779f8f40dba59160b01c9ee9cf msgid "" "Assume that the following snippet wants to read all streams of a PDF for " "whatever reason::" msgstr "次のスニペットが、PDFのすべてのストリームを読み取るためのものであると仮定します::" -#: ../../recipes-low-level-interfaces.rst:91 7b3d55e06b37453b97cfb9f09a3fd688 +#: ../../recipes-low-level-interfaces.rst:91 9c27d6d70d6b40fba9999600e789863f msgid "" ":meth:`Document.xref_stream` automatically returns a stream decompressed " "as a bytes object -- and :meth:`Document.update_stream` automatically " @@ -128,11 +128,11 @@ msgstr "" "は自動的にバイトオブジェクトとして展開されたストリームを返し、:meth:`Document.update_stream` " "は必要に応じて自動的に圧縮されます。" -#: ../../recipes-low-level-interfaces.rst:96 8343ff4670604b67b5d6b0ea475f2287 +#: ../../recipes-low-level-interfaces.rst:96 8090153b26c14df4a507877668bc7624 msgid "How to Handle Page Contents" msgstr "ページ内容の処理方法" -#: ../../recipes-low-level-interfaces.rst:97 5a9610e848844fd689962d831a8c9e19 +#: ../../recipes-low-level-interfaces.rst:97 848d7acefeb245dc8af34902fe0aff24 msgid "" "A PDF page can have zero or multiple :data:`contents` objects. These are " "stream objects describing **what** appears **where** and **how** on a " @@ -144,13 +144,13 @@ msgstr "" "オブジェクトが存在できます。これらは、ページ上に何がどこにどのように表示されるかを記述するストリームオブジェクト(テキストや画像など)です。これらは、:ref:`AdobeManual`" " のページ643の「付録A - オペレーターサマリー」などで説明されている特別なミニ言語で記述されています。" -#: ../../recipes-low-level-interfaces.rst:99 4735935ea59649119988a1b17a868a65 +#: ../../recipes-low-level-interfaces.rst:99 4188f5c77de44ced870411c31528cec5 msgid "" "Every PDF reader application must be able to interpret the contents " "syntax to reproduce the intended appearance of the page." msgstr "すべてのPDFリーダーアプリケーションは、コンテンツの構文を解釈してページの意図した表示を再現できる必要があります。" -#: ../../recipes-low-level-interfaces.rst:101 cd92df1fc6484da889a7ff0ffb224c87 +#: ../../recipes-low-level-interfaces.rst:101 1f87bc0453d24082b53750397e2d3f74 msgid "" "If multiple :data:`contents` objects are provided, they must be " "interpreted in the specified sequence in exactly the same way as if they " @@ -159,13 +159,13 @@ msgstr "" "複数の :data:`contents` " "オブジェクトが提供される場合、それらは複数のコンテンツを連結した場合とまったく同じ方法で、指定された順序で解釈される必要があります。" -#: ../../recipes-low-level-interfaces.rst:103 5005dc7b3e104df59ea260ba42b8a88a +#: ../../recipes-low-level-interfaces.rst:103 c8df9beb4ec84255a6972a53be5fca52 msgid "" "There are good technical arguments for having multiple :data:`contents` " "objects:" msgstr "複数の :data:`contents` オブジェクトを持つメリットには、次のような良い技術的理由があります:" -#: ../../recipes-low-level-interfaces.rst:105 e8f5f7b6e4db4126bb54c53951c9f698 +#: ../../recipes-low-level-interfaces.rst:105 98cc88c334df4c1ebefdc905e195d627 msgid "" "It is a lot easier and faster to just add new :data:`contents` objects " "than maintaining a single big one (which entails reading, decompressing, " @@ -174,7 +174,7 @@ msgstr "" "新しい :data:`contents` " "オブジェクトを追加するだけで、単一の大きなコンテンツオブジェクトを維持するよりもはるかに簡単で高速です(各変更のたびに読み取り、展開、変更、再圧縮、書き直しが必要です)。" -#: ../../recipes-low-level-interfaces.rst:106 ab9767bef4ee46a2af8bfce074156c85 +#: ../../recipes-low-level-interfaces.rst:106 f2458f2703db48d58afa2677cb1a6f0b msgid "" "When working with incremental updates, a modified big :data:`contents` " "object will bloat the update delta and can thus easily negate the " @@ -183,7 +183,7 @@ msgstr "" "増分更新を使用する場合、修正された大きな :data:`contents` " "オブジェクトは更新デルタを膨らませ、増分保存の効率を簡単に打ち消す可能性があります。" -#: ../../recipes-low-level-interfaces.rst:108 8cb5dd1a2e014d478f0c366c11200ec9 +#: ../../recipes-low-level-interfaces.rst:108 774608ae29314d87af2590cc55b0b96a msgid "" "For example, PyMuPDF adds new, small :data:`contents` objects in methods " ":meth:`Page.insert_image`, :meth:`Page.show_pdf_page` and the " @@ -192,7 +192,7 @@ msgstr "" "例えば、PyMuPDFは :meth:`Page.insert_image` 、 :meth:`Page.show_pdf_page` 、および" " :ref:`Shape` メソッドで新しい小さな :data:`contents` オブジェクトを追加します。" -#: ../../recipes-low-level-interfaces.rst:110 d27156d317da44c2b4a2367fd66cec03 +#: ../../recipes-low-level-interfaces.rst:110 5cc4b562e7f643678dec3abbd5c901af msgid "" "However, there are also situations when a **single** :data:`contents` " "object is beneficial: it is easier to interpret and more compressible " @@ -201,11 +201,11 @@ msgstr "" "ただし、単一の :data:`contents` " "オブジェクトが有益な状況もあります。それは複数の小さなオブジェクトよりも解釈が容易で、圧縮が効果的です。" -#: ../../recipes-low-level-interfaces.rst:112 4d1dc640c85e4c938b5f58e3cda7b64c +#: ../../recipes-low-level-interfaces.rst:112 f8d8be1710d74bb9b417dc9948c862c9 msgid "Here are two ways of combining multiple contents of a page::" msgstr "以下は、ページの複数のコンテンツを組み合わせる2つの方法です:" -#: ../../recipes-low-level-interfaces.rst:124 183742e468cd4480a19d2027f1694962 +#: ../../recipes-low-level-interfaces.rst:124 0016b0cc7db9493c9b5bfecfdd25e99c msgid "" "The clean function :meth:`Page.clean_contents` does a lot more than just " "glueing :data:`contents` objects: it also corrects and optimizes the PDF " @@ -215,18 +215,18 @@ msgstr "" ":meth:`Page.clean_contents` は、:data:`contents` " "オブジェクトを結合するだけでなく、ページのPDFオペレータ構文を修正し最適化し、ページのオブジェクト定義との整合性を保つためにも役立ちます。" -#: ../../recipes-low-level-interfaces.rst:129 366f5499d555455daff3743400fce7a8 +#: ../../recipes-low-level-interfaces.rst:129 8fd84d6a4af441adb8fcf1c77aa5b0bd msgid "How to Access the PDF Catalog" msgstr "PDFカタログへのアクセス方法" -#: ../../recipes-low-level-interfaces.rst:130 49f29ed4723a4265af1fe760ee7d0fa6 +#: ../../recipes-low-level-interfaces.rst:130 2a2e41fa0c34401ea22c6f2ed40a89e7 msgid "" "This is a central (\"root\") object of a PDF. It serves as a starting " "point to reach important other objects and it also contains some global " "options for the PDF::" msgstr "これはPDFの中心的な(\"ルート\")オブジェクトです。これは重要な他のオブジェクトに到達するための出発点として機能し、PDFのいくつかのグローバルオプションも含まれています::" -#: ../../recipes-low-level-interfaces.rst:146 4175b46f917a4fadbe8db944277a2754 +#: ../../recipes-low-level-interfaces.rst:146 5b118633d9a341a1a95aed016917f5d2 msgid "" "Indentation, line breaks and comments are inserted here for clarification" " purposes only and will not normally appear. For more information on the " @@ -235,11 +235,11 @@ msgstr "" "字下げ、改行、コメントは説明のために挿入されており、通常は表示されません。PDFカタログの詳細については、 :ref:`AdobeManual` " "のページ71のセクション7.7.2を参照してください。" -#: ../../recipes-low-level-interfaces.rst:151 e2ce3096ee024ae1ab39de4201687cbf +#: ../../recipes-low-level-interfaces.rst:151 f6b9f5c2736444a09a44be0af1efd3ef msgid "How to Access the PDF File Trailer" msgstr "PDFファイルトレーラーへのアクセス方法" -#: ../../recipes-low-level-interfaces.rst:152 9af2da489f3449a0b3dc6056f2f6add2 +#: ../../recipes-low-level-interfaces.rst:152 4cb33f7607ff4b7da3a368b706d7f85d msgid "" "The trailer of a PDF file is a :data:`dictionary` located towards the end" " of the file. It contains special objects, and pointers to important " @@ -249,93 +249,93 @@ msgstr "" "です。特別なオブジェクトと、重要な他の情報へのポインタが含まれています。:ref:`AdobeManual` を参照してください(p. " "42)。以下に概要を示します:" -#: ../../recipes-low-level-interfaces.rst:155 f23b6ade9996435f9e897dacb1eec32b +#: ../../recipes-low-level-interfaces.rst:155 6a08c29e38b14b4f8780edbf2bbd57ed msgid "**Key**" msgstr "**キー**" -#: ../../recipes-low-level-interfaces.rst:155 30e18c3fe3fa4f3ebd15b650f3c5989f +#: ../../recipes-low-level-interfaces.rst:155 58913ef5bc0e42449995f9ddc470a9b6 msgid "**Type**" msgstr "**タイプ**" -#: ../../recipes-low-level-interfaces.rst:155 4ec5dc5a209d49ec880c0d9c3f738aeb +#: ../../recipes-low-level-interfaces.rst:155 6bd41f1c095b4146a4be333408ae4d28 msgid "**Value**" msgstr "" -#: ../../recipes-low-level-interfaces.rst:157 ce32370dd8254323a8b07257ace281ce +#: ../../recipes-low-level-interfaces.rst:157 4f3f1be3c87948899e54efc916c7ef18 msgid "Size" msgstr "**値**" #: ../../recipes-low-level-interfaces.rst:157 #: ../../recipes-low-level-interfaces.rst:158 -#: ../../recipes-low-level-interfaces.rst:163 0164b7c32c7c496e9ddb11c66f072fab -#: 2329ec313371427eafb23790c32331a1 ad7152e1ad2d420499c31ae3e31fac5f +#: ../../recipes-low-level-interfaces.rst:163 81a6a91f16444f15bdeeaaf278f1bcd1 +#: 8682c7b530344453ade63634c104ed4f f11a36ccb1b94cd3ae600b685375afff msgid "int" msgstr "" -#: ../../recipes-low-level-interfaces.rst:157 cba1202e0b734b40bd253ceacd38e41d +#: ../../recipes-low-level-interfaces.rst:157 c285913e7e4943f9867315f2d6712e7f msgid "Number of entries in the cross-reference table + 1." msgstr "クロスリファレンステーブル内のエントリ数 + 1 の数値。" -#: ../../recipes-low-level-interfaces.rst:158 68e9d905f0c9412788a94f619b8bf07a +#: ../../recipes-low-level-interfaces.rst:158 c49bb116e66c4fca9cdeb500ae675247 msgid "Prev" msgstr "" -#: ../../recipes-low-level-interfaces.rst:158 2167f565d0f944389939731d1592a9b3 +#: ../../recipes-low-level-interfaces.rst:158 28fbdab151c14d60acbe435e09d03829 msgid "Offset to previous :data:`xref` section (indicates incremental updates)." msgstr "前の :data:`xref` セクションへのオフセット(増分更新を示す)。" -#: ../../recipes-low-level-interfaces.rst:159 54b3be93a19248ada386d4012591c29f +#: ../../recipes-low-level-interfaces.rst:159 96893c3d42a943ffaa753c2af598ddda msgid "Root" msgstr "" #: ../../recipes-low-level-interfaces.rst:159 #: ../../recipes-low-level-interfaces.rst:160 -#: ../../recipes-low-level-interfaces.rst:161 ba6bd016b4674de2bfce8a38f2219dd3 -#: c7be4fe456df4e09a359217454f29034 ca4b0b2123cb43d2a2643a9cfc1a6b6e +#: ../../recipes-low-level-interfaces.rst:161 17e32472677349bfa94d61bc793d8475 +#: 2d049d53c6cd4ae8a2bc07f1cbcf53bb ce33dca31774448c9bdd1e213de5d090 msgid "dictionary" msgstr "" -#: ../../recipes-low-level-interfaces.rst:159 61c2d28a680c4022b261f4e2e73a5e61 +#: ../../recipes-low-level-interfaces.rst:159 fecd0772f75c49fdb36a4962c490461e msgid "(indirect) Pointer to the catalog. See previous section." msgstr "(間接的) カタログへのポインタ。前のセクションを参照してください。" -#: ../../recipes-low-level-interfaces.rst:160 e0b4409514534c5cb02fd977faa52ec5 +#: ../../recipes-low-level-interfaces.rst:160 b7b167190b0149ce9bdd9ef671d03ae2 msgid "Encrypt" msgstr "" -#: ../../recipes-low-level-interfaces.rst:160 0e650d431ed1424783c80f93e003e7a7 +#: ../../recipes-low-level-interfaces.rst:160 aa8f56b6637c4a7ca41846fa1ebf6eca msgid "Pointer to encryption object (encrypted files only)." msgstr "(暗号化されたファイルのみ) 暗号化オブジェクトへのポインタ。" -#: ../../recipes-low-level-interfaces.rst:161 8016ab62c6bc447d922b3c56d8c3d90c +#: ../../recipes-low-level-interfaces.rst:161 d9be1827baa242068f64cd1307f9bd58 msgid "Info" msgstr "" -#: ../../recipes-low-level-interfaces.rst:161 6092e87b69c04042835dc281faa79d2b +#: ../../recipes-low-level-interfaces.rst:161 597be1c0e13342c694e56f1faf8dcca5 msgid "(indirect) Pointer to information (metadata)." msgstr "(間接的) 情報(メタデータ)へのポインタ。" -#: ../../recipes-low-level-interfaces.rst:162 debae3020d4e47ab95bcc23b5a5ad090 +#: ../../recipes-low-level-interfaces.rst:162 66abcc5c41b044d7ba24bef4374f4cba msgid "ID" msgstr "" -#: ../../recipes-low-level-interfaces.rst:162 adb84671ebc24c58a6ac01a63eb9bda0 +#: ../../recipes-low-level-interfaces.rst:162 e6d762fa8f38487992b7f2ddc8737388 msgid "array" msgstr "" -#: ../../recipes-low-level-interfaces.rst:162 38d767d0ca5e44f49a8a406b1a458782 +#: ../../recipes-low-level-interfaces.rst:162 ae4de832cc2c4e1cb9943cb9a61596da msgid "File identifier consisting of two byte strings." msgstr "2つのバイト文字列からなるファイル識別子。" -#: ../../recipes-low-level-interfaces.rst:163 294d96c38c3348c2984e3ab1e272dc42 +#: ../../recipes-low-level-interfaces.rst:163 fe39430132414ae0b7367e63724369e0 msgid "XRefStm" msgstr "" -#: ../../recipes-low-level-interfaces.rst:163 21ce0a49a25e46c4bb82f922122ff6b1 +#: ../../recipes-low-level-interfaces.rst:163 2f5419e850a744d790f2b70a0e221c5a msgid "Offset of a cross-reference stream. See :ref:`AdobeManual` p. 49." msgstr "クロスリファレンスストリームのオフセット。:ref:`AdobeManual` を参照してください(p. 49)。" -#: ../../recipes-low-level-interfaces.rst:166 f6c3f81e67494a568199406ea4116bc8 +#: ../../recipes-low-level-interfaces.rst:166 f658e5b17a384d9c90104cba97aa85ff msgid "" "Access this information via PyMuPDF with :meth:`Document.pdf_trailer` or," " equivalently, via :meth:`Document.xref_object` using -1 instead of a " @@ -345,11 +345,11 @@ msgstr "" ":meth:`Document.xref_object` を使用して -1 の代わりに有効な :data:`xref` " "番号を指定することでアクセスします。" -#: ../../recipes-low-level-interfaces.rst:187 59e6de55e02e40579de87e5e4c87bf79 +#: ../../recipes-low-level-interfaces.rst:187 98759bbd8d114604a80fbf742832adba msgid "How to Access XML Metadata" msgstr "XMLメタデータへのアクセス方法" -#: ../../recipes-low-level-interfaces.rst:188 ce578d62a3204783b36b76209ed1ba61 +#: ../../recipes-low-level-interfaces.rst:188 a4c560abb05646a6b21fccc292008ea0 msgid "" "A PDF may contain XML metadata in addition to the standard metadata " "format. In fact, most PDF viewer or modification software adds this type " @@ -358,7 +358,7 @@ msgstr "" "PDFには、標準のメタデータ形式に加えてXMLメタデータが含まれている場合があります。実際、ほとんどのPDFビューアや編集ソフトウェアは、PDFを保存する際に(Adobe、Nitro" " PDF、PDF-XChangeなど)この種の情報を追加します。" -#: ../../recipes-low-level-interfaces.rst:190 6bed09c843ab4c86aae70559f4c31d5b +#: ../../recipes-low-level-interfaces.rst:190 a02f8f95ed834b4386f05f01b7baf217 msgid "" "PyMuPDF has no way to **interpret or change** this information directly, " "because it contains no XML features. XML metadata is however stored as a " @@ -368,18 +368,18 @@ msgstr "" "しかし、PyMuPDFはXMLの機能を持たないため、この情報を直接解釈または変更する方法はありません。ただし、XMLメタデータは " ":data:`stream` オブジェクトとして格納されているため、適切なソフトウェアで読み取り、変更し、書き戻すことができます。" -#: ../../recipes-low-level-interfaces.rst:202 2dbf783c4298416483b50a5f4dd44a29 +#: ../../recipes-low-level-interfaces.rst:202 763734a1837d4847a3c820225381f4cb msgid "" "Using some XML package, the XML data can be interpreted and / or modified" " and then stored back. The following also works, if the PDF previously " "had no XML metadata::" msgstr "あるXMLパッケージを使用して、XMLデータを解釈および/または変更し、それを保存し直すことができます。次の方法もPDFに以前にXMLメタデータがない場合にも機能します::" -#: ../../recipes-low-level-interfaces.rst:213 be580459d9da4d85be4830be960b1e66 +#: ../../recipes-low-level-interfaces.rst:213 b484e4babb6b4821a2d4ca50b936f40b msgid "How to Extend PDF Metadata" msgstr "PDFメタデータの拡張方法" -#: ../../recipes-low-level-interfaces.rst:214 395ed5f286874fee95e957045ba496f8 +#: ../../recipes-low-level-interfaces.rst:214 bd8ade0701494f0aa8d64389ba8c01db msgid "" "Attribute :attr:`Document.metadata` is designed so it works for all " ":ref:`supported document types` in the same way: it" @@ -392,7 +392,7 @@ msgstr "" "ドキュメントタイプで同じ方法で機能するように設計されています。これは、固定されたキーと値のセットを持つPython辞書です。同様に、:meth:`Document.set_metadata`" " は標準のキーのみを受け入れます。" -#: ../../recipes-low-level-interfaces.rst:216 d194027973a24f01909d1077aeceb4f1 +#: ../../recipes-low-level-interfaces.rst:216 2ed9e5740749448898a94bedd85fa94f msgid "" "However, PDFs may contain items not accessible like this. Also, there may" " be reasons to store additional information, like copyrights. Here is a " @@ -400,17 +400,17 @@ msgid "" "functions." msgstr "しかし、PDFにはこのようにアクセスできない項目が含まれている場合があります。また、著作権などの追加情報を保存する理由もあるかもしれません。以下は、PyMuPDFの低レベル関数を使用して任意のメタデータ項目を処理する方法です。" -#: ../../recipes-low-level-interfaces.rst:218 3f9071b549ff4b5cb34bb9cf8bee6f32 +#: ../../recipes-low-level-interfaces.rst:218 f2e1b634d30a481da6cb600b52f2dccc msgid "As an example, look at this standard metadata output of some PDF::" msgstr "例として、次のPDFの標準メタデータ出力をご覧ください::" -#: ../../recipes-low-level-interfaces.rst:237 af64f51b62094843932e633ae98a5bcd +#: ../../recipes-low-level-interfaces.rst:237 ae127729cd53409cb04f9ebc390699c4 msgid "" "Use the following code to see **all items** stored in the metadata " "object::" msgstr "以下のコードを使用して、メタデータオブジェクトに保存されているすべてのアイテムを表示します::" -#: ../../recipes-low-level-interfaces.rst:265 d4e71d727e7e4a7ea7a6c25096fff0c5 +#: ../../recipes-low-level-interfaces.rst:265 f219d010f8094f62934815b489d0dc25 msgid "" "*Vice versa*, you can also **store private metadata items** in a PDF. It " "is your responsibility to make sure that these items conform to PDF " @@ -420,7 +420,7 @@ msgstr "" "逆に、PDFにはプライベートなメタデータアイテムを保存することもできます。これらのアイテムがPDF仕様に準拠していることを確認する責任はあなたにあります。特に、これらは(Unicode)文字列である必要があります。詳細や注意事項については、Adobe" " PDFリファレンスのセクション14.3(p. 548)を参照してください::" -#: ../../recipes-low-level-interfaces.rst:287 844b6019e266476795f5fb74b998296d +#: ../../recipes-low-level-interfaces.rst:287 2dc3761486a541f6821711dfd609da05 msgid "" "To delete selected keys, use `doc.xref_set_key(xref, \"mykey\", " "\"null\")`. As explained in the next section, string \"null\" is the PDF " @@ -431,27 +431,27 @@ msgstr "" "を使用します。次のセクションで説明されているように、文字列 `\"null\"` はPDFのバージョンでPythonの `None` " "に相当します。その値のキーは指定されていないものとして扱われ、ガベージコレクションで物理的に削除されます。" -#: ../../recipes-low-level-interfaces.rst:292 deec01299b97487487e5a2076fa0d753 +#: ../../recipes-low-level-interfaces.rst:292 b8e1f01138dd4a638ffd1e3689508d1c msgid "How to Read and Update PDF Objects" msgstr "PDFオブジェクトの読み取りと更新方法" -#: ../../recipes-low-level-interfaces.rst:297 7945b7d092de4fa19a1b7c9032a04941 +#: ../../recipes-low-level-interfaces.rst:297 c7c33727bafc478ca88a1cdae0ec859b msgid "" "There also exist granular, elegant ways to access and manipulate selected" " PDF :data:`dictionary` keys." msgstr "選択したPDF :data:`dictionary` キーにアクセスし、操作するための粒状で洗練された方法も存在します。" -#: ../../recipes-low-level-interfaces.rst:299 23a9cc8afbaa49a2bfb050748263eed1 +#: ../../recipes-low-level-interfaces.rst:299 04aa0e1d70b944b3a904ea382f4f0c30 msgid "" ":meth:`Document.xref_get_keys` returns the PDF keys of the object at " ":data:`xref`::" msgstr ":meth:`Document.xref_get_keys` は、:data:`xref` のオブジェクトのPDFキーを返します::" -#: ../../recipes-low-level-interfaces.rst:308 a108c8a1d6f443b681b6a37f88436406 +#: ../../recipes-low-level-interfaces.rst:308 ec3415a9ffc54434860c48bc58bd55d9 msgid "Compare with the full object definition::" msgstr "完全なオブジェクト定義と比較してください::" -#: ../../recipes-low-level-interfaces.rst:319 7adcf0961c22433facd2cf311493db37 +#: ../../recipes-low-level-interfaces.rst:319 4ee823aae30f4627b0f7c02f4267bfdc msgid "" "Single keys can also be accessed directly via " ":meth:`Document.xref_get_key`. The value **always is a string** together " @@ -460,11 +460,11 @@ msgstr "" "単一のキーは、 :meth:`Document.xref_get_key` " "を介して直接アクセスすることもできます。値は常に文字列であり、それを解釈するのに役立つタイプ情報が含まれています::" -#: ../../recipes-low-level-interfaces.rst:324 a4054bdb6cb24bcaa741f2fc6c9cc400 +#: ../../recipes-low-level-interfaces.rst:324 5b603693f93c4e03a5111618579b46ce msgid "Here is a full listing of the above page keys::" msgstr "以下は、上記のページキーの完全な一覧です::" -#: ../../recipes-low-level-interfaces.rst:335 477e974832a045859f315df36aa5399a +#: ../../recipes-low-level-interfaces.rst:335 f13dcde484e24d32bc88ea9b8cf371dd msgid "" "An undefined key inquiry returns `('null', 'null')` -- PDF object type " "`null` corresponds to `None` in Python. Similar for the booleans `true` " @@ -473,7 +473,7 @@ msgstr "" "未定義のキーの問い合わせは、`('null', 'null')` を返します - PDFオブジェクトタイプ `null` はPythonの " "`None` に対応します。 `true` および `false` も同様です。" -#: ../../recipes-low-level-interfaces.rst:336 48eb141c0fbb43dca8d3321f2031e3a9 +#: ../../recipes-low-level-interfaces.rst:336 14eee493b6bb4c06b2afcbdade3ca9e7 msgid "" "Let us add a new key to the page definition that sets its rotation to 90 " "degrees (you are aware that there actually exists " @@ -482,7 +482,7 @@ msgstr "" "ページ定義に新しいキーを追加して、その回転角を90度に設定しましょう(実際には :meth:`Page.set_rotation` " "が存在することを知っているかと思いますが、そうですか?)::" -#: ../../recipes-low-level-interfaces.rst:351 e54b55eb5b844fd6809377b401eb6e23 +#: ../../recipes-low-level-interfaces.rst:351 b9ecea1e87e7421faea4ae09003de94f msgid "" "This method can also be used to remove a key from the :data:`xref` " "dictionary by setting its value to `null`: The following will remove the " @@ -500,7 +500,7 @@ msgstr "" "は定義上配列であるため、`doc.xref_set_key(page.xref, \"Annots\", \"[]\")` " "という文で空の配列を設定すると、同じ操作が実行されます。" -#: ../../recipes-low-level-interfaces.rst:353 a6bd791e5a1d48f290034c6717015882 +#: ../../recipes-low-level-interfaces.rst:353 25ee5ad120ca43a7af7fb238b8ee91cd msgid "" "PDF dictionaries can be hierarchically nested. In the following page " "object definition both, `Font` and `XObject` are subdictionaries of " @@ -509,7 +509,7 @@ msgstr "" "PDF辞書は階層的に入れ子にすることができます。次のページオブジェクト定義では、`Font` と `XObject` は両方とも " "`Resources` のサブディクショナリです::" -#: ../../recipes-low-level-interfaces.rst:373 005991161f204758af114dd5caf052e2 +#: ../../recipes-low-level-interfaces.rst:373 166311ecb59d42579d5324506515d2e5 msgid "" "The above situation **is supported** by methods " ":meth:`Document.xref_set_key` and :meth:`Document.xref_get_key`: use a " @@ -521,19 +521,19 @@ msgstr "" " によってサポートされています。必要なキーを指すために、パスのような表記法を使用します。たとえば、上記の `Im1` " "キーの値を取得するには、キー引数にその上位の辞書の完全なチェーン `\"Resources/XObject/Im1\"` を指定します::" -#: ../../recipes-low-level-interfaces.rst:378 f28a06c6b85243cea0dabba7e49727c0 +#: ../../recipes-low-level-interfaces.rst:378 decc969788824b2f905d28ed9ea37c97 msgid "" "The path notation can also be used to **directly set a value**: use the " "following to let `Im1` point to a different object::" msgstr "パス表記法は、値を直接設定するためにも使用できます。以下を使用して、`Im1` を異なるオブジェクトを指すように設定します::" -#: ../../recipes-low-level-interfaces.rst:399 cdcd486a31d44f26a5f8f8a39f18c510 +#: ../../recipes-low-level-interfaces.rst:399 8134074039144ebca0e928b428cf7ad4 msgid "" "Be aware, that **no semantic checks** whatsoever will take place here: if" " the PDF has no xref 9999, it won't be detected at this point." msgstr "ここでは、何の意味的なチェックも行われないことに注意してください。PDFにxref 9999が存在しない場合、この段階では検出されません。" -#: ../../recipes-low-level-interfaces.rst:401 a6d263d50df343cb87b91aec50b8ca0d +#: ../../recipes-low-level-interfaces.rst:401 d717c7f21a174300a90bb992653ab939 msgid "" "If a key does not exist, it will be created by setting its value. " "Moreover, if any intermediate keys do not exist either, they will also be" @@ -544,7 +544,7 @@ msgstr "" "キーが存在しない場合、その値を設定することで新しく作成されます。さらに、中間のキーが存在しない場合も、必要に応じて自動的に作成されます。次の例では、既存の辞書" " `A` の下にいくつかの階層下に配列 `D` を作成しています。中間の辞書 `B` と `C` も自動的に作成されます::" -#: ../../recipes-low-level-interfaces.rst:421 3e180e3945e54e8eb3b41628aefe32be +#: ../../recipes-low-level-interfaces.rst:421 79d1fc2866c6405e852e7bc1d59c5f72 msgid "" "When setting key values, basic **PDF syntax checking** will be done by " "MuPDF. For example, new keys can only be created **below a dictionary**. " @@ -554,7 +554,7 @@ msgstr "" "キーの値を設定する際には、MuPDFによって基本的なPDF構文のチェックが行われます。たとえば、新しいキーは辞書の下にのみ作成できます。次の例では、以前に作成された配列" " `D` の下に新しい文字列アイテム `E` を作成しようとしています:" -#: ../../recipes-low-level-interfaces.rst:429 8899f206d5d04b1c869d1d83dad7f5a8 +#: ../../recipes-low-level-interfaces.rst:429 891aef9e0fe9425881312a1752d59e9f msgid "" "It is also **not possible**, to create a key if some higher level key is " "an **\"indirect\"** object, i.e. an xref. In other words, xrefs can only " @@ -562,24 +562,23 @@ msgid "" "them::" msgstr "同様に、上位のキーが「間接」オブジェクト、つまりxrefである場合、キーを作成することはできません。言い換えれば、xrefは直接的に変更できるが、それを参照する他のオブジェクトを通じて暗黙的に変更することはできません::" -#: ../../recipes-low-level-interfaces.rst:442 efce2eb5bdee4d0498f00794e3a56002 +#: ../../recipes-low-level-interfaces.rst:442 cb6c84fd491f4c3eaab967eb4ab22326 msgid "" "These are expert functions! There are no validations as to whether valid " "PDF objects, xrefs, etc. are specified. As with other low-level methods " "there is the risk to render the PDF, or parts of it unusable." msgstr "これらは専門家向けの機能です!有効なPDFオブジェクトやxrefなどが指定されているかどうかの検証はありません。他の低レベルメソッドと同様に、PDF全体またはその一部を利用不能にする可能性があるため注意が必要です。" -#: ../../footer.rst:71 cdf205382ec14cb19365f0266e6b7928 +#: ../../footer.rst:60 4695c17edec440ea85382cf6f78ad072 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 fa716300f7a946aea2a9dc2a8da8b731 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/recipes-multiprocessing.mo b/docs/locales/ja/LC_MESSAGES/recipes-multiprocessing.mo index baa79e619..c8868512e 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes-multiprocessing.mo and b/docs/locales/ja/LC_MESSAGES/recipes-multiprocessing.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes-multiprocessing.po b/docs/locales/ja/LC_MESSAGES/recipes-multiprocessing.po index 348281c00..048422138 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes-multiprocessing.po +++ b/docs/locales/ja/LC_MESSAGES/recipes-multiprocessing.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,89 +19,92 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 07a009feb8e24c5a9c00f4af9b953efc +#: ../../header.rst:-1 05b9195b227d4fbc825fc852831e4554 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 fd27425b5bc041b2ac28407a0d17903d +#: ../../header.rst:-1 d1146968098a44928b810551252f816f msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 ae8043b950c04ffb818c46de1840e8a2 +#: ../../header.rst:-1 0072b638d978499db19c4b4f4f7a3707 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../recipes-multiprocessing.rst:17 8bfcf4e7443b4fa78fd9363b63b5f412 +#: ../../recipes-multiprocessing.rst:17 0f0b2d7d9f684b409ff0e5784ca866ac msgid "Multiprocessing" msgstr "マルチプロセッシング" -#: ../../recipes-multiprocessing.rst:19 716478342f9143759cc2cc83b161bb9d +#: ../../recipes-multiprocessing.rst:19 3062a6b9aec34db2aec0a9bb17a0ef61 msgid "" -":title:`MuPDF` has no integrated support for threading - calling itself " -"\"thread-agnostic\". While there do exist tricky possibilities to still " -"use threading with :title:`MuPDF`, the baseline consequence for " -"|PyMuPDF| is:" +"|PyMuPDF| does not support running on multiple threads - doing so may " +"cause incorrect behaviour or even crash Python itself." msgstr "" -":title:`MuPDF` はスレッディングに対する統合サポートを持っておらず、「スレッドに対して無関心(thread-" -"agnostic)」と呼ばれています。MuPDFとスレッディングを組み合わせて使用するトリッキーな可能性は存在しますが、PyMuPDFの基本的な影響は次のとおりです:" -#: ../../recipes-multiprocessing.rst:21 d75d03c866404f54ac3986b6fe4e793d -msgid "**No Python threading support**." -msgstr "**Pythonスレッディングのサポートはありません。**." - -#: ../../recipes-multiprocessing.rst:23 bfcf7a522b77491598dd837de8e9998f -msgid "" -"Using |PyMuPDF| in a :title:`Python` threading environment will " -"lead to blocking effects for the main thread." -msgstr "" -"|PyMuPDF| を :title:`Python` " -"スレッディング環境で使用すると、メインスレッドでのブロッキング効果が発生します。" - -#: ../../recipes-multiprocessing.rst:25 3977cd7e556d4e9bbdbfd24fb3133256 +#: ../../recipes-multiprocessing.rst:21 74aa37e95d05468c982d841a2f5e2366 msgid "" "However, there is the option to use :title:`Python's` *multiprocessing* " "module in a variety of ways." msgstr "ただし、Pythonのmultiprocessingモジュールをさまざまな方法で使用するオプションがあります。" -#: ../../recipes-multiprocessing.rst:27 1fd563cbe9e6439499f04697d4c89cdc +#: ../../recipes-multiprocessing.rst:23 83777a97e9db4e779e16756b9eb3ee39 msgid "" "If you are looking to speed up page-oriented processing for a large " "document, use this script as a starting point. It should be at least " "twice as fast as the corresponding sequential processing." msgstr "大きなドキュメントのページ指向処理を高速化することを検討している場合は、このスクリプトを出発点として使用してください。対応する順次処理よりも少なくとも2倍の速さで動作するはずです。" -#: ../../recipes-multiprocessing.rst:30 ../../recipes-multiprocessing.rst:41 -#: 947d1f0402894524815a3e59fef1bda5 e98ad0de691843fda57c43b2a87bd31b +#: ../../recipes-multiprocessing.rst:26 ../../recipes-multiprocessing.rst:37 +#: 2098918775344f8e9c7de44ba8423fb1 824c4f30793e4c428daf4a27269debd1 msgid "|toggleStart|" msgstr "" -#: ../../recipes-multiprocessing.rst:35 ../../recipes-multiprocessing.rst:46 -#: 904a8b58acb941b2b408db1654cb9ef4 a1e4975bada949d7967b2c4328bd821d +#: ../../recipes-multiprocessing.rst:31 ../../recipes-multiprocessing.rst:42 +#: dd13074c598d44c4b568775518218436 ea94b563d305488a93bcc8650477d412 msgid "|toggleEnd|" msgstr "" -#: ../../recipes-multiprocessing.rst:38 1aba0e24eb9e4d5a90bd3fd263fc8417 +#: ../../recipes-multiprocessing.rst:34 9ad6e6b758c14434a47e7b271aebc806 msgid "" "Here is a more complex example involving inter-process communication " "between a main process (showing a GUI) and a child process doing " "|PyMuPDF| access to a document." msgstr "以下は、メインプロセス(GUIを表示)とドキュメントへのPyMuPDFアクセスを行う子プロセスとの間のプロセス間通信を含む、より複雑な例です。" -#: ../../footer.rst:71 4518fa7d2dde47b7b567d21707af2836 +#: ../../footer.rst:60 fbfd1487311a41a4acc53de3122dc430 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 847d2b8965aa4fbd913e2af7bfebec22 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "" +#~ ":title:`MuPDF` has no integrated support " +#~ "for threading - calling itself " +#~ "\"thread-agnostic\". While there do exist" +#~ " tricky possibilities to still use " +#~ "threading with :title:`MuPDF`, the baseline" +#~ " consequence for |PyMuPDF| is:" +#~ msgstr "" +#~ ":title:`MuPDF` はスレッディングに対する統合サポートを持っておらず、「スレッドに対して無関心(thread-" +#~ "agnostic)」と呼ばれています。MuPDFとスレッディングを組み合わせて使用するトリッキーな可能性は存在しますが、PyMuPDFの基本的な影響は次のとおりです:" + +#~ msgid "**No Python threading support**." +#~ msgstr "**Pythonスレッディングのサポートはありません。**." + +#~ msgid "" +#~ "Using |PyMuPDF| in a :title:`Python` " +#~ "threading environment will lead to " +#~ "blocking effects for the main thread." +#~ msgstr "|PyMuPDF| を :title:`Python` スレッディング環境で使用すると、メインスレッドでのブロッキング効果が発生します。" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/recipes-ocr.mo b/docs/locales/ja/LC_MESSAGES/recipes-ocr.mo index 4b602e207..7df4e1e20 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes-ocr.mo and b/docs/locales/ja/LC_MESSAGES/recipes-ocr.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes-ocr.po b/docs/locales/ja/LC_MESSAGES/recipes-ocr.po index cb8fb101f..1ee2410e6 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes-ocr.po +++ b/docs/locales/ja/LC_MESSAGES/recipes-ocr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.24.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-06 22:50+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -18,160 +18,179 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 ffd3e7057f514f9b9ff44479bb5b2fff +#: ../../header.rst:-1 8c06718aa6d94a588549b1b5d04439ff msgid "Artifex" msgstr "" -#: ../../header.rst:-1 09a474b289fe4ebcbd83747929de276b +#: ../../header.rst:-1 53d78f25612a42cea99758721dc13394 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDFは、PDF(およびその他)ドキュメントのデータ抽出、分析、変換、および操作のための高性能なPythonライブラリです。" -#: ../../header.rst:-1 becac363cb7748df98799a247432c3b9 +#: ../../header.rst:-1 bffa3c55f0b648508f7e9ef104450bca msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキストの抽出、PDF画像の抽出、PDF変換、PDFテーブル、PDF分割、PDF作成、Pyodide、PyScript" -#: ../../recipes-ocr.rst:17 31525020ff744203ab8e4609085154e3 +#: ../../recipes-ocr.rst:17 c241da654a734566aa9837f159d775f0 msgid "OCR - Optical Character Recognition" msgstr "OCR - 光学文字認識" -#: ../../recipes-ocr.rst:19 70f1b4f66e994695b5eaa33affb4bb96 +#: ../../recipes-ocr.rst:19 0aa275f26c85470caecaed5eecb9df0b msgid "" "|PyMuPDF| has integrated support for OCR (Optical Character Recognition)." " It is possible to use OCR for both, images (via the :ref:`Pixmap` class)" " and for document pages." -msgstr "|PyMuPDF| にはOCR(光学文字認識)の統合サポートがあります。OCRは、画像( :ref:`Pixmap` クラスを介して)および文書ページの両方に使用できます。" +msgstr "" +"|PyMuPDF| にはOCR(光学文字認識)の統合サポートがあります。OCRは、画像( :ref:`Pixmap` " +"クラスを介して)および文書ページの両方に使用できます。" + +#: ../../recipes-ocr.rst:21 51aed55192864e8e92dfdbae828d1b05 -#: ../../recipes-ocr.rst:21 f6d13399a9eb44ab8156a7074337fd11 msgid "" "The feature is currently based on Tesseract-OCR which must be installed " -"as a separate application -- see the installation chapter." -msgstr "この機能は現在、Tesseract-OCRに基づいており、別途アプリケーションとしてインストールする必要があります。インストール手順は、インストールチャプターを参照してください。" +"as a separate application -- see the :ref:`installation_ocr`." +msgstr "" +"この機能は現在、 :ref:`installation_ocr` に基づいており、別途アプリケーションとしてインストールする必要があります。インストール手順は、インストールチャプターを参照してください。" -#: ../../recipes-ocr.rst:24 af12d2bad83f4352a9e5c66b526751da +#: ../../recipes-ocr.rst:24 b1216080a3f54b3c8f76397e1abb6bfb msgid "How to OCR an Image" msgstr "画像のOCR方法" -#: ../../recipes-ocr.rst:25 e933f63d241c49fa9c060d4560704cd3 +#: ../../recipes-ocr.rst:25 3246894b688c4472b993c9cb737b849b msgid "" "A supported image must first be converted to a :ref:`Pixmap`. The Pixmap " "can then be saved to a 1-page PDF. This page will look like the original " "image with the same width and height. It will contain a layer of text as " "recognized by Tesseract." -msgstr "サポートされている画像はまず :ref:`Pixmap` に変換される必要があります。次に、Pixmapを1ページのPDFに保存できます。このページは、元の画像と同じ幅と高さを持つように見えます。それには、Tesseractによって認識されたテキストのレイヤーが含まれています。" +msgstr "" +"サポートされている画像はまず :ref:`Pixmap` " +"に変換される必要があります。次に、Pixmapを1ページのPDFに保存できます。このページは、元の画像と同じ幅と高さを持つように見えます。それには、Tesseractによって認識されたテキストのレイヤーが含まれています。" -#: ../../recipes-ocr.rst:27 05e0366e2c414d788c37ab9a4127b182 +#: ../../recipes-ocr.rst:27 d4515bb735c54591a730fae2a142b782 msgid "" "The PDF can be generated via one of the methods " ":meth:`Pixmap.pdfocr_save` or :meth:`Pixmap.pdfocr_tobytes`, as a file on" " disk or as a PDF in memory." -msgstr "PDFは、次のいずれかの方法、つまり :meth:`Pixmap.pdfocr_save` または :meth:`Pixmap.pdfocr_tobytes` を使用して、ディスク上のファイルとして、またはメモリ内のPDFとして生成できます。" +msgstr "" +"PDFは、次のいずれかの方法、つまり :meth:`Pixmap.pdfocr_save` または " +":meth:`Pixmap.pdfocr_tobytes` を使用して、ディスク上のファイルとして、またはメモリ内のPDFとして生成できます。" -#: ../../recipes-ocr.rst:29 b96fc4f4e3d84f76934be3135192b4de +#: ../../recipes-ocr.rst:29 487a184cd0104d00b896c90725d548eb msgid "" "The text can be extracted and searched with the usual text extraction and" " search methods (:meth:`Page.get_text`, :meth:`Page.search_for`, etc.). " "Please also note the following important facts and prerequisites:" -msgstr "通常のテキスト抽出および検索方法( :meth:`Page.get_text` 、 :meth:`Page.search_for` など)を使用して、テキストを抽出および検索することができます。また、次の重要な事実と前提条件にも注意してください:" +msgstr "" +"通常のテキスト抽出および検索方法( :meth:`Page.get_text` 、 :meth:`Page.search_for` " +"など)を使用して、テキストを抽出および検索することができます。また、次の重要な事実と前提条件にも注意してください:" -#: ../../recipes-ocr.rst:31 43e54c3cc05b4b5585ea453c3839bf16 +#: ../../recipes-ocr.rst:31 fea2a323626648cf8e2f358bf60c9790 msgid "" "When converting the image to a Pixmap, please confirm that the color " "space is RGB and alpha is `False` (no transparency). Convert the original" " Pixmap if necessary." -msgstr "画像をPixmapに変換する際に、カラースペースがRGBであり、alphaが `False` (透明度なし)であることを確認してください。必要に応じて元のPixmapを変換してください。" +msgstr "" +"画像をPixmapに変換する際に、カラースペースがRGBであり、alphaが `False` " +"(透明度なし)であることを確認してください。必要に応じて元のPixmapを変換してください。" -#: ../../recipes-ocr.rst:32 8f28a3cc6be94de0af1ab2cacb284ee1 +#: ../../recipes-ocr.rst:32 602c256e951449f1a5d1de19052b4e81 msgid "" "All text is written as \"hidden\" with Tesseract's own `GlyphLessFont`, a" " mono-spaced font with metrics comparable to Courier." -msgstr "すべてのテキストは、Tesseractの独自の `GlyphLessFont` で「非表示」として書かれています。これは、Courierに類似したメトリクスを持つ等幅フォントです。" +msgstr "" +"すべてのテキストは、Tesseractの独自の `GlyphLessFont` " +"で「非表示」として書かれています。これは、Courierに類似したメトリクスを持つ等幅フォントです。" -#: ../../recipes-ocr.rst:33 9450c608017b4bdcbdd9f2aa85b33af8 +#: ../../recipes-ocr.rst:33 cec1c1656b124ccb8c05d4e5faabe5fe msgid "" "All text has the properties regular and black (i.e. no bold, no italic, " "no information about the original fonts)." msgstr "すべてのテキストは、regularとblackのプロパティを持ちます(太字や斜体はなく、元のフォントに関する情報はありません)。" -#: ../../recipes-ocr.rst:34 e891d79044a244f9a99ed8bfec74a58c +#: ../../recipes-ocr.rst:34 40decd5ed0f641c5a1a1df6f0e46b543 msgid "" "Tesseract does not recognize vector graphics (i.e. no drawings / line-" "art)." msgstr "Tesseractはベクトルグラフィックスを認識しません(つまり、図面や線画はありません)。" -#: ../../recipes-ocr.rst:36 4ae89317d6da4f3dab02be0e3d32fd13 +#: ../../recipes-ocr.rst:36 92a869d875f440a1823e69cb418dd13c msgid "This approach is also recommended to OCR a complete scanned PDF:" msgstr "スキャンされた完全なPDFをOCRするためにも、この手法が推奨されています:" -#: ../../recipes-ocr.rst:38 037620616bb8432194a78237a63be2aa +#: ../../recipes-ocr.rst:38 66094238af8143488b9393b6174ad73b msgid "Render each page to a :ref:`Pixmap` with desired resolution" msgstr "各ページを所望の解像度で :ref:`Pixmap` にレンダリングします" -#: ../../recipes-ocr.rst:39 bbb3d11b8d914808ab61648715765aba +#: ../../recipes-ocr.rst:39 117254e7b2ba43c181367c88db16205e msgid "Append the resulting 1-page PDF to the output PDF" msgstr "得られた1ページのPDFを出力PDFに追加します" -#: ../../recipes-ocr.rst:42 548bb18034af43d6978b2147b6af2dcb +#: ../../recipes-ocr.rst:42 d7dece4adeb4437b99e1820d71befa7c msgid "How to OCR a Document Page" msgstr "ドキュメントページのOCR方法" -#: ../../recipes-ocr.rst:43 505ecd77862a4703a3a5f782a59dc584 +#: ../../recipes-ocr.rst:43 7c3e4697da8f4603b29acd1ad05093d5 msgid "" "Any supported document page can be OCR-ed -- either the complete page or " "only the image areas on it." msgstr "サポートされているどのドキュメントページでもOCR処理が可能です。ページ全体、またはその上の画像領域のみを対象にすることができます。" -#: ../../recipes-ocr.rst:45 ca84d390514649cc96543b0da127cd8d +#: ../../recipes-ocr.rst:45 ba6c9f5cda8043bf858b00e93aa23ded msgid "" "Because optical character recognition is about one thousand times slower " "than standard text extraction, we make sure to do OCR only once per page " "and store the result in a :ref:`TextPage`. Using this TextPage for all " "subsequent extractions and text searches will then happen with " "|PyMuPDF|'s usual top speed." -msgstr "光学文字認識は通常のテキスト抽出よりも約1000倍遅いため、1ページにつき1回だけOCR処理を行い、その結果をTextPageに保存します。この :ref:`TextPage` をすべての後続の抽出とテキスト検索に使用することで、PyMuPDFの通常の高速性で処理が行われます。" +msgstr "" +"光学文字認識は通常のテキスト抽出よりも約1000倍遅いため、1ページにつき1回だけOCR処理を行い、その結果をTextPageに保存します。この " +":ref:`TextPage` をすべての後続の抽出とテキスト検索に使用することで、PyMuPDFの通常の高速性で処理が行われます。" -#: ../../recipes-ocr.rst:47 1f890018c3964fe0b5c8fe3e6051831c +#: ../../recipes-ocr.rst:47 30ced681346a45b69d752411d4546ef8 msgid "To OCR a document page, follow this approach:" msgstr "ドキュメントページをOCRするには、この手順に従ってください:" -#: ../../recipes-ocr.rst:49 ab979876f36f4d609da1092e7d6b6cff +#: ../../recipes-ocr.rst:49 d100d50f78564e60a3c001137881dbe0 msgid "" "Determine whether OCR is needed / beneficial at all. A number of criteria" " can be used for this decision, like:" msgstr "まず、OCRが全く必要であるか、または有益かどうかを判断します。この決定には、次のような基準を使用できます:" -#: ../../recipes-ocr.rst:51 8c045937992d47b78c82a6d8df08a06c +#: ../../recipes-ocr.rst:51 d822f6b5f27e4ec8985dabafd5355ded msgid "page is completely covered by an image" msgstr "ページが画像で完全にカバーされている" -#: ../../recipes-ocr.rst:52 dbef0a4fb18b46018789d51d5b510402 +#: ../../recipes-ocr.rst:52 e2b83dfda8654688ace9b92549d12d49 msgid "no text exists on the page" msgstr "ページにテキストが存在しない" -#: ../../recipes-ocr.rst:53 7a8aadb2cef9497c90139672ac9cce73 +#: ../../recipes-ocr.rst:53 92db54fd9afa4d38a9032f18d836b8cf msgid "thousands of small vector graphics (indicating *simulated* text)" msgstr "数千の小さなベクトルグラフィックス( *模擬* テキストを示す)" -#: ../../recipes-ocr.rst:55 68d85f5f93b8486cab4fe6ccb2c4faf8 +#: ../../recipes-ocr.rst:55 83ba5b35db48464f8945a3dabc2e53f0 msgid "" "OCR the page and store result in a :ref:`TextPage` object using an " "instruction like `tp = page.get_textpage_ocr(...)`." -msgstr "ページをOCR処理し、結果を :ref:`TextPage` オブジェクトに保存します。この操作は、 `tp = page.get_textpage_ocr(...)` のような命令を使用して行います。" +msgstr "" +"ページをOCR処理し、結果を :ref:`TextPage` オブジェクトに保存します。この操作は、 `tp = " +"page.get_textpage_ocr(...)` のような命令を使用して行います。" -#: ../../recipes-ocr.rst:57 57c5b61b19ab4ed0820045b1e0ace284 +#: ../../recipes-ocr.rst:57 58b836a92fe443749da93c2ff3c9a23e msgid "" "Refer to the produced :ref:`TextPage` in all subsequent text extractions " "and searches via the `textpage=tp` parameter." -msgstr "以降のすべてのテキスト抽出と検索では、 `textpage=tp` パラメータを使用して生成された :ref:`TextPage` を参照してください。" +msgstr "" +"以降のすべてのテキスト抽出と検索では、 `textpage=tp` パラメータを使用して生成された :ref:`TextPage` " +"を参照してください。" -#: ../../footer.rst:60 245349d25ace430f8e58fd2f0af91c11 +#: ../../footer.rst:60 3baf39a2c3104ca786b8b27e9c52e1a8 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは、|version| までのすべてのバージョンをカバーしています。" -#: ../../footer.rst:-1 ce2657706c384ee7b6144eea3e030bae -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/recipes-optional-content.mo b/docs/locales/ja/LC_MESSAGES/recipes-optional-content.mo index 061546a3f..c5ff1f825 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes-optional-content.mo and b/docs/locales/ja/LC_MESSAGES/recipes-optional-content.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes-optional-content.po b/docs/locales/ja/LC_MESSAGES/recipes-optional-content.po index a2bfd59b2..9b459fd42 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes-optional-content.po +++ b/docs/locales/ja/LC_MESSAGES/recipes-optional-content.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,44 +19,44 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 9b03d906f059438a8d4e73f31748793d +#: ../../header.rst:-1 b9adf564010b470a971c6291f3680a9f msgid "Artifex" msgstr "" -#: ../../header.rst:-1 713d4e288b334e23aa0c0ed010062e7e +#: ../../header.rst:-1 4f641f2c45c0425a8a232bd594ce5a8e msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 aea7af956060401ca9485a04a1ad109c +#: ../../header.rst:-1 9aa457bbf5a14960b09296e9b2e285cc msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../recipes-optional-content.rst:7 b3ad8bc27ad74d238e5f19ae94116dda +#: ../../recipes-optional-content.rst:7 f386f73d902d4f638a7820107f09b953 msgid "Optional Content Support" msgstr "オプションコンテンツのサポート" -#: ../../recipes-optional-content.rst:9 226e513cb3c5486490d4ea47a4102225 +#: ../../recipes-optional-content.rst:9 fcfec01c6f83417597feed152e9cf82e msgid "" "This document explains PyMuPDF's support of the PDF concept **\"Optional " "Content\"**." msgstr "この文書では、PyMuPDFにおけるPDFコンセプト **「オプションコンテンツ」** のサポートについて説明します。" -#: ../../recipes-optional-content.rst:12 58206aac0517488ebed6281d9a565c66 +#: ../../recipes-optional-content.rst:12 3f7db4b17b0c4708ba190ca50f3cf65f msgid "Introduction: The Optional Content Concept" msgstr "はじめに:オプションコンテンツのコンセプト" -#: ../../recipes-optional-content.rst:13 07ca7b08b3f84c0da67546e1220e879e +#: ../../recipes-optional-content.rst:13 1a20a0429dbd4d22b3e438897b87f6ec msgid "" "*Optional Content* in PDF is a way to show or hide parts of a document " "based on certain conditions: Parameters that can be set to ON or to OFF " "when using a supporting PDF consumer (viewer), or programmatically." msgstr "PDFのオプションコンテンツは、特定の条件に基づいてドキュメントの一部を表示または非表示にする方法です。これは、サポートするPDFコンシューマ(ビューア)を使用する際にONまたはOFFに設定できるパラメータ、またはプログラムを使用して行います。" -#: ../../recipes-optional-content.rst:15 a8f96db1295840fa992baa91416b6b56 +#: ../../recipes-optional-content.rst:15 aaecb435f0b74040bb7788f47b75ef27 msgid "" "This capability is useful in items such as CAD drawings, layered artwork," " maps, and multi-language documents. Typical uses include showing or " @@ -67,20 +67,20 @@ msgid "" "document on screen as opposed to printing it." msgstr "この機能は、CAD図面、レイヤー化されたアートワーク、地図、多言語ドキュメントなどのアイテムで有用です。一般的な用途には、地理的な地図、技術デバイス、建築設計などの複雑なベクトルグラフィックの詳細の表示または非表示、異なるズームレベル間の自動切り替えなどが含まれます。他の用途としては、画面上でドキュメントを表示する際と印刷する際で自動的に異なる詳細レベルを表示することが考えられます。" -#: ../../recipes-optional-content.rst:17 25edca963cd74418938d39c423b1b3df +#: ../../recipes-optional-content.rst:17 f07e3ad64d7846e98be13b841e104284 msgid "" "Special PDF objects, so-called **Optional Content Groups** (OCGs) are " "used to define these different *layers* of content." msgstr "特別なPDFオブジェクトである「オプションコンテンツグループ(OCG)」を使用して、これらの異なるコンテンツのレイヤーを定義します。" -#: ../../recipes-optional-content.rst:19 a1e36b3f3c2b4ec0b37dfe8a64eeb66e +#: ../../recipes-optional-content.rst:19 8e40a4dd32264311b329d5ef6d1b3feb msgid "" "Assigning an OCG to a \"normal\" PDF object (like a text or an image) " "causes that object to be visible or hidden, depending on the current " "state of the assigned OCG." msgstr "「通常の」PDFオブジェクト(テキストや画像など)にOCGを割り当てると、そのオブジェクトは割り当てられたOCGの現在の状態に応じて表示または非表示になります。" -#: ../../recipes-optional-content.rst:21 ac0982f31e394d8b9e31dda7f7645671 +#: ../../recipes-optional-content.rst:21 55f0e10ade9d4f99abf06a67d6897563 msgid "" "To ease definition of the overall configuration of a PDF's Optional " "Content, OCGs can be organized in higher level groupings, called **OC " @@ -91,21 +91,21 @@ msgid "" "the document." msgstr "PDFのオプションコンテンツの全体的な構成を簡単に定義するために、OCGは高レベルのグループ化である「OC構成」に組織化できます。各構成は、OCGの望ましい初期表示状態とともに、OCGのコレクションです。これらの構成のいずれかを選択する(PDFビューアまたはプログラムを介して)と、ドキュメント全体で影響を受けるすべてのPDFオブジェクトの表示状態が対応するように変更されます。" -#: ../../recipes-optional-content.rst:23 129b2d662dfa4509a024496f73d2cdf5 +#: ../../recipes-optional-content.rst:23 335985a556c34d438df38487d6cae48b msgid "Except for the default one, OC Configurations are optional." msgstr "デフォルト以外のOC構成はオプションです。" -#: ../../recipes-optional-content.rst:25 56909c5539cd48ab835f0a69371e6f11 +#: ../../recipes-optional-content.rst:25 fccc4cf720904ea79e6efd0b6034ca87 msgid "" "For more explanations and additional background please refer to PDF " "specification manuals." msgstr "詳細な説明や追加の背景情報については、PDF仕様マニュアルを参照してください。" -#: ../../recipes-optional-content.rst:28 b1cd203478d240b983607933daf81165 +#: ../../recipes-optional-content.rst:28 c00fd4817a4b47efbf6a64bfa9134f7e msgid "PyMuPDF Support for PDF Optional Content" msgstr "PDFオプショナルコンテンツのPyMuPDFサポート" -#: ../../recipes-optional-content.rst:29 55a12777ad574819ac4afb00a4a25fd4 +#: ../../recipes-optional-content.rst:29 58da3cf082224fbab5a10febc9e9918c msgid "" "PyMuPDF offers full support for viewing, defining, changing and deleting " "Option Content Groups, Configurations, maintaining the assignment of OCGs" @@ -113,24 +113,24 @@ msgid "" "and the visibility states of each single OCG." msgstr "PyMuPDFは、オプショナルコンテンツグループや構成の表示、定義、変更、削除、OCGのPDFオブジェクトへの割り当ての維持、OC構成間のプログラムによる切り替えや各単一OCGの可視性状態のサポートを完全に提供します。" -#: ../../recipes-optional-content.rst:32 a3ef9165812247f98d485ef1bdda83ad +#: ../../recipes-optional-content.rst:32 150d36f9de0441a599f6371982441f3d msgid "How to Add Optional Content" msgstr "オプショナルコンテンツの追加方法" -#: ../../recipes-optional-content.rst:33 6c26ea2afbfa4db1a302cb2d8ef9decc +#: ../../recipes-optional-content.rst:33 73887253f5d24ae7ba64f723a91eaf07 msgid "" "This is as simple as adding an Optional Content Group, OCG, to a PDF: " ":meth:`Document.add_ocg`." msgstr "これは、PDFにオプショナルコンテンツグループ(OCG)を追加するだけの簡単な手順です::meth:`Document.add_ocg`。" -#: ../../recipes-optional-content.rst:35 f14487602af447599533a2915c331dd7 +#: ../../recipes-optional-content.rst:35 bc0c989ada934a9a9e91392eed44e3c6 msgid "" "If previously the PDF had no OC support at all, the required setup (like " "defining the default OC Configuration) will be done at this point " "automatically." msgstr "以前にPDFがまったくOCサポートを持っていなかった場合、必要なセットアップ(デフォルトのOC構成の定義など)は自動的に行われます。" -#: ../../recipes-optional-content.rst:37 bd5cb9b9b8a547b68b41a13ad8a30ba3 +#: ../../recipes-optional-content.rst:37 cdfece8bcb5842e8a95237834b218484 msgid "" "The method returns an :data:`xref` of the created OCG. Use this xref to " "associate (mark) any PDF object with it, that you want to make dependent " @@ -140,7 +140,7 @@ msgstr "" "このメソッドは、作成されたOCGの :data:`xref` " "を返します。このxrefを使用して、このOCGの状態に依存するようにする任意のPDFオブジェクトを関連付け(マーク)します。例えば、ページに画像を挿入し、次のようにxrefを参照できます::" -#: ../../recipes-optional-content.rst:41 5627c49fe5164e3f9c13e94199b7a713 +#: ../../recipes-optional-content.rst:41 6ffb9b4bd14d4579967827abb6fab656 msgid "" "If you want to put an **existing** image under the control of an OCG, you" " must first find out the image's xref number (called `img_xref` here) and" @@ -153,40 +153,40 @@ msgstr "" "`doc.set_oc(img_xref, xref)` " "を行う必要があります。これにより、OCGの状態が「ON」または「OFF」の場合、画像はドキュメント全体で(非)表示になります。また、このメソッドで異なるOCGを割り当てることもできます。" -#: ../../recipes-optional-content.rst:43 8bdd0550e6f44ca1b26cd7bc144f9ba5 +#: ../../recipes-optional-content.rst:43 57ddbd4662c64c7da80144e82353dd65 msgid "To **remove** an OCG from an image, do `doc.set_oc(img_xref, 0)`." msgstr "画像からOCGを削除するには、 `doc.set_oc(img_xref, 0)` を行います。" -#: ../../recipes-optional-content.rst:45 fdd9ff2041064cf1896e01be1b5f2a33 +#: ../../recipes-optional-content.rst:45 7cf89450ea9246beaa5cc79c376ec93c msgid "" "One single OCG can be assigned to multiple PDF objects to control their " "visibility." msgstr "1つのOCGは複数のPDFオブジェクトに割り当てて、それらの可視性を制御することができます。" -#: ../../recipes-optional-content.rst:48 e1cab4d5f43940368d8c55bfdbe10380 +#: ../../recipes-optional-content.rst:48 7410b55143ef4843a28d68ebad34fd9a msgid "How to Define Complex Optional Content Conditions" msgstr "複雑なオプショナルコンテンツ条件の定義方法" -#: ../../recipes-optional-content.rst:50 e2fd02f35edd4bd8b42ab1fed4e90740 +#: ../../recipes-optional-content.rst:50 896d39eb29204989ade197882ff6a5ce msgid "" "Sophisticated logical conditions can be established to address complex " "visibility needs." msgstr "複雑な可視性のニーズに対応するために、洗練された論理条件を設定することができます。" -#: ../../recipes-optional-content.rst:52 e83cb9e615b94b7c924572051093aeb0 +#: ../../recipes-optional-content.rst:52 a5c986cc1555410ebbc392e3476e93fe msgid "" "For example, you might want to create a multi-language document, so the " "user may switch between languages as required." msgstr "例えば、ユーザーが必要に応じて言語を切り替えることができるような多言語ドキュメントを作成したいかもしれません。" -#: ../../recipes-optional-content.rst:54 34ee0d97669e4415aad8b19810bb8ec8 +#: ../../recipes-optional-content.rst:54 48cadb3f29334ff5aa265acd08dfdc06 msgid "Please have a look at `this Jupyter Notebook`_ and execute it as desired." msgstr "" "`この Jupyter Notebook `_ " "をご覧いただき、必要に応じて実行してみてください。" -#: ../../recipes-optional-content.rst:56 88cdfc1fb0684f73b4b694e766735346 +#: ../../recipes-optional-content.rst:56 49114e4ceda7440399518471d7dc8eb7 msgid "" "Certainly, your requirements may even be more complex and involve " "multiple OCGs with ON/OFF states that are connected by some kind of " @@ -194,17 +194,16 @@ msgid "" "possible and how to plan your next steps." msgstr "もちろん、あなたの要件はさらに複雑で、論理的な関係で接続された複数のON/OFF状態を持つ複数のOCGが関与する可能性がありますが、これは可能なことと次のステップを計画する方法を示すものとなるでしょう。" -#: ../../footer.rst:71 63ff2bdb2c954d89ad210cfc5dfa508a +#: ../../footer.rst:60 067fc234c31f4747987f53713303219a msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 cf74658ef1814622ac4ffb7f9f589b1c -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/recipes-stories.mo b/docs/locales/ja/LC_MESSAGES/recipes-stories.mo index 28725f61a..387387307 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes-stories.mo and b/docs/locales/ja/LC_MESSAGES/recipes-stories.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes-stories.po b/docs/locales/ja/LC_MESSAGES/recipes-stories.po index 5c7fa59b4..b0e7b2b4a 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes-stories.po +++ b/docs/locales/ja/LC_MESSAGES/recipes-stories.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,33 +19,33 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 1487ed3f73f049a8bf1841ae09013ae4 +#: ../../header.rst:-1 c1cb378bf8d4476fb2cf4501913fbf5e msgid "Artifex" msgstr "" -#: ../../header.rst:-1 2bd911522a2341e49d8e273a19887eeb +#: ../../header.rst:-1 3c891d0a0fb04d97936ca58bbdece2de msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 4179b505a0424da493be47b5d7251864 +#: ../../header.rst:-1 f644d1bc2e234382901d316b4c0cb553 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../recipes-stories.rst:18 070a602a054e4391b1788109c6819795 +#: ../../recipes-stories.rst:18 c45a9555e4e144b9af3b42d2801ac42d msgid "Stories" msgstr "ストーリーズ" -#: ../../recipes-stories.rst:20 f9c593788a114845858344dbf5c3169f +#: ../../recipes-stories.rst:20 61fc6f658db84ae4ac5c035a17aaebab msgid "" "This document showcases some typical use cases for " ":ref:`Stories`." msgstr "このドキュメントは、 :ref:`ストーリーズ` の典型的な使用例を示しています。" -#: ../../recipes-stories.rst:22 3593179599754f51b6b70a0515c0c50e +#: ../../recipes-stories.rst:22 8153b8f5ad474b97857309ad103d02ba msgid "" "As mentioned in the :ref:`tutorial`, stories may be " "created using up to three input sources: HTML, CSS and Archives -- all of" @@ -55,57 +55,57 @@ msgstr "" ":ref:`チュートリアル` " "で説明されているように、ストーリーズは最大3つの入力ソース(HTML、CSS、アーカイブ)を使用して作成できます。これらのソースはすべてオプションであり、それぞれプログラムで提供することができます。" -#: ../../recipes-stories.rst:24 d9cb40d2c1a0459ba02f52b6bf7dfedb +#: ../../recipes-stories.rst:24 d57ad4f561994730aebf4f597f37bad9 msgid "The following examples will showcase combinations for using these inputs." msgstr "以下の例では、これらの入力を使用した組み合わせを示します。" -#: ../../recipes-stories.rst:28 36b89517a1a14000ac1d987a8010b594 +#: ../../recipes-stories.rst:28 ac8b802e808e4084b58d55ce03509ad8 msgid "" "Many of these recipe's source code are included as examples in the `docs`" " folder." msgstr "これらのレシピのソースコードの多くは、ドキュメントフォルダ内の例として含まれています。" -#: ../../recipes-stories.rst:34 8530e0545d9c479a847a56306ab13fa8 +#: ../../recipes-stories.rst:34 f07dc61a03bf4989b1e6604b220aef91 msgid "How to Add a Line of Text with Some Formatting" msgstr "テキストの行をいくつかの書式で追加する方法" -#: ../../recipes-stories.rst:36 958d5c5fd280439e83f2084d1d7b7b00 +#: ../../recipes-stories.rst:36 89f52f47ec32483480e0cf60bd8494fb msgid "Here is the inevitable \"Hello World\" example. We will show two variants:" msgstr "以下は、避けられない「Hello World」の例です。2つのバリアントを示します:" -#: ../../recipes-stories.rst:38 b8bcaa3b7c49441bb14c69b736b1ed78 +#: ../../recipes-stories.rst:38 0f4aae8b064d445d907c6ca0008c498d msgid "Create using existing HTML source [#f1]_, that may come from anywhere." msgstr "どこからでも取得できる既存のHTMLソース [#f1]_ を使用して作成します。" -#: ../../recipes-stories.rst:39 d5da05f8e56e4a01aca99db824811581 +#: ../../recipes-stories.rst:39 5cb05c255e5b48348d3ab83f3bd57f28 msgid "Create using the Python API." msgstr "Python APIを使用して作成します。" -#: ../../recipes-stories.rst:43 ca6aa4b41c9941739d98ed25b43cb4e8 +#: ../../recipes-stories.rst:43 e8ff5379e66c49ce8776461b904793ef msgid "" "Variant using an existing HTML source [#f1]_ -- which in this case is " "defined as a constant in the script::" msgstr "既存のHTMLソース [#f1]_ を使用したバリアント – この場合、スクリプト内で定数として定義されています::" -#: ../../recipes-stories.rst:69 2db6e7c7073e4dd8b5e71acc0f0816de +#: ../../recipes-stories.rst:69 fa5eb25963534e29b44ef593d2a08afd msgid "" "The above effect (sans-serif and blue text) could have been achieved by " "using a separate CSS source like so::" msgstr "上記の効果(サンセリフ体および青いテキスト)は、次のように別のCSSソースを使用することで達成できます::" -#: ../../recipes-stories.rst:90 8a179acacfec4e3fba45198c987459f4 +#: ../../recipes-stories.rst:90 f582657322b343a4a158ef19912473f1 msgid "The Python API variant -- everything is created programmatically::" msgstr "Python APIのバリアント - すべてがプログラムで作成されます::" -#: ../../recipes-stories.rst:114 448cb76d8437487a9e4354c822505fed +#: ../../recipes-stories.rst:114 a47a4f8569b14eb893a5ce9aeb3db643 msgid "Both variants will produce the same output PDF." msgstr "どちらのバリアントも同じ出力のPDFを生成します。" -#: ../../recipes-stories.rst:122 ac4ec6240b6a46c0954c8062cba0a4b9 +#: ../../recipes-stories.rst:122 2748abc7a81f48868dc86feadeed7cdc msgid "How to use Images" msgstr "画像の使用方法" -#: ../../recipes-stories.rst:124 90c97f133f2e4b30b39a2c4696dfc121 +#: ../../recipes-stories.rst:124 ecce5ae8803442768c9c0c9dcbaa0b91 msgid "" "Images can be referenced in the provided HTML source, or the reference to" " a desired image can also be stored via the Python API. In any case, this" @@ -116,13 +116,13 @@ msgstr "" "APIを介して必要な画像への参照も保存することができます。どちらの場合も、画像が見つかる場所を指す :ref:`Archive` " "を使用する必要があります。" -#: ../../recipes-stories.rst:126 c6ca051a1d6e42b8aa244564c3d2c15a +#: ../../recipes-stories.rst:126 db9731d3f4a84908b18bd2c0bac15515 msgid "" "Images with the binary content embedded in the HTML source are **not " "supported** by stories." msgstr "HTMLソースにバイナリコンテンツが埋め込まれた画像は、ストーリーズではサポートされていません。" -#: ../../recipes-stories.rst:128 5f32c7c756ef4be0a437b90ce5214bd1 +#: ../../recipes-stories.rst:128 621a5032b00c42b780871bc2b317708f msgid "" "We extend our \"Hello World\" example from above and display an image of " "our planet right after the text. Assuming the image has the name " @@ -133,15 +133,15 @@ msgstr "" "World」の例を拡張し、テキストの直後に地球の画像を表示します。画像の名前が「world.jpg」であり、スクリプトのフォルダに存在すると仮定すると、次に示すようにPython" " APIバリアントを修正したものとなります::" -#: ../../recipes-stories.rst:168 e969e2b172b94feb83d9655fec6bc41d +#: ../../recipes-stories.rst:168 0bd066e55e8d42828fb2a8874920b48f msgid "How to Read External HTML and CSS for a Story" msgstr "外部のHTMLとCSSをストーリーに読み込む方法" -#: ../../recipes-stories.rst:170 7e19f25d92ee4f1a8511dd3e258318aa +#: ../../recipes-stories.rst:170 1dd80d2a8aa54fb7b10356e199ee9a9b msgid "These cases are fairly straightforward." msgstr "これらのケースはかなり直接的です。" -#: ../../recipes-stories.rst:172 4ed9ee48112f40a8b259b2465a68871d +#: ../../recipes-stories.rst:172 9e74fe2a5497459c880103c0b8c72e49 msgid "" "As a general recommendation, HTML and CSS sources should be **read as " "binary files** and decoded before using them in a story. The Python " @@ -150,33 +150,33 @@ msgstr "" "一般的な推奨事項として、HTMLとCSSのソースはバイナリファイルとして読み込まれ、ストーリーで使用する前にデコードされるべきです。Pythonの" " `pathlib.Path` は、これを便利に行うための方法を提供しています。::" -#: ../../recipes-stories.rst:193 4fd46f90875b44a69c8dd5acd0a548a0 +#: ../../recipes-stories.rst:193 b15949b2628f4e559db2166cab03e684 msgid "How to Output Database Content with Story Templates" msgstr "データベースの内容をストーリーテンプレートで出力する方法" -#: ../../recipes-stories.rst:195 47225fab31ba4d87a907b28c648b4f16 +#: ../../recipes-stories.rst:195 ee70b3e26cb24cd281fd481f24b0f1f0 msgid "" "This script demonstrates how to report SQL database content using an " "**HTML template**." msgstr "このスクリプトは**HTMLテンプレート**を使用してSQLデータベースの内容を報告する方法を示しています。" -#: ../../recipes-stories.rst:199 f38d406929fa40fa8f66061f73cdd96a +#: ../../recipes-stories.rst:199 b38843035c074c12875aa488d121d745 msgid "The example SQL database contains two tables:" msgstr "この例のSQLデータベースには2つのテーブルが含まれています:" -#: ../../recipes-stories.rst:201 b94812ff71b8446db64e9b7c37e58f16 +#: ../../recipes-stories.rst:201 2a5e075abb974afb8fabb4bc379b46cc msgid "" "Table \"films\" contains one row per film with the fields **\"title\"**, " "**\"director\"** and (release) **\"year\"**." msgstr "テーブル「films」には、フィールド「title」、「director」、および(公開)「year」を持つ1つの映画ごとの行が含まれています。" -#: ../../recipes-stories.rst:202 087d84ce2ffa44f3be32e7c829f16d56 +#: ../../recipes-stories.rst:202 3ca9978ff3384e669316aec51f82f4e3 msgid "" "Table \"actors\" contains one row per actor and film title (fields " "(actor) **\"name\"** and (film) **\"title\"**)." msgstr "テーブル「actors」には、1つの行に1人の俳優と映画のタイトルが含まれています(フィールド(actor)「name」と(film)「title」)。" -#: ../../recipes-stories.rst:204 81d24924a40640d78b9674ba7752378e +#: ../../recipes-stories.rst:204 bcb64849fff74c60903737949f68225d msgid "" "The story DOM consists of a template for one film, which reports film " "data together with a list of casted actors." @@ -187,20 +187,20 @@ msgstr "ストーリーDOMは、映画の1つのテンプレートから成り #: ../../recipes-stories.rst:343 ../../recipes-stories.rst:377 #: ../../recipes-stories.rst:398 ../../recipes-stories.rst:433 #: ../../recipes-stories.rst:467 ../../recipes-stories.rst:497 -#: ../../recipes-stories.rst:531 10a6a04ffab448a693904fa6562852f0 -#: 20d4557e583446dfa3519f5815096bea 662d4d55afee47d489448fb719172844 -#: 72030eb08bd84bb3926d5cecc4d82ccf 78bc2440cbe7412b9bf0b75e745e6627 -#: 83bb1944cbf94328b801d16324a1ad96 84949fdfa7514cc59bd8b8b7a4927909 -#: 8abff15d3f3c45c1ae08cdec77474be5 a49f292558184c50b29571d1ab254679 -#: c42fd35c226c440ab8030a66578fb463 c575d698f0b843bba8483ee65c255913 +#: ../../recipes-stories.rst:531 2b3dd500f0434c64b97cf8b801ea18e2 +#: 64fc1d7aed8a43cd92ff2d020bf13ec8 7eb60a8b9a42446594e53b2bf3c68871 +#: a16e34a298a6425880ddf4fb4371e66e a22398fc103f4437ac647a31dd0d5fbf +#: b70a18528557465e8f61dc1122eca0ed c000544d4c274bbb9db7672b53850bc0 +#: d1607e50f7864da5afac7f3a5c6cfb74 d7f83da6ed26402bbc3b8fe0bc8c3e6c +#: daf59f85090b4c6dac31f2a2498b1d40 f3388231edfd4b7a869bc003cbfe749a msgid "**Files:**" msgstr "**ファイル:**" -#: ../../recipes-stories.rst:208 a2a1e348d9e042838d55f8b2ca65e907 +#: ../../recipes-stories.rst:208 54585f66fd3d47c8b7fa6a18c5e6d437 msgid "`docs/samples/filmfestival-sql.py`" msgstr "" -#: ../../recipes-stories.rst:209 472745fdbb2140cc88ff97f1efd88138 +#: ../../recipes-stories.rst:209 a25f79113d4845688acf7e96fc25d405 msgid "`docs/samples/filmfestival-sql.db`" msgstr "" @@ -210,12 +210,12 @@ msgstr "" #: ../../recipes-stories.rst:381 ../../recipes-stories.rst:402 #: ../../recipes-stories.rst:437 ../../recipes-stories.rst:471 #: ../../recipes-stories.rst:501 ../../recipes-stories.rst:535 -#: 0e0e5ff9c2a04ac0990576238409cda4 26ffa365cfc44c719dbb01fb9519f43a -#: 2900f76e1b83475e87db162fb9439c3e 3376e81c311b426981ebf498c12f21fa -#: 4d70a6c2c2944540be93cf34328a05f3 730a1512ae614b10b2cc88bd193ec8f6 -#: 7a0282d9d1a74d19863e2b071b07f2ed 7f144980bd694565965023fa54d50e10 -#: 9d5f58aaf9f24ea9902a5f2cc8c6002d bff859db6b4b43229a842bf7cfb3fc55 -#: d0e22dc3987c4ab8a807bde5eb46fa1b d87ca6479ae44271930f558b6e2f71cd +#: 0db5e50af58744b9a3fb1c616e67a684 28fc170e69fd4a44b4fa959ea9b3e32e +#: 33679f3b5997465888776dda77506957 36f0be1fd15b4a8c84694c64491bd2c7 +#: 37527330942949a0bd3be5dba9e785c4 5485b7bba46c4eda83ec8b43ca3d2ecf +#: 7e7b5ee4ed9b4cf090a10dcda115473d addec11282d24d079e19186339ab1b65 +#: c2ad827c824c44718c01801f503eb406 d8b52254ec3547f19f86eaca688e79bd +#: de7617178b054648a843a36e24659eab fd40019209fb42f487a8b1836bcd3638 msgid "|toggleStart|" msgstr "" @@ -225,20 +225,20 @@ msgstr "" #: ../../recipes-stories.rst:385 ../../recipes-stories.rst:406 #: ../../recipes-stories.rst:441 ../../recipes-stories.rst:475 #: ../../recipes-stories.rst:505 ../../recipes-stories.rst:539 -#: 2254a7bac9114d5587293aa2341b1b80 3df8bf92b3184897ae2d810e70ae8d14 -#: 4130bde2631e4deaa98731dc82c0b2b7 55c1cba07efa4e45b629385eb18c062d -#: 695974202c60498493434f1f23fea644 772c9ec4d6324d4d9c4eaaef362702f6 -#: 79aaa2443afd409aa211d1f2566989e4 8e0dce18dfc94ef980aaad52d6368802 -#: 929885be737a458c804c26119bc3dbcf a1b114a15780489785c1c7da4cdad0c2 -#: b7a48a23ab294228a771ae41ec926298 ca64e6f73f894dc99d5837a911c9d801 +#: 1f64c481b7224504a02af891e0682cb3 266ea01fca494309b1cd1c30895d31bc +#: 27da42d77a6b435bb286157e8930f759 52efc716cc3147a6a6486dfc0795eb8e +#: 532a65455e3d4cc5acae0770c9f6847d 5e487c5fb8fa43078450b2f3e6e90793 +#: 78f9acaef114448fb9edcb0e9b8ad611 918069a403554628bffb1412599598c8 +#: 92734f09b2ab4e3c80847c556c5ede0f 9d3b034ebb21493683dc0e7e2bb7f19b +#: a4115389a45c49f79c5235d1cab2feba f46a83317e2744c6979346649f812fde msgid "|toggleEnd|" msgstr "" -#: ../../recipes-stories.rst:225 d56a0f5dde024a079294ea29ac3451b4 +#: ../../recipes-stories.rst:225 50ac8bd58ac94ca9bad75235813275b8 msgid "How to Integrate with Existing PDFs" msgstr "既存のPDFと統合する方法" -#: ../../recipes-stories.rst:227 35cef744f12f4ecb8abdce38131b9d1e +#: ../../recipes-stories.rst:227 30768c0ff00d46c8acc3718442620f18 msgid "" "Because a :ref:`DocumentWriter` can only write to a new file, stories " "cannot be placed on existing pages. This script demonstrates a " @@ -247,7 +247,7 @@ msgstr "" ":ref:`DocumentWriter` " "は新しいファイルにのみ書き込むことができるため、ストーリーは既存のページに配置することはできません。このスクリプトは、この制限を回避する方法を示しています。" -#: ../../recipes-stories.rst:229 c83ff91892f54095973fcb3e6c2996d9 +#: ../../recipes-stories.rst:229 c4b4b44242604021bc2168807cae604d msgid "" "The basic idea is letting :ref:`DocumentWriter` output to a PDF in " "memory. Once the story has finished, we re-open this memory PDF and put " @@ -258,23 +258,23 @@ msgstr "" "がメモリ内のPDFに出力することです。ストーリーが完了したら、このメモリPDFを再度開き、メソッド " ":meth:`Page.show_pdf_page` を使用してそのページを既存のページに必要な位置に配置します。" -#: ../../recipes-stories.rst:233 478adffd37224715a8307d2796d60914 +#: ../../recipes-stories.rst:233 0ee71e800fb14b2ea803f1438f5379e4 msgid "`docs/samples/showpdf-page.py`" msgstr "" -#: ../../recipes-stories.rst:248 10af7e3f393349119a7f5f905280045b +#: ../../recipes-stories.rst:248 2464de777541472497c10c81706a8467 msgid "" "How to Make Multi-Columned Layouts and Access Fonts from Package " "`pymupdf-fonts`_" msgstr "多段組のレイアウトを作成し、パッケージ `pymupdf-fonts`_ からフォントにアクセスする方法" -#: ../../recipes-stories.rst:250 cabddb9e5daf41608b71841fd286ecb9 +#: ../../recipes-stories.rst:250 8dfd6dd8ca784d958d2a901ee4009a15 msgid "" "This script outputs an article (taken from Wikipedia) that contains text " "and multiple images and uses a 2-column page layout." msgstr "このスクリプトは、テキストと複数の画像を含む記事(Wikipediaから取得)を出力し、2列のページレイアウトを使用します。" -#: ../../recipes-stories.rst:252 1fbdbca9f0a749188450c8beeec4edc8 +#: ../../recipes-stories.rst:252 96f19cd490e0468983187394fd4f755d msgid "" "In addition, two \"Ubuntu\" font families from package `pymupdf-fonts`_ " "are used instead of defaulting to Base-14 fonts." @@ -282,56 +282,56 @@ msgstr "" "さらに、デフォルトではBase-14フォントにデフォルトでなく、パッケージpymupdf-" "fontsから2つの「Ubuntu」フォントファミリが使用されています。" -#: ../../recipes-stories.rst:254 6446834cb35d4eef9795b7aed6002aa6 +#: ../../recipes-stories.rst:254 d104d23aa09e4c20a51bd1765f6ec72d msgid "" "Yet another feature used here is that all data -- the images and the " "article HTML -- are jointly stored in a ZIP file." msgstr "ここで使用される別の機能は、すべてのデータ – 画像と記事のHTML – が共にZIPファイルに格納されていることです。" -#: ../../recipes-stories.rst:259 551b4e8830414bc49515834870570856 +#: ../../recipes-stories.rst:259 aabca9ed8f1545efa8e6c35a8fa570ed msgid "`docs/samples/quickfox.py`" msgstr "" #: ../../recipes-stories.rst:260 ../../recipes-stories.rst:313 -#: 24b0a89771e04cd3955e03783dd22398 3236ca4a14a04e4390802581bd436b7f +#: 56254f7b3a3f48038ba0fec7307956e4 d0d48278d419432ea98f56ca84a85f66 msgid "`docs/samples/quickfox.zip`" msgstr "" -#: ../../recipes-stories.rst:276 c29e7aba5cd64b3493bcc16f079ed64b +#: ../../recipes-stories.rst:276 c5b48fe9ccc34243a9cafef7d92058ac msgid "How to Make a Layout which Wraps Around a Predefined \"no go area\" Layout" msgstr "あらかじめ定義された「禁止エリア」レイアウトに囲まれたレイアウトの作成方法" -#: ../../recipes-stories.rst:279 2557271681564117bf3b68c3d4a48d7d +#: ../../recipes-stories.rst:279 9aeb4c6c24cf45918fc271c1bb22d655 msgid "" "This is a demo script using PyMuPDF's Story class to output text as a PDF" " with a two-column page layout." msgstr "これは、PyMuPDFのStoryクラスを使用してテキストを2列のページレイアウトでPDFとして出力するデモスクリプトです。" -#: ../../recipes-stories.rst:282 77cc994a39824003ac49af13cfd25bb4 +#: ../../recipes-stories.rst:282 9a9deed471b545109ffbf69ae0a63c13 msgid "The script demonstrates the following features:" msgstr "このスクリプトは、以下の機能を示しています:" -#: ../../recipes-stories.rst:284 4dd137658a3346cd99264e7453d47e17 +#: ../../recipes-stories.rst:284 8325013303e24647a592be6d38854cfa msgid "Layout text around images of an existing (\"target\") PDF." msgstr "既存の(「ターゲット」)PDFの画像の周りにテキストをレイアウトします。" -#: ../../recipes-stories.rst:285 5f77f32d2f3c4d4c8f4ba66a3527d5d1 +#: ../../recipes-stories.rst:285 12cd3a4970c942d28bc420575afefa73 msgid "" "Based on a few global parameters, areas on each page are identified, that" " can be used to receive text layouted by a Story." msgstr "各ページの特定の領域が、Storyによってレイアウトされたテキストを受け入れるために使用できるように、いくつかのグローバルパラメータに基づいて識別されます。" -#: ../../recipes-stories.rst:287 1bb5fb71e2ad4b10b2ce460ab9d7c380 +#: ../../recipes-stories.rst:287 5fb1ec0a189e438fbbb5d287d889152d msgid "" "These global parameters are not stored anywhere in the target PDF and " "must therefore be provided in some way:" msgstr "これらのグローバルパラメータは、ターゲットPDF内のどこにも保存されず、したがってどのような方法で提供される必要があります:" -#: ../../recipes-stories.rst:290 2b434e9a15be41db97a14b18707165a0 +#: ../../recipes-stories.rst:290 2939a7b2c8ff40199db1fb38e01d1c41 msgid "The width of the border(s) on each page." msgstr "各ページのボーダーの幅。" -#: ../../recipes-stories.rst:291 fd508f7167154667924741abda142baa +#: ../../recipes-stories.rst:291 07ff55f6cd4b4ea3ada2d0100b667d23 msgid "" "The fontsize to use for text. This value determines whether the provided " "text will fit in the empty spaces of the (fixed) pages of target PDF. It " @@ -341,11 +341,11 @@ msgid "" "be changed (a float value)." msgstr "テキストに使用するフォントサイズ。この値は、提供されたテキストがターゲットPDFの(固定された)ページの空白スペースに収まるかどうかを決定します。これはどのように予測することもできません。ターゲットPDFに十分なページがない場合、スクリプトは例外をスローし、すべてのページが少なくとも一部のテキストを受け取らない場合は警告メッセージが表示されます。どちらの場合も、FONTSIZEの値を変更できます(浮動小数点数)。" -#: ../../recipes-stories.rst:297 e40433abaa18483eb2eb0923c9e1f982 +#: ../../recipes-stories.rst:297 7f2693aa52f8413c957e3697cd159a39 msgid "Use of a 2-column page layout for the text." msgstr "テキストのための2列のページレイアウトの使用。" -#: ../../recipes-stories.rst:298 1077883c4c7342dcb640e677432189ed +#: ../../recipes-stories.rst:298 74329206c6d84722884bd5ba5f248027 msgid "" "The layout creates a temporary (memory) PDF. Its produced page content " "(the text) is used to overlay the corresponding target page. If text " @@ -354,7 +354,7 @@ msgid "" "printed." msgstr "レイアウトは一時的な(メモリ)PDFを作成します。その生成されたページのコンテンツ(テキスト)は、対応するターゲットページに重ねて配置されます。テキストがターゲットPDFの利用可能なページよりも多くのページを必要とする場合、例外が発生します。すべてのターゲットページが少なくとも一部のテキストを受け取らない場合、警告が表示されます。" -#: ../../recipes-stories.rst:302 c024a5905261497cb1b4e4efdc27b778 +#: ../../recipes-stories.rst:302 d18a70eaed5c44b98873dc74a92721a1 msgid "" "The script reads \"image-no-go.pdf\" in its own folder. This is the " "\"target\" PDF. It contains 2 pages with each 2 images (from the original" @@ -364,7 +364,7 @@ msgstr "" "スクリプトは、自分自身のフォルダ内の「image-no-" "go.pdf」を読み込みます。これが「ターゲット」PDFです。オリジナルの記事から2つの画像(各2ページ)を含み、それらは広範なテストカバレッジを作成する場所に配置されています。それ以外の場合、ページは空です。" -#: ../../recipes-stories.rst:306 8bf2b003049a43a3a6a4d3e85380e115 +#: ../../recipes-stories.rst:306 f46ddb852a574bd5a7bac7520a202c10 msgid "" "The script produces \"quickfox-image-no-go.pdf\" which contains the " "original pages and image positions, but with the original article text " @@ -373,29 +373,29 @@ msgstr "" "スクリプトは「quickfox-image-no-" "go.pdf」を生成し、元のページと画像の位置を含みますが、元の記事のテキストがその周りにレイアウトされます。" -#: ../../recipes-stories.rst:311 fac69c58f18e4cad93b6bbe595500a44 +#: ../../recipes-stories.rst:311 7df54784e06541489011541c3865adce msgid "`docs/samples/quickfox-image-no-go.py`" msgstr "" -#: ../../recipes-stories.rst:312 33f1e20f91cb43589c26cce9fa9dad08 +#: ../../recipes-stories.rst:312 06568562593e4d99b28e5de2e3b0939a msgid "`docs/samples/quickfox-image-no-go.pdf`" msgstr "" -#: ../../recipes-stories.rst:329 56d9dfca0593427d97c6591ebe7d0ef5 +#: ../../recipes-stories.rst:329 71c7aa076de44ec38e26d2fb754afc9b msgid "How to Output an HTML Table" msgstr "HTMLテーブルの出力方法" -#: ../../recipes-stories.rst:331 7fd15487f2154bce8913543993a18071 +#: ../../recipes-stories.rst:331 3301f44c71164017b224858b8757665b msgid "Outputting HTML tables is supported as follows:" msgstr "HTMLテーブルの出力は次のようにサポートされています:" -#: ../../recipes-stories.rst:333 f41428dc5cfb41d2b59536c66a3160b8 +#: ../../recipes-stories.rst:333 41e583af9b0542cdb2079c8ff6906052 msgid "" "Flat table layouts are supported (\"rows x columns\"), no support of the " "\"colspan\" / \"rowspan\" attributes." msgstr "フラットなテーブルレイアウト(「行 × 列」)がサポートされており、「colspan」/「rowspan」属性はサポートされていません。" -#: ../../recipes-stories.rst:334 d4a230d5e9bc48f59b80a16ac75454a3 +#: ../../recipes-stories.rst:334 47d7baea9d4e4285881ba226de5af09d msgid "" "Table header tag :htmlTag:`th` supports attribute \"scope\" with values " "\"row\" or \"col\". Applicable text will be bold by default." @@ -403,38 +403,37 @@ msgstr "" "テーブルヘッダータグ :htmlTag:`th` は、属性 “scope” をサポートし、値として “row” または “col” " "を持ちます。適用されるテキストはデフォルトで太字になります。" -#: ../../recipes-stories.rst:335 0240abab74e443059cd661a0f3622f89 +#: ../../recipes-stories.rst:335 74d5008eb5a141a3a1cfc8a54b018574 msgid "" "Column widths are computed automatically based on column content. They " "cannot be directly set." msgstr "列の幅は、列のコンテンツに基づいて自動的に計算されます。直接設定することはできません。" -#: ../../recipes-stories.rst:336 275c4502a1764f26bf97669f494f89d7 +#: ../../recipes-stories.rst:336 eced7f475d8d4d39b1c9a6daa98cb9e3 msgid "" "Table **cells may contain images** which will be considered in the column" " width calculation magic." msgstr "テーブルのセルには画像を含めることができ、これは列幅計算の際に考慮されます。" -#: ../../recipes-stories.rst:337 d331d86ebf704038a9bbceb623a29531 +#: ../../recipes-stories.rst:337 2d09432449124bd29ad88bb9203b3eb7 msgid "" "Row heights are computed automatically based on row content - leading to " "multi-line rows where needed." msgstr "行の高さは、行のコンテンツに基づいて自動的に計算され、必要に応じて複数行の行が生成されます。" -#: ../../recipes-stories.rst:338 da15424a1f54457a88ed9220fa0cc29f +#: ../../recipes-stories.rst:338 99cd09b56b7a4038b94e8cc59054e98e msgid "" "The potentially multiple lines of a table row will always be kept " -"together on one page (respectively \"where\" rectangle) and not be " -"split." +"together on one page (respectively \"where\" rectangle) and not be split." msgstr "テーブルの行の潜在的に複数行は、常に1つのページ(または “where” 矩形)にまとめて表示され、分割されることはありません。" -#: ../../recipes-stories.rst:339 de42a46ba1aa49ca96c4df690d752869 +#: ../../recipes-stories.rst:339 2b0dd155fb9b46abb1a3a34b5165e5cb msgid "" "Table header rows are only **shown on the first page / \"where\" " "rectangle.**" msgstr "テーブルのヘッダー行は、最初のページ / \"where\" 矩形のみに表示されます。" -#: ../../recipes-stories.rst:340 dfd109d2a85942e5a91c4d9477172744 +#: ../../recipes-stories.rst:340 9c971454188c471695037fe19b0b291f msgid "" "The \"style\" attribute is ignored when given directly in HTML table " "elements. Styling for a table and its elements must happen separately, in" @@ -443,7 +442,7 @@ msgstr "" "直接HTMLテーブル要素に \"style\" 属性が与えられた場合、無視されます。テーブルとその要素のスタイリングは、CSSソース内または" " :htmlTag:`style` タグ内で別途行う必要があります。" -#: ../../recipes-stories.rst:341 824d0ad6179445bc9aebf4342b70799e +#: ../../recipes-stories.rst:341 b6be54c8961a40fca5e5624606c40804 msgid "" "Styling for :htmlTag:`tr` elements is not supported and ignored. " "Therefore, a table-wide grid or alternating row background colors are not" @@ -453,11 +452,11 @@ msgstr "" ":htmlTag:`tr` " "要素のスタイリングはサポートされておらず、無視されます。したがって、テーブル全体のグリッドや交互の行の背景色はサポートされていません。ただし、以下の例スクリプトのいずれかは、この制限に対処する簡単な方法を示しています。" -#: ../../recipes-stories.rst:345 49de5955e687473a80951aa10426d04e +#: ../../recipes-stories.rst:345 3250a44850a04ea2b556eaa99626d432 msgid "`docs/samples/table01.py` This script reflects basic features." msgstr "`docs/samples/table01.py` このスクリプトは基本的な機能を反映しています。" -#: ../../recipes-stories.rst:353 495cf98110494a3d976d596eb422fa53 +#: ../../recipes-stories.rst:353 338c9d76f79b41df86b53304991fa447 msgid "" "`docs/samples/national-capitals.py` Advanced script extending table " "output options using simple additional code:" @@ -465,27 +464,27 @@ msgstr "" "`docs/samples/national-capitals.py` " "シンプルな追加コードを使用してテーブル出力オプションを拡張する高度なスクリプト:" -#: ../../recipes-stories.rst:355 870751a8a88b4f2fa10cc6f1af6c9ad3 +#: ../../recipes-stories.rst:355 90d13dbe2506480f9d05c17929eb6886 msgid "Multi-page output simulating **repeating header rows**" msgstr "繰り返しヘッダー行をシミュレートするマルチページ出力" -#: ../../recipes-stories.rst:356 35cabef79ecb4c39980cf6f698f4ddd4 +#: ../../recipes-stories.rst:356 cbf54ca5c2024e268d1186a280b3aa24 msgid "Alternating table row background colors" msgstr "交互のテーブル行の背景色" -#: ../../recipes-stories.rst:357 942afa97aeee48ec87d0f368d5045159 +#: ../../recipes-stories.rst:357 2f63b307cf484d58a093efeda123e5fd msgid "Table rows and columns delimited by gridlines" msgstr "グリッドラインで区切られたテーブル行と列" -#: ../../recipes-stories.rst:358 540b553ba30249b49a2cbd7cfe071cfb +#: ../../recipes-stories.rst:358 e5f6f8efbb6f4165b34f336502bd9f1c msgid "Table rows dynamically generated / filled with data from an SQL database" msgstr "SQLデータベースからデータを動的に生成/埋めるテーブル行" -#: ../../recipes-stories.rst:373 c437f1e26d964a57a089c497943dd50b +#: ../../recipes-stories.rst:373 fe9ae949732f4a8aa60268158ee88be6 msgid "How to Create a Simple Grid Layout" msgstr "シンプルなグリッドレイアウトの作成方法" -#: ../../recipes-stories.rst:375 54b312fc4029465baad884329bd742c9 +#: ../../recipes-stories.rst:375 715590c3c78d4629ad6c5345990d29e2 msgid "" "By creating a sequence of :ref:`Story` objects within a grid created via " "the :ref:`make_table` function a developer can " @@ -494,35 +493,35 @@ msgstr "" ":ref:`make_table` 関数を使用して作成されたグリッド内で :ref:`Story` " "オブジェクトのシーケンスを作成することで、開発者は必要なグリッドレイアウトを作成できます。" -#: ../../recipes-stories.rst:379 7f7894a4f1a24c2f8d19d4075f4b5b7e +#: ../../recipes-stories.rst:379 dd275a6adf8f4b8ea21b21fe0f4be667 msgid "`docs/samples/simple-grid.py`" msgstr "" -#: ../../recipes-stories.rst:394 523919d8ba244eefbcbd49f19c985249 +#: ../../recipes-stories.rst:394 5e3cbf68e72d48f9a4d031caea74efe1 msgid "How to Generate a Table of Contents" msgstr "目次の生成方法" -#: ../../recipes-stories.rst:396 d6d7a10225914a2b9c626f0655802772 +#: ../../recipes-stories.rst:396 eef825fca149402fa59fd4d03097fbcc msgid "" "This script lists the source code of all Python scripts that live in the " "script's directory." msgstr "このスクリプトは、スクリプトのディレクトリに存在するすべてのPythonスクリプトのソースコードをリスト表示します。" -#: ../../recipes-stories.rst:400 5dd18b33684b4caa9b104dccca7b0c9f +#: ../../recipes-stories.rst:400 f90b481f29e84be197d7b43765469464 msgid "`docs/samples/code-printer.py`" msgstr "" -#: ../../recipes-stories.rst:409 82b2c21cd6e54c5382968d83f7bd6cea +#: ../../recipes-stories.rst:409 c06dd956b971493bb3b3cbb5ad0a3e22 msgid "It features the following capabilities:" msgstr "次の機能が備わっています:" -#: ../../recipes-stories.rst:411 6b1029fee35443fabda8e62305bc82a3 +#: ../../recipes-stories.rst:411 b4d75405cd1b4d2bb534b59fb384119e msgid "" "Automatic generation of a Table of Contents (TOC) on separately numbered " "pages at the start of the document - using a specialized :ref:`Story`." msgstr "専用の :ref:`Story` を使用して、文書の冒頭に独立したページごとに自動的に目次(TOC)を生成します。" -#: ../../recipes-stories.rst:413 65f9c2f333eb4fc48dafd043533ec9c8 +#: ../../recipes-stories.rst:413 6337def52daa43f9abdd769a10a39184 msgid "" "Use of 3 separate :ref:`Story` objects per page: header story, footer " "story and the story for printing the Python sources." @@ -530,13 +529,13 @@ msgstr "" "ページごとに3つの別個の :ref:`Story` " "オブジェクトを使用:ヘッダーストーリー、フッターストーリー、Pythonソースの印刷用ストーリー。" -#: ../../recipes-stories.rst:415 d4fbb90b2a904bff937004ba1c2b9f95 +#: ../../recipes-stories.rst:415 4f7e17024ef64638a584ff82424ee1e1 msgid "" "The page **footer is automatically changed** to show the name of the " "current Python file." msgstr "ページフッターは自動的に変更され、現在のPythonファイル名が表示されます。" -#: ../../recipes-stories.rst:417 48671a4886544cd886cc781f24f4b7fa +#: ../../recipes-stories.rst:417 13b96aa9ead945c698966dcda2ef5de1 msgid "" "Use of :meth:`Story.element_positions` to collect the data for the TOC " "and for the dynamic adjustment of page footers. This is an example of a " @@ -546,7 +545,7 @@ msgstr "" ":meth:`Story.element_positions` " "の使用により、TOCのデータの収集とページフッターの動的調整に使用されます。これは、ストーリー出力プロセスとスクリプト間の双方向コミュニケーションの例です。" -#: ../../recipes-stories.rst:419 f9a1ab2eaf3b4c08b8d3fc9e861eb12e +#: ../../recipes-stories.rst:419 a1b7b48737734821b3d4cee8cb99deb6 msgid "" "The main PDF with the Python sources is being written to memory by its " ":ref:`DocumentWriter`. Another :ref:`Story` / :ref:`DocumentWriter` pair " @@ -557,11 +556,11 @@ msgstr "" ":ref:`Story` / :ref:`DocumentWriter` " "のペアを使用して(メモリ)PDFをTOCページのために作成します。最後に、これらのPDFは結合されて結果がディスクに保存されます。" -#: ../../recipes-stories.rst:428 8f11a011268749e6b04ffbd66eb3ca5f +#: ../../recipes-stories.rst:428 99dd73162add4ea0afbb0634cf53dcf6 msgid "How to Display a List from JSON Data" msgstr "JSONデータからリストを表示する方法" -#: ../../recipes-stories.rst:430 3f99e53c70da4056abf17fa215338fb9 +#: ../../recipes-stories.rst:430 6fdc8240537845b5b007826459e137e2 msgid "" "This example takes some JSON data input which it uses to populate a " ":ref:`Story`. It also contains some visual text formatting and shows how " @@ -570,15 +569,15 @@ msgstr "" "この例では、JSONデータ入力を使用して :ref:`Story` " "を生成し、いくつかの視覚的なテキスト書式設定を行い、リンクを追加する方法を示しています。" -#: ../../recipes-stories.rst:435 b0d6885d524e414f92af2ada7206a219 +#: ../../recipes-stories.rst:435 af211242fc1e45d4935f0534d472ea83 msgid "`docs/samples/json-example.py`" msgstr "" -#: ../../recipes-stories.rst:451 cb9837f84ab747d6893f7adec4a60f65 +#: ../../recipes-stories.rst:451 d1800a418d944e7bbe3af548c292e262 msgid "Using the Alternative :meth:`Story.write*()` functions" msgstr ":meth:`Story.write*()` 関数の使用方法" -#: ../../recipes-stories.rst:453 28f1e20054974ec5b62f33c601199910 +#: ../../recipes-stories.rst:453 a6aa8d8c6606441b896c25ed8b547c36 msgid "" "The :meth:`Story.write*()` functions provide a different way to use the " ":ref:`Story` functionality, removing the need for calling code to " @@ -591,27 +590,27 @@ msgstr "" ":meth:`Story.draw()` などを呼び出すループを実装する必要がなくなりますが、少なくとも `rectfn()` " "コールバックを提供する必要があります。" -#: ../../recipes-stories.rst:462 04203c109b2145af88ee76559c4b4889 +#: ../../recipes-stories.rst:462 0b9c207cf6c34028bd59a17ba745a06b msgid "How to do Basic Layout with :meth:`Story.write()`" msgstr ":meth:`Story.write()` を使用した基本的なレイアウトの方法" -#: ../../recipes-stories.rst:464 7b8717dea3414af88f56f22b7654460f +#: ../../recipes-stories.rst:464 3afb41fae5c04c80bb274a6695783cf8 msgid "" "This script lays out multiple copies of its own source code, into four " "rectangles per page." msgstr "このスクリプトは、自身のソースコードの複数のコピーを1ページあたり4つの四角形にレイアウトします。" -#: ../../recipes-stories.rst:469 31cc2a3ae69d48f1852dd9c9d44d1bda +#: ../../recipes-stories.rst:469 eaa7c3914c6e4d10b06fc5e83aef6ef9 msgid "`docs/samples/story-write.py`" msgstr "" -#: ../../recipes-stories.rst:484 7fe6a017b2494a7293f542e9285ef055 +#: ../../recipes-stories.rst:484 254625a2c4634deb8a6e5fed8ffd181e msgid "" "How to do Iterative Layout for a Table of Contents with " ":meth:`Story.write_stabilized()`" msgstr ":meth:`Story.write_stabilized()` を使用した目次付きの繰り返しレイアウトの方法" -#: ../../recipes-stories.rst:486 875de7f41fe5419a8c8976489c4f5b75 +#: ../../recipes-stories.rst:486 f99a682ccb04406c9c3fb8d6add61ab6 msgid "" "This script creates html content dynamically, adding a contents section " "based on :ref:`ElementPosition` items that have non-zero `.heading` " @@ -620,30 +619,30 @@ msgstr "" "このスクリプトは、要素の位置情報(:ref:`ElementPosition` アイテム)を基にコンテンツを動的に作成し、`.heading` " "値がゼロでない要素に基づいて目次セクションを追加します。" -#: ../../recipes-stories.rst:489 016f9019df6f401d855ec926d4fc459b +#: ../../recipes-stories.rst:489 f707d1092f04401f906070fe2e82c373 msgid "" "The contents section is at the start of the document, so modifications to" " the contents can change page numbers in the rest of the document, which " "in turn can cause page numbers in the contents section to be incorrect." msgstr "目次セクションは文書の先頭に配置されているため、目次への変更によって文書の他の部分のページ番号が変更され、それに伴い目次セクションのページ番号が正しくなくなる可能性があります。" -#: ../../recipes-stories.rst:493 480c460689c14ea29d40f96c14569604 +#: ../../recipes-stories.rst:493 0fee61fd78ed4f9ab50188a4fd67cce7 msgid "" "So the script uses :meth:`Story.write_stabilized()` to repeatedly lay " "things out until things are stable." msgstr "したがって、スクリプトは :meth:`Story.write_stabilized()` を使用して、安定するまで繰り返しレイアウトを行います。" -#: ../../recipes-stories.rst:499 27e5b23eb5dd44bfb59bb211f45f96f7 +#: ../../recipes-stories.rst:499 42fb0df4e27948abb714018fac0417f5 msgid "`docs/samples/story-write-stabilized.py`" msgstr "" -#: ../../recipes-stories.rst:514 2df6e4540b734dbf8ca0e146f2637609 +#: ../../recipes-stories.rst:514 17025d9951f14511b6e562a16ce16843 msgid "" "How to do Iterative Layout and Create PDF Links with " ":meth:`Story.write_stabilized_links()`" msgstr "繰り返しレイアウトと PDF リンクの作成方法::meth:`Story.write_stabilized_links()` の使用" -#: ../../recipes-stories.rst:516 d449563590fa44fd98f4b5df6b6a6537 +#: ../../recipes-stories.rst:516 fb00dcb0ee8d442495b1e4dff18aa8bc msgid "" "This script is similar to the one described in \"How to use " ":meth:`Story.write_stabilized()`\" above, except that the generated PDF " @@ -653,7 +652,7 @@ msgstr "" "このスクリプトは、「:meth:`Story.write_stabilized()` " "の使用方法」で説明されているものと類似していますが、生成される PDF には、元の HTML 内の内部リンクに対応するリンクも含まれています。" -#: ../../recipes-stories.rst:520 2ed855e608094520bc84929eeb521ec3 +#: ../../recipes-stories.rst:520 6dc7e0e7857b4aa5a713ffcb6869f11c msgid "" "This is done by using :meth:`Story.write_stabilized_links()`; this is " "slightly different from :meth:`Story.write_stabilized()`:" @@ -661,15 +660,15 @@ msgstr "" "これは、:meth:`Story.write_stabilized_links()` を使用して行われます。これは " ":meth:`Story.write_stabilized()` とわずかに異なります:" -#: ../../recipes-stories.rst:523 c6d43f4fdaf0479a8bf2e266b33bb334 +#: ../../recipes-stories.rst:523 77950ef72ea147ec8060ff1ce1609032 msgid "It does not take a :ref:`DocumentWriter` `writer` arg." msgstr ":ref:`DocumentWriter` の `writer` 引数は必要ありません。" -#: ../../recipes-stories.rst:524 cea0694d79bb491d8291eb6882882699 +#: ../../recipes-stories.rst:524 f61073b1496a472eb4ffa2abdafdbcdd msgid "It returns a PDF :ref:`Document` instance." msgstr "PDF :ref:`Document` のインスタンスを返します。" -#: ../../recipes-stories.rst:526 56d55a559eea4dbfbfa31c5c1c1f0edc +#: ../../recipes-stories.rst:526 8200eb3c7ddb4141beb9fd18576a6795 msgid "" "[The reasons for this are a little involved; for example a " ":ref:`DocumentWriter` is not necessarily a PDF writer, so doesn't really " @@ -678,51 +677,50 @@ msgstr "" "[これに関する理由は少し複雑です。例えば、 :ref:`DocumentWriter` が必ずしも PDF ライターであるとは限らず、PDF " "特有の API ではあまりうまく動作しないためです。]" -#: ../../recipes-stories.rst:533 d5cd7ed0ddb34f2fa0a6a6cf5c284666 +#: ../../recipes-stories.rst:533 6cb38487f6e444d1a3092633504e9b1e msgid "`docs/samples/story-write-stabilized-links.py`" msgstr "" -#: ../../recipes-stories.rst:547 afe39a8a335a43fe8acc050001673036 +#: ../../recipes-stories.rst:547 7ab6a39468b647919043a79fb3f1c46b msgid "Footnotes" msgstr "脚注" -#: ../../recipes-stories.rst:548 99f13094300440e0974e9155803802c1 +#: ../../recipes-stories.rst:548 6b3a6c4d3e5341b0b7eb4ef2b8a275a9 msgid "HTML & CSS support" msgstr "" -#: ../../recipes-stories.rst:552 29d7f13d4dd84a1e93fd4228e58ff21b +#: ../../recipes-stories.rst:552 a2b43d5c16a449989cd09987682f3446 msgid "" "At the time of writing the HTML engine for Stories is fairly basic and " "supports a subset of CSS2 attributes." msgstr "執筆時点では、ストーリーのHTMLエンジンはかなり基本的であり、一部のCSS2属性をサポートしています。" -#: ../../recipes-stories.rst:554 87df49b83f4e4bcd8b03a5254ab7fb34 +#: ../../recipes-stories.rst:554 97098e31431e469cb54b616f0cdfed52 msgid "Some important CSS support to consider:" msgstr "考慮すべき重要なCSSサポート:" -#: ../../recipes-stories.rst:556 be1f7184491c4b7cb597b0a280882436 +#: ../../recipes-stories.rst:556 6aea20cf470f4b5b85843b4657ecc2c2 msgid "The only available layout is relative layout." msgstr "唯一利用可能なレイアウトは相対レイアウトです。" -#: ../../recipes-stories.rst:557 322e4bdf12264c75b8fdd3a611adb3c4 +#: ../../recipes-stories.rst:557 569101dce0664d508b481c1cce2d5b73 msgid "`background` is unavailable, use `background-color` instead." msgstr "`background` は利用できませんが、代わりに `background-color` を使用してください。" -#: ../../recipes-stories.rst:558 954d036c7a8e4a67a8114ebcbc73800d +#: ../../recipes-stories.rst:558 6d32b59649cf4d4ea1b9b964f070004f msgid "`float` is unavailable." msgstr "`float` は利用できません。" -#: ../../footer.rst:71 cf5755c239104b04add87c9db3320b53 +#: ../../footer.rst:60 bf323a0643e14a8fbf2f882c9ed3db27 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 f8b15eefd04748769051472745388a54 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/recipes-text.mo b/docs/locales/ja/LC_MESSAGES/recipes-text.mo index 26f2d1cb1..20480d593 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes-text.mo and b/docs/locales/ja/LC_MESSAGES/recipes-text.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes-text.po b/docs/locales/ja/LC_MESSAGES/recipes-text.po index b967149b2..925becb51 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes-text.po +++ b/docs/locales/ja/LC_MESSAGES/recipes-text.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-17 11:45+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,41 +19,41 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 3e61ae7831d54b53b314ae8ac1f2728d +#: ../../header.rst:-1 db5f378b70004af590010a41f0163be1 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 7e429b7f86ad4439a4d0d52bff6265b3 +#: ../../header.rst:-1 148acec04cbf474bb41f5d5e3c1ec508 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 c2c6ea37f70d4162b401f8d64e053041 +#: ../../header.rst:-1 e6b3ab82dcbf41f687b68d59732a00a5 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../recipes-text.rst:7 f19bf747d27c439092c16fd8f55e61ea +#: ../../recipes-text.rst:7 70700f14953047898a918c1a07026ce4 msgid "Text" msgstr "テキスト" -#: ../../recipes-text.rst:13 24a6bb5652e64a3e9b0516522d112b8e +#: ../../recipes-text.rst:13 83030b51505549bba2596e8da94111a2 msgid "How to Extract all Document Text" msgstr "すべてのドキュメントテキストを抽出する方法" -#: ../../recipes-text.rst:15 da58de122b0349f5bd4029b10c3fc51c +#: ../../recipes-text.rst:15 d8d7d26a27a346a5b03d28e400fed598 msgid "" "This script will take a document filename and generate a text file from " "all of its text." msgstr "このスクリプトは、ドキュメントのファイル名を受け取り、そのテキストからテキストファイルを生成します。" -#: ../../recipes-text.rst:17 e27f607f72c943c08549280d89ec9713 +#: ../../recipes-text.rst:17 c4c73613ac86439c93304a2549dbad7f msgid "The document can be any :ref:`supported type`." msgstr "ドキュメントは、:ref:`サポートされている ` 任意のタイプのものが使用できます。" -#: ../../recipes-text.rst:19 8b9c3162891a4e76846b7faddfd2e615 +#: ../../recipes-text.rst:19 8a339400b648449eab4a10cf290842dc msgid "" "The script works as a command line tool which expects the document " "filename supplied as a parameter. It generates one text file named " @@ -61,14 +61,14 @@ msgid "" " form feed character::" msgstr "このスクリプトはコマンドラインツールとして機能し、ドキュメントのファイル名をパラメータとして受け取ります。スクリプトのディレクトリに「filename.txt」という名前のテキストファイルが生成されます。ページのテキストはフォームフィード文字で区切られます。" -#: ../../recipes-text.rst:28 70512f134ae8415486e534b18e92d13c +#: ../../recipes-text.rst:28 8a4f5ec777ce40e8a27b5ef06541f000 msgid "" "The output will be plain text as it is coded in the document. No effort " "is made to prettify in any way. Specifically for PDF, this may mean " "output not in usual reading order, unexpected line breaks and so forth." msgstr "出力はドキュメント内でコード化された通りのプレーンテキストになるため、見栄えの調整は行いません。特にPDFの場合、通常の読み順にならない出力や予期せぬ改行などが発生するかもしれません。" -#: ../../recipes-text.rst:30 4437419de89b40c1a19b0f5f6bc0fcfe +#: ../../recipes-text.rst:30 fa3eea374680406b9a9fba35f66055ca msgid "" "You have many options to rectify this -- see chapter :ref:`Appendix2`. " "Among them are:" @@ -76,35 +76,35 @@ msgstr "" "これを修正するための多くのオプションがあります。詳細は :ref:`Appendix2` " "章「埋め込みファイルに関する考慮事項」を参照してください。以下の方法があります:" -#: ../../recipes-text.rst:32 bfbb3a38a30846f58d6981d4c70a305f +#: ../../recipes-text.rst:32 93321f1d110c45879711cddd65ff7248 msgid "" "Extract text in HTML format and store it as a HTML document, so it can be" " viewed in any browser." msgstr "テキストをHTML形式で抽出し、HTMLドキュメントとして保存することで、任意のブラウザで表示できるようにします。" -#: ../../recipes-text.rst:33 50700203a0f94688a83cb4164d3f1569 +#: ../../recipes-text.rst:33 d31ce8ccb61f4333b9485c37ae95f7a1 msgid "" "Extract text as a list of text blocks via *Page.get_text(\"blocks\")*. " "Each item of this list contains position information for its text, which " "can be used to establish a convenient reading order." msgstr "Page.get_text(\"blocks\")を使ってテキストブロックのリストとして抽出します。リストの各アイテムにはテキストの位置情報が含まれており、便利な読み順を確立するのに使用できます。" -#: ../../recipes-text.rst:34 18ebebd8804f451880df619ede6a80a9 +#: ../../recipes-text.rst:34 97d77e0ecd494eb89e58bf1dfd6f89b0 msgid "" "Extract a list of single words via *Page.get_text(\"words\")*. Its items " "are words with position information. Use it to determine text contained " "in a given rectangle -- see next section." msgstr "Page.get_text(\"words\")を使って単語のリストを抽出します。各アイテムには位置情報が含まれています。これを使用して特定の四角形に含まれるテキストを決定します。" -#: ../../recipes-text.rst:36 f466a7b8d0eb421b88a53f870a6a53a6 +#: ../../recipes-text.rst:36 f695a7c93e504149bb7de0f587892b2a msgid "See the following two sections for examples and further explanations." msgstr "以下の2つのセクションを見て、例と詳細な説明をご覧ください。" -#: ../../recipes-text.rst:44 76cd3a13132542029bdeb26cb3093459 +#: ../../recipes-text.rst:44 37809012042b408fab85b6b39de8e823 msgid "How to Extract Text as Markdown" msgstr "テキストをMarkdown形式で抽出する方法" -#: ../../recipes-text.rst:46 4dc5e856d70949738e19ff631552d88d +#: ../../recipes-text.rst:46 5c0dcdf0ae704f9aa9fd1bc738b0c185 msgid "" "This is especially useful for :title:`RAG/LLM` environments - please see " ":ref:`Outputting as Markdown `." @@ -112,11 +112,11 @@ msgstr "" "これは、特に :title:`RAG/LLM` 環境にとって便利です - :ref:`Outputting as Markdown " "` を参照してください。" -#: ../../recipes-text.rst:52 458957db58034d47b970142edc69b301 +#: ../../recipes-text.rst:52 442230f4e860484f83323c6a20d08e08 msgid "How to Extract Key-Value Pairs from a Page" msgstr "ページからキーと値のペアを抽出する方法" -#: ../../recipes-text.rst:53 dd2c616e2fcc4ac59369ec59dad07ddc +#: ../../recipes-text.rst:53 9555400172a34d69bae562156d51b80c msgid "" "If the layout of a page is *\"predictable\"* in some sense, then there is" " a simple way to find the values for a given set of keywords fast and " @@ -128,40 +128,40 @@ msgstr "" "`以下の例のスクリプト `_ を参照してください。" -#: ../../recipes-text.rst:55 bdcbf88bba624cdc9239fdfc537ca4d1 +#: ../../recipes-text.rst:55 f8548ec2c56441c0aa02ed28f3607350 msgid "\"Predictable\" in this context means:" msgstr "ここでの「予測可能」とは、次のような意味です:" -#: ../../recipes-text.rst:57 ecc50e4173a04ed6939f6deb8f551743 +#: ../../recipes-text.rst:57 0e297df5b4ed4548956122fabdd7e963 msgid "" "Every keyword is followed by its value -- no other text is present in " "between them." msgstr "各キーワードの後にはその値が続きます。それらの間に他のテキストはありません。" -#: ../../recipes-text.rst:58 67cc396e753549919ce7558347cb1c00 +#: ../../recipes-text.rst:58 f9375ed8400040619728b9f1d3031882 msgid "" "The bottom of the value's boundary box is **not above** the one of the " "keyword." msgstr "値の境界ボックスの下端は、キーワードの境界ボックスよりも上にありません。" -#: ../../recipes-text.rst:59 8a04a7fad63e4e5b9602f016777ddccf +#: ../../recipes-text.rst:59 be1d806d61424c179b103fbdfef14d11 msgid "" "There are **no other restrictions**: the page layout may or may not be " "fixed, and the text may also have been stored as one string. Key and " "value may have any distance from each other." msgstr "他の制約はありません:ページのレイアウトが固定されているかどうかは問いませんし、テキストは1つの文字列として保存されている可能性もあります。キーと値はお互いに任意の距離を持つかもしれません。" -#: ../../recipes-text.rst:61 be5f887cb08d412d8fc99e9873ea4516 +#: ../../recipes-text.rst:61 05731f2a8f5b4e72a99dbd3afb4628ff msgid "" "For example, the following five key-value pairs will be correctly " "identified::" msgstr "例として、以下の5つのキーと値のペアが正しく識別されます::" -#: ../../recipes-text.rst:77 d21a47fb8bdb409db7ff35168572744a +#: ../../recipes-text.rst:77 635adbc1c75c4e019220ca2fafd16863 msgid "How to Extract Text from within a Rectangle" msgstr "四角形内のテキストを抽出する方法" -#: ../../recipes-text.rst:78 d7ce07386a40498e81dac897d0a60d64 +#: ../../recipes-text.rst:78 c66f827c3b4e4d40937891f31bca0ed8 msgid "" "There is now (v1.18.0) more than one way to achieve this. We therefore " "have created a `folder `_ リポジトリに、この特定のトピックに対応するフォルダを作成しました。" -#: ../../recipes-text.rst:88 ad94ee89ee5f44a2a7f7aecc5e242a18 +#: ../../recipes-text.rst:88 d80121123daf4bf2a3e069027d837c3f msgid "How to Extract Text in Natural Reading Order" msgstr "自然な読み順でテキストを抽出する方法" -#: ../../recipes-text.rst:90 97316353159045629e33ddb9c185a566 +#: ../../recipes-text.rst:90 c1cc039bb3804acebad6d1f03565e6be msgid "" "One of the common issues with PDF text extraction is, that text may not " "appear in any particular reading order." msgstr "PDFのテキスト抽出によくある問題の1つは、テキストが特定の読み順に表示されないことです。" -#: ../../recipes-text.rst:92 066f8ff32d184352b43df6aeab04638c +#: ../../recipes-text.rst:92 16fbf3e452294bcd88f4d82c83bc87d6 msgid "" "This is the responsibility of the PDF creator (software or a human). For " "example, page headers may have been inserted in a separate step -- after " @@ -192,31 +192,31 @@ msgid "" "snippet will add some header and footer lines to an existing PDF::" msgstr "これはPDFの作成者(ソフトウェアまたは人間)の責任です。たとえば、ページヘッダーはドキュメントが作成された後の別のステップで挿入された可能性があります。そのような場合、ヘッダーテキストはページテキストの抽出の最後に表示されることがあります(ただし、PDFビューアソフトウェアでは正しく表示されます)。以下のスニペットは、既存のPDFにいくつかのヘッダーとフッターの行を追加します::" -#: ../../recipes-text.rst:104 3aa87e0042294457a5bb765ec561ba30 +#: ../../recipes-text.rst:104 978688d53bd949cc898416980acbc003 msgid "" "The text sequence extracted from a page modified in this way will look " "like this:" msgstr "このように変更されたページから抽出されたテキストのシーケンスは次のようになります:" -#: ../../recipes-text.rst:106 521c301af2934dddbe4e321777f795a5 +#: ../../recipes-text.rst:106 ef048f5a008646e991b0568de7841cb2 msgid "original text" msgstr "元のテキスト" -#: ../../recipes-text.rst:107 d8383fa532b24e5c88830dc3e777403a +#: ../../recipes-text.rst:107 dc14bb8d05724f89a619b2d3cceb4926 msgid "header line" msgstr "ヘッダーライン" -#: ../../recipes-text.rst:108 d62998c0aded4df5af1731aac52eb0e9 +#: ../../recipes-text.rst:108 babbbbad94c4402ea4effe7f7adbca5d msgid "footer line" msgstr "フッターライン" -#: ../../recipes-text.rst:110 1f2b9106bf5d4c0a99cf5df16d312f9f +#: ../../recipes-text.rst:110 e694010b792d4eb0855e2f6564a46a67 msgid "" "PyMuPDF has several means to re-establish some reading sequence or even " "to re-generate a layout close to the original:" msgstr "PyMuPDFには、いくつかの方法で読み順を再確立したり、元のレイアウトに近い形で再生成する手段があります:" -#: ../../recipes-text.rst:112 6229089f291e473d88bd6bc1a1837f52 +#: ../../recipes-text.rst:112 716e99c2ff9344fe81fafd78de2007c3 msgid "" "Use `sort` parameter of :meth:`Page.get_text`. It will sort the output " "from top-left to bottom-right (ignored for XHTML, HTML and XML output)." @@ -224,7 +224,7 @@ msgstr "" ":meth:`Page.get_text` の `sort` " "パラメーターを使用します。これにより、出力が左上から右下に向かってソートされます(XHTML、HTML、XML出力には無効です)。" -#: ../../recipes-text.rst:113 8ba15d25debf43bab9e13bbaab2ed85f +#: ../../recipes-text.rst:113 bcd2685affe8476281c9b4f6df0f6ff9 msgid "" "Use the `pymupdf` module in CLI: `python -m pymupdf gettext ...`, which " "produces a text file where text has been re-arranged in layout-preserving" @@ -233,7 +233,7 @@ msgstr "" "CLIで `pymupdf` モジュールを使用します: `python -m pymupdf gettext ...` " "。これにより、テキストがレイアウトを保持するモードで再配置されたテキストファイルが生成されます。出力を制御するための多くのオプションが利用可能です。" -#: ../../recipes-text.rst:115 960f4e2c9a93433ab4cd78d6715c0ae9 +#: ../../recipes-text.rst:115 b14412bcce2e4fabab0f9c2421c08934 msgid "" "You can also use the above mentioned `script " "`_ を自分の変更とともに使用することもできます。" -#: ../../recipes-text.rst:122 c1e943aea17d4e279c79161fc11fd5bd +#: ../../recipes-text.rst:122 6fb4548c9a0a42da9939b9ba59fee62a msgid "" "How to :index:`Extract Table Content ` from " "Documents" msgstr "ドキュメントから表の内容を抽出する方法" -#: ../../recipes-text.rst:123 f3d5dc3547364629a7d9b0173897d634 +#: ../../recipes-text.rst:123 b9aeb958d874414a8dfbe817d7e491be msgid "" "If you see a table in a document, you are normally not looking at " "something like an embedded Excel or other identifiable object. It usually" " is just normal, standard text, formatted to appear as tabular data." msgstr "文書で表を見る場合、通常は埋め込まれたExcelなどの識別可能なオブジェクトのようなものではありません。通常、単なる通常の標準テキストで、表のデータとして表示されるようにフォーマットされています。" -#: ../../recipes-text.rst:125 c1432f2ac8ec4e108b935d58aa5120c7 +#: ../../recipes-text.rst:125 48f2b8ac5dc54b469a4fac3b57e95083 msgid "" "Extracting tabular data from such a page area therefore means that you " "must find a way to **identify** the table area (i.e. its boundary box), " @@ -263,13 +263,13 @@ msgid "" "then extract text based on this information." msgstr "したがって、そのようなページ領域から表のデータを抽出するには、まず表の領域(つまり、その境界ボックス)を特定する方法を見つける必要があり、その後(1)グラフィカルに表と列の境界を示し、(2)この情報に基づいてテキストを抽出する必要があります。" -#: ../../recipes-text.rst:127 c21a3b9c27df42fcadfafc583f4be381 +#: ../../recipes-text.rst:127 b55a6db346bb4df3adb269cd4da2d2a1 msgid "" "This can be a very complex task, depending on details like the presence " "or absence of lines, rectangles or other supporting vector graphics." msgstr "これは、線、四角形、またはその他のサポートベクトルグラフィックの存在または不在などの詳細に依存するため、非常に複雑なタスクになる可能性があります。" -#: ../../recipes-text.rst:129 4a941837396043219879541fe52eadff +#: ../../recipes-text.rst:129 2ab382191b1e4c8dbcb05ab17b9a6f16 msgid "" "Method :meth:`Page.find_tables` does all that for you, with a high table " "detection precision. Its great advantage is that there are no external " @@ -282,7 +282,7 @@ msgstr "" "は、高い表検出精度を備えて、すべてをあなたのために行います。その大きな利点は、外部ライブラリの依存関係がないこと、人工知能や機械学習技術を使用する必要がないことです。また、データ分析のためのPythonパッケージである" " `pandas `_ のための統合されたインターフェースも提供します。" -#: ../../recipes-text.rst:131 6af441540e8d4b6da806234c3fdcbc9d +#: ../../recipes-text.rst:131 b620d2150671401698d7a280f56ee3cc msgid "" "Please have a look at example `Jupyter notebooks " "`_ " "ノートブックをご覧いただければ幸いです。これには、1つのページに複数の表や複数のページにまたがる表の断片を結合するなどの状況が含まれています。" -#: ../../recipes-text.rst:138 664ec294ce4b4c9e8a94e6109cc5e546 +#: ../../recipes-text.rst:138 259587f74c604a45bd83bdba19dbfdd9 msgid "How to Mark Extracted Text" msgstr "抽出したテキストをマークする方法" -#: ../../recipes-text.rst:139 b3ac20b17bdd4889a9bc743d2d963466 +#: ../../recipes-text.rst:139 b7f64cd47ccb4f889b2a09f74c66564f msgid "" "There is a standard search function to search for arbitrary text on a " "page: :meth:`Page.search_for`. It returns a list of :ref:`Rect` objects " @@ -309,23 +309,23 @@ msgstr "" "です。これは、見つかったテキストを囲む :ref:`Rect` " "オブジェクトのリストを返します。これらの四角形は、見つかったテキストを目に見えるようにマークするために自動的に注釈を挿入するのに使用できます。" -#: ../../recipes-text.rst:141 56e9b50e4a8e41c6b605771a67b7de28 +#: ../../recipes-text.rst:141 febfc5dbb25f420dbf6c3ef3e88b24c4 msgid "This method has advantages and drawbacks. Pros are:" msgstr "この方法には利点と欠点があります。利点は次のとおりです:" -#: ../../recipes-text.rst:143 db7f07f1115b4ca28c9257e548630462 +#: ../../recipes-text.rst:143 101f473976a74f1c9ab424859e8862dd msgid "The search string can contain blanks and wrap across lines" msgstr "検索文字列には空白を含めることができ、行をまたぐことができます。" -#: ../../recipes-text.rst:144 2c8d52f9cb23447787d282cce30843e1 +#: ../../recipes-text.rst:144 6ad25d7b6043421a8142042b3b9a3ec9 msgid "Upper or lower case characters are treated equal" msgstr "大文字と小文字は同じように扱われます。" -#: ../../recipes-text.rst:145 4a63542e32d44e04b249706394ce459f +#: ../../recipes-text.rst:145 b3efeff8f1c9463ab435a4742bc0c5bd msgid "Word hyphenation at line ends is detected and resolved" msgstr "行末での単語のハイフネーションが検出され、解決されます。" -#: ../../recipes-text.rst:146 e566dc657c60465bb73f3e3ff905ab66 +#: ../../recipes-text.rst:146 7a50b0a1eba54da5a0cbd913bde35367 msgid "" "Return may also be a list of :ref:`Quad` objects to precisely locate text" " that is **not parallel** to either axis -- using :ref:`Quad` output is " @@ -335,24 +335,24 @@ msgstr "" "オブジェクトのリストになる場合もあり、これにより軸に対して平行でないテキストを正確に位置付けることができます。ページの回転がゼロでない場合には、 " ":ref:`Quad` の出力を使用することも推奨されます。" -#: ../../recipes-text.rst:148 a105036bbab14110880a16430c859d95 +#: ../../recipes-text.rst:148 9f60ccd5aee74a1bb2f791ed857906ac msgid "But you also have other options::" msgstr "ただし、他にも選択肢があります::" -#: ../../recipes-text.rst:182 6a0377a1d2fe4746ae2c53935c6a24a5 +#: ../../recipes-text.rst:182 324f957419b2409787a7496e75b13dee msgid "" "This script uses `Page.get_text(\"words\")` to look for a string, handed " "in via cli parameter. This method separates a page's text into \"words\" " "using white spaces as delimiters. Further remarks:" msgstr "このスクリプトは、cliパラメーターを介して渡された文字列を検索するためにPage.get_text(\"words\")を使用します。この方法では、ページのテキストがスペースと改行を区切りとして「単語」に分割されます。さらなる注釈:" -#: ../../recipes-text.rst:184 633a2affd61a49aabefdf3378ebf62fa +#: ../../recipes-text.rst:184 e11b43b6869e46b89ed4021f9ca781ea msgid "" "If found, the **complete word containing the string** is marked " "(underlined) -- not only the search string." msgstr "文字列が見つかった場合、検索文字列だけでなく、その文字列を含む完全な単語がマークされます(アンダーラインが引かれます)。" -#: ../../recipes-text.rst:185 b3a319b0dfa2447cabb5313b8a27d188 +#: ../../recipes-text.rst:185 04e60745b3b34c6b91dcf325e659bc11 msgid "" "The search string may **not contain word delimiters**. By default, word " "delimiters are white spaces and the non-breaking space `chr(0xA0)`. If " @@ -364,7 +364,7 @@ msgstr "" "`page.get_text(\"words\", delimiters=\"./,\")` " "のような追加の区切り文字を使用する場合は、これらの文字を検索文字列に含めてはいけません。" -#: ../../recipes-text.rst:186 b0d6817423c94a41b0cd59838d2cade1 +#: ../../recipes-text.rst:186 d2efc0fb67834d26a4980492e4ba653b msgid "" "As shown here, upper / lower cases are **respected**. But this can be " "changed by using the string method *lower()* (or even regular " @@ -373,46 +373,46 @@ msgstr "" "ここで示したように、大文字と小文字は区別されますが、`mark_word` 関数で `lower()` " "メソッド(または正規表現)を使用することで変更できます。" -#: ../../recipes-text.rst:187 20a203e8829c46ef93b9d7e2bdb9c8e8 +#: ../../recipes-text.rst:187 f1f92985f2ae49809306e7b57ba6c5b1 msgid "There is **no upper limit**: all occurrences will be detected." msgstr "上限はありません。すべての出現を検出します。" -#: ../../recipes-text.rst:188 c56a58ac561441fda1240e8c5002c785 +#: ../../recipes-text.rst:188 6639bc0b294042f3b7da287582d935d1 msgid "" "You can use **anything** to mark the word: 'Underline', 'Highlight', " "'StrikeThrough' or 'Square' annotations, etc." msgstr "単語をマークするために何を使用しても構いません:「アンダーライン」、「ハイライト」、「取り消し線」、「四角」の注釈などがあります。" -#: ../../recipes-text.rst:189 8feefb1374e64b4d8508965b2c7d04fb +#: ../../recipes-text.rst:189 f003fe97efd4436285d6bc3016b36180 msgid "" "Here is an example snippet of a page of this manual, where \"MuPDF\" has " "been used as the search string. Note that all strings **containing " "\"MuPDF\"** have been completely underlined (not just the search string)." msgstr "以下は、このマニュアルのページの一部の例スニペットで、「MuPDF」が検索文字列として使用されています。注意:「MuPDF」を含むすべての文字列が完全にアンダーラインで引かれていることに注意してください(検索文字列だけでなく)。" -#: ../../recipes-text.rst:200 8c2a9c5b0a89443faf8d53fcced6372d +#: ../../recipes-text.rst:200 07364170c89f43d7a469ec584d3f4f06 msgid "How to Mark Searched Text" msgstr "検索したテキストをマークする方法" -#: ../../recipes-text.rst:201 4d9f96eab7664f6892d2405272a9e1e1 +#: ../../recipes-text.rst:204 11638cbd201f4578b319a8b04e773026 msgid "This script searches for text and marks it::" msgstr "このスクリプトはテキストを検索してマークします::" -#: ../../recipes-text.rst:225 b420c3085a684a338006b8e14b0079ec +#: ../../recipes-text.rst:230 15b785bdfebf418aba157f4f78a77e4b msgid "The result looks like this:" msgstr "結果は以下のようになります:" -#: ../../recipes-text.rst:236 a22c541e8eb7434eab5a962ebb684d69 +#: ../../recipes-text.rst:241 080eb1dc215a426e9e7a03e134dc4fa2 msgid "How to Mark Non-horizontal Text" msgstr "非水平テキストをマークする方法" -#: ../../recipes-text.rst:237 d7a6ccce749843af8952f1412b512c6d +#: ../../recipes-text.rst:242 6fe2ff76b1d0421d8ab98c926c234cb0 msgid "" "The previous section already shows an example for marking non-horizontal " "text, that was detected by text **searching**." msgstr "前のセクションでは、テキスト検索によって検出された非水平テキストのマークの例が既に示されています。" -#: ../../recipes-text.rst:239 d45f2f09ec7b475a94d6c1a148fbd7fd +#: ../../recipes-text.rst:244 9f3587b3ee80418e80f13b3ad91233ec msgid "" "But text **extraction** with the \"dict\" / \"rawdict\" options of " ":meth:`Page.get_text` may also return text with a non-zero angle to the " @@ -426,7 +426,7 @@ msgstr "" " \"dir\" キーの値によって示されます:それはその角度に対する `(cosine, sine)` のタプルです。 " "`line[\"dir\"] != (1, 0)` であれば、すべてのスパンのテキストは (同じ) 角度 != 0 によって回転しています。" -#: ../../recipes-text.rst:241 b55033dc8e0646da94598d172c5fd7a0 +#: ../../recipes-text.rst:246 b5ac4e18122a4f8985e80cf88f3152b4 msgid "" "The \"bboxes\" returned by the method however are rectangles only -- not " "quads. So, to mark span text correctly, its quad must be recovered from " @@ -434,13 +434,13 @@ msgid "" "following utility function (new in v1.18.9)::" msgstr "ただし、このメソッドによって返される「bboxes」は四角形のみであり、クワッドではありません。したがって、スパンテキストを正しくマークするには、行とスパンの辞書に含まれるデータからクワッドを回復する必要があります。以下のユーティリティ関数を使用してください(v1.18.9で新しく追加されました)::" -#: ../../recipes-text.rst:246 d98c3bad95584b61af7e1e2a8c0e3cb6 +#: ../../recipes-text.rst:251 220c8fb8fa4b46c781ff32905bc0a24e msgid "" "If you want to **mark the complete line** or a subset of its spans in one" " go, use the following snippet (works for v1.18.10 or later)::" msgstr "一度に完全な行またはその一部のスパンをマークしたい場合は、以下のスニペットを使用してください(v1.18.10以降で動作します)" -#: ../../recipes-text.rst:253 c6e0ff88cc7a4da3863d6551f64a10c2 +#: ../../recipes-text.rst:258 85d1dfa0969b4848b83f9b2f117d981c msgid "" "The `spans` argument above may specify any sub-list of `line[\"spans\"]`." " In the example above, the second to second-to-last span are marked. If " @@ -449,80 +449,80 @@ msgstr "" "上記の `spans` 引数は、`line[\"spans\"]` " "の任意の部分リストを指定できます。上記の例では、2番目から最後から2番目のスパンがマークされます。省略すると、完全な行が取得されます" -#: ../../recipes-text.rst:260 b58435ec67ce4bf8939ce28255f56e47 +#: ../../recipes-text.rst:265 b4aaece1bac342df88b2588a53b1488f msgid "How to Analyze Font Characteristics" msgstr "フォントの特性を分析する方法" -#: ../../recipes-text.rst:261 f78a2cc1728f43669674ce3a49c0d493 +#: ../../recipes-text.rst:266 3d03a051124b43d1bae8d901b0aecd28 msgid "" "To analyze the characteristics of text in a PDF use this elementary " "script as a starting point:" msgstr "PDF内のテキストの特性を分析するには、以下の初歩的なスクリプトを出発点として使用します::" -#: ../../recipes-text.rst:266 449d4daf3b75466fad202a491b17f50f +#: ../../recipes-text.rst:271 f055a412baca41b5a95b0ecadafe2e3e msgid "Here is the PDF page and the script output:" msgstr "以下はPDFページとスクリプトの出力です。" -#: ../../recipes-text.rst:277 a00d33f428664affb3a5c4e3862cf9bb +#: ../../recipes-text.rst:282 66219ea8cab542688f83c1bd81f081c1 msgid "How to Insert Text" msgstr "テキストの挿入方法" -#: ../../recipes-text.rst:278 7fcf1526eb4f4eddaa9e0e6cfde3f3c5 +#: ../../recipes-text.rst:283 4e0c636dd4ac4eb387bcde62a6a2a175 msgid "" "PyMuPDF provides ways to insert text on new or existing PDF pages with " "the following features:" msgstr "PyMuPDFは、以下の機能を備えて新しいまたは既存のPDFページにテキストを挿入する方法を提供しています:" -#: ../../recipes-text.rst:280 5852f2d25ef9413482826a0bc3816fa2 +#: ../../recipes-text.rst:285 155bbc5aa1454c93b980b30ac316c0b0 msgid "" "choose the font, including built-in fonts and fonts that are available as" " files" msgstr "フォントの選択:組み込みのフォントやファイルとして利用可能なフォントを選択できます。" -#: ../../recipes-text.rst:281 40c813d1a9034c79a51ef32c36af4bd9 +#: ../../recipes-text.rst:286 b9dd50f8a43d417ea405cd07b235088d msgid "choose text characteristics like bold, italic, font size, font color, etc." msgstr "テキストの特性の選択:太字、斜体、フォントサイズ、フォントカラーなど、テキストの特性を選択できます。" -#: ../../recipes-text.rst:282 cd78a54d34384bdabd900fcfe3a16c76 +#: ../../recipes-text.rst:287 f938ab7b656c436297d8120a887e4fcc msgid "position the text in multiple ways:" msgstr "テキストの配置方法:" -#: ../../recipes-text.rst:284 7411b96da89444908afa30000c54aeea +#: ../../recipes-text.rst:289 96ff2b06077841bf82fb23104230f9ed msgid "either as simple line-oriented output starting at a certain point," msgstr "特定のポイントを起点として単純な行指向の出力として配置することができます。 " -#: ../../recipes-text.rst:285 186781e680874acab076c4767d0b8ccf +#: ../../recipes-text.rst:290 dcf40c10ea294dc8a656732166297259 msgid "" "or fitting text in a box provided as a rectangle, in which case text " "alignment choices are also available," msgstr "ボックスにテキストをフィットさせる場合は、テキストの配置を選択することもできます。この場合、テキストの整列オプションも利用できます。" -#: ../../recipes-text.rst:286 3a21be574cb44130ad1c48aecc3383b9 +#: ../../recipes-text.rst:291 056f2e92f23f4d41beb702386a246a80 msgid "" "choose whether text should be put in foreground (overlay existing " "content)," msgstr "テキストを前面に配置するか選択できます(既存のコンテンツをオーバーレイします)。" -#: ../../recipes-text.rst:287 0b77716e8288468b8596184e427ceddb +#: ../../recipes-text.rst:292 5999867be03a4be495cbfd225913c3d4 msgid "" "all text can be arbitrarily \"morphed\", i.e. its appearance can be " "changed via a :ref:`Matrix`, to achieve effects like scaling, shearing or" " mirroring," msgstr "テキストは任意に「変形」されることができます。つまり、行列を使用して拡大、せん断、反転などの効果を得ることができます。" -#: ../../recipes-text.rst:288 6cef2661e9aa498686c69be321c8208c +#: ../../recipes-text.rst:293 25c6fa1fb2344a02a3a693135a7b5ad4 msgid "" "independently from morphing and in addition to that, text can be rotated " "by integer multiples of 90 degrees." msgstr "変形とは別に、テキストを90度の整数倍で回転させることもできます。" -#: ../../recipes-text.rst:290 f07dab645f264849842f9329ac71b03f +#: ../../recipes-text.rst:295 2190abc125234360a3e1fab88ef34947 msgid "" "All of the above is provided by three basic :ref:`Page`, resp. " ":ref:`Shape` methods:" msgstr "以上のすべては、それぞれの基本的な :ref:`Page` 、:ref:`Shape` メソッドによって提供されています。" -#: ../../recipes-text.rst:292 4a2fe5823f3d43ccb32ac6dee2913fc3 +#: ../../recipes-text.rst:297 4fb036ddb792472197216092b9eefddb msgid "" ":meth:`Page.insert_font` -- install a font for the page for later " "reference. The result is reflected in the output of " @@ -531,23 +531,23 @@ msgstr "" ":meth:`Page.insert_font` - ページにフォントをインストールして後で参照できるようにします。その結果は、 " ":meth:`Document.get_page_fonts` の出力に反映されます。フォントは以下の方法で提供できます:" -#: ../../recipes-text.rst:294 035da135217a4a269fc80b5ad1e6d29d +#: ../../recipes-text.rst:299 3c7f3dadc700412b9396227e3e8b9ff6 msgid "provided as a file," msgstr "ファイルとして提供する。" -#: ../../recipes-text.rst:295 59c9309aafe0470396db2a3622ebf39f +#: ../../recipes-text.rst:300 40d5ff2c32c44c6584f3112ed978abef msgid "via :ref:`Font` (then use :attr:`Font.buffer`)" msgstr ":ref:`Font` を使用して提供する(その場合、 :attr:`Font.buffer` を使用します)。" -#: ../../recipes-text.rst:296 0706b3ab12304f55a8eaeca7bdf7c6d8 +#: ../../recipes-text.rst:301 6267fd1e928e41658810a84d52de31c7 msgid "already present somewhere in **this or another** PDF, or" msgstr "既にこのPDFまたは別のPDFのどこかに存在する。" -#: ../../recipes-text.rst:297 ef9b25b0c5df486abc0bb83b5b8600a9 +#: ../../recipes-text.rst:302 2ebf7edb3c7e4c4482334300df5af372 msgid "be a **built-in** font." msgstr "組み込みフォントである。" -#: ../../recipes-text.rst:299 d1f7b36b0006408fb187b7b4d3b29838 +#: ../../recipes-text.rst:304 e6a884a850ad4cb49e2a74eeb2f5bc61 msgid "" ":meth:`Page.insert_text` -- write some lines of text. Internally, this " "uses :meth:`Shape.insert_text`." @@ -555,7 +555,7 @@ msgstr "" ":meth:`Page.insert_text` - テキストの行を書き込みます。内部的には :meth:`Shape.insert_text`" " を使用します。" -#: ../../recipes-text.rst:301 bae934330c7d4f2981de451a5d1606b0 +#: ../../recipes-text.rst:306 5252e3a0b80e49a4af1e7a62b8a2cc00 msgid "" ":meth:`Page.insert_textbox` -- fit text in a given rectangle. Here you " "can choose text alignment features (left, right, centered, justified) and" @@ -566,19 +566,19 @@ msgstr "" "指定された矩形にテキストをフィットさせます。ここでは、テキストの整列機能(左揃え、右揃え、中央揃え、両端揃え)を選択できます。また、テキストが実際にフィットするかどうかの制御もできます。内部的には" " :meth:`Shape.insert_textbox` を使用します。" -#: ../../recipes-text.rst:303 de8cc8fb3e80432a97dbff9717b025e9 +#: ../../recipes-text.rst:308 0d6285e91b3c45608b972b2de7612705 msgid "Both text insertion methods automatically install the font as necessary." msgstr "テキスト挿入の両方の方法は、必要に応じてフォントを自動的にインストールします。" -#: ../../recipes-text.rst:309 5323d70c31104bd8a93d63d47ddf1a96 +#: ../../recipes-text.rst:314 4615115cc7ec417e9025309e87d5c912 msgid "How to Write Text Lines" msgstr "テキスト行を書く方法" -#: ../../recipes-text.rst:310 fa37fb400ad84121857aeb266ae0ddd3 +#: ../../recipes-text.rst:315 c5ec955ab13243b49f36ee01f5a5e363 msgid "Output some text lines on a page::" msgstr "ページにいくつかのテキスト行を出力する方法::" -#: ../../recipes-text.rst:331 5f9fe9b524854f9a84a254495ff59603 +#: ../../recipes-text.rst:336 8385d05c2aaf4baf89657017938f1841 msgid "" "With this method, only the **number of lines** will be controlled to not " "go beyond page height. Surplus lines will not be written and the number " @@ -589,56 +589,56 @@ msgstr "" "この方法では、ページの高さを超えないように行の数だけを制御します。余剰の行は書き込まれず、実際の行数が返されます。計算には、:data:`fontsize`" " と36ポイント(0.5インチ)のボトムマージンから計算された行の高さが使用されます。" -#: ../../recipes-text.rst:333 a5d1bf8f03624386b00355d23a917d23 +#: ../../recipes-text.rst:338 86eb433806094945b5d70882c088708a msgid "" "Line **width is ignored**. The surplus part of a line will simply be " "invisible." msgstr "行の幅は無視されます。行の余剰部分は単に見えなくなります。" -#: ../../recipes-text.rst:335 0eb98bebd4c24350bd1d8e48c7e502d7 +#: ../../recipes-text.rst:340 a76488ed16d54e53b404c6f7a09d9313 msgid "" "However, for built-in fonts there are ways to calculate the line width " "beforehand - see :meth:`get_text_length`." msgstr "ただし、組み込みのフォントには、行の幅を事前に計算する方法があります。 :meth:`get_text_length` を参照してください。" -#: ../../recipes-text.rst:337 6125757e3ab3406f86693f3b462c7901 +#: ../../recipes-text.rst:342 b366c349b7114db78ed6f108144468f9 msgid "" "Here is another example. It inserts 4 text strings using the four " "different rotation options, and thereby explains, how the text insertion " "point must be chosen to achieve the desired result::" msgstr "以下は別の例です。4つの異なる回転オプションを使用してテキスト文字列を挿入し、それにより、望む結果を得るためにどのようにテキスト挿入ポイントを選択すべきかを説明しています::" -#: ../../recipes-text.rst:373 87d829d7b1ef4892935186744e113e02 +#: ../../recipes-text.rst:378 fb820c64521f4522a238d2ce77dcaf18 msgid "This is the result:" msgstr "これが結果です。" -#: ../../recipes-text.rst:385 0f936266bbd34cffad911b5c3d48b20a +#: ../../recipes-text.rst:390 541c84709e8840f99fe3aba0b40495a5 msgid "How to Fill a Text Box" msgstr "テキストボックスの塗りつぶし方" -#: ../../recipes-text.rst:386 bd55bc019f244993aaf175e04f56fa97 +#: ../../recipes-text.rst:391 c6dcf5cccb0044f8b35d759a5221dfae msgid "" "This script fills 4 different rectangles with text, each time choosing a " "different rotation value::" msgstr "このスクリプトは、異なる回転値を選択して、4つの異なる長方形にテキストを塗りつぶします。" -#: ../../recipes-text.rst:423 a7831fd528524e3e9b9e64f9b9cfef97 +#: ../../recipes-text.rst:428 2e957f827c5b40aaa4e166eb9499bfbb msgid "" "Some default values were used above: font size 11 and text alignment " "\"left\". The result will look like this:" msgstr "上記ではいくつかのデフォルト値が使用されました:フォント「Helvetica」、フォントサイズ11、テキストの配置は「左寄せ」です。結果は以下のようになります。" -#: ../../recipes-text.rst:433 3affa7484d4d451c8182ee546efc2114 +#: ../../recipes-text.rst:438 c7e2172b7c074d11b35164dc32c22e23 msgid "How to Fill a Box with HTML Text" msgstr "HTMLテキストでボックスを埋める方法" -#: ../../recipes-text.rst:434 46a2c90e0b73472fa0adb89a1e12c655 +#: ../../recipes-text.rst:439 42df2d56d1f34d98823882e630fe1cf7 msgid "" "Method :meth:`Page.insert_htmlbox` offers a **much more powerful** way to" " insert text in a rectangle." msgstr "メソッド :meth:`Page.insert_htmlbox` は、矩形にテキストを挿入するための **より強力な** 方法を提供します。" -#: ../../recipes-text.rst:436 d72392d3a9414d438d7bcf512eb15305 +#: ../../recipes-text.rst:441 d5759271e33d478eae11f568d17338fc msgid "" "Instead of simple, plain text, this method accepts HTML source, which may" " not only contain HTML tags but also styling instructions to influence " @@ -646,19 +646,19 @@ msgid "" "more." msgstr "このメソッドは、単純なプレーンテキストではなく、HTMLソースを受け入れます。HTMLタグのみならず、フォント、フォントの太さ(太字)、スタイル(イタリック)、色などを含むスタイル指示も含まれます。" -#: ../../recipes-text.rst:438 c1bc94ca9f0142f384797bbbedb18d3a +#: ../../recipes-text.rst:443 ba663f954c914a1a8d20788c385f392c msgid "" "It is also possible to mix multiple fonts and languages, to output HTML " "tables and to insert images and URI links." msgstr "複数のフォントや言語を混在させ、HTMLテーブルを出力し、画像やURIリンクを挿入することも可能です。" -#: ../../recipes-text.rst:440 5d494f5ae00644e3a2dfa0ef9ed30518 +#: ../../recipes-text.rst:445 e592608d0a5348499aff8a592bb61837 msgid "" "For even more styling flexibility, an additional CSS source may also be " "given." msgstr "さらなるスタイリングの柔軟性を求める場合、追加のCSSソースを指定することもできます。" -#: ../../recipes-text.rst:442 58058386db8b48c28d9ab404e1b2852c +#: ../../recipes-text.rst:447 11d3134828ab455a9beb1bd08b3eedc9 msgid "" "The method is based on the :ref:`Story` class. Therefore, complex script " "systems like Devanagari, Nepali, Tamil and many are supported and written" @@ -669,7 +669,7 @@ msgstr "" "(ストーリー)クラスに基づいています。そのため、デーヴァナーガリ、ネパール語、タミル語などの複雑な文字体系がサポートされ、HarfBuzzライブラリを使用して正しく書き込まれています" " - これがいわゆる **「テキストの形成」** 機能を提供します。" -#: ../../recipes-text.rst:444 762bef4a7ae340aba1ec668ab2d1d4fd +#: ../../recipes-text.rst:449 702e632bbb1846448ff097d413da8fb7 msgid "" "Any required fonts to output characters are automatically pulled in from " "the Google NOTO font library - as a fallback (when the -- optionally " @@ -678,39 +678,39 @@ msgstr "" "文字を出力するために必要なフォントは、--オプションで提供される--" "ユーザーフォントが一部のグリフを含んでいない場合のフォールバックとして、Google NOTOフォントライブラリから自動的に取得されます。" -#: ../../recipes-text.rst:446 5e965af0afae422b8b57979ef0695535 +#: ../../recipes-text.rst:451 6c11c27cd47042e2974d9dad0680a2a9 msgid "" "As a small glimpse into the features offered here, we will output the " "following HTML-enriched text::" msgstr "ここで提供される機能の一端をご覧いただくために、以下のHTMLエンリッチされたテキストを出力します:" -#: ../../recipes-text.rst:471 775bac873835458cad8de34f083c9411 +#: ../../recipes-text.rst:476 2ad55055659d456fabde0186e22d4e26 msgid "" "Please note how the \"css\" parameter is used to globally select the " "default \"sans-serif\" font and a font size of 14." msgstr "「css」パラメータが、デフォルトの「sans-serif」フォントとフォントサイズ14をグローバルに選択する方法に注意してください。" -#: ../../recipes-text.rst:473 ../../recipes-text.rst:541 -#: 29f03a393e3c49598ed383a044db0271 5e260ba3996d4da1bfcaff64b23c8615 +#: ../../recipes-text.rst:478 ../../recipes-text.rst:546 +#: 3c4cca1121d6405eb83e0cb2871b7570 8e7f4fe263f24763bbf69efa19489d99 msgid "The result will look like this:" msgstr "結果は以下のようになります:" -#: ../../recipes-text.rst:478 19e67cca201e44a5aa0d1eec62c1ef2f +#: ../../recipes-text.rst:483 b7f446683eca4524b8fc2bd988191712 msgid "How to output HTML tables and images" msgstr "HTMLテーブルや画像を出力する方法" -#: ../../recipes-text.rst:480 30c123eeec6a4c80950bdd56bbe93198 +#: ../../recipes-text.rst:485 ed6bb1a3fe524fbda24f9c97da319399 msgid "" "Here is another example that outputs a table with this method. This time," " we are including all the styling in the HTML source itself. Please also " "note, how it works to include an image - even within a table cell::" msgstr "以下は、このメソッドを使用してテーブルを出力する別の例です。今回は、すべてのスタイリングをHTMLソース自体に含めています。また、テーブルセル内に画像を含める方法についても、ご注意ください::" -#: ../../recipes-text.rst:547 d471c1b5ce124172a4aa36c586aebaa8 +#: ../../recipes-text.rst:552 4cd24c13bbba4d8d8b0887c53d530e7e msgid "How to Output Languages of the World" msgstr "世界の言語を出力する方法" -#: ../../recipes-text.rst:549 addd025418904b2aad7ebf7006ece2c6 +#: ../../recipes-text.rst:554 5e1849ae29cd4ee787b3105c593def1a msgid "" "Our third example will demonstrate the automatic multi-language support. " "It includes automatic **text shaping** for complex scripting systems like" @@ -719,15 +719,15 @@ msgstr "" "3つ目の例では、自動多言語サポートを示します。これには、デーヴァナーガリや右から左への言語などの複雑なスクリプトシステムに対する自動 " "**テキスト整形** も含まれます:" -#: ../../recipes-text.rst:579 cc3f85f97b504816a1ec95451edde0f6 +#: ../../recipes-text.rst:584 7f93ecf38f45410098070b9c478823f0 msgid "And this is the output:" msgstr "これが結果です。" -#: ../../recipes-text.rst:584 f4e5122a9c274be79e6c0483fa6dce9b +#: ../../recipes-text.rst:589 0fc8a571f2164e8b8fa47da93210cc9b msgid "How to Specify your Own Fonts" msgstr "独自のフォントを指定する方法" -#: ../../recipes-text.rst:586 edeca28ba69943829f764fdeb9bc6531 +#: ../../recipes-text.rst:591 f4ddad35adde440a9851a6e69fcfcf35 msgid "" "Define your font files in CSS syntax using the `@font-face` statement. " "You need a separate `@font-face` for every combination of font weight and" @@ -740,7 +740,7 @@ msgstr "" " `@font-face` が必要です。以下の例では、有名な MS Comic Sans フォントの 4 " "つのバリアント(通常、太字、斜体、太字斜体)を使用しています。" -#: ../../recipes-text.rst:588 8a8618a87b384e60b83a7334fda18ee0 +#: ../../recipes-text.rst:593 f8779468c07c47ef9000fb2979f5214c msgid "" "As these four font files are located in the system's folder " "`C:/Windows/Fonts` the method needs an :ref:`Archive` definition that " @@ -749,19 +749,19 @@ msgstr "" "これらの 4 つのフォントファイルがシステムのフォルダ `C:/Windows/Fonts` にあるため、このメソッドには、そのフォルダを指す " ":ref:`Archive` (アーカイブ)の定義が必要です。" -#: ../../recipes-text.rst:637 3f984bc7c0454d788c82a293421d9119 +#: ../../recipes-text.rst:642 06ab66e236cc4a2ea7d4c5a99612f4dd msgid "How to Request Text Alignment" msgstr "テキストの配置をリクエストする方法" -#: ../../recipes-text.rst:639 c2239f064b244e13b6a471b3d11fd30e +#: ../../recipes-text.rst:644 7795bb870b4f42f187a0efe85b6c761d msgid "This example combines multiple requirements:" msgstr "この例では、複数の要件を組み合わせています" -#: ../../recipes-text.rst:641 5bb6d27e3d9b4f6fad0660e7ab6ae1a2 +#: ../../recipes-text.rst:646 ff142aa60660494db8d4272e60183ff1 msgid "Rotate the text by 90 degrees anti-clockwise." msgstr "テキストを90度反時計回りに回転させます。" -#: ../../recipes-text.rst:642 590eef86c7f04341aa4e2d82f0fa184e +#: ../../recipes-text.rst:647 c1627013d8474a4f82eb9fcc874f012c msgid "" "Use a font from package `pymupdf-fonts `_. You will see that the respective CSS definitions are a lot " @@ -770,28 +770,24 @@ msgstr "" "`pymupdf-fonts `_ " "パッケージからフォントを使用します。この場合、該当するCSS定義がはるかに簡単であることに気付くでしょう。" -#: ../../recipes-text.rst:643 4da8c63667e549a1b4bdcead72c5484f +#: ../../recipes-text.rst:648 827ab2e55bb64443b6dcbb706662051a msgid "Align the text with the \"justify\" option." msgstr "テキストを \"justify\" オプションで配置します。" -#: ../../recipes-text.rst:693 f2d1a864442e42f3af6dad3e22db45fb +#: ../../recipes-text.rst:698 424d197ff94d4b4f9c4c0cc4513a960d msgid "How to Extract Text with Color" msgstr "色付きのテキストを抽出する方法" -#: ../../recipes-text.rst:695 c215c6f8b1a44616a694151fa8e4ea41 +#: ../../recipes-text.rst:700 a842d1070655423986ddbb7afdbb289b msgid "" "Iterate through your text blocks and find the spans of text you need for " "this information." msgstr "テキストブロックを繰り返し処理し、必要な情報のテキストスパンを見つけます。" -#: ../../footer.rst:60 5eddef6a381342d89aa56fc597568674 +#: ../../footer.rst:60 b02445d3686f4215969d2dff8b922af2 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 3baed064e3bf411a82744fe5186f132a -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" @@ -861,3 +857,6 @@ msgstr "" #~ "\"helv\"::" #~ msgstr "上記のスニペットは実際にPDF内にHelveticaフォントの3つの異なるコピーを生成します。各コピーは正しい大文字小文字のスペル(\"helv\")を使用して一意に識別され、参照が可能です。" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/recipes.mo b/docs/locales/ja/LC_MESSAGES/recipes.mo index 27c53d17f..8f61a3638 100644 Binary files a/docs/locales/ja/LC_MESSAGES/recipes.mo and b/docs/locales/ja/LC_MESSAGES/recipes.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/recipes.po b/docs/locales/ja/LC_MESSAGES/recipes.po index 924e3fdb6..2cc4769a1 100644 --- a/docs/locales/ja/LC_MESSAGES/recipes.po +++ b/docs/locales/ja/LC_MESSAGES/recipes.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.24.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-06 22:50+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -18,27 +18,26 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 76caea474c7b4143970f1b1ab2515bc1 +#: ../../header.rst:-1 4009185189884afa815f06437219b17a msgid "Artifex" msgstr "" -#: ../../header.rst:-1 9aabd0408684421999890baa0c2f59c5 +#: ../../header.rst:-1 0945b3eedd774aa1bf2ed67c92baa34e msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 620d8625e9374ac695590ccee38ce7e4 +#: ../../header.rst:-1 5438d71f4a5f445c9c4929c4169009b8 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../footer.rst:71 53aa60c4120c4df68c355c3f55c29796 +#: ../../footer.rst:60 8482813d3d6a47a39130184e645552b4 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 ff06c32ab4194672a5d612ddb8c35e86 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/rect.mo b/docs/locales/ja/LC_MESSAGES/rect.mo index 23f8f4083..86bd9bcb8 100644 Binary files a/docs/locales/ja/LC_MESSAGES/rect.mo and b/docs/locales/ja/LC_MESSAGES/rect.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/rect.po b/docs/locales/ja/LC_MESSAGES/rect.po index 2a388cb14..d35caffd2 100644 --- a/docs/locales/ja/LC_MESSAGES/rect.po +++ b/docs/locales/ja/LC_MESSAGES/rect.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 d4fca556a72945cebe1417d4d30fef66 +#: ../../header.rst:-1 4f175165437e4f9ea93bfd4d27e34217 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 5f871565c06e4eab959ac20c7a1a9359 +#: ../../header.rst:-1 99738076d4db4a2991da7a843d446e51 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 17e62bc44b1e42d8ac9727aee96a10bc +#: ../../header.rst:-1 6893e787481d4f359fabbf13b0e18208 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../rect.rst:7 2d6e581a429e47b0af97ce47b779f562 +#: ../../rect.rst:7 b891156537654c3bb28aedf20605826e msgid "Rect" msgstr "Rect (矩形)" -#: ../../rect.rst:9 ee238e30761644d5a9c6045da651c902 +#: ../../rect.rst:9 b140b4533abb40b584506436f6da3db6 msgid "" "*Rect* represents a rectangle defined by four floating point numbers x0, " "y0, x1, y1. They are treated as being coordinates of two diagonally " @@ -53,11 +53,11 @@ msgstr "" " P\\ :sub:`(x0,y0)` とし、 P\\ :sub:`(x1,y1)` " "は「右下」のコーナーとします。ただし、これら2つのプロパティは直感的な意味と一致する必要はありません。以下を読んでください。" -#: ../../rect.rst:11 53e41b8c3b4a486592d79f57307dc630 +#: ../../rect.rst:11 e59a3c8c38054ea38c6fda34de445624 msgid "The following remarks are also valid for :ref:`IRect` objects:" msgstr ":ref:`IRect` オブジェクトにも以下の注釈は有効です。" -#: ../../rect.rst:13 7832aada7305459aa4ef05a4e0cbf80b +#: ../../rect.rst:13 b1d032f546b54b47b004faf1504b22f5 msgid "" "A rectangle in the sense of (Py-) MuPDF **(and PDF)** always has " "**borders parallel to the x- resp. y-axis**. A general orthogonal " @@ -67,44 +67,44 @@ msgstr "" "(Py-)MuPDF **(およびPDF)** の意味での矩形は常に **x-またはy軸に平行な境界** を持ちます。一般的な直交四角形は " "**矩形ではなく** 、数学的な定義とは対照的です。" -#: ../../rect.rst:14 2be7d9fb5b8745268e9fac2ac389969f +#: ../../rect.rst:14 9f2f8432949d4e92a415120c726f8623 msgid "" "The constructing points can be (almost! -- see below) anywhere in the " "plane -- they need not even be different, and e.g. \"top left\" need not " "be the geometrical \"north-western\" point." msgstr "構築ポイントは平面上のどこにでも配置できます。異なる必要すらなく、たとえば「左上」が幾何学的に「北西」の点である必要はありません。" -#: ../../rect.rst:15 492f3f3cf29b4ae2be2e3b1df5456ee8 +#: ../../rect.rst:15 79fb7e4eb80841079d3d4b9878040471 msgid "Units are in points, where 72 points is 1 inch." msgstr "単位はポイントで、72ポイントが1インチです。" -#: ../../rect.rst:20 560c4da4363a41ac826e55467aa88e33 +#: ../../rect.rst:20 4ea3829d9cab4b818f01b0f6b07536d9 msgid "" "For any given quadruple of numbers, the geometrically \"same\" rectangle " "can be defined in four different ways:" msgstr "与えられた4つの数値に対して、幾何学的に「同じ」矩形は4つの異なる方法で定義できます。" -#: ../../rect.rst:17 934fc055c17f42f383ab57d2166c4920 +#: ../../rect.rst:17 45eff7ddd561491892f3a6f4d7cbc9f7 msgid "Rect(P\\ :sub:`(x0,y0)`, P\\ :sub:`(x1,y1)`\\ )" msgstr "" -#: ../../rect.rst:18 c6a310265b6945f1839705073bc68c77 +#: ../../rect.rst:18 4c61fbf1c62d4a56a5a187ee9a31fa35 msgid "Rect(P\\ :sub:`(x1,y1)`, P\\ :sub:`(x0,y0)`\\ )" msgstr "" -#: ../../rect.rst:19 9bd3589c26584eaa8adad46dde505a71 +#: ../../rect.rst:19 77dad531fc664ca0a7138d3a300a552b msgid "Rect(P\\ :sub:`(x0,y1)`, P\\ :sub:`(x1,y0)`\\ )" msgstr "" -#: ../../rect.rst:20 8cc329af5b2347de8b41d2bf164f9e0d +#: ../../rect.rst:20 fc0dfc403d104dd5a9383b9295374244 msgid "Rect(P\\ :sub:`(x1,y0)`, P\\ :sub:`(x0,y1)`\\ )" msgstr "" -#: ../../rect.rst:22 8d4b9e310f9245ca90479048ca6ff307 +#: ../../rect.rst:22 ea2ef31b56d2471c90deb626bd3fdd01 msgid "**(Changed in v1.19.0)** Hence some classification:" msgstr "**(v1.19.0で変更)** したがって、いくつかの分類があります。" -#: ../../rect.rst:24 7808fb21d9114649baf57409c73d71b9 +#: ../../rect.rst:24 b60f9c430985435c8e55ee36fbf79944 msgid "" "A rectangle is called **valid** if `x0 <= x1` and `y0 <= y1` (i.e. the " "bottom right point is \"south-eastern\" to the top left one), otherwise " @@ -117,7 +117,7 @@ msgstr "" "と呼ばれます。したがって、上記の4つの代替案のうち、**最初のものだけ** が有効です。MuPDFの座標系では、y軸は **上から下** " "に向かっていますので、注意してください。無効な矩形は以前のバージョンでは 無限と呼ばれていました。" -#: ../../rect.rst:26 64c0e801ac8941209a817f75a98a9cba +#: ../../rect.rst:26 5eb964bddb7342ae94128ac093e06625 msgid "" "A rectangle is called **empty** if `x0 >= x1` or `y0 >= y1`. This " "implies, that **invalid rectangles are also always empty.** And `width` " @@ -129,7 +129,7 @@ msgstr "" "も常に空であることを意味します。また、 `x0 > x1` (または `y0 > y1` )の場合、幅(または高さ)は **ゼロに設定** " "されます。以前のバージョンでは、矩形が空であるのは幅または高さのいずれかがゼロの場合に限られていました。" -#: ../../rect.rst:28 d6f6cefdd76c44bb86994537f9f128ce +#: ../../rect.rst:28 06d2d707d1824887a24a33aa4d29ad97 msgid "" "Rectangle coordinates **cannot be outside** the number range from " "`FZ_MIN_INF_RECT = -2147483648` to `FZ_MAX_INF_RECT = 2147483520`. Both " @@ -141,7 +141,7 @@ msgstr "" " " "までの数値範囲内にある必要があります。これらの値は、C浮動小数点変換のラウンドトリップを生き残る最小/最大の32ビット整数であるため選ばれました。以前のバージョンでは、座標値の制限はありませんでした。" -#: ../../rect.rst:30 0ae37ae60d1b4e219c777da1ab20508b +#: ../../rect.rst:30 6705a2cca07e4f829e3040f897ffb5b3 msgid "" "There is **exactly one \"infinite\" rectangle**, defined by `x0 = y0 = " "FZ_MIN_INF_RECT` and `x1 = y1 = FZ_MAX_INF_RECT`. It contains every other" @@ -153,7 +153,7 @@ msgstr "" " " "で定義され、他のすべての矩形を含みます。これは主に技術的な目的で使用されます。たとえば、関数呼び出しで形式的に必要な矩形引数を無視する必要がある場合などです。この矩形は空ではありません。" -#: ../../rect.rst:32 b0c91573faea426ca8a170f9364bc1f8 +#: ../../rect.rst:32 6887918d2f4b40a39daec63bc7f5a589 msgid "" "**Rectangles are (semi-) open:** The right and the bottom edges " "(including the resp. corners) are not considered part of the rectangle. " @@ -164,83 +164,83 @@ msgstr "" "**矩形は(半)開いています**。右側と下側のエッジ(およびそれに含まれるコーナー)は矩形の一部とは見なされません。したがって、矩形に属することができるのは左上のコーナー" " `(x0, y0)` のみです。他の3つのコーナーは常に含まれません。空の矩形にはまったくコーナーが含まれていません。" -#: ../../rect.rst:38 b519da1394b24cec91fcf425ea5d64fa +#: ../../rect.rst:38 8036b8594a7b41baa6e2d1ef16209cef msgid "Here is an overview of the changes." msgstr "以下は変更の概要です。" -#: ../../rect.rst:41 fdd9d758b83b4a6ebeec83841e93b8b2 +#: ../../rect.rst:41 4d3829e6a9254240ba2afdd58b72070c msgid "Notion" msgstr "概要" -#: ../../rect.rst:41 4d73dacc8b14427f8f094c07ed879fc8 +#: ../../rect.rst:41 e9add0c061d04d6fa452757810cf6550 msgid "Versions < 1.19.0" msgstr "バージョン < 1.19.0" -#: ../../rect.rst:41 69f00ec17a6f4f0090618dc37d28410c +#: ../../rect.rst:41 bd62c9a15c284380b98b4bbd65f93710 msgid "Versions 1.19.*" msgstr "バージョン 1.19.*" -#: ../../rect.rst:43 869aa171ce84455d91155ab20fe8f6b4 +#: ../../rect.rst:43 fb8b381a9c874249bc8ef952f4eab354 msgid "empty" msgstr "空" -#: ../../rect.rst:43 7ee931f5a44f4f74a189a5e37d93176c +#: ../../rect.rst:43 4a8cd26b92a94d5b9f70e49f36d4a021 msgid "x0 = x1 or y0 = y1" msgstr "x0 = x1 または y0 = y1" -#: ../../rect.rst:43 2254328cae874912bde63a7998bce047 +#: ../../rect.rst:43 58ed94a4b13a41d3a1527f6d367ecbde msgid "x0 >= x1 or y0 >= y1 -- includes invalid rects" msgstr "x0 >= x1 または y0 >= y1 – 無効な矩形も含む" -#: ../../rect.rst:44 3004729d3d89428ea18ee28dcdaf4010 +#: ../../rect.rst:44 3fc33de6936b4b1780f7f7c36c95678d msgid "valid" msgstr "有効" -#: ../../rect.rst:44 7892664219c54416b5e9507f969f6bb4 +#: ../../rect.rst:44 3884214dc7b34641ab739bf591af0083 msgid "n/a" msgstr "なし" -#: ../../rect.rst:44 cfd5913ee19442c2ab9384da2b8c634f +#: ../../rect.rst:44 01046b8d592241a8a23a5e5714a2088d msgid "x0 <= x1 and y0 <= y1" msgstr "x0 <= x1 かつ y0 <= y1" -#: ../../rect.rst:45 2f5ffae3db864786bb59d593d3c6bb88 +#: ../../rect.rst:45 7d568031d88a46098a73ceb07d3c87db msgid "infinite" msgstr "無限" -#: ../../rect.rst:45 35717beeaf394af3b7f2b721da3ef32a +#: ../../rect.rst:45 6caca284a22c45ada46d42f41853d730 msgid "all rects where x0 > x1 or y1 > y0" msgstr "x0 > x1 または y1 > y0 のすべての矩形" -#: ../../rect.rst:45 dc685f612d9840c98c8a7c155b2eb643 +#: ../../rect.rst:45 0d5d8be691d84ceb9d5ee1658228715f msgid "**exactly one infinite rect / irect!**" msgstr "**無限の矩形 / irectは1つだけです!**" -#: ../../rect.rst:46 a5e68e76166649f6973954ad8dfe2246 +#: ../../rect.rst:46 26942847b7af4257abd3527495c70837 msgid "coordinate values" msgstr "座標値" -#: ../../rect.rst:46 e79b3dea62784ff3877b0d56cdd6e39d +#: ../../rect.rst:46 f45611b6a50645cba718559b16ebab2c msgid "all numbers" msgstr "すべての数値" -#: ../../rect.rst:46 52da6b2b3689472cbe121b44ea271cf6 +#: ../../rect.rst:46 c23643e3767a44f6a9765c8eb04c8682 msgid "`FZ_MIN_INF_RECT <= number <= FZ_MAX_INF_RECT`" msgstr "FZ_MIN_INF_RECT <= 数値 <= FZ_MAX_INF_RECT" -#: ../../rect.rst:47 ef4952da263c47498164340206851ee9 +#: ../../rect.rst:47 5ab8dbefea604252a3d886cc58f53f04 msgid "borders, corners" msgstr "境界、コーナー" -#: ../../rect.rst:47 a90e9e3d71054bb89bf5508d19b47d5c +#: ../../rect.rst:47 07909179c08c434bada8a34339bc4f1f msgid "are parts of the rectangle" msgstr "矩形の一部です" -#: ../../rect.rst:47 03e7c9f2e2024e96befd98477df462a0 +#: ../../rect.rst:47 ad24f776c93b4893b27a9ffc89a09e30 msgid "right and bottom corners and edges **are outside**" msgstr "右下の角とエッジは **外側にあります**" -#: ../../rect.rst:50 fd57d2e3e1464701808b18da59be64c5 +#: ../../rect.rst:50 64b6790f14a4436c84c2490872f0bf02 msgid "" "There are new top level functions defining infinite and standard empty " "rectangles and quads, see :meth:`INFINITE_RECT` and friends." @@ -248,235 +248,235 @@ msgstr "" "新しいトップレベルの関数が追加され、無限と標準の空の四角形および四角形を定義します。:meth:`INFINITE_RECT` " "などを参照してください。" -#: ../../rect.rst:54 d3b17a5f194d42da94716bf2dd5806f7 +#: ../../rect.rst:54 8b1e46fe5d5940ae916bad372aef9847 msgid "**Methods / Attributes**" msgstr "**メソッド / 属性**" -#: ../../rect.rst:54 6634e686f51a429085016f2cbdefacfe +#: ../../rect.rst:54 d6d28ff300c146f399cf21662676485c msgid "**Short Description**" msgstr "**短い説明**" -#: ../../rect.rst:56 6c9a3133a3dd4aa5a33d0aeb1f666aff +#: ../../rect.rst:56 32cbdd51f6984573910008d616626e1e msgid ":meth:`Rect.contains`" msgstr "" -#: ../../rect.rst:56 59042042ef704bf68ee0b7f10aa6b393 +#: ../../rect.rst:56 a7a16aee03b242d099e29b157a9b4b17 msgid "checks containment of point_likes and rect_likes" msgstr "point_likesおよびrect_likesの包含をチェックします。" -#: ../../rect.rst:57 a23454a489b6458db1a739279371c7ce +#: ../../rect.rst:57 e144062c3f124661ad5c5c4a32f1be7f msgid ":meth:`Rect.get_area`" msgstr "" -#: ../../rect.rst:57 eb618406c17e499ebefffdefe322c7a7 +#: ../../rect.rst:57 44971c8870934e5e89dd52b5192e1a79 msgid "calculate rectangle area" msgstr "四角形の面積を計算します。" -#: ../../rect.rst:58 2ab603daa7224017a3881afdc31f0c1f +#: ../../rect.rst:58 a623f54f39034dd6856f7b268b3ccc32 msgid ":meth:`Rect.include_point`" msgstr "" -#: ../../rect.rst:58 45c8ba80666c4b88ad3bdf261c8e2330 +#: ../../rect.rst:58 36520814a04a4656bbf62f55fb24432f msgid "enlarge rectangle to also contain a point" msgstr "点も含むように四角形を拡大します。" -#: ../../rect.rst:59 fec012eefb3d4454873f210e703972c0 +#: ../../rect.rst:59 cf92cb27b5304db5852e19490f45268d msgid ":meth:`Rect.include_rect`" msgstr "" -#: ../../rect.rst:59 2f13fc7c021540d6b60872502c9e37f0 +#: ../../rect.rst:59 ac1035fb19b34efa9fb0de1643a027eb msgid "enlarge rectangle to also contain another one" msgstr "別の四角形も含むように四角形を拡大します。" -#: ../../rect.rst:60 ef6fc9b85bda4e36b927a52a46d24710 +#: ../../rect.rst:60 68858515cc564906ac5c1cbf7c425185 msgid ":meth:`Rect.intersect`" msgstr "" -#: ../../rect.rst:60 8a6a03fbf67841a3b61092ccc1a6c303 +#: ../../rect.rst:60 2effa8a9c2284b12bf11367ee6232ce1 msgid "common part with another rectangle" msgstr "別の四角形との共通部分です。" -#: ../../rect.rst:61 d0cbdc244cb34318ba31a800f45a326a +#: ../../rect.rst:61 e78842ba8a724c2986e34df95d02c502 msgid ":meth:`Rect.intersects`" msgstr "" -#: ../../rect.rst:61 c2a35fde14fc41d296c6f202e4691879 +#: ../../rect.rst:61 fc7ca5b01e824b86aa2e6808f69a0a36 msgid "checks for non-empty intersections" msgstr "非空の交差をチェックします。" -#: ../../rect.rst:62 bcafa3bc545e427c97d5800479357d36 +#: ../../rect.rst:62 adf78cc1c43440dfaf89b76333de5611 msgid ":meth:`Rect.morph`" msgstr "" -#: ../../rect.rst:62 ec7b3733838843808586b27aaa9facc7 +#: ../../rect.rst:62 a49711257f064e1588dc30ce9647c38e msgid "transform with a point and a matrix" msgstr "点と行列を使用して四角形を変形します。" -#: ../../rect.rst:63 6328975ac850410b813bfb0c0b35f9a1 +#: ../../rect.rst:63 731ea321e2f245c389ce96d2baf8a1dd msgid ":meth:`Rect.torect`" msgstr "" -#: ../../rect.rst:63 b37117d5b1374e899ca574ddd33e405d +#: ../../rect.rst:63 88f5cc601a804e67bd5d5527df1dc62c msgid "the matrix that transforms to another rectangle" msgstr "別の四角形に変換する行列です。" -#: ../../rect.rst:64 02d20b9f5c6e464c9aaafeb0cdf9f7e5 +#: ../../rect.rst:64 ee4cdc8fd6cb4410bd4cb790f88d2002 msgid ":meth:`Rect.norm`" msgstr "" -#: ../../rect.rst:64 81ab79cd2dd649fdb4fbc8b3f35438c5 +#: ../../rect.rst:64 1ba39b9e8b494dc688bc7ce9bcedb2e6 msgid "the Euclidean norm" msgstr "ユークリッドノルム" -#: ../../rect.rst:65 53b55a2133534380bdf2284072f42f9a +#: ../../rect.rst:65 1730541f1d994d46862f44ede7d2846f msgid ":meth:`Rect.normalize`" msgstr "" -#: ../../rect.rst:65 e4336b0d6fb54db4836c34c1b747ba54 +#: ../../rect.rst:65 2335f286efdb472d83a140038586bcf2 msgid "makes a rectangle valid" msgstr "四角形を有効にします" -#: ../../rect.rst:66 ebfedb5e78924cd59b7cd648f84a2522 +#: ../../rect.rst:66 2b7e251eb22141b7ba2942184913b727 msgid ":meth:`Rect.round`" msgstr "" -#: ../../rect.rst:66 624772100bde446bb472ecf5d63c3597 +#: ../../rect.rst:66 3d7b98e807dc45ce80bec5615acafd27 msgid "create smallest :ref:`Irect` containing rectangle" msgstr "最小の :ref:`Irect` を含む四角形を作成します。" -#: ../../rect.rst:67 d4c372d9c4eb45f9912ba371dec2c1d8 +#: ../../rect.rst:67 dffa9501a55c4a089143d424cb418a17 msgid ":meth:`Rect.transform`" msgstr "" -#: ../../rect.rst:67 60d0fbf1db5c4660aca4750202994741 +#: ../../rect.rst:67 7e6886efabe24990b2c14e2e9cc94df4 msgid "transform rectangle with a matrix" msgstr "行列で四角形を変形します。" -#: ../../rect.rst:68 e5624b6058aa4ed884489e7271bf6192 +#: ../../rect.rst:68 9b9609a84c4b4e1da0f70464c2e8ce3a msgid ":attr:`Rect.bottom_left`" msgstr "" -#: ../../rect.rst:68 768af93fd2244e6a9e982db3706a1ce4 +#: ../../rect.rst:68 1ddacc2a6e6f4ad9936a7ef64ea2ad17 msgid "bottom left point, synonym *bl*" msgstr "左下の点、シノニム *bl*" -#: ../../rect.rst:69 fc7c47be277c487fa69b768813ab59f8 +#: ../../rect.rst:69 9cedfd00eb9a436facd134f7119f2fc1 msgid ":attr:`Rect.bottom_right`" msgstr "" -#: ../../rect.rst:69 e5c7ede2de3b4effad77b5d8786325c2 +#: ../../rect.rst:69 4437891974524cd6be6ad68baa5ba513 msgid "bottom right point, synonym *br*" msgstr "右下の点、シノニム *br*" -#: ../../rect.rst:70 e75d58ad7bcc4b57b5413bb332cc12ed +#: ../../rect.rst:70 1f78731833944580b5d74413e1d5b0ee msgid ":attr:`Rect.height`" msgstr "" -#: ../../rect.rst:70 a7f1d68f807b497aad0f1eb79e4f20fd +#: ../../rect.rst:70 f47b82338e3f436f913bae3e2ff5e4dc msgid "rectangle height" msgstr "四角形の高さ" -#: ../../rect.rst:71 715c114cb8524d55a64c50d5f1a40101 +#: ../../rect.rst:71 0b6e47727811447ea07af99781b2e3b7 msgid ":attr:`Rect.irect`" msgstr "" -#: ../../rect.rst:71 040b07fc40314365b960a2b6f4cc8eac +#: ../../rect.rst:71 e82eab643bc046a784b949a6dffe8b67 msgid "equals result of method *round()*" msgstr "*round()* メソッドの結果と等しい" -#: ../../rect.rst:72 1c952376413f403db2078d071265945f +#: ../../rect.rst:72 3e90e5cf638447ca9d824c79145b3cad msgid ":attr:`Rect.is_empty`" msgstr "" -#: ../../rect.rst:72 d8fbdde883654990be2d3a8035a0ae12 +#: ../../rect.rst:72 b7166f50e79c493f868a43091a462071 msgid "whether rectangle is empty" msgstr "四角形が空かどうか" -#: ../../rect.rst:73 5107c93545d344768e948e10ec92299f +#: ../../rect.rst:73 502df41843404077838e4eb5fafb1e83 msgid ":attr:`Rect.is_valid`" msgstr "" -#: ../../rect.rst:73 fd281bdea60d4e1f9a16e9ed07a6d809 +#: ../../rect.rst:73 d122a760ab4d4df194bc6c90bc99f961 msgid "whether rectangle is valid" msgstr "四角形が有効かどうか" -#: ../../rect.rst:74 f817a6f79da64cd883dabe6601e3f438 +#: ../../rect.rst:74 5646513259e346be95726ffadb021c57 msgid ":attr:`Rect.is_infinite`" msgstr "" -#: ../../rect.rst:74 7b6268c708d8472fa7f3ce1cde6721c5 +#: ../../rect.rst:74 5d9ea98ae3364247ba6be8132cacd87b msgid "whether rectangle is infinite" msgstr "四角形が無限かどうか" -#: ../../rect.rst:75 94da733f05f44aee8196d0cc6f6a5cff +#: ../../rect.rst:75 012fcf9ae00c4ea2a7412539968d760e msgid ":attr:`Rect.top_left`" msgstr "" -#: ../../rect.rst:75 29544144ca8e47fd842abb87c33c1a8d +#: ../../rect.rst:75 b295efcf4751475fb66614f940f4a464 msgid "top left point, synonym *tl*" msgstr "左上の点、シノニム *tl*" -#: ../../rect.rst:76 b54177781c20405f887f50a6977ca51c +#: ../../rect.rst:76 af32d4918cfc4cfdaf0d6690270662ee msgid ":attr:`Rect.top_right`" msgstr "" -#: ../../rect.rst:76 a0d17a9476014668afac1b758bce74ef +#: ../../rect.rst:76 6c1326343d684df4be0b468d09054494 msgid "top_right point, synonym *tr*" msgstr "右上の点、シノニム *tr*" -#: ../../rect.rst:77 40eb289fe38d49239ed3d2731014e474 +#: ../../rect.rst:77 b879ddb0bb7a40509b77711ea1714bc3 msgid ":attr:`Rect.quad`" msgstr "" -#: ../../rect.rst:77 401bca99ca774270807fdbc6832b56d6 +#: ../../rect.rst:77 5f754c7d792942b89e39c9ca74ce3df1 msgid ":ref:`Quad` made from rectangle corners" msgstr "四角形の角から作成される :ref:`Quad`" -#: ../../rect.rst:78 c4a25c2c02294139b26c43a23ca17ba5 +#: ../../rect.rst:78 06754fd4f17c4308b8e1bcb8896053bd msgid ":attr:`Rect.width`" msgstr "" -#: ../../rect.rst:78 c23b9283e6c7480c9430fd7c8068316b +#: ../../rect.rst:78 896c2341e26c4bae8c698742629680f5 msgid "rectangle width" msgstr "四角形の幅" -#: ../../rect.rst:79 17f86febad9c409e95efe53554586235 +#: ../../rect.rst:79 c6ab34b27e85452cbb533f1ef1ac0749 msgid ":attr:`Rect.x0`" msgstr "" -#: ../../rect.rst:79 c64d7f59adc64764a16b68a1262476b7 +#: ../../rect.rst:79 14e0e826a2484f1fbb6ca777c4fda492 msgid "left corners' x coordinate" msgstr "左上のx座標" -#: ../../rect.rst:80 d5f88383917f41b6af6d8139f0c4f33c +#: ../../rect.rst:80 67be2aa5256546cfa1539022f668a46e msgid ":attr:`Rect.x1`" msgstr "" -#: ../../rect.rst:80 81d320a8a5614b29bdfe100a3f952fd7 +#: ../../rect.rst:80 eb15ef70313f44b3b5aa6aba21d5956f msgid "right corners' x -coordinate" msgstr "右上のx座標" -#: ../../rect.rst:81 b9c33033623a41a9aa54f346a8fbbdbb +#: ../../rect.rst:81 62ce0e154b914073ab1720edca8df46e msgid ":attr:`Rect.y0`" msgstr "" -#: ../../rect.rst:81 a68db2f1c1ee4571a9827c04a1636d83 +#: ../../rect.rst:81 9aca9bfad3ca4d518abfb7c6eb614698 msgid "top corners' y coordinate" msgstr "上部のy座標" -#: ../../rect.rst:82 b101a66a01684be9bbe72492a7686f20 +#: ../../rect.rst:82 9932a7086b7a4bcc99b31fd6469b537c msgid ":attr:`Rect.y1`" msgstr "" -#: ../../rect.rst:82 f806a975424747a2a42c65e1ab4e23d8 +#: ../../rect.rst:82 46fc40dbcb4e4a7fb1abf3180401d6eb msgid "bottom corners' y coordinate" msgstr "下部のy座標" -#: ../../rect.rst:85 128da0cceb3446938ea035f8f73aac03 +#: ../../rect.rst:85 24ef39c027ae4fe7acc5db742440c26b msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../rect.rst:103 752877fbe6b64f18ba95bbbc85be8a2e +#: ../../rect.rst:103 876107cdef3940b1a84c137c4c048fdb msgid "" "Overloaded constructors: *top_left*, *bottom_right* stand for " ":data:`point_like` objects, \"sequence\" is a Python sequence type of 4 " @@ -487,19 +487,21 @@ msgstr "" "オブジェクトを表し、「sequence」は4つの数値からなるPythonシーケンス型です(:ref:`SequenceTypes` " "を参照)、rectは別の :data:`rect_like` を意味し、他のパラメーターは座標を意味します。" -#: ../../rect.rst:105 31fb3e9178a14db68c849e0204cb46d8 +#: ../../rect.rst:105 dc9e11c9f0794970bc13f1c2b0d14862 msgid "If \"rect\" is specified, the constructor creates a **new copy** of it." msgstr "\"rect\" が指定されている場合、コンストラクターはそれの **新しいコピー** を作成します。" -#: ../../rect.rst:107 4569abb9b32945258fc7287cda141b02 +#: ../../rect.rst:107 8a8e5207467c4429adce97d79872a891 +#, fuzzy msgid "" -"Without parameters, the empty rectangle *Rect(0.0, 0.0, 0.0, 0.0)* is " +"Without parameters, the empty rectangle ``Rect(0.0, 0.0, 0.0, 0.0)`` is " "created." msgstr "パラメーターなしで、空の長方形 *Rect(0.0, 0.0, 0.0, 0.0)* が作成されます。" -#: ../../rect.rst:111 1405ec85478b4809be2a6a3610a457e6 +#: ../../rect.rst:111 d0389764b67b469dacca2e806465eb38 +#, fuzzy msgid "" -"Creates the smallest containing :ref:`IRect`. This is **not** the same as" +"Creates the smallest containing :ref:`IRect`. This is **not the same** as" " simply rounding the rectangle's edges: The top left corner is rounded " "upwards and to the left while the bottom right corner is rounded " "downwards and to the right." @@ -507,11 +509,11 @@ msgstr "" "最小の :ref:`IRect` を作成します。これは単に長方形のエッジを四捨五入することとは " "**異なります**。左上のコーナーは上方向および左方向に丸められ、右下のコーナーは下方向および右方向に丸められます。" -#: ../../rect.rst:116 cc13130310c647f397eed8389da55ca6 +#: ../../rect.rst:116 6f10ab8e587a4f8da3bd39fab6c21272 msgid "If the rectangle is **empty**, the result is also empty." msgstr "もし矩形が空の場合、結果も **空** です。" -#: ../../rect.rst:117 6f1f5648bdb94da9affaa7f5a806e732 +#: ../../rect.rst:117 0466199751f24e1694fe4da6c03b978f msgid "" "**Possible paradox:** The result may be empty, **even if** the rectangle " "is **not** empty! In such cases, the result obviously does **not** " @@ -521,50 +523,50 @@ msgstr "" "**可能性のある逆説:** 矩形が空で **ない** 場合 **でも** 、結果が空になることがあります!このような場合、結果は明らかに矩形を " "**含みません**。これは、MuPDFのアルゴリズムがわずかな許容差(1e-3)を許容しているためです。例:" -#: ../../rect.rst 0680bc9cc4ce4e4faf62dd69cf44ef66 -#: 2cad19c015f548b681f2d577616b04a4 331d94727e17461899902c09927f3ba8 -#: 54c78a66826141669f528c751dcabbe9 61025bb6a4bb4fdeb8e570415bbcb908 -#: a84670a44c5c4411a7b5f7f676a9a254 dd51f1d1217e474e880b492a6cd4322a -#: e2f349aab7e04f0b965b6f199d93a4d6 +#: ../../rect.rst 0a7269b7d8f74c71a481ce1ef76290d2 +#: 0ac0ade2c6234906971545973bc3addb 1fa4e22a1efa49afb9db1a2e8acc84f6 +#: 287dfc79dae24ac5bdc23bd6140536f8 8281a9f73e0c420caf0268e3432135b7 +#: a5f0a2eede5d431b838c556fb19cd1c7 a8e78634da5b4b248dc91a4da9bcf0b0 +#: e909480691a64745947dfcc581389e71 msgid "Return type" msgstr "" -#: ../../rect.rst:127 6946b6c4b6934c08834f6a61993134a7 +#: ../../rect.rst:127 61d0b53003974020a0ee6c6b732ec205 msgid ":ref:`IRect`" msgstr "" -#: ../../rect.rst:131 6c21e257022645c09640367e4dc1897a +#: ../../rect.rst:131 a74add066ed74ab7b932fa24a6c7b876 msgid "" "Transforms the rectangle with a matrix and **replaces the original**. If " "the rectangle is empty or infinite, this is a no-operation." msgstr "次の条件を満たす場合、行列を使用して長方形を変換し、**元の長方形を置き換えます** :長方形が空であるか無限である場合、これは操作が行われません。" -#: ../../rect.rst 0bf248b230a14017a19ec34b438f0126 -#: 12d032c9fca143aeb6c29fc6fe54e0b6 25c6b658c4114b818892e9cb9eb1d90e -#: 46a9418ed7d146a68642b62f16ca4372 70a08328858145f6834208710c9d0668 -#: a40265b3a47f48b38c3957544dc35106 de745c145fdc44da9ee52e39eb3b6123 -#: e86772f2c7b245b881ed095581572ede fa577e8986894fb7bc50f47c8573f5be +#: ../../rect.rst 214f6f23d11049ceae1322d54b3bd0d5 +#: 369735ccc9d4497baf0ca59a08bb44a2 382fbdea207d466080b5538a9899d047 +#: 42e5275efde045f395c7491842614edb 4f151c7a3ccf4060abccd8f626ff8bbb +#: 5a93f342cc8b4530a8376e2ae713c551 8152452aa16e4a58afd85b6ee8a8deaf +#: bc314e573ce848d0846a16250afa5f50 c5c886dd49b44f79b2f0f66d357bcd4e msgid "Parameters" msgstr "" -#: ../../rect.rst:133 278249dff73a4a11a6e75d4ad5abb852 +#: ../../rect.rst:133 5ccb7999734e45cbb89a3752dd1f9590 msgid "The matrix for the transformation." msgstr "m(行列)–変換用の行列。" -#: ../../rect.rst:136 45e315eb967a48aeb57236b1aeff08d3 +#: ../../rect.rst:136 ddaca91bf0ac4621bd5be07017e53f19 msgid "*Rect*" msgstr "" -#: ../../rect.rst 5c02c632114e4adf8f118b1b124f6056 -#: 9e2f709c025045b586698bd70695fce4 c56ccb9c9fa748adb350daf9de128a60 +#: ../../rect.rst 51c0f6d4e59140aebf4c99812b0c636d +#: c959d184f9b449078aa2c376641b5644 ca6981d6e36a46f893861e291e3c5b0d msgid "Returns" msgstr "" -#: ../../rect.rst:137 ad80afa1f5f342a18b6c9d62dfe0821a +#: ../../rect.rst:137 d0c8f8613d314bba942409850b3a9c21 msgid "the smallest rectangle that contains the transformed original." msgstr "変換された元の長方形を含む最小の長方形。" -#: ../../rect.rst:141 ded01fceaba24571a1fba50f83dd8195 +#: ../../rect.rst:141 59ece54a490e49169bd9ae0b55720c46 msgid "" "The intersection (common rectangular area, largest rectangle contained in" " both) of the current rectangle and *r* is calculated and **replaces the " @@ -578,48 +580,44 @@ msgstr "" " " "が無限である場合、これは操作が行われません。長方形が(数学的に)交差していない場合、結果は無効になります。結果が有効でも空の場合、長方形は互いに角または一部の側面に接触しています。" -#: ../../rect.rst:143 ../../rect.rst:150 3895c067a491488ea98c78aa254b0345 -#: 6ba7340459fb41ae93d34194d73ec6dc +#: ../../rect.rst:143 ../../rect.rst:150 3c56583d71f44f1f9dfcc257a6b14da5 +#: 993ebcaf675348e4baf42058064f4af1 msgid "Second rectangle" msgstr "第二の長方形" -#: ../../rect.rst:148 7b45a0d622fc4e629ae467ce5725ac55 +#: ../../rect.rst:148 46cc81d886744a779064ff0e36d3d87e msgid "" -"The smallest rectangle containing the current one and *r* is calculated " -"and **replaces the current** one. If either rectangle is infinite, the " -"result is also infinite. If one is empty, the other one will be taken as " -"the result." +"The smallest rectangle containing the current one and ``r`` is calculated" +" and **replaces the current** one. If either rectangle is infinite, the " +"result is also infinite. If ``r`` is empty, the current rectangle remains" +" unchanged. Else if the current rectangle is empty, it is replaced by " +"``r``." msgstr "" -"現在の長方形と *r* " -"を含む最小の長方形を計算し、**現在の長方形を置き換えます**。どちらかの長方形が無限の場合、結果も無限になります。1つが空である場合、もう1つが結果として取られます。" -#: ../../rect.rst:155 14707c788cc845aea9d59376276f8363 +#: ../../rect.rst:155 e269f594553d418089fed3cc89a03c85 msgid "" -"The smallest rectangle containing the current one and point *p* is " -"calculated and **replaces the current** one. **The infinite rectangle " -"remains unchanged.** To create a rectangle containing a series of points," -" start with (the empty) *pymupdf.Rect(p1, p1)* and successively include the " -"remaining points." +"The smallest rectangle containing the current one and :data:`point_like` " +"``p`` is calculated and **replaces the current** one. **The infinite " +"rectangle remains unchanged.** To create the rectangle that wraps a " +"sequence of points, start with :meth:`EMPTY_RECT` and successively " +"include the members of the sequence." msgstr "" -"現在の長方形と点 *p* " -"を含む最小の長方形を計算し、**現在の長方形を置き換えます**。無限の長方形は変更されません。一連の点を含む長方形を作成するには、(空の) " -"*pymupdf.Rect(p1, p1)* から始め、残りの点を順次含めてください。" -#: ../../rect.rst:157 fed21971235046949f2bf55bb0995301 +#: ../../rect.rst:157 4ce142e941c042c3a80e74cf46c850ec msgid "Point to include." msgstr "含めるポイント。" -#: ../../rect.rst:163 44c32dd20ec24659b41b993bfe187211 +#: ../../rect.rst:163 a44ce35d4d4948dcbf2421c80a366961 msgid "" "Calculate the area of the rectangle and, with no parameter, equals " "*abs(rect)*. Like an empty rectangle, the area of an infinite rectangle " -"is also zero. So, at least one of *pymupdf.Rect(p1, p2)* and *pymupdf.Rect(p2, " -"p1)* has a zero area." +"is also zero. So, at least one of *pymupdf.Rect(p1, p2)* and " +"*pymupdf.Rect(p2, p1)* has a zero area." msgstr "" "長方形の面積を計算し、パラメーターなしで *abs(rect)* と同じです。空の長方形の面積はゼロであるため、少なくとも " "*pymupdf.Rect(p1、p2)* と *pymupdf.Rect(p2、p1)* のいずれかがゼロの面積を持っている必要があります。" -#: ../../rect.rst:165 92112430c1204b299d0f8c5cd4942c01 +#: ../../rect.rst:165 1fa10486b170486e9fd1707061e8b621 msgid "" "Specify required unit: respective squares of *px* (pixels, default), *in*" " (inches), *cm* (centimeters), or *mm* (millimeters)." @@ -627,53 +625,53 @@ msgstr "" "必要な単位を指定します: *px* (ピクセル、デフォルト)の平方、*in* (インチ)、*cm* (センチメートル)、または *mm* " "(ミリメートル)の平方。" -#: ../../rect.rst:170 21cebe5cb4c342c09e8ffb071d0e44fa +#: ../../rect.rst:170 540e1878a49a42a18ee2ada0192ae56a msgid "" "Checks whether *x* is contained in the rectangle. It may be an *IRect*, " "*Rect*, *Point* or number. If *x* is an empty rectangle, this is always " -"true. If the rectangle is empty this is always *False* for all non-empty " -"rectangles and for all points. `x in rect` and `rect.contains(x)` are " -"equivalent." +"true. If the rectangle is empty this is always ``False`` for all non-" +"empty rectangles and for all points. `x in rect` and `rect.contains(x)` " +"are equivalent." msgstr "" "*x* が四角形内に含まれているかどうかをチェックします。xは *IRect*、*Rect*、*Point*、または数値のいずれかです。もし " "*x* " "が空の四角形である場合、これは常にtrueです。四角形が空である場合、これはすべての空でない四角形とすべてのポイントに対して常にfalseです。`x" " in rect` および `rect.contains(x)` は同等です。" -#: ../../rect.rst:172 ac480a8ea7e64af097d382d7eeeb5809 +#: ../../rect.rst:172 51eb679fd4ae436fbc6bf5c11a96dc06 msgid "the object to check." msgstr "チェックするオブジェクト。" -#: ../../rect.rst:179 7b57f6e38cae43a4b1242311f77cc8d7 +#: ../../rect.rst:179 abe761296d1749f0b9151470d32f3a5c msgid "" "Checks whether the rectangle and a :data:`rect_like` \"r\" contain a " -"common non-empty :ref:`Rect`. This will always be *False* if either is " +"common non-empty :ref:`Rect`. This will always be ``False`` if either is " "infinite or empty." msgstr "" "長方形と :data:`rect_like` \"r\" " -"が共通の非空のRectを含むかどうかをチェックします。どちらかが無限または空の場合、これは常に *False* になります。" +"が共通の非空のRectを含むかどうかをチェックします。どちらかが無限または空の場合、これは常に ``False`` になります。" -#: ../../rect.rst:181 2d54c0c487564707a2ef9f79fec2b1d3 +#: ../../rect.rst:181 efbd1b668aaa4b83aea3f80ad48757f4 msgid "the rectangle to check." msgstr "チェックする長方形。" -#: ../../rect.rst:187 aa1c3c2aed8846259e27f48bf0a6496c +#: ../../rect.rst:187 d7073301e4604c1f9c424e96ea4f6888 msgid "New in version 1.19.3" msgstr "新機能(バージョン1.19.3)" -#: ../../rect.rst:189 c793d3736dec4be89aee456b745be5ad +#: ../../rect.rst:189 1a724a40a6fa4eb5b92009a72ec43d15 msgid "Compute the matrix which transforms this rectangle to a given one." msgstr "この長方形を指定した長方形に変換する行列を計算します。" -#: ../../rect.rst:191 494d00ab8da84c8e9ed3e9a7e7912be7 +#: ../../rect.rst:191 07496533a3f14d27bad85600cd6cb061 msgid "the target rectangle. Must not be empty or infinite." msgstr "ターゲットの長方形。空または無限であってはいけません。" -#: ../../rect.rst:192 12487761f56f4f6f9661bcad7f249512 +#: ../../rect.rst:192 78c87bd6a08e46b392d2bec1b41651ef msgid ":ref:`Matrix`" msgstr "" -#: ../../rect.rst:193 91cae6e8ea644d3db06a4c70b6ac2d96 +#: ../../rect.rst:193 7b5151a9628744429575a2d457eeaddf msgid "" "a matrix `mat` such that `self * mat = rect`. Can for example be used to " "transform between the page and the pixmap coordinates. See an example use" @@ -682,41 +680,41 @@ msgstr "" "`self * mat = rect` となるような行列 `mat` です。たとえば、ページとピクスマップの座標間を変換するのに使用できます。 " "使用例はこちらを参照してください :ref:`RecipesImages_P` " -#: ../../rect.rst:197 ae55541d51924c12a1076f861fadf4a2 +#: ../../rect.rst:197 88ecaa3c547a47be8c1b7eddc6a4844b msgid "New in version 1.17.0" msgstr "新機能バージョン1.17.0" -#: ../../rect.rst:199 1ea856c87c244b5e94199a4c87f1ab44 +#: ../../rect.rst:199 9a6bd77c5b524450baf036b5e58f53f8 msgid "" "Return a new quad after applying a matrix to the rectangle using the " "fixed point `fixpoint`." msgstr "固定点 `fixpoint` を使用して、行列を長方形に適用した後の新しい四角形を返します。" -#: ../../rect.rst:201 550550d5ce5543ba8a0679b5d5ee20c1 +#: ../../rect.rst:201 685ccabce2584daa8ca5cf065f916a6c msgid "the fixed point." msgstr "固定ポイント。" -#: ../../rect.rst:202 da9cd48343da4c60b9b3646dc2b82dde +#: ../../rect.rst:202 305c5469cf3f497da01ea155e49b6cfa msgid "the matrix." msgstr "行列。" -#: ../../rect.rst:203 3ba700d79e624baca460b81f1fe5c04e +#: ../../rect.rst:203 f06b2d5320d9428b95c363b255ffd8ac msgid "" "a new :ref:`Quad`. This a wrapper for the same-named quad method. If " "infinite, the infinite quad is returned." msgstr "新しい :ref:`Quad` 。これは同じ名前の四角形メソッドのラッパーです。無限の場合、無限の四角形が返されます。" -#: ../../rect.rst:207 b439c07871784b1db3f3ef2fd9be5f62 +#: ../../rect.rst:207 b781e934cbc24f179d17436ec5ad4223 msgid "New in version 1.16.0" msgstr "新機能バージョン1.16.0" -#: ../../rect.rst:209 2594c9c95ae54dab8f8271a93bc3008a +#: ../../rect.rst:209 cad110cf715a419a867b612210794baa msgid "" "Return the Euclidean norm of the rectangle treated as a vector of four " "numbers." msgstr "四角形を4つの数値のベクトルとして扱った場合のユークリッドノルムを返します。" -#: ../../rect.rst:213 41438cef745a4ad4b7f721d58fcecaf3 +#: ../../rect.rst:213 3d0c1479425d4e6aa4835eb4b76889c2 msgid "" "**Replace** the rectangle with its valid version. This is done by " "shuffling the rectangle corners. After completion of this method, the " @@ -726,99 +724,99 @@ msgstr "" "長方形をその有効なバージョンで " "**置き換えます**。これは長方形のコーナーをシャッフルして行います。このメソッドの完了後、右下のコーナーは確かに左上のコーナーの南東になります(ただし、空である可能性があります)。" -#: ../../rect.rst:217 1bbc2ce022bd44ec954316cc65befa90 +#: ../../rect.rst:217 addc9cb911fd43dfa6e84cce61e07201 msgid "Equals result of method *round()*." msgstr "*round()* メソッドの結果と同じです。" -#: ../../rect.rst:223 b7a404a566f149d1bf2b4561a8e7f187 +#: ../../rect.rst:223 6112dfaa9f5f49fcbdbf584273635d53 msgid "Equals *Point(x0, y0)*." msgstr "*Point(x0, y0)* と等しい。" -#: ../../rect.rst 01c09dd9cf69456d8dc6d86786281d61 -#: 0318fad2f8a3477b82762b774ee29318 29c4dea109ed429c95cca2b5fa5b77b8 -#: 3dbea16779ee49748b52d0dfc8807bf9 6285d1799118481ebc1f52834e44e8f1 -#: 64cbb0ef800844ccad4399fa2aad888f 74723fd6051c4140b8a6eb86530b9c82 -#: 92cad891213e498692623a9a52275621 a13b9ed7e36a4987b310c0d4363e5216 -#: d41d9c16086a474da6511a79a7dc61ae e1c8a6595fc6433a9f29fccedce5a13e -#: ec882ecb58504992aa5f3ba70f700fb6 +#: ../../rect.rst 0862f90648e54766b61aef9d90f85030 +#: 22e8d621cd014016b3fbea1b3ff74403 3523354080154bddabe8999e6b9a4cf1 +#: 4cc565a45f394268904ca547347fc944 8973488d35c64d1187d569f6d1e97748 +#: 8a08c27d65304c2791b47f89c045e3c5 8bde25711e984775a0066263e55308c4 +#: 9c0d0af077684773a5b08f57fa98edae b05cc4800c194f438ef62f6227f6c261 +#: ba19d73da1b247bdbdebcd0977eaff37 f09c4322833140c3b46990aa3526a68a +#: ffaa1710013d49129985889459486d5e msgid "type" msgstr "" #: ../../rect.rst:225 ../../rect.rst:233 ../../rect.rst:241 ../../rect.rst:249 -#: 276e064e9aeb4784be1d1659f80fcf94 57f4e1a395bc42ddbe1fd97706529a07 -#: 9e2016a913a3450c879eb65c5a82b055 eadce665a4844424806d08adb1507967 +#: 400bdc0960a642f9b5d8e38ca7c8e5a0 4ec860563cfb4b9090c51d9a177a83b0 +#: 7376dc7a087b491baa549627c8327f0b a7b5f69ee81649d8bddcfee6f86231e5 msgid ":ref:`Point`" msgstr "" -#: ../../rect.rst:231 832ac6fd74f940e1a73d347eedf32c38 +#: ../../rect.rst:231 00e1b4539d6c43109b115c58ce11040e msgid "Equals `Point(x1, y0)`." msgstr "`Point(x1, y0)` と等しい。" -#: ../../rect.rst:239 4d98b7cdba784dd992b25b055b705978 +#: ../../rect.rst:239 800d7a664dab4f8d9556d8404b3b34ba msgid "Equals `Point(x0, y1)`." msgstr "`Point(x0, y1)` と等しい。" -#: ../../rect.rst:247 4b7bdab0ae934f39bafe20edcaa394f5 +#: ../../rect.rst:247 440272bccc064c36b74060e4ee822bd3 msgid "Equals `Point(x1, y1)`." msgstr "" -#: ../../rect.rst:253 ca3b3ce8b2d240999536d93bef9e6a01 +#: ../../rect.rst:253 ee9c50a355474a2e8d42e16dd758d0ac msgid "The quadrilateral `Quad(rect.tl, rect.tr, rect.bl, rect.br)`." msgstr "四角形 `Quad(rect.tl, rect.tr, rect.bl, rect.br)`。" -#: ../../rect.rst:255 a0010f7f30b540c7b406907f4c7e6a53 +#: ../../rect.rst:255 4efc68bb37fd4c6d909baff77eab6b59 msgid ":ref:`Quad`" msgstr "" -#: ../../rect.rst:259 68be49c985c1431ea54cb97092202c90 +#: ../../rect.rst:259 43065cade528469eae1a424c00580bea msgid "Width of the rectangle. Equals `max(x1 - x0, 0)`." msgstr "長方形の幅。`max(x1 - x0, 0)` と等しい。" -#: ../../rect.rst:265 223bb5a2eb3d44108e4accf54d54fdfb +#: ../../rect.rst:265 ae121c0a14ad43c1926e5453975b9b0a msgid "Height of the rectangle. Equals `max(y1 - y0, 0)`." msgstr "長方形の高さ。`max(y1 - y0, 0)` と等しい。" -#: ../../rect.rst:271 7f0506fc906f44cfa98e0ab459ed1ff4 +#: ../../rect.rst:271 643991e87f0a4babb2714c9d06f2c0c7 msgid "X-coordinate of the left corners." msgstr "左上の x 座標。" #: ../../rect.rst:273 ../../rect.rst:279 ../../rect.rst:285 ../../rect.rst:291 -#: 401fed5856514959957b2c1d7ae8febc 549675b19b9e4b19924512e92feeea06 -#: c99f2edcdde645c7abd8a4a451f39375 da6f5c05ce7f40479324d0b5f7226960 +#: 7239c5df73f6410d8df2a83494348d32 72a34abfeb674143aefa0a1362bac0c8 +#: 79cb4aa5140a4444ae907f76099a6cfd 928e58362b6246f2ae849d1104d2c565 msgid "float" msgstr "" -#: ../../rect.rst:277 661b0778e533449fbfbcff8c08206b85 +#: ../../rect.rst:277 e71a3472f7514dbcaab41d96d296c43a msgid "Y-coordinate of the top corners." msgstr "左上の y 座標。" -#: ../../rect.rst:283 2a809259f911422f9bef5737e5153c0e +#: ../../rect.rst:283 a7091ed52ca54a978ccd7db42afe4297 msgid "X-coordinate of the right corners." msgstr "右下の x 座標。" -#: ../../rect.rst:289 daf2b52fb89d4df58090d0c501315b9a +#: ../../rect.rst:289 d3fcfa61dfdc4d6c8600fb753d805adf msgid "Y-coordinate of the bottom corners." msgstr "右下の y 座標。" -#: ../../rect.rst:295 599a23b0bd76420089f74a403c12062e +#: ../../rect.rst:295 7dbf9eb43ba940149e72afb047aaaae4 msgid "`True` if this is the infinite rectangle." msgstr "これが無限の長方形の場合は `True`。" #: ../../rect.rst:297 ../../rect.rst:303 ../../rect.rst:309 -#: 56ef1c84b69d45eb95861d013e7fb83e b0b8ff053fa24c59bad74efb7eda8ee0 -#: bac5983b737f4de2997ea6461ba9fcb7 +#: 92cef39f9da84b3eb9530123a29f605f 954cb339b07543be86cf5b1a3cfc2381 +#: a5319dac00f143b69f9d26acc370ff63 msgid "bool" msgstr "" -#: ../../rect.rst:301 bc8e9a0457b640c5afacedf4d291b573 +#: ../../rect.rst:301 3a630252ef604eaea03d67f2491405f6 msgid "`True` if rectangle is empty." msgstr "これが無限の長方形である場合は `True`。" -#: ../../rect.rst:307 43f61aec9d3241518e40280034bf0d35 +#: ../../rect.rst:307 3f15c2b5cff9442a8023836872bafb93 msgid "`True` if rectangle is valid." msgstr "長方形が空である場合は `True`。" -#: ../../rect.rst:313 5dc15f1144d84fd598d8c0ec56257de3 +#: ../../rect.rst:313 3f1be5c4b0614a74b192aee4903e27c8 msgid "" "This class adheres to the Python sequence protocol, so components can be " "accessed via their index, too. Also refer to :ref:`SequenceTypes`." @@ -826,17 +824,43 @@ msgstr "" "このクラスはPythonのシーケンスプロトコルに従っており、要素にはインデックスを使用できます。Using Python Sequences as" " Arguments in PyMuPDFも参照してください" -#: ../../rect.rst:314 ac6dd096a0aa48be88429d4eb98f9919 +#: ../../rect.rst:314 908aa3bdd6f444b7b1112275de42ffde msgid "" "Rectangles can be used with arithmetic operators -- see chapter " ":ref:`Algebra`." msgstr "四角形は算術演算子と組み合わせて使用できます - :ref:`Algebra` の演算子代数の章を参照してください。" -#: ../../footer.rst:71 9397b1f3699d464aa7dc3e9501a679b4 +#: ../../footer.rst:60 613ae6b506a5439397bdf5a852445f7d msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 7babba54a61d4ab69a42e8969f23fc18 -msgid "Discord logo" -msgstr "" +#~ msgid "" +#~ "The smallest rectangle containing the " +#~ "current one and *r* is calculated " +#~ "and **replaces the current** one. If " +#~ "either rectangle is infinite, the result" +#~ " is also infinite. If one is " +#~ "empty, the other one will be taken" +#~ " as the result." +#~ msgstr "" +#~ "現在の長方形と *r* " +#~ "を含む最小の長方形を計算し、**現在の長方形を置き換えます**。どちらかの長方形が無限の場合、結果も無限になります。1つが空である場合、もう1つが結果として取られます。" + +#~ msgid "" +#~ "The smallest rectangle containing the " +#~ "current one and point *p* is " +#~ "calculated and **replaces the current** " +#~ "one. **The infinite rectangle remains " +#~ "unchanged.** To create a rectangle " +#~ "containing a series of points, start " +#~ "with (the empty) *pymupdf.Rect(p1, p1)* " +#~ "and successively include the remaining " +#~ "points." +#~ msgstr "" +#~ "現在の長方形と点 *p* " +#~ "を含む最小の長方形を計算し、**現在の長方形を置き換えます**。無限の長方形は変更されません。一連の点を含む長方形を作成するには、(空の)" +#~ " *pymupdf.Rect(p1, p1)* から始め、残りの点を順次含めてください。" + +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/resources.mo b/docs/locales/ja/LC_MESSAGES/resources.mo index b6e1ad51b..970768a27 100644 Binary files a/docs/locales/ja/LC_MESSAGES/resources.mo and b/docs/locales/ja/LC_MESSAGES/resources.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/resources.po b/docs/locales/ja/LC_MESSAGES/resources.po index 25cd0353b..423030542 100644 --- a/docs/locales/ja/LC_MESSAGES/resources.po +++ b/docs/locales/ja/LC_MESSAGES/resources.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.24.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -18,39 +18,39 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 9544d8d6fd354e96a2b6942874d531b3 +#: ../../header.rst:-1 32a5d41df1df459eb1e9d04ab26ae6e9 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 46b70d836947438a9e243d3ea8ecee71 +#: ../../header.rst:-1 f853d94bef1043f19d324049bb6fc247 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDFは、PDF(およびその他)ドキュメントのデータ抽出、分析、変換、および操作のための高性能なPythonライブラリです。" -#: ../../header.rst:-1 d736446b9f82486d8ba6766c38c1d8e1 +#: ../../header.rst:-1 ee9fba5239104891a698642d810eda59 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFのテキスト抽出、PDFの画像抽出、PDFの変換、PDFのテーブル、PDFの分割、PDFの作成、Pyodide、PyScript" -#: ../../resources.rst:6 297d66dfbef041b2b92e4b65c2201d7e +#: ../../resources.rst:6 50c78b642e87465bab2c3916355a95a0 msgid "Resources" msgstr "リソース" -#: ../../resources.rst:9 12c4020b906f4e0792cb7fa300dab6ce +#: ../../resources.rst:9 4ff3e7104cb64db5af2a616677e85c6e msgid "**PyMuPDF Pro**" msgstr "" -#: ../../resources.rst:12 30aafebcd103497d8ac17b5940562f75 +#: ../../resources.rst:12 08c45bb03e394054bea50f41ce8a06d0 msgid "For **Office** file support `try PyMuPDF Pro `." msgstr "**Office** ファイルのサポートには、`PyMuPDF Pro ` をお試しください。" -#: ../../resources.rst:20 d855400d95774115930e506c935e5822 +#: ../../resources.rst:20 5af5e4a006674fbf9c2bb32995565bc2 msgid "Find out about **PyMuPDF Utilities**" msgstr "**PyMuPDFユーティリティ** について調べる" -#: ../../resources.rst:22 02d6dad48c5840d297384a6f12a15768 +#: ../../resources.rst:22 9107d5d9ff12463c8aaa340fe660b894 msgid "" "The :title:`GitHub` repository `PyMuPDF-Utilities " "`_ contains a full range of" @@ -59,24 +59,23 @@ msgstr "" ":title:`GitHub` リポジトリ `PyMuPDF-Utilities `_ には、豊富な例、デモ、およびユースケースが含まれています。" -#: ../../resources.rst:31 a988ec2fa8394fa0b393ad0e6da6b227 -msgid "Do you need **PDF** to **DOCX** conversion?" -msgstr "**PDF** を **DOCX** に変換する必要がありますか?" +#: ../../resources.rst:31 661997d9b5904871afc832b5d106ec7e +msgid "Do you need |PDF| to **DOCX** conversion?" +msgstr "|PDF| を **DOCX** に変換する必要がありますか?" -#: ../../resources.rst:33 7401720778844c0cb5feb42073d3acd1 +#: ../../resources.rst:33 4d1c4a0b38be4825a6719886af0641bf msgid "" -"We recommend the pdf2docx_ library which uses **PyMuPDF** and the " -"**python-docx** library to provide simple document conversion from " -"**PDF** to **DOCX** format." +"We recommend the pdf2docx_ library which uses |PyMuPDF| and the **python-" +"docx** library to provide simple document conversion from |PDF| to " +"**DOCX** format." msgstr "" -"pdf2docx_ ライブラリをお勧めします。これは、**PDF** から **DOCX** 形式への簡単なドキュメント変換を提供するために " -"**PyMuPDF** と **python-docx** ライブラリを使用しています。" +"pdf2docx_ ライブラリをお勧めします。これは、|PDF| から **DOCX** 形式への簡単なドキュメント変換を提供するために " +"|PyMuPDF| と **python-docx** ライブラリを使用しています。" -#: ../../footer.rst:60 fdbaf044197a47369288f1a5a0bc21fc +#: ../../footer.rst:60 bd4e8b3283ae4bb3b28a33df47889855 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは、|version| までのすべてのバージョンをカバーしています" -#: ../../footer.rst:-1 d3477d763e534da1b09a79933be08403 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/shape.mo b/docs/locales/ja/LC_MESSAGES/shape.mo index 6bfefa651..1a5c68b28 100644 Binary files a/docs/locales/ja/LC_MESSAGES/shape.mo and b/docs/locales/ja/LC_MESSAGES/shape.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/shape.po b/docs/locales/ja/LC_MESSAGES/shape.po index d8b1907b1..dfeacacb6 100644 --- a/docs/locales/ja/LC_MESSAGES/shape.po +++ b/docs/locales/ja/LC_MESSAGES/shape.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,31 +19,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 e57d80dfa2e14b33aba2670462cc08e5 +#: ../../header.rst:-1 018e1dece6a441ab94af6c3cf54fe2ad msgid "Artifex" msgstr "" -#: ../../header.rst:-1 30c1e4bfdbbd45baa1fd67e3fe0ccb86 +#: ../../header.rst:-1 128d7b863b2446d2aae91e7677b5e304 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 7a4f5ba24f6f4b00aeb26c1e26cb795b +#: ../../header.rst:-1 9fae52a78aa64d129df2f344f6ece1cb msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../shape.rst:6 3fc06185144a497ebc0b87d4917b29c3 +#: ../../shape.rst:6 381674330cea486491db36b97473d432 msgid "Shape" msgstr "Shape(シェイプ)" -#: ../../shape.rst:8 7449542647c44f3f9aa777079a1d7aa0 +#: ../../shape.rst:8 bb103c2d3eac444c8d07a3f46988fd96 msgid "|pdf_only_class|" msgstr "" -#: ../../shape.rst:10 dd9c5186847f48e7a10e998838e05222 +#: ../../shape.rst:10 9a755d924c2b43c58eedf195fb5900ba msgid "" "This class allows creating interconnected graphical elements on a PDF " "page. Its methods have the same meaning and name as the corresponding " @@ -52,7 +52,7 @@ msgstr "" "このクラスは、PDFページ上で相互に接続されたグラフィカル要素を作成できるようにします。このクラスのメソッドは、対応する :ref:`Page` " "クラスのメソッドと同じ意味と名前を持っています。" -#: ../../shape.rst:12 b7d0be4ba0cb4ed9a48bd2f154da001f +#: ../../shape.rst:12 4f64857a3599459884faf14f8b620778 msgid "" "In fact, each :ref:`Page` draw method is just a convenience wrapper for " "(1) one shape draw method, (2) the :meth:`Shape.finish` method, and (3) " @@ -65,7 +65,7 @@ msgstr "" "メソッドの3つの要素の便利なラッパーです。ページテキストの挿入に関しては、:meth:`Shape.commit` " "メソッドのみが呼び出されます。ページで多くの描画およびテキスト操作を実行する場合、常にShapeオブジェクトの使用を検討することをお勧めします。" -#: ../../shape.rst:14 f1035b525f5d4cf492bf264e0f854f9d +#: ../../shape.rst:14 adf35b9492ef4032855dfaa78d362dd8 msgid "" "Several draw methods can be executed in a row and each one of them will " "contribute to one drawing. Once the drawing is complete, the " @@ -75,17 +75,18 @@ msgstr "" "このクラスのいくつかの描画メソッドは、連続して実行でき、それぞれが1つの描画に貢献します。描画が完了したら、:meth:`Shape.finish`" " メソッドを呼び出して色、破線、幅、変形などの属性を適用する必要があります。" -#: ../../shape.rst:16 98757e98e2f0413b9255abbba9e03681 +#: ../../shape.rst:16 3494f9eb3ba04f4b9ffbf7ca0ba7d291 msgid "" "**Draw** methods of this class (and :meth:`Shape.insert_textbox`) are " "logging the area they are covering in a rectangle (:attr:`Shape.rect`). " "This property can for instance be used to set " ":attr:`Page.cropbox_position`." -msgstr "このクラスの **描画** メソッド(および :meth:`Shape.insert_textbox` )は、カバーしている領域を矩形 " +msgstr "" +"このクラスの **描画** メソッド(および :meth:`Shape.insert_textbox` )は、カバーしている領域を矩形 " "(:attr:`Shape.rect`)で記録します。このプロパティは、:attr:`Page.cropbox_position` " "を設定するために使用できます。" -#: ../../shape.rst:18 b833ce200cf94bf58902e75b0370026c +#: ../../shape.rst:18 1704136564ac498fbd7ede0ae2550fd1 msgid "" "**Text insertions** :meth:`Shape.insert_text` and " ":meth:`Shape.insert_textbox` implicitly execute a \"finish\" and " @@ -98,292 +99,292 @@ msgstr "" ":meth:`Shape.commit` " "のみが必要です。その結果、両方のメソッドには色などのプロパティを制御するためのパラメータが含まれています。" -#: ../../shape.rst:21 591c38ce221049e0b020b90a40ab5804 +#: ../../shape.rst:21 1a21a95d30f24b0799fbe87aa6d636ef msgid "**Method / Attribute**" msgstr "**メソッド / 属性**" -#: ../../shape.rst:21 9da744581556405e98f8ed4d4e2895f5 +#: ../../shape.rst:21 c391fd059ff34f45a5de99fe97c82269 msgid "**Description**" msgstr "**説明**" -#: ../../shape.rst:23 81dce478097e4e65b506ef847a6b9b27 +#: ../../shape.rst:23 cf628d248d1d4006b5255ffeec4c0cea msgid ":meth:`Shape.commit`" msgstr "" -#: ../../shape.rst:23 797c2fc4bb0c4bd38f3ed72d9ab4c495 +#: ../../shape.rst:23 2dfad511b70842e89e20a6e1cc9d14e5 msgid "update the page's contents" msgstr "ページの内容を更新します" -#: ../../shape.rst:24 599bcc517c0b4c04bbb7d6853e52ac38 +#: ../../shape.rst:24 842848e63ed0452ba22c02b41cc1cfe6 msgid ":meth:`Shape.draw_bezier`" msgstr "" -#: ../../shape.rst:24 19dc1d4bcb9149fe88d349603460347f +#: ../../shape.rst:24 7c32f78177d24c4a8d925e253c57f458 msgid "draw a cubic Bezier curve" msgstr "キュービックベジエ曲線を描画します" -#: ../../shape.rst:25 ea818a34beaa4bf6a1a121c185eda5d8 +#: ../../shape.rst:25 f720cfd9b8c74cc9ac1aef6b3e9b1801 msgid ":meth:`Shape.draw_circle`" msgstr "" -#: ../../shape.rst:25 170bd5255b914c30962fcd8bd3e04244 +#: ../../shape.rst:25 7755ead8fb034deab2a273e832bc186d msgid "draw a circle around a point" msgstr "指定した点を中心に円を描画します" -#: ../../shape.rst:26 7bcae3341be041a6862f33c6482e391c +#: ../../shape.rst:26 2ad511029c0d4e0984e6b14e823614ad msgid ":meth:`Shape.draw_curve`" msgstr "" -#: ../../shape.rst:26 cc73a96a244c4d049e8716bfbf9a43ed +#: ../../shape.rst:26 60740e227103476b8fa72f47856dc277 msgid "draw a cubic Bezier using one helper point" msgstr "ヘルパーポイントを使用してキュービックベジエ曲線を描画します" -#: ../../shape.rst:27 5fc6ae89749440b689166658b5d2ff5f +#: ../../shape.rst:27 49ae1bd52d564b10bf2322d619fddf14 msgid ":meth:`Shape.draw_line`" msgstr "" -#: ../../shape.rst:27 8ad61e9b88124e05957e5039066603c4 +#: ../../shape.rst:27 473af9b1e31842b18446ac550f383e61 msgid "draw a line" msgstr "直線を描画します" -#: ../../shape.rst:28 99c6c6262de84e839ee5c9017b8c37b0 +#: ../../shape.rst:28 8d046f2f961d46c2b650de78be591821 msgid ":meth:`Shape.draw_oval`" msgstr "" -#: ../../shape.rst:28 7d3d9680f3b84a4dac70ea5c1189ff76 +#: ../../shape.rst:28 ca9546441256448f86d74d91457126b3 msgid "draw an ellipse" msgstr "楕円を描画します" -#: ../../shape.rst:29 0d623cea83aa44d48248e4f723c6fe79 +#: ../../shape.rst:29 9e37682670104047bf6c63de32f463a3 msgid ":meth:`Shape.draw_polyline`" msgstr "" -#: ../../shape.rst:29 cd12c32f55204efc97372d8663351e9c +#: ../../shape.rst:29 5125820ba65d44d681f9e47d501dabe7 msgid "connect a sequence of points" msgstr "一連の点を接続します" -#: ../../shape.rst:30 83e80715e29b427993c5a8e17d1fb4bd +#: ../../shape.rst:30 71d42594aaab45cca67df700b7c9d7dc msgid ":meth:`Shape.draw_quad`" msgstr "" -#: ../../shape.rst:30 59e734e4b6e14a8a93837db2cddc1bf4 +#: ../../shape.rst:30 d562d4d207ac4498a6ce6952f37bc599 msgid "draw a quadrilateral" msgstr "四角形を描画します" -#: ../../shape.rst:31 3d3e3ff7a8c04191bd70201a21137288 +#: ../../shape.rst:31 1801c26fba4f4cacb3c33a7fa296e084 msgid ":meth:`Shape.draw_rect`" msgstr "" -#: ../../shape.rst:31 5a08a890092147688031ef16538dc1d1 +#: ../../shape.rst:31 680d48d35ccc4fc5a11064f76750828b msgid "draw a rectangle" msgstr "長方形を描画します" -#: ../../shape.rst:32 4a355972f85a46919c1a334fabf69116 +#: ../../shape.rst:32 600ce0ff98d4423b8f432d99d82d9c83 msgid ":meth:`Shape.draw_sector`" msgstr "" -#: ../../shape.rst:32 aede3727bfd94e5f8af117b5916b5356 +#: ../../shape.rst:32 6ced41fc2d9a46b5acb562a554b4d344 msgid "draw a circular sector or piece of pie" msgstr "円形セクターまたはパイの一部を描画します" -#: ../../shape.rst:33 c11b21dad2864760b71675e43edf6f79 +#: ../../shape.rst:33 76a821083f544a3e87b3991d8069a957 msgid ":meth:`Shape.draw_squiggle`" msgstr "" -#: ../../shape.rst:33 c8f5eb331e17449cac15f33a85e0080c +#: ../../shape.rst:33 61922306fe554bb29612c3fda0a11dfc msgid "draw a squiggly line" msgstr "波線を描画します" -#: ../../shape.rst:34 ef07d8a437584e3690bd1708ad827289 +#: ../../shape.rst:34 7db3c5e50b114c09b2c417d5caae6404 msgid ":meth:`Shape.draw_zigzag`" msgstr "" -#: ../../shape.rst:34 2d4a8f213c29426490d9f7d4e787ec75 +#: ../../shape.rst:34 7fa4a57c88bb447ba56795ec0fc2112f msgid "draw a zigzag line" msgstr "ジグザグ線を描画します" -#: ../../shape.rst:35 7a3d49ef2d204338936ff13831a2c8cd +#: ../../shape.rst:35 c5ae0a703e38453da2b34e755b0dc2f7 msgid ":meth:`Shape.finish`" msgstr "" -#: ../../shape.rst:35 62f2af6677c24540a87180be41106300 +#: ../../shape.rst:35 1228c2a359044a3ebf7644c4ccfab931 msgid "finish a set of draw commands" msgstr "描画コマンドのセットを完了します" -#: ../../shape.rst:36 f12b9c34a47d4044a9f7487d78cb93bb +#: ../../shape.rst:36 3b28b7ad06bc4f0292c553e468e1b2c2 msgid ":meth:`Shape.insert_text`" msgstr "" -#: ../../shape.rst:36 94a4012828664dd5bdaa9a310dd87203 +#: ../../shape.rst:36 07d16e827e4a4f4b8d73876621a428c6 msgid "insert text lines" msgstr "テキスト行を挿入します" -#: ../../shape.rst:37 3e262535203e48539dd417710b8ec2fc +#: ../../shape.rst:37 d53402a799a14120992423087bb2af00 msgid ":meth:`Shape.insert_textbox`" msgstr "" -#: ../../shape.rst:37 302448bfb4cf4028966cf64e93769e67 +#: ../../shape.rst:37 5f6f5071cc7f40f596c69d28b717ed49 msgid "fit text into a rectangle" msgstr "テキストを長方形に合わせて挿入します" -#: ../../shape.rst:38 a56a57ea829a48cd8a9c533bc65bdb35 +#: ../../shape.rst:38 a0105f21813b4e81836706e03acc767d msgid ":attr:`Shape.doc`" msgstr "" -#: ../../shape.rst:38 edf6b014019149a5a4c1eb612c0bd6ca +#: ../../shape.rst:38 b2748d7f63764db5921266838f06413f msgid "stores the page's document" msgstr "ページのドキュメントを格納します" -#: ../../shape.rst:39 ea610bf82d804011a04011d97f8c9852 +#: ../../shape.rst:39 f8c540dd347b4c47b43237da9aab7110 msgid ":attr:`Shape.draw_cont`" msgstr "" -#: ../../shape.rst:39 42831deafc484b8d8abd9903cee54350 +#: ../../shape.rst:39 33dfa4702c5348e0b0cf9ac37ff61738 msgid "draw commands since last :meth:`Shape.finish`" msgstr ":meth:`Shape.finish` 以降の描画コマンドを格納します" -#: ../../shape.rst:40 a78a91b740f84ae7ab5f251db56e5c69 +#: ../../shape.rst:40 1603283bcf0a426ca085ee2f1a809e91 msgid ":attr:`Shape.height`" msgstr "" -#: ../../shape.rst:40 e2bcdfb3093b45799e127f1d8b5c39c8 +#: ../../shape.rst:40 96c2da7c0993440eb76059affb3693e0 msgid "stores the page's height" msgstr "ページの高さを格納します" -#: ../../shape.rst:41 09c1f7359ab4421491d06b3e27abe139 +#: ../../shape.rst:41 f55f24eec7c749f9bf7982ea314ba9ec msgid ":attr:`Shape.lastPoint`" msgstr "" -#: ../../shape.rst:41 05ac1f46f38c4a5eb619dff16ff35e11 +#: ../../shape.rst:41 4d00c8b41d2849c6a3b3d68d3288e080 msgid "stores the current point" msgstr "現在のポイントを格納します" -#: ../../shape.rst:42 aea5af88f36e46f6aac7fd6e9a4b79f5 +#: ../../shape.rst:42 5e47ab8e6a58442f9e47e327459da2a7 msgid ":attr:`Shape.page`" msgstr "" -#: ../../shape.rst:42 d3ca63e7108d48d38e95fcbf0bc473e8 +#: ../../shape.rst:42 a75ddc791a444d8b8ef228726c938199 msgid "stores the owning page" msgstr "所有するページを格納します" -#: ../../shape.rst:43 677643f6f19f48c9a4d7ef96e607e269 +#: ../../shape.rst:43 fafda77199424f20b6b1d16a0b4d8402 msgid ":attr:`Shape.rect`" msgstr "" -#: ../../shape.rst:43 d9589ff42ead4a469266e0ae6301eeb6 +#: ../../shape.rst:43 f5e628b8c6b74c178c91401e8bd52ece msgid "rectangle surrounding drawings" msgstr "描画を囲む長方形を格納します" -#: ../../shape.rst:44 b2ac52c4e4cc40c5b5a54db0f8a33dc0 +#: ../../shape.rst:44 254fffba560b4e02a1e7679719cecc94 msgid ":attr:`Shape.text_cont`" msgstr "" -#: ../../shape.rst:44 40359d4c93e54ff69902d60cb2b9a188 +#: ../../shape.rst:44 3e2d2ca68de146bba641dc74bf705109 msgid "accumulated text insertions" msgstr "累積テキスト挿入を格納します" -#: ../../shape.rst:45 624e74a1df584d4aab5f08bd44385083 +#: ../../shape.rst:45 9e7aa22b548e46d9882662109cd1ac9c msgid ":attr:`Shape.totalcont`" msgstr "" -#: ../../shape.rst:45 b1994c225dbd45139f9d384d4f1e9ecd +#: ../../shape.rst:45 63bbd838c69543c9953fdcd21fe3e112 msgid "accumulated string to be stored in :data:`contents`" msgstr ":data:`contents` に格納する累積文字列を格納します" -#: ../../shape.rst:46 c16fdd6a7fe34406b72a6afc975d5224 +#: ../../shape.rst:46 c9c8e88b45954d1db13934b73256f642 msgid ":attr:`Shape.width`" msgstr "" -#: ../../shape.rst:46 ee83384ca6f64c73b347e622119c1177 +#: ../../shape.rst:46 f996c217f46c4e4793158571db759310 msgid "stores the page's width" msgstr "ページの幅を格納します" -#: ../../shape.rst:49 6a44e57367704ae0ad5a2f3dd006a57f +#: ../../shape.rst:49 6ca9611372314acdb5c30f875dd234a7 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../shape.rst:55 b64270a719d14434bb9a502cdef78a0c +#: ../../shape.rst:55 daf39d44e6f842548c021bc6a003441f msgid "" -"Create a new drawing. During importing PyMuPDF, the *pymupdf.Page* object is" -" being given the convenience method *new_shape()* to construct a *Shape* " -"object. During instantiation, a check will be made whether we do have a " -"PDF page. An exception is otherwise raised." +"Create a new drawing. During importing PyMuPDF, the *pymupdf.Page* object" +" is being given the convenience method *new_shape()* to construct a " +"*Shape* object. During instantiation, a check will be made whether we do " +"have a PDF page. An exception is otherwise raised." msgstr "" "新しい描画を作成します。PyMuPDFをインポートする際、*pymupdf.Page* オブジェクトには *Shape* " "オブジェクトを構築するための便利なメソッド *new_shape()* " "が提供されます。インスタンス化中に、PDFページが存在するかどうかのチェックが行われます。それ以外の場合は例外が発生します。" -#: ../../shape.rst 044ed9b61dc54f51beef098b123024ba -#: 116fe4dec51243569538d6b4eb3da523 1c6e9ac490bf4db9ad5ff764b37fc33d -#: 480c9f8f24034eb0ba56ebadab00829f 4bebe99ad7a64afe8034b8cafee0d168 -#: 725a10efc1674c38a07f89cef5a9e4bc 76bef50c47274e7daabc987c94c2cf62 -#: 82789560977241ec96ede8312f4a7158 85dfd5f6003d4d4b886066459997bd2f -#: 91fcb6386671424687e844d9ebbca323 b6abaad56f354eb395aa73c637ad76ab -#: b7af0f756b9f49f7be1a14330409f16c e59d23ff9fc14297902c9cdb75ec05fc -#: fe24d1c8503f4277a1550cde7ce24864 +#: ../../shape.rst 0344d8b03c4d43379aa934bb728d9e1b +#: 0c3d5dc281034fb4aabde8c4402644d0 29a450161f314c58b94c998bcc170ee6 +#: 45242d1e66a6407da6673aea690e52d5 58b0fbaa4eed4d74804c550bd6813a96 +#: 6c6055b5058f43df9bc6d919c9b74c72 71b15eb6c56a43aa8013ebc34adfbf63 +#: 730fed20d2494ff4a215150825fba66f 7b8d9e79156a46e28f6f22664cfe0859 +#: c8182f23ef594e359385b3462aa525c7 c9f6359e10c64c5aa0733b9523e6442d +#: d3ecdef82f7c4314a60e67cc498a9a35 dd592056d7cf44dbb93253e88e1d2c5f +#: f82939868248420e862d3e43dc459be1 msgid "Parameters" msgstr "パラメータ" -#: ../../shape.rst:57 6ec97878c203420698d880cbb581bc69 +#: ../../shape.rst:57 bf986ce0d1ab430a96705a1bd95fe932 msgid "an existing page of a PDF document." msgstr "PDFドキュメントの既存のページ。" -#: ../../shape.rst:62 cc934f75d2194af982e066f82835aa80 +#: ../../shape.rst:62 71430add258e419ea1149741ed7690a3 msgid "Draw a line from :data:`point_like` objects *p1* to *p2*." msgstr ":data:`point_like` オブジェクト *p1* から *p2* への直線を描画します。" #: ../../shape.rst:64 ../../shape.rst:78 ../../shape.rst:114 -#: 0ea3439b94e2499d9598664a25eab85a 38100bf8f5c5476488e5d04edfd2448b -#: feb7cb1290f748c687f8f87bb3891aa7 +#: 05744df1d30740cab116956faefcf28a 8e3c898deab04d17b0c8362dfc4d832b +#: eb9c481ddd5845278390e459cab0b266 msgid "starting point" msgstr "開始点" #: ../../shape.rst:66 ../../shape.rst:80 ../../shape.rst:116 -#: 33413cb2f2594b9db1a602aba15beb62 522b39266ba04794a6d342208686aec3 -#: fae8e115b3f244f2b485b1a2be3c9097 +#: 2bb52c6f907f410b988c2a3e7b9cdc0c 3ced08a184a44628a97a8ad43a016890 +#: 530e250ba8fa42d885f4f8645ab52566 msgid "end point" msgstr "終了点" -#: ../../shape.rst 0836e1dd3e6a48619b97ba61b20f33c2 -#: 1809bce3344944a4bc5db9192b32d715 365e942bc254434bac9ba7f2731745e6 -#: 43845299f313489a9b551a3d50b9b356 540300eaaeb845f7a249dbc215f4b221 -#: 552cfb843bbe49cc929517c28e230ec3 57989926eec6430b9be5ab3f54470c24 -#: 5ea96f75fa4f420295a8ba49908a089a 6837eb3b7500463eaec9f908dbc3ff4f -#: 70f049124df64c2f9eb378b23ae1c2f8 959a48d2e866452f97ba9ef28081e327 -#: a0e93bbc6eda46e1818ee3c80ddb61c4 fe4166b7577a450c923d8e4b7a478f6b +#: ../../shape.rst 0fc351e28681472b93d5403c94845815 +#: 15a686e8ba8f48ec8b3e8c41c8356651 23d60f0d51fb416faa9d0c32cf9dd5ef +#: 3a022a7f49d444178b6dd7d05c238830 5cec1881c1b14c39b3ea8960178c8f42 +#: 62dfc618ab0f45999cbede6ea19740f0 7742f78d3a014e54b3c46420e69630ca +#: 8a82a532073d4d8a83825e4859fcd9c7 a2c6102297ec4afeb996b63d69fdceb3 +#: b7093980b2d944c88cd01250efa4fb89 ccd2af6fd29640f0b5194a714cad88ac +#: d24385f8e70b46c399a986b2390d15a2 eeacd55380d142c3abdfb5cd469ae77a msgid "Return type" msgstr "戻り値の型" #: ../../shape.rst:68 ../../shape.rst:84 ../../shape.rst:120 #: ../../shape.rst:129 ../../shape.rst:138 ../../shape.rst:157 #: ../../shape.rst:173 ../../shape.rst:185 ../../shape.rst:207 -#: ../../shape.rst:224 ../../shape.rst:233 ../../shape.rst:446 -#: 37981dba9918412cb6731d224af58d35 3fba6e7ca03a48d7b7f220b121150e1e -#: 47340a2ea0a840f7a25a26766dbfaca2 65bcfdc1f239428f966fd55c69306a75 -#: 81d66532961240cba4ceb346d92d8b8f 840555201d3140a0b028963211cf50ac -#: 84ef1ac7a9f84d66900971d63f92e8e2 87837f6c811e4fedbad0def12fa35bd6 -#: c34c4cd2bea84e2db28958171cab23a9 e4e5e01140b1427c837e0b1ee2fb8119 -#: f3f6204b835d43e99b9f5179c2eeca54 f9cc1443a4b646f0b18ce46165a5311e +#: ../../shape.rst:224 ../../shape.rst:233 ../../shape.rst:448 +#: 1b58bc37f8764e6e834ed23f0917baea 63a12950e1864d6bab5898a1405013e8 +#: 6b5788f47d2947b5a8cccc7388c4a116 7ae1384504d344ba8baf4d53f1b08eb6 +#: 955ff44bdb004f4795edb890845548d1 a20cd8902a3a49b48cbca81535493ee4 +#: b6c767db7d0c4db098de09b934246f35 c96a0c6c232c43329c3b2b7ace3a3a6a +#: d18f9ceaa34f43ae86575fa8ade29263 e3808bd25c2746da9685fc8674b7176e +#: f14f9e7e1d9d4d719808c0c4b5ff2853 fec99b56f0d84a5198f8ef024548eae6 msgid ":ref:`Point`" msgstr "" -#: ../../shape.rst 08e1395c8a454fdcb245a2c59377c2d3 -#: 21ed56c35e4c469b8633e4e3de77a5c7 43f0f70f66844d65a5696e48a78fdcc2 -#: 4a6e84eb0e934e9b88290b07818c7f0a 517bfcd810114528babd4b6799ee4583 -#: 5b68fbfdb2234390bba514ff8599b30d 6e593cdcae124e3d988e6f9be83d5b07 -#: 791cb4fc85614fc4b8f9aa498dd0e02b ac4e6ce4f6b14f59830d0600133b0989 -#: b26f595126ff4d28a46189a9da4b96ce e95a3d8046af466aacb6b6095ee99010 -#: fe10aeaa4fcf426aa155b69031b51646 fe6c117c17b44136a2ce7db8dbf2da47 +#: ../../shape.rst 0caf95a0197a4276bc649b06c814929a +#: 314d073507b04cb0a45542dc10587e08 3bea676ac87b42babc6445e56e70221f +#: 82da73693cd447e7bc97d2d625f7187f 852289fa50af4dd79ed85778bb7a369b +#: 890e8d0b301841eeae0f9f0c1c2e810e 8bf31fda79bc4df58878e5081d3ad417 +#: 8e11618a17c04d7993c45564b4237aa1 93f72db01bd645a8b864d76e8c660ea2 +#: 9410c6908d7144d993187fd1f1ca15d3 aa4a0cb35653433e9ba8c5a636a98b96 +#: c58c58a8146e4245a722a05ee08910b7 d53f15e6b09b41cc8f688ea90a0e6c8e msgid "Returns" msgstr "戻り値" #: ../../shape.rst:69 ../../shape.rst:85 ../../shape.rst:121 -#: 4168d39132384d759ac7e665af8617fb 71161da6f95f43f685e9198a12f270cc -#: ecc8145052444ee9b4fb89b19088b31d +#: 421086fb619843a3b6b48409bd47cd14 7a5e9c7cd5264bd6a8b5d25b60f5fc11 +#: fecec1332c2b408387d3f674e818e6da msgid "the end point, *p2*." msgstr "終了点 *p2*。" -#: ../../shape.rst:76 a82bf1bbfe8b4c169aa62b8174e261a3 +#: ../../shape.rst:76 1a37e804242b49268bb7ed3c9d14ad91 msgid "" "Draw a squiggly (wavy, undulated) line from :data:`point_like` objects " "*p1* to *p2*. An integer number of full wave periods will always be " @@ -397,7 +398,7 @@ msgstr "" "breadthです。必要に応じて幅パラメータが調整され、この条件を満たします。描かれる線は常に *p1* を離れる際に「左」に曲がり、*p2* " "には常に「右」から接続します。" -#: ../../shape.rst:82 7ded5479e71f474aad39ec8d3976afa3 +#: ../../shape.rst:82 923ab1d9473148a9ab31f184a6a584a8 msgid "" "the amplitude of each wave. The condition *2 * breadth < abs(p2 - p1)* " "must be true to fit in at least one wave. See the following picture, " @@ -406,13 +407,13 @@ msgstr "" "各波の振幅。条件 *2 * breadth < abs(p2 - p1)* " "が少なくとも1つの波に収まる必要があります。次の図は、1つの完全な周期で接続された2つの点を示しています。" -#: ../../shape.rst:89 584cf3eef7a4472fa67b5871ed9eb01e +#: ../../shape.rst:89 9b8e703ca91d45e5a834b3cd8a848ba0 msgid "" "Here is an example of three connected lines, forming a closed, filled " "triangle. Little arrows indicate the stroking direction." msgstr "以下は、閉じた塗りつぶされた三角形を形成する三つの連結した線の例です。小さな矢印はストロークの方向を示しています。" -#: ../../shape.rst:105 bb135d276837487fa85797c8f186689b +#: ../../shape.rst:105 2a9d364a83714aa4b2a4c721ced186c6 msgid "" "Waves drawn are **not** trigonometric (sine / cosine). If you need that, " "have a look at `draw.py `_ を参照してください。" -#: ../../shape.rst:112 f582ec127a6a4e7e9945d22391d6ee1a +#: ../../shape.rst:112 79f8c49c2f764ee8b79884b6f50aeb64 msgid "" "Draw a zigzag line from :data:`point_like` objects *p1* to *p2*. " "Otherwise works exactly like :meth:`Shape.draw_squiggle`." @@ -430,13 +431,13 @@ msgstr "" ":data:`point_like` オブジェクト *p1* から *p2* へジグザグのラインを描画します。それ以外は " ":meth:`Shape.draw_squiggle` とまったく同じです。" -#: ../../shape.rst:118 6da3ad87b0dc4cb8b16e3d4f4d86b79d +#: ../../shape.rst:118 b5f51c99711e46e5b64ed2eed6958f4f msgid "" "the amplitude of the movement. The condition *2 * breadth < abs(p2 - p1)*" " must be true to fit in at least one period." msgstr "動きの振幅。1つの周期に収まるように振幅を調整します。条件は *2 * breadth < abs(p2 - p1)* である必要があります。" -#: ../../shape.rst:125 a2ba486f8d124aa786251f65c558b7ff +#: ../../shape.rst:125 52bf058662e74078983e8223772541b2 msgid "" "Draw several connected lines between points contained in the sequence " "*points*. This can be used for creating arbitrary polygons by setting the" @@ -445,7 +446,7 @@ msgstr "" "シーケンス *points* " "に含まれるポイント間にいくつかの接続されたラインを描画します。これを使用して、最後のアイテムを最初のアイテムと等しく設定することで、任意の多角形を作成できます。" -#: ../../shape.rst:127 8f7ca218240c4a1c96e6df8077e9baa4 +#: ../../shape.rst:127 e4a75e7d084541d29d7e53d3b3a85d40 msgid "" "a sequence of :data:`point_like` objects. Its length must at least be 2 " "(in which case it is equivalent to *draw_line()*)." @@ -453,35 +454,36 @@ msgstr "" ":data:`point_like` オブジェクトのシーケンス。その長さは少なくとも2である必要があります(この場合、*draw_line()* " "と同等です)。" -#: ../../shape.rst:130 1a52b6e53aac495796eeab48f1eaef50 +#: ../../shape.rst:130 dc706f23c2e642acb4d2b337efebdbcf msgid "*points[-1]* -- the last point in the argument sequence." msgstr "引数シーケンスの最後のポイント、*points[-1]*。" -#: ../../shape.rst:134 6d9dbf3f6dc74f218232229fb5eb5be4 +#: ../../shape.rst:134 94915cd7d656485ab712766fbefe65a0 msgid "" "Draw a standard cubic Bézier curve from *p1* to *p4*, using *p2* and *p3*" " as control points." msgstr "*p1* から *p4* への標準的な立方ベジエ曲線を *p2*と *p3* を制御ポイントとして描画します。" -#: ../../shape.rst:136 fef3240c53a64834a43d7215422a10fd -msgid "All arguments are :data:`point_like` \\s." +#: ../../shape.rst:136 abc194380eb0469ab698b73d44a6c7e1 +#, fuzzy +msgid "All arguments are :data:`point_like` objects." msgstr "すべての引数は :data:`point_like` です。" -#: ../../shape.rst:139 3fc99e5fc5d74b05832affae3e7d3ffa +#: ../../shape.rst:139 df3f4add09ad4d1b8476f30749a58870 msgid "the end point, *p4*." msgstr "終了点 *p4*。" -#: ../../shape.rst:141 fa5c85c606364c62b1f44773a384be71 +#: ../../shape.rst:141 cfe360d7430b4ee49ab6d8e72ada1f60 msgid "" "The points do not need to be different -- experiment a bit with some of " "them being equal!" msgstr "ポイントは異なる必要はありません。一部のポイントが等しい場合も試してみてください!" -#: ../../shape.rst:143 74f0ab8c8d6b49ba8ae44b47deec4eb4 +#: ../../shape.rst:143 b2c7743deec640c9ad5acdf83ff1a1ac msgid "Example:" msgstr "例:" -#: ../../shape.rst:149 392231cd63ae4f35aea91ab03cc47d37 +#: ../../shape.rst:149 c052a7321ee5405383af52c987124aaf msgid "" "Draw an \"ellipse\" inside the given tetragon (quadrilateral). If it is a" " square, a regular circle is drawn, a general rectangle will result in an" @@ -489,27 +491,27 @@ msgid "" " the result." msgstr "指定された四角形(四辺形)内に「楕円」を描画します。正方形の場合、正円が描かれ、一般的な長方形は楕円になります。四角形が使用される場合、さまざまな形状が結果として得られる可能性があります。" -#: ../../shape.rst:151 c1ecb247783d43f2b243c300f67e9388 +#: ../../shape.rst:151 a268911c93934cbcb4f1633a0b218684 msgid "" "The drawing starts and ends at the middle point of the line `bottom-left " "-> top-left` corners in an anti-clockwise movement." msgstr "描画は、反時計回りの動きで、左下隅 -> 左上隅の中間点で開始し、終了します。" -#: ../../shape.rst:153 c87923669a30482e97f5a0898130d297 +#: ../../shape.rst:153 6f2a67e6d6e54928babf23e41c6e99f9 msgid "" ":data:`rect_like` or :data:`quad_like`. *Changed in version 1.14.5:* " "Quads are now also supported." msgstr "" -#: ../../shape.rst:153 79b87a82f0c247b284f0b0867ae79dcf +#: ../../shape.rst:153 80ab603331a444e1b025cca8f98e3ecb msgid ":data:`rect_like` or :data:`quad_like`." msgstr ":data:`rect_like` または :data:`quad_like`。" -#: ../../shape.rst:155 80e9f9c77fde408c8000078ba7147820 +#: ../../shape.rst:155 867809df376648158f4192f09600d70a msgid "*Changed in version 1.14.5:* Quads are now also supported." msgstr "*バージョン1.14.5で変更:* 四角形もサポートされるようになりました。" -#: ../../shape.rst:158 bdf3d8f6056641bfa6dc5ef4b59e18da +#: ../../shape.rst:158 0ab5658259fc4553ac0d8e6d5e00cf7d msgid "" "the middle point of line `rect.bl -> rect.tl`, or resp. `quad.ll -> " "quad.ul`. Look at just a few examples here, or at the *quad-show?.py* " @@ -518,7 +520,7 @@ msgstr "" "`rect.bl -> rect.tl` 、または `quad.ll -> quad.ul` の線の中間点。いくつかの例はこちら" "、またはPyMuPDF-Utilitiesリポジトリの *quad-show?.py* スクリプトをご覧ください。" -#: ../../shape.rst:165 f4bfe464b8b44931a709252c77e78121 +#: ../../shape.rst:165 7bb6769fb24847eeb01c8e0ecaa2b717 msgid "" "Draw a circle given its center and radius. The drawing starts and ends at" " point `center - (radius, 0)` in an **anti-clockwise** movement. This " @@ -527,7 +529,7 @@ msgstr "" "指定された中心と半径で円を描きます。描画は、**反時計回り** の動きで、ポイント `center - (radius, 0)` " "で始まり、終了します。このポイントは、包括的な正方形の左側の中央です。" -#: ../../shape.rst:167 6bd3d800e5564ce6840de8156d708039 +#: ../../shape.rst:167 ab0de5ea859b4c46bd7a1f2b2c268cae msgid "" "This is a shortcut for `draw_sector(center, start, 360, " "fullSector=False)`. To draw the same circle in a **clockwise** movement, " @@ -536,26 +538,26 @@ msgstr "" "これは `draw_sector(center, start, 360, fullSector=False)` " "のショートカットです。**時計回り** に同じ円を描画するには、度数として -360 を使用してください。" -#: ../../shape.rst:169 ../../shape.rst:199 48644b15d2df4de39c8af11fba01a5a8 -#: c8922970f29943349d39ac18c1eeba88 +#: ../../shape.rst:169 ../../shape.rst:199 25184682bdee4a01915a3f613857c445 +#: 7b7b826458df4968be6d68ef9404267a msgid "the center of the circle." msgstr "円の中心。" -#: ../../shape.rst:171 838d3e64ad36448481663070e4013723 +#: ../../shape.rst:171 4ab6628f120348338cfd839e2caec97e msgid "the radius of the circle. Must be positive." msgstr "円の半径。正である必要があります。" -#: ../../shape.rst:174 2d011ba17be043e8afb04d022f1bac24 +#: ../../shape.rst:174 b3b715f97c744370ae6a8b33746f9e82 msgid "" "`Point(center.x - radius, center.y)`. .. image:: images/img-drawcircle.*" " :scale: 60" msgstr "" -#: ../../shape.rst:174 3531aa2d94194aa5ba458adb72e5ffea +#: ../../shape.rst:174 df18f59ac1ae4314b11c396cb70c7aef msgid "`Point(center.x - radius, center.y)`." msgstr "" -#: ../../shape.rst:181 cbaeafddac454adeafa55d3bbf3082bd +#: ../../shape.rst:181 511f66677f4e420882ae96776e278623 msgid "" "A special case of *draw_bezier()*: Draw a cubic Bezier curve from *p1* to" " *p3*. On each of the two lines `p1 -> p2` and `p3 -> p2` one control " @@ -570,50 +572,50 @@ msgstr "" "の同じ側にあります。これにより、曲線の曲率が符号を変更しないことが保証されます。p2 " "へのラインが90度で交差する場合、結果の曲線は四分の楕円(同じ長さの場合は四半期の円)です。" -#: ../../shape.rst:183 bd3487c4cbe94397b89922897577777d +#: ../../shape.rst:183 9748056723164ca58a74b33be5b6411a msgid "All arguments are :data:`point_like`." msgstr "すべての引数は :data:`point_like` です。" -#: ../../shape.rst:186 08789d30f7434fe0819ac55958f5643a +#: ../../shape.rst:186 234e9aef5be6430fb813b740638d577d msgid "" "the end point, *p3*. The following is a filled quarter ellipse segment. " "The yellow area is oriented **clockwise:** .. image:: images/img-" "drawCurve.png :align: center" msgstr "" -#: ../../shape.rst:186 866f011a197d4fbeb05de4fce791b9fe +#: ../../shape.rst:186 ed67ce39c73141f7bef99dd5f7be27f8 msgid "" "the end point, *p3*. The following is a filled quarter ellipse segment. " "The yellow area is oriented **clockwise:**" msgstr "終点、p3。以下は塗りつぶされた四分の楕円セグメントです。黄色の領域は **時計回り** に向いています:" -#: ../../shape.rst:197 39708641ce3342ae85a05c000ae2da71 +#: ../../shape.rst:197 ef03f28841984ffbba41b5e2fe20fdfa msgid "" "Draw a circular sector, optionally connecting the arc to the circle's " "center (like a piece of pie)." msgstr "円のセクタを描き、必要に応じて円の中心に弧を接続します(パイの一片のように)。" -#: ../../shape.rst:201 53655f96c79b4e79b1596af8cae7b34a +#: ../../shape.rst:201 afa0d50a3544433a9163b5c5ee3d99fb msgid "" "one of the two end points of the pie's arc segment. The other one is " "calculated from the *angle*." msgstr "パイの弧セグメントの2つの端点のうちの1つ。*角度* から他の端点が計算されます。" -#: ../../shape.rst:203 641a3823fd8d43a79e6ad58f0c42fec3 +#: ../../shape.rst:203 2ba0911a96f24d80a6ac306a63eca16f msgid "" "the angle of the sector in degrees. Used to calculate the other end point" " of the arc. Depending on its sign, the arc is drawn anti-clockwise " "(positive) or clockwise." msgstr "その符号に応じて、弧は反時計回り(正の値)または時計回りに描かれます。" -#: ../../shape.rst:205 b59d497d53874a28b33de50183f37f6b +#: ../../shape.rst:205 122b93568c5b450fa88163aefad21cbd msgid "" "whether to draw connecting lines from the ends of the arc to the circle " "center. If a fill color is specified, the full \"pie\" is colored, " "otherwise just the sector." msgstr "弧の端点から円の中心に接続線を描くかどうか。塗りつぶし色が指定されている場合、完全な「パイ」が色付けされ、それ以外の場合はセクタのみが色付けされます。" -#: ../../shape.rst:208 a8544e6325d546bc984bd3b9152ac254 +#: ../../shape.rst:208 f9dcd56f8974458e9bf8d1a15d5ee000 msgid "" "the other end point of the arc. Can be used as starting point for a " "following invocation to create logically connected pies charts. Examples:" @@ -621,27 +623,27 @@ msgid "" "drawSector2.*" msgstr "" -#: ../../shape.rst:208 20f44f28e94345bfa7558e6ffe048a02 +#: ../../shape.rst:208 68c46ca6da57482980a202d477b5fd12 msgid "" "the other end point of the arc. Can be used as starting point for a " "following invocation to create logically connected pies charts. Examples:" msgstr "弧のもう一方の端点。論理的に接続されたパイチャートを作成するための次の呼び出しの開始点として使用できます。以下は例です:" -#: ../../shape.rst:217 22d570a8daaa482d855f52f37fcc599d +#: ../../shape.rst:217 0c89141549574512807fbd5c4e278bec msgid "Changed in v1.22.0: Added parameter *radius*." msgstr "変更された v1.22.0 で:パラメーター *radius* が追加されました。" -#: ../../shape.rst:219 9f5e2d165d0c4fc1bcd63b947e3603d9 +#: ../../shape.rst:219 be1f7880d3ec44fca8aa6a24374c872f msgid "" "Draw a rectangle. The drawing starts and ends at the top-left corner in " "an anti-clockwise movement." msgstr "長方形を描画します。描画は、上部左隅から反時計回りの動きで始まり、終了します。" -#: ../../shape.rst:221 663fcb8f97cf45449a87ef39c4ef60e0 +#: ../../shape.rst:221 b78e9eda24364a62af777390e749a6b9 msgid "where to put the rectangle on the page." msgstr "ページ上の長方形の配置先。" -#: ../../shape.rst:222 0a5d40b969094759b5cbfe6c381f4043 +#: ../../shape.rst:222 0cc3ff19e41642c9937661c081a02ca6 #, python-format msgid "" "draw rounded rectangle corners. If not `None`, specifies the radius of " @@ -659,11 +661,11 @@ msgstr "" "円で描画します。タプル `(rx, ry)` が指定された場合、曲線は水平および垂直方向に対して非対称です。`radius=(0.5, 0.5)`" " は楕円を描画します。" -#: ../../shape.rst:225 7d151ce7a1234a60b358baaae7732328 +#: ../../shape.rst:225 02c20e94c630475e86d69b1eaad41a90 msgid "top-left corner of the rectangle." msgstr "長方形の上部左隅。" -#: ../../shape.rst:229 a7ef34c047b1413dae067a4a126ce0ed +#: ../../shape.rst:229 bfc2aa459e2a4c03870479ad9826f5d9 msgid "" "Draw a quadrilateral. The drawing starts and ends at the top-left corner " "(:attr:`Quad.ul`) in an anti-clockwise movement. It is a shortcut of " @@ -672,27 +674,29 @@ msgstr "" "四角形を描画します。描画は、上部左隅 (:attr:`Quad.ul`) から反時計回りの動きで始まり、終了します。これは " ":meth:`Shape.draw_polyline` の引数 `(ul, ll, lr, ur, ul)` を使用したショートカットです。" -#: ../../shape.rst:231 6dcf95e7e3194715a3a4cccca97ecf87 +#: ../../shape.rst:231 6a0f2c584dcd41839d0c24fa7f7ece37 msgid "where to put the tetragon on the page." msgstr "ページ上の四角形の配置先。" -#: ../../shape.rst:234 cd9333a8a93b4fcdbf996328006ba60a +#: ../../shape.rst:234 a5da49f4b1dd40e58397116799e42ee1 msgid ":attr:`Quad.ul`." msgstr "" -#: ../../shape.rst:253 479fa08025fa43f3add9e7b7b09d0783 +#: ../../shape.rst:253 364f28a6b68a4d219e3f51a173d9726c msgid "" "Finish a set of *draw*()* methods by applying :ref:`CommonParms` to all " "of them." msgstr "次の *draw*()* メソッドの一連の描画を、:ref:`CommonParms` をそれらすべてに適用して終了します。" -#: ../../shape.rst:255 3de3a70892cd4b10ab133dd272c35edc +#: ../../shape.rst:255 a1ac1faf1bdd4405a81f62ad68fc6d3c msgid "" "It has **no effect on** :meth:`Shape.insert_text` and " ":meth:`Shape.insert_textbox`." -msgstr ":meth:`Shape.insert_text` および :meth:`Shape.insert_textbox` には **影響を与えません**。" +msgstr "" +":meth:`Shape.insert_text` および :meth:`Shape.insert_textbox` には " +"**影響を与えません**。" -#: ../../shape.rst:257 ea77304b9f574db38ddf2e9b1e6f897e +#: ../../shape.rst:257 6d42cc4751ff4c48bf35e9b50be52e4d msgid "" "The method also supports **morphing the compound drawing** using " ":ref:`Point` *fixpoint* and :ref:`matrix` *matrix*." @@ -700,50 +704,50 @@ msgstr "" "このメソッドは、:ref:`Point` *fixpoint* と :ref:`matrix` *matrix* を使用して、テキストまたは " "**複合描画を変形させること** もサポートしています。" -#: ../../shape.rst:259 4f3d6bb95e424bdabe2b4c677fe9baca +#: ../../shape.rst:259 7064330070ff4e5d91f9040e379f3789 msgid "" "morph the text or the compound drawing around some arbitrary :ref:`Point`" " *fixpoint* by applying :ref:`Matrix` *matrix* to it. This implies that " "*fixpoint* is a **fixed point** of this operation: it will not change its" -" position. Default is no morphing (*None*). The matrix can contain any " +" position. Default is no morphing (``None``). The matrix can contain any " "values in its first 4 components, *matrix.e == matrix.f == 0* must be " "true, however. This means that any combination of scaling, shearing, " "rotating, flipping, etc. is possible, but translations are not." msgstr "" "テキストまたは複合描画を、任意の :ref:`Point` *fixpoint* に :ref:`Matrix` *matrix* " "を適用して変形します。これにより、*fixpoint* はこの操作の **固定ポイント** " -"であることを意味します。その位置は変わりません。デフォルトは変形なし(*None*)です。ただし、matrixの最初の4つの成分には任意の値を含めることができ、*matrix.e" +"であることを意味します。その位置は変わりません。デフォルトは変形なし(``None``)です。ただし、matrixの最初の4つの成分には任意の値を含めることができ、*matrix.e" " == matrix.f == 0* " "である必要があります。これは、スケーリング、シアリング、回転、反転など、移動以外の組み合わせが可能であることを意味しますが、移動はできません。" -#: ../../shape.rst:261 98c1c54b95ba4e8d9f9e7cdf88da74cd +#: ../../shape.rst:261 a1d25d306f2b466c93662943e5d2e5a8 msgid "" "*(new in v1.18.1)* set transparency for stroke colors. Value < 0 or > 1 " "will be ignored. Default is 1 (intransparent)." msgstr "*(v1.18.1で新規追加)* ストロークの透明度を設定します。値が0未満または1を超える場合は無視されます。デフォルトは1(不透明)です。" -#: ../../shape.rst:262 c0ab8325d0c146daa7fe5abe809469ef +#: ../../shape.rst:262 eed144cc0b8746d79c86a027b0a1bdf6 msgid "" "*(new in v1.18.1)* set transparency for fill colors. Default is 1 " "(intransparent)." msgstr "*(v1.18.1で新規追加)* 塗りつぶしの色の透明度を設定します。デフォルトは1(不透明)です。" -#: ../../shape.rst:264 873af1b9323f486d8e120697d4a4234b +#: ../../shape.rst:264 7b63bc7f52d0491d8d6933c6da2b991f msgid "" "request the **\"even-odd rule\"** for filling operations. Default is " -"*False*, so that the **\"nonzero winding number rule\"** is used. These " -"rules are alternative methods to apply the fill color where areas " +"``False``, so that the **\"nonzero winding number rule\"** is used. These" +" rules are alternative methods to apply the fill color where areas " "overlap. Only with fairly complex shapes a different behavior is to be " "expected with these rules. For an in-depth explanation, see " ":ref:`AdobeManual`, pp. 137 ff. Here is an example to demonstrate the " "difference." msgstr "" -"塗りつぶし操作に対して **「even-oddルール」** を要求します。デフォルトは *False* で、したがって " +"塗りつぶし操作に対して **「even-oddルール」** を要求します。デフォルトは ``False`` で、したがって " "**「非ゼロのワインディング数ルール」** " "が使用されます。これらのルールは、領域が重なる場所で塗りつぶし色を適用するための代替メソッドです。複雑な形状では、これらのルールに異なる振る舞いが期待されることはほとんどありません。詳細な説明については、:ref:`AdobeManual`" " の137ページ以降を参照してください。以下はその違いを示す例です。" -#: ../../shape.rst:266 47487db140b54be59e29aad225eb75a0 +#: ../../shape.rst:266 7d4e6214fc3849a2985181d0b2e2058e msgid "" "*(new in v1.18.4)* the :data:`xref` number of an :data:`OCG` or " ":data:`OCMD` to make this drawing conditionally displayable." @@ -751,11 +755,11 @@ msgstr "" "*(v1.18.4で新規追加)* この描画を条件付きで表示可能にする :data:`OCG` または :data:`OCMD` の " ":data:`xref` 番号。" -#: ../../shape.rst:270 20bed66077a5494db15f66081458b4d6 +#: ../../shape.rst:270 a0093bcedd2c41a2a7f8a4c0506a33b8 msgid "For each pixel in a shape, the following will happen:" msgstr "各ピクセルの場合、以下のことが起こります:" -#: ../../shape.rst:272 93b9a6d9c85f49fb8f759c3e891177ed +#: ../../shape.rst:272 18afdc3a67564cd3855e90c36be5d1fc msgid "" "Rule **\"even-odd\"** counts, how many areas contain the pixel. If this " "count is **odd,** the pixel is regarded **inside** the shape, if it is " @@ -764,7 +768,7 @@ msgstr "" "ルール **「even-odd」** は、ピクセルを含むエリアの数をカウントします。このカウントが **奇数** の場合、ピクセルは形状の " "**内部** と見なされ、偶数の場合は **外部** と見なされます。" -#: ../../shape.rst:274 ffafc420f46f4db1a944024e45accda7 +#: ../../shape.rst:274 ba4fbbd8420b44c286ecbac807b6b5ca msgid "" "The default rule **\"nonzero winding\"** in addition looks at the " "*\"orientation\"* of each area containing the pixel: it **adds 1** if an " @@ -776,7 +780,7 @@ msgstr "" "も考慮されます。エリアが反時計回りに描かれている場合は **1を追加し** 、時計回りのエリアは **1を引きます** " "。結果がゼロの場合、ピクセルは **外部** と見なされ、非ゼロのカウントを持つピクセルは形状の **内部** と見なされます。" -#: ../../shape.rst:276 7205b75506a3450ca14fc9fefcd22c55 +#: ../../shape.rst:276 1b87591000934e71bcba26ceb5aee7c3 msgid "" "Of the four shapes in above image, the top two each show three circles " "drawn in standard manner (anti-clockwise, look at the arrows). The lower " @@ -787,11 +791,12 @@ msgstr "" "上記の画像の4つの形状のうち、上の2つはそれぞれ標準的な方法で描かれた3つの円を示しています(反時計回り、矢印を参照)。下の2つの形状には時計回りに描かれた1つ(左上)の円が含まれています。右の列では、エリアの方向は無視されることがわかります" "(even-oddルール)。" -#: ../../shape.rst:296 4dfd356b16614ee4b1c2341f63699c36 -msgid "Insert text lines start at *point*." +#: ../../shape.rst:297 27b4efd177f04bd58c4f071741d5b26d +#, fuzzy +msgid "Insert text lines starting at ``point``." msgstr "テキスト行を *point* で開始します。" -#: ../../shape.rst:298 242333ffaf9d41558c64389869435d9b +#: ../../shape.rst:299 21d9cb7b2ed148a9b60492a9aedda427 msgid "" "the bottom-left position of the first character of *text* in pixels. It " "is important to understand, how this works in conjunction with the " @@ -800,7 +805,7 @@ msgid "" "possible cases. .. image:: images/img-inserttext.* :scale: 33" msgstr "" -#: ../../shape.rst:298 491638a70df9427e99b3ec20195c752d +#: ../../shape.rst:299 c40df0e9c77d4e6e87a91795ff8f09c3 msgid "" "the bottom-left position of the first character of *text* in pixels. It " "is important to understand, how this works in conjunction with the " @@ -811,11 +816,12 @@ msgstr "" "テキストの最初の文字の下部左位置(ピクセル単位)。*rotate* " "パラメータとの連携方法を理解することが重要です。以下の画像をご覧ください。小さな赤い点は、各ケースでの *point* の位置を示しています。" -#: ../../shape.rst:303 79f8cb2b5d7f4cdfba3be26191319185 +#: ../../shape.rst:304 6876d7284d7749eb8c8154d720a23813 +#, fuzzy msgid "" "the text to be inserted. May be specified as either a string type or as a" -" sequence type. For sequences, or strings containing line breaks *\\n*, " -"several lines will be inserted. No care will be taken if lines are too " +" sequence type. For sequences, or strings containing line breaks ``\\n``," +" several lines will be inserted. No care will be taken if lines are too " "wide, but the number of inserted lines will be limited by \"vertical\" " "space on the page (in the sense of reading direction as established by " "the *rotate* parameter). Any rest of *text* is discarded -- the return " @@ -826,24 +832,24 @@ msgstr "" "パラメータによって確立される読み取り方向の意味で)によって制限されます。*テキスト* " "の残り部分は破棄されますが、戻りコードには挿入された行数が含まれます。" -#: ../../shape.rst:305 ../../shape.rst:344 2ab5913014e044a79c11078c00f3cc33 -#: 7f91e147f4184497842ac4473d9fbb04 +#: ../../shape.rst:306 ../../shape.rst:346 2ddd62ce504f4fdab2ec95f2e7b90943 +#: 74e3e3ef15434f58906434885ecf4282 msgid "" "a factor to override the line height calculated from font properties. If " "not `None`, a line height of `fontsize * lineheight` will be used." msgstr "" -"フォントのプロパティから計算された行の高さをオーバーライドするためのファクター。*None* でない場合、`fontsize * " +"フォントのプロパティから計算された行の高さをオーバーライドするためのファクター。``None`` でない場合、`fontsize * " "lineheight` の行の高さが使用されます。" -#: ../../shape.rst:306 7af1fa28042b4c7eb7ed893811d57b53 +#: ../../shape.rst:307 bcb42a1a18294564b272ac80287e3f5b msgid "" "*(new in v1.18.1)* set transparency for stroke colors (the **border " "line** of a character). Only `0 <= value <= 1` will be considered. " "Default is 1 (intransparent)." msgstr "*(v1.18.1で新規追加)* ストロークの透明度を設定します。値が0未満または1を超える場合は無視されます。デフォルトは1(不透明)です。" -#: ../../shape.rst:307 ../../shape.rst:349 3ee703420a8b4dfbb2aaf70b8df55b74 -#: 6fa5b4f8fced45bba38357e6538d2957 +#: ../../shape.rst:308 ../../shape.rst:351 78dc8d3116ba485c9d068583bc0deb49 +#: ed0aa08d38b64a99a38c604475e5ab10 msgid "" "*(new in v1.18.1)* set transparency for fill colors. Default is 1 " "(intransparent). Use this value to control transparency of the text " @@ -853,7 +859,7 @@ msgstr "" "塗りつぶしカラーの透明度を設定します。デフォルトは1(不透明)です。テキストカラーの透明度を制御するためにこの値を使用します。ストロークの透明度は文字の境界線に" " **のみ** 影響します。" -#: ../../shape.rst:309 b9dd4a26f86e429db702de9161c8a8d4 +#: ../../shape.rst:310 31070b0b7e5b4bcf835147bdee366b06 msgid "" "determines whether to rotate the text. Acceptable values are multiples of" " 90 degrees. Default is 0 (no rotation), meaning horizontal text lines " @@ -871,8 +877,8 @@ msgstr "" "に表示されます。いずれの場合も、pointは最初の文字の矩形の左下の座標を指定します。存在する場合、複数行は常にこのパラメータによって確立された読み取り方向に従います。したがって、" " *rotate = 180* の場合、行2は行1の **上に** 配置されます。" -#: ../../shape.rst:311 ../../shape.rst:353 8c087df06df44888b26ce053885b81cd -#: c6031122c2fa4144937123dc50d5252e +#: ../../shape.rst:312 ../../shape.rst:355 00187385dc1f4841bfa53a9d811dd79a +#: 637e2ddab242428ea8f57d2059584df5 msgid "" "*(new in v1.18.4)* the :data:`xref` number of an :data:`OCG` or " ":data:`OCMD` to make this text conditionally displayable." @@ -880,16 +886,16 @@ msgstr "" "*(v1.18.4 新機能)* :data:`OCG` または :data:`OCMD` の :data:`xref` " "番号、テキストを条件付きで表示可能にするためのものです。" -#: ../../shape.rst:314 e09d54645f894b1bb8a59467c3c2aad4 +#: ../../shape.rst:315 454a6660578a4891948c63e1c5b52d5c msgid "number of lines inserted." msgstr "挿入された行数。" -#: ../../shape.rst:316 ../../shape.rst:365 1bde4cef93ae4f73b0c7e0e357f46f1f -#: a3bb035332504787a57e9da8f7c5cec1 +#: ../../shape.rst:317 ../../shape.rst:367 9d122c97f6c14ba4b71b6ff10e4330d0 +#: e82c82e616404ab399b088e67162d600 msgid "For a description of the other parameters see :ref:`CommonParms`." msgstr "他のパラメータの説明については :ref:`CommonParms` を参照してください。" -#: ../../shape.rst:336 794903fab7c94fb49d67e41aadd587bc +#: ../../shape.rst:338 f42ebad5ca1c429d86307b7f655ba863 msgid "" "PDF only: Insert text into the specified rectangle. The text will be " "split into lines and words and then filled into the available space, " @@ -899,18 +905,18 @@ msgstr "" "PDFのみ:指定された矩形にテキストを挿入します。テキストは行と単語に分割され、*回転* " "に応じて異なる矩形の角から始まり、利用可能なスペースに挿入されます。行送りと複数のスペースは尊重されます。" -#: ../../shape.rst:338 bcaee0738c374483b00225a48722f5e0 +#: ../../shape.rst:340 bdb0bfe831814187852bc2c1cda74b81 msgid "the area to use. It must be finite and not empty." msgstr "使用する領域。有限でかつ空でなければなりません。" -#: ../../shape.rst:340 61187f27cdd6456dab13c463a9a90552 +#: ../../shape.rst:342 09e7231558844204a9827cccc8d0e053 msgid "" "the text to be inserted. Must be specified as a string or a sequence of " "strings. Line breaks are respected also when occurring in a sequence " "entry." msgstr "挿入するテキスト。文字列または文字列のシーケンスとして指定する必要があります。シーケンスエントリ内の行送りも尊重されます。" -#: ../../shape.rst:342 75e9810b48f54eb1b0e1730f2df793e3 +#: ../../shape.rst:344 c3d7974b47a64e6a9ce2e15fcc08da02 msgid "" "align each text line. Default is 0 (left). Centered, right and justified " "are the other supported options, see :ref:`TextAlign`. Please note that " @@ -921,33 +927,33 @@ msgstr "" ":ref:`TextAlign` を参照してください。なお、パラメータ値 *TEXT_ALIGN_JUSTIFY* " "の効果は、「シンプル」(単一バイト)フォント(:ref:`Base-14-Fonts` を含む)でのみ達成できます。" -#: ../../shape.rst:344 69db2364802c4ea2b9419997e36cb2f8 +#: ../../shape.rst:346 d614c8ee637141b8b8e8f6dc6ca7c7f3 msgid "" "a factor to override the line height calculated from font properties. If " "not `None`, a line height of `fontsize * lineheight` will be used. :arg " "int expandtabs: controls handling of tab characters ``\\t`` using the " "`string.expandtabs()` method **per each line**." msgstr "" -"フォントのプロパティから計算された行の高さをオーバーライドするためのファクター。*None* でない場合、`fontsize * " +"フォントのプロパティから計算された行の高さをオーバーライドするためのファクター。``None`` でない場合、`fontsize * " "lineheight` の行の高さが使用されます。" -#: ../../shape.rst 3e64df83212640489ff329b94812a9b7 +#: ../../shape.rst 48c5f8c0b32044499211dabdb7f87407 msgid "arg int expandtabs" msgstr "" -#: ../../shape.rst:346 f45ff7eeeac04c00a579dc0e3d952100 +#: ../../shape.rst:348 6028a7be9acd4b54896401c02aae1f59 msgid "" "controls handling of tab characters ``\\t`` using the " "`string.expandtabs()` method **per each line**." msgstr "タブ文字 *\\t* の処理を **行ごとに** *string.expandtabs()* メソッドを使用して制御します。" -#: ../../shape.rst:348 910bbad22f3947279c9416642437df87 +#: ../../shape.rst:350 bc65023b0ad24de89efdb0e3d5028fea msgid "" "*(new in v1.18.1)* set transparency for stroke colors. Negative values " "and values > 1 will be ignored. Default is 1 (intransparent)." msgstr "*(v1.18.1で新たに追加)* ストロークカラーの透明度を設定します。負の値や1より大きい値は無視されます。デフォルトは1(不透明)です。" -#: ../../shape.rst:351 e855aac0316b4c18b64668b9cfb4cf7d +#: ../../shape.rst:353 f97c73f6c3504030b80fd487a11fe8ee msgid "" "requests text to be rotated in the rectangle. This value must be a " "multiple of 90 degrees. Default is 0 (no rotation). Effectively, the four" @@ -962,7 +968,7 @@ msgstr "" "テキストを矩形内で回転させるように要求します。受け入れ可能な値は90度の倍数です。デフォルトは0(回転なし)、つまり左から右への水平なテキスト行です。180は、右から左に逆さまに表示されることを意味します。90は反時計回りの回転で、テキストは上に向かって表示されます。270(または-90)は時計回りの回転で、テキストは下に向かって表示されます。いずれの場合も、pointは最初の文字の矩形の左下の座標を指定します。複数行がある場合は、常にこのパラメータで確立された読み取り方向に従います。したがって、rotate" " = 180の場合、行2は行1の上に配置されますなど。" -#: ../../shape.rst:356 6d210d0b5c484d00874fc8feb0c098c6 +#: ../../shape.rst:358 ae409af6e5bf482d9ca9c1480823156f msgid "" "**If positive or zero**: successful execution. The value returned is the " "unused rectangle line space in pixels. This may safely be ignored -- or " @@ -972,7 +978,7 @@ msgid "" "amount, etc." msgstr "" -#: ../../shape.rst:357 f01eabb394704d618bb2bef1fa441771 +#: ../../shape.rst:359 10b55cdb24e441a881c9aa12c4beae3c msgid "" "**If positive or zero**: successful execution. The value returned is the " "unused rectangle line space in pixels. This may safely be ignored -- or " @@ -981,7 +987,7 @@ msgstr "" "**正またはゼロの場合** " ":正常な実行。返される値は使用されていない矩形行のスペース(ピクセル単位)です。これを安全に無視するか、矩形を最適化したり、後続のアイテムの位置を調整したりするために使用できます。" -#: ../../shape.rst:359 ba81abb961284f7bbb3c6962a1e2c37a +#: ../../shape.rst:361 8dc52497077b4262840bf6aeb868aaf7 msgid "" "**If negative**: no execution. The value returned is the space deficit to" " store text lines. Enlarge rectangle, decrease *fontsize*, decrease text " @@ -990,7 +996,7 @@ msgstr "" "**負の場合**: " "実行なし。返される値はテキスト行を格納するためのスペース不足です。矩形を拡大したり、フォントサイズを減少させたり、テキストの量を減少させたりする必要があります。" -#: ../../shape.rst:373 061c0fe28165472faf612a1386c1a108 +#: ../../shape.rst:375 3da0ea4708304e5e885f32ac75cc200f msgid "" "Update the page's :data:`contents` with the accumulated drawings, " "followed by any text insertions. If text overlaps drawings, it will be " @@ -999,17 +1005,17 @@ msgstr "" "ページの :data:`contents` " "を蓄積された描画に更新し、その後テキスト挿入が続きます。テキストが描画と重なる場合、テキストは描画の上に書き込まれます。" -#: ../../shape.rst:375 4eec0dfd46b74883ade8573ffedb72ee +#: ../../shape.rst:377 50890cf6faf0493a8045890157cad2f2 msgid "**Do not forget to execute this method:**" msgstr "**このメソッドを実行しないことは忘れないでください:**" -#: ../../shape.rst:377 5680ecdf3664454b8cf3ebed5f71675a +#: ../../shape.rst:379 0f8cf27d8dba4f6e88f93d6eff91f99a msgid "" "If a shape is **not committed, it will be ignored and the page will not " "be changed!**" msgstr "シェイプが **確定されていない** 場合、無視され、ページは変更されません!" -#: ../../shape.rst:379 b14b66f2634145459dd63ea9a5168a4b +#: ../../shape.rst:381 560de3610cb3427d9412f8cc6853aa96 msgid "" "The method will reset attributes :attr:`Shape.rect`, :attr:`lastPoint`, " ":attr:`draw_cont`, :attr:`text_cont` and :attr:`totalcont`. Afterwards, " @@ -1019,7 +1025,7 @@ msgstr "" "、:attr:`text_cont` 、および :attr:`totalcont` をリセットします。その後、シェイプオブジェクトは " "**同じページ** で再利用できます。" -#: ../../shape.rst:381 a77c531d185048c5aa7761f4869df4f7 +#: ../../shape.rst:383 b541e686a7c946f88bf7c19567ce734c msgid "" "determine whether to put content in foreground (default) or background. " "Relevant only, if the page already has a non-empty :data:`contents` " @@ -1028,48 +1034,48 @@ msgstr "" "コンテンツを前面(デフォルト)または背面に配置するかどうかを決定します。ページに既存の非空の :data:`contents` " "オブジェクトがある場合のみ関連します。" -#: ../../shape.rst:383 4102fc0ee7984fcea99c1c78580286fe +#: ../../shape.rst:385 417137176c1747349405bb4c8fb61d9e msgid "**---------- Attributes ----------**" msgstr "**属性**" -#: ../../shape.rst:387 99ddde5b4cc94e75a7eb9c3d24bc6793 +#: ../../shape.rst:389 c557cfbcf2f5406785ebfecd3ff1517d msgid "For reference only: the page's document." msgstr "参照専用:ページの文書。" -#: ../../shape.rst 32afa27f3bf04d7f984fbb28b2bf7aee -#: 55f41ef3a1c046c18b86203dfad776eb 83edda7ea70d468585cdf3e31e7f7caf -#: 8fe2f3ccea0d4ce384afe7fda7a0b23d 98cbe108d036456ea484446d9bebf1fb -#: a3f963527ebe470285ae29c8d59537b4 cdb7761a6f99461590c43865bfc3e120 -#: f5dd7d214f574f0ba1806f8309a945c0 ff154b7724d240bba4095ed925ce9bf8 +#: ../../shape.rst 72dfcd7fdae74f0880ab6f19f03d79f3 +#: 75b9e1ec876b4c59b07c5dcbdff62368 92b486749825470baeb632a9e37cd261 +#: b4f1769a752a4ba6bd469beb607218b6 c74d2d1ea9114c13be6e38bcd1deaedd +#: cbb0122317594386aa3583478c51ccbb dc6264da761a4a01be4fee79a0ce1530 +#: f47148b8f0f54ef9814d48e915f313d3 faa5a76a189a44e1a494982fef691804 msgid "type" msgstr "" -#: ../../shape.rst:389 fefd41600fd94ca58759dbe8646b5e3e +#: ../../shape.rst:391 8f30cd32df5144ecabb231437d577390 msgid ":ref:`Document`" msgstr "" -#: ../../shape.rst:393 b11529e166864f83b690b417d9473b00 +#: ../../shape.rst:395 052570a11eaf408dba57d40ce4bd42e3 msgid "For reference only: the owning page." msgstr "参照専用:所属するページ。" -#: ../../shape.rst:395 9c57fd6b59254ff5bc024144531abec6 +#: ../../shape.rst:397 bd6c0fb240c3475f8d56114a6361aec6 msgid ":ref:`Page`" msgstr "" -#: ../../shape.rst:399 5528f7487c4c4ce79b7a39a26f0efb1a +#: ../../shape.rst:401 186223be5f2746f2bd7a53ef45c0de4b msgid "Copy of the page's height" msgstr "ページの高さのコピー" -#: ../../shape.rst:401 ../../shape.rst:407 07e40f084c6840d6a748ab86ff326798 -#: 8725d2a59b244d7584185bbef599e637 +#: ../../shape.rst:403 ../../shape.rst:409 02408bc4f3ee46d19b1416484e8f620f +#: de7be7acb7a2493ba3556bdcc870858e msgid "float" msgstr "" -#: ../../shape.rst:405 1711d5b2ce5047f0a2977f013d0e8d09 +#: ../../shape.rst:407 ebae5c5e7d8e46b9945ee984eb26c40b msgid "Copy of the page's width." msgstr "ページの幅のコピー。" -#: ../../shape.rst:411 ca465f3e341646528c948cff59f4caa0 +#: ../../shape.rst:413 114df7efef35486aaf928cdf01433f06 msgid "" "Accumulated command buffer for **draw methods** since last finish. Every " "finish method will append its commands to :attr:`Shape.totalcont`." @@ -1077,13 +1083,13 @@ msgstr "" "最後のfinish以降の **描画メソッド** の蓄積コマンドバッファ。各finishメソッドはそのコマンドを " ":attr:`Shape.totalcont` に追加します。" -#: ../../shape.rst:413 ../../shape.rst:419 ../../shape.rst:440 -#: 1225867c718845c99dce645b31f524f6 54be04abfd8b43e5871e5f5e71abcf67 -#: 72b16281b187445daab82daf99e65592 +#: ../../shape.rst:415 ../../shape.rst:421 ../../shape.rst:442 +#: 47b843e7f65b45599993773e6ac9633f 5b0ee611bc9944578ef034e8972116de +#: dd6362698b114520b7e7e5fde7c5c15b msgid "str" msgstr "" -#: ../../shape.rst:417 f6c103df4f174e078a842dd6bace5ac4 +#: ../../shape.rst:419 502c94c6d1e44c3a86ac39a68eae9b6e msgid "" "Accumulated text buffer. All **text insertions** go here. This buffer " "will be appended to :attr:`totalcont` :meth:`Shape.commit`, so that text " @@ -1092,21 +1098,21 @@ msgstr "" "蓄積されたテキストバッファ。すべての **テキスト挿入** はここに行われます。このバッファは :attr:`totalcont` " ":meth:`Shape.commit` に追加されるため、テキストは同じShape内の描画に覆われることはありません。" -#: ../../shape.rst:423 8617cf7127a34a3c951c4d6e5823832f +#: ../../shape.rst:425 4f0bb106df03415f9b6577b73441283a msgid "" "Rectangle surrounding drawings. This attribute is at your disposal and " -"may be changed at any time. Its value is set to *None* when a shape is " +"may be changed at any time. Its value is set to ``None`` when a shape is " "created or committed. Every *draw** method, and " ":meth:`Shape.insert_textbox` update this property (i.e. **enlarge** the " "rectangle as needed). **Morphing** operations, however " "(:meth:`Shape.finish`, :meth:`Shape.insert_textbox`) are ignored." msgstr "" -"描画を囲む矩形。この属性はあなたの自由に使用でき、いつでも変更できます。シェイプが作成または確定されたとき、その値は *None* " +"描画を囲む矩形。この属性はあなたの自由に使用でき、いつでも変更できます。シェイプが作成または確定されたとき、その値は ``None`` " "に設定されます。すべての *draw** メソッド、および :meth:`Shape.insert_textbox` " "はこのプロパティを更新します(必要に応じて矩形を **拡大します** )。ただし、**変形** 操作(:meth:`Shape.finish` " "、:meth:`Shape.insert_textbox` )は無視されます。" -#: ../../shape.rst:425 ae6025f75a5b47029daa140fa7412530 +#: ../../shape.rst:427 38a94eb2a3d1477297299e30ee252c32 msgid "" "A typical use of this attribute would be setting " ":attr:`Page.cropbox_position` to this value, when you are creating shapes" @@ -1117,35 +1123,35 @@ msgstr "" "この属性の典型的な使用法は、後でまたは外部で使用するためにシェイプを作成する場合、:attr:`Page.cropbox_position` " "をこの値に設定することです。自分で属性を操作していない場合、これはこれまでのすべての描画を含む矩形を反映するはずです。" -#: ../../shape.rst:427 0324ea2a0b864dde82d03056f9cdb4f4 +#: ../../shape.rst:429 a19cb45e3df843b3a6de4431f84f8b8b msgid "" "If you have used morphing and need a rectangle containing the morphed " "objects, use the following code::" msgstr "変形を使用し、変形されたオブジェクトを含む矩形が必要な場合、次のコードを使用します::" -#: ../../shape.rst:434 36a0fbd226c54e898909170daf625a62 +#: ../../shape.rst:436 b60123de550c459ebe674a33061d914d msgid ":ref:`Rect`" msgstr "" -#: ../../shape.rst:438 7c1295d463304ea18c7e743b427ad9b9 +#: ../../shape.rst:440 639b459c8c9e4fc59336542f53e2dcf6 msgid "" "Total accumulated command buffer for draws and text insertions. This will" " be used by :meth:`Shape.commit`." msgstr "描画およびテキスト挿入のための累積コマンドバッファです。これは :meth:`Shape.commit` で使用されます。" -#: ../../shape.rst:444 ef7ba1c57b9d49529edb66f05018ab09 +#: ../../shape.rst:446 f379fa92dfa14418bbfb0066162c4c98 msgid "" -"For reference only: the current point of the drawing path. It is *None* " -"at *Shape* creation and after each *finish()* and *commit()*." +"For reference only: the current point of the drawing path. It is ``None``" +" at *Shape* creation and after each *finish()* and *commit()*." msgstr "" "参照用: 描画パスの現在のポイントです。*Shape* の作成時、および各 *finish()* および *commit()* の後には " -"*None* です。" +"``None`` です。" -#: ../../shape.rst:449 b063528504f44cf2bc3c18e9b327694b +#: ../../shape.rst:451 68e74a764b3e4f6588f5ebe441234fb5 msgid "Usage" msgstr "使用法" -#: ../../shape.rst:450 fff4c1ed12954d75be239a553334b3d6 +#: ../../shape.rst:452 23e835b27a204f62b14890d069805e61 msgid "" "A drawing object is constructed by *shape = page.new_shape()*. After " "this, as many draw, finish and text insertions methods as required may " @@ -1155,7 +1161,7 @@ msgstr "" "drawingオブジェクトは `shape = page.new_shape()` " "によって構築されます。その後、必要なだけ多くのdraw、finish、およびテキスト挿入メソッドが続きます。描画をコミットする前に、各描画シーケンスを終了する必要があります。全体のコーディングパターンは次のようになります::" -#: ../../shape.rst:469 51dcf0e2c8a54223b3a3c38fcabf5a89 +#: ../../shape.rst:471 d5d9c1a5034648cc8101ab7a0e65864c msgid "" "Each *finish()* combines the preceding draws into one logical shape, " "giving it common colors, line width, morphing, etc. If *closePath* is " @@ -1165,7 +1171,7 @@ msgstr "" "各 *finish()* メソッドは、前の描画を1つの論理的なシェイプに結合し、共通の色、線の幅、変形などを設定します。*closePath* " "が指定されている場合、最後の描画のエンドポイントを最初の描画のスタートポイントと接続します。" -#: ../../shape.rst:471 6dc24b7f3aea40a79f7891e774e77488 +#: ../../shape.rst:473 90e44675158d407da4757ba07618d637 msgid "" "To successfully create compound graphics, let each draw method use the " "end point of the previous one as its starting point. In the above pseudo " @@ -1180,7 +1186,7 @@ msgstr "" "を次の描画のスタートポイントとして使用すべきです。そうしないと、自動的に新しいパスが開始され、*finish()* " "が期待どおりに動作しないかもしれません(ただし、エラーは発生しません)。" -#: ../../shape.rst:473 fecd1b050c8c48f79c4b33d86302afa0 +#: ../../shape.rst:475 5a61a171cfc3491cb0fa6eeba8b2d5f6 msgid "" "Text insertions may occur anywhere before the commit (they neither touch " ":attr:`Shape.draw_cont` nor :attr:`Shape.lastPoint`). They are appended " @@ -1191,32 +1197,32 @@ msgstr "" ":attr:`Shape.lastPoint` に触れません)。テキストは直接 *Shape.totalcont* に追加されますが、描画は " "*Shape.finish* によって追加されます。" -#: ../../shape.rst:475 4b03967c288d4df7ba6a5bb2ed873a00 +#: ../../shape.rst:477 670a1cb6aa2c4c2aa8b788488c536db9 msgid "" "Each *commit* takes all text insertions and shapes and places them in " "foreground or background on the page -- thus providing a way to control " "graphical layers." msgstr "各 *コミット* は、すべてのテキスト挿入とシェイプをページの前面または背面に配置し、グラフィックのレイヤーを制御する方法を提供します。" -#: ../../shape.rst:477 c95f2bff4b374a5bac11ccd418f1ffa0 +#: ../../shape.rst:479 a4c94b4f025b4fadaeeeebd9edc9b98e msgid "" "**Only** *commit* **will update** the page's contents, the other methods " "are basically string manipulations." msgstr "*コミット* **のみ** がページのコンテンツを **更新します**。他のメソッドは基本的に文字列の操作です。" -#: ../../shape.rst:480 70f819d389d94cdf99b4f183ec7dc277 +#: ../../shape.rst:482 8aacff8ea21148919dd04fa1d299c172 msgid "Examples" msgstr "例" -#: ../../shape.rst:481 a60a164312594c9c8e454f96a3406d4f +#: ../../shape.rst:483 964370dcb4584792a7ae853f1d28eda4 msgid "Create a full circle of pieces of pie in different colors::" msgstr "異なる色のピースを使用して円形のパイを作成します::" -#: ../../shape.rst:496 fab920f3e6d04d8e92ebe9f548c990dd +#: ../../shape.rst:498 23300cd759d04ae6abe72244b0352624 msgid "Here is an example for 5 colors:" msgstr "以下は5つの色の例です。" -#: ../../shape.rst:500 8e1f4d7a5b1b48669226f9734a65cc77 +#: ../../shape.rst:502 238f06ee4d584097a15bd69c62785b32 msgid "" "Create a regular n-edged polygon (fill yellow, red border). We use " "*draw_sector()* only to calculate the points on the circumference, and " @@ -1225,23 +1231,23 @@ msgstr "" "正則なn角形を作成します(塗りつぶしは黄色、赤い境界線)。周囲の点を計算するために *draw_sector()* " "を使用し、多角形を描く前に描画コマンドバッファを空にします::" -#: ../../shape.rst:515 f2a2b70a5d28429b86e0755acf3e0369 +#: ../../shape.rst:517 a3792a9bc841403395cc4d611b2812a3 msgid "Here is the polygon for n = 7:" msgstr "n = 7の場合の多角形は次のとおりです:" -#: ../../shape.rst:522 b53d66070cba43ca85211dd11bac0935 +#: ../../shape.rst:524 986f4d507f434bbcb5352c0ed5a04c58 msgid "Common Parameters" msgstr "共通パラメータ" -#: ../../shape.rst:524 58ee9aa4176340dfb4b97f985199475c +#: ../../shape.rst:526 5472904b466548fd95e4eaec7af7c2ae msgid "**fontname** (*str*)" msgstr "" -#: ../../shape.rst:526 56d6bfc85cf14fa5b6e68a33dc84c56a +#: ../../shape.rst:528 4f689138fcdc4c379a757bdaefa8f288 msgid "In general, there are three options:" msgstr "一般的に、3つのオプションがあります:" -#: ../../shape.rst:528 e51fc17194d74384b32fbb5601fa99c9 +#: ../../shape.rst:530 734f639f27364f9193df03ba4e43a927 msgid "" "Use one of the standard :ref:`Base-14-Fonts`. In this case, *fontfile* " "**must not** be specified and *\"Helvetica\"* is used if this parameter " @@ -1250,19 +1256,19 @@ msgstr "" "標準の :ref:`Base-14-Fonts` のいずれかを使用します。この場合、*fontfile* を指定 " "**してはいけず**、このパラメータを省略した場合は *「Helvetica」* が使用されます。" -#: ../../shape.rst:529 076f1cab2e4c4961b589f6506f9dda85 +#: ../../shape.rst:531 4bb743b9400f4cb3b4c058155229d8b0 msgid "" "Choose a font already in use by the page. Then specify its **reference** " "name prefixed with a slash \"/\", see example below." msgstr "既にページで使用されているフォントを選択します。その場合、スラッシュ「/」で前置された **参照** 名を指定します。以下の例を参照してください。" -#: ../../shape.rst:530 89721438240245a69b9de199c68348e8 +#: ../../shape.rst:532 9a34626d11aa4bd99f76d99bb78fdf3d msgid "" "Specify a font file present on your system. In this case choose an " "arbitrary, but new name for this parameter (without \"/\" prefix)." msgstr "システムに存在するフォントファイルを指定します。この場合、任意の新しい名前をこのパラメータに選択します(「/」接頭辞なし)。" -#: ../../shape.rst:532 fbd120f732d640b1981a2951f2adab21 +#: ../../shape.rst:534 918b82d861b2402f886d07411b40bc87 msgid "" "If inserted text should re-use one of the page's fonts, use its reference" " name appearing in :meth:`Page.get_fonts` like so:" @@ -1270,7 +1276,7 @@ msgstr "" "挿入されるテキストがページのフォントの1つを再利用する場合は、:meth:`Page.get_fonts` " "に表示される参照名を次のように使用します:" -#: ../../shape.rst:534 85f3720923004fdca382ecfce7969abb +#: ../../shape.rst:536 dfe633ea91224f2aa9387d0763aaa162 msgid "" "Suppose the font list has the item *[1024, 0, 'Type1', 'NimbusMonL-Bold'," " 'R366']*, then specify *fontname = \"/R366\", fontfile = None* to use " @@ -1279,11 +1285,11 @@ msgstr "" "フォントリストに項目 *[1024, 0, 'Type1', 'NimbusMonL-Bold', 'R366']* がある場合、フォント " "*NimbusMonL-Bold* を使用するには、*fontname = \"/R366\"、fontfile = None* と指定します。" -#: ../../shape.rst:538 1a3a3ef1ea6941c0a408ac631a6154d4 +#: ../../shape.rst:540 c39dca28731f4fd685c0d91492e3fab5 msgid "**fontfile** (*str*)" msgstr "" -#: ../../shape.rst:540 b0e31664a4274db28ffc06d2a37634e9 +#: ../../shape.rst:542 cf3e42d6c7e44c25824830b2b65b5228 msgid "" "File path of a font existing on your computer. If you specify *fontfile*," " make sure you use a *fontname* **not occurring** in the above list. This" @@ -1295,11 +1301,11 @@ msgstr "" "を使用してください。この新しいフォントは、*doc.save()* " "時にPDFに埋め込まれます。画像と同様に、フォントファイルは1度だけ埋め込まれます。バイナリフォントコンテンツのMD5コードのテーブルが使用され、これを確実にします。" -#: ../../shape.rst:544 07b4c565ec4b4e21bd5ef31f4de5a7bd +#: ../../shape.rst:546 76ee746f05ec4244850466e311f99f6a msgid "**set_simple** (*bool*)" msgstr "" -#: ../../shape.rst:546 8fa035a2eef7420c8234e7290efc2757 +#: ../../shape.rst:548 39388630281e4d3f8da8c16273609972 msgid "" "Fonts installed from files are installed as **Type0** fonts by default. " "If you want to use 1-byte characters only, set this to true. This setting" @@ -1308,58 +1314,59 @@ msgstr "" "ファイルからインストールされたフォントは、デフォルトで **Type0** " "フォントとしてインストールされます。1バイト文字のみを使用する場合は、これをtrueに設定します。この設定は元に戻すことはできません。後続の変更は無視されます。" -#: ../../shape.rst:550 6addfcea631449379702c07a401fe4a7 +#: ../../shape.rst:552 af3166520c274206a13e1a0baec46874 msgid "**fontsize** (*float*)" msgstr "" -#: ../../shape.rst:552 73d4a3cd987740829893064bf36591cb +#: ../../shape.rst:554 1ba19903918d47b38a64022ab307ad6e msgid "Font size of text, see: :data:`fontsize`." msgstr "テキストのフォントサイズ、参照: :data:`fontsize`。" -#: ../../shape.rst:556 844452660f5c423d87d615a97fba8f20 +#: ../../shape.rst:558 f957a4a2dc5d4c7a93af1aad1141e348 msgid "**dashes** (*str*)" msgstr "" -#: ../../shape.rst:558 a3eec3bb02694b81886177b2e5f747a6 +#: ../../shape.rst:560 fbae07e8952e47748a176d1270430476 +#, fuzzy msgid "" "Causes lines to be drawn dashed. The general format is `\"[n m] p\"` of " -"(up to) 3 floats denoting pixel lengths. `n` is the dash length, `m` " -"(optional) is the subsequent gap length, and `p` (the \"phase\" - " +"(up to) 3 floats denoting pixel lengths. ``n`` is the dash length, ``m`` " +"(optional) is the subsequent gap length, and ``p`` (the \"phase\" - " "**required**, even if 0!) specifies how many pixels should be skipped " -"before the dashing starts. If `m` is omitted, it defaults to `n`." +"before the dashing starts. If ``m`` is omitted, it defaults to ``n``." msgstr "" "線を破線で描画するようにします。一般的なフォーマットは、ピクセル長を示す(最大)3つの浮動小数点数の `\"[n m] p\"` です。``n``" " は破線の長さ、``m`` (オプション)はその後のギャップの長さ、 ``p`` (「位相」 - 0であっても " "**必須**!)は、破線が開始される前にスキップするべきピクセルの数を指定します。``m`` が省略された場合、``n`` " "にデフォルト値が設定されます。" -#: ../../shape.rst:560 44a7f6106abb480f81343e60ee03b8ac +#: ../../shape.rst:562 6cc3d9bdb9f549d8a8ecc425ae21919b msgid "" -"A continuous line (no dashes) is drawn with `\"[] 0\"` or *None* or " +"A continuous line (no dashes) is drawn with `\"[] 0\"` or ``None`` or " "`\"\"`. Examples:" -msgstr "連続線(破線なし)は `\"[] 0\"` または *None* または `\"\"` で描画されます。例:" +msgstr "連続線(破線なし)は `\"[] 0\"` または ``None`` または `\"\"` で描画されます。例:" -#: ../../shape.rst:562 9ec528764f5d4e5ea0e47e347742060a +#: ../../shape.rst:564 5b2f1471a3364bce88db1d174bd4a4b7 msgid "" "Specifying `\"[3 4] 0\"` means dashes of 3 and gaps of 4 pixels following" " each other." msgstr "`\"[3 4] 0\"` を指定すると、3ピクセルの破線と4ピクセルのギャップが交互に続きます。" -#: ../../shape.rst:563 8403699f211e42298624ecef3ec953c3 +#: ../../shape.rst:565 1e6f67ef2c174d5286313f74014b814b msgid "`\"[3 3] 0\"` and `\"[3] 0\"` do the same thing." msgstr "`\"[3 3] 0\"` と `\"[3] 0\"` は同じことをします。" -#: ../../shape.rst:565 32b83964c9574e789f29963f0bd92965 +#: ../../shape.rst:567 a9823d7b0b0747d28c07e9f1eff08a97 msgid "" "For (the rather complex) details on how to achieve sophisticated dashing " "effects, see :ref:`AdobeManual`, page 217." msgstr "洗練された破線効果を実現する詳細な詳細については、:ref:`AdobeManual` の217ページを参照してください。" -#: ../../shape.rst:569 5cfa40e2a7fc4afe893e9c17ec923999 +#: ../../shape.rst:571 d1a553e173a7429a857f65045ab0e437 msgid "**color / fill** (*list, tuple*)" msgstr "**色/塗りつぶし** (*リスト、タプル*)" -#: ../../shape.rst:571 7dd0034f618e40f5ab7fc4ac03923f69 +#: ../../shape.rst:573 14330946fd1a4d8a996f6b2c28063ded msgid "" "Stroke and fill colors can be specified as tuples or list of of floats " "from 0 to 1. These sequences must have a length of 1 (GRAY), 3 (RGB) or 4" @@ -1372,24 +1379,24 @@ msgstr "" "の代わりに単一の浮動小数点数を使用することもできます。このパラメータを受け入れるには、(デフォルト)を受け入れるか、または使用しないようにするには" " `None` を使用します。" -#: ../../shape.rst:573 fa6309e61b87459da1eb7a3939d397a9 +#: ../../shape.rst:575 e816f8b5d9ff430080ae997838786774 msgid "" -"To simplify color specification, method *getColor()* in *pymupdf.utils* may " -"be used to get predefined RGB color triples by name. It accepts a string " -"as the name of the color and returns the corresponding triple. The method" -" knows over 540 color names -- see section :ref:`ColorDatabase`." +"To simplify color specification, method *getColor()* in *pymupdf.utils* " +"may be used to get predefined RGB color triples by name. It accepts a " +"string as the name of the color and returns the corresponding triple. The" +" method knows over 540 color names -- see section :ref:`ColorDatabase`." msgstr "" "色の指定を簡略化するために、*pymupdf.utils* の *getColor()* " "メソッドを使用して、名前に対応するRGBカラートリプルを取得することができます。これは色の名前を指定する文字列を受け入れ、対応するトリプルを返します。このメソッドは540以上のカラー名を認識します。:ref:`ColorDatabase`" " のセクションを参照してください。" -#: ../../shape.rst:575 0df48aef57604b7a9cfab88ff5e29916 +#: ../../shape.rst:577 4635acc9d7694796a3bc9ae29886a5a0 msgid "" "Please note that the term *color* usually means \"stroke\" color when " "used in conjunction with fill color." msgstr "ご注意ください。*色* という用語は、通常、塗りつぶし色と組み合わせて使用される場合に「線の」色を意味します" -#: ../../shape.rst:577 749d231e02744faa8364d3fc307c5a64 +#: ../../shape.rst:579 36458f858b744fa89c1376aadea2059d msgid "" "If letting default a color parameter to `None`, then no resp. color " "selection command will be generated. If *fill* and *color* are both " @@ -1401,37 +1408,42 @@ msgstr "" "`None` の場合、描画には色の指定が含まれません。ただし、まだ「ストローク」されているため、Adobe " "Acrobatや他のビューアではPDFのデフォルトカラー「ブラック」が使用されます。" -#: ../../shape.rst:581 9437d653286a47388bada1d6d5d32a3a +#: ../../shape.rst:583 76a445577e6041a8849d1d50652d57f6 #, fuzzy msgid "**width** (*float*)" msgstr "**border_width** (*浮動小数点数*)" -#: ../../shape.rst:583 61092b48bb3a4e34b040299150c393c5 +#: ../../shape.rst:585 537fca23f709435493eb732dae3268ee msgid "" "The stroke (\"border\") width of the elements in a shape (if applicable)." " The default value is 1. The values width, color and fill have the " "following relationship / dependency:" msgstr "図形内の要素のストローク(\"枠線\")の幅(適用可能な場合)。デフォルト値は1です。幅、色、塗りつぶしの値は、以下の関係/依存関係を持ちます:" -#: ../../shape.rst:585 7254c9a8a9ca4a08b673c5030f0c2eea +#: ../../shape.rst:587 fa7a5177ae0449e187b82327743f7456 msgid "" "If `fill=None` shape elements will always be drawn with a border - even " "if `color=None` (in which case black is taken) or `width=0` (in which " "case 1 is taken)." -msgstr "`fill=None` の場合、shape要素は常に枠線で描画されます - `color=None` の場合(その場合、黒が使用されます)、または `width=0` の場合(その場合、1が使用されます)でもです。" +msgstr "" +"`fill=None` の場合、shape要素は常に枠線で描画されます - `color=None` " +"の場合(その場合、黒が使用されます)、または `width=0` の場合(その場合、1が使用されます)でもです。" -#: ../../shape.rst:586 e5e06a2a4f4e46f99b4ff35935d0b5ef +#: ../../shape.rst:588 cd5cc59d1028404fbfed2f24e33410ae +#, fuzzy msgid "" "Shapes without border can only be achieved if a fill color is specified " "(which may be white of course). To achieve this, specify `width=0`. In " -"this case, the `color` parameter is ignored." -msgstr "枠線のない図形は、塗りつぶしの色が指定されている場合のみ実現できます(もちろん白色であっても構いません)。これを実現するには、 `width=0` を指定します。この場合、 `color` パラメータは無視されます。" +"this case, the ``color`` parameter is ignored." +msgstr "" +"枠線のない図形は、塗りつぶしの色が指定されている場合のみ実現できます(もちろん白色であっても構いません)。これを実現するには、 `width=0`" +" を指定します。この場合、 `color` パラメータは無視されます。" -#: ../../shape.rst:590 a09f147da27e45b7b9357f93a0e630d7 +#: ../../shape.rst:592 382ccf96c5aa4181a4572f714e062247 msgid "**stroke_opacity / fill_opacity** (*floats*)" msgstr "**stroke_opacity / fill_opacity** (*浮動小数点数*)" -#: ../../shape.rst:592 f623f27b7daa41e086d707f4bf80067d +#: ../../shape.rst:594 ae70a471fc0d48c2a59637f8b31a6a24 msgid "" "Both values are floats in range [0, 1]. Negative values or values > 1 " "will ignored (in most cases). Both set the transparency such that a value" @@ -1440,33 +1452,34 @@ msgid "" "border and fill opacity to its interior." msgstr "両方の値は[0、1]の範囲の浮動小数点数です。負の値または1を超える値は(ほとんどの場合)無視されます。両方の値は、透明度を設定し、たとえば値0.5は50%の透明度を示し、0は不可視を意味し、1は不透明を意味します。たとえば四角形の場合、stroke_opacityはその境界に、fill_opacityはその内部に適用されます。" -#: ../../shape.rst:594 4885f53f6854480e929b750fd387b50a +#: ../../shape.rst:596 a8bb91c0072541a9b37e3e6a62caa30f +#, fuzzy msgid "" "For text insertions (:meth:`Shape.insert_text` and " ":meth:`Shape.insert_textbox`), use *fill_opacity* for the text. At first " "sight this seems surprising, but it becomes obvious when you look further" -" down to *render_mode*: *fill_opacity* applies to the yellow and " -"*stroke_opacity* applies to the blue color." +" down to `render_mode`: `fill_opacity` applies to the yellow and " +"`stroke_opacity` applies to the blue color." msgstr "" "テキストの挿入(:meth:`Shape.insert_text` および :meth:`Shape.insert_textbox` " ")の場合、テキストには *fill_opacity* を使用してください。最初は驚くかもしれませんが、*render_mode* " "の詳細を見ると明らかになります。*fill_opacity* は黄色に適用され、*stroke_opacity* は青色に適用されます。" -#: ../../shape.rst:598 4f72471a531c440d9d010e3cdc4ab4e7 +#: ../../shape.rst:600 641a78de051a437995282b57d04de9aa msgid "**border_width** (*float*)" msgstr "**border_width** (*浮動小数点数*)" -#: ../../shape.rst:600 36652b125fc0468c8e7a9dec95fa9c66 +#: ../../shape.rst:602 92a8ccb5633243f2ad24f12364e68cd8 msgid "" "Set the border width for text insertions. New in v1.14.9. Relevant only " "if the render mode argument is used with a value greater zero." msgstr "テキスト挿入の境界線の幅を設定します。v1.14.9で新しく追加されました。render_mode引数がゼロより大きい値で使用されている場合にのみ関連します。" -#: ../../shape.rst:604 f13936cba68b43e2b68efc8ffca30490 +#: ../../shape.rst:606 abbf4573c17a4e30ac45792ace4f3a6e msgid "**render_mode** (*int*)" msgstr "**render_mode** (*整数*)" -#: ../../shape.rst:606 aae76111227749deb8d9dfc7b11da0a5 +#: ../../shape.rst:608 c584ddf8b2d84f64979c15dc82edee5e msgid "" "*New in version 1.14.9:* Integer in `range(8)` which controls the text " "appearance (:meth:`Shape.insert_text` and :meth:`Shape.insert_textbox`). " @@ -1478,7 +1491,7 @@ msgstr "" ":meth:`Shape.insert_textbox` )を制御します。:ref:`AdobeManual` " "のページ246を参照してください。バージョン1.14.9での新機能です。これらのメソッドは、塗りつぶしの色とストロークの色を区別するようになりました。" -#: ../../shape.rst:608 c935c84ab88f4090ae62c31ecba95b4f +#: ../../shape.rst:610 59add67dd81245e68a70f2404603f6a6 msgid "" "For default 0, only the text fill color is used to paint the text. For " "backward compatibility, using the *color* parameter instead also works." @@ -1486,7 +1499,7 @@ msgstr "" "デフォルト値0では、テキストの塗りつぶし色のみがテキストを塗りつぶすために使用されます。*color* " "パラメーターを代わりに使用することも、後方互換性のために機能します。" -#: ../../shape.rst:609 20cf9304948c46f7bf9aa05655099f12 +#: ../../shape.rst:611 32bac19a29a941d3beb40151ca36f18a msgid "" "For render mode 1, only the border of each glyph (i.e. text character) is" " drawn with a thickness as set in argument *border_width*. The color " @@ -1496,7 +1509,7 @@ msgstr "" "render_mode 1では、各グリフ(つまりテキスト文字)の境界線のみが指定された *border_width* " "で描画されます。この際、*color* 引数で選択した色が使用され、*fill* パラメーターは無視されます。" -#: ../../shape.rst:610 59208cac9cd64a558797a0ba7c8c2b25 +#: ../../shape.rst:612 6777a1d7af8447e094630286981c6652 msgid "" "For render mode 2, the glyphs are filled and stroked, using both color " "parameters and the specified border width. You can use this value to " @@ -1508,36 +1521,84 @@ msgstr "" "**太字のテキスト** をシミュレートするためにこの値を使用できます。*fill* と *color* " "に同じ値を選択し、*border_width* に適切な値を選択します。" -#: ../../shape.rst:611 d41176fb06fa43db9023d930c30b5b7d +#: ../../shape.rst:613 8a1b88179e55472dbef190b87e299a07 msgid "" "For render mode 3, the glyphs are neither stroked nor filled: the text " "becomes invisible." msgstr "render_mode 3では、グリフはストロークも塗りつぶしもされません。テキストは見えなくなります。" -#: ../../shape.rst:613 93dc8b530e6f47089df0c9935f290eab +#: ../../shape.rst:615 c89121f9821c4152ae8c7942769dc98f msgid "" "The following examples use border_width=0.3, together with a fontsize of " "15. Stroke color is blue and fill color is some yellow." msgstr "以下の例では、border_width=0.3を使用し、フォントサイズは15です。ストロークの色は青で、塗りつぶしの色は黄色です。" -#: ../../shape.rst:619 d442c4de511e4794bd18f043cac7b764 +#: ../../shape.rst:621 758ba1a3725545968a5bf8174fc0067f +#, fuzzy +msgid "**miter_limit** (*float*)" +msgstr "**border_width** (*浮動小数点数*)" + +#: ../../shape.rst:623 47f6cf2090874b34aa1000378a41c702 +msgid "" +"A float specifying the maximum acceptable value of the quotient `miter-" +"length / line-width` (\"miter quotient\"). Used in text output methods. " +"This is only relevant for non-zero render mode values -- then, characters" +" are written with border lines (i.e. \"stroked\")." +msgstr "" + +#: ../../shape.rst:625 23a44194e32f40238f56f9720992ea19 +msgid "" +"If two lines stroking some character meet at a sharp (<= 90°) angle and " +"the line width is large enough, then \"spikes\" may become visible -- " +"causing an ugly appearance as shown below. For more background, see page " +"126 of the :ref:`AdobeManual`." +msgstr "" + +#: ../../shape.rst:627 dbeec71e85254059b1b116e6bf53cab4 +msgid "" +"For instance, when joins meet at 90°, then the miter length is ``sqrt(2) " +"* line-width``, so the miter quotient is ``sqrt(2)``." +msgstr "" + +#: ../../shape.rst:629 6230069ffd5b4b55b23b39e3542c5df6 +msgid "" +"If ``miter_limit`` is exceeded, then all joins with a larger qotient will" +" appear as beveled (\"butt\" appearance)." +msgstr "" + +#: ../../shape.rst:631 709fe5f6dae74edf97ca361613799805 +msgid "" +"The default value 1 (and any smaller value) will ensure that all joins " +"are rendered as a butt. A value of ``None`` will use the PDF default " +"value." +msgstr "" + +#: ../../shape.rst:633 96300bafed9240e7a4726029c3dff673 +msgid "Example text showing spikes (``miter_limit=None``):" +msgstr "" + +#: ../../shape.rst:637 4057d5819930438fbd72dfb0ac5ec1fe +msgid "Example text suppressing spikes (``miter_limit=1``):" +msgstr "" + +#: ../../shape.rst:643 128861b7bd2c4122af369f3d66935014 msgid "**overlay** (*bool*)" msgstr "**オーバーレイ** (*bool*)" -#: ../../shape.rst:621 43abd5cdba344548a70f461b1b010f55 +#: ../../shape.rst:645 0de1da78f296432caf149b9467906484 msgid "Causes the item to appear in foreground (default) or background." msgstr "アイテムを前景( デフォルト)または背景に表示させます。" -#: ../../shape.rst:625 261b3c6c0fee415bb2d86568fc25acce +#: ../../shape.rst:649 da7bfef6a119478d829a68086d3b2f02 msgid "**morph** (*sequence*)" msgstr "**morph** (*シーケンス*)" -#: ../../shape.rst:627 f0c176c986784cbaaf284d3000b02129 +#: ../../shape.rst:651 f4f5cdf22e924385887227709cc48b65 msgid "" "Causes \"morphing\" of either a shape, created by the *draw*()* methods, " "or the text inserted by page methods *insert_textbox()* / " -"*insert_text()*. If not *None*, it must be a pair *(fixpoint, matrix)*, " -"where *fixpoint* is a :ref:`Point` and *matrix* is a :ref:`Matrix`. The " +"*insert_text()*. If not ``None``, it must be a pair *(fixpoint, matrix)*," +" where *fixpoint* is a :ref:`Point` and *matrix* is a :ref:`Matrix`. The " "matrix can be anything except translations, i.e. *matrix.e == matrix.f ==" " 0* must be true. The point is used as a fixed point for the matrix " "operation. For example, if *matrix* is a rotation or scaling, then " @@ -1546,14 +1607,14 @@ msgid "" "horizontal line going through *fixpoint*, etc." msgstr "" "*draw*()* メソッドによって作成されたシェイプまたはページメソッド *insert_textbox()*/ *insert_text()*" -" によって挿入されたテキストのいずれかの「変形」を引き起こします。 *None* でない場合、*(fixpoint、matrix)* " +" によって挿入されたテキストのいずれかの「変形」を引き起こします。 ``None`` でない場合、*(fixpoint、matrix)* " "のペアでなければなりません。ここで、*fixpoint* は :ref:`Point` であり、*matrix* は :ref:`Matrix` " "です。行列は、*matrix.e == matrix.f == 0* " "でない限り、移動以外の任意のものにすることができます。ポイントは、行列操作の固定ポイントとして使用されます。たとえば、*行列* " "が回転またはスケーリングである場合、*fixpoint* はその中心です。同様に、*行列* が左右または上下の反転である場合、鏡像化される軸は " "*fixpoint* を介して通る垂直、または水平の線です。" -#: ../../shape.rst:629 3bf7652ad6c4472199b148ee60eceea7 +#: ../../shape.rst:653 d7a99be19cae4b00bcef607b3a379087 msgid "" "Several methods contain checks whether the to be inserted items will " "actually fit into the page (like :meth:`Shape.insert_text`, or " @@ -1565,11 +1626,11 @@ msgstr "" " 、または :meth:`Shape.draw_rect` " "など)。変形操作の結果にはそのような保証はありません。これは完全にプログラマーの責任です。" -#: ../../shape.rst:633 8baef2a4d4404998b161cdd4d1ce99a6 +#: ../../shape.rst:657 c3ca870a3e9544b89f78f868de17c0ef msgid "**lineCap (deprecated: \"roundCap\")** (*int*)" msgstr "**lineCap(非推奨:「roundCap」**)(*int*)" -#: ../../shape.rst:635 905411419491474998d0e105a67b1011 +#: ../../shape.rst:659 fea4b9f8410b4003ae173a8603274a60 msgid "" "Controls the look of line ends. The default value 0 lets each line end at" " exactly the given coordinate in a sharp edge. A value of 1 adds a semi-" @@ -1578,15 +1639,15 @@ msgid "" "width and a center of the line end." msgstr "線の末端の外観を制御します。デフォルト値0は、各線の末端が鋭いエッジで正確な座標で終了することを許可します。値1は、末端に直径が線の幅で中心が末端ポイントである半円を追加します。値2は、線の幅と線の末端を中心とする辺の長さがある半正方形を追加します。" -#: ../../shape.rst:637 0684bf20b88d41c3b53eb919f4106704 +#: ../../shape.rst:661 37893d88e52d4b2e8bda93c32ae636d8 msgid "*Changed in version 1.14.15*" msgstr "" -#: ../../shape.rst:641 fe33522f8b74463ab0ff88b4f0349b15 +#: ../../shape.rst:665 22794a68bb13467b9047ce06d3abfcbf msgid "**lineJoin** (*int*)" msgstr "" -#: ../../shape.rst:643 18da768c394c4d15afb990873a90faec +#: ../../shape.rst:667 6552f46bbd804d51ba0bc8d53dba7892 msgid "" "*New in version 1.14.15:* Controls the way how line connections look " "like. This may be either as a sharp edge (0), a rounded join (1), or a " @@ -1595,21 +1656,20 @@ msgstr "" "*バージョン1.14.15で新規追加:* " "ラインの接続方法を制御します。これは、鋭いエッジ(0)、丸い接続(1)、または切り取られたエッジ(2、「butt」)のいずれかです。" -#: ../../shape.rst:647 58153c787f404243a6929cdc08db8f68 +#: ../../shape.rst:671 f99edc98fa524d40a92febeffc5c45c2 msgid "**closePath** (*bool*)" msgstr "" -#: ../../shape.rst:649 5555fbee33e24c6f929ae21510191f5f +#: ../../shape.rst:673 36e9f0eb81d94b989bd969438537f326 msgid "" "Causes the end point of a drawing to be automatically connected with the " "starting point (by a straight line)." msgstr "描画の終点を自動的に始点に直線で接続させる原因となります。" -#: ../../footer.rst:60 5717a15f2f014643a1acba4bcc733e4d +#: ../../footer.rst:60 41e759d0552b4644a452e8186750d7d0 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 358added0f3742fd909edd77b33841b1 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/story-class.mo b/docs/locales/ja/LC_MESSAGES/story-class.mo index 5de10e8d7..cf8921f5a 100644 Binary files a/docs/locales/ja/LC_MESSAGES/story-class.mo and b/docs/locales/ja/LC_MESSAGES/story-class.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/story-class.po b/docs/locales/ja/LC_MESSAGES/story-class.po index 33b995b76..5a4a41780 100644 --- a/docs/locales/ja/LC_MESSAGES/story-class.po +++ b/docs/locales/ja/LC_MESSAGES/story-class.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,136 +19,136 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 66c2f8c495394f59a3600a1a820340be +#: ../../header.rst:-1 5a64c03ac3304767805a34e5519dc643 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 c4297dfa6bd4482bb2c0e314c9a5aeb3 +#: ../../header.rst:-1 987f101ad8fa44c9a85292f456737790 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 9c3560c174e94709902af4c63f2475ca +#: ../../header.rst:-1 937bf2fcb1964c3f97071eb2764745fd msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../story-class.rst:7 28aebcbd46c24e38ad50c1d06e300b27 +#: ../../story-class.rst:7 b33db4381f96455f881c4cb8b48a9239 msgid "Story" msgstr "Story (ストーリー)" -#: ../../story-class.rst:11 869b9606bbcb4bc2afa316e53ab9e4a3 +#: ../../story-class.rst:11 96383b7b49df4dc69e7545f0a3d37164 msgid "New in v1.21.0" msgstr "バージョン1.21.0で新規追加" -#: ../../story-class.rst:14 895e8f0e8206458e98bbaa46574b0749 +#: ../../story-class.rst:14 7d3756e920e1487eb3e1b3bf28ed6f9b msgid "**Method / Attribute**" msgstr "**メソッド / 属性**" -#: ../../story-class.rst:14 40590c5978dc4caeb53c267c9b4b3dd7 +#: ../../story-class.rst:14 51a2ed231a8d4b16a5606ce08ce54e8b msgid "**Short Description**" msgstr "**簡単な説明**" -#: ../../story-class.rst:16 4173dfda3de94b22952256ad9dc0fa03 +#: ../../story-class.rst:16 65726e39b3794bb9a492d8c5ba15990f msgid ":meth:`Story.reset`" msgstr "" -#: ../../story-class.rst:16 2bc6de59f4684893934e1945de7a2e0d +#: ../../story-class.rst:16 d9f0619b632e4bb582c9bbc227d889b5 msgid "\"rewind\" story output to its beginning" msgstr "ストーリーの出力を先頭に巻き戻す" -#: ../../story-class.rst:17 617027770a344342a05773f14c758a35 +#: ../../story-class.rst:17 7c94ba99f15b4f4d847c8263ca0b5132 msgid ":meth:`Story.place`" msgstr "" -#: ../../story-class.rst:17 d4c97908f087498592f28a9ba9dfe573 +#: ../../story-class.rst:17 5ef6af8dda1c4704b193cb14b0e43f33 msgid "compute story content to fit in provided rectangle" msgstr "指定された長方形に収まるストーリーのコンテンツを計算" -#: ../../story-class.rst:18 c462dbcac34e4f8fb9734c98d6215df0 +#: ../../story-class.rst:18 bb0b48f6450441f5a3dd54b788dee19a msgid ":meth:`Story.draw`" msgstr "" -#: ../../story-class.rst:18 077d8dc7087d4737aea43c245bb64f1d +#: ../../story-class.rst:18 8570b10f54d345139cfe978f97d8c9b3 msgid "write the computed content to current page" msgstr "計算されたコンテンツを現在のページに書き込む" -#: ../../story-class.rst:19 137be8df0fa547628c3cebe41a1e90d2 +#: ../../story-class.rst:19 f57f0a347b814e60b8da011ae533e111 msgid ":meth:`Story.element_positions`" msgstr "" -#: ../../story-class.rst:19 7a68bc8335984c65b957b909717ad3d7 +#: ../../story-class.rst:19 2e5a11cc2c1c430a878377cd43dbd28c msgid "callback function logging currently processed story content" msgstr "現在処理中のストーリーコンテンツを記録するコールバック関数" -#: ../../story-class.rst:20 2191897a3a8a465fa40f7a0ac69c6854 +#: ../../story-class.rst:20 7d3e1c7cf395410d9a7653dac537daad msgid ":attr:`Story.body`" msgstr "" -#: ../../story-class.rst:20 76948ef90d3d482a88d44bd7b64321e5 +#: ../../story-class.rst:20 1979b2f75d824d3588dc32499dace02a msgid "the story's underlying :htmlTag:`body`" msgstr "ストーリーの基本となる :htmlTag:`body`" -#: ../../story-class.rst:21 08f83a8265cd43bc8e2fc8cd529c4ab9 +#: ../../story-class.rst:21 7ba33a6d21124637b218ce0b7f3d3ec1 msgid ":meth:`Story.write`" msgstr "" -#: ../../story-class.rst:21 983f2df7bca049d6b13229869fe7dc22 +#: ../../story-class.rst:21 757b24965dee4f998578cefcb1a94b35 msgid "places and draws Story to a DocumentWriter" msgstr "ストーリーを :ref:`DocumentWriter` に配置して描画します" -#: ../../story-class.rst:22 a4b941a5b09a4d358a8dfea90f9b2109 +#: ../../story-class.rst:22 5005e48c2d114342997d30259781a86d msgid ":meth:`Story.write_stabilized`" msgstr "" -#: ../../story-class.rst:22 29a8b0e1060f4ab0b2e7eb9c51b7f889 +#: ../../story-class.rst:22 12712f5deea24c88b77364960c58dbdb msgid "iterative layout of html content to a DocumentWriter" msgstr "HTMLコンテンツを :ref:`DocumentWriter` に反復的にレイアウトします" -#: ../../story-class.rst:23 7a4d5aff0e9f4a03ad761254532769be +#: ../../story-class.rst:23 16d33507e0554249ba750773fb5cb53d msgid ":meth:`Story.write_with_links`" msgstr "" -#: ../../story-class.rst:23 516d33bd142a4a4fa2a6235b13448f5b +#: ../../story-class.rst:23 93c333b6d5f843cf8258a5274dfa22f0 msgid "like `write()` but also creates PDF links" msgstr "`write()` と同様ですが、PDFリンクも作成します" -#: ../../story-class.rst:24 69311c30ec2f407e9d7c7d2ff5d95327 +#: ../../story-class.rst:24 25e70986951c4b668e0a1704e2984855 msgid ":meth:`Story.write_stabilized_with_links`" msgstr "" -#: ../../story-class.rst:24 663bea74956e47ce85699345d403bff9 +#: ../../story-class.rst:24 2b185135aa8348fb825dded5295a7474 msgid "like `write_stabilized()` but also creates PDF links" msgstr "`write_stabilized()` と同様ですが、PDFリンクも作成します" -#: ../../story-class.rst:25 d735f71e870b40f18fbd9983c6ce8d37 +#: ../../story-class.rst:25 f7ca87bbd93e492587ff63f31dc3d7d5 msgid ":meth:`Story.fit`" msgstr "" #: ../../story-class.rst:25 ../../story-class.rst:252 -#: 1651f0e0efed4521b0cbcef3c4474f0b b2be44f87056472dab21da8559f847c3 +#: 945d31669d104a67b4251a8a2ed5b133 c2cb9dc7bf694149806fb89443a430ba msgid "Finds optimal rect that contains the story `self`." msgstr "" -#: ../../story-class.rst:26 b730b989974745ffac690ecb3c66b316 +#: ../../story-class.rst:26 57ee0022377e4fbbaf74f70142af7217 msgid ":meth:`Story.fit_scale`" msgstr "" -#: ../../story-class.rst:27 f66c42f09a644954baeab97c7501be3c +#: ../../story-class.rst:27 f73eb5fd926e4dc5b66afcbd819851d6 msgid ":meth:`Story.fit_height`" msgstr "" -#: ../../story-class.rst:28 3e15b73de6b54ebd89e4bf29118e88f2 +#: ../../story-class.rst:28 c5a858a25f3c4e45adf3c65f77eb35b4 msgid ":meth:`Story.fit_width`" msgstr "" -#: ../../story-class.rst:31 d602cdc83b834754a8c2b9a3157365d3 +#: ../../story-class.rst:31 555f8dfcf2c6423696e0a8111f5a202f msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../story-class.rst:37 ac5974bb00374478821280b00ca6996a +#: ../../story-class.rst:37 834595e0caee413fb07ac0888c96cf9c msgid "" "Create a **story**, optionally providing HTML and CSS source. The HTML is" " parsed, and held within the Story as a DOM (Document Object Model)." @@ -156,13 +156,13 @@ msgstr "" "**ストーリー** " "を作成します。オプションでHTMLとCSSのソースを提供できます。HTMLは解析され、ストーリー内でDOM(ドキュメントオブジェクトモデル)として保持されます。" -#: ../../story-class.rst:40 3d4fb86bfab847078d894df4df919002 +#: ../../story-class.rst:40 d9a1893bb0f14ccf9425ee58f9e72dfc msgid "" "This structure may be modified: content (text, images) may be added, " "copied, modified or removed by using methods of the :ref:`Xml` class." msgstr "この構造は変更できます。テキスト、画像などのコンテンツは、:ref:`Xml` クラスのメソッドを使用して追加、コピー、変更、または削除できます。" -#: ../../story-class.rst:43 2eec62caf7e14d6ebe394f30cbb58a2a +#: ../../story-class.rst:43 f0a727b22fb84079ae4095e10e3c2373 msgid "" "When finished, the **story** can be written to any device; in typical " "usage the device may be provided by a :ref:`DocumentWriter` to make new " @@ -171,17 +171,17 @@ msgstr "" "完了したら、**ストーリー** を任意のデバイスに書き込むことができます。通常の使用法では、デバイスは新しいページを生成するために " ":ref:`DocumentWriter` によって提供されます。" -#: ../../story-class.rst:46 cfd21d2209144ed38cf6e09cfe9f18cd +#: ../../story-class.rst:46 8bd0a736bc6749f68af7bee1912f8244 msgid "Here are some general remarks:" msgstr "以下は一般的な注意事項です:" -#: ../../story-class.rst:48 a8fe8d7b0e954d968fe751b82d18f87f +#: ../../story-class.rst:48 0f8c24eeaf79495db53a2614e831f91a msgid "" "The :ref:`Story` constructor parses and validates the provided HTML to " "create the DOM." msgstr ":ref:`Story` コンストラクタは提供されたHTMLを解析し、検証してDOMを作成します。" -#: ../../story-class.rst:49 66050dbc33c142c8a92709b4d60f8dab +#: ../../story-class.rst:49 a8c9195a3cdf4ea9bc8acd4c4bc70ff2 msgid "" "PyMuPDF provides a number of ways to manipulate the HTML source by " "providing access to the *nodes* of the underlying DOM. Documents can be " @@ -192,7 +192,7 @@ msgstr "" "PyMuPDFは、基本的なDOMのノードへのアクセスを提供することでHTMLソースを操作する方法をいくつか提供しています。文書は完全にプログラム的に構築することも、既存のDOMをかなり任意に変更することもできます。このインターフェースの詳細については、:ref:`Xml`" " クラスをご覧ください。" -#: ../../story-class.rst:54 d838ea3eb7a24338a07ead8dd00c18c8 +#: ../../story-class.rst:54 9a32acd1613e44cd87d2f73e6e3790e4 msgid "" "If no (or no more) changes to the DOM are required, the story is ready to" " be laid out and to be fed to a series of devices (typically devices " @@ -201,7 +201,7 @@ msgstr "" "DOMへの変更が必要ない(またはもう必要ない)場合、ストーリーはレイアウトが可能であり、新しいページを生成するために通常は " ":ref:`DocumentWriter` によって提供されるデバイスに供給する準備ができています。" -#: ../../story-class.rst:57 c3166e89bac4477295caa74f93d5b977 +#: ../../story-class.rst:57 de9ba211086b47eca447de9b6b5356c1 msgid "" "The next step is to place the story and write it out. This can either be " "done directly, by looping around calling `place()` and `draw()`, or " @@ -213,17 +213,17 @@ msgstr "" "を呼び出すことでループ処理することで)、または代替として `write()` または `write_stabilised()` " "メソッドを使用しても、ループ処理を自動化できます。どの方法を選択するかは主に好みの問題です。" -#: ../../story-class.rst:63 81f38b40ebba4e69a2d3c0fde62e1bc9 +#: ../../story-class.rst:63 9615fc9723fb4897a2817bb454bf3149 msgid "To work in the first of these styles, the following loop should be used:" msgstr "最初のスタイルで作業するには、次のループを使用する必要があります:" -#: ../../story-class.rst:65 94316661209c44baa59e8188c2a6bf9f +#: ../../story-class.rst:65 41867b8cd7bb4533b097c4aa2dd1a08e msgid "" "Obtain a suitable device to write to; typically by requesting a new, " "empty page from a :ref:`DocumentWriter`." msgstr "適切なデバイスを取得します。通常、:ref:`DocumentWriter` から新しい空のページを要求することで取得します。" -#: ../../story-class.rst:68 cfd06365d6e046b383ffdb4710c666ca +#: ../../story-class.rst:68 6e11ba83740c42a0814219e6c7bb4f2f msgid "" "Determine one or more rectangles on the page, that should receive " "**story** data. Note that not every page needs to have the same set of " @@ -232,7 +232,7 @@ msgstr "" "ページ上に **ストーリー** " "データを受け取る必要がある1つまたは複数の長方形を決定します。すべてのページが同じ長方形セットを持つ必要はないことに注意してください。" -#: ../../story-class.rst:71 f93ee210a25a433aae8a8bcbb11af15d +#: ../../story-class.rst:71 27521b4c124e42ad873a6b98785cc18d msgid "" "Pass each rectangle to the **story** to place it, learning what part of " "that rectangle has been filled, and whether there is more story data that" @@ -242,7 +242,7 @@ msgstr "" "各長方形を **ストーリー** " "に渡して配置し、その長方形のどの部分が埋まったか、また収まらなかったストーリーデータがあるかを学びます。このステップは、調整された長方形で何度も繰り返すことができ、呼び出し元が結果に満足するまで続けることができます。" -#: ../../story-class.rst:76 4a92b888d668416ab811d8096fb70334 +#: ../../story-class.rst:76 05e07028c7d3438d8b4564f851c3f6dd msgid "" "Optionally, at this point, we can request details of where interesting " "items have been placed, by calling the `element_positions()` method. " @@ -259,24 +259,24 @@ msgstr "" "に対応)、またはhref属性がNoneでない場合(:htmlTag:`href` " "に対応)に興味深いと見なされます。これは、目次、画像の索引などの自動生成に便利に使用できます。" -#: ../../story-class.rst:85 4fe1f3e36fae44fa99bc2a70a8393125 +#: ../../story-class.rst:85 921092efac384debac3b3b54e0888f7f msgid "Next, draw that rectangle out to the device with the `draw()` method." msgstr "次に、`draw()` メソッドを使用してその長方形をデバイスに描画します。" -#: ../../story-class.rst:86 440bcfb31dd040ff8347186dc0948857 +#: ../../story-class.rst:86 d36b5912ed30437198b3cf8b6a589d81 msgid "" "If the most recent call to `place()` indicated that all the story data " "had fitted, stop now." msgstr "最も最近の `place()` の呼び出しが、すべてのストーリーデータが収まったことを示した場合、ここで停止します。" -#: ../../story-class.rst:88 c1c2d8128f094ba3bec79cd7accebd99 +#: ../../story-class.rst:88 c97e2fc9a4d7461f87a1b0a14181de80 msgid "" "Otherwise, we can loop back. If there are more rectangles to be placed on" " the current device (page), we jump back to step 3 - if not, we jump back" " to step 1 to get a new device." msgstr "それ以外の場合、ループを戻すことができます。現在のデバイス(ページ)に配置するためにさらに長方形がある場合は、ステップ3に戻ります。長方形がない場合は、新しいデバイスを取得するためにステップ1に戻ります。" -#: ../../story-class.rst:91 09b191efad794eea9284986c8633cbf9 +#: ../../story-class.rst:91 58ca39dc2e03443689141076908acc02 msgid "" "Alternatively, in the case where you are using a :ref:`DocumentWriter`, " "the `write()` or `write_stabilized()` methods can be used. These handle " @@ -287,7 +287,7 @@ msgstr "" "代わりに、:ref:`DocumentWriter` を使用している場合、`write()` または `write_stabilized()` " "メソッドを使用できます。これらは、動作を制御するコールバックが提供される代わりに、すべてのループ処理を処理します(特に使用する長方形/ページを列挙するコールバックが含まれます)。" -#: ../../story-class.rst:96 95a72af76e6c4524a6183fcec93fd415 +#: ../../story-class.rst:96 d2f8dc8f478942b69038e2d6d08a91fe msgid "" "Which part of the **story** will land on which rectangle / which page, is" " fully under control of the :ref:`Story` object and cannot be predicted." @@ -295,29 +295,29 @@ msgstr "" "**ストーリー** オブジェクトがどの部分がどの長方形/ページに配置されるかは、完全に :ref:`Story` " "オブジェクトの制御下にあり、予測することはできません。" -#: ../../story-class.rst:98 687bab0a2f184bc5a0ed3cfdc13e9f3f +#: ../../story-class.rst:98 a231e6de936e448a93e21ff261ff8b39 msgid "" "Images may be part of a **story**. They will be placed together with any " "surrounding text." msgstr "画像は **ストーリー** の一部となる可能性があります。画像は周囲のテキストと一緒に配置されます。" -#: ../../story-class.rst:99 6ec76204364f4d47ac2059a3da937331 +#: ../../story-class.rst:99 10d7d8aa6a1c47998853f3879c904e3a msgid "" "Multiple stories may - independently from each other - write to the same " "page. For example, one may have separate stories for page header, page " "footer, regular text, comment boxes, etc." msgstr "複数のストーリーは、互いに独立して同じページに書き込むことができます。たとえば、ページヘッダー、ページフッター、通常のテキスト、コメントボックスなどの異なるストーリーを持つことができます。" -#: ../../story-class.rst 1131369e0483484180969743b18b3ba8 -#: 139b888c57a94c3a9474e0f7d1bad5dc 27a5531334ac43d2aebdc52100349648 -#: 33a510d8f5a14ba7b52f6b639aab0c4a 3490350c43c04cba8359c20130feff5e -#: 448e464ef515491ea760bd77b9ae1e0b 9e5ed4284c944b359fc26d75e34f9b54 -#: bfb9e936dc5d4c918eceb6f84fdc8702 d5df66f741ef468b90832159dcd77ddd -#: e1e303e2712d4b38b28607b244476718 +#: ../../story-class.rst 0c16913df99f4028a3870cbbbd910379 +#: 104010970e1342a5a900ab45a655ed39 1d65623102054847865dc9b04f9af565 +#: 456fb972dc3a4159952dd56ac1654590 47b053df5e8a436b92de3d583ae08f39 +#: 4c8c1511d6ca4de3b1ff6c538979f186 6cb09318829e49438c6c48b4681dfc29 +#: b0223ffe432744529572c26fc11dab80 c448f77784b245c2b24ce441b2722ea0 +#: fe317c7a33064ffea7eca66586243546 msgid "Parameters" msgstr "パラメーター:" -#: ../../story-class.rst:103 cb51ec6d2a8747db80adc0bc7aab0a84 +#: ../../story-class.rst:103 287c70d5ad0647e88290a1333ac631e0 msgid "" "HTML source code. If omitted, a basic minimum is generated (see below). " "If provided, not a complete HTML document is needed. The in-built source " @@ -327,15 +327,15 @@ msgstr "" "HTMLソースコード。省略した場合、基本的な最小限のHTMLが生成されます(以下参照)。指定した場合、完全なHTML文書は必要ありません。組み込みのソースパーサは(多くの)HTML構文エラーを許容し、また" " `\"Hello, World!\"` のようなHTMLフラグメントも受け入れます。" -#: ../../story-class.rst:108 7b50185c21d641be95efe9fa87c2eabc +#: ../../story-class.rst:108 63178e97fc4246158cbc7062597c4b93 msgid "CSS source code. If provided, must contain valid CSS specifications." msgstr "CSSソースコード。指定する場合、有効なCSS仕様を含む必要があります。" -#: ../../story-class.rst:109 715af96af1114f9eaaad922cc779b61f +#: ../../story-class.rst:109 0cf5afcd55e544ad8724adfc4be7f3bb msgid "the default text font size." msgstr "デフォルトのテキストフォントサイズ。" -#: ../../story-class.rst:110 0668b4d9bcb74c129e77bfd43126c5ac +#: ../../story-class.rst:110 049536668785410f8df0dbcb3a1feddc msgid "" "an :ref:`Archive` from which to load resources for rendering. Currently " "supported resource types are images and text fonts. If omitted, the story" @@ -343,11 +343,11 @@ msgid "" "output. .. note:: Instead of an actual archive, valid arguments for " "**creating** an :ref:`Archive` can also be provided -- in which case an " "archive will temporarily be constructed. So, instead of `story = " -"pymupdf.Story(archive=pymupdf.Archive(\"myfolder\"))`, one can also shorter " -"write `story = pymupdf.Story(archive=\"myfolder\")`." +"pymupdf.Story(archive=pymupdf.Archive(\"myfolder\"))`, one can also " +"shorter write `story = pymupdf.Story(archive=\"myfolder\")`." msgstr "" -#: ../../story-class.rst:110 6cd51bea678e402bbb503dbe0f6ccf07 +#: ../../story-class.rst:110 51aa7bb6ca3c42a58819b3c524960306 msgid "" "an :ref:`Archive` from which to load resources for rendering. Currently " "supported resource types are images and text fonts. If omitted, the story" @@ -357,19 +357,19 @@ msgstr "" "レンダリングのためのリソースをロードするための :ref:`Archive` " "。現在サポートされているリソースタイプは画像とテキストフォントです。省略した場合、ストーリーはそのようなデータを検索しようとはせず、不完全な出力を生成する可能性があります。" -#: ../../story-class.rst:112 5d8cb4c474f943cb9b38251e58e3cb5f +#: ../../story-class.rst:112 a1bdde42988b468c929fe9fb82452451 msgid "" "Instead of an actual archive, valid arguments for **creating** an " ":ref:`Archive` can also be provided -- in which case an archive will " "temporarily be constructed. So, instead of `story = " -"pymupdf.Story(archive=pymupdf.Archive(\"myfolder\"))`, one can also shorter " -"write `story = pymupdf.Story(archive=\"myfolder\")`." +"pymupdf.Story(archive=pymupdf.Archive(\"myfolder\"))`, one can also " +"shorter write `story = pymupdf.Story(archive=\"myfolder\")`." msgstr "" "アーカイブの代わりに、:ref:`Archive` を一時的に **構築する** ための有効な引数も提供できます。したがって、`story = " "pymupdf.Story(archive=pymupdf.Archive(\"myfolder\"))` の代わりに、`story = " "pymupdf.Story(archive=\"myfolder\")` と短縮して記述することもできます。 " -#: ../../story-class.rst:116 e4efde983eac454cb029e6a332f8c944 +#: ../../story-class.rst:116 e956d2bfd28841d7a04df00b07957e4f msgid "" "Calculate that part of the story's content, that will fit in the provided" " rectangle. The method maintains a pointer which part of the story's " @@ -377,7 +377,7 @@ msgid "" "from that pointer's position." msgstr "ストーリーのコンテンツのうち、指定された長方形に収まる部分を計算します。このメソッドは、ストーリーのコンテンツのどの部分が既に書き込まれたかを示すポインタを維持し、次回の呼び出し時にそのポインタの位置から再開します。" -#: ../../story-class.rst:118 bcce09314afb4720b43bf6c5751d86f1 +#: ../../story-class.rst:118 dc9976ea8ccc4d79bc216fce83ed6c9d msgid "" "layout the current part of the content to fit into this rectangle. This " "must be a sub-rectangle of the page's :ref:`MediaBox`." @@ -385,15 +385,15 @@ msgstr "" "現在のコンテンツをこの長方形に収めるためのレイアウト。これはページの :ref:`MediaBox` " "のサブ長方形でなければなりません。" -#: ../../story-class.rst ee5fb926560245f98b9448e0eb532768 +#: ../../story-class.rst daaea6c19d22421da33214020526af4d msgid "Return type" msgstr "戻り値の型:" -#: ../../story-class.rst f6ea9ccd20f84a7fa33e46853129fbeb +#: ../../story-class.rst 954873df303d499d861dc708a54e6c20 msgid "Returns" msgstr "戻り値:" -#: ../../story-class.rst:121 186d5ac7b919456a810f4a68939db88a +#: ../../story-class.rst:121 4d9be8b010ca4b4b8dcc983949132f37 msgid "" "a bool (int) `more` and a rectangle `filled`. If `more == 0`, all content" " of the story has been written, otherwise more is waiting to be written " @@ -404,11 +404,11 @@ msgstr "" "の場合、ストーリーのすべてのコンテンツが書き込まれたことを意味し、それ以外の場合、`more` " "は次の長方形/ページに書き込むために待機しています。埋められた長方形は実際に埋められた `where` の一部です。" -#: ../../story-class.rst:125 76579824d7ac41bfbd080e26ac82dfa6 +#: ../../story-class.rst:125 a836145f2a5a4a75b589eefba9b24211 msgid "Write the content part prepared by :meth:`Story.place` to the page." msgstr ":meth:`Story.place` によって準備されたコンテンツの一部をページに書き込みます。" -#: ../../story-class.rst:127 8c27c1d34d3643f3a9696bcf809014e0 +#: ../../story-class.rst:127 152149a28a8b49acaaf7bfeadead892c msgid "" "the :ref:`Device` created by `dev = writer.begin_page(mediabox)`. The " "device knows how to call all MuPDF functions needed to write the content." @@ -416,7 +416,7 @@ msgstr "" "`dev = writer.begin_page(mediabox)` で作成された " ":ref:`Device`。このデバイスは、コンテンツを書き込むために必要なすべてのMuPDF関数を呼び出す方法を知っています。" -#: ../../story-class.rst:128 8edf3e4b502d4256ba1cd8dd9b1d5156 +#: ../../story-class.rst:128 35b2e7568db140c9abf31a7ee3ef7f54 msgid "" "a matrix for transforming content when writing to the page. An example " "may be writing rotated text. The default means no transformation (i.e. " @@ -425,7 +425,7 @@ msgstr "" "ページに書き込む際にコンテンツを変形させるための行列。テキストを回転させるなどの例が考えられます。デフォルトでは変換は行われず(つまり " ":ref:`Identity` 行列)、コンテンツはそのまま書き込まれます。" -#: ../../story-class.rst:132 77ec964e1fc643dfbfc21b3e212e8877 +#: ../../story-class.rst:132 e9b8bfcac05244199692b5afb6d90ed0 msgid "" "Let the Story provide positioning information about certain HTML elements" " once their place on the current page has been computed - i.e. invoke " @@ -434,13 +434,13 @@ msgstr "" "ストーリーが現在のページ上で特定のHTML要素の配置情報を提供するようにします。つまり、:meth:`Story.place` の **直後に**" " このメソッドを呼び出します。" -#: ../../story-class.rst:134 ee9304576d324cc5bc5d185094574afb +#: ../../story-class.rst:134 e0021c2f17db417c8976fce48469b736 msgid "" "*Story* will pass position information to *function*. This information " "can for example be used to generate a Table of Contents." msgstr "*Story* は位置情報を *関数* に渡します。この情報は、目次の生成などに便利に使用できます。" -#: ../../story-class.rst:136 292555b146e94623a93c107a52c66477 +#: ../../story-class.rst:136 27a5d6e27ace4870892e746111d4365b msgid "" "a Python function accepting an :class:`ElementPosition` object. It will " "be invoked by the Story object to process positioning information. The " @@ -450,7 +450,7 @@ msgstr "" "オブジェクトを受け入れるPython関数。この関数は、位置情報を処理するためにStoryオブジェクトによって呼び出されます。**関数** " "は正確に1つの引数を受け入れるcallableである必要があります。" -#: ../../story-class.rst:137 74db75d330a6452b9fce6cf32da2c6e0 +#: ../../story-class.rst:137 08bda4472e0b457faada19c08c19734e msgid "" "an optional dictionary with any **additional** information that should be" " added to the :class:`ElementPosition` instance passed to `function`. " @@ -461,11 +461,11 @@ msgstr "" "`function` に渡される :class:`ElementPosition` インスタンスに **追加** " "情報を追加するためのオプションの辞書。たとえば、現在の出力ページ番号などが含まれることがあります。この辞書のすべてのキーは、有効なPython識別子の規則に従う文字列である必要があります。情報の完全なセットは以下で説明されています。" -#: ../../story-class.rst:146 f2f678d6aae7464084ab71b33bb10aed +#: ../../story-class.rst:146 98941c7d778c4d34a3d76bb76b5739dc msgid "Rewind the story's document to the beginning for starting over its output." msgstr "ストーリーのドキュメントを最初に戻して、出力を再開します。" -#: ../../story-class.rst:150 d869baa1cbef49f9b0c9827bd8b1a177 +#: ../../story-class.rst:150 2eaf3e53d3c34b20bd6b65526619e383 msgid "" "The :htmlTag:`body` part of the story's DOM. This attribute contains the " ":ref:`Xml` node of :htmlTag:`body`. All relevant content for PDF " @@ -474,7 +474,7 @@ msgstr "" "ストーリーのDOMの :htmlTag:`body` 部分。この属性には :htmlTag:`body` の :ref:`Xml` " "ノードが含まれています。PDFの制作に関連するすべてのコンテンツは、「」と「」の間に含まれています。" -#: ../../story-class.rst:154 d1d9696a8b7b43f2b078c91d3f929d2c +#: ../../story-class.rst:154 09a8579966ad4dd69d832b7cff35811b msgid "" "Places and draws Story to a `DocumentWriter`. Avoids the need for calling" " code to implement a loop that calls `Story.place()` and `Story.draw()` " @@ -484,11 +484,11 @@ msgstr "" "Storyを :ref:`DocumentWriter` に配置し、描画します。これにより、`Story.place()` および " "`Story.draw()` などを呼び出すループの実装が不要になりますが、`rectfn()` コールバックを少なくとも提供する必要があります。" -#: ../../story-class.rst:159 0ef6b1fab7234bdbb478173bad2d07e1 +#: ../../story-class.rst:159 5194586e662141618935bdf29a379921 msgid "a `DocumentWriter` or None." msgstr ":ref:`DocumentWriter` または `None`。" -#: ../../story-class.rst:160 f5db3f21b0e249af9622143c82f619b4 +#: ../../story-class.rst:160 d62e010560f14bf1b7cd210ebf78b20c #, fuzzy msgid "" "a callable taking `(rect_num: int, filled: Rect)` and returning " @@ -499,30 +499,30 @@ msgstr "" "`(rect_num: int, filled: Rect)` を取り、`(mediabox, rect, ctm)` " "を返すcallable:mediabox" -#: ../../story-class.rst:160 2074cac9884d473cbe03f600382803a8 +#: ../../story-class.rst:160 ae5c5dc080b540f09ad256f10c2cf83d msgid "" "a callable taking `(rect_num: int, filled: Rect)` and returning " "`(mediabox, rect, ctm)`:" msgstr "`(rect_num: int, filled: Rect)` を取り、`(mediabox, rect, ctm)` を返すcallable:" #: ../../story-class.rst:163 ../../story-class.rst:204 -#: 1bc811c15fef43e3937399af876a0ae9 985bb1b2611447e2a6591938edde94e8 +#: 193ce6bab9f74a3a9cf1bbeaf3b2dc88 991faab1db1a4e479714af5b2e511e0e #, fuzzy msgid "mediabox: None or rect for new page." msgstr "新しいページ用の `None` またはrect。" #: ../../story-class.rst:164 ../../story-class.rst:205 -#: b287c03da748483ba53d519c6da0fddc f21f2b321e5341aba1b1499328683bcb +#: 2c523120813f4975b82ffb2efb008126 cbe16d25e8e24253b41d04316f0700a3 #, fuzzy msgid "rect: The next rect into which content should be placed." msgstr "コンテンツを配置する次の矩形。" -#: ../../story-class.rst:165 2e543cb363be42a68fdfd59a302f393b +#: ../../story-class.rst:165 6068e757476744c2a2008edf19b650a1 #, fuzzy msgid "ctm: None or a `Matrix`." msgstr "`None` または `Matrix`。" -#: ../../story-class.rst:166 8c32171eb1ec4c15b2f8577aefc330a3 +#: ../../story-class.rst:166 54470f3ad61e4531aca719c848ecebb4 msgid "" "None, or a callable taking `(position: ElementPosition)`: * position:" " An `ElementPosition` with an extra `.page_num` member. Typically " @@ -530,28 +530,28 @@ msgid "" "an id." msgstr "" -#: ../../story-class.rst:166 39dd2962c0be42ba83bcda85bbaecd81 +#: ../../story-class.rst:166 0c1e37384309449d8a3f1aa31612af12 #, fuzzy msgid "None, or a callable taking `(position: ElementPosition)`:" msgstr "" "`None` または(ElementPosition)を取り、`(position: ElementPosition)`: " "positionを返すcallable:" -#: ../../story-class.rst:168 e4181b9318074475b9c1434fbc1eac5a +#: ../../story-class.rst:168 78f15911e52b455d87f6517e46edf76d msgid "position:" msgstr "" -#: ../../story-class.rst:169 1bf0973767b345e4bc83bdbd9a652739 +#: ../../story-class.rst:169 8ba40e35c2734c1d8c5eb72cc71c82f4 msgid "An `ElementPosition` with an extra `.page_num` member." msgstr "`.page_num` メンバーを持つ `ElementPosition`。" -#: ../../story-class.rst:170 c7175bb5c515493892db81377c99c85a +#: ../../story-class.rst:170 9d3b6f846744442c8f1ebd5c03e1a944 msgid "" "Typically called multiple times as we generate elements that are headings" " or have an id." msgstr "通常、見出しやIDを持つ要素を生成する際に複数回呼び出されます。" -#: ../../story-class.rst:172 6ecdbde06e904ba3b174f9a790d4495f +#: ../../story-class.rst:172 0d6deb6dd4d9405ab38dff88ad1fc98f msgid "" "None, or a callable taking `(page_num, mediabox, dev, after)`; called at " "start (`after=0`) and end (`after=1`) of each page." @@ -559,19 +559,19 @@ msgstr "" "`None` または `(page_num, mediabox, dev, after)` " "を取り、各ページの開始(`after=0`)および終了(`after=1`)時に呼び出されます。" -#: ../../story-class.rst:178 4d76e400fbef445fa2a7b9fcc3f2acfb +#: ../../story-class.rst:178 a79665d597fb416d960734c83cfd6657 msgid "" "Static method that does iterative layout of html content to a " "`DocumentWriter`." msgstr "htmlコンテンツを :ref:`DocumentWriter` に対して反復的にレイアウトするための静的メソッド。" -#: ../../story-class.rst:181 21794b44e64d44d0818080c2d30d3f8b +#: ../../story-class.rst:181 6fc706ddf1b648e68d59f87ae642ba3d msgid "" "For example this allows one to add a table of contents section while " "ensuring that page numbers are patched up until stable." msgstr "これにより、ページ番号が安定するまで目次セクションを追加したりすることができます。" -#: ../../story-class.rst:184 861799493c7145dd9c01df6de4599edc +#: ../../story-class.rst:184 624160a14d984361bd0974171f55c924 msgid "" "Repeatedly creates a new `Story` from `(contentfn(), user_css, em, " "archive)` and lays it out with internal call to `Story.write()`; uses a " @@ -582,17 +582,17 @@ msgstr "" "を繰り返し作成し、`Story.write()` への内部呼び出しでそれをレイアウトします。 `None` " "のライターを使用し、`ElementPosition` のリストを次回の `contentfn()` 呼び出しに渡します。" -#: ../../story-class.rst:190 f5549d65468f4d3fa6f0f8ca1163fd35 +#: ../../story-class.rst:190 4b831cab0cb845b08bcd23293dfacaff msgid "" "When the html from `contentfn()` becomes unchanged, we do a final " "iteration using `writer`." msgstr "`contentfn()` からのhtmlが変更されなくなると、`writer` を使用して最終的な反復処理を行います。" -#: ../../story-class.rst:193 e597155bf3a040c3afa98dcdd793589b +#: ../../story-class.rst:193 fc2b4f5717ce43d49be5f534a63440f9 msgid "A `DocumentWriter`." msgstr ":ref:`DocumentWriter`。" -#: ../../story-class.rst:195 0b2c3a7b96664c668e36e5330eed06c2 +#: ../../story-class.rst:195 8156be2fda8e4081b5e9447ab8e0e84f msgid "" "A function taking a list of `ElementPositions` and returning a string " "containing html. The returned html can depend on the list of positions, " @@ -601,7 +601,7 @@ msgstr "" "`ElementPositions` " "のリストを取り、htmlを含む文字列を返す関数。返されるhtmlは、位置のリストに依存する場合があります。たとえば、最初の近くに目次がある場合です。" -#: ../../story-class.rst:200 797412a80ba84a91b81e09bc49dfb417 +#: ../../story-class.rst:200 f67b52fd424e4dc68961c8310fcaa746 #, fuzzy msgid "" "A callable taking `(rect_num: int, filled: Rect)` and returning " @@ -611,18 +611,18 @@ msgstr "" "`(rect_num: int, filled: Rect)` を取り、`(mediabox, rect, ctm)` " "を返すcallable:mediabox" -#: ../../story-class.rst:201 3d5092eff22a408caf07623f4449649e +#: ../../story-class.rst:201 2619bfc1a11c4ae089bce95a0a0b388f msgid "" "A callable taking `(rect_num: int, filled: Rect)` and returning " "`(mediabox, rect, ctm)`:" msgstr "" -#: ../../story-class.rst:206 e277c2bb59394351b52ba8474b1e382f +#: ../../story-class.rst:206 893cb8063b414afaaced0a0058f0d3ab #, fuzzy msgid "ctm: A `Matrix`." msgstr ":ref:`Matrix`。" -#: ../../story-class.rst:207 8b8159b4dcf14ae8b4ae4bfb2f4a83ed +#: ../../story-class.rst:207 fa079791f265424f89482cae4560278b msgid "" "None, or a callable taking `(page_num, medibox, dev, after)`; called at " "start (`after=0`) and end (`after=1`) of each page." @@ -630,21 +630,21 @@ msgstr "" "`None` または `(page_num、medibox、dev、after)` " "を取り、各ページの開始(`after=0`)および終了(`after=1`)時に呼び出されます。" -#: ../../story-class.rst:212 453019bbd4054d4aa72d0a01b93e2ce8 +#: ../../story-class.rst:212 1f50bce4bc934df3b5d624e1b672e8a7 msgid "" "If true, we add unique ids to all header tags that don't already have an " "id. This can help automatic generation of tables of contents." msgstr "Trueの場合、idを持たないすべての見出しタグに一意のidを追加します。これは目次の自動生成に役立ちます" -#: ../../story-class.rst:216 17df6d2573da4bc29c41b8ad83b65ed8 +#: ../../story-class.rst:216 4d3d89f8a84e4ddca5b6f49a19e7360f msgid "Returns:" msgstr "" -#: ../../story-class.rst:217 480f98c7e2774117ba7a1da80ed163c3 +#: ../../story-class.rst:217 67ed7ea6343840ce8ca2af472e723907 msgid "None." msgstr "" -#: ../../story-class.rst:221 ea69e280a1914d428a615cd4a4fda1b5 +#: ../../story-class.rst:221 dc5ef0f369b64b56a861bebe37e7d740 msgid "" "Similar to `write()` except that we don't have a `writer` arg and we " "return a PDF `Document` in which links have been created for each " @@ -653,7 +653,7 @@ msgstr "" "`write()` に類似していますが、`writer` 引数がなく、内部のHTMLリンクごとにリンクが作成されたPDF `Document` " "が返されます。" -#: ../../story-class.rst:227 f8ce4c53e2d8482b99c3beaf86d1d3d1 +#: ../../story-class.rst:227 f60fb57103404e4487a18f27456b9ac5 msgid "" "Similar to `write_stabilized()` except that we don't have a `writer` arg " "and instead return a PDF `Document` in which links have been created for " @@ -662,227 +662,227 @@ msgstr "" "`write_stabilized()` に類似していますが、`writer` " "引数がなく、代わりに各内部のHTMLリンクにリンクが作成されたPDF `Document` が返されます。" -#: ../../story-class.rst:233 576b396fa22f4ded8c7e416719a39a39 +#: ../../story-class.rst:233 06abc8ee0cef4e4998719c4d3848c318 msgid "The result from a `Story.fit*()` method." msgstr "" -#: ../../story-class.rst:235 fcacac2297e946b6851d725ad7401688 +#: ../../story-class.rst:235 f882cf97ed5e42b69f1212bd5c0d3b3e msgid "Members:" msgstr "" -#: ../../story-class.rst:237 d847ff11a1a14b8483d75b41ab16f92e +#: ../../story-class.rst:237 05afdcff48b54e87a70244ac485320f6 msgid "`big_enough`:" msgstr "" -#: ../../story-class.rst:238 0c294643a959412486aaca799998cfa5 +#: ../../story-class.rst:238 296c3d062bc34a2f9826b3fe722423ed msgid "`True` if the fit succeeded." msgstr "" -#: ../../story-class.rst:239 4d33bc5a447447cc866b4513c0d8656a +#: ../../story-class.rst:239 910160ef882e49209e123946968ad89d msgid "`filled`:" msgstr "" -#: ../../story-class.rst:240 b6aae9318346487fbc3a779c32362db1 +#: ../../story-class.rst:240 2be02fcee76042b3b1e67242108c02d8 msgid "From the last call to `Story.place()`." msgstr "" -#: ../../story-class.rst:241 1b1b43130ac34313853a4839e168b296 +#: ../../story-class.rst:241 7f3007c064224426bdeffe2f30577d5a msgid "`more`:" msgstr "" -#: ../../story-class.rst:242 5032e31594b34650ac6267939087491f +#: ../../story-class.rst:242 14d98da06ba44fadacc3c05f8c88d916 msgid "`False` if the fit succeeded." msgstr "" -#: ../../story-class.rst:243 996faae4685641d99c403e169fdf574c +#: ../../story-class.rst:243 bea5727ffc6f4a0f9b4816919098061b msgid "`numcalls`:" msgstr "" -#: ../../story-class.rst:244 621d6a0ddd944071a357ed12925f7ec8 +#: ../../story-class.rst:244 508bd595de3a4b6a87cf8cece9b67d36 msgid "Number of calls made to `self.place()`." msgstr "" -#: ../../story-class.rst:245 0cedd25f1c794f1e9c9114146571d525 +#: ../../story-class.rst:245 0c4225d297644946b97fffd257cb3149 #, fuzzy msgid "`parameter`:" msgstr "パラメーター:" -#: ../../story-class.rst:246 5d83086d6bd14ab0950d6065e59a0e4e +#: ../../story-class.rst:246 a38a79d488cc413583a588ace44bad64 msgid "The successful parameter value, or the largest failing value." msgstr "" -#: ../../story-class.rst:247 73fd651965844881a900986d5abee23f +#: ../../story-class.rst:247 e5e7d478999f4d3aa75cc2e4a0bf8ed2 msgid "`rect`:" msgstr "" -#: ../../story-class.rst:248 78e3ee0ddeda472eb71d6958cfc89467 +#: ../../story-class.rst:248 865655b3648b49e19a5b3683d5ac952c msgid "The rect created from `parameter`." msgstr "" #: ../../story-class.rst:254 ../../story-class.rst:282 #: ../../story-class.rst:304 ../../story-class.rst:325 -#: 4b2354db815847569feb18f3b023c510 9b33a9d43fcb4498823bdf60300c04da -#: a8ece2bfae4b48e6b6a9ed14e12f5338 aca865a8dabb4df998b3466b202bb426 +#: 13889911bf6e4b4099ac3db022c63ba7 181f41eeee2248529bcc9f4180a0fd2f +#: 2a70154984d84fde9207702c6951f227 833e95a45bf24525a22b1bf7caedcfd7 msgid "Returns a `Story.FitResult` instance." msgstr "" -#: ../../story-class.rst:256 d62955d42b4a4e1caf03da9fc5a99bdc +#: ../../story-class.rst:256 9f2d407c6f7447a384ccc54acb6bbb6d msgid "" "On success, the last call to `self.place()` will have been with the " "returned rectangle, so `self.draw()` can be used directly." msgstr "" -#: ../../story-class.rst:259 63aa857801ef4edca7d89591b7714f43 +#: ../../story-class.rst:259 723d3c893ffb40979529d0c13998947c msgid "" "A callable taking a floating point `parameter` and returning a " -"`pymupdf.Rect()`. If the rect is empty, we assume the story will not fit and" -" do not call `self.place()`. Must guarantee that `self.place()` behaves " -"monotonically when given rect `fn(parameter`) as `parameter` increases. " -"This usually means that both width and height increase or stay unchanged " -"as `parameter` increases." +"`pymupdf.Rect()`. If the rect is empty, we assume the story will not fit " +"and do not call `self.place()`. Must guarantee that `self.place()` " +"behaves monotonically when given rect `fn(parameter`) as `parameter` " +"increases. This usually means that both width and height increase or stay" +" unchanged as `parameter` increases." msgstr "" -#: ../../story-class.rst:260 6ac30a70c5914d768f23cdb859888f93 +#: ../../story-class.rst:260 9507ed4935a0463eb2d74e2300c6e45c msgid "" "A callable taking a floating point `parameter` and returning a " -"`pymupdf.Rect()`. If the rect is empty, we assume the story will not fit and" -" do not call `self.place()`." +"`pymupdf.Rect()`. If the rect is empty, we assume the story will not fit " +"and do not call `self.place()`." msgstr "" -#: ../../story-class.rst:264 616058b4ea6f4783a52f2b0cfa2b8806 +#: ../../story-class.rst:264 b8b210f2827f4137a23a52bb43be5a7d msgid "" "Must guarantee that `self.place()` behaves monotonically when given rect " "`fn(parameter`) as `parameter` increases. This usually means that both " "width and height increase or stay unchanged as `parameter` increases." msgstr "" -#: ../../story-class.rst:268 2210aed421db46668330b557fda9a212 +#: ../../story-class.rst:268 a4dba85757184a2f88067b0d0bc2a5ac msgid "Minimum parameter to consider; `None` for -infinity." msgstr "" -#: ../../story-class.rst:270 b885db69bb8848eb93ab086a76f7d621 +#: ../../story-class.rst:270 c3041af96355455e9dd9c1d8b9001d02 msgid "Maximum parameter to consider; `None` for +infinity." msgstr "" -#: ../../story-class.rst:272 897e9e78d2a84930be2568d9219e1588 +#: ../../story-class.rst:272 50ba04ced3904450bbb765d580667a8a msgid "Maximum error in returned `parameter`." msgstr "" #: ../../story-class.rst:274 ../../story-class.rst:295 #: ../../story-class.rst:317 ../../story-class.rst:338 -#: 032b466db20c4ccd8997f73437eb7df3 9f35b645467b4837b5112ceff4690b35 -#: c5ecd7ef12f44fe8ab1bb4bdb7ae1146 e695c5dddc6f406194e893b557815b85 +#: 4560cdaee7304e68af9c9515d9baeeab 853d4b4eccc64445b4dadae224277597 +#: 9a97ca12c0fd4e4cad25cd646c9fd3a1 c27eb2778a574ddd9cdbb5da9e952da1 msgid "If true we output diagnostics." msgstr "" -#: ../../story-class.rst:279 84f72360ee6043b8aeb4904cdbb6a6d7 +#: ../../story-class.rst:279 4dca0fa3d9dc4d74a72be9a25b3042f5 msgid "" "Finds smallest value `scale` in range `scale_min..scale_max` where `scale" " * rect` is large enough to contain the story `self`." msgstr "" #: ../../story-class.rst:284 ../../story-class.rst:306 -#: 1ebdf7404ae948fdb63d16d4d663fa2c 4a8be6551d2e41f68010b753fc2dd4c3 +#: 3e56c24499df4c63acde4cd29372549c c1836f4303104884b7f75d1c7d7f4c18 msgid "width of rect." msgstr "" #: ../../story-class.rst:286 ../../story-class.rst:327 -#: 96364cb3b5254067822c8b63dd97a7ec ab58553657544c509aa7deac667483fa +#: 599c4470f82444f093e40776f0fc3088 d107736639a3470a838f7ae926a0c493 msgid "height of rect." msgstr "" -#: ../../story-class.rst:288 12e83d861ad84bb2ac951ca3c2f2c022 +#: ../../story-class.rst:288 192ebb0b7d2c4255ae07cda187e1c04a msgid "Minimum scale to consider; must be >= 0." msgstr "" -#: ../../story-class.rst:290 d22783ce69954a91b408bf8dd7c2b3f6 +#: ../../story-class.rst:290 9becc562a2894913ac6b78b33fa618a8 msgid "Maximum scale to consider, must be >= scale_min or `None` for infinite." msgstr "" -#: ../../story-class.rst:293 dcea33a437b745eb8ef003a604645518 +#: ../../story-class.rst:293 b80e9c9c5a024ab9b415c43f695db382 msgid "Maximum error in returned scale." msgstr "" -#: ../../story-class.rst:300 58c77b9b2d764ac7829408d9df250b48 +#: ../../story-class.rst:300 20b042fb975b4ef38c6a275f58290800 msgid "" "Finds smallest height in range `height_min..height_max` where a rect with" " size `(width, height)` is large enough to contain the story `self`." msgstr "" -#: ../../story-class.rst:308 6e2f976290684945a186d360b2115dc3 +#: ../../story-class.rst:308 de3278b094bd4069a6ade29bab864b2e msgid "Minimum height to consider; must be >= 0." msgstr "" -#: ../../story-class.rst:310 23e875e015c0472a8c60def2b9c48f34 +#: ../../story-class.rst:310 d890a80ccfbc4767b155bf963080574b msgid "Maximum height to consider, must be >= height_min or `None` for infinite." msgstr "" #: ../../story-class.rst:313 ../../story-class.rst:334 -#: 57d7318d2db44c0082b199ad3a6e241e 7ee6a60169d14e618cf255b73e4c6f35 +#: 345fc763c90942b3af9314cb53d3635c fb1f9d71eaf340dfb2d14dff3ccbaf8d msgid "`(x0, y0)` of rect." msgstr "" -#: ../../story-class.rst:315 b8dc463a94af42f4ad16f2e476f83cc9 +#: ../../story-class.rst:315 05ba2969245642aa9c5df4b5faa1c1c7 msgid "Maximum error in returned height." msgstr "" -#: ../../story-class.rst:322 25288df4750647a2a9168794696d3c65 +#: ../../story-class.rst:322 2c063f96e3d24728acc052323d414f48 msgid "" "Finds smallest width in range `width_min..width_max` where a rect with " "size `(width, height)` is large enough to contain the story `self`." msgstr "" -#: ../../story-class.rst:329 8ca75fb31a3043749e348ccea190a1b4 +#: ../../story-class.rst:329 755a76f8bcad4f9c9b17627fb2dd2b92 msgid "Minimum width to consider; must be >= 0." msgstr "" -#: ../../story-class.rst:331 49e2d822545d4518b2e7acd250ae9d31 +#: ../../story-class.rst:331 4a9bc91b4df64e0aae622c2fc204c366 msgid "Maximum width to consider, must be >= width_min or `None` for infinite." msgstr "" -#: ../../story-class.rst:336 66d195dc177d4bfa847e04dde48a9824 +#: ../../story-class.rst:336 a4d66b18a35f42759e36401ac18b5919 msgid "Maximum error in returned width." msgstr "" -#: ../../story-class.rst:343 26bc39cf24fb4789b4ee78155a346e4f +#: ../../story-class.rst:343 d2d8c9c232984e92ab30e2dc905f7f7a msgid "Element Positioning CallBack function" msgstr "要素位置コールバック関数" -#: ../../story-class.rst:345 7156a0fc901f455f8b0ce29b9161ae0a +#: ../../story-class.rst:345 a81639ecc64041979b5a57ccef510f75 msgid "" "The callback function can be used to log information about story output. " "The function's access to the information is read-only: it has no way to " "influence the story's output." msgstr "コールバック関数は、ストーリーの出力に関する情報を記録するために使用できます。この関数は情報への読み取り専用アクセスを持ち、ストーリーの出力に影響を与える方法はありません。" -#: ../../story-class.rst:347 e62159201b95489babcabf28e6987ec2 +#: ../../story-class.rst:347 d63a34b1197048c0a8e7128565d99b11 msgid "" "A typical loop for executing a story with using this method would look " "like this::" msgstr "このメソッドを使用してストーリーを実行する典型的なループは次のようになります:" -#: ../../story-class.rst:379 d7db949092ab4d41871738017de7d492 +#: ../../story-class.rst:379 022c24b9ecb142e4b995435e43d0abba msgid "Attributes of the ElementPosition class" msgstr "ElementPosition クラスの属性" -#: ../../story-class.rst:380 29a47a0aaaf848f980e32c086ea5b737 +#: ../../story-class.rst:380 eb9fd926dd144458ad966437c52bc9b3 msgid "" "Exactly one parameter must be passed to the function provided by " ":meth:`Story.element_positions`. It is an object with the following " "attributes:" msgstr ":meth:`Story.element_positions` で提供される関数に渡すパラメータは、次の属性を持つオブジェクトである必要があります。" -#: ../../story-class.rst:382 944aaac7db8c48a28f3605d5540769a3 +#: ../../story-class.rst:382 51f35390ddf549c49309c8e41b08fc0d msgid "" "The parameter passed to the `recorder` function is an object with the " "following attributes:" msgstr "`recorder` 関数に渡されるパラメータは、次の属性を持つオブジェクトです。" -#: ../../story-class.rst:384 498b5c41055440ff93b7bc3bf40594c2 +#: ../../story-class.rst:384 ea7a7e801d004da2946b291daf693c79 msgid "`elpos.depth` (int) -- depth of this element in the box structure." msgstr "`elpos.depth` (int)– ボックス構造内でのこの要素の深さ。" -#: ../../story-class.rst:386 b05a4b94d4e74e7182b9b64f66fa2d30 +#: ../../story-class.rst:386 eedd651708ad4d08ab6358db8492fe86 msgid "" "`elpos.heading` (int) -- the header level, 0 if no header, 1-6 for " ":htmlTag:`h1` - :htmlTag:`h6`." @@ -890,26 +890,26 @@ msgstr "" "`elpos.heading` (int)– ヘッダーレベル、ヘッダーがない場合は0、 :htmlTag:`h1` - :htmlTag:`h6`" " に対して1-6。" -#: ../../story-class.rst:388 55774cf620154ef6819d7c2897c36ecb +#: ../../story-class.rst:388 58c1d6c18dbc4defa9fdccf70fb9f5a1 #, fuzzy msgid "" "`elpos.href` (str) -- value of the `href` attribute, or None if not " "defined." msgstr "`elpos.href` (str)– `href` 属性の値、または未定義の場合は `None`。" -#: ../../story-class.rst:390 30286be8813a401e8b5aca7caab81343 +#: ../../story-class.rst:390 085ae77bd6a0482e9bfed8909e66cc63 msgid "`elpos.id` (str) -- value of the `id` attribute, or None if not defined." msgstr "`elpos.id` (str)– `id` 属性の値、または未定義の場合は `None`。" -#: ../../story-class.rst:392 3f37db63a8a842929212d7d6fd5188de +#: ../../story-class.rst:392 6148773811f84de3837f6e84482b5a6f msgid "`elpos.rect` (tuple) -- element position on page." msgstr "`elpos.rect` (tuple)– ページ上の要素の位置。" -#: ../../story-class.rst:394 17b7b0ddc04645ec99964f81c4f5aaa3 +#: ../../story-class.rst:394 e46b041d8944429f8ec58070b71170c3 msgid "`elpos.text` (str) -- immediate text of the element." msgstr "`elpos.text` (str)– 要素の直接のテキスト。" -#: ../../story-class.rst:396 c25e0f2ab1324f79b20d9debe15e11c9 +#: ../../story-class.rst:396 10ae79dfd5114378b05c394821db2139 msgid "" "`elpos.open_close` (int bit field) -- bit 0 set: opens element, bit 1 " "set: closes element. Relevant for elements that may contain other " @@ -919,24 +919,20 @@ msgstr "" "`elpos.open_close` (int ビットフィールド)– " "ビット0がセットされている場合、要素を開く。ビット1がセットされている場合、要素を閉じる。他の要素を含む可能性がある要素に対して、即座に作成/開始された後にすぐに閉じられない要素に関連します。" -#: ../../story-class.rst:398 4e340fbebe344669b11505f6ac78f0c4 +#: ../../story-class.rst:398 d06166cffa24405cbbc118345b121dc7 msgid "`elpos.rect_num` (int) -- count of rectangles filled by the story so far." msgstr "`elpos.rect_num` (int)– これまでにストーリーで埋められた長方形の数。" -#: ../../story-class.rst:400 4d623cd7efcd42d09f5d8f7c59edae0a +#: ../../story-class.rst:400 1559da9c2ea247b99415efc378836399 msgid "" "`elpos.page_num` (int) -- page number; only present when using " "`pymupdf.Story.write*()` functions." msgstr "`elpos.page_num` (int)– ページ番号。`pymupdf.Story.write*()` 関数を使用する場合にのみ存在します。" -#: ../../footer.rst:71 cf6b29a38132416c91ce0ab7a2a2b769 +#: ../../footer.rst:60 c25ec66bf75249a58ca8ecc2e8d0184a msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 692774635ea4448f934e5a0c6a5453ad -msgid "Discord logo" -msgstr "" - #~ msgid "" #~ "a callable taking `(rect_num: int, " #~ "filled: Rect)` and returning `(mediabox, " @@ -968,3 +964,6 @@ msgstr "" #~ msgid "." #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/textpage.mo b/docs/locales/ja/LC_MESSAGES/textpage.mo index dbd723bae..02de5f0a6 100644 Binary files a/docs/locales/ja/LC_MESSAGES/textpage.mo and b/docs/locales/ja/LC_MESSAGES/textpage.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/textpage.po b/docs/locales/ja/LC_MESSAGES/textpage.po index 030ed7981..0329e6238 100644 --- a/docs/locales/ja/LC_MESSAGES/textpage.po +++ b/docs/locales/ja/LC_MESSAGES/textpage.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 654c724c196e47cd8162f299753de6e6 +#: ../../header.rst:-1 9ca6145cb97145af9cdf5ef76dc0de3c msgid "Artifex" msgstr "" -#: ../../header.rst:-1 b07c7381653747c29f20a6801fe41c70 +#: ../../header.rst:-1 0600b90839df40e9ac23cb738c57c29a msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 486f98a71a944a90a68e192cbf1108b3 +#: ../../header.rst:-1 1f6d63ced97943c9b613b299ec031e9c msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../textpage.rst:7 1078eb5f395b46589812125bfb81d8c4 +#: ../../textpage.rst:7 9966d819027e453abbb1adeb4d1b2bfb msgid "TextPage" msgstr "TextPage (テキストページ)" -#: ../../textpage.rst:9 3ad1034a4ff841ccabe8d9176f928f51 +#: ../../textpage.rst:9 8297e05841c84513ba479147993e07bc msgid "" "This class represents text and images shown on a document page. All " ":ref:`MuPDF document types` are supported." @@ -47,7 +47,7 @@ msgstr "" "このクラスは、文書ページに表示されるテキストと画像を表します。すべての :ref:`MuPDF document " "types` がサポートされています。" -#: ../../textpage.rst:11 70e2bf253afc4013b1015967898cf77f +#: ../../textpage.rst:11 305a69e6d1cc4efe929bb3b1e01c338f msgid "" "The usual ways to create a textpage are :meth:`DisplayList.get_textpage` " "and :meth:`Page.get_textpage`. Because there is a limited set of methods " @@ -59,201 +59,201 @@ msgstr "" ":meth:`Page.get_textpage` です。このクラスにはメソッドのセットが制限されているため、:ref:`Page` " "内にはより使いやすいラッパーが存在します。この表の最後の列には、対応する :ref:`Page` メソッドが示されています。" -#: ../../textpage.rst:13 951a15d9ff914e9d9a449e1ba890e09d +#: ../../textpage.rst:13 b28048eebfef4686a5b9cce8aa9a9242 msgid "For a description of what this class is all about, see Appendix 2." msgstr "このクラスに関する詳細な説明については、付録2を参照してください。" -#: ../../textpage.rst:16 b9e5e01986c44d8e8b1b5024d18bc106 +#: ../../textpage.rst:16 69b717897dfc419ea428dbd7a0de9662 msgid "**Method**" msgstr "**メソッド**" -#: ../../textpage.rst:16 10a6ef3d8b2841d6b66a6b9fbd76a027 +#: ../../textpage.rst:16 b015eb61d04f419e8b7fbb496471574b msgid "**Description**" msgstr "**説明**" -#: ../../textpage.rst:16 ea71f07eeee943398f7815c29c626621 +#: ../../textpage.rst:16 a44519ebf5904319bc4a59d55cfd8e73 msgid "page get_text or search method" msgstr "page get_textまたはsearchメソッド" -#: ../../textpage.rst:18 939a62b698c34c7fbe0a9464c1939001 +#: ../../textpage.rst:18 8008e72f7f374921bfa7c04521f8e0c3 msgid ":meth:`~.extractText`" msgstr "" -#: ../../textpage.rst:18 936d9f6089cf440c99021ca887975e08 +#: ../../textpage.rst:18 77846738c3614d43b519d0e00d3d96a4 msgid "extract plain text" msgstr "プレーンテキストを抽出します" -#: ../../textpage.rst:18 ../../textpage.rst:19 385bb29aa82e4d77bf9f63165ef53bb8 -#: 5a9f244a229d4507a8de39071ae06d1b +#: ../../textpage.rst:18 ../../textpage.rst:19 3f6e2c97c46146adb7c925645b823ddd +#: d689ad9d5aaa4bdb8029dd8b22b70b0f msgid "\"text\"" msgstr "" -#: ../../textpage.rst:19 7a715eb5f61148cfb51f07c001f860d7 +#: ../../textpage.rst:19 b33cc2a2a3ef4e318acbfd19152b414b msgid ":meth:`~.extractTEXT`" msgstr "" -#: ../../textpage.rst:19 c5f67872c6f544ffb6f2be23264bdc77 +#: ../../textpage.rst:19 c5c23844e38a4a5e8d5bde717d12f1f6 msgid "synonym of previous" msgstr "前述の同義語" -#: ../../textpage.rst:20 c1b35f012d45429299f586f914195846 +#: ../../textpage.rst:20 d0ed007250bf40e39cec0ea8758af8da msgid ":meth:`~.extractBLOCKS`" msgstr "" -#: ../../textpage.rst:20 a8cfd8a6409c4118acb32567d7d31c22 +#: ../../textpage.rst:20 814dcd360d82450599f24cdfbdef17c5 msgid "plain text grouped in blocks" msgstr "ブロックにグループ化されたプレーンテキスト" -#: ../../textpage.rst:20 0ad9f570335a4b938013288934e711ed +#: ../../textpage.rst:20 629bdb6414654b9f9cb94ce40354164c msgid "\"blocks\"" msgstr "" -#: ../../textpage.rst:21 d2d2b458d10942a8a81108e785234519 +#: ../../textpage.rst:21 3ddf85d5fb49495cbea91a11e1607ae2 msgid ":meth:`~.extractWORDS`" msgstr "" -#: ../../textpage.rst:21 d527b3f2f76840d1b8e0f76794b29d25 +#: ../../textpage.rst:21 edfdc32c2fc74cd68e555cad8e96868b msgid "all words with their bbox" msgstr "すべての単語とそのバウンディングボックス" -#: ../../textpage.rst:21 a89f7ea19fe64bcbb0b72535e1559e9e +#: ../../textpage.rst:21 4bc95410c6ee4ff2bd0b600ecf44f4b9 msgid "\"words\"" msgstr "" -#: ../../textpage.rst:22 a638121f1ac54494b360b020049b12da +#: ../../textpage.rst:22 07c485e7d0f7479faa4a87fd71b2f5e5 msgid ":meth:`~.extractHTML`" msgstr "" -#: ../../textpage.rst:22 ce8210caf8c549e181c27f43b4838df3 +#: ../../textpage.rst:22 6d2468734a6640d2bb0382734ebd79e1 msgid "page content in HTML format" msgstr "HTML形式のページコンテンツ" -#: ../../textpage.rst:22 1825e6550c3744568d52f9a404061e34 +#: ../../textpage.rst:22 2adb8031ce96459cb3f20269010cca59 msgid "\"html\"" msgstr "" -#: ../../textpage.rst:23 80191c924eb243f78ed2de4d5abfd83b +#: ../../textpage.rst:23 f5c7d3a6ff554e678c0b20e089c51a5b msgid ":meth:`~.extractXHTML`" msgstr "" -#: ../../textpage.rst:23 fb04e4e2c57041ebb103d77330953677 +#: ../../textpage.rst:23 2be43ebbad204613afa2dac47ec43dab msgid "page content in XHTML format" msgstr "XHTML形式のページコンテンツ" -#: ../../textpage.rst:23 e9828882f3474e4ea634a9050c784d50 +#: ../../textpage.rst:23 f622b44d00444653961d91b40c500a36 msgid "\"xhtml\"" msgstr "" -#: ../../textpage.rst:24 53520ceffcc449a5b75896a8081ccc5c +#: ../../textpage.rst:24 73a3a84cb7044222b3e3d3f13e95e717 msgid ":meth:`~.extractXML`" msgstr "" -#: ../../textpage.rst:24 8c6b3945038c4644bdf210458e6f4240 +#: ../../textpage.rst:24 275a3c930f7d49e28dd68902c6f67f1b msgid "page text in XML format" msgstr "XML形式のページテキスト" -#: ../../textpage.rst:24 5332a82fb8ba4707a9ff8bac403318a3 +#: ../../textpage.rst:24 683535736405464a8c545be3161fc1b3 msgid "\"xml\"" msgstr "" -#: ../../textpage.rst:25 4c85942540464cf88d85bf85000ca7dc +#: ../../textpage.rst:25 e682781270e94299b8ecc57e7673923a msgid ":meth:`~.extractDICT`" msgstr "" -#: ../../textpage.rst:25 ../../textpage.rst:27 7b9b8410f83342dc99474df0166b21ee -#: cbd34c60cacb4da0965d42759fe63fde +#: ../../textpage.rst:25 ../../textpage.rst:27 5f983ba8bbcd49e6a3f48d06600fbc5f +#: 7cd7d12c082140efb13d14acb816f7fe msgid "page content in *dict* format" msgstr "*辞書* 形式のページコンテンツ" -#: ../../textpage.rst:25 9fb3e30e8b284038be1bade395106f66 +#: ../../textpage.rst:25 28f2f9408d05410e837a1fe3c511b4b2 msgid "\"dict\"" msgstr "" -#: ../../textpage.rst:26 e04aa2d39055461ba43247bcae63a89b +#: ../../textpage.rst:26 60dc6c6e5d1842348ed55e5d047da848 msgid ":meth:`~.extractJSON`" msgstr "" -#: ../../textpage.rst:26 ../../textpage.rst:28 4984a25a7bde4d3e8b8e22c5793d2f13 -#: f921e68f254e4184a9e87fc8df4312f5 +#: ../../textpage.rst:26 ../../textpage.rst:28 6c6f2c4c234d4bc796aef69138586877 +#: 8bba15457a094d60b34ebe13bf920b39 msgid "page content in JSON format" msgstr "JSON形式のページコンテンツ" -#: ../../textpage.rst:26 07463ffbda81466283f1174999bd2ace +#: ../../textpage.rst:26 80dc933b5e3a4420bd0d3a08d3d10d9e msgid "\"json\"" msgstr "" -#: ../../textpage.rst:27 60c9edd1c4384bfd946aedf1f5620d2c +#: ../../textpage.rst:27 dcdb9d6944b54bcba9fa189b6c7f52cb msgid ":meth:`~.extractRAWDICT`" msgstr "" -#: ../../textpage.rst:27 ed1703feeedb40c198f2da3a0b95475b +#: ../../textpage.rst:27 49c8d6da08d144e9a3442f06e332a627 msgid "\"rawdict\"" msgstr "" -#: ../../textpage.rst:28 53531461c3c84436b2a28c07525b19ef +#: ../../textpage.rst:28 53dbbd0bbeab41d1920c1ffa81f80296 msgid ":meth:`~.extractRAWJSON`" msgstr "" -#: ../../textpage.rst:28 75a67db10b544efda210a7ecb70993f1 +#: ../../textpage.rst:28 b0c2313e501d45a384644ecae53cbd1d msgid "\"rawjson\"" msgstr "" -#: ../../textpage.rst:29 fc5a795c5808450d8ddcca22b01cd87f +#: ../../textpage.rst:29 4560d07e61fa48dfa46c970d50b0743e msgid ":meth:`~.search`" msgstr "" -#: ../../textpage.rst:29 957d5fe6479e415ebc65b7b66b9bcc9b +#: ../../textpage.rst:29 01146efdbcf54aaba30cc1173162f210 msgid "Search for a string in the page" msgstr "ページ内の文字列を検索します" -#: ../../textpage.rst:29 8086aec43e09481eae6f9eadaeec8b78 +#: ../../textpage.rst:29 f35dabe2e99843cca4604961ee9dffde msgid ":meth:`Page.search_for`" msgstr "" -#: ../../textpage.rst:32 01518aadfca94dbb962b10aa62c53e3a +#: ../../textpage.rst:32 8aee7016e26240e2bfa9d18be19a98d5 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../textpage.rst:40 06369d329d4a4b7099b81743556c6e9c +#: ../../textpage.rst:40 cd8df8359f9f4524a39869a7107a4368 msgid "" "Return a string of the page's complete text. The text is UTF-8 unicode " "and in the same sequence as specified at the time of document creation." msgstr "ページの完全なテキストの文字列を返します。テキストはUTF-8ユニコードで、文書作成時に指定された順序と同じです。" -#: ../../textpage.rst 0618ac92f4a047e7a3b0ac68ac9af911 -#: 2c8c063c299f440681b7be1a3277636b 3a8fb81c050347518e8eb6084eadf0c1 -#: 40fe95b6fe604878935843966b045cde 76bf99ba562f45899ed09ff84567a5aa -#: 8b48ca9411c449f3b059c90bb4f1eb19 8b8e304b21864a269e7bb08eda108d9e +#: ../../textpage.rst 57da01987a7843fca5d739690f83f82a +#: 671578e8ecf845f083967ff38478d427 7e7dcf3e596f4f5ebc9039838dc9ebba +#: 8a8b6b3ca4e0408dbd33f8640e4ac26e ad6e9346d9d44984b434be3a8cd0b0a2 +#: d50290b47cbc4fc3b7fbf02c24036796 dc4e99ebeaaf4e068ef7cf6bc5915ac6 msgid "Parameters" msgstr "" #: ../../textpage.rst:42 ../../textpage.rst:85 ../../textpage.rst:93 #: ../../textpage.rst:113 ../../textpage.rst:121 -#: 03bad899c0f448a0b0d65ab1d7ce1cd2 747ef99ee54e43c1a86ab2cf5a75972a -#: d67d93431187433e90415a378196f760 dd05c89a1cbe44ea8677fb27f3b31f9c -#: f623cbe1f660412aa86d1ea824356dde +#: 16fb4ac02785457b9710449f9df41f14 23ee8f97b7184497ad7bc905b9b13624 +#: 40321a9de1394c2199c23ff76e4ab458 89f2e9b0fea144eca048813faba0eeaa +#: b003361c0ff648a7b8e6b841e0e05999 msgid "" "(new in v1.19.1) sort the output by vertical, then horizontal " "coordinates. In many cases, this should suffice to generate a \"natural\"" " reading order." msgstr "" -#: ../../textpage.rst 094eea9a4d1345d6a992860b2043d78b -#: 09d2694303434e00bf76e85e2fcfa834 0bebb67aff774c66a416032d0e1ac98a -#: 189f45300ebb43babc21a2e9a3b77099 206eaf5080e849aa8b68ded643b4d9c0 -#: 31358256bfe04adcb8b56099cc89dc5f 46b2b4e802c84cd7b5d3ad4fcca334f0 -#: b2672e327438415d9082ee8fb58c6054 c7aa02d2d67647888a3a475089dc49a8 -#: ca58f478fb6248a6a773a0b45facf37d f14ca1e2453d4e3186e0cc32bfff554a +#: ../../textpage.rst 0016111872404e169cbf1939b7c7d6a8 +#: 0998a86461f24855ab3f792dded2227c 49da96effe14424886d87bb9d6621b29 +#: 6a93913ee78c40f894b9df8f0547aa11 717ee5c982c24238844eda2ac1ee1a99 +#: 80a094079a8f42f38a882326261f71a6 8142ec710040424cb21597ecea1e53d9 +#: 96346247583745628dac24baa4a6639e a4150f10a5c0406a8df2d01a211754ad +#: af5da724d13e4f48991e381d99a03fdf ea64c177370c41e5884e95cf392dde1d msgid "Return type" msgstr "" -#: ../../textpage.rst:49 84579b9511f540508192d00b98733f5f +#: ../../textpage.rst:49 6b33d35e93314ecfa37fa95c710500db msgid "" "Textpage content as a list of text lines grouped by block. Each list " "items looks like this::" msgstr "テキストページの内容を、ブロックごとにグループ化されたテキスト行のリストとして返します。各リストアイテムは次のようになります::" -#: ../../textpage.rst:53 2e62036ef066410fb2cde5937533b71b +#: ../../textpage.rst:53 cfb5ee966a994a11a216e249dc6caadf msgid "" "The first four entries are the block's bbox coordinates, *block_type* is " "1 for an image block, 0 for text. *block_no* is the block sequence " @@ -262,29 +262,29 @@ msgstr "" "最初の4つのエントリはブロックのbbox座標で、*ブblock_type* は画像ブロックの場合は1、テキストの場合は0です。*block_no*" " はブロックのシーケンス番号です。複数のテキスト行は改行で結合されます。" -#: ../../textpage.rst:55 c22ddda57df94341acbbd774c98e720b +#: ../../textpage.rst:55 ca9405c070eb4a92877a2ab6f30a3e12 msgid "" "For an image block, its bbox and a text line with some image meta " "information is included -- **not the image content**." msgstr "画像ブロックの場合、そのbboxと画像メタ情報を含むテキスト行が含まれますが、**画像の内容は含まれません**。" -#: ../../textpage.rst:57 d36ee079b6ff4c60be2d8555d3064a2f +#: ../../textpage.rst:57 7e94ebbeaa0e491787ab47eb385add63 msgid "" "This is a high-speed method with just enough information to output plain " "text in desired reading sequence." msgstr "これは、必要な読み取り順序でプレーンテキストを出力するのに十分な情報を持つ高速なメソッドです。" -#: ../../textpage.rst:63 8bca2a06466a4c769e0d449e94360d96 +#: ../../textpage.rst:63 dd5a25a964b24fd19590783019182acc msgid "Changed in v1.23.5: added `delimiters` parameter" msgstr "" -#: ../../textpage.rst:65 38aa165bf8424f4b8a4c4a159f6a1437 +#: ../../textpage.rst:65 7340df397af44343b4d15f029ae9bcfb msgid "" "Textpage content as a list of single words with bbox information. An item" " of this list looks like this::" msgstr "テキストページの内容を、bbox情報を持つ単語のリストとして返します。このリストのアイテムは次のようになります::" -#: ../../textpage.rst:69 56f644d5407640f6a5435af0da51c4b2 +#: ../../textpage.rst:69 c6d5a4cd67194e5199a675aa248f0bd3 msgid "" "(new in v1.23.5) use these characters as *additional* word separators. By" " default, all white spaces (including the non-breaking space `0xA0`) " @@ -297,7 +297,7 @@ msgid "" "\"word\" strings will not contain any delimiting character." msgstr "" -#: ../../textpage.rst:71 ec5f5bb383e64372b0eb0008ed7f0df9 +#: ../../textpage.rst:71 7af81f97fcc2435ab536aebd6b7f34ab #, fuzzy msgid "" "This is a high-speed method which e.g. allows extracting text from within" @@ -306,7 +306,7 @@ msgstr "" "スペースで区切られたすべてが *「単語」* " "として扱われます。これは、指定された領域内からテキストを抽出したり、テキストの読み取り順序を復元したりするのに適した高速なメソッドです。" -#: ../../textpage.rst:77 5b559ac37df04bdcb59ee926b75c325b +#: ../../textpage.rst:77 1d2e06d47e9841048613550acba8bf61 msgid "" "Textpage content as a string in HTML format. This version contains " "complete formatting and positioning information. Images are included " @@ -317,13 +317,13 @@ msgstr "" "HTML形式の文字列としてのテキストページの内容を返します。このバージョンには完全なフォーマットと位置情報が含まれています。画像も含まれており(base64文字列としてエンコードされています)、Pythonで出力を解釈するためにはHTMLパッケージが必要です。インターネットブラウザはこの情報を適切に表示できるはずですが、:ref:`HTMLQuality`" " を参照してください。" -#: ../../textpage.rst:83 d153f3bab8ef483d82f3276689f5a469 +#: ../../textpage.rst:83 282b1d017a6e4a31ba6b7975680e0614 msgid "" "Textpage content as a Python dictionary. Provides same information detail" " as HTML. See below for the structure." msgstr "TextPageの内容をPythonの辞書として取得します。HTMLと同じ情報の詳細を提供します。構造については以下を参照してください。" -#: ../../textpage.rst:91 6cf4a53fe6f94e21bb490ebe0f4ea643 +#: ../../textpage.rst:91 da83463d890f4b8fa66eafaf62eea27e msgid "" "Textpage content as a JSON string. Created by " "`json.dumps(TextPage.extractDICT())`. It is included for backlevel " @@ -334,7 +334,7 @@ msgstr "" "TextPageの内容をJSON形式の文字列として取得します。`json.dumps(TextPage.extractDICT())` " "によって作成されます。これは過去の互換性のために含まれています。おそらく、結果をファイルに出力する際にのみこのメソッドを使用するでしょう。このメソッドはバイナリ画像データを検出し、それらをBase64エンコードされた文字列に変換します。" -#: ../../textpage.rst:99 0699740e6a42498eb68a5b6b297567b4 +#: ../../textpage.rst:99 df3e01a91f7c4ae790499d50c3e85f29 msgid "" "Textpage content as a string in XHTML format. Text information detail is " "comparable with :meth:`extractTEXT`, but also contains images (base64 " @@ -344,7 +344,7 @@ msgstr "" "TextPageの内容をXHTML形式の文字列として取得します。テキスト情報の詳細は :meth:`extractTEXT` " "と比較できますが、画像も含まれます(Base64エンコードされています)。このメソッドは元の視覚的な外観を再作成しようとしません。" -#: ../../textpage.rst:105 a6b30fc796bb4bba9b851d64db456b98 +#: ../../textpage.rst:105 435edffbc686457dba05b981881c25a0 msgid "" "Textpage content as a string in XML format. This contains complete " "formatting information about every single character on the page: font, " @@ -352,7 +352,7 @@ msgid "" " an XML package to interpret the output in Python." msgstr "TextPageの内容をXML形式の文字列として取得します。これにはページ上の各文字に関する完全なフォーマット情報が含まれています:フォント、サイズ、行、段落、位置、色など。画像は含まれていません。Pythonで出力を解釈するにはXMLパッケージが必要です。" -#: ../../textpage.rst:111 a2b73c4c25fd41a99620b59d0856fef8 +#: ../../textpage.rst:111 87bd5187b0f44f89ab4104b82f56e019 msgid "" "Textpage content as a Python dictionary -- technically similar to " ":meth:`extractDICT`, and it contains that information as a subset " @@ -363,7 +363,7 @@ msgstr "" "TextPageの内容をPythonの辞書として取得します。技術的には :meth:`extractDICT` " "と類似しており、その情報をサブセットとして含みます(画像も含まれます)。詳細については以下を参照してください。" -#: ../../textpage.rst:119 78cac3fa33d7410a8c4e788c13eb45b4 +#: ../../textpage.rst:119 895cfa706afc446084e720ac3f93fd03 msgid "" "Textpage content as a JSON string. Created by " "`json.dumps(TextPage.extractRAWDICT())`. You will probably use this " @@ -373,15 +373,15 @@ msgstr "" "TextPageの内容をJSON形式の文字列として取得します。`json.dumps(TextPage.extractRAWDICT())` " "によって作成されます。おそらく、結果をファイルに出力する際にのみこのメソッドを使用するでしょう。このメソッドはバイナリ画像データを検出し、それらをBase64エンコードされた文字列に変換します。" -#: ../../textpage.rst:127 2c099a1135d140d6837584fec71d8559 +#: ../../textpage.rst:127 ee07f7cf801a4f8d95d545ad5bfc0560 msgid "Changed in v1.18.2" msgstr "変更内容 v1.18.2" -#: ../../textpage.rst:129 02de2b2a43cb45b5aa37b5182dc13040 +#: ../../textpage.rst:129 4cd763790da84021813e300e32cb9cf6 msgid "Search for *string* and return a list of found locations." msgstr "*文字列* を検索し、見つかった位置のリストを返します。" -#: ../../textpage.rst:131 e733c70a6e22405d93f37e094160f688 +#: ../../textpage.rst:131 cdac1bdde5e244499332db6777276c69 msgid "" "the string to search for. Upper and lower cases will all match if needle " "consists of ASCII letters only -- it does not yet work for \"Ä\" versus " @@ -390,15 +390,15 @@ msgstr "" "検索対象の文字列。ASCII文字だけで構成されている場合、大文字と小文字はすべて一致します。これはまだ、例えば \"Ä\" と \"ä\" " "のような場合には機能しません。" -#: ../../textpage.rst:132 14fb61fc769d47b98d9c7c49cfd73880 +#: ../../textpage.rst:132 4453db069b674068b294e21ec53118c5 msgid "return quadrilaterals instead of rectangles." msgstr "長方形の代わりに四辺形を返すかどうか。" -#: ../../textpage.rst 5af47b591a6646b286510a2c84ad195f +#: ../../textpage.rst ed3dabd5dd09480d9af2c202991f0797 msgid "Returns" msgstr "" -#: ../../textpage.rst:134 c6ea85a982a54614a206893916ebccbb +#: ../../textpage.rst:134 a9e6d6c3c1b244359142004ee7c7a2f6 msgid "" "a list of :ref:`Rect` or :ref:`Quad` objects, each surrounding a found " "*needle* occurrence. As the search string may contain spaces, its parts " @@ -414,15 +414,15 @@ msgstr "" "\"meth-\" と \"od\" という2つの部分に分かれている場合でも、\"meth\"(ハイフンなし)と \"od\" " "の2つの長方形が含まれます。" -#: ../../textpage.rst:136 b540b57d387f4be1a9f424fdb21e7af8 +#: ../../textpage.rst:136 1406308a92e44433808a1f565e8f7e85 msgid "**Overview of changes in v1.18.2:**" msgstr "**v1.18.2 での変更内容の概要:**" -#: ../../textpage.rst:138 9f246a7d66834cb18e9f2dc0be1e2fa4 +#: ../../textpage.rst:138 eb8f8e4f7f4c49249c64dce6f62f72f7 msgid "The `hit_max` parameter has been removed: all hits are always returned." msgstr "`hit_max` パラメータが削除され、すべてのヒットが常に返されます。" -#: ../../textpage.rst:139 ab888943c48048a0b6f7009f5c2285cd +#: ../../textpage.rst:139 aff4eacc24194b39abe53618b30ac986 msgid "" "The `rect` parameter of the :ref:`TextPage` is now respected: only text " "inside this area is examined. Only characters with fully contained bboxes" @@ -432,11 +432,11 @@ msgstr "" ":ref:`TextPage` の `rect` パラメータが尊重され、この領域内のテキストのみが検査されます。完全に含まれる bboxes " "を持つ文字のみが考慮されます。:meth:`Page.search_for` のラッパーメソッドも対応するクリップパラメータをサポートしています。" -#: ../../textpage.rst:140 6216121296d24d56b814869549bcece6 +#: ../../textpage.rst:140 3d50c7047c7644298736ada65850b843 msgid "**Hyphenated words** are now found." msgstr "**ハイフネーションされた単語** も見つかります。" -#: ../../textpage.rst:141 20675ba38dfa40298f170472bf1d159a +#: ../../textpage.rst:141 6323511b08df43c8a157fa38e3e750e8 msgid "" "**Overlapping rectangles** in the same line are now automatically joined." " We assume that such separations are an artifact created by multiple " @@ -445,7 +445,7 @@ msgstr "" "同じ行内の **重複する長方形** " "は自動的に結合されます。このような分割は、同じ検索対象の一部を含む複数のマークコンテンツグループによって作成されたアーティファクトと仮定されます。" -#: ../../textpage.rst:143 e831973e4c344c62be27913e78a2eac0 +#: ../../textpage.rst:143 14e7f89d3d5c4489a8cbd68df8e257ec msgid "" "Example Quad versus Rect: when searching for needle \"pymupdf\", then the" " corresponding entry will either be the blue rectangle, or, if *quads* " @@ -454,7 +454,7 @@ msgstr "" "例:Quad 対 Rect:needle \"pymupdf\" を検索する場合、対応するエントリは青い長方形であるか、*quads* " "が指定された場合は四辺形 *Quad(ul, ur, ll, lr)* になります。" -#: ../../textpage.rst:149 dd334af100f04a3682603a1cb11189a6 +#: ../../textpage.rst:149 3a79ec0fc7fe4ccebd68324e457093ac msgid "" "The rectangle associated with the text page. This either equals the " "rectangle of the creating page or the `clip` parameter of " @@ -463,7 +463,7 @@ msgstr "" "テキストページに関連付けられた矩形。これは、作成ページの矩形または :meth:`Page.get_textpage` " "およびテキスト抽出/検索メソッドの `clip` パラメーターと一致する場合があります。" -#: ../../textpage.rst:151 60d31c62614d40bfb8a0e7126b213842 +#: ../../textpage.rst:151 1bfbbebaedbb4052bb3fe3b6dd9c243a msgid "" "The output of text searching and most text extractions **is restricted to" " this rectangle**. (X)HTML and XML output will however always extract the" @@ -472,11 +472,11 @@ msgstr "" "テキスト検索およびほとんどのテキスト抽出の出力は " "**この矩形に制限されます**。ただし、(X)HTMLおよびXMLの出力は常にフルページを抽出します。" -#: ../../textpage.rst:156 ee510afc25694a44be62b9a6bd2c1d4b +#: ../../textpage.rst:156 b141c7f9a7cb42d4a4fcdcd03e611923 msgid "Structure of Dictionary Outputs" msgstr "辞書出力の構造" -#: ../../textpage.rst:157 6bc55778ddc24e22bdba03df421e365a +#: ../../textpage.rst:157 0ab389a241664dee85374659702e3186 msgid "" "Methods :meth:`TextPage.extractDICT`, :meth:`TextPage.extractJSON`, " ":meth:`TextPage.extractRAWDICT`, and :meth:`TextPage.extractRAWJSON` " @@ -490,31 +490,31 @@ msgstr "" "、:meth:`TextPage.extractRAWDICT` 、:meth:`TextPage.extractRAWJSON` " "は、ページのテキストおよび画像コンテンツを含む辞書を返します。これらの4つのメソッドの辞書構造はほぼ同じです。これらは、ブロック、行、スパン、文字の情報階層をテキストページにできるだけ正確にマップし、各要素を独自のサブ辞書で表現することを目指しています。" -#: ../../textpage.rst:159 4cf9b9c85c1a4a599819182df7f54a9a +#: ../../textpage.rst:159 ac8012d470e1498fbf322b84979d54fe msgid "A **page** consists of a list of **block dictionaries**." msgstr "**ページ** は **ブロック辞書** のリストから構成されます。" -#: ../../textpage.rst:160 2b327eb4c6524fa58f0c15fb25a340c4 +#: ../../textpage.rst:160 b669893b4d0d43018ce1ae7cf03c0cc4 msgid "A (text) **block** consists of a list of **line dictionaries**." msgstr "(テキスト) **ブロック** は、**行辞書** のリストから構成されます。" -#: ../../textpage.rst:161 1b53ff988fa6456083fcbf0d0b165a92 +#: ../../textpage.rst:161 fadd7e5c79ff4ef7bb836f45bfa54d3e msgid "A **line** consists of a list of **span dictionaries**." msgstr "**行** は、**スパン辞書** のリストから構成されます。" -#: ../../textpage.rst:162 7a01d372e47244918bab83be2c07683c +#: ../../textpage.rst:162 36c8f65fcf1d4c619d438b8f01e187a7 msgid "" "A **span** either consists of the text itself or, for the RAW variants, a" " list of **character dictionaries**." msgstr "**スパン** は、テキスト自体またはRAWバリアントの場合、**文字辞書** のリストから構成されます。" -#: ../../textpage.rst:163 b88a8ff463274f0e92dd5c4b090c3778 +#: ../../textpage.rst:163 ed3f04f51bcd4c31b3e3dd7fd03320c0 msgid "" "RAW variants: a **character** is a dictionary of its origin, bbox and " "unicode." msgstr "RAWバリアント:**文字** はその起源、bbox、およびUnicodeの辞書です。" -#: ../../textpage.rst:165 81b60c0f8a3f40c2938fd31293d608f8 +#: ../../textpage.rst:165 495b9d336f004a809e9f71f332f21699 msgid "" "All PyMuPDF geometry objects herein (points, rectangles, matrices) are " "represented by there **\"like\"** formats: a :data:`rect_like` *tuple* is" @@ -524,7 +524,7 @@ msgstr "" "ここでのすべてのPyMuPDFジオメトリオブジェクト(ポイント、矩形、行列)は、:data:`rect_like` *タプル* の形式で " ":ref:`Rect` などの代わりに使用されます。これは、パフォーマンスとメモリの考慮事項からです。" -#: ../../textpage.rst:167 9c1ffd3ac58d4f27b92c0beaaef3d7ef +#: ../../textpage.rst:167 730e1437a5c243e0862e4cc1b85ddfae msgid "" "This code is written in C, where Python tuples can easily be generated. " "The geometry objects on the other hand are defined in Python source only." @@ -534,7 +534,7 @@ msgstr "" "このコードはCで書かれており、Pythonタプルは簡単に生成できます。一方、ジオメトリオブジェクトはPythonソースでのみ定義されています。 " "各Pythonタプルを対応するジオメトリオブジェクトに変換することは、実行時間を大幅に(かつ不必要に)増加させるでしょう。" -#: ../../textpage.rst:168 b5fffbc1787d4227ae4be1a3b6cdd4c5 +#: ../../textpage.rst:168 6160bc818c6641d59712647ba09d6f2f msgid "" "A 4-tuple needs about 168 bytes, the corresponding :ref:`Rect` 472 bytes " "- almost three times the size. A \"dict\" dictionary for a text-heavy " @@ -549,7 +549,7 @@ msgstr "" "KBです。このようなページの「rawdict」出力は、**4,000から5,000** のbboxを含む場合がありますので、この場合は750 " "KB対2 MBとなります。" -#: ../../textpage.rst:170 543fd23bb9ae407893a2542ce6e205bf +#: ../../textpage.rst:170 553b7505dc654bce9acc63f7985e8ee7 msgid "" "Please also note, that only **bboxes** (= :data:`rect_like` 4-tuples) are" " returned, whereas a :ref:`TextPage` actually has the **full position " @@ -565,36 +565,36 @@ msgstr "" "の3倍のサイズ)が必要です。言及した数の生成されたbboxを考えると、:data:`quad_like` " "情報を返すことは重大な影響を与えるでしょう。" -#: ../../textpage.rst:172 1dfac5011ba24c509a2b8655419eb324 +#: ../../textpage.rst:172 99cd9aa1d0454fccb81b7754e49fe731 msgid "" "In the vast majority of cases, we are dealing with **horizontal text " "only**, where bboxes provide entirely sufficient information." msgstr "ほとんどの場合、**水平テキストのみ** を扱っており、bboxは十分な情報を提供します。" -#: ../../textpage.rst:174 0121e32e1ee94c02ac869a5f42d1d305 +#: ../../textpage.rst:174 887228756dd54500a2972ea8eaaae72b msgid "" "In addition, **the full quad information is not lost**: it can be " "recovered as needed for lines, spans, and characters by using the " "appropriate function from the following list:" msgstr "さらに、**フルクワッド情報は失われていません**。必要に応じて、以下のリストから適切な関数を使用して行、スパン、および文字のクワッド情報を回復できます:" -#: ../../textpage.rst:176 1376b681448345a695a0984be8de1805 +#: ../../textpage.rst:176 8bf018658e234a00bc0de17969dae3bb msgid ":meth:`recover_quad` -- the quad of a complete span" msgstr ":meth:`recover_quad` – 完全なスパンのクワッド" -#: ../../textpage.rst:177 36b8709a83c1468d92f6b3614050d58a +#: ../../textpage.rst:177 6c3eebc9418f44c7831b2ffcb508609f msgid ":meth:`recover_span_quad` -- the quad of a character subset of a span" msgstr ":meth:`recover_span_quad` – スパンの一部の文字のクワッド" -#: ../../textpage.rst:178 3ffeb97d753248d5b11dfb3713026f61 +#: ../../textpage.rst:178 424c09f4c5c348309525195aab757ed0 msgid ":meth:`recover_line_quad` -- the quad of a line" msgstr ":meth:`recover_line_quad` – 行のクワッド" -#: ../../textpage.rst:179 f54583de6fb44b32aa7fdb96bc183eff +#: ../../textpage.rst:179 400df8764f0e431dac567a85e4bbd78f msgid ":meth:`recover_char_quad` -- the quad of a character" msgstr ":meth:`recover_char_quad` – 文字のクワッド" -#: ../../textpage.rst:181 32a67fefea764bbaae98fd58f37076d2 +#: ../../textpage.rst:181 96e1e1fa7b2e47cda3509c378547e0c3 msgid "" "As mentioned, using these functions is ever only needed, if the text is " "**not written horizontally** -- `line[\"dir\"] != (1, 0)` -- and you need" @@ -605,187 +605,189 @@ msgstr "" " 0)` - およびテキストマーカーアノテーション(:meth:`Page.add_highlight_annot` " "など)でクワッドが必要な場合のみです。" -#: ../../textpage.rst:189 600ca40879484d71937ba7fde65cbdb6 +#: ../../textpage.rst:191 595f43998ba0436e97c27949a639e0cf msgid "Page Dictionary" msgstr "ページ辞書" -#: ../../textpage.rst:192 ../../textpage.rst:210 ../../textpage.rst:246 -#: ../../textpage.rst:258 ../../textpage.rst:280 ../../textpage.rst:340 -#: 0005eac8046044e7b27b8456873782a3 2efd9fc2337341abb8111c1b5ab6245f -#: 4f901120760c48f0b9e3d8a76111d768 963d7d9e7336443e81e45012f57b0201 -#: c9204289182a46b6b235bac91221d5bf cb1738e0197b49c087fd30232cedbd08 +#: ../../textpage.rst:194 ../../textpage.rst:208 ../../textpage.rst:251 +#: ../../textpage.rst:263 ../../textpage.rst:285 ../../textpage.rst:369 +#: 1028a325d80d4f058a4b0359d7d4598d 25712968c441436eba02cf3a671cc015 +#: b97697d8ddd34a02b36ff938c56fe5e3 cffcfc0ebdc14a359647c0a579bc33b5 +#: e1d612602b454ac8a1f8fc9f345c7780 f8641ab264d24089a5504d8795434eb1 msgid "**Key**" msgstr "**キー**" -#: ../../textpage.rst:192 ../../textpage.rst:210 ../../textpage.rst:246 -#: ../../textpage.rst:258 ../../textpage.rst:280 ../../textpage.rst:340 -#: 2a65b3610de943acb7dfd38a79c0f268 354637eb4ae142caa071db10a42d4ebc -#: 5586b1e2f1604acea510a049332f94d1 713de51181964227adc6983f9f6722b7 -#: c777faee8c004f899dba5903add0095c e49210d5a40e40359da7d2588a37041e +#: ../../textpage.rst:194 ../../textpage.rst:208 ../../textpage.rst:251 +#: ../../textpage.rst:263 ../../textpage.rst:285 ../../textpage.rst:369 +#: 0bf110ecaacf4aa28287fd0e005ffddd 289abda4fd474dcdb960b408ef88468b +#: 3bf64d336de0427991445adcd0168093 574109b9a38f400a914c84c0356caf88 +#: a983b778e0064d50b3eaea79e9f4f3b6 c1f614c73fff407b9086f838a02bdaa2 msgid "**Value**" msgstr "**値**" -#: ../../textpage.rst:194 ../../textpage.rst:216 -#: b73d2e0f464d4f6b88e62586937039a0 cb6f5f1d57594c6fac5b4d55bf9d57f5 +#: ../../textpage.rst:196 ../../textpage.rst:214 +#: eb90193de1ce4b5c9eb39d385278964b f5b723f222a64cc68a99030c73b60d8f msgid "width" msgstr "" -#: ../../textpage.rst:194 d522ea7d50ac4e2cb2b5f6c25d8d08e9 +#: ../../textpage.rst:196 14cc2215742c4da9bd200255c8f933c5 msgid "width of the `clip` rectangle *(float)*" msgstr "`clip` 矩形の幅 *(float)*" -#: ../../textpage.rst:195 ../../textpage.rst:217 -#: 21b961ad2420430d908fa0dd564abe4a 9ca3114755a34f55ad9802792a0d480d +#: ../../textpage.rst:197 ../../textpage.rst:215 +#: 3aa7f8da25374d7296bbe5236ae369aa f91db5b834224a16ad9aeabc73e98e8e msgid "height" msgstr "" -#: ../../textpage.rst:195 325fc2bcc5064d0385f3a8fb23362743 +#: ../../textpage.rst:197 c231566c6b4c4cb3b4fe79f2f8253c3c msgid "height of the `clip` rectangle *(float)*" msgstr "`clip` 矩形の高さ *(float)*" -#: ../../textpage.rst:196 499ade3d47134d079a8e52345c1bd043 +#: ../../textpage.rst:198 31ed4b8f4f5541c3b722a5bdd6a6c34d msgid "blocks" msgstr "" -#: ../../textpage.rst:196 700ae3c6987a4eed9e5455b684494e07 +#: ../../textpage.rst:198 a1079925560f4211bc1fb868e6b872a1 msgid "*list* of block dictionaries" msgstr "ブロック辞書の *list* " -#: ../../textpage.rst:200 706733768e584f5ca7286ee483cc02b2 +#: ../../textpage.rst:202 08e070c1094e4ccca4fc04700d353970 msgid "Block Dictionaries" msgstr "ブロック辞書" -#: ../../textpage.rst:201 bc9147b1896e4171a2e5aeeda7809be8 +#: ../../textpage.rst:203 7d0906215b32466288832e1b6896048a msgid "" "Block dictionaries come in two different formats for **image blocks** and" " for **text blocks**." msgstr "ブロック辞書は、**画像ブロック** と **テキストブロック** の2つの異なるフォーマットで提供されます。" -#: ../../textpage.rst:203 9709b2326af14ee584168736e8843cc6 -msgid "*(Changed in v1.18.0)* -- new dict key *number*, the block number." -msgstr "*(v1.18.0で変更)* - 新しいdictキー *number* 、ブロック番号。" - -#: ../../textpage.rst:204 a1340a7df1da4de684112058ed61e5ea -msgid "" -"*(Changed in v1.18.11)* -- new dict key *transform*, the image " -"transformation matrix for image blocks." -msgstr "*(v1.18.11で変更)* - 新しいdictキー *transform* 、画像ブロックの画像変換行列。" - -#: ../../textpage.rst:205 7c2a546d53b2431384be74665ef316a3 -msgid "" -"*(Changed in v1.18.11)* -- new dict key *size*, the size of the image in " -"bytes for image blocks." -msgstr "*(v1.18.11で変更)* - 新しいdictキー *size* 、画像ブロックのバイト単位の画像サイズ。" - -#: ../../textpage.rst:207 b8b9ac43b31a4f3aa5e6424bb81e0221 +#: ../../textpage.rst:205 7e62f09f297148beb698e62d3afc4c36 msgid "**Image block:**" msgstr "**画像ブロック:**" -#: ../../textpage.rst:212 ../../textpage.rst:248 -#: 5a2d5ba36d0742eeb986e768a766bfd1 999441f726494523986017a1ab11661b +#: ../../textpage.rst:210 ../../textpage.rst:253 +#: 7b13ee4d579245ceb12b6f3cf76c1fab d85e1acb01be4077b861168ee129767f msgid "type" msgstr "" -#: ../../textpage.rst:212 74cefeeb79e44df696e6fe7382b3ffd7 -msgid "1 = image *(int)*" +#: ../../textpage.rst:210 efd2b31cf58548bebfe784580e65e609 +#, fuzzy +msgid "1 = image (``int``)" msgstr "1 = 画像 *(int)*" -#: ../../textpage.rst:213 ../../textpage.rst:249 ../../textpage.rst:260 -#: ../../textpage.rst:282 ../../textpage.rst:343 -#: 133f7ae15eaf4bfbadb7d8efc0be34d0 1a6a52f6d13b4f74aeee57841652d77c -#: 5083cafb36214acbbed33d16b9267a52 aae8d995afd34b0599db89c2d7b71498 -#: cde32b6929b84c4b8e9944c2e0a8de85 +#: ../../textpage.rst:211 ../../textpage.rst:254 ../../textpage.rst:265 +#: ../../textpage.rst:287 ../../textpage.rst:372 +#: 03d37603b3344af6b5e7da54db015b1b 319eb162bb77446380ad084c386e7880 +#: 489ec9a675314683b3e30183ac86b467 d66375110a74421c99ad70cba6cc18ef +#: f6aa14043a8a4b699002979f9b457101 msgid "bbox" msgstr "" -#: ../../textpage.rst:213 097a6f1aa272441093150fc4e683cb85 +#: ../../textpage.rst:211 51701c8e494240cb8459ca8170dd7511 msgid "image bbox on page (:data:`rect_like`)" msgstr "ページ上の画像の境界ボックス(:data:`rect_like`)" -#: ../../textpage.rst:214 ../../textpage.rst:250 -#: 4401d8353ebd4c30ae877ba73e60d08b 781321085b0a4bdf92950da5af7724cb +#: ../../textpage.rst:212 ../../textpage.rst:255 +#: dad8f7481ff04520890bf9540defc8d1 ee650f2cc2af439ebc7dfe5fcf770410 msgid "number" msgstr "" -#: ../../textpage.rst:214 ../../textpage.rst:250 -#: 529ab36924174d7489331dfe371d95bb ce0b4bc303df4ff487bdc88e575bf1b7 -msgid "block count *(int)*" +#: ../../textpage.rst:212 e77220a8a6de41c39d609dff474be846 +#, fuzzy +msgid "block count (``int``)" msgstr "ブロック数 *(int)*" -#: ../../textpage.rst:215 baeb2c8c24eb4614afdc44ff9cf5ff52 +#: ../../textpage.rst:213 58b4e56c8c424eed8d03bfeaeef4ea93 msgid "ext" msgstr "" -#: ../../textpage.rst:215 c1627ac366df4bf18317d61ae7e2419a -msgid "image type *(str)*, as file extension, see below" +#: ../../textpage.rst:213 1583d8baf0cb4f9b88f96e64556d2f6c +#, fuzzy +msgid "image type (``str``), as file extension, see below" msgstr "画像の種類 *(str)*、ファイル拡張子として、以下参照" -#: ../../textpage.rst:216 5e2257027fba47ac8685a41351bc35e1 -msgid "original image width *(int)*" +#: ../../textpage.rst:214 3786a0ca184247ccbac8ce835f4b7dd6 +#, fuzzy +msgid "original image width (``int``)" msgstr "元の画像の幅 *(int)*" -#: ../../textpage.rst:217 7d0b5b5dc7ae49909db3d42dba633778 -msgid "original image height *(int)*" +#: ../../textpage.rst:215 d62202c977f4427897519364fff16fa0 +#, fuzzy +msgid "original image height (``int``)" msgstr "元の画像の高さ *(int)*" -#: ../../textpage.rst:218 e0a8fe76d10a489986df0a9508fdbc66 +#: ../../textpage.rst:216 e146c7ea5f6f460db3e8980b52c734cf msgid "colorspace" msgstr "" -#: ../../textpage.rst:218 b0f65ed0679c4e1aa33d2c5a8dfac134 -msgid "colorspace component count *(int)*" +#: ../../textpage.rst:216 a2b2fbd44fc947adb67a432fe838d702 +#, fuzzy +msgid "colorspace component count (``int``)" msgstr "カラースペースのコンポーネント数 *(int)*" -#: ../../textpage.rst:219 a53a988038d04af9ad45633d58d3dc4c +#: ../../textpage.rst:217 b011e27b5b7f4071accc210533eeb410 msgid "xres" msgstr "" -#: ../../textpage.rst:219 214d337bfd074d5cb61e0f15a656313c -msgid "resolution in x-direction *(int)*" +#: ../../textpage.rst:217 76876d5bff234745968c9b29c479abf0 +#, fuzzy +msgid "resolution in x-direction (``int``)" msgstr "x方向の解像度 *(int)*" -#: ../../textpage.rst:220 6eeac7caac7a465ab8a5976094d6f34c +#: ../../textpage.rst:218 ca47a153418e437983d2d8df4624aaec msgid "yres" msgstr "" -#: ../../textpage.rst:220 5b8e7b04dc0f49fd91c4290f6a24a5c0 -msgid "resolution in y-direction *(int)*" +#: ../../textpage.rst:218 45276559019b42ac85ff614a8b179484 +#, fuzzy +msgid "resolution in y-direction (``int``)" msgstr "y方向の解像度 *(int)*" -#: ../../textpage.rst:221 c6889157adf24b6c835b65f9a2599fdb +#: ../../textpage.rst:219 5199ee0421fe41bb90ef866f83525686 msgid "bpc" msgstr "" -#: ../../textpage.rst:221 acb8008975f54a6ea70d306db2aca699 -msgid "bits per component *(int)*" +#: ../../textpage.rst:219 3af264e6c2f44b12ac9f208644fceacd +#, fuzzy +msgid "bits per component (``int``)" msgstr "コンポーネントごとのビット数 *(int)*" -#: ../../textpage.rst:222 5ca246a2ec13492283f44f45c4074c3c +#: ../../textpage.rst:220 30a1799870544636840f2ca52f4213b6 msgid "transform" msgstr "" -#: ../../textpage.rst:222 d78d8c5137d14c8e85e2dae71d5fee6e +#: ../../textpage.rst:220 bb9357da9bf547baacb8163e91b5b9ed msgid "matrix transforming image rect to bbox (:data:`matrix_like`)" msgstr "画像矩形を境界ボックスに変換する行列(:data:`matrix_like`)" -#: ../../textpage.rst:223 ../../textpage.rst:287 -#: 521e7ca8ab1541788e3430838c753a5a cae0301d99c944f1afed53c231236c66 +#: ../../textpage.rst:221 ../../textpage.rst:292 +#: d46d130394b74529afbeafcf2648b049 fec7c57a41bd4be0ad7387af0fbdc847 msgid "size" msgstr "" -#: ../../textpage.rst:223 7014c717f2e2428595db7fd4c8f44465 -msgid "size of the image in bytes *(int)*" +#: ../../textpage.rst:221 19a074e1bba545f0a6e1f4fa51b35bc8 +#, fuzzy +msgid "size of the image in bytes (``int``)" msgstr "画像のサイズ(バイト単位)*(int)*" -#: ../../textpage.rst:224 eb2da33e814943ff906592682c07d193 +#: ../../textpage.rst:222 0ada30bc2c4c455ca8a2eccf8ec5645a msgid "image" msgstr "" -#: ../../textpage.rst:224 6518e1a86d26400f985f2da35e8f3cf1 -msgid "image content *(bytes)*" +#: ../../textpage.rst:222 299044835f19498b9364b83a4be51966 +#, fuzzy +msgid "image content (``bytes``)" msgstr "画像コンテンツ *(bytes)*" -#: ../../textpage.rst:227 c819f532f58b4e05af54cee26aedc33a +#: ../../textpage.rst:223 0f80267e7b8a43e48e7438031afc13b7 +msgid "mask" +msgstr "" + +#: ../../textpage.rst:223 63331458b66141edb5d0d8d16c641424 +msgid "image mask content (``bytes``) for transparent images" +msgstr "" + +#: ../../textpage.rst:226 3c28b6119f1e4c05845e754c4e7762df msgid "" "Possible values of the \"ext\" key are \"bmp\", \"gif\", \"jpeg\", " "\"jpx\" (JPEG 2000), \"jxr\" (JPEG XR), \"png\", \"pnm\", and \"tiff\"." @@ -793,14 +795,14 @@ msgstr "" "\"ext\"キーの可能な値は、\"bmp\"、\"gif\"、\"jpeg\"、\"jpx\"(JPEG 2000)、\"jxr\"(JPEG " "XR)、\"png\"、\"pnm\"、および \"tiff\" です。" -#: ../../textpage.rst:231 79cdaf061cb54c53b4339084ba0edc61 +#: ../../textpage.rst:230 6cc71007ae5943aba16bc9df25bcbfc9 msgid "" "An image block is generated for **all and every image occurrence** on the" " page. Hence there may be duplicates, if an image is shown at different " "locations." msgstr "ページ上の **すべての画像** が画像ブロックとして生成されます。したがって、画像が異なる場所で表示される場合、重複が発生する可能性があります。" -#: ../../textpage.rst:233 7ad72546a47d49498134922eb6e7ab5d +#: ../../textpage.rst:232 968df807caf345efb4f5145afb265729 msgid "" ":ref:`TextPage` and corresponding method :meth:`Page.get_text` are " "**available for all document types**. Only for PDF documents, methods " @@ -814,7 +816,7 @@ msgstr "" ":meth:`Page.get_images` は画像リストに関する機能が一部重複しています。ただし、これらのリストは同じアイテムを " "**含むかどうかは必ずしも保証されません**。違いがある場合、その原因はおそらく次のいずれかです。" -#: ../../textpage.rst:235 711126c28dd84805bcff0337e65ed254 +#: ../../textpage.rst:234 58c9e4620f5c45b5a55b38b92a6fd494 msgid "" "\"Inline\" images (see page 214 of the :ref:`AdobeManual`) of a PDF page " "are contained in a textpage, but **do not appear** in " @@ -823,13 +825,13 @@ msgstr "" "PDFページの「インライン」画像(:ref:`AdobeManual` " "のページ214を参照)はテキストページに含まれていますが、:meth:`Page.get_images` には **表示されません**。" -#: ../../textpage.rst:236 811e0e9e12104e6b97da86a227342e90 +#: ../../textpage.rst:235 1976d291ba2043ed8edc7a38a5dab528 msgid "" "Annotations may also contain images -- these will **not appear** in " ":meth:`Page.get_images`." msgstr "アノテーションにも画像が含まれることがあります。これらは :meth:`Page.get_images` には **表示されません**。" -#: ../../textpage.rst:237 a9c7b66eb87b4cc092c4835bbae36351 +#: ../../textpage.rst:236 06ed842b388847b7a7113443675b76cb msgid "" "Image blocks in a textpage are generated for **every** image location -- " "whether or not there are any duplicates. This is in contrast to " @@ -840,7 +842,7 @@ msgstr "" "生成されます。重複があるかどうかに関係なくです。これは、:meth:`Page.get_images` " "では各画像が1回だけリストされる(参照名ごとに)のとは対照的です。" -#: ../../textpage.rst:238 8da7d0f945414b9d806949db23789feb +#: ../../textpage.rst:237 9f5942f2272b483590d6ed0a8a5f178e msgid "" "Images mentioned in the page's :data:`object` definition will **always** " "appear in :meth:`Page.get_images` [#f1]_. But it may happen, that there " @@ -850,7 +852,7 @@ msgstr "" "ページの :data:`object` 定義で言及されている画像は、常に :meth:`Page.get_images` に表示されます " "[#f1]_。ただし、ページの :data:`contents` に「表示」コマンドがない場合、画像はテキストページに表示されません。" -#: ../../textpage.rst:240 45123225de0f42bfbe6d8423c9226015 +#: ../../textpage.rst:239 b59961eabc8f46f486afc6f2c788b491 msgid "" "The image's \"transformation matrix\" is defined as the matrix, for which" " the expression `bbox / transform == pymupdf.Rect(0, 0, 1, 1)` is true, " @@ -859,59 +861,76 @@ msgstr "" "画像の「変換行列」は、`bbox / transform == pymupdf.Rect(0, 0, 1, 1)` " "という式が真である場合の行列です。詳細はこちらを参照してください: :ref:`ImageTransformation`。" -#: ../../textpage.rst:243 8b617dc9898b4d469fdb2932600b9777 +#: ../../textpage.rst:241 43cad69a55ef4f20816d50cc8efbe1b6 +msgid "" +"A transparent image may be accompanied by a mask image. This is stored " +"under key `\"mask\"` and has the format of a `DeviceGray` PNG image. " +"Otherwise the value of this key is ``None``. If present, you may be able " +"to recover (an equivalent of) the original image -- i.e. with " +"transparency -- by creating :ref:`Pixmap` objects from the \"image\", " +"respectively \"mask\" values and overlay them. This is not guaranteed to " +"always work because mask images come in multiple formats, of which not " +"all qualify for the conditions under which overlaying Pixmaps are " +"supported. Here is a code snippet:" +msgstr "" + +#: ../../textpage.rst:248 a317df3004da43a6a184efa0266a463d msgid "**Text block:**" msgstr "**テキストブロック:**" -#: ../../textpage.rst:248 fea2c30577bf4238977289e344401d35 +#: ../../textpage.rst:253 030797816aa549989b47bbb0e2632ff6 msgid "0 = text *(int)*" msgstr "0 = テキスト *(int)*" -#: ../../textpage.rst:249 83ba0887005b4e82851bd9c9b7bdfcfc +#: ../../textpage.rst:254 5845dcf4d2ff4b8aa3b8696f11fd4a20 msgid "block rectangle, :data:`rect_like`" msgstr "ブロックの矩形、:data:`rect_like`" -#: ../../textpage.rst:251 a36b5b6343b34615811edae7b315cd5c +#: ../../textpage.rst:255 392754de728c42fcae42b1f9b5a1145e +msgid "block count *(int)*" +msgstr "ブロック数 *(int)*" + +#: ../../textpage.rst:256 3bbc359f17e345399daa6507bdeea828 msgid "lines" msgstr "" -#: ../../textpage.rst:251 9dd6eee073b24ecf89c93e75b4ba6a30 +#: ../../textpage.rst:256 4042757af1954925a1cf44f2a1335dce msgid "*list* of text line dictionaries" msgstr "テキスト行の辞書の *list*" -#: ../../textpage.rst:255 36a5ac1ed7c644f3b0f216cc1c75151f +#: ../../textpage.rst:260 3d06aedad94149bc9fda2938390bc25f msgid "Line Dictionary" msgstr "" -#: ../../textpage.rst:260 48914eaae21843b493c4cd0019c83eb4 +#: ../../textpage.rst:265 2aa6b4384d6a43ae8535097a2f4d7183 msgid "line rectangle, :data:`rect_like`" msgstr "行の矩形、:data:`rect_like`" -#: ../../textpage.rst:261 23df632028934a73838baae676f47173 +#: ../../textpage.rst:266 057f881221e5432c812c73df38a30476 msgid "wmode" msgstr "" -#: ../../textpage.rst:261 4b9d5a12815b4dddb139a8f145e279fb +#: ../../textpage.rst:266 9b8a69aaf19842ae8147069b78b00dd1 msgid "writing mode *(int)*: 0 = horizontal, 1 = vertical" msgstr "書き込みモード *(int)*:0 = 水平、1 = 垂直" -#: ../../textpage.rst:262 d7f5ea40f4644113885af5ecfc58662f +#: ../../textpage.rst:267 692c2dda2d01494db929c1c879dfbdba msgid "dir" msgstr "" -#: ../../textpage.rst:262 809d05d0856f4483b740db3da9e111b4 +#: ../../textpage.rst:267 9b0ca2dd38e24416955b894693d6ff52 msgid "writing direction, :data:`point_like`" msgstr "書き込み方向、:data:`point_like`" -#: ../../textpage.rst:263 750ab97144474a0488061881a7551fa5 +#: ../../textpage.rst:268 230317eadc6b4662a8970d6c2ba18495 msgid "spans" msgstr "" -#: ../../textpage.rst:263 ccaa77c03385443196abf315b0aa755b +#: ../../textpage.rst:268 bf9fdcd40df14bcda53145f233e3ef56 msgid "*list* of span dictionaries" msgstr "スパン辞書の *list*" -#: ../../textpage.rst:266 7a8cd00b43284a249baca4896a1128d2 +#: ../../textpage.rst:271 fa187d7adc9a47ecb61fbbdb00651da2 #, fuzzy msgid "" "The value of key *\"dir\"* is the **unit vector** `dir = (cosine, -sine)`" @@ -924,98 +943,124 @@ msgstr "" "sine)` " "です。次の図を参照してください:各象限内の単語(右上から反時計回りに、上から下まで)は、それぞれ30、120、210、300度回転しています。" -#: ../../textpage.rst:272 2f31738bfe4240cb87db5da5457edbc1 +#: ../../textpage.rst:277 9bb9215f24144aa98bdf2ba3bf53f511 msgid "Span Dictionary" msgstr "" -#: ../../textpage.rst:274 21e36a04dd2b41ccaa2ac5a41fb5382e +#: ../../textpage.rst:279 ede5941b8dfa4244a8c0216c6f7e2cad msgid "" "Spans contain the actual text. A line contains **more than one span " "only**, if it contains text with different font properties." msgstr "スパンには実際のテキストが含まれています。フォントのプロパティが異なるテキストを含む場合を除き、1行には複数のスパンが含まれます。" -#: ../../textpage.rst:276 acb7415ac46a44a9970ad7feb3848dc8 +#: ../../textpage.rst:281 6d53a255181a47a89ae1ffa5b80e2b1a msgid "Changed in version 1.14.17 Spans now also have a *bbox* key (again)." msgstr "バージョン1.14.17で変更されました:スパンには *bbox* キーが含まれています(再び)。" -#: ../../textpage.rst:277 6f96b935f7214bfe9fe0fa959301633b +#: ../../textpage.rst:282 7181bf3c38f348e28414b10b1f15325a msgid "Changed in version 1.17.6 Spans now also have an *origin* key." msgstr "バージョン1.17.6で変更されました:スパンには *origin* キーも含まれています。" -#: ../../textpage.rst:282 f923d31e2410459eaa8dedc4fae4a4fb +#: ../../textpage.rst:287 7a0c3e49b06244d5a3f9b08938753c70 msgid "span rectangle, :data:`rect_like`" msgstr "スパンの矩形、:data:`rect_like`" -#: ../../textpage.rst:283 ../../textpage.rst:342 -#: 19ddd100c6044d19821bea903e5057c5 b0600465d8e14f92ac3a805003dfd603 +#: ../../textpage.rst:288 ../../textpage.rst:371 +#: 941eff0bda7848b1aded9b21d87508d4 fc611070d2e14a749a6523327a435ab1 msgid "origin" msgstr "" -#: ../../textpage.rst:283 f09d7aca2a3943c68fe586af81fc4e0e +#: ../../textpage.rst:288 4e9cfcbb63dd4d3b96d02cac7a72d335 msgid "the first character's origin, :data:`point_like`" msgstr "最初の文字の原点、:data:`point_like`" -#: ../../textpage.rst:284 c69c136d87cf4bc89862073ed84c1721 +#: ../../textpage.rst:289 ffe4ce11ff8e482d8125e561122e8a01 msgid "font" msgstr "" -#: ../../textpage.rst:284 7f0e376cd5414f2bad09fa51c3597434 +#: ../../textpage.rst:289 c193bd6161a1476a895ff5d05e36e414 msgid "font name *(str)*" msgstr "フォント名 *(str)*" -#: ../../textpage.rst:285 c2a55ed9572f4a109fb139375cb1bc66 +#: ../../textpage.rst:290 0f4cf45ac40742c2bdbba91439182885 msgid "ascender" msgstr "" -#: ../../textpage.rst:285 bd02724152a849d2b89d46f0044d26d6 +#: ../../textpage.rst:290 9d18fc7dfd794af3863c8617f6cca80b msgid "ascender of the font *(float)*" msgstr "フォントのアセンダー *(float)*" -#: ../../textpage.rst:286 c2344b66ba184d05aa9e4aa10466a2d1 +#: ../../textpage.rst:291 c8355e31a600438d9aa2f5c09ad08a32 msgid "descender" msgstr "" -#: ../../textpage.rst:286 b336ba9a03874823a74c8503d90682b1 +#: ../../textpage.rst:291 642a93c2137f4f22a445251b97134d53 msgid "descender of the font *(float)*" msgstr "フォントのディセンダー *(float)*" -#: ../../textpage.rst:287 9845052e41e94e50a33fe12778a99e14 +#: ../../textpage.rst:292 0f948a6afd6c40c2af7e4682ea3f0c41 msgid "font size *(float)*" msgstr "フォントサイズ *(float)*" -#: ../../textpage.rst:288 8e3f2dade3e247d585a18e778ebb0c61 +#: ../../textpage.rst:293 3481c94bc1974e3e87ad16a48d7bee02 msgid "flags" msgstr "" -#: ../../textpage.rst:288 a7816ea9a8cf419e8e804b9c2881b985 +#: ../../textpage.rst:293 7ad9d44635b2454b8676ec29468e86d6 msgid "font characteristics *(int)*" msgstr "フォントの特性 *(int)*" -#: ../../textpage.rst:289 35832793702849d1bd851bb4ac0aec5b +#: ../../textpage.rst:294 1bea765fcc0d440780a84e5ff7428ab5 +msgid "char_flags" +msgstr "" + +#: ../../textpage.rst:294 6bbef3a00ae64fe080a4f63e69c11277 +#, fuzzy +msgid "char characteristics *(int)*" +msgstr "フォントの特性 *(int)*" + +#: ../../textpage.rst:295 8eb70c16b7d646e48893ef568ff42402 msgid "color" msgstr "" -#: ../../textpage.rst:289 0a6e2964b4084b18adc2b6e107d2b182 -msgid "text color in sRGB format *(int)*" +#: ../../textpage.rst:295 59eabfe4fab04ba2affa939c5fde49b7 +#, fuzzy +msgid "text color in sRGB format 0xRRGGBB *(int)*." msgstr "sRGB形式のテキストカラー *(int)*" -#: ../../textpage.rst:290 2876eab728ca45e39c13b5d6f8809943 +#: ../../textpage.rst:296 fd9113d3e57447b5b4bdc780cde1dda4 +msgid "alpha" +msgstr "" + +#: ../../textpage.rst:296 d40a9c36fe9f4f0586641e3cf2350ff2 +msgid "text opacity 0..255 *(int)*." +msgstr "" + +#: ../../textpage.rst:297 94ac61d4a8494149a0be110b7b31fbb7 msgid "text" msgstr "" -#: ../../textpage.rst:290 b73467dbaca1421890c7f7ad1d3d3061 +#: ../../textpage.rst:297 71f33f09b5dc4d26a232e868d6a71835 msgid "(only for :meth:`extractDICT`) text *(str)*" msgstr "(:meth:`extractDICT` のみ)テキスト *(str)* " -#: ../../textpage.rst:291 4f3811a922df4407bc672ba06c4da459 +#: ../../textpage.rst:298 badb479f9a6c4f8cb637a1fc27887492 msgid "chars" msgstr "" -#: ../../textpage.rst:291 79d45aaa84014764892eb188e3d62e46 +#: ../../textpage.rst:298 5f31662e0fd54663932aef0cf696bc81 msgid "(only for :meth:`extractRAWDICT`) *list* of character dictionaries" msgstr "(:meth:`extractRAWDICT` のみ)文字の辞書の*list*" -#: ../../textpage.rst:294 032a6e7c979d464190a8137d3928dddd +#: ../../textpage.rst:301 2e5c684a3b98457dad2eeca01251bcbe +msgid "|history_begin|" +msgstr "" + +#: ../../textpage.rst:303 af2202bc94eb4986b35814e7062ea2af +msgid "*(New in version 1.25.3.0):* Added *\"alpha\"* item." +msgstr "" + +#: ../../textpage.rst:305 346a48e9dc164f95a383ca075ec44282 msgid "" "*(New in version 1.16.0):* *\"color\"* is the text color encoded in sRGB " "(int) format, e.g. 0xFF0000 for red. There are functions for converting " @@ -1028,7 +1073,7 @@ msgstr "" " :meth:`sRGB_to_pdf` または(R、G、B)、:meth:`sRGB_to_rgb` " "(整数値で0から255の範囲)に変換するための関数があります。" -#: ../../textpage.rst:296 312e90e2af0742e29c298e48c038cca0 +#: ../../textpage.rst:307 01cb891c462347beb23cc803ba6f273d msgid "" "*(New in v1.18.5):* *\"ascender\"* and *\"descender\"* are font " "properties, provided relative to :data:`fontsize` 1. Note that descender " @@ -1039,7 +1084,11 @@ msgstr "" ":data:`fontsize` " "1に対して提供されます。ディセンダーは負の値であることに注意してください。以下の画像は、他の値やプロパティとの関係を示しています。" -#: ../../textpage.rst:301 b61d8f25d7964876ae7940213c88b884 +#: ../../textpage.rst:309 38509ecdb88249a89b1f87e100af2794 +msgid "|history_end|" +msgstr "" + +#: ../../textpage.rst:314 2ba023fe0c7d4f3a84c985d6d42257e0 msgid "" "These numbers may be used to compute the minimum height of a character " "(or span) -- as opposed to the standard height provided in the \"bbox\" " @@ -1050,7 +1099,7 @@ msgstr "" "これらの数字は、文字(またはスパン)の最小の高さを計算するために使用できます。これは、実際には行の高さを表す「bbox」値ではなく、フォントサイズに完全に合わせるための高さを表します。次のコードは、スパンのbboxを、内部のテキストに完全に合わせる高さが" " **フォントサイズ** となるように再計算します:" -#: ../../textpage.rst:311 4ee464d2cf6145fca83019439bd828a5 +#: ../../textpage.rst:324 23459ad4eef14d39af6467b841bb249d msgid "" "The above calculation may deliver a **larger** height! This may e.g. " "happen for OCRed documents, where the risk of all sorts of text artifacts" @@ -1064,55 +1113,58 @@ msgstr "" ":data:`fontsize` から独立して、適切なbboxの高さを見つけ出そうとします。したがって、`span[\"bbox\"]` の高さが" " `span[\"size\"]` よりも大きいことを確認してください。" -#: ../../textpage.rst:313 68e5a41860b142da9790ffa919ddc281 +#: ../../textpage.rst:326 8a9f78a3ca49476bb09d47f7c0037fd2 msgid "" "You may request PyMuPDF to do all of the above automatically by executing" -" `pymupdf.TOOLS.set_small_glyph_heights(True)`. This sets a global parameter" -" so that all subsequent text searches and text extractions are based on " -"reduced glyph heights, where meaningful." +" `pymupdf.TOOLS.set_small_glyph_heights(True)`. This sets a global " +"parameter so that all subsequent text searches and text extractions are " +"based on reduced glyph heights, where meaningful." msgstr "" "PyMuPDFに対して、`pymupdf.TOOLS.set_small_glyph_heights(True)` " "を実行して、上記のすべてを自動的に実行するように依頼することができます。これは、すべての後続のテキスト検索とテキスト抽出が、縮小されたグリフの高さを基に行われるようにするためのグローバルパラメータを設定します。" -#: ../../textpage.rst:315 e50d2714c900470d98ea9a65be3834d9 +#: ../../textpage.rst:328 4c2b61999a4e4a13b8d42222a75f0b77 msgid "" "The following shows the original span rectangle in red and the rectangle " "with re-computed height in blue." msgstr "以下は、元のspanの矩形を赤で、再計算された高さを持つ矩形を青で示しています。" -#: ../../textpage.rst:321 a7803e8aedfe44f29a7d0c05a05df44b +#: ../../textpage.rst:334 de6eebad5e374780b4087dafc5a35cea msgid "" "*\"flags\"* is an integer, which represents font properties except for " "the first bit 0. They are to be interpreted like this:" msgstr "*\"flags\"* は、フォントのプロパティを表す整数で、最初のビット 0 を除いて次のように解釈されます:" -#: ../../textpage.rst:323 e56ab9d1a159422f872a4c98d181b291 +#: ../../textpage.rst:336 ba741a3fc759485985d49c19f01c9ef8 +#, fuzzy msgid "" -"bit 0: superscripted (2\\ :sup:`0`) -- not a font property, detected by " -"MuPDF code." +"bit 0: superscripted (:data:`TEXT_FONT_SUPERSCRIPT`) -- not a font " +"property, detected by MuPDF code." msgstr "bit 0: superscripted (2\\ :sup:`0`) - フォントのプロパティではなく、MuPDFコードによって検出されます。" -#: ../../textpage.rst:324 72d27ae63fe446c38cbeacda89a59319 -msgid "bit 1: italic (2\\ :sup:`1`)" -msgstr "ビット 1: イタリック(2\\ :sup:`1`)" +#: ../../textpage.rst:337 78e75a3016a143eebba37096ad39d511 +msgid "bit 1: italic (:data:`TEXT_FONT_ITALIC`)" +msgstr "" -#: ../../textpage.rst:325 5ec44ba8da8747d1aeb0d00b360eb3b0 -msgid "bit 2: serifed (2\\ :sup:`2`)" +#: ../../textpage.rst:338 dea957fa07fb47e58b4eaa819d064d78 +#, fuzzy +msgid "bit 2: serifed (:data:`TEXT_FONT_SERIFED`)" msgstr "ビット 2: セリフ付き (2\\ :sup:`2`)" -#: ../../textpage.rst:326 7534309903a44e4dacb296e2838c5438 -msgid "bit 3: monospaced (2\\ :sup:`3`)" +#: ../../textpage.rst:339 9af423dfcf754de499eec516291b3dfa +#, fuzzy +msgid "bit 3: monospaced (:data:`TEXT_FONT_MONOSPACED`)" msgstr "ビット 3: モノスペース (2\\ :sup:`3`)" -#: ../../textpage.rst:327 58396e3ac9984fda9cf6a2c18ee61fb8 -msgid "bit 4: bold (2\\ :sup:`4`)" -msgstr "ビット 4: ボールド (2\\ :sup:`4`)" +#: ../../textpage.rst:340 251453629796445893d21c28cc8124ea +msgid "bit 4: bold (:data:`TEXT_FONT_BOLD`)" +msgstr "" -#: ../../textpage.rst:329 b387ab449329462a915e25b8e116ee1d +#: ../../textpage.rst:342 59a6d01576154fe9bf8e8b9051b33213 msgid "Test these characteristics like so:" msgstr "これらの特性は、次のようにテストできます:" -#: ../../textpage.rst:334 242cfaeaef0d4445895a90a2fe2c460d +#: ../../textpage.rst:348 bfc7d6a052ce4fce8790ede3a436fb69 msgid "" "Bits 1 thru 4 are font properties, i.e. encoded in the font program. " "Please note, that this information is not necessarily correct or " @@ -1121,42 +1173,94 @@ msgstr "" "ビット1からビット4までがフォントのプロパティであり、つまりフォントプログラムにエンコードされています。 " "ただし、この情報は必ずしも正確または完全ではないことに注意してください。フォントにはしばしば誤ったデータが含まれていることがあります。" -#: ../../textpage.rst:337 d8bcedb7d79a4c9ca75b50586884a5ab +#: ../../textpage.rst:350 4d1498d57d2b4c69ba82c3d86493fb97 +msgid "" +"*\"char_flags\"* is an integer, which represents extra character " +"properties:" +msgstr "" + +#: ../../textpage.rst:352 3612fbd5dadd402d99e182ef3b916ea7 +msgid "bit 0: strikeout." +msgstr "" + +#: ../../textpage.rst:353 3fdaa90226ad4e3dbe95664df8eea0cf +msgid "bit 1: underline." +msgstr "" + +#: ../../textpage.rst:354 0c3f086196de4719af885a8be8c7e0d0 +msgid "bit 2: synthetic (always 0, see char dictionary)." +msgstr "" + +#: ../../textpage.rst:355 8168d259a6994df58b08b6a5bb6e528d +msgid "bit 3: filled." +msgstr "" + +#: ../../textpage.rst:356 b15cbf775d8242179c6218dcf678dfbc +msgid "bit 4: stroked." +msgstr "" + +#: ../../textpage.rst:357 fe26904a6aef423cb032d941a3f16e7f +msgid "bit 5: clipped." +msgstr "" + +#: ../../textpage.rst:359 cc08341dee4841cdb9efce8f8328c72c +msgid "" +"For example if not filled and not stroked (`if not (char_flags & 2**3 & " +"2**4): ...`) then the text will be invisible." +msgstr "" + +#: ../../textpage.rst:362 1a73125e6b5d4636bef571142a56d348 +msgid "(`char_flags` is new in v1.25.2.)" +msgstr "" + +#: ../../textpage.rst:366 fc0755117ea040d38d703aefe8a1d835 msgid "Character Dictionary for :meth:`extractRAWDICT`" msgstr "文字のディクショナリ、:meth:`extractRAWDICT`" -#: ../../textpage.rst:342 07b80edd91d648229fd38f378ba54b38 +#: ../../textpage.rst:371 d5cbb8a9af1f4428896b1b7fc4d8c549 msgid "character's left baseline point, :data:`point_like`" msgstr "文字の左ベースラインポイント、:data:`point_like`" -#: ../../textpage.rst:343 3696d8865650443e9991b3a1f63f32b0 +#: ../../textpage.rst:372 a46239e4f25e455bb2cdf5860328b0d7 msgid "character rectangle, :data:`rect_like`" msgstr "文字の矩形、:data:`rect_like`" -#: ../../textpage.rst:344 18cb535177fb4f7f88e7687f58d1e9e3 +#: ../../textpage.rst:373 446a80c6a1ac4c898322c4e4c35aa223 +msgid "synthetic" +msgstr "" + +#: ../../textpage.rst:373 739878748b6447ef82df79dedaf0f65a +msgid "bool." +msgstr "" + +#: ../../textpage.rst:374 698361d0ea704ea78d1c12e2544b28b4 msgid "c" msgstr "" -#: ../../textpage.rst:344 37babd51ac6b4d398b468bac7247c7e5 +#: ../../textpage.rst:374 24b9cd869f7344bd90d6f40b1c3862d3 msgid "the character (unicode)" msgstr "文字(ユニコード)" -#: ../../textpage.rst:347 6dd2351ab73a49698534b7cc6d7abb55 +#: ../../textpage.rst:377 9a4e847fd26a450ab6af91fa2f536982 +msgid "(`synthetic` is new in v1.25.3.)" +msgstr "" + +#: ../../textpage.rst:379 8ad57f9575ed4fa9bdfbde5224fb43a3 msgid "" "This image shows the relationship between a character's bbox and its " "quad: |textpagechar|" msgstr "この画像は、文字のbboxとそのquadの関係を示しています:|textpagechar|" -#: ../../textpage.rst:349 32f816eba26d4065ab29b35ad3bc3eff -#: dfd291944d684c3ab6c9485fa6a8a0ea +#: ../../textpage.rst:381 1917647d6d434b7e9f9f59d21e6be2b1 +#: 3f06e78ea445472d92030debab4e3b04 msgid "textpagechar" msgstr "" -#: ../../textpage.rst:355 6e0e9969e8dc4d46ad43207472493aff +#: ../../textpage.rst:386 c5dd21ec4aaf4022b18a1dec50c7908d msgid "Footnotes" msgstr "脚注" -#: ../../textpage.rst:356 f1480000318e4d1ba7ce99e68cf4dc76 +#: ../../textpage.rst:387 46ddf86e85364b05abc5c9ea6a706b17 msgid "" "Image specifications for a PDF page are done in a page's (sub-) " ":data:`dictionary`, called `/Resources`. Resource dictionaries can be " @@ -1170,7 +1274,7 @@ msgid "" "definition will show fonts and images that are actually used." msgstr "" -#: ../../textpage.rst:358 dbd8da99e20b48adaf6157b83814f9eb +#: ../../textpage.rst:389 63c6426e75ed40b49222361f407a4bec msgid "" "The coordinate systems of MuPDF and PDF are different in that MuPDF uses " "the page's top-left point as `(0, 0)`. In PDF, this is the bottom-left " @@ -1179,14 +1283,10 @@ msgid "" "**negative** value indicates anti-clockwise rotation of the text." msgstr "" -#: ../../footer.rst:71 cf585f75b90e4583907c03ef1d7897c4 +#: ../../footer.rst:60 a56c8b8ce8ae4441b082d7b78de8ab79 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 dc218ab3f7fe413d982bb0606429054d -msgid "Discord logo" -msgstr "" - #~ msgid "" #~ "Image specifications for a PDF page " #~ "are done in a page's (sub-) " @@ -1207,3 +1307,27 @@ msgstr "" #~ "を定義し、すべてのページで使用されるすべての画像とフォントを名前で指定する場合があります。これらの場合、:meth:`Page.get_images`" #~ " と :meth:`Page.get_fonts` はすべてのページに対して同じリストを返します。" +#~ msgid "*(Changed in v1.18.0)* -- new dict key *number*, the block number." +#~ msgstr "*(v1.18.0で変更)* - 新しいdictキー *number* 、ブロック番号。" + +#~ msgid "" +#~ "*(Changed in v1.18.11)* -- new dict " +#~ "key *transform*, the image transformation " +#~ "matrix for image blocks." +#~ msgstr "*(v1.18.11で変更)* - 新しいdictキー *transform* 、画像ブロックの画像変換行列。" + +#~ msgid "" +#~ "*(Changed in v1.18.11)* -- new dict " +#~ "key *size*, the size of the image" +#~ " in bytes for image blocks." +#~ msgstr "*(v1.18.11で変更)* - 新しいdictキー *size* 、画像ブロックのバイト単位の画像サイズ。" + +#~ msgid "bit 1: italic (2\\ :sup:`1`)" +#~ msgstr "ビット 1: イタリック(2\\ :sup:`1`)" + +#~ msgid "bit 4: bold (2\\ :sup:`4`)" +#~ msgstr "ビット 4: ボールド (2\\ :sup:`4`)" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/textwriter.mo b/docs/locales/ja/LC_MESSAGES/textwriter.mo index 96130c2f4..a5d1693c9 100644 Binary files a/docs/locales/ja/LC_MESSAGES/textwriter.mo and b/docs/locales/ja/LC_MESSAGES/textwriter.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/textwriter.po b/docs/locales/ja/LC_MESSAGES/textwriter.po index 27a07f0c3..883f287eb 100644 --- a/docs/locales/ja/LC_MESSAGES/textwriter.po +++ b/docs/locales/ja/LC_MESSAGES/textwriter.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,35 +19,35 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 d67f17aaa4f34784960da6f470912d67 +#: ../../header.rst:-1 e25f415be312493ea3ae1f28db48fb1a msgid "Artifex" msgstr "" -#: ../../header.rst:-1 a621bd29acae401aad5c35c817832efe +#: ../../header.rst:-1 dccdc4856fd544a882af2b070c10a666 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 38a58b6651c849cca78c17655a9c9367 +#: ../../header.rst:-1 6bd5a3c81bd94748ba267f88934f7963 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../textwriter.rst:7 e589c9674e6e4eb48166b4ea438300a3 +#: ../../textwriter.rst:7 c6975d5fbc08457291e33247e41b0c83 msgid "TextWriter" msgstr "TextWriter (テキストライター)" -#: ../../textwriter.rst:9 9285721e32f64c30ab01edf532634a8a +#: ../../textwriter.rst:9 1e02a43a34c840cb955678ee25bd31ce msgid "|pdf_only_class|" msgstr "PDFのみ。" -#: ../../textwriter.rst:11 b28882b66e9f450ea39dfd7a97413de2 +#: ../../textwriter.rst:11 11e7bf38655543ffa60d8816581dbabf msgid "New in v1.16.18" msgstr "v1.16.18で新たに追加" -#: ../../textwriter.rst:13 737b0ea508f844d0935fef4b92318e71 +#: ../../textwriter.rst:13 3c8bfbc5ff924a9eb9b6b94109ec34f9 msgid "" "This class represents a MuPDF *text* object. The basic idea is to " "**decouple (1) text preparation, and (2) text output** to PDF pages." @@ -55,7 +55,7 @@ msgstr "" "このクラスはMuPDFの *text* " "オブジェクトを表します。**基本的なアイデアは、(1)テキストの準備と(2)PDFページへのテキストの出力を切り離すことです** 。" -#: ../../textwriter.rst:15 68af2efe11e74257821ac76965e40b11 +#: ../../textwriter.rst:15 da54ba43f33e4678af8bf51e628f29df msgid "" "During **preparation**, a text writer stores any number of text pieces " "(\"spans\") together with their positions and individual font " @@ -65,13 +65,13 @@ msgstr "" "**準備**中、テキストライターはテキストピース(「スパン」)を任意の数保存し、それぞれの位置と個別のフォント情報とともに保存します。ライターの準備されたコンテンツの" " **出力** は、互換性のあるページサイズを持つ任意のPDFページに複数回行われる可能性があります。" -#: ../../textwriter.rst:17 34fdc10a3a694bfb9eb1de4ef15f8ff4 +#: ../../textwriter.rst:17 f4c7ab10f0a34399b9c1dc1ad38e4600 msgid "" "A text writer is an elegant alternative to methods " ":meth:`Page.insert_text` and friends:" msgstr "テキストライターは、:meth:`Page.insert_text` などと比較して、次の点で優れた代替手段です:" -#: ../../textwriter.rst:19 3d92beb585594fd1abc1b9dc03f38194 +#: ../../textwriter.rst:19 42ac247fde9442d0b8e6a634d87a2a00 msgid "" "**Improved text positioning:** Choose any point where insertion of text " "should start. Storing text returns the \"cursor position\" after the " @@ -80,7 +80,7 @@ msgstr "" "**改良されたテキスト配置:** テキストを挿入する開始点を任意に選択できます。テキストの保存はスパンの *最後の文字の後* " "の「カーソル位置」を返します。" -#: ../../textwriter.rst:20 d5b1f0a5087f4d87a44463390d631c92 +#: ../../textwriter.rst:20 f934f37c93a4447da9cfb972800a8e21 msgid "" "**Free font choice:** Each text span has its own font and " ":data:`fontsize`. This lets you easily switch when composing a larger " @@ -89,7 +89,7 @@ msgstr "" "**自由なフォントの選択:** 各テキストスパンには独自のフォントと :data:`fontsize` " "があります。大きなテキストを作成する際に簡単に切り替えることができます。" -#: ../../textwriter.rst:21 b5e962600c8e4917ac1896ebc5202fef +#: ../../textwriter.rst:21 c3a1e5ba5ac246a0821a2de8b88cab5c msgid "" "**Automatic fallback fonts:** If a character is not supported by the " "chosen font, alternative fonts are automatically searched. This " @@ -105,14 +105,14 @@ msgstr "" "**すべてのCJK**文字(中国語、日本語、韓国語)をサポートする **ユニバーサルフォント「Droid Sans Fallback " "Regular」** を提供します。" -#: ../../textwriter.rst:22 dce96f23fe124470aa3b56427785eb17 +#: ../../textwriter.rst:22 4c231b43d07c45538b5adbc94bbc0cb1 msgid "" "**Cyrillic and Greek Support:** The :ref:`Base-14-fonts` have integrated " "support of Cyrillic and Greek characters **without specifying encoding.**" " Your text may be a mixture of Latin, Greek and Cyrillic." msgstr "キリル文字とギリシャ文字のサポート:PDFベース14フォントには、エンコーディングを指定せずにキリル文字とギリシャ文字の統合サポートがあります。テキストはラテン文字、ギリシャ文字、キリル文字の混合である可能性があります。" -#: ../../textwriter.rst:23 3fa660477735492e86a8d9de62d9ecb5 +#: ../../textwriter.rst:23 719a06928f8c4e278b7cc35cdb535838 msgid "" "**Transparency support:** Parameter *opacity* is supported. This offers a" " handy way to create watermark-style text." @@ -120,7 +120,7 @@ msgstr "" "**透明度のサポート:** パラメータの *透明度* " "がサポートされています。これはウォーターマークスタイルのテキストを作成する便利な方法を提供します。" -#: ../../textwriter.rst:24 94e2d3fe67ef46f4963578ec976a6b4e +#: ../../textwriter.rst:24 a43dc70b42144ecaac47bf7487da71ce msgid "" "**Justified text:** Supported for any font -- not just simple fonts as in" " :meth:`Page.insert_textbox`." @@ -128,7 +128,7 @@ msgstr "" "**両端揃えのテキスト**: :meth:`Page.insert_textbox` " "のような単純なフォントだけでなく、すべてのフォントでサポートされています。" -#: ../../textwriter.rst:25 c4955438b8c145deb845cdaa42aa16a9 +#: ../../textwriter.rst:25 eeff1d730fb54a3aa436c9443c2ea821 msgid "" "**Reusability:** A TextWriter object exists independent from PDF pages. " "It can be written multiple times, either to the same or to other pages, " @@ -138,11 +138,11 @@ msgstr "" "**再利用性:** " "テキストライターオブジェクトはPDFページとは独立して存在します。同じページまたは異なるページ、同じPDFまたは異なるPDFに、異なる色や透明度を選択して複数回書き込むことができます。" -#: ../../textwriter.rst:27 bc5d6dfd5a404282af5fe838d858fadc +#: ../../textwriter.rst:27 6e5ca11e783d4ea3a50555b4a02fcd09 msgid "Using this object entails three steps:" msgstr "このオブジェクトを使用するには、次の3つのステップが必要です:" -#: ../../textwriter.rst:29 37f1d845f5c74329814edf094d42965e +#: ../../textwriter.rst:29 314e49bf63ea43dc95427576b7fc80a4 msgid "" "When **created**, a TextWriter requires a fixed **page rectangle** in " "relation to which it calculates text positions. A text writer can write " @@ -151,7 +151,7 @@ msgstr "" "**作成** 時に、テキストライターはテキストの位置を計算するために関連する固定 **ページの矩形** " "を必要とします。テキストライターは、このサイズのページにのみ書き込むことができます。" -#: ../../textwriter.rst:30 c04b5c00bdf0413aa07d4105d725b287 +#: ../../textwriter.rst:30 0d4841a7acae4e7bb3783b7074b74ff8 msgid "" "Store text in the TextWriter using methods :meth:`TextWriter.append`, " ":meth:`TextWriter.appendv` and :meth:`TextWriter.fill_textbox` as often " @@ -161,11 +161,11 @@ msgstr "" ":meth:`TextWriter.append`、:meth:`TextWriter.appendv`、および " ":meth:`TextWriter.fill_textbox` メソッドで必要な回数だけ保存します。" -#: ../../textwriter.rst:31 536041854079474b89a447c98a29aeb5 +#: ../../textwriter.rst:31 c8a2949e8a4948538a9b5dc92a01e0d0 msgid "Output the TextWriter object on some PDF page(s)." msgstr "TextWriter オブジェクトをいくつかのPDFページに出力します。" -#: ../../textwriter.rst:35 5eb1813dfe8942319d45b557d3a6eeb7 +#: ../../textwriter.rst:35 cf8b65d52fbb49a991fd273bb016bf4a msgid "" "Starting with version 1.17.0, TextWriters **do support** text rotation " "via the *morph* parameter of :meth:`TextWriter.write_text`." @@ -173,7 +173,7 @@ msgstr "" "バージョン1.17.0から、TextWriterは :meth:`TextWriter.write_text` の *morph* " "パラメータを介したテキストの回転を **サポートしています** 。" -#: ../../textwriter.rst:37 a7846eac052b4f5bb609dee4c92935e8 +#: ../../textwriter.rst:37 508f78dbbb7447b1940f851703db0ab1 msgid "" "There also exists :meth:`Page.write_text` which combines one or more " "TextWriters and jointly writes them to a given rectangle and with a given" @@ -183,108 +183,108 @@ msgstr "" "も存在し、1つ以上のTextWriterを組み合わせて、指定された矩形と回転角に共同で書き込みます - " ":meth:`Page.show_pdf_page` のように。" -#: ../../textwriter.rst:41 bc4031a77d20464691d1d43b180144a2 +#: ../../textwriter.rst:41 b9dde294925e4ffa8949f1fcd7efc0d6 msgid "**Method / Attribute**" msgstr "**メソッド / 属性**" -#: ../../textwriter.rst:41 dd8cf893d0f4446aaf3c39fdd1996f6e +#: ../../textwriter.rst:41 6874cb44f5fb40189f0e82c957eb93c2 msgid "**Short Description**" msgstr "**短い説明**" -#: ../../textwriter.rst:43 f6a618759f0c4ff299ef5d7fae7e9954 +#: ../../textwriter.rst:43 91a4db0d70e644b38347b983e8de2378 msgid ":meth:`~TextWriter.append`" msgstr "" -#: ../../textwriter.rst:43 af8d3cea615f46df9acb3e8d7ee660fc +#: ../../textwriter.rst:43 390f1d022b7c4d7eaa44addf02bd9541 msgid "Add text in horizontal write mode" msgstr "水平書き込みモードでテキストを追加します。" -#: ../../textwriter.rst:44 276ec530a3db44adb8bcc87df74ce348 +#: ../../textwriter.rst:44 0818893bc21040279507a817b4fe3e2f msgid ":meth:`~TextWriter.appendv`" msgstr "" -#: ../../textwriter.rst:44 dc0578a3a54a4188a8e585f886bd19e2 +#: ../../textwriter.rst:44 cc29cf869e3a4ddebaffec427cc86bfe msgid "Add text in vertical write mode" msgstr "垂直書き込みモードでテキストを追加します。" -#: ../../textwriter.rst:45 18a4213262c24390bb77cbac49bbdfbe +#: ../../textwriter.rst:45 ca1023883a45422f8c1b21b28b0e3044 msgid ":meth:`~TextWriter.fill_textbox`" msgstr "" -#: ../../textwriter.rst:45 d0fdcb3c35904a7aab551505e106c0d1 +#: ../../textwriter.rst:45 d5365f88499d403fb866da0ab00671c5 msgid "Fill rectangle (horizontal write mode)" msgstr "矩形を埋めます(水平書き込みモード)。" -#: ../../textwriter.rst:46 57caa021bb784e4b93a60d61a81369d8 +#: ../../textwriter.rst:46 5b5d070b02f44d9fb33bd428ccb17934 msgid ":meth:`~TextWriter.write_text`" msgstr "" -#: ../../textwriter.rst:46 8385bb1b9f2145d2a034a3038f49952e +#: ../../textwriter.rst:46 613eabdf09fd469184886211223d59e7 msgid "Output TextWriter to a PDF page" msgstr "TextWriterをPDFページに出力します。" -#: ../../textwriter.rst:47 6f39ff2e5e7c4b20845faffb3ff62a10 +#: ../../textwriter.rst:47 1a531a26cdb746f3857ef7fada50219e msgid ":attr:`~TextWriter.color`" msgstr "" -#: ../../textwriter.rst:47 b9fecbf6478a489fa79b52fc7de36d6d +#: ../../textwriter.rst:47 29ba5a45348247229302210dbc130067 msgid "Text color (can be changed)" msgstr "テキストの色(変更可能です)。" -#: ../../textwriter.rst:48 6442aff6553a4adb96e092855d8417ae +#: ../../textwriter.rst:48 188c20529cd945769c55331d971c9362 msgid ":attr:`~TextWriter.last_point`" msgstr "" -#: ../../textwriter.rst:48 36429071fef648b087fa8b0fd1fda700 +#: ../../textwriter.rst:48 b4bc687b96754e70a6f3b3f0f2282776 msgid "Last written character ends here" msgstr "最後に書かれた文字がここで終了します。" -#: ../../textwriter.rst:49 0a2690064933492fa708aa09d385555b +#: ../../textwriter.rst:49 5ecb99aea0944b4cbea149dcdd9ca21a msgid ":attr:`~TextWriter.opacity`" msgstr "" -#: ../../textwriter.rst:49 325d2b01caa54185a26dbb5470083ee7 +#: ../../textwriter.rst:49 18659a4d57d74c8c8de94ce5ec865320 msgid "Text opacity (can be changed)" msgstr "テキストの透明度(変更可能です)。" -#: ../../textwriter.rst:50 653d21b6a7b347c3aca5ee7545bd0792 +#: ../../textwriter.rst:50 4480e5d7099243dda1ca52a74d125365 msgid ":attr:`~TextWriter.rect`" msgstr "" -#: ../../textwriter.rst:50 b253588679404333a07c54190413ba4d +#: ../../textwriter.rst:50 8fcf6c35ee0e40d5bc4e36c04a44edd9 msgid "Page rectangle used by this TextWriter" msgstr "このTextWriterが使用するページの矩形。" -#: ../../textwriter.rst:51 71b7a3d214e2461daa8b128bb2325e5e +#: ../../textwriter.rst:51 9693e129190248b583296d46677610e0 msgid ":attr:`~TextWriter.text_rect`" msgstr "" -#: ../../textwriter.rst:51 7d8790b54edd4e68aaeeab8193fd8dc4 +#: ../../textwriter.rst:51 69eb3e220ad148129ada9f5080199b7f msgid "Area occupied so far" msgstr "現在までに占有された領域。" -#: ../../textwriter.rst:55 bb772180002d489aa8241769d618518a +#: ../../textwriter.rst:55 ecbf87c3092c40e88b1686b77c83e7d2 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../textwriter.rst 4086ef253a5345669a01307760837492 -#: 48e4310698b54bdd8664ca43b790d406 57ded09727c54f0ea5dca07f9dacedca -#: b74a23f397154e8d82d24ffbe9099684 cc1370bb54e4422da2ed72ec69ea9cc3 +#: ../../textwriter.rst 03eaec6ab7cf480595ca2a22f6965c0b +#: 286e269d3d7e43ec95f9bc1551929f6f 33df58e1dd004b55aa255fcdc31b691c +#: a60948696f864a7390141db86c5ebed8 f7f0df94f8fc4e4b88f8242397bdcbbe msgid "Parameters" msgstr "" -#: ../../textwriter.rst:61 173952eff86c49fbaf93c04237dc56d0 +#: ../../textwriter.rst:61 bbcff21e7dce4c01a49526e7bfacc9e3 msgid "rectangle internally used for text positioning computations." msgstr "テキストの配置計算に内部的に使用される矩形。" -#: ../../textwriter.rst:62 c85dafde3e4c4e14a906dca39fe4104b +#: ../../textwriter.rst:62 0df6eb5234844aada8962468bee150af msgid "" "sets the transparency for the text to store here. Values outside the " "interval `[0, 1)` will be ignored. A value of e.g. 0.5 means 50% " "transparency." msgstr "ここに保存されるテキストの透明度を設定します。区間 `[0, 1)` 外の値は無視されます。例:0.5の場合、50%の透明度を意味します。" -#: ../../textwriter.rst:63 47477e23d3b34bd4905ab449b6cf206f +#: ../../textwriter.rst:63 9aba40bdb8d542fb939849ac1ea1b1df msgid "" "the color of the text. All colors are specified as floats *0 <= color <= " "1*. A single float represents some gray level, a sequence implies the " @@ -293,41 +293,41 @@ msgstr "" "テキストの色。すべての色は浮動小数点数 *0 <= color <= 1* " "として指定されます。単一の浮動小数点数は一定の灰色レベルを表し、シーケンスはその長さを介して色空間を示します。" -#: ../../textwriter.rst:68 c01cdb737738461b8c2f8f9437cd04b8 +#: ../../textwriter.rst:68 4a2e21d3e62e4b87aefffc34a94e609a msgid "*Changed in v1.18.9*" msgstr "*バージョン1.18.9で変更*" #: ../../textwriter.rst:69 ../../textwriter.rst:100 -#: 4eee713bc9654e5caf9a4496b5c22f20 cc4f3e77ee8747f8b29f57d3c8c89bf3 +#: 1044467fdfcd441f9b5bfa8e0e0e8130 1d08a5d40d214ab680cf8793d311258d msgid "*Changed in v1.18.15*" msgstr "*バージョン1.18.15で変更*" -#: ../../textwriter.rst:71 1729e887f93a440bb9d7e49ba5182b25 +#: ../../textwriter.rst:71 3ca6ee533b09435abe5ceddf7b7cb27a msgid "Add some new text in horizontal writing." msgstr "水平書き込みで新しいテキストを追加します。" #: ../../textwriter.rst:73 ../../textwriter.rst:104 -#: ca21962121e142858937582ee4178035 f64e51104dac47b09130129831aa8d5c +#: ab09fda39d3e4393a29ec59b69c0e1ea f5214f793d2744af9340193c95565897 msgid "start position of the text, the bottom left point of the first character." msgstr "テキストの開始位置、最初の文字の左下の点です。" -#: ../../textwriter.rst:74 683b2477309b4046b2efea047462772c +#: ../../textwriter.rst:74 4a82511a99cb44e9bf3d1a6b21723548 msgid "" "a string of arbitrary length. It will be written starting at position " "\"pos\"." msgstr "任意の長さの文字列。位置「pos」から書き始められます。" #: ../../textwriter.rst:75 ../../textwriter.rst:106 -#: 2f9322133af545c08469215aa0617d73 37787bf15b5745f0be2ba635f5471f21 +#: a5950a0164694f058048e1fe83c69aea ae30e02ec0124cb28f914a306f3c4a95 msgid "a :ref:`Font`. If omitted, `pymupdf.Font(\"helv\")` will be used." msgstr ":ref:`Font`。省略された場合、`pymupdf.Font(\"helv\")` が使用されます。" -#: ../../textwriter.rst:76 71da7ae11cb847a59466140c67f67ea3 +#: ../../textwriter.rst:76 d9a53946e7c24a4d99d8138582744c5b msgid "the :data:`fontsize`, a positive number, default 11." msgstr ":data:`fontsize`、正の数、デフォルトは11です。" #: ../../textwriter.rst:77 ../../textwriter.rst:108 -#: 0bfee33ff8e54b29b17fedc421af55ac a7a53f3d3a6c4758904d162038d16d84 +#: 3873988af95148b7801a88eb7c01984c 4e3b9506d8504e24985ba55c6ec9282c msgid "" "the language to use, e.g. \"en\" for English. Meaningful values should be" " compliant with the ISO 639 standards 1, 2, 3 or 5. Reserved for future " @@ -336,37 +336,37 @@ msgstr "" "使用する言語、例:英語の場合は \"en\"。意味のある値はISO " "639規格1、2、3、または5に準拠している必要があります。将来の使用を予約しています:現在はわかる限りでは何の効果もありません。" -#: ../../textwriter.rst:78 24099820bdf34fd88c76252c309cf806 +#: ../../textwriter.rst:78 55d4902125eb472292eb77593b90e7e5 msgid "" "*(New in v1.18.9)* whether the text should be written from right to left." -" Applicable for languages like Arabian or Hebrew. Default is *False*. If " -"*True*, any Latin parts within the text will automatically converted. " -"There are no other consequences, i.e. :attr:`TextWriter.last_point` will " -"still be the rightmost character, and there neither is any alignment " -"taking place. Hence you may want to use :meth:`TextWriter.fill_textbox` " -"instead." +" Applicable for languages like Arabian or Hebrew. Default is ``False``. " +"If ``True``, any Latin parts within the text will automatically " +"converted. There are no other consequences, i.e. " +":attr:`TextWriter.last_point` will still be the rightmost character, and " +"there neither is any alignment taking place. Hence you may want to use " +":meth:`TextWriter.fill_textbox` instead." msgstr "" "*(バージョン1.18.9で新機能)* テキストを右から左に書くかどうか。アラビア語やヘブライ語などの言語に適用されます。デフォルトは " -"*False* です。*True* " +"``False`` です。``True`` " "の場合、テキスト内のラテン語部分は自動的に変換されます。他に何の影響もないため、:attr:`TextWriter.last_point` " "は依然として最右の文字ですし、配置も行われません。そのため、代わりに :meth:`TextWriter.fill_textbox` " "を使用することがあります。" -#: ../../textwriter.rst:79 55a5ea005e0c40799869278686a0d7ef +#: ../../textwriter.rst:79 f750558225c04c6da0549d0056048f3d msgid "" "*(New in v1.18.15)* look for the character's Small Capital version in the" " font. If present, take that value instead. Otherwise the original " "character (this font or the fallback font) will be taken. The fallback " "font will never return small caps. For example, this snippet:: >>> doc =" -" pymupdf.open() >>> page = doc.new_page() >>> text = \"PyMuPDF: the Python " -"bindings for MuPDF\" >>> font = pymupdf.Font(\"figo\") # choose a font with" -" small caps >>> tw = pymupdf.TextWriter(page.rect) >>> tw.append((50,100), " -"text, font=font, small_caps=True) >>> tw.write_text(page) >>> " -"doc.ez_save(\"x.pdf\") will produce this PDF text: .. image:: images" -"/img-smallcaps.*" +" pymupdf.open() >>> page = doc.new_page() >>> text = \"PyMuPDF: the " +"Python bindings for MuPDF\" >>> font = pymupdf.Font(\"figo\") # choose a" +" font with small caps >>> tw = pymupdf.TextWriter(page.rect) >>> " +"tw.append((50,100), text, font=font, small_caps=True) >>> " +"tw.write_text(page) >>> doc.ez_save(\"x.pdf\") will produce this PDF " +"text: .. image:: images/img-smallcaps.*" msgstr "" -#: ../../textwriter.rst:79 c09fb96d7ae946d0a654f6901c05de45 +#: ../../textwriter.rst:79 432cbd7ed9054416a5191bfef24de2e8 msgid "" "*(New in v1.18.15)* look for the character's Small Capital version in the" " font. If present, take that value instead. Otherwise the original " @@ -376,17 +376,17 @@ msgstr "" "*(バージョン1.18.15で新機能)* " "フォント内の文字の小文字バージョンを探します。存在する場合、その値が使用されます。それ以外の場合、元の文字(このフォントまたはフォールバックフォント)が使用されます。フォールバックフォントは小文字バージョンを返しません。たとえば、次のスニペット::" -#: ../../textwriter.rst:90 23262e48eefb441e8f915f8af26b847c +#: ../../textwriter.rst:90 98e21ce1902441eeba6f19061e4f5493 msgid "will produce this PDF text:" msgstr "これにより、このPDFテキストが生成されます:" -#: ../../textwriter.rst 0c404915422c4f74864d440b449387e3 -#: 4c607664162b418ebfcbf37dc0876eea a1ef567a0f9d4a3bbafd145b55fe5917 +#: ../../textwriter.rst 06f4faa84b0348aeaef09e3bcae38a60 +#: 21653364344e49fa8c3e3f9dd7eef9a2 998669305307407c96429cca0cb28abc msgid "Returns" msgstr "返り値:" #: ../../textwriter.rst:95 ../../textwriter.rst:111 -#: 281ec8be560e4b54b8acfd437cc4a851 74021b51985a45bdb2ae0a6b0266b0a8 +#: cf5848704c4f45d5863be1781e9750c6 d5ee4999d6c340078760223118e71def msgid "" ":attr:`text_rect` and :attr:`last_point`. *(Changed in v1.18.0:)* Raises " "an exception for an unsupported font -- checked via " @@ -395,50 +395,50 @@ msgstr "" ":attr:`text_rect` および :attr:`last_point`。 *(v1.18.0 " "で変更)*:サポートされていないフォントの場合、:attr:`Font.is_writable` を介してチェックされた例外が発生します。" -#: ../../textwriter.rst:102 c4e4043e23e04e56bdc0344d40e455c9 +#: ../../textwriter.rst:102 22fef7a0a45f4133bb03c80510af77a3 msgid "Add some new text in vertical, top-to-bottom writing." msgstr "縦書きの新しいテキストを追加します。" -#: ../../textwriter.rst:105 0252a9af40824c1fa6edce642cf1992f +#: ../../textwriter.rst:105 475f2776fe6649fb848f5c4af040ce52 msgid "a string. It will be written starting at position \"pos\"." msgstr "文字列。 \"pos\" から開始して書き込まれます。" -#: ../../textwriter.rst:107 085a4070e63948ebba21e011bb29b317 +#: ../../textwriter.rst:107 d3f691c3b0a649a2a4f2f3c3dc3be7b5 msgid "the :data:`fontsize`, a positive float, default 11." msgstr ":data:`fontsize`、正の浮動小数点数、デフォルトは 11 です。" #: ../../textwriter.rst:109 ../../textwriter.rst:133 -#: c898aa158d8244e39a8a0c55c12da680 e65304d5d9dd4c2d936828318184662d +#: 6c2e96448a5a4ca1859aaa376d058339 847d5cdaa04d419ebad9cc8d314008c3 msgid "*(New in v1.18.15)* see :meth:`append`." msgstr "*(v1.18.15 で新しい)* 詳細は :meth:`append` を参照してください。" -#: ../../textwriter.rst:115 a959250fb6bd493696ff492450e69cd7 +#: ../../textwriter.rst:115 47fff506b0d7424997914794a0ff7b05 msgid "" "Changed in 1.17.3: New parameter `pos` to specify where to start writing " "within rectangle." msgstr "1.17.3で変更:新しいパラメーター `pos` を追加して、矩形内での書き込みを開始する位置を指定できるようにしました。" -#: ../../textwriter.rst:116 9ffa966634d5403ba1622e4cef6a9bc7 +#: ../../textwriter.rst:116 a9c32b09c1a1455ab9d11b281da03e13 msgid "" "Changed in v1.18.9: Return list of lines which do not fit in rectangle. " "Support writing right-to-left (e.g. Arabian, Hebrew)." msgstr "v1.18.9で変更:矩形に収まらない行のリストを返すようにしました。右から左に書くサポートを追加(アラビア語、ヘブライ語など)。" -#: ../../textwriter.rst:117 f95dcffef7084cf5984d0092f9d1ca80 +#: ../../textwriter.rst:117 9650fa4cd27447cb858698c792a3ab60 msgid "Changed in v1.18.15: Prefer small caps if supported by the font." msgstr "v1.18.15で変更:フォントがサポートしている場合、小文字のテキストを優先します。" -#: ../../textwriter.rst:119 1989ba22c04048b09114b71a2f85cb1f +#: ../../textwriter.rst:119 f11687cd59084cd996b529b2ce12e6fc msgid "" "Fill a given rectangle with text in horizontal writing mode. This is a " "convenience method to use as an alternative for :meth:`append`." msgstr "指定された矩形を水平書きモードでテキストで埋めます。これは、:meth:`append` の代替手段として使用する便利な方法です。" -#: ../../textwriter.rst:121 0d74ee66e4584e4d8117ad536c5e15ae +#: ../../textwriter.rst:121 4bd2adc309254e8f89c23c963d1d2c8e msgid "the area to fill. No part of the text will appear outside of this." msgstr "埋める領域。テキストのいずれの部分もこれの外には表示されません。" -#: ../../textwriter.rst:122 93755d2877e348d8b21fd51b9c40be4a +#: ../../textwriter.rst:122 cf21ee09a6d347079e7e38b61a116f9e msgid "" "the text. Can be specified as a (UTF-8) string or a list / tuple of " "strings. A string will first be converted to a list using *splitlines()*." @@ -447,67 +447,67 @@ msgstr "" "テキスト。UTF-8文字列または文字列のリスト/タプルとして指定できます。文字列は最初に *splitlines()* " "を使用してリストに変換されます。各リストアイテムは新しい行で始まります(強制的な改行が行われます)。" -#: ../../textwriter.rst:123 a66dd691e2fb46dbbfe3806df91ed886 +#: ../../textwriter.rst:123 e58f8a40089740bb8f7e99547e3a52a9 msgid "" "*(new in v1.17.3)* start storing at this point. Default is a point near " "rectangle top-left." msgstr "*(v1.17.3で新規)* このポイントから記憶を開始します。デフォルトは矩形の左上近くのポイントです。" -#: ../../textwriter.rst:124 96e2ec8874184cf5b16661e66d7015df +#: ../../textwriter.rst:124 1bba1b52fabb4feba87ed2e1a93046e5 msgid "the :ref:`Font`, default `pymupdf.Font(\"helv\")`." msgstr ":ref:`Font`、デフォルトは `pymupdf.Font(\"helv\")`。" -#: ../../textwriter.rst:125 09703ab564f0466994b341f187d31853 +#: ../../textwriter.rst:125 391f5afbac8343f4a221b7935e311d0c msgid "the :data:`fontsize`." msgstr ":data:`fontsize`" -#: ../../textwriter.rst:126 1ddab75111ab47f0a45b4c7f23f21f2e +#: ../../textwriter.rst:126 a627dc7fe51349409a7bb26273a7309e msgid "" "text alignment. Use one of TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, " "TEXT_ALIGN_RIGHT or TEXT_ALIGN_JUSTIFY." msgstr "テキストの配置。TEXT_ALIGN_LEFT、TEXT_ALIGN_CENTER、TEXT_ALIGN_RIGHT、またはTEXT_ALIGN_JUSTIFYのいずれかを使用します。" -#: ../../textwriter.rst:127 b8e25ebd7be047758d8e21f13973c427 +#: ../../textwriter.rst:127 47a6880a61374d5b989b75ee244f39e0 msgid "" "*(New in v1.18.9)* whether the text should be written from right to left." -" Applicable for languages like Arabian or Hebrew. Default is *False*. If " -"*True*, any Latin parts are automatically reverted. You must still set " -"the alignment (if you want right alignment), it does not happen " +" Applicable for languages like Arabian or Hebrew. Default is ``False``. " +"If ``True``, any Latin parts are automatically reverted. You must still " +"set the alignment (if you want right alignment), it does not happen " "automatically -- the other alignment options remain available as well." msgstr "" -"*(v1.18.9で新規)* テキストを右から左に書くかどうか。アラビア語やヘブライ語などの言語に適用可能です。デフォルトは *False* " -"です。*True* " +"*(v1.18.9で新規)* テキストを右から左に書くかどうか。アラビア語やヘブライ語などの言語に適用可能です。デフォルトは ``False`` " +"です。``True`` " "の場合、ラテン文字部分は自動的に反転されます。右寄せを希望する場合、引き続き配置を設定する必要があります(他の配置オプションも利用可能)。" -#: ../../textwriter.rst:128 7ac5cc9e03c948588e719d183d3301a9 +#: ../../textwriter.rst:128 338fd2cfbb9f43eebe7aac794d285947 msgid "" "on text overflow do nothing, warn, or raise an exception. Overflow text " -"will never be written. **Changed in v1.18.9:** * Default is *None*. * " +"will never be written. **Changed in v1.18.9:** * Default is ``None``. * " "The list of overflow lines will be returned." msgstr "" -#: ../../textwriter.rst:128 38c25ac7d95a4762ae61b47ed2791011 +#: ../../textwriter.rst:128 40285c69fa6d4e098e7e7d65e3b57181 msgid "" "on text overflow do nothing, warn, or raise an exception. Overflow text " "will never be written. **Changed in v1.18.9:**" msgstr "テキストのオーバーフローがある場合、何もしない、警告する、または例外を発生させるかどうか。オーバーフローテキストは書き込まれません。**v1.18.9で変更:**" -#: ../../textwriter.rst:130 311c709758f747919cb227c3ecef0ea2 -msgid "Default is *None*." -msgstr "デフォルトは *None* です。" +#: ../../textwriter.rst:130 5186e708cabe4ece8c4923a3be58faab +msgid "Default is ``None``." +msgstr "デフォルトは ``None`` です。" -#: ../../textwriter.rst:131 8093a5c39b9449beb0398a28b5edc920 +#: ../../textwriter.rst:131 c9cd6684f8c94000b9768021a448a07e msgid "The list of overflow lines will be returned." msgstr "オーバーフローラインのリストが返されます。" -#: ../../textwriter.rst 1bbd222d91d54700ae5dd23f9d20ab3a -#: 363a7cedb3574b379dab1f28b27b2d18 67eb6ceda4b94d599605c51d4c7b19a3 -#: a3aac759e3d942ca825149e0c13343e5 d4da986bb8264bd1842a1f30f5790a58 -#: fa27d21cec3d49f2be7bb2998dcdf2f3 +#: ../../textwriter.rst 02670889aed04b008cecdb3c16c81c4f +#: 7c2d0cb6d3334a7d9986dbc7d90386fd c372a91f4d4e402b9597012aa50ca7e8 +#: cccda959bb4042ddb338028cba7e741c e3365d51e8b74ffcb87857224abfc418 +#: fc009306fc80478fa00be99b10517dbf msgid "Return type" msgstr "" -#: ../../textwriter.rst:136 88ddcb0f8d334122a9d2f04ffe568bd5 +#: ../../textwriter.rst:136 c60d734f21084a21b312d32fad9869bd msgid "" "*New in v1.18.9* -- List of lines that did not fit in the rectangle. Each" " item is a tuple `(text, length)` containing a string and its length (on " @@ -516,7 +516,7 @@ msgstr "" "*v1.18.9で新規* -矩形に収まらなかった行のリスト。各アイテムは、文字列とそのページ上の長さ(長さ)を含むタプル `(text, " "length)` です。" -#: ../../textwriter.rst:138 eb26a28a8be94f3f91cae771bbec3c42 +#: ../../textwriter.rst:138 9d32a899d67a40d89e21fbfcbdcd9ed5 msgid "" "Use these methods as often as is required -- there is no technical limit " "(except memory constraints of your system). You can also mix " @@ -529,23 +529,23 @@ msgstr "" "とテキストボックスを混在させ、それぞれ複数持つこともできます。テキストの配置は挿入ポイントによってのみ制御されます。したがって、特定の順序に従う必要はありません。*(v1.18.0で変更)*" " :サポートされていないフォントに対して例外を発生させます - :attr:`Font.is_writable` をチェックします。" -#: ../../textwriter.rst:143 2d42f5616e1545f08fef6945758d83a0 +#: ../../textwriter.rst:143 9b878e0128ae4996b183a0f12430688d msgid "" "Write the TextWriter text to a page, which is the only mandatory " "parameter. The other parameters can be used to temporarily override the " "values used when the TextWriter was created." msgstr "TextWriterのテキストをページに書き込みます。これは唯一の必須パラメータで、TextWriterが作成されたときに使用される値を一時的にオーバーライドするために、他のパラメータを使用できます。" -#: ../../textwriter.rst:145 9e3b999cb69945afb00d0af8df247881 +#: ../../textwriter.rst:145 8a08795ab37642d68b081669bd19dbbc msgid "write to this :ref:`Page`." msgstr "この :ref:`Page` に書き込みます。" #: ../../textwriter.rst:146 ../../textwriter.rst:147 -#: 333b3917ea284245be522274bbf37c91 b9a29103ac7e415f8eb6d18042710d97 +#: 0c7ba4b4f32448bea8d4d9c48b58dd8a b66facab5aca402a89d3624b62c17c77 msgid "override the value of the TextWriter for this output." msgstr "この出力のためにTextWriterの値をオーバーライドします。" -#: ../../textwriter.rst:148 83a7fe5be4164424ad89e20ea734eb2e +#: ../../textwriter.rst:148 5006c8e264ca46c9ae272adfcfad10e1 msgid "" "modify the text appearance by applying a matrix to it. If provided, this " "must be a sequence *(fixpoint, matrix)* with a point-like *fixpoint* and " @@ -556,58 +556,58 @@ msgstr "" "としてシーケンスでなければなりません。point-like *fixpoint* とmatrix-like *matrix* " "を持っています。典型的な例は、テキストを *fixpoint* の周りで回転させることです。" -#: ../../textwriter.rst:149 ed52d54331e54c6ebdc3dfc2b0e889f2 +#: ../../textwriter.rst:149 96e7ac37266f44a58e745502da479403 msgid "put in foreground (default) or background." msgstr "前景(デフォルト)または背景に配置します。" -#: ../../textwriter.rst:150 3546eff84990410984405f6c7acdec60 +#: ../../textwriter.rst:150 abbc850a979e43328c92e53ed0c00799 msgid "*(new in v1.18.4)* the :data:`xref` of an :data:`OCG` or :data:`OCMD`." msgstr "*(v1.18.4で新規)* :data:`OCG` または :data:`OCMD` の :data:`xref`。" -#: ../../textwriter.rst:151 3275cffb3c2448bf8c16feabbb5dbf17 +#: ../../textwriter.rst:151 ce3186c3205140019f041e35d658b0da msgid "" "The PDF `Tr` operator value. Values: 0 (default), 1, 2, 3 (invisible). " ".. image:: images/img-rendermode.*" msgstr "" -#: ../../textwriter.rst:151 391cdfc39f0e4bf2a06eef9a4be3d97d +#: ../../textwriter.rst:151 bdf45cf0c031489788a8ef24b687ca01 msgid "The PDF `Tr` operator value. Values: 0 (default), 1, 2, 3 (invisible)." msgstr "PDF `Tr` 演算子の値。値:0(デフォルト)、1、2、3(不可視)。" -#: ../../textwriter.rst:158 99567fffa8f54a0b8ff5fb66cea9aee0 +#: ../../textwriter.rst:158 924bce3b23354b8db175a1030136ee4f msgid "The area currently occupied." msgstr "現在占有されている領域。" #: ../../textwriter.rst:160 ../../textwriter.rst:184 -#: 32d8e40589cd4bc9a7a5b29482665675 5194f3436d874f6c87b7e83a78db8da9 +#: 597dadf1263f4100aa94f7e6fd0cac59 62859bc0002e476b909fd3314760c3c1 msgid ":ref:`Rect`" msgstr "" -#: ../../textwriter.rst:164 541604453c444ef5a7d1c01646ced250 +#: ../../textwriter.rst:164 ebffb6e923b542319c374d9a3191c930 msgid "" "The \"cursor position\" -- a :ref:`Point` -- after the last written " "character (its bottom-right)." msgstr "最後に書かれた文字の後にある「カーソル位置」 - :ref:`Point` 形式。" -#: ../../textwriter.rst:166 67b7c36e86b74109a414975d3775a061 +#: ../../textwriter.rst:166 e627c94d443c4b15939dbb1da1fca6d0 msgid ":ref:`Point`" msgstr "" -#: ../../textwriter.rst:170 fcba2798bb2a47cbbd383a1740dc651e +#: ../../textwriter.rst:170 638ab80764a4433eb9061f7de24a2339 msgid "The text opacity (modifiable)." msgstr "テキストの不透明度(変更可能)。" -#: ../../textwriter.rst:176 d47a64bb85bd41f38d01548c437d6fe3 +#: ../../textwriter.rst:176 fa5d197bd0d0412898c56c89dab163c3 msgid "The text color (modifiable)." msgstr "テキストの色(変更可能)。" -#: ../../textwriter.rst:182 ef9f3226f5fb4096857b1d95aa02d916 +#: ../../textwriter.rst:182 b8f24fda0c48472ea9bd3b6b36e082bb msgid "" "The page rectangle for which this TextWriter was created. Must not be " "modified." msgstr "このTextWriterが作成されたページの長方形。変更しないでください。" -#: ../../textwriter.rst:187 751a39800a9447cfb722f8c17e7a8eec +#: ../../textwriter.rst:187 f3460a6193964ea2b7e5342dbc10d518 msgid "" "To see some demo scripts dealing with TextWriter, have a look at `this " "`_ " @@ -616,11 +616,11 @@ msgstr "" "TextWriterを扱うデモスクリプトを見るには、`この `_ リポジトリをご覧ください。" -#: ../../textwriter.rst:189 1f55cd56f4484f0c98ea5ee38a8c73e8 +#: ../../textwriter.rst:189 cbb1eaac8ab84ee0a53d167e003577b8 msgid "Opacity and color apply to **all the text** in this object." msgstr "不透明度と色は、このオブジェクト内の **すべてのテキスト** に適用されます。" -#: ../../textwriter.rst:190 34795e7190c342689c40cbce07030084 +#: ../../textwriter.rst:190 6972b609e1cd4b0c957644b0b952f6fc msgid "" "If you need different colors / transparency, you must create a separate " "TextWriter. Whenever you determine the color should change, simply append" @@ -630,13 +630,13 @@ msgstr "" "異なる色/透明度が必要な場合、別々のTextWriterを作成する必要があります。色が変更されるべきと判断した場合、新しいテキストスパンの位置として前回返された" " :attr:`last_point` を使用して、対応するTextWriterにテキストを追加するだけです。" -#: ../../textwriter.rst:191 f3f60d3904014bf8a74a661f82bccef6 +#: ../../textwriter.rst:191 e58f72984d7449c0a879797f11ece31c msgid "" "Appending items or text boxes can occur in arbitrary order: only the " "position parameter controls where text appears." msgstr "アイテムまたはテキストボックスの追加は任意の順序で発生できます:テキストが表示される位置を制御するのは、位置パラメータのみです。" -#: ../../textwriter.rst:192 15eb9a3352b84007a15edb485f841142 +#: ../../textwriter.rst:192 6b3ca0a67cd044c7b212f261ae0e9c6a msgid "" "Font and :data:`fontsize` can freely vary within the same TextWriter. " "This can be used to let text with different properties appear on the same" @@ -647,7 +647,7 @@ msgstr "" "を自由に変更できます。これは、異なるプロパティを持つテキストが同じ表示される行に表示されるようにするために使用できます。posを適切に指定し、前に追加したアイテムの" " :attr:`last_point` に設定してください。" -#: ../../textwriter.rst:193 06d62ba5569e44f595dafe0ba308d483 +#: ../../textwriter.rst:193 29bd43da60cf48dabb0a63c140cd02b6 msgid "" "You can use the *pos* argument of :meth:`TextWriter.fill_textbox` to set " "the position of the first text character. This allows filling the same " @@ -658,7 +658,7 @@ msgstr "" "引数を使用して、最初のテキスト文字の位置を設定できます。これにより、異なる :ref:`TextWriter` " "オブジェクトからのコンテンツを含む同じテキストボックスを埋めることができ、複数の色、不透明度などが可能になります。" -#: ../../textwriter.rst:194 ea25eea7989b4dae8b8829e080b7bfa2 +#: ../../textwriter.rst:194 4657dfd571bd4f3bbc5bb5d038797d58 msgid "" "MuPDF does not support all fonts with this feature, e.g. no Type3 fonts. " "Starting with v1.18.0 this can be checked via the font attribute " @@ -668,14 +668,10 @@ msgstr "" "MuPDFは、この機能を持つすべてのフォントをサポートしているわけではありません。たとえば、Type3フォントはサポートされていません。v1.18.0以降、:attr:`Font.is_writable`" " 属性を使用して、これを確認できます。この属性は、:ref:`TextWriter` メソッドを使用する際にもチェックされます。" -#: ../../footer.rst:60 2cc5633fd1e94a0a98115f8e01f33048 +#: ../../footer.rst:60 68cab4f97fcf4503932903f84bb59645 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 8418a50893604c119842b84d4183c2d5 -msgid "Discord logo" -msgstr "" - #~ msgid "" #~ "**Free font choice:** Each text span " #~ "has its own font and fontsize. " @@ -709,3 +705,6 @@ msgstr "" #~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/the-basics.mo b/docs/locales/ja/LC_MESSAGES/the-basics.mo index 9ce095253..c6fedcd25 100644 Binary files a/docs/locales/ja/LC_MESSAGES/the-basics.mo and b/docs/locales/ja/LC_MESSAGES/the-basics.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/the-basics.po b/docs/locales/ja/LC_MESSAGES/the-basics.po index 8b9f57ce1..8b0ffa358 100644 --- a/docs/locales/ja/LC_MESSAGES/the-basics.po +++ b/docs/locales/ja/LC_MESSAGES/the-basics.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,31 +19,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 1fa08e71e581485b83fc9a4014f2681f +#: ../../header.rst:-1 ebd72ea23c554adea55b860ac32cfd10 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 cf9ad3eced9a4eb7a152b27e7130778b +#: ../../header.rst:-1 d808fab239944edbb4a07604487c3d4d msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 247332f6aa7c411cbbda0f70e2bbd0b6 +#: ../../header.rst:-1 32d34325b50d49718d4ae087152d121b msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../the-basics.rst:8 7c710037ad3845a4a4dc030dbe1beb6e +#: ../../the-basics.rst:8 3ef401bbe47d4d928056b1ad88406df4 msgid "The Basics" msgstr "基本" -#: ../../the-basics.rst:13 ec133809a32e4cf0ad8bebcc4103042e +#: ../../the-basics.rst:13 7ad7d2aeeb0949939d1edf110e9cde48 msgid "Opening a File" msgstr "ファイルを開く" -#: ../../the-basics.rst:16 a5dc2808501f4ce1ab21399986a6ad12 +#: ../../the-basics.rst:16 b3977994add44c128857ebe6778dbce8 msgid "To open a file, do the following:" msgstr "ファイルを開くには、以下の手順を実行してください:" @@ -52,18 +52,18 @@ msgstr "ファイルを開くには、以下の手順を実行してください #: ../../the-basics.rst:287 ../../the-basics.rst:377 ../../the-basics.rst:416 #: ../../the-basics.rst:467 ../../the-basics.rst:553 ../../the-basics.rst:638 #: ../../the-basics.rst:694 ../../the-basics.rst:886 ../../the-basics.rst:1070 -#: 1325d2ade53149fd86215cf69c53dd16 1405454883ff40b6a29570dce891468c -#: 37479690582b4da4acdbb5faf599b4fa 4886d2325f8f48c5a6d9544cd1328cab -#: 4dbc7d92d6a94122873b73cf74e16dd4 5624c1d151e64b0dbd38217905cb4116 -#: 794b0f930dcd4770b46c95bbe7d41534 7eb1dcad0c224cbe82ab068906730828 -#: 9d7de0387ff34074961f7043e299b81c bdfb44a256744a3c8a7d453cc41a5a01 -#: bfd4281c145e433d8352c4589e310628 d706853ce6ed41d8a568dd16e2a01a5b -#: d90790cf935f4d86bacbad09110b2c72 d9586d72f2354ccaa81bb2dab9257bff -#: df60f03167ff4fe6a60bd92ced9cf34c +#: 2739866db7be4d6fbd854a42404c20bb 279266de676f42ee8ca372b72f1b50d3 +#: 42d583c1c82e4c1c9c61e4221d22858b 4bbc83d3c8014f94bca9c10402d0772f +#: 6eb5cd518be24829a8fea50dc936924e 6f01de37c57b45dd826d3e9df5dd3352 +#: 72e59350df88431bb0d56787d262e6f3 76f22999a4234db0a736d9b66557dd9a +#: 9aa232f9bff64aec84bc0061ae859fde a56f4151e39f4227823677221a30af73 +#: cb848559a7ed4bceb96742c75b6a8a26 d2d7c31ddd6a4481afad882faa434f0c +#: d8991f84c3e6479fa2c6050dd8b27e28 e70c606f8abd4024a11d97fb8f7cd006 +#: fabe4bd1a2d042da9318fbae362a32ad msgid "**Taking it further**" msgstr "**さらに進む**" -#: ../../the-basics.rst:29 70e65a7cda40486ea177c532b0c9d713 +#: ../../the-basics.rst:29 1ec0b9c37a314b2cb8dde60de149c32e msgid "" "See the :ref:`list of supported file types` and " ":ref:`The How to Guide on Opening Files ` for more " @@ -72,15 +72,15 @@ msgstr "" "より高度なオプションについては、:ref:`サポートされている ` と " ":ref:`ファイルを開く方法ガイド` のリストを参照してください。" -#: ../../the-basics.rst:38 ff274ed2081446d58da917f456add5e4 +#: ../../the-basics.rst:38 cb07704fb73043b2827ddfe5306bb8eb msgid "Extract text from a |PDF|" msgstr "|PDF| からテキストを抽出する" -#: ../../the-basics.rst:40 581f65714d7d476ca2402832e2519a17 +#: ../../the-basics.rst:40 63223b54f3cc495aa83fddc584a650c9 msgid "To extract all the text from a |PDF| file, do the following:" msgstr "|PDF| ファイルからすべてのテキストを抽出するには、以下の手順を実行してください:" -#: ../../the-basics.rst:54 3385efbd1c6d4124be7be3b89a87d3a6 +#: ../../the-basics.rst:54 82cde87ae4a8477cb30daea5d72f5f54 msgid "" "Of course it is not just |PDF| which can have text extracted - all the " ":ref:`supported document file formats ` such as " @@ -89,21 +89,21 @@ msgstr "" "もちろん、PDFだけでなく、MOBI、EPUB、TXTなどの :ref:`サポートされているドキュメントファイル形式 " "` でもテキストを抽出できます。" -#: ../../the-basics.rst:60 294e173bd9854b5fb6bdc903e5ee56e3 +#: ../../the-basics.rst:60 68a8a1314b8a474a9636d7ff5ebf2245 msgid "" "If your document contains image based text content the use OCR on the " "page for subsequent text extraction:" msgstr "もし文書に画像ベースのテキストコンテンツが含まれている場合は、後続のテキスト抽出のためにそのページでOCRを使用してください。" #: ../../the-basics.rst:67 ../../the-basics.rst:121 -#: a234faa2fbd84c37a2cf235a3f7bb36a c211aaae891e45d7ba2c2dfd7abbb012 +#: 009d24e7339b46f7afe03c6afa62fbd2 b502b55793844906a001df204caff15f msgid "" "There are many more examples which explain how to extract text from " "specific areas or how to extract tables from documents. Please refer to " "the :ref:`How to Guide for Text`." msgstr "特定の領域からテキストを抽出する方法や、文書から表を抽出する方法など、さらに多くの例があります。テキストの方法ガイドを参照してください。" -#: ../../the-basics.rst:69 216b5308db7c44c8a4162bc85c13c781 +#: ../../the-basics.rst:69 58a9cf1efe6a40b5ada05038e2d55412 msgid "" "You can now also :ref:`extract text in Markdown " "format`." @@ -117,56 +117,56 @@ msgstr ":ref:`Markdown形式でテキストを抽出 ` す #: ../../the-basics.rst:698 ../../the-basics.rst:762 ../../the-basics.rst:821 #: ../../the-basics.rst:898 ../../the-basics.rst:928 ../../the-basics.rst:964 #: ../../the-basics.rst:990 ../../the-basics.rst:1074 -#: 193a31b220834061a10ffbd510e9120c 1dbc1b3314954c16896fe8c77d8bd89c -#: 3b753d603a6a4ac186c4566b2dff0487 3df95774e22c4f5881efec0abf5a8fc2 -#: 41b5d63b0a8d4cab8b4e44834c1352ff 438d0d7b2f2d4e5495a37fe81bfae41a -#: 446b68fce26240668e5ee27242839b0f 47d647abeff9488eb52ce96bf797bd58 -#: 53fa61637af7406592d2850bea34ea5d 55fcb083d5f44ecca41f98b58480abe0 -#: 5bd4d8b9e10b4d58a7013bd175a4fd64 6e48513f7a914e578ccd0f57d5484534 -#: a6ce6d12417647d0ab7980066092da2c ae9f61dfbc084716ba776c926ebf0f7c -#: b2d4858710d843cfa91419a36fc586bd b6ea0743f77f4be29cf9303818ec5d9a -#: b99df79279bb441b8c1c2481e553c575 bcf6ea013f164b79aabfe1f661f03beb -#: c9cad7c775224505b9ace964997553df d73912735cb344228a671c717bdeae9f -#: e56a9599fc714ba6aac60943c95913f6 f96d25856a6a428a8e8a59f2023a52a7 -#: ffd39aa52fbb4deb9851b76fde162748 +#: 06196b3b11364bd8ba72a68806270fbc 28f136db73ea4ff8b27a322e19a05299 +#: 2a2f674929bc4956b9fa645ec55231da 2a42d66f67ea469da857b3aefcefb111 +#: 34dfbca2e1ef487085d769c401e479da 4b5819a0804e42669c6c95bd78540195 +#: 57551550d33b446da752ec01b2d38be1 58193e34f85e4f3286969bb715d2ed1b +#: 758afc8b33924ed7afa93712789855ff 7c7a34a487ba49719ca245b940618040 +#: 926638700d944932adaab0f81e219328 99f090981eab4af2adb7c096da2ae2e3 +#: 9f4be351ab174a7fbfd5426ee671e7f8 ac69cd30aed24f97aa9c7c5eff88d4b3 +#: adf8863e8d274a1e9e4cd774f4b6c024 b6dfec45d83b42e68fc997fcb0213e92 +#: c34132ed22984098ac5b8bd1e9a4806b c8f4c6c1d0ee4228977d9294144fbc0e +#: cb4e3c70daa14279926090c987c7a950 e547959996fc49f483ba7574079782d7 +#: f8047ddd3ad0454c8c7eb0d0258590f1 fca50bef410a492eb5e9db5cd98453f0 +#: fd039b9c5e9e49b2a72044dabcf4d52c msgid "**API reference**" msgstr "**APIリファレンス**" -#: ../../the-basics.rst:73 8f93061911114727896e8444d3e437e0 +#: ../../the-basics.rst:73 099a4007de224f26813b7e0c6086aba5 msgid ":meth:`Page.get_text`" msgstr ":meth:`Page.get_text`" -#: ../../the-basics.rst:85 c1334ceff6fe4c5d864c72ddee392279 +#: ../../the-basics.rst:85 3478a0ef399a4f90bdf04e54b4b848f8 msgid "Extract images from a |PDF|" msgstr "|PDF| から画像を抽出する" -#: ../../the-basics.rst:87 4178a7364bea43b5b9fc9e71885b62eb +#: ../../the-basics.rst:87 2c137c284bae4ff3bd22402af36ebe06 msgid "To extract all the images from a |PDF| file, do the following:" msgstr "|PDF| すべての画像を抽出するには、以下の手順を実行してください:" -#: ../../the-basics.rst:125 acd0c4df4d534269a4f613d1c36a8807 +#: ../../the-basics.rst:125 58022a36615f4658a70db9b3d3cb08c0 msgid ":meth:`Page.get_images`" msgstr "" -#: ../../the-basics.rst:126 c71c6cb3309e4b9992bc2acf44c468ce +#: ../../the-basics.rst:126 887f2573340f469a8f4bb2e328eaf5a3 msgid ":ref:`Pixmap`" msgstr "" -#: ../../the-basics.rst:133 b198e183fc1d40a796f489fbd89b5c46 +#: ../../the-basics.rst:133 734558bdb8694762a5d412b1e2faa7e9 msgid "Extract vector graphics" msgstr "ベクトルグラフィックスを抽出" -#: ../../the-basics.rst:135 f034c055fa08490d962ee916c3dc280a +#: ../../the-basics.rst:135 0377de0bb75a443c8d1266b4d5b21c9a msgid "To extract all the vector graphics from a document page, do the following:" msgstr "ドキュメントのページからすべてのベクトルグラフィックスを抽出するには、以下の手順に従います:" -#: ../../the-basics.rst:145 c7583d80ff2f46a8953796ec70f4fa36 +#: ../../the-basics.rst:145 495a59882911438aae6c87d4c09cc096 msgid "" "This will return a dictionary of paths for any vector drawings found on " "the page." msgstr "これにより、ページ上で見つかったすべてのベクター図形のパスの辞書が返されます。" -#: ../../the-basics.rst:151 75d75a0c909149908c0be08feb36d6d8 +#: ../../the-basics.rst:151 edb401df140347688dfb686967959746 msgid "" "Please refer to: :ref:`How to Extract " "Drawings`." @@ -174,24 +174,24 @@ msgstr "" "次のページを参照してください: :ref:`「描画の抽出方法」 " "`。" -#: ../../the-basics.rst:155 53f6ae9142d6431ab8a9e144b362b772 +#: ../../the-basics.rst:155 99278f5d80fa49a1b1b55bb0d070fe0a #, fuzzy msgid ":meth:`Page.get_drawings`" msgstr ":meth:`Page.get_text`" -#: ../../the-basics.rst:166 0cf83b0fcb9f45b798d931dac8bef79c +#: ../../the-basics.rst:166 3f2a04b771b4465fba3841d4145c94eb msgid "Merging |PDF| files" msgstr "|PDF| ファイルの結合" -#: ../../the-basics.rst:168 83422660bcb6448091d62752b33c429e +#: ../../the-basics.rst:168 00fbed70866b44078ae8b3f72592c767 msgid "To merge |PDF| files, do the following:" msgstr "|PDF| ファイルを結合するには、以下の手順を実行してください:" -#: ../../the-basics.rst:182 51938b1ab2694a5fadfedb4afd98016e +#: ../../the-basics.rst:182 2c3a5d3d3d264086993c70ed0f9610ad msgid "Merging |PDF| files with other types of file" msgstr "|PDF| ァイルと他の種類のファイルを結合する" -#: ../../the-basics.rst:184 47a4ecaf42274542a4c12e885dba79d9 +#: ../../the-basics.rst:184 2a56bc4e77b14621bdc02e63f9456750 msgid "" "With :meth:`Document.insert_file` you can invoke the method to merge " ":ref:`supported files` with |PDF|. For example:" @@ -199,22 +199,21 @@ msgstr "" ":meth:`Document.insert_file` " "を使用すると、サポートされているファイルをPDFと結合するメソッドを呼び出すことができます。例えば:" -#: ../../the-basics.rst:201 3ca90934d1ed45359ac18737bd68b384 +#: ../../the-basics.rst:201 f2e00ac506914ac4b90cf6ba9b933452 +#, fuzzy msgid "" "It is easy to join PDFs with :meth:`Document.insert_pdf` & " ":meth:`Document.insert_file`. Given open |PDF| documents, you can copy " "page ranges from one to the other. You can select the point where the " "copied pages should be placed, you can revert the page sequence and also " -"change page rotation. This Wiki `article " -"`_ contains a full description." +"change page rotation." msgstr "" ":meth:`Document.insert_pdf` と :meth:`Document.insert_file` " "を使用すれば、PDFを簡単に結合できます。開かれたPDF文書がある場合、片方のPDFから別のPDFへページの範囲をコピーすることができます。コピーされたページが配置される位置を選択することができ、ページの順序を元に戻すこともできます。さらに、ページの回転も変更することができます。詳細な説明はこの" " `Wiki `_ の記事に記載されています。" -#: ../../the-basics.rst:203 c9953f5d262647078cf72f560cd7c231 +#: ../../the-basics.rst:203 097d528e7b89483887fe9b103286246d msgid "" "The GUI script `join.py `_ uses this method" @@ -225,44 +224,44 @@ msgstr "" "Utilities/blob/master/examples/join-documents/join.py>`_ " "では、この方法を使用してファイルのリストを結合し、それぞれの目次セグメントも結合します。スクリプトの見た目は以下のようになっています:" -#: ../../the-basics.rst:210 7557d841a10c4a8dbe5dda4ddb797ddc +#: ../../the-basics.rst:210 1fbf6ae246834c7daa68bb87e30c563d msgid ":meth:`Document.insert_pdf`" msgstr "" -#: ../../the-basics.rst:211 38226e8955b74058bcb0132590106923 +#: ../../the-basics.rst:211 eb458481793c4cb1b1e232362c454d05 msgid ":meth:`Document.insert_file`" msgstr "" -#: ../../the-basics.rst:218 2a4747d142e449adb9f4bf2a3c6ce9ca +#: ../../the-basics.rst:218 b75e34a3e76543769aa5c7b08099b88e msgid "Working with Coordinates" msgstr "座標を扱う" -#: ../../the-basics.rst:220 7fc6241eece94e388e4c5e6b3da32bd3 +#: ../../the-basics.rst:220 ba6915f5f3614cfc866c5d6a96dd7561 msgid "" "There is one *mathematical term* that you should feel comfortable with " -"when using **PyMuPDF** - **\"coordinates\"**. Please have a quick look " -"at the :ref:`Coordinates` section to understand the coordinate system to " +"when using |PyMuPDF| - **\"coordinates\"**. Please have a quick look at " +"the :ref:`Coordinates` section to understand the coordinate system to " "help you with positioning objects and understand your document space." msgstr "" -"**PyMuPDF** を使用する際に快適に感じるべき *数学用語* が1つあります - **「座標」** " +"|PyMuPDF| を使用する際に快適に感じるべき *数学用語* が1つあります - **「座標」** " "です。オブジェクトの配置や文書空間の理解に役立つ座標系を理解するために、:ref:`Coordinates` セクションを簡単にご覧ください。" -#: ../../the-basics.rst:229 cc5bb54d6a664070913b675128806e89 +#: ../../the-basics.rst:229 1a7cee38451a4ac49f536db1c8867f23 msgid "Adding a watermark to a |PDF|" msgstr "|PDF| ファイルにウォータマークを追加する方法" -#: ../../the-basics.rst:231 724b57b9ee3643078ac62f8d52deb58a +#: ../../the-basics.rst:231 7a831a320dcb4d03b66a33b5656a1592 msgid "To add a watermark to a |PDF| file, do the following:" msgstr "|PDF| ファイルにウォータマークを追加するには、以下の手順を実行してください:" -#: ../../the-basics.rst:251 2d325959aa3240eda130cd0352c6d3aa +#: ../../the-basics.rst:251 32163f8855f94b3da489e46235d0f84f msgid "" "Adding watermarks is essentially as simple as adding an image at the base" " of each |PDF| page. You should ensure that the image has the required " "opacity and aspect ratio to make it look the way you need it to." msgstr "ウォータマークを追加することは、基本的には各PDFページの底辺に画像を追加するだけです。画像が必要な透明度とアスペクト比を持っていることを確認して、必要な見た目になるようにします。" -#: ../../the-basics.rst:253 f0c70dd2895c4964bc8dabb1a5cb7fb9 +#: ../../the-basics.rst:253 8b5f52f2d540405f8e19f3ff6efd6007 msgid "" "In the example above a new image is created from each file reference, but" " to be more performant (by saving memory and file size) this image data " @@ -272,24 +271,24 @@ msgstr "" "前述の例では、各ファイル参照から新しい画像が作成されていますが、メモリとファイルサイズを節約するために、この画像データは1回だけ参照されるようにすると、パフォーマンスが向上します" " - Page.insert_image()のコード例と説明を参照してください。" -#: ../../the-basics.rst:257 15500f88666849f28a301e1282bccf7f +#: ../../the-basics.rst:257 fcfe127ad9414e8a9a9f6fe506eca749 msgid ":meth:`Page.bound`" msgstr "" #: ../../the-basics.rst:258 ../../the-basics.rst:294 -#: 188631a19e5c4e8987015f1ccb80b8bb 5271138a5721466e8ef569ecdd1671e1 +#: 2122203304f24c7e86364c4e44d8c515 5bd4a37b290b484ab12ffef1d743e039 msgid ":meth:`Page.insert_image`" msgstr "" -#: ../../the-basics.rst:267 d04c7e5a255a483d94a3f413898118db +#: ../../the-basics.rst:267 74156cf07c4c44abb86f01275234c22c msgid "Adding an image to a |PDF|" msgstr "|PDF| に画像を追加する" -#: ../../the-basics.rst:269 6bc5907d0223457d871b7f39de30867b +#: ../../the-basics.rst:269 e4ad47cff3e149b09cfcee436ce71ec0 msgid "To add an image to a |PDF| file, for example a logo, do the following:" msgstr "PDFファイルに画像を追加するためには、例えばロゴを追加する場合、以下の手順を実行してください:" -#: ../../the-basics.rst:289 686f0bf95b2b4dff818bf6e451816e99 +#: ../../the-basics.rst:289 ef303cbd63ea4d6cae44d744a77253f8 msgid "" "As with the watermark example you should ensure to be more performant by " "only referencing the image once if possible - see the code example and " @@ -298,43 +297,43 @@ msgstr "" "ウォータマークの例と同様に、できる限り画像を1回だけ参照することで、より効率的な処理を行うようにしてください。詳細は " ":meth:`Page.insert_image` のコード例と説明を参照してください。" -#: ../../the-basics.rst:293 a8df3cbb14284ed0a4e52c62e7f80f76 +#: ../../the-basics.rst:293 0a5e74d57a334f90b301d4f7266ae6a7 msgid ":ref:`Rect`" msgstr "" -#: ../../the-basics.rst:303 f77b2b2742494b449e888cc4f6470509 +#: ../../the-basics.rst:303 97f7c41b4fcc40d297f51e89344ec00e msgid "Rotating a |PDF|" msgstr "|PDF| を回転させる" -#: ../../the-basics.rst:305 5015dc64a13c464f8b8ea4311d0249cc +#: ../../the-basics.rst:305 a6bb30db140947ee94661859e458334a msgid "To add a rotation to a page, do the following:" msgstr "ページに回転を追加するには、以下の手順を実行してください:" -#: ../../the-basics.rst:320 6615afdb319f42c88ed7f555510c2aae +#: ../../the-basics.rst:320 5b2ac1a6f5284ffdbcf63f04a5bb87e3 msgid ":meth:`Page.set_rotation`" msgstr "" -#: ../../the-basics.rst:328 4018d7a4384c486d9ca0bb74f6804629 +#: ../../the-basics.rst:328 5d0f43e3da814e9195c2500beb9b2aae msgid "Cropping a |PDF|" msgstr "|PDF| のトリミング" -#: ../../the-basics.rst:330 e2595040a4794f0bb323d6d21842d776 +#: ../../the-basics.rst:330 ebcd5ad854a344fb8fdb76e0f157f822 msgid "To crop a page to a defined :ref:`Rect`, do the following:" msgstr "定義された矩形 :ref:`Rect` にページをトリミングするには、以下の手順を実行してください:" -#: ../../the-basics.rst:345 bb266182122141f194590dffe4ab33ae +#: ../../the-basics.rst:345 10f26d2a0e9f428c877fe76eca3149b4 msgid ":meth:`Page.set_cropbox`" msgstr "" -#: ../../the-basics.rst:354 3b3f07433c7d4da8bf769e0cd85a55eb +#: ../../the-basics.rst:354 37f2015ccbe843179609bdd2ce54ce25 msgid ":index:`Attaching Files `" msgstr ":index:`ファイルの添付 `" -#: ../../the-basics.rst:356 c300a7bbe9334a67baeb5029a8159cc4 +#: ../../the-basics.rst:356 73fa4a36d3114266a5b8c37898cdd520 msgid "To attach another file to a page, do the following:" msgstr "別のファイルをページに添付するには、以下の手順を実行してください:" -#: ../../the-basics.rst:379 dd84ee2caab4435b99250177e4e48d35 +#: ../../the-basics.rst:379 fef41696e0104638bfa7e9e46f94d5da msgid "" "When adding the file with :meth:`Page.add_file_annot` note that the third" " parameter for the `filename` should include the actual file extension. " @@ -348,34 +347,34 @@ msgstr "" ":meth:`Page.add_file_annot` " "でファイルを追加する際には、ファイル名を指定する第三引数には実際のファイルの拡張子を含める必要があります。これがないと、添付ファイルが開けるものとして認識されない可能性があります。例えば、ファイル名が単に「attachment」とだけ指定されている場合、生成されたPDFを見て添付ファイルを開こうとするとエラーが発生するかもしれません。しかし、「attachment.pdf」と指定されている場合、PDFビューアーで有効なファイルタイプとして認識され、開くことができます。" -#: ../../the-basics.rst:381 05dca24f27a944b79c8c8accd9767ac1 +#: ../../the-basics.rst:381 2eb971ca49044acfb758808877174159 msgid "" "The default icon for the attachment is by default a \"push pin\", however" " you can change this by setting the `icon` parameter." msgstr "添付ファイルのデフォルトアイコンは「押しピン」ですが、 `icon` パラメータを設定することでこれを変更することができます。" -#: ../../the-basics.rst:385 8221a532153145bfbf79c717f61cf3d3 +#: ../../the-basics.rst:385 472cb94f410f45d389386b479f752c7d msgid ":ref:`Point`" msgstr "" #: ../../the-basics.rst:386 ../../the-basics.rst:422 -#: 392d85fa8c45462bb03a0e586f8368a5 ceb16583b9c24fa69bcb9297ea552c1d +#: bc83ca635d004bbea323fc12889c3475 e3b71ff6dabe4e7092a149500b391650 msgid ":meth:`Document.tobytes`" msgstr "" -#: ../../the-basics.rst:387 ef224d6a8b30411991ea6c8e721bb9ea +#: ../../the-basics.rst:387 861dcb9381e943f982a5ff2233584d56 msgid ":meth:`Page.add_file_annot`" msgstr "" -#: ../../the-basics.rst:396 ad54d5aac61249518d341e099fe53d03 +#: ../../the-basics.rst:396 36ca0a3374d84c2d914b97f4600f49bc msgid ":index:`Embedding Files `" msgstr ":index:`ファイルを埋め込む `" -#: ../../the-basics.rst:398 9bc502c6447443d6b5d5a5db815d4ece +#: ../../the-basics.rst:398 3d3da8f629564876915a4356adb5a4c5 msgid "To embed a file to a document, do the following:" msgstr "ファイルを文書に埋め込むには、以下の手順を実行してください:" -#: ../../the-basics.rst:418 a1714826ad5c42d196fe8c6cd2a167dc +#: ../../the-basics.rst:418 522ee31eaa5c4be29e943f9e031733ce msgid "" "As with :ref:`attaching files`, when adding " "the file with :meth:`Document.embfile_add` note that the first parameter " @@ -384,45 +383,45 @@ msgstr "" "ファイルを添付する場合と同様に、 :meth:`Document.embfile_add` " "でファイルを追加する際には、ファイル名を指定する第一引数には実際のファイルの拡張子を含める必要があります" -#: ../../the-basics.rst:423 00d66841fc9f45138367995198403b02 +#: ../../the-basics.rst:423 d105ed0d5499461a9a468719a7df3543 msgid ":meth:`Document.embfile_add`" msgstr "" -#: ../../the-basics.rst:433 318932f7b0974085bc27cc646fa8bdae +#: ../../the-basics.rst:433 2182d5b6f29e40d39aab4f677fedfa2b msgid "Deleting Pages" msgstr "ページを削除する" -#: ../../the-basics.rst:435 13e0df217f6c4e1b8dca4aa0985dc02e +#: ../../the-basics.rst:435 634d1c5913ad422281859654914d1268 msgid "To delete a page from a document, do the following:" msgstr "文書からページを削除するには、以下の手順を実行してください:" -#: ../../the-basics.rst:445 1af3ff466dd548dea12d43131436ebe0 +#: ../../the-basics.rst:445 437764ad7c2747118b3feb3fa4f1367b msgid "To delete a multiple pages from a document, do the following:" msgstr "複数のページを文書から削除するには、以下の手順を実行してください:" -#: ../../the-basics.rst:459 8c8085ea9f094ac69a5d39852749b40d +#: ../../the-basics.rst:459 7ffda49506894b2ca02ad9e6bc7e975a msgid "What happens if I delete a page referred to by bookmarks or hyperlinks?" msgstr "ブックマークやハイパーリンクで参照されているページを削除した場合、どうなりますか?" -#: ../../the-basics.rst:461 31087a6affcf44ef91fc66162f24f763 +#: ../../the-basics.rst:461 9ccef7fc01e34b1f890333f741269c36 msgid "" "A bookmark (entry in the Table of Contents) will become inactive and will" " no longer navigate to any page." msgstr "ブックマーク(目次のエントリー)は無効になり、もはやどのページにもナビゲートしません" -#: ../../the-basics.rst:463 cd1da6e52b7742a1b61ea3a39e156e42 +#: ../../the-basics.rst:463 2db9a64894ac4cc5926029b386cc8dbc msgid "" "A hyperlink will be removed from the page that contains it. The visible " "content on that page will not otherwise be changed in any way." msgstr "ハイパーリンクは、それを含むページから削除されます。そのページの可視コンテンツは、他の方法で変更されることはありません。" -#: ../../the-basics.rst:469 4ec8ef853c6b496296824b76771b13c1 +#: ../../the-basics.rst:469 a64aa50abd5848b8a15b0f27de5f2595 msgid "" "The page index is zero-based, so to delete page 10 of a document you " "would do the following `doc.delete_page(9)`." msgstr "ページのインデックスは0から始まるため、文書の10ページ目を削除するには、以下のようにします: `doc.delete_page(9)`。" -#: ../../the-basics.rst:471 5276051b094c425fac7e6fe2564d323b +#: ../../the-basics.rst:471 fb3cae6bf2b54a59b81ff59a5bb7563e msgid "" "Similarly, `doc.delete_pages(from_page=9, to_page=14)` will delete pages " "10 - 15 inclusive." @@ -430,47 +429,47 @@ msgstr "" "同様に、 `doc.delete_pages(from_page=9, to_page=14)` " "は、ページ10からページ15までを含む範囲のページを削除します。" -#: ../../the-basics.rst:476 fdb2930b14fa4da9bd7b896b4ae66a3f +#: ../../the-basics.rst:476 ed756abf6b3e413c9ffbb5a6caf6b88b msgid ":meth:`Document.delete_page`" msgstr "" -#: ../../the-basics.rst:477 7b8ecbbbf81a441bb7ca0a3440b8f9b5 +#: ../../the-basics.rst:477 65198e829eef4bb381f47ddf30cc7e4f msgid ":meth:`Document.delete_pages`" msgstr "" -#: ../../the-basics.rst:485 96d67b401bb34cccbc8848686f181f44 +#: ../../the-basics.rst:485 7bbd41be5ecb4d2e9c76a3a244cca14d msgid "Re-Arranging Pages" msgstr "ページを再配置する" -#: ../../the-basics.rst:487 91463cf3d35d4fa1a889bc4bdd4b1f71 +#: ../../the-basics.rst:487 a1f98aa6a7714dab99cef5e054cfb3bd msgid "To change the sequence of pages, i.e. re-arrange pages, do the following:" msgstr "ページを再配置するには、以下の手順を実行してください:" -#: ../../the-basics.rst:502 138c22c7e2c546d7baa5285ff6f107cd +#: ../../the-basics.rst:502 f179f7f7f5794947ac4541278ba55b6e msgid ":meth:`Document.move_page`" msgstr "" -#: ../../the-basics.rst:511 b1a673b6aa014d1082d0e405d65a6635 +#: ../../the-basics.rst:511 d21575e2370d4ad4ab02f2ab07dd150c msgid "Copying Pages" msgstr "ページをコピーする" -#: ../../the-basics.rst:514 a2232ddc370942438796aa662b7f8c31 +#: ../../the-basics.rst:514 57a67ecb95784254803c922f7d08f6c6 msgid "To copy pages, do the following:" msgstr "ページをコピーするには、以下の手順を実行してください:" -#: ../../the-basics.rst:529 f092014ab8de4cdfa1ddd4910efb4ae9 +#: ../../the-basics.rst:529 5a496f287a5b41fbb7d2b54cb5c697c8 msgid ":meth:`Document.copy_page`" msgstr "" -#: ../../the-basics.rst:537 263db6f3790b425d8422d862f5629bce +#: ../../the-basics.rst:537 892cc58284e0408d8b96e992e24544cb msgid "Selecting Pages" msgstr "ページを選択する" -#: ../../the-basics.rst:540 c1d9afcfa32f491d80ad0e79d15f0a87 +#: ../../the-basics.rst:540 3db8f868455c4422a22a8739d7651725 msgid "To select pages, do the following:" msgstr "ページを選択するには、以下の手順を実行してください:" -#: ../../the-basics.rst:555 1678dbe52dea48aab34b0927029f0dcf +#: ../../the-basics.rst:555 09491c46d0124346a4620dc928ac2a9e msgid "" "With |PyMuPDF| you have all options to copy, move, delete or re-arrange " "the pages of a |PDF|. Intuitive methods exist that allow you to do this " @@ -479,7 +478,7 @@ msgstr "" "|PyMuPDF| を使用すると、 |PDF| のページをコピー、移動、削除、または再配置するためのオプションがすべて揃っています。 " ":meth:`Document.copy_page` メソッドのように、ページ単位で直感的なメソッドを使用してこれらの操作を行うことができます。" -#: ../../the-basics.rst:557 598e7d3b072b4fbbbae43dbaaacbe677 +#: ../../the-basics.rst:557 f38fd21a8beb4136bb4eda2f7ed52873 msgid "" "Or you alternatively prepare a complete new page layout in form of a " ":title:`Python` sequence, that contains the page numbers you want, in the" @@ -490,13 +489,13 @@ msgstr "" "のシーケンスとして完全な新しいページレイアウトを準備し、希望するページ番号を希望する順序で含め、必要なページ数だけ繰り返すこともできます。次の例は、" " :meth:`Document.select` を使用した可能性を示しています。" -#: ../../the-basics.rst:564 394b118e4fea481f98530ea892ffa331 +#: ../../the-basics.rst:564 88e421ecb4fc4d56adaf214dccae4daa msgid "" "Now let's prepare a PDF for double-sided printing (on a printer not " "directly supporting this):" msgstr "以下のように、両面印刷用にPDFを準備しましょう(直接これをサポートしていないプリンターで):" -#: ../../the-basics.rst:566 0461707198ed4354b72bbb130a6a9f08 +#: ../../the-basics.rst:566 74d3cda3847c46b7af864e6bc7c19cf8 msgid "" "The number of pages is given by `len(doc)` (equal to `doc.page_count`). " "The following lists represent the even and the odd page numbers, " @@ -505,13 +504,13 @@ msgstr "" "ページ数は `len(doc)`( `doc.page_count` " "と同じ)で与えられます。以下のリストは、それぞれ偶数ページと奇数ページの番号を表しています:" -#: ../../the-basics.rst:573 3ff63af9514a483aa91e1e8a8bcac9ba +#: ../../the-basics.rst:573 2e020acac7f14b078d00def4cebc4fec msgid "" "This snippet creates the respective sub documents which can then be used " "to print the document:" msgstr "このスニペットは、それぞれのサブドキュメントを作成し、それらを使用してドキュメントを印刷することができます:" -#: ../../the-basics.rst:585 bef216111e6947bcaa5df4a0765c143e +#: ../../the-basics.rst:585 a77fc70595bb4766ad8a0d5ffca2b8cf msgid "" "For more information also have a look at this Wiki `article " "`_." @@ -519,7 +518,7 @@ msgstr "" "詳細については、この `ウィキの記事 `_ もご覧ください。" -#: ../../the-basics.rst:588 8f2ed2cf47d04896b61190b4ce77af3b +#: ../../the-basics.rst:588 6c87cc6c645e4408a02889aca746f748 msgid "" "The following example will reverse the order of all pages (**extremely " "fast:** sub-second time for the 756 pages of the :ref:`AdobeManual`):" @@ -527,30 +526,30 @@ msgstr "" "次の例は、すべてのページの順序を逆にするものです(非常に高速: :ref:`AdobeManual` " "リファレンスの756ページをサブセカンドの時間で処理します)。" -#: ../../the-basics.rst:598 96ecf9716d4e41e99add725ceeaa7a16 +#: ../../the-basics.rst:598 b9eda6c35a9b4b569375594839df0a97 msgid "" "This snippet duplicates the PDF with itself so that it will contain the " "pages *0, 1, ..., n, 0, 1, ..., n* **(extremely fast and without " "noticeably increasing the file size!)**:" msgstr "このスニペットは、PDFを自身と重複させることで、ページ0、1、…、n、0、1、…、nを含むようにします(非常に高速で、ファイルサイズをほとんど増やさずに実現します!):" -#: ../../the-basics.rst:610 6ff2a3b583ea419f842a09e8f5a865ce +#: ../../the-basics.rst:610 db170cb4731c4d9fb983242366f6e186 msgid ":meth:`Document.select`" msgstr "" -#: ../../the-basics.rst:621 eaa4db5c2ad74c198b7ded55dffd905d +#: ../../the-basics.rst:621 11bf1fc8a6144c888028b25e240c5514 msgid "Adding Blank Pages" msgstr "空白のページを追加する" -#: ../../the-basics.rst:623 da987a92318a48b39a70f35c4bd6fc90 +#: ../../the-basics.rst:623 e6ba26e2fe264930b67c0e9ff511017c msgid "To add a blank page, do the following:" msgstr "空白のページを追加するには、以下の手順を行います:" -#: ../../the-basics.rst:640 a15ba9055c254a0993ed35d47c1ef608 +#: ../../the-basics.rst:640 c73c566766104c198225c46f3fa4b332 msgid "Use this to create the page with another pre-defined paper format:" msgstr "以下の方法を使用して、別の事前定義された用紙フォーマットを使ってページを作成します:" -#: ../../the-basics.rst:648 4d099d8a5a8d45ab9d0117330a7f994a +#: ../../the-basics.rst:648 fa99380598a74f60a839a06cb2b9f706 msgid "" "The convenience function :meth:`paper_size` knows over 40 industry " "standard paper formats to choose from. To see them, inspect dictionary " @@ -562,25 +561,25 @@ msgstr "" "attr:`paperSizes` を調べてください。用紙の寸法を取得するために、希望する辞書キーを :meth:`paper_size` " "に渡します。大文字と小文字の両方がサポートされています。フォーマット名に「-L」を追加すると、横長バージョンが返されます。" -#: ../../the-basics.rst:650 3279352308ef40a49505d4d166360ae9 +#: ../../the-basics.rst:650 7bb204302fe64b9c8102ce9b60e306f1 msgid "" "Here is a 3-liner that creates a |PDF|: with one empty page. Its file " "size is 460 bytes:" msgstr "以下は、1ページの空白の |PDF|: を作成するための3行のコードです。ファイルサイズは460バイトです。" -#: ../../the-basics.rst:661 594c3e9e7d8e4071913559f44675855d +#: ../../the-basics.rst:661 16708fa927574853b07cfbe391fa574a msgid ":meth:`Document.new_page`" msgstr "" -#: ../../the-basics.rst:662 133334c340844b9e8d6c723a24a18bed +#: ../../the-basics.rst:662 555dd6a7a4ca428ca05ffe585eb7dd98 msgid ":attr:`paperSizes`" msgstr "" -#: ../../the-basics.rst:671 40490dd4146e471fbdf4b58aa22370f7 +#: ../../the-basics.rst:671 0c9d0f6b0af141bc92c8094e7d5d0fee msgid "Inserting Pages with Text Content" msgstr "ページにテキストコンテンツを挿入する" -#: ../../the-basics.rst:673 404f03ed6666477b954c42398cfcd27c +#: ../../the-basics.rst:673 8801a769c6764d358d2334b4dd80e5d6 msgid "" "Using the :meth:`Document.insert_page` method also inserts a new page and" " accepts the same `width` and `height` parameters. But it lets you also " @@ -590,7 +589,7 @@ msgstr "" ":meth:`Document.insert_page` " "メソッドを使用すると、新しいページが挿入され、同じ幅と高さのパラメーターが受け入れられます。しかし、このメソッドでは新しいページに任意のテキストを挿入することができ、挿入された行数が返されます。" -#: ../../the-basics.rst:696 37ae318d87c74a1bb753d4763c5c2844 +#: ../../the-basics.rst:696 1f709a1e688c4c64ad9835a43df6b7e5 msgid "" "The text parameter can be a (sequence of) string (assuming UTF-8 " "encoding). Insertion will start at :ref:`Point` (50, 72), which is one " @@ -600,15 +599,15 @@ msgstr "" "テキストパラメーターは、UTF-8エンコーディングを想定している(シーケンスの)文字列です。挿入はページの上端から1インチ下であるポイント " ":ref:`Point` (50, 72) から始まり、左から50ポイントの位置です。挿入されたテキストの行数が返されます。" -#: ../../the-basics.rst:700 15e08ace829c4661beed75adfa642c41 +#: ../../the-basics.rst:700 5503e405b8a74c46ac510d142a942f92 msgid ":meth:`Document.insert_page`" msgstr "" -#: ../../the-basics.rst:711 8b3ac7a309db4aa9b678a6cf8896ca58 +#: ../../the-basics.rst:711 28cd42d51f99409a89dd644e5a331e95 msgid "Splitting Single Pages" msgstr "単一のページを分割する" -#: ../../the-basics.rst:713 b6f64adf430644a3ad93decd16631881 +#: ../../the-basics.rst:713 7caccc9bbcaa4fa2941b493e69be1447 msgid "" "This deals with splitting up pages of a |PDF| in arbitrary pieces. For " "example, you may have a |PDF| with *Letter* format pages which you want " @@ -621,25 +620,25 @@ msgstr "" "ページになります。" #: ../../the-basics.rst:756 ../../the-basics.rst:814 -#: 8e3870d4acf54f589770a80220d81c8a f03e6f1ca39d47bcb4f0dcd4ef74e377 +#: 3ad50277922f4b4c9ce6e2eb2d3b4350 650a82fa6a3444c7b4f1119637692c77 msgid "Example:" msgstr "例:" #: ../../the-basics.rst:764 ../../the-basics.rst:823 -#: f682f44bdc2d417382d02c5b34422edc fa23a36b95694dfa884e9fb3e10feaff +#: 7f62edf5aa794474925340a623c05d4b a9ff4ea823fa4eaf80c415c485663e6b msgid ":meth:`Page.cropbox_position`" msgstr "" #: ../../the-basics.rst:765 ../../the-basics.rst:824 -#: 4ac8d31f5989465a9a3b86b84fc8773c 902b6a4dcbd44bfe84ec51b097304b13 +#: 86564b77e5c3440dba3f909f25fed95e ffceed2bb2ac4e738336a3eb438cb502 msgid ":meth:`Page.show_pdf_page`" msgstr "" -#: ../../the-basics.rst:775 2a550b13db064e138600dbc8288e7e5a +#: ../../the-basics.rst:775 02e8677a9ee44d47acfb3845cbeb17f3 msgid "Combining Single Pages" msgstr "単一のページを結合する" -#: ../../the-basics.rst:777 6d12364deac54cc1ab3726ec4cc09e36 +#: ../../the-basics.rst:777 2f61c36415a847069ab18578a22a28b3 msgid "" "This deals with joining |PDF| pages to form a new |PDF| with pages each " "combining two or four original ones (also called \"2-up\", \"4-up\", " @@ -648,17 +647,17 @@ msgstr "" "これは、2つまたは4つの元のページを組み合わせた新しい |PDF| " "を作成することを意味します(または「2-up」、「4-up」などとも呼ばれます)。これは、ブックレットやサムネイルのような概要を作成するために使用できます。" -#: ../../the-basics.rst:833 bb43cb1f08544b0c848a35c0f988dabc +#: ../../the-basics.rst:833 8a7f8d78c24e4f378fee6b2230783c26 msgid "|PDF| Encryption & Decryption" msgstr "|PDF| の暗号化と復号化" -#: ../../the-basics.rst:836 7db3d9121446435a8e7af8146675128d +#: ../../the-basics.rst:836 71dc729191e040fd8118fee77ba6a2a8 msgid "" "Starting with version 1.16.0, |PDF| decryption and encryption (using " "passwords) are fully supported. You can do the following:" msgstr "バージョン1.16.0から、PDFの暗号化と復号化(パスワードを使用)が完全にサポートされています。以下のことができます:" -#: ../../the-basics.rst:838 3b4db29b7a2d4adb842d692a96ffbe10 +#: ../../the-basics.rst:838 dd359c928f974ab5947e47392afdc2a9 msgid "" "Check whether a document is password protected / (still) encrypted " "(:attr:`Document.needs_pass`, :attr:`Document.is_encrypted`)." @@ -666,56 +665,56 @@ msgstr "" "ドキュメントがパスワード保護されているか、(まだ)暗号化されているかを確認する(:attr:`Document.needs_pass`, " ":attr:`Document.is_encrypted`)。" -#: ../../the-basics.rst:839 beb474ce9933436785d592624f510c71 +#: ../../the-basics.rst:839 f16ee2a615fe4984bb226ff54db0fe8f msgid "Gain access authorization to a document (:meth:`Document.authenticate`)." msgstr "ドキュメントへのアクセス権を取得する(:meth:`Document.authenticate`)。" -#: ../../the-basics.rst:840 d9f9a79c572c449cb8fd0f50c9edf8d7 +#: ../../the-basics.rst:840 6a05b415f16d40768f4e1564236d6231 msgid "" "Set encryption details for PDF files using :meth:`Document.save` or " ":meth:`Document.write` and" msgstr ":meth:`Document.save` または :meth:`Document.write` を使用して、PDFファイルの暗号化詳細を設定する。" -#: ../../the-basics.rst:842 da9bc80a592f4e7f93c3b8182f31dc7f +#: ../../the-basics.rst:842 a28670df924945ff88d6be01321e1a30 msgid "decrypt or encrypt the content" msgstr "内容の復号化または暗号化" -#: ../../the-basics.rst:843 2e79d55f243846b7a8906a7e5c029edd +#: ../../the-basics.rst:843 d73094fe4cc9466a9bf3378d56401b78 msgid "set password(s)" msgstr "パスワードの設定" -#: ../../the-basics.rst:844 2972689d678848ab9b921ab080741fc8 +#: ../../the-basics.rst:844 5aed08cd9fcc43ab8d5b06fb650a0ca6 msgid "set the encryption method" msgstr "暗号化方式の設定" -#: ../../the-basics.rst:845 1b2aef0189564b0fbdcf011eab9bc055 +#: ../../the-basics.rst:845 76a02a01b3e04059b3deb41a2a8ffb73 msgid "set permission details" msgstr "権限の詳細設定" -#: ../../the-basics.rst:847 292f720b93a74ff4a1cd3f209eb7a979 +#: ../../the-basics.rst:847 7fca3b11f52b4b0ca3876005bd500c57 msgid "A PDF document may have two different passwords:" msgstr "PDF文書には2つの異なるパスワードが存在する場合があります:" -#: ../../the-basics.rst:849 6b3afbd56e6d4fc5bab3117644b298d5 +#: ../../the-basics.rst:849 73c3a5f74efb4167905a89f8f1383c0a msgid "" "The **owner password** provides full access rights, including changing " "passwords, encryption method, or permission detail." msgstr "オーナーパスワード:パスワードを変更したり、暗号化方法を変更したり、権限の詳細を含む完全なアクセス権を提供します。" -#: ../../the-basics.rst:850 9a49970bddb14d4c860bc9e9685103ec +#: ../../the-basics.rst:850 e2fb43f6fcdb49739207db257e3f97bb msgid "" "The **user password** provides access to document content according to " "the established permission details. If present, opening the |PDF| in a " "viewer will require providing it." msgstr "ユーザーパスワード:文書の内容にアクセスするための権限詳細に基づいてアクセスを提供します。存在する場合、ビューアでPDFを開く際にユーザーパスワードを入力する必要があります。" -#: ../../the-basics.rst:852 e2803e4b3fa34ffeb458325682777ef9 +#: ../../the-basics.rst:852 c66bf0cbf4934d79a253d8f6b43d51f4 msgid "" "Method :meth:`Document.authenticate` will automatically establish access " "rights according to the password used." msgstr "メソッド :meth:`Document.authenticate` は、使用されるパスワードに基づいて自動的にアクセス権を確立します。" -#: ../../the-basics.rst:854 db714141637a47eca82fed79cb1b70f9 +#: ../../the-basics.rst:854 8d09fb5167d443ef9ee672510c3def18 msgid "" "The following snippet creates a new |PDF| and encrypts it with separate " "user and owner passwords. Permissions are granted to print, copy and " @@ -725,19 +724,19 @@ msgstr "" "以下のスニペットは新しい |PDF| " "を作成し、別々のユーザーパスワードとオーナーパスワードで暗号化します。印刷、コピー、注釈付けの権限が与えられますが、ユーザーパスワードで認証するユーザーに対しては変更は許可されません" -#: ../../the-basics.rst:888 8c5a1a4a07ba47509043f81698b02703 +#: ../../the-basics.rst:888 10c5018907dd4496be681ebd8e664fd6 msgid "" "Opening this document with some viewer (Nitro Reader 5) reflects these " "settings:" msgstr "このドキュメントをいくつかのビューア(Nitro Reader 5など)で開くと、これらの設定が反映されます:" -#: ../../the-basics.rst:892 617e8c8bb5e64b978a8a9bad6e179a40 +#: ../../the-basics.rst:892 03d88819ea404f0aaf81ffe5d60d7425 msgid "" "**Decrypting** will automatically happen on save as before when no " "encryption parameters are provided." msgstr "暗号化パラメータが提供されていない場合、保存時に自動的に復号化されます。" -#: ../../the-basics.rst:894 ba1fcbe3b1d746598a1b13dd1b02d558 +#: ../../the-basics.rst:894 f367fcac22c6414ab97981825f130856 msgid "" "To **keep the encryption method** of a PDF save it using " "`encryption=pymupdf.PDF_ENCRYPT_KEEP`. If `doc.can_save_incrementally() " @@ -746,69 +745,69 @@ msgstr "" "PDFの暗号化方法を保持するには、`encryption=pymupdf.PDF_ENCRYPT_KEEP` を使用して保存します。また、 " "`doc.can_save_incrementally() == True` であれば、増分保存も可能です" -#: ../../the-basics.rst:896 fefe08fbd9e8423394e84d3da6e42428 +#: ../../the-basics.rst:896 beec27387fd7422bb3e063049ff22429 msgid "" "To **change the encryption method** specify the full range of options " "above (`encryption`, `owner_pw`, `user_pw`, `permissions`). An " "incremental save is **not possible** in this case." msgstr "暗号化方法を変更する場合は、上記のすべてのオプション(`encryption`、`owner_pw`、`user_pw`、`permissions`)を指定します。この場合、増分保存はできません。" -#: ../../the-basics.rst:900 42ad653c544e4a258d01d0ab9fdf1e2c +#: ../../the-basics.rst:900 20699b9f6451443d8b941958c154d7a7 msgid ":meth:`Document.save`" msgstr "" -#: ../../the-basics.rst:909 67196bcf9984452f9f2b19ce57d1a618 +#: ../../the-basics.rst:909 d798da65fa514bd0aebc4068c084a7ca msgid "Extracting Tables from a :title:`Page`" msgstr "ページからのテーブルの抽出" -#: ../../the-basics.rst:911 22ea5464549a4902a66d2fb3c0e71b18 +#: ../../the-basics.rst:911 e4ef14dd9323461295fcdab920a24b7e msgid "Tables can be found and extracted from any document :ref:`Page`." msgstr "表はどのドキュメントの :ref:`Page` からも見つけて抽出できます。" -#: ../../the-basics.rst:930 dcb7afb67b0c478a9d421ac798fbcc51 +#: ../../the-basics.rst:930 fc83ee37b6f443bc9104c718aa70c0ec #, fuzzy msgid ":meth:`Page.find_tables`" msgstr ":meth:`Page.get_text`" -#: ../../the-basics.rst:935 4c1524e8d7724ac2aa2c5836e14e413b +#: ../../the-basics.rst:935 ae116fead03d40f4ae9e9e1fa4dd5657 msgid "" "There is also the `pdf2docx extract tables method`_ which is capable of " "table extraction if you prefer." msgstr "お好みの場合、テーブル抽出が `可能なpdf2docxのextract tablesメソッド`_ もあります。" -#: ../../the-basics.rst:944 0c70a9af9a1b4aba81afbe96e74d1dde +#: ../../the-basics.rst:944 09cbe8ebd73f4fdbae255f4eb4ac88d9 msgid "Getting Page Links" msgstr "ページリンクの取得" -#: ../../the-basics.rst:946 68ec6654c91349698f9e27323784f0fd +#: ../../the-basics.rst:946 8f8e76066ac34e6288f125de53c52324 msgid "Links can be extracted from a :ref:`Page` to return :ref:`Link` objects." msgstr ":ref:`Page` からリンクを抽出して :ref:`Link` オブジェクトを返すことができます。" -#: ../../the-basics.rst:966 93f758cbea3a4f9ba1ebfd3cbcc21322 +#: ../../the-basics.rst:966 4b1b5f7afbde4704808ac3807d07675a #, fuzzy msgid ":meth:`Page.first_link`" msgstr ":meth:`Page.get_text`" -#: ../../the-basics.rst:975 0068647525c74d728a6e9adc93cd9c18 +#: ../../the-basics.rst:975 b3aade8e69434effb9c03ef1b44c1f10 msgid "Getting All Annotations from a Document" msgstr "ドキュメントからすべての注釈を取得する" -#: ../../the-basics.rst:977 da3b2a98555846ce8fff97507d885496 +#: ../../the-basics.rst:977 6801cadfb5354b0ab04f7979d5a356ba msgid "" "Annotations (:ref:`Annot`) on pages can be retrieved with the " "`page.annots()` method." msgstr "ページ上の注釈 (:ref:`Annot`) は、`page.annots()` メソッドを使用して取得できます。" -#: ../../the-basics.rst:992 68a8fb7af0e94c858943816f146197d8 +#: ../../the-basics.rst:992 bf4d519f3c994f33b280f0de93018463 #, fuzzy msgid ":meth:`Page.annots`" msgstr ":meth:`Page.get_text`" -#: ../../the-basics.rst:1002 50c0ec3880c441cf8658ea7c70c45ad8 -msgid "Redacting content from a **PDF**" -msgstr "**PDF** からコンテンツを塗りつぶす" +#: ../../the-basics.rst:1002 c5273dfabc3043a8b9607b2a9d28ce43 +msgid "Redacting content from a |PDF|" +msgstr "|PDF| からコンテンツを塗りつぶす" -#: ../../the-basics.rst:1004 180c459e0c884ea5a3c0e02bed8c4b23 +#: ../../the-basics.rst:1004 e030189f77db4e8983c5a6528654fd34 msgid "" "Redactions are special types of annotations which can be marked onto a " "document page to denote an area on the page which should be securely " @@ -817,66 +816,62 @@ msgid "" "is securely removed." msgstr "マーキングされた領域に矩形を使用して、ページ上の削除されるべき領域を示すために、赤字が付けられる特別なアノテーションです。領域に矩形をマークした後、その領域は赤字としてマークされ、赤字が適用されると、そのコンテンツは安全に削除されます。" -#: ../../the-basics.rst:1006 4b4d19f348aa44a0b7ebcbae48f2235d +#: ../../the-basics.rst:1006 576dffbcb6454f419fb44e03a6766f97 msgid "" "For example if we wanted to redact all instances of the name \"Jane Doe\"" " from a document we could do the following:" msgstr "たとえば、ドキュメントから名前「ジェーン・ドー」のすべてのインスタンスを塗りつぶしたい場合は、次のようにします:" -#: ../../the-basics.rst:1034 ba23c113e6b1461fb351481981b025ac +#: ../../the-basics.rst:1034 512a331e2f6a4420af87d029a290261c msgid "" "Another example could be redacting an area of a page, but not to redact " "any line art (i.e. vector graphics) within the defined area, by setting a" " parameter flag as follows:" msgstr "別の例として、ページの領域を塗りつぶすが、定義された領域内の線画(ベクトルグラフィックス)を塗りつぶさないように、パラメータフラグを設定することができます。" -#: ../../the-basics.rst:1065 e05ae9a504e94e9d9ba27fdade28e9b7 +#: ../../the-basics.rst:1065 eed2e214f7454d77b9f11502e75e71b6 msgid "" "Once a redacted version of a document is saved then the redacted content " -"in the **PDF** is *irretrievable*. Thus, a redacted area in a document " +"in the |PDF| is *irretrievable*. Thus, a redacted area in a document " "removes text and graphics completely from that area." msgstr "" -"文書の塗りつぶし済みバージョンを保存すると、**PDF** 内の塗りつぶされたコンテンツは *取り戻すことができなくなります* " +"文書の塗りつぶし済みバージョンを保存すると、|PDF| 内の塗りつぶされたコンテンツは *取り戻すことができなくなります* " "。したがって、文書内の塗りつぶされた領域は、その領域からテキストとグラフィックスを完全に削除します。" -#: ../../the-basics.rst:1072 185c831063184e2a81241c83ff00ffd3 +#: ../../the-basics.rst:1072 24199c7a643e40f981bc9a2d6b9a76f5 msgid "" "The are a few options for creating and applying redactions to a page, for" " the full API details to understand the parameters to control these " "options refer to the API reference." msgstr "ページに赤字を作成して適用するためのいくつかのオプションがあります。これらのオプションを制御するためのパラメータを理解するためには、完全なAPI詳細についてAPIリファレンスを参照してください。" -#: ../../the-basics.rst:1076 9926eaad69454119a2fc8423c55d7d09 +#: ../../the-basics.rst:1076 5620f79d90484e0c84d9f1e6cf483ef2 #, fuzzy msgid ":meth:`Page.add_redact_annot`" msgstr ":meth:`Page.get_text`" -#: ../../the-basics.rst:1078 24179d5fb0374f659345e97189be5212 +#: ../../the-basics.rst:1078 2238e86dba64405e99bc6de9a1e29266 #, fuzzy msgid ":meth:`Page.apply_redactions`" msgstr ":meth:`Page.get_text`" -#: ../../the-basics.rst:1088 ef23da5a60a547c8b749b891b73066bf +#: ../../the-basics.rst:1088 64e88b96ce2b4df99e9d8c97cae10c8f msgid "Converting PDF Documents" msgstr "PDF ドキュメントの変換" -#: ../../the-basics.rst:1090 a54014656a8a4771b91cfb56770aad17 +#: ../../the-basics.rst:1090 c9b689d1ca1242deaf0ecf74d670aa7b msgid "" -"We recommend the pdf2docx_ library which uses **PyMuPDF** and the " -"**python-docx** library to provide simple document conversion from " -"**PDF** to **DOCX** format." +"We recommend the pdf2docx_ library which uses |PyMuPDF| and the **python-" +"docx** library to provide simple document conversion from |PDF| to " +"**DOCX** format." msgstr "" -"PyMuPDF を使用する pdf2docx_ ライブラリと、**PDF** から **DOCX** 形式への簡単なドキュメント変換を提供する " +"PyMuPDF を使用する pdf2docx_ ライブラリと、|PDF| から **DOCX** 形式への簡単なドキュメント変換を提供する " "**python-docx** ライブラリをお勧めします。" -#: ../../footer.rst:60 27e2c89bdd75442c9a5743124593ff88 +#: ../../footer.rst:60 3aa3d5fcda7349e5a5c5339a71002610 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 53b5ae0d34c44ac29210f7e00d7c6fa2 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" @@ -952,3 +947,6 @@ msgstr "" #~ "throw a file data error." #~ msgstr "サポートされていないファイルを開こうとした場合、PyMuPDFはファイルデータエラーをスローします。" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/tools.mo b/docs/locales/ja/LC_MESSAGES/tools.mo index f4cb6cfee..6634f6fda 100644 Binary files a/docs/locales/ja/LC_MESSAGES/tools.mo and b/docs/locales/ja/LC_MESSAGES/tools.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/tools.po b/docs/locales/ja/LC_MESSAGES/tools.po index be94e8d0f..4f1b1fe6c 100644 --- a/docs/locales/ja/LC_MESSAGES/tools.po +++ b/docs/locales/ja/LC_MESSAGES/tools.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-17 11:45+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 3e21cc5da6c04638abebf6bb0576e7ca +#: ../../header.rst:-1 fa4cb1c40839408c9c8cd07e9e01bb93 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 8385425b810e474a9bc5d3945501495b +#: ../../header.rst:-1 0eadbcdf62a345f492e6c5df071271b8 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 d6a5bba976a3479fa8e212541504fef8 +#: ../../header.rst:-1 ac94c9f7137942e6a95a87c8a8567dd6 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../tools.rst:6 9070cf2de85649ebabb03174f53ca0e1 +#: ../../tools.rst:6 630133a66584427d8841e6ac73cd74b2 msgid "Tools" msgstr "Tools (ツール)" -#: ../../tools.rst:8 89275fc55f904bbba67500656a09461c +#: ../../tools.rst:8 9874cd63550144bdb2077af42f68c67f msgid "" "This class is a collection of utility methods and attributes, mainly " "around memory management. To simplify and speed up its use, it is " @@ -49,128 +49,140 @@ msgstr "" "このクラスは、メモリ管理を中心としたユーティリティメソッドと属性のコレクションです。使用を簡素化し、高速化するために、PyMuPDFがインポートされると、自動的に" " *TOOLS* という名前でインスタンス化されます。" -#: ../../tools.rst:11 ffce8131ec4b47538dee28d03c41c608 +#: ../../tools.rst:11 99d510145a8d481b814d6864371fd664 msgid "**Method / Attribute**" msgstr "**メソッド/属性**" -#: ../../tools.rst:11 1a68dbecd2064423b5c7130d4f98ca7c +#: ../../tools.rst:11 5a58a92212e44a278c9d89c56b3e1210 msgid "**Description**" msgstr "**説明**" -#: ../../tools.rst:13 3103029c9a714aafa9a4d3c3d942d666 +#: ../../tools.rst:13 2b964d526bc34dbca89696e9a7f8a649 msgid ":meth:`Tools.gen_id`" msgstr "" -#: ../../tools.rst:13 f548bb88767c4981925b93aa0b55d402 +#: ../../tools.rst:13 2e23b218a694403f803ca3d4641d1e46 msgid "generate a unique identifier" msgstr "一意の識別子を生成します。" -#: ../../tools.rst:14 ca79c4ea11e74fb297c62cd9cf432d35 +#: ../../tools.rst:14 24f42327e36744579573d798b230bef0 msgid ":meth:`Tools.store_shrink`" msgstr "" -#: ../../tools.rst:14 7d18a1efd32345c6b0d572a6f7765292 +#: ../../tools.rst:14 b4c3bfa744874fc3a556cbd6b8e9b6b8 msgid "shrink the storables cache [#f1]_" msgstr "格納可能キャッシュを縮小します [#f1]_。" -#: ../../tools.rst:15 bdd3b32da67f4f7db8a47b1aed85e493 +#: ../../tools.rst:15 bad8f3d46e5b4afdb102c4e7bf50d072 msgid ":meth:`Tools.mupdf_warnings`" msgstr "" -#: ../../tools.rst:15 ../../tools.rst:16 3f61456ad4ed4b678bbb0def795ca2b0 -#: c835ceef083240a09dae1b580d3b92fe +#: ../../tools.rst:15 a2b9a9e372e04cecb473e320064f1301 msgid "return the accumulated MuPDF warnings" msgstr "蓄積されたMuPDFの警告を返します。" -#: ../../tools.rst:16 dc879497067043ac8b4dffca158d0faa +#: ../../tools.rst:16 965bf5733d4a437c9bf6499bb67ce938 msgid ":meth:`Tools.mupdf_display_errors`" msgstr "" -#: ../../tools.rst:17 77cff93dbee84e4c805c3a86af4673a4 +#: ../../tools.rst:16 95fb9fea93424795be84f9bccfc5a2c6 +msgid "control whether MuPDF errors are displayed as messages." +msgstr "" + +#: ../../tools.rst:17 aae25f7b27504eacb2dcb5df61f4be65 +msgid ":meth:`Tools.mupdf_display_warnings`" +msgstr "" + +#: ../../tools.rst:17 0ec8dcf6c973477abe4aa02ed3c8b605 +msgid "control whether MuPDF warnings are displayed as messages." +msgstr "" + +#: ../../tools.rst:18 53a94e9b9d1044b394e412402f3dcf71 msgid ":meth:`Tools.reset_mupdf_warnings`" msgstr "" -#: ../../tools.rst:17 ca203b033b444bb1ae85fef31f4ea5d1 -msgid "empty MuPDF messages on STDOUT" -msgstr "STDOUTのMuPDFメッセージを空にします。" +#: ../../tools.rst:18 39ad9b132aad445c8698e388b85423ed +#, fuzzy +msgid "empty MuPDF warnings/errors message buffer." +msgstr "MuPDFの警告メッセージバッファを空にします。" -#: ../../tools.rst:18 f4269d13c82d4e859ab77bafbaad5773 +#: ../../tools.rst:19 6719fb8425af4227a2a2717806cd2872 msgid ":meth:`Tools.set_aa_level`" msgstr "" -#: ../../tools.rst:18 32a57debbe27484b8d35b231c1e5af7b +#: ../../tools.rst:19 084c6bfe822c4d048572d1bb4db01b5d msgid "set the anti-aliasing values" msgstr "アンチエイリアシングの値を設定します。" -#: ../../tools.rst:19 d2e3f878b8e640f6871e4008f0257329 +#: ../../tools.rst:20 30023363ff6e4e8aa20333cd744dab27 msgid ":meth:`Tools.set_annot_stem`" msgstr "" -#: ../../tools.rst:19 36d75908d8564e6e8bef80cb4b4e751e +#: ../../tools.rst:20 104ce28d382346ac85d8db2cfcb5da80 msgid "set the prefix of new annotation / link ids" msgstr "新しい注釈/リンクIDのプレフィックスを設定します。" -#: ../../tools.rst:20 b08d9d0dd2b2488583cbfb00601891f5 +#: ../../tools.rst:21 de68f470119b4a60b48b7054e2f46a0c msgid ":meth:`Tools.set_small_glyph_heights`" msgstr "" -#: ../../tools.rst:20 5b1f2a85ea4047c1aed6a70e7dcc6d02 +#: ../../tools.rst:21 f69f8f062c094ffcac57dd21b3725054 msgid "search and extract using small bbox heights" msgstr "小さなbbox高さを使用して検索および抽出します。" -#: ../../tools.rst:21 fb7ae501de7e4876a2b71638ca1f3b8d +#: ../../tools.rst:22 a5f65f4e49c744f2b64fd47f8f963187 msgid ":meth:`Tools.set_subset_fontnames`" msgstr "" -#: ../../tools.rst:21 2c655eda8a644e31b9c9ec3e6ba3ffc1 +#: ../../tools.rst:22 d7a4ef524baa414c934afd124e2039c8 msgid "control suppression of subset fontname tags" msgstr "サブセットフォント名タグの抑制を制御します。" -#: ../../tools.rst:22 442c6a1009f24dd5a020cf3652e90548 +#: ../../tools.rst:23 f7f424f91b824b6fbc8d16f177210157 msgid ":meth:`Tools.show_aa_level`" msgstr "" -#: ../../tools.rst:22 42eaa90aeb8740d5bfd21946bde56a4c +#: ../../tools.rst:23 de220ac6db8f43b590219bfc76ada785 msgid "return the anti-aliasing values" msgstr "アンチエイリアシングの値を返します。" -#: ../../tools.rst:23 8466a92056d34e0d9572b58f93171a42 +#: ../../tools.rst:24 9822bd4c433c4e73a4a62e8e2fd8d55d msgid ":meth:`Tools.unset_quad_corrections`" msgstr "" -#: ../../tools.rst:23 387732655b47472d8db20f3dfec8e47e +#: ../../tools.rst:24 1ebfd2086c444331b2bf1d386b71dc90 msgid "disable PyMuPDF-specific code" msgstr "PyMuPDF固有のコードを無効にします。" -#: ../../tools.rst:24 e40e030ec5514b008c05ee5e3b82213b +#: ../../tools.rst:25 b93af0b1adae41ab8ef6adfe0264b3d7 msgid ":attr:`Tools.fitz_config`" msgstr "" -#: ../../tools.rst:24 d9bec2d7b8094fdc97542856245928b8 +#: ../../tools.rst:25 4aabf943204d404e9bcd0659b004b61a msgid "configuration settings of PyMuPDF" msgstr "PyMuPDFの設定設定" -#: ../../tools.rst:25 d5ee9150c05e497683270ced82a93d0a +#: ../../tools.rst:26 bda50dea0b1b426db8d540c41f8e225d msgid ":attr:`Tools.store_maxsize`" msgstr "" -#: ../../tools.rst:25 225254252e30445fb7685d1f22ceda17 +#: ../../tools.rst:26 d98d3a57e7f648caac4f8c85c2aa73dc msgid "maximum storables cache size" msgstr "最大格納可能キャッシュサイズ" -#: ../../tools.rst:26 840dd21f39b8467d92e97f97ead2d7ab +#: ../../tools.rst:27 832df81af8a44bf994b2927588b125b4 msgid ":attr:`Tools.store_size`" msgstr "" -#: ../../tools.rst:26 cd3e4c2c6da148918c767d0ecf6e32b7 +#: ../../tools.rst:27 1e9ca667256f4ce88906ba326e637a59 msgid "current storables cache size" msgstr "現在の格納可能キャッシュサイズ" -#: ../../tools.rst:29 ed794509223540c7a9fbe363a44e91c9 +#: ../../tools.rst:30 876332768bb84673a877ceb4dece1450 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../tools.rst:35 67ccbf14d4184427bb0e8f61a31d3139 +#: ../../tools.rst:36 65fde22db17c4647b856922e599073a4 msgid "" "A convenience method returning a unique positive integer which will " "increase by 1 on every invocation. Example usages include creating unique" @@ -178,19 +190,19 @@ msgid "" "by an order of magnitude." msgstr "1回の呼び出しごとに1ずつ増加する一意の正の整数を返す便利なメソッドです。使用例には、データベース内で一意のキーを作成することが含まれます。タイムスタンプを使用するよりも作成が10倍高速であるべきです。" -#: ../../tools.rst:37 496eed37c4e94d7ab0ebd9c8c8dcf38a +#: ../../tools.rst:38 ab15f82a042e4ed3b078c757f4e63b86 msgid "" "MuPDF has dropped support for this in v1.14.0, so we have re-implemented " "a similar function with the following differences:" msgstr "MuPDFはv1.14.0でこれをサポートを中止したため、次の違いを持つ類似の関数を再実装しました。" -#: ../../tools.rst:39 ad6efb8b8b6a4c5db5a9977a389d9af1 +#: ../../tools.rst:40 84cae01ccf524246ac7b4d9427698005 msgid "" "It is not part of MuPDF's global context and not threadsafe (not an issue" " because we do not support threads in PyMuPDF anyway)." msgstr "これはMuPDFのグローバルコンテキストの一部ではなく、スレッドセーフではありません(とにかくPyMuPDFではスレッドをサポートしていないため、これは問題ではありません)。" -#: ../../tools.rst:40 fb25a680c28e400387be6d59a09f8870 +#: ../../tools.rst:41 f05a3f0eec6c47eaab32b3d7dbadfa32 msgid "" "It is implemented as *int*. This means that the maximum number is " "*sys.maxsize*. Should this number ever be exceeded, the counter starts " @@ -199,44 +211,44 @@ msgstr "" "これはintとして実装されています。つまり、最大値は *sys.maxsize* " "です。この数値がいつか超過される場合、カウンターは1から再開します。" -#: ../../tools.rst 14c23613b79947f18285b2338f87948a -#: 35bb9b4bb80f468693163d63c3edf36f 46665df13e01407a866931bf42a0f88d -#: 48c3809b65c346e0ab95864714dfa06b 7d23aead59874092b937be57c3f675f3 -#: 7d7e2ae639af43ac86292f37acf276bf bd889c2b54fb401084a807d7c3cd9dbd -#: c94d0f674e0047ccbe22adb454d1b92e ddcca1d94291464da74c4ef79e926d35 -#: e68c2fc72409493ea9e4ce2594331669 +#: ../../tools.rst 17bbc4e0e9b1480aab24e4c8d6b901fd +#: 2c7d5afc0c614f2e947541283319a8aa 3f0e5e23a1b3401fab7534a9ffddfb6f +#: 4bceb68ff0cf4c4db44a34b626d14422 4bfaf26ceea2422398c767ec7da4f944 +#: 656f7c4b2db04ef1928e253ee58fbda8 783c6110b0e84fa69ec1e999f0763115 +#: 886de849a3b644a3b7483f4f34d47ab1 9956690247394b5abfa7987d9cb2942f +#: ae9fe9f8edaa4afa9830772bb949887b msgid "Return type" msgstr "戻り値:" -#: ../../tools.rst 0240114a3abb4a198a63bd27c0837224 -#: 0a24e4b74d4c46eeb99144ce9d2ec6a3 10a948f57edd4683a47f02d8aae86502 -#: 23d92bf83609469c9c107ee8018c6f01 3c9d0e0c79ef46ab944ecaeb4b41a5ea -#: 5b9ea2602bde4c10942e0fc9a5f15d5c 900c5bc4cca046a0b9693e93f59b879b -#: b3fa81faffb644a28544db496021627a +#: ../../tools.rst 05be31d115d84df1af6eec3998b6c813 +#: 1b38a72665554ad2b7b31cd24642d09f 322b991feded4473a556bdb214b03b1d +#: 47b093107003487e9ca47b7610cc6159 63fec7ceb4ea496eba269d589582ac36 +#: a18d16ae4a364a9d863acd8c74a5fa94 b4f07341f4ad48e897984538401987b3 +#: c6c09e9c896c4a13b41f9be7c7bd6ff6 db36bae168a54d46838b57f99adb8f1d msgid "Returns" msgstr "返り値:" -#: ../../tools.rst:43 9b7f6333cbc64ba8962b661f826f151b +#: ../../tools.rst:44 d04c5dc089994e268783aceaffad24d8 msgid "a unique positive integer." msgstr "一意の正の整数。" -#: ../../tools.rst:48 9d33a6e4fcb64b258c3645f4e02599c7 +#: ../../tools.rst:49 5ebeca1825d746f39692eebb86cb9f42 msgid "New in v1.18.6" msgstr "v1.18.6で新登場" -#: ../../tools.rst:50 6d52b034665d42f9837ebe2ada9bdb46 +#: ../../tools.rst:51 8b6fd71202b24c318c21b52e9aabae8c msgid "Set or inquire the prefix for the id of new annotations, fields or links." msgstr "新しい注釈、フィールド、またはリンクのIDのプレフィックスを設定または問い合わせます。" -#: ../../tools.rst 040f4926d15540ba954aaa579032d617 -#: 3912b0cac4144e46b134770d0c9e14eb 6ede302e10a94f5bb6a73e918ed52634 -#: 87bf80c848914f969efe8f4493ae3975 bb3f4cba06b04b798a5e040f82aa3802 -#: ce13926eec0e42b0ac2b375426cef715 d692e2c6417d4d0eb9be01c8491e632c -#: fcc7e9914a0c4ceb95949b2b63c3c18e +#: ../../tools.rst 1ecb667b90fb4a4baa562619c4cf215f +#: 658ec43b52b04330bf7a40f38e909bbc 95eef4039ef94ba79c670022599c654c +#: b3ae48d8f1a449ddbe4b6a9ae98cf4d9 c299a5cad9db4f4c84dde48c1ef4fc58 +#: c4311092aae34e4691fb6e3995c50792 c79cc99a8ac340c2a6a9adc2b3fe239a +#: ca6497050d944cf788e55eb72bc9f7d1 f54117de12074455b85ab6c94ff7dd5b msgid "Parameters" msgstr "パラメータ" -#: ../../tools.rst:52 d326f3bda92e4673bd3707150d773714 +#: ../../tools.rst:53 3501d21aa8734541bc1aa99a8ed5190c msgid "" "if omitted, the current value is returned, default is \"fitz\". " "Annotations, fields / widgets and links technically are subtypes of the " @@ -252,21 +264,21 @@ msgstr "" "\"、\"stem-Wnnn\"、または \"stem-Lnnn\" の識別子を生成します。番号 \"nnn\" " "は必要な一意性を強制するために使用されます。" -#: ../../tools.rst:55 5715621e301d47b1b0014cd25463c357 +#: ../../tools.rst:56 b611d59a32fa4723ae6eea8e46c1e4fc msgid "the current value." msgstr "現在の値。" -#: ../../tools.rst:60 2467230ef8e64e9f9604ea240823a1fc +#: ../../tools.rst:61 ed4a7b571b5840db82e999c073d641bb msgid "New in v1.18.5" msgstr "v1.18.5で新登場" -#: ../../tools.rst:62 43343aeddd8d4174b3ff3867eabdf2e7 +#: ../../tools.rst:63 d110db042c104cd9a70ee2ba0ea17274 msgid "" "Set or inquire reduced bbox heights in text extract and text search " "methods." msgstr "テキスト抽出およびテキスト検索メソッドでのbboxの高さを縮小するかどうかを設定または問い合わせます。" -#: ../../tools.rst:64 5ea0f9605b864a939a31968ecf926722 +#: ../../tools.rst:65 9dacdc2684a04823aaf2faa1c6a84582 msgid "" "if omitted or `None`, the current setting is returned. For other values " "the *bool()* function is applied to set a global variable. If `True`, " @@ -281,27 +293,27 @@ msgstr "" "の高さを持つ文字、スパン、行、またはブロックのbboxを返します。`False` " "の場合(PyMuPDFがインポートされたときの標準設定)、bboxの高さはフォントのプロパティに基づき、通常は *行の高さ* と同じです。" -#: ../../tools.rst:67 ../../tools.rst:80 ../../tools.rst:94 -#: c48dd77e4f764b718c3776b713c65803 cdcc3f20ff3844f489d12ce645b8f6b3 -#: cea18557659248828b78d2bddce7ec73 -msgid "*True* or *False*." -msgstr "*True* または *False*。" +#: ../../tools.rst:68 ../../tools.rst:81 ../../tools.rst:95 +#: 3d9f991f869c4e3687694b4b5d83e20f 8fa94c128ef84d4db600a970cc431f03 +#: fb141d29fa904b54ac786f25cee529a0 +msgid "``True`` or ``False``." +msgstr "``True`` または ``False``。" -#: ../../tools.rst:69 07ee592cf3e540fea5cbe0177d0b18fd +#: ../../tools.rst:70 6ff2af93fffb41d1952b1726635074e7 msgid "" "Text extraction options \"xml\", \"xhtml\" and \"html\", which directly " "wrap MuPDF code, are not influenced by this." msgstr "直接MuPDFコードをラップするテキスト抽出オプション「xml」、「xhtml」、「html」は、これに影響を受けません。" -#: ../../tools.rst:73 6f6a825a265b4dec961ed91a7a76a9eb +#: ../../tools.rst:74 3e2f146855c24da3bc5620a6dbf0fe16 msgid "New in v1.18.9" msgstr "バージョン1.18.9で追加されました" -#: ../../tools.rst:75 03e2e9ee0de64d53a0e228a02b82cb4d +#: ../../tools.rst:76 a47cf06efd8f42ed94738ff03d3423d2 msgid "Control suppression of subset fontname tags in text extractions." msgstr "テキスト抽出におけるサブセットフォント名のタグを抑制する制御を行います。" -#: ../../tools.rst:77 cfb06071734e4211bfa6bc84ac40c392 +#: ../../tools.rst:78 c87edd954d4c42e6b4fdd9829d79cd37 msgid "" "if omitted / `None`, the current setting is returned. Arguments " "evaluating to `True` or `False` set a global variable. If `True`, options" @@ -314,7 +326,7 @@ msgstr "" "\"dict\"、\"json\"、\"rawdict\"、\"rawjson\" は例えば `\"NOHSJV+Calibri-Light\"`" " のように返され、それ以外の場合はデフォルトの `\"Calibri-Light\"` のみが返されます。設定は再度変更されるまで有効です。" -#: ../../tools.rst:82 8a50388764c64870946fe0015dfa2a42 +#: ../../tools.rst:83 82a85fb54bd7436c925ba3b349ae06ef msgid "" "Except mentioned above, no other text extraction variants are influenced " "by this. This is especially true for the options \"xml\", \"xhtml\" and " @@ -326,11 +338,11 @@ msgstr "" "\"xml\"、\"xhtml\"、\"html\" には影響しません。これらはフォント名 `\"Calibri-" "Light\"`、またはこの例の場合はファミリー名 `Calibri` のみを抽出します。" -#: ../../tools.rst:87 0cc0414998ac405d85a2c24b33d426cb +#: ../../tools.rst:88 149b8e463c8f481c96e3b70333a749dc msgid "New in v1.18.10" msgstr "バージョン1.18.10で追加されました" -#: ../../tools.rst:89 d21a562e083a4d7fbd6ec2d7a0ab6420 +#: ../../tools.rst:90 159ffb24af174c1f8c260dc38669bafc msgid "" "Enable / disable PyMuPDF-specific code, that tries to rebuild valid " "character quads when encountering nonsense in :meth:`Page.get_text` text " @@ -342,7 +354,7 @@ msgstr "" ":meth:`Page.get_text` " "テキスト抽出で無意味なものを検出した際に、有効な文字の四角形を再構築しようとするPyMuPDF固有のコードの有効化/無効化を行います。このコードは、存在しない場合があるフォントの特性(ascenderおよびdescender)に依存しており、これらの特性にアクセスしようとするとセグメンテーション違反が発生します。このメソッドはPyMuPDF内のグローバルパラメータを設定し、このコードの実行を抑制します。" -#: ../../tools.rst:91 6dbfde2a8e1b435c9b607fa7e118c848 +#: ../../tools.rst:92 e6745e3e0ce7442b9f04193751691b0a msgid "" "if omitted or `None`, the current setting is returned. For other values " "the *bool()* function is applied to set a global variable. If `True`, " @@ -353,35 +365,35 @@ msgstr "" "関数が適用され、グローバル変数を設定します。`True` の場合、PyMuPDFは該当するフォントの特性にアクセスしようとせず、代わりに " "`ascender=0.8` および `descender=-0.2` の値を使用します。" -#: ../../tools.rst:99 45610e2c99f0425ca3aa1d6894109b6b +#: ../../tools.rst:100 4c85e3216c354121a73b16cd1b293077 msgid "Reduce the storables cache by a percentage of its current size." msgstr "現在のサイズを基準に、ストレージキャッシュのサイズを指定した割合で減少させます。" -#: ../../tools.rst:101 90b71a8412b14086a2405049aafce956 +#: ../../tools.rst:102 7618f829b73f402e918ae962dfb6a9f0 msgid "" "the percentage of current size to free. If 100+ the store will be " "emptied, if zero, nothing will happen. MuPDF's caching strategy is " "\"least recently used\", so low-usage elements get deleted first." msgstr "現在のサイズの何パーセントを解放するかを指定します。100以上の場合、ストアは空になります。むしろ、何も変更されません。MuPDFのキャッシング戦略は「最後に使用されたもの」なので、使用頻度の低い要素が最初に削除されます。" -#: ../../tools.rst:104 1a75c051d4334c559ffc5f4d2d737ef9 +#: ../../tools.rst:105 b452872341864da4b7fbb34a1df97034 msgid "" "the new current store size. Depending on the situation, the size " "reduction may be larger than the requested percentage." msgstr "新しい現在のストアサイズ。状況に応じて、要求された割合よりもサイズが大幅に削減される場合があります。" -#: ../../tools.rst:108 ../../tools.rst:118 982e63cdad97475da277cd6f58919e05 -#: ccb5a84e6da049f0b4b98996665bc677 +#: ../../tools.rst:109 ../../tools.rst:119 b2c6c42229034879a13c08954bd588f3 +#: b6ae51cffc9c4a38a66643a43141bf46 msgid "New in version 1.16.14" msgstr "バージョン1.16.14で新たに追加" -#: ../../tools.rst:110 0ad6e7087c7c4a0f954e22d18270906b +#: ../../tools.rst:111 e883965495954aed98f30f83e9079e4f msgid "" "Return the current anti-aliasing values. These values control the " "rendering quality of graphics and text elements." msgstr "現在のアンチエイリアシング値を返します。これらの値は、グラフィックスとテキスト要素のレンダリング品質を制御します。" -#: ../../tools.rst:113 381179a2cc5f4311a6bba3131b08058f +#: ../../tools.rst:114 d4f138c5562e4a23a0da982a9c981f64 msgid "" "A dictionary with the following initial content: `{'graphics': 8, 'text':" " 8, 'graphics_min_line_width': 0.0}`." @@ -389,270 +401,300 @@ msgstr "" "以下の初期内容を持つ辞書: `{'graphics': 8, 'text': 8, 'graphics_min_line_width': " "0.0}`。" -#: ../../tools.rst:120 7e70349ac48f43c3992b75419fe23868 +#: ../../tools.rst:121 debfdfadcaeb4efd8e0c271b9fdc0a06 msgid "" "Set the new number of bits to use for anti-aliasing. The same value is " "taken currently for graphics and text rendering. This might change in a " "future MuPDF release." msgstr "アンチエイリアシングに使用するビット数を設定します。現在はグラフィックスとテキストのレンダリングに同じ値が使用されます。将来のMuPDFリリースで変更されるかもしれません。" -#: ../../tools.rst:122 9114ae4fd5e2494290a829bea85cb769 +#: ../../tools.rst:123 3afd6a391b304cf9a27f036dd2a8eaea msgid "" "an integer ranging between 0 and 8. Value outside this range will be " "silently changed to valid values. The value will remain in effect " "throughout the current session or until changed again." msgstr "0から8までの範囲の整数。この範囲外の値は静かに有効な値に変更されます。この値は、現在のセッション全体または再度変更されるまで有効です。" -#: ../../tools.rst:127 ../../tools.rst:145 4c4101068f3247deb9d1f80af3c2361e -#: 6d01636436324efcbd7f70a7e98b6f06 +#: ../../tools.rst:128 ../../tools.rst:167 6647accef2ce43b5b05bcd3953c5d30a +#: e0edaaaf95744a8f9baf9b72c5df725a msgid "New in version 1.16.0" msgstr "バージョン1.16.0で新たに追加" -#: ../../tools.rst:129 cae7413cedee4b0cb868dbbe89831d67 +#: ../../tools.rst:130 1c026c1906724ca1b13646c1e61293e9 msgid "Empty MuPDF warnings message buffer." msgstr "MuPDFの警告メッセージバッファを空にします。" -#: ../../tools.rst:134 c02155f5ee8b4da4ae9ecbf2d56c8b37 +#: ../../tools.rst:135 df4c55d8bc2a4f6ca7f828393cd543b2 +#, fuzzy +msgid "Control whether MuPDF errors should be displayed as |PyMuPDF| messages." +msgstr "MuPDFのエラーを表示するかどうかを表示または設定します。" + +#: ../../tools.rst:138 ../../tools.rst:154 73102cae996e4e1ca4fda07841b0a537 +#: c281bd2c631d4437a13966f361de0044 +msgid "If `None`, the current setting is left unchanged." +msgstr "" + +#: ../../tools.rst:139 4465af6643354c54be13db87f1577e1c +msgid "" +"Otherwise changes the current setting to `bool(value)`; if ``True``, " +"future MuPDF errors will be shown as :ref:`Messages`." +msgstr "" + +#: ../../tools.rst:141 014bd4cfe67c4bb3bcc80ada14574ac7 +msgid "" +"Regardless of this setting, MuPDF errors will always be stored in the " +"warnings store." +msgstr "" + +#: ../../tools.rst:142 ../../tools.rst:158 8670777bc54b406d9b8d60d6f5053a03 +#: 8d3b08113ac444d1b78d9668a9fc41e5 +msgid "Upon import of |PyMuPDF| this value is ``True``." +msgstr "" + +#: ../../tools.rst:144 ../../tools.rst:160 83494dc367d6491db6461f478975266d +#: a414e7de4bda4732bfea1df4dd2a1c93 +msgid "The current setting as ``True`` or ``False``." +msgstr "" + +#: ../../tools.rst:146 ../../tools.rst:162 80a5617a5563495a9a4817dcf619cea1 +#: dddb4d52d6d14c31b7f962bd3d1b949d msgid "New in version 1.16.8" msgstr "バージョン1.16.8で新たに追加" -#: ../../tools.rst:136 df00df68a80040c7b2ff8c78c3bf9975 -msgid "Show or set whether MuPDF errors should be displayed." -msgstr "MuPDFのエラーを表示するかどうかを表示または設定します。" +#: ../../tools.rst:151 af5f9e3136c24a14964064e6626325cf +msgid "Control whether MuPDF warnings should be displayed as |PyMuPDF| messages." +msgstr "" -#: ../../tools.rst:138 b2171f3f9d174470a777bc407b96ae2b +#: ../../tools.rst:155 ac6aeba8d7af46f58aaa48643288ede1 msgid "" -"if not a bool, the current setting is returned. If true, MuPDF errors " -"will be shown on *sys.stderr*, otherwise suppressed. In any case, " -"messages continue to be stored in the warnings store. Upon import of " -"PyMuPDF this value is *True*." +"Otherwise changes the current setting to `bool(value)`; if ``True``, " +"future MuPDF warnings will be shown as :ref:`Messages`." msgstr "" -"boolでない場合、現在の設定が返されます。Trueの場合、MuPDFのエラーは *sys.stderr* " -"に表示され、それ以外の場合は抑制されます。いずれの場合も、メッセージは警告ストアに引き続き保存されます。PyMuPDFのインポート時にこの値は " -"*True* です。" -#: ../../tools.rst:140 1edb8037391149e285b1b3fb47f2b395 -msgid "*True* or *False*" -msgstr "*True* または *False*" +#: ../../tools.rst:157 634e03217c9946ba97edc0b2a56d297f +msgid "" +"Regardless of this setting, MuPDF warnings will always be stored in the " +"warnings store." +msgstr "" -#: ../../tools.rst:147 f11867d020484d3ca963ebbad76662ad +#: ../../tools.rst:169 ef0995c7931b4d9c8a892c119669e82d msgid "" "Return all stored MuPDF messages as a string with interspersed line-" "breaks." msgstr "すべての保存されたMuPDFメッセージを、改行が挿入された文字列として返します。" -#: ../../tools.rst:149 7a1f49239337472496b9767895e7119e +#: ../../tools.rst:171 d3fae7bc59084382bd08ee62f17f5669 msgid "*(new in version 1.16.7)* whether to automatically empty the store." msgstr "*(バージョン1.16.7で新たに追加)* ストアを自動的に空にするかどうか。" -#: ../../tools.rst:154 74e18e1fa0f64e8897869f127d46b31c +#: ../../tools.rst:176 ed88482c9c404c6eb13f4e44e68a6402 msgid "" "A dictionary containing the actual values used for configuring PyMuPDF " "and MuPDF. Also refer to the installation chapter. This is an overview of" " the keys, each of which describes the status of a support aspect." msgstr "PyMuPDFとMuPDFを設定するために使用される実際の値を含む辞書です。インストールの章も参照してください。これは各キーを概説したもので、それぞれがサポートの側面のステータスを記述しています。" -#: ../../tools.rst:157 0a5272543968450f9d3d6e67be21e762 +#: ../../tools.rst:179 983aafaaf72f47258fa885a81ffc31de msgid "**Key**" msgstr "**キー**" -#: ../../tools.rst:157 e0f5ee1340d347db98dc0ea33c3e61f3 +#: ../../tools.rst:179 2f18cc5c3f894e9e8c20b1cf745c4d35 msgid "**Support included for ...**" msgstr "**サポートが含まれているのは...**" -#: ../../tools.rst:159 a09f7fb2bade49bf96a81ccd9ed0fca3 +#: ../../tools.rst:181 67e338ca234a4c2aa997416d0d1c5e17 msgid "plotter-g" msgstr "" -#: ../../tools.rst:159 3ebfa5559c5744328ca3a1a37c68d86f +#: ../../tools.rst:181 84bd5e00e5604b07b62a4f670c9ce45f msgid "Gray colorspace rendering" msgstr "グレーカラースペースのレンダリング" -#: ../../tools.rst:160 4c4d62b0a211456db5bc87591135c8da +#: ../../tools.rst:182 76b2f02c816740679adf790799635016 msgid "plotter-rgb" msgstr "" -#: ../../tools.rst:160 899f78266629447196c94bb091d0d5d5 +#: ../../tools.rst:182 79231c9485fd412994543d8f4d42c1fa msgid "RGB colorspace rendering" msgstr "RGBカラースペースのレンダリング" -#: ../../tools.rst:161 7ab7cf4353904add8cc2543c2906c3af +#: ../../tools.rst:183 91d85a25304d4436bfeed78b823f708d msgid "plotter-cmyk" msgstr "" -#: ../../tools.rst:161 7244b109e5dd4f8b9816f3265e0c6a57 +#: ../../tools.rst:183 924491f03aaf43d8a889798e8268c631 msgid "CMYK colorspcae rendering" msgstr "CMYKカラースペースのレンダリング" -#: ../../tools.rst:162 7fbae9ca1c49438c89be1b7e601501a9 +#: ../../tools.rst:184 b0fe29a8de9a4503a0c5bd27e7fc2b1e msgid "plotter-n" msgstr "" -#: ../../tools.rst:162 f2484fbdcd294add9a63c8527ccd35d9 +#: ../../tools.rst:184 e2367e803bd544e0a704fa3f6f4a377f msgid "overprint rendering" msgstr "オーバープリントのレンダリング" -#: ../../tools.rst:163 98e4e1572bb547a8a149a4eaa37fad9b +#: ../../tools.rst:185 40de005f09c64d48a68030bc62f04a7a msgid "pdf" msgstr "" -#: ../../tools.rst:163 7bbedb35700145ccab63769c5d1e22bf +#: ../../tools.rst:185 017318bcef5043d3a24dc1ac259bd96d msgid "PDF documents" msgstr "PDFドキュメント" -#: ../../tools.rst:164 f1fe394682914c21b5f0b985039cd7ee +#: ../../tools.rst:186 7879df7588cf4b4881667d16ef9b4044 msgid "xps" msgstr "" -#: ../../tools.rst:164 a117eee0d79844f082b07c5038889fe1 +#: ../../tools.rst:186 554de734100a44889b05ea16bbbb4801 msgid "XPS documents" msgstr "XPSドキュメント" -#: ../../tools.rst:165 42461e5d484241dc8e31001129e8c64d +#: ../../tools.rst:187 e899c76673eb4de781ea52b20f05d668 msgid "svg" msgstr "" -#: ../../tools.rst:165 c330bac25dea4744a26c89683089d574 +#: ../../tools.rst:187 2dfe37a142164ae3acbc5c646b670f4f msgid "SVG documents" msgstr "SVGドキュメント" -#: ../../tools.rst:166 0a26cd625802463090ec8b585a88c8d9 +#: ../../tools.rst:188 5f181d975a094cc29464ac24fe074950 msgid "cbz" msgstr "" -#: ../../tools.rst:166 fedfe7d50a4a41da8c06f9fc039b3650 +#: ../../tools.rst:188 0bc4106af7494ee88794d1ae4bb7ff79 msgid "CBZ documents" msgstr "CBZドキュメント" -#: ../../tools.rst:167 562df832d879429780608a759817ef47 +#: ../../tools.rst:189 61552041ec884b1bbe274dbbda088bd1 msgid "img" msgstr "" -#: ../../tools.rst:167 e431b9f939494b4a808580ee33df963a +#: ../../tools.rst:189 d12314e92993424f83174027a6ec725b msgid "IMG documents" msgstr "IMGドキュメント" -#: ../../tools.rst:168 c28bdbacf65d47ac927714e8d95ecfce +#: ../../tools.rst:190 dd29953e1c66455a9923bf816e2a3282 msgid "html" msgstr "" -#: ../../tools.rst:168 2d5deb43a9a2461a84f525bd481b4b4c +#: ../../tools.rst:190 127d85fe33354ac7971afa414123d63a msgid "HTML documents" msgstr "HTMLドキュメント" -#: ../../tools.rst:169 6cc4fe0ae21e4afcb38e748210fb46e0 +#: ../../tools.rst:191 10cbf4f7a1cd41b9a80e083b7c002bed msgid "epub" msgstr "" -#: ../../tools.rst:169 ebd10d21f77a4853ae2e72f2cb69d04c +#: ../../tools.rst:191 9ec403b9146f43eea9153809fffae100 msgid "EPUB documents" msgstr "EPUBドキュメント" -#: ../../tools.rst:170 0d5fc71f773249d688384ad0d1e58ff5 +#: ../../tools.rst:192 481a896d6b84460e8c1282ef91422469 msgid "jpx" msgstr "" -#: ../../tools.rst:170 7bfea46bf1f6418c8563defe7a03bbd5 +#: ../../tools.rst:192 22765c91abce4d04836e6ff2519678ef msgid "JPEG2000 images" msgstr "JPEG2000画像" -#: ../../tools.rst:171 0195ffa379724bc5a23fe6bb6b6ecf25 +#: ../../tools.rst:193 d46c0035bc044897ada86595b3d04bda msgid "js" msgstr "" -#: ../../tools.rst:171 0ec8d20836594afe9a09a59fc0e89699 +#: ../../tools.rst:193 dfe437b8979a42939b5938fb1f481ed3 msgid "JavaScript" msgstr "" -#: ../../tools.rst:172 c752e90708fa4751a3d0ef2dbae07832 +#: ../../tools.rst:194 8ddda388461a473c9736d53993c96bcf msgid "tofu" msgstr "" -#: ../../tools.rst:172 4903f0bdcdae421e97b13473b651caab +#: ../../tools.rst:194 7c1d3ad770de460f824862a33e06e231 msgid "all TOFU fonts" msgstr "すべてのTOFUフォント" -#: ../../tools.rst:173 a35266e402d542c59b656a31d67f992b +#: ../../tools.rst:195 ac7fb6b9c8e445aeb8f522c60057cf2b msgid "tofu-cjk" msgstr "" -#: ../../tools.rst:173 dbde2a39c0b44628b223dc8b7ffc9188 +#: ../../tools.rst:195 6285e0aecced48a88277034654e7e42d msgid "CJK font subset (China, Japan, Korea)" msgstr "CJKフォントのサブセット(中国、日本、韓国)" -#: ../../tools.rst:174 4742e25549c64bd080a403f3113caf7b +#: ../../tools.rst:196 2a0c3f09e54c410a975730ce5aaa00de msgid "tofu-cjk-ext" msgstr "" -#: ../../tools.rst:174 0523546ab1764281a147ce772e510a00 +#: ../../tools.rst:196 32e4ef23a02f4c36a24fd31d49a5607e msgid "CJK font extensions" msgstr "CJKフォント拡張" -#: ../../tools.rst:175 2171507e86be4379963d54498ef9c497 +#: ../../tools.rst:197 8cf92f3f79df450ebefd0fbca0b7d825 msgid "tofu-cjk-lang" msgstr "" -#: ../../tools.rst:175 030d6bff042044fea84d25d24289f220 +#: ../../tools.rst:197 b7426777724d4f16b655a5c11d77f9dd msgid "CJK font language extensions" msgstr "CJKフォントの言語拡張" -#: ../../tools.rst:176 3a2b9a4c13c0434ba0207e0a55de0c9c +#: ../../tools.rst:198 703a769d7b434dcaa4cfa08f972492b2 msgid "tofu-emoji" msgstr "" -#: ../../tools.rst:176 6fee8801d00244b99d464211f7d471f7 +#: ../../tools.rst:198 846d00d7a0a249ea87e0c1029b8e395c msgid "TOFU emoji fonts" msgstr "TOFU絵文字フォント" -#: ../../tools.rst:177 9eeec5d30e9141029d009a7ac9b6252e +#: ../../tools.rst:199 66b289107a8e4e8abd1bd9d88d481d42 msgid "tofu-historic" msgstr "" -#: ../../tools.rst:177 b60fdd3bbf864bd0b0dd15606ebd3b9e +#: ../../tools.rst:199 6f259e97e9bd497d9e9a1e025bcf9982 msgid "TOFU historic fonts" msgstr "TOFU歴史的フォント" -#: ../../tools.rst:178 23e71400ad704b2ba7624396b51b5c2c +#: ../../tools.rst:200 14977ce1ee544b9abfc8db96b0cbb68c msgid "tofu-symbol" msgstr "" -#: ../../tools.rst:178 002080d4c6154781bbd95918093a07fb +#: ../../tools.rst:200 dd5d0777ea504428b2029606f420e098 msgid "TOFU symbol fonts" msgstr "TOFUシンボルフォント" -#: ../../tools.rst:179 124d5ceaebf84bf3894ca25788e11a73 +#: ../../tools.rst:201 629d3ba30efd4345bbc69f56a1d9810c msgid "tofu-sil" msgstr "" -#: ../../tools.rst:179 20aa3ef43d1a4ac4bbb1d56f8faadc5c +#: ../../tools.rst:201 bfbb2fb374b64c6082355e8e493b429f msgid "TOFU SIL fonts" msgstr "TOFU SILフォント" -#: ../../tools.rst:180 48dce4ab244a47da91eb98ff744cfb27 +#: ../../tools.rst:202 4f7a65512f0844ef818c1d9624c5c335 msgid "icc" msgstr "" -#: ../../tools.rst:180 1fe77e2315384790a5286cfee506f041 +#: ../../tools.rst:202 7fc4ac21a5104fac97ffb3afa1c5980d msgid "ICC profiles" msgstr "ICCプロファイル" -#: ../../tools.rst:181 fd9905c1a62049d780eb54ea82be8d60 +#: ../../tools.rst:203 c40e5ca7f3024ac2b2434d42fd91fc52 msgid "py-memory" msgstr "" -#: ../../tools.rst:181 ac12f815c6ea4dd886382f3443822323 +#: ../../tools.rst:203 9b71c6d69b014bf2b7b0c8fe41ce6e22 msgid "using Python memory management [#f2]_" msgstr "Pythonメモリ管理を使用 [#f2]_" -#: ../../tools.rst:182 6b8314a6167f4f04bfbb9b70913510f8 +#: ../../tools.rst:204 ab89c03d6ab44abfb553acb0f1bf378b msgid "base14" msgstr "" -#: ../../tools.rst:182 5963126c8d4047a2886a8333eb07ae33 +#: ../../tools.rst:204 002400f1661d403bb8cd28b30acbd9b1 msgid "Base-14 fonts (should always be true)" msgstr "Base-14フォント(常にtrueである必要があります)" -#: ../../tools.rst:185 56a9c27814ec4ca0b389a6a556d457cc +#: ../../tools.rst:207 a7392b4d969e4c53a89f24a17bedd641 #, fuzzy msgid "" "For an explanation of the term \"TOFU\" see `this Wikipedia article " @@ -661,36 +703,37 @@ msgstr "" "「TOFU」の用語の説明については、 `このウィキペディアの記事 " "`_ を参照してください。::" -#: ../../tools.rst:219 ec2ddd615e8a4f11946e8824d15f2f68 +#: ../../tools.rst:241 f0ca1b8827e0409b8d193598bd42bbb6 msgid "" -"Maximum storables cache size in bytes. **PyMuPDF** is generated with a " +"Maximum storables cache size in bytes. |PyMuPDF| is generated with a " "value of 268'435'456 (256 MB, the default value), which you should " "therefore always see here. If this value is zero, then an \"unlimited\" " "growth is permitted." msgstr "" -"ストアブルキャッシュの最大サイズ(バイト単位)。 **PyMuPDF** は、デフォルト値である268'435'456(256 " +"ストアブルキャッシュの最大サイズ(バイト単位)。 |PyMuPDF| は、デフォルト値である268'435'456(256 " "MB)で生成されており、したがって常にここで見るはずです。この値がゼロの場合、増加の「制限なし」が許可されています。" -#: ../../tools.rst:225 1a3961f9445d465693773c6cb8fe4f8c +#: ../../tools.rst:247 c4a141a4e2f54f6c821d474393efda1b msgid "" "Current storables cache size in bytes. This value may change (and will " -"usually increase) with every use of a **PyMuPDF** function. It will " +"usually increase) with every use of a |PyMuPDF| function. It will " "(automatically) decrease only when :attr:`Tools.store_maxsize` is going " -"to be exceeded: in this case, **MuPDF** will evict low-usage objects " -"until the value is again in range." +"to be exceeded: in this case, |MuPDF| will evict low-usage objects until " +"the value is again in range." msgstr "" -"現在のストアブルキャッシュのサイズ(バイト単位)。この値は、 **PyMuPDF** の関数を使用するたびに変更される可能性があります(通常は増加します)。この値は、:attr:`Tools.store_maxsize`" -" が超過される場合にのみ(自動的に)減少し、その場合、MuPDFは使用率の低いオブジェクトを削除して、値が再び範囲内に収まるようにします。" +"現在のストアブルキャッシュのサイズ(バイト単位)。この値は、 |PyMuPDF| " +"の関数を使用するたびに変更される可能性があります(通常は増加します)。この値は、:attr:`Tools.store_maxsize` " +"が超過される場合にのみ(自動的に)減少し、その場合、MuPDFは使用率の低いオブジェクトを削除して、値が再び範囲内に収まるようにします。" -#: ../../tools.rst:230 4e6a0912d6d741aebf0ea69831dbb8c5 +#: ../../tools.rst:252 081f0727dfcf40879ab8811e1fa325d3 msgid "Example Session" msgstr "セッションの例" -#: ../../tools.rst:266 25ffe3f67a74454eb9b4bfc07387efd5 +#: ../../tools.rst:288 99b53db972bc49c58f0d4592323bf6c1 msgid "Footnotes" msgstr "脚注" -#: ../../tools.rst:267 b1b388bd072a4ea494c717ef13ded6ba +#: ../../tools.rst:289 df2b4099a10547688c103f8b5777ecc7 msgid "" "This memory area is internally used by MuPDF, and it serves as a cache " "for objects that have already been read and interpreted, thus improving " @@ -708,7 +751,7 @@ msgstr "" "PyMuPDFはメモリ消費を制限するためにデフォルト値(256 " "MB)を使用します。ここで提供されているメソッドを使用してストアの使用状況を制御または調査できます。たとえば、文書が閉じられ、関連するすべてのオブジェクトが削除された後でも、ストアの使用状況がゼロにならないことがあります。したがって、別の文書を開く前にこれを強制したいかもしれません。" -#: ../../tools.rst:269 8079942a5a59448e9712992712b56fbd +#: ../../tools.rst:291 cff1cb203bfb4dd0a6e7c5c76c91e337 msgid "" "By default PyMuPDF and MuPDF use `malloc()`/`free()` for dynamic memory " "management. One can instead force them to use the Python allocation " @@ -720,14 +763,32 @@ msgstr "" "を行い、PyMuPDFを再構築することで、Pythonの割り当て関数 `PyMem_New()`/`PyMem_Del()` " "を使用するように強制することができます。" -#: ../../footer.rst:60 eb348a3db705497596c3f32f2600d2bb +#: ../../footer.rst:60 03615545ca9c49a09aa7623e8edafff5 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 ab6cf4c623144ec89848ea5d24e44ccd -msgid "Discord logo" -msgstr "" - #~ msgid "::" #~ msgstr "" +#~ msgid "empty MuPDF messages on STDOUT" +#~ msgstr "STDOUTのMuPDFメッセージを空にします。" + +#~ msgid "" +#~ "if not a bool, the current setting" +#~ " is returned. If true, MuPDF errors" +#~ " will be shown on *sys.stderr*, " +#~ "otherwise suppressed. In any case, " +#~ "messages continue to be stored in " +#~ "the warnings store. Upon import of " +#~ "PyMuPDF this value is ``True``." +#~ msgstr "" +#~ "boolでない場合、現在の設定が返されます。Trueの場合、MuPDFのエラーは *sys.stderr* " +#~ "に表示され、それ以外の場合は抑制されます。いずれの場合も、メッセージは警告ストアに引き続き保存されます。PyMuPDFのインポート時にこの値は" +#~ " ``True`` です。" + +#~ msgid "``True`` or ``False``" +#~ msgstr "``True`` または ``False``" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/tutorial.mo b/docs/locales/ja/LC_MESSAGES/tutorial.mo index cdab8ab16..14f55efb2 100644 Binary files a/docs/locales/ja/LC_MESSAGES/tutorial.mo and b/docs/locales/ja/LC_MESSAGES/tutorial.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/tutorial.po b/docs/locales/ja/LC_MESSAGES/tutorial.po index cf8f90891..a41432951 100644 --- a/docs/locales/ja/LC_MESSAGES/tutorial.po +++ b/docs/locales/ja/LC_MESSAGES/tutorial.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,70 +19,75 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 4f03be8180204754988c55a7b696d86d +#: ../../header.rst:-1 05967661a4da47e68c009a247e2e85aa msgid "Artifex" msgstr "" -#: ../../header.rst:-1 0b6aeb31abf04a6dbfbacbbfcee57e80 +#: ../../header.rst:-1 ba8db4757b2445c58daa7ce09daa3966 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 bdef90ed999b4a358e88decc62b11d13 +#: ../../header.rst:-1 edfb0c5405f04fbcbc0db3172f2657d9 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../tutorial.rst:8 45c369cdb40e4f369b1a9cc3c1b7ae18 +#: ../../tutorial.rst:8 e378dc60236d4b669bffb87e1333d47f msgid "Tutorial" msgstr "チュートリアル" -#: ../../tutorial.rst:12 6f3c63e19da047448c6ffe459604ef03 +#: ../../tutorial.rst:12 79164895cbdb4876ab62b8a34848f031 msgid "" -"This tutorial will show you the use of |PyMuPDF|, :title:`MuPDF` in " -":title:`Python`, step by step." +"This tutorial will show you the use of |PyMuPDF|, |MuPDF| in " +"Python, step by step." msgstr "このチュートリアルでは、PythonでのPyMuPDF、MuPDFのステップバイステップの使用方法を紹介します。" -#: ../../tutorial.rst:14 d19addc14b2a4cf0aa9fae8e78554798 +#: ../../tutorial.rst:14 f3586dfb42924abab88898f06f38cbcd msgid "" -"Because :title:`MuPDF` supports not only PDF, but also XPS, OpenXPS, CBZ," -" CBR, FB2 and EPUB formats, so does PyMuPDF [#f1]_. Nevertheless, for the" +"Because |MuPDF| supports not only PDF, but also XPS, OpenXPS, CBZ," +" CBR, FB2 and EPUB formats, so does |PyMuPDF| [#f1]_. Nevertheless, for the" " sake of brevity we will only talk about PDF files. At places where " "indeed only PDF files are supported, this will be mentioned explicitly." msgstr "MuPDFはPDFだけでなく、XPS、OpenXPS、CBZ、CBR、FB2、EPUB形式もサポートしており、PyMuPDFも同様です[1]。ただし、簡潔さのために、ここではPDFファイルについてのみ話を進めます。本当にPDFファイルのみがサポートされている場所では、明示的にその旨を記述します。" -#: ../../tutorial.rst:17 be9b8abe23ed4738beca173089e7267f +#: ../../tutorial.rst:16 e30cf64f80944d90ba7ccfbb03a3a9c1 +msgid "" +"In addition to this introduction, please do visit PyMuPDF's `YouTube Channel `_ which covers most of the following in the form of YouTube \"Shorts\" and longer videos." +msgstr "このイントロダクションに加えて、ぜひ `PyMuPDF の YouTube `_ チャンネル もご覧ください。以下の内容の多くが、YouTubeの「ショート動画」や長編動画の形式で紹介されています。" + +#: ../../tutorial.rst:19 071e51fe96454d0bbe2eb32b51f301b3 msgid "Importing the Bindings" msgstr "バインディングのインポート" -#: ../../tutorial.rst:18 f73f0c4bcd944d71b96b4f695ef5caa2 +#: ../../tutorial.rst:20 357ec7fa762f4147880f4a0936252038 msgid "" "The Python bindings to MuPDF are made available by this import statement." " We also show here how your version can be checked::" msgstr "MuPDFへのPythonバインディングは、このインポート文によって利用可能になります。また、ここではあなたのバージョンを確認する方法も示します::" -#: ../../tutorial.rst:28 3210f6fad5a4404c9bfeb3b5d53181de +#: ../../tutorial.rst:30 d6ab45b822f0475dbbb14ee5380a0998 msgid "Note on the Name *fitz*" msgstr "*fitz* という名前についての注意事項" -#: ../../tutorial.rst:30 b5d8c55bab284997b74137b2760021c9 +#: ../../tutorial.rst:32 adb2b197702149509f7c2fbb9f6a165b msgid "" "Old versions of |PyMuPDF| had their **Python** import name as `fitz`. " "Newer versions use `pymupdf` instead, and offer `fitz` as a fallback so " "that old code will still work." msgstr "このライブラリのPythonのトップレベルインポート名は **\"fitz\"** です。 これには歴史的な理由があります:" -#: ../../tutorial.rst:32 e8435d0ae6024ae0ad7363c0e6c4b197 +#: ../../tutorial.rst:34 5042f5b8984445b1bc0c884c052724d0 msgid "The reason for the name `fitz` is a historical curiosity:" msgstr "これには歴史的な理由があります:" -#: ../../tutorial.rst:34 48f75945c145466a854c193c16687f9a +#: ../../tutorial.rst:36 f16e7e4c92a34191b574e5067a982638 msgid "The original rendering library for MuPDF was called *Libart*." msgstr "MuPDFの元々のレンダリングライブラリは *Libart* と呼ばれていました。" -#: ../../tutorial.rst:36 3e5c8a7c802c4d6dafe5aac8a58db134 +#: ../../tutorial.rst:38 a713609310154ab681ad34dab4a1f930 msgid "" "*\"After Artifex Software acquired the MuPDF project, the development " "focus shifted on writing a new modern graphics library called \"Fitz\". " @@ -96,23 +101,23 @@ msgstr "" "Fitzの開発に移りました。Fitzは元々古くなったGhostscriptグラフィックスライブラリを置き換えるためのR&Dプロジェクトとして意図されていましたが、代わりにMuPDFを駆動するレンダリングエンジンになりました。」*" " ( `Wikipedia `_ より引用 ) 。" -#: ../../tutorial.rst:40 05a43680b1ac4c0dba83d21def5e28dc +#: ../../tutorial.rst:42 fc94f501fa3b4087ad6c2a2164191050 msgid "" "Use of legacy name `fitz` can fail if defunct pypi.org package `fitz` is " "installed; see :ref:`problems-after-installation`." msgstr "" -#: ../../tutorial.rst:46 ed1e9da11b114aa18ed86ba14224b95a +#: ../../tutorial.rst:48 dd31bf6c9991404bb140492c93eada39 msgid "Opening a Document" msgstr "ドキュメントの開く" -#: ../../tutorial.rst:48 c26801d8921743e09c27ad468041b735 +#: ../../tutorial.rst:50 de12fcbc4f284a9bbc276df2ee856cf3 msgid "" "To access a :ref:`supported document`, it must be " "opened with the following statement::" msgstr ":ref:`サポートされているドキュメント ` にアクセスするには、次の文で開く必要があります::" -#: ../../tutorial.rst:52 3225e50521bc4176bcabebc10ffd4d11 +#: ../../tutorial.rst:54 d0c152720d6643c89f87490ed6a0d318 msgid "" "This creates the :ref:`Document` object *doc*. *filename* must be a " "Python string (or a `pathlib.Path`) specifying the name of an existing " @@ -122,7 +127,7 @@ msgstr "" "オブジェクトdocが作成されます。filenameは、既存のファイルの名前を指定するPythonの文字列(または `pathlib.Path` " ")である必要があります。" -#: ../../tutorial.rst:54 e65a3dd25a0546fa91b4aa47b8903fb3 +#: ../../tutorial.rst:56 1bafacc42fd249d88fd507712ca0f967 msgid "" "It is also possible to open a document from memory data, or to create a " "new, empty PDF. See :ref:`Document` for details. You can also use " @@ -131,155 +136,155 @@ msgstr "" "また、メモリデータからドキュメントを開くことや、新しい空のPDFを作成することも可能です。詳細については、 :ref:`Document` " "を参照してください。 :ref:`Document` はコンテキストマネージャとしても使用できます。" -#: ../../tutorial.rst:56 5b5daaab1e474a44b9c16d5934ca1dec +#: ../../tutorial.rst:58 bb20205b53c14774a64794e857274b39 msgid "" "A document contains many attributes and functions. Among them are meta " "information (like \"author\" or \"subject\"), number of total pages, " "outline and encryption information." msgstr "ドキュメントには多くの属性と関数が含まれています。その中には、メタ情報(「author」や「subject」など)、総ページ数、アウトライン、暗号化情報などがあります。" -#: ../../tutorial.rst:59 e98bc1c9981e4a3d8136a68120db315c +#: ../../tutorial.rst:61 751d099725e1445597c4429e4a527b30 msgid "Some :ref:`Document` Methods and Attributes" msgstr "いくつかの :ref:`Document` メソッドと属" -#: ../../tutorial.rst:62 1124f30415eb4f149739aff7aa58501b +#: ../../tutorial.rst:64 23e9d02038de4d26b3f3046ff9290c2a msgid "**Method / Attribute**" msgstr "**メソッド / 属性**" -#: ../../tutorial.rst:62 dd38737b09cb48b4b8846abe6bec78e8 +#: ../../tutorial.rst:64 ea3bd02523914cd6ad04b24051580e86 msgid "**Description**" msgstr "説明" -#: ../../tutorial.rst:64 27dfa7ba41d748bd8daa9af2b841051b +#: ../../tutorial.rst:66 d52833dbb20e4d63b865b2b38316a4f6 msgid ":attr:`Document.page_count`" msgstr "" -#: ../../tutorial.rst:64 095b689ccdee4bf999c46642db019e04 +#: ../../tutorial.rst:66 4eb8d47eece141dcaae4dc82fae01cf9 msgid "the number of pages (*int*)" msgstr "ページ数 (*int*)" -#: ../../tutorial.rst:65 ab462367143a43c0b22349e805ca156b +#: ../../tutorial.rst:67 60de5a4a274c48eea29e36ad651c71ae msgid ":attr:`Document.metadata`" msgstr "" -#: ../../tutorial.rst:65 661a655f79d84d33846797a2ea9fd32e +#: ../../tutorial.rst:67 6b75aa58187d4de7910e3ae60b594e6e msgid "the metadata (*dict*)" msgstr "メタデータ (*dict*)" -#: ../../tutorial.rst:66 39b0a8402b874431834852609b6033a3 +#: ../../tutorial.rst:68 166a5fe4285449ddaf7070f3bff9a8f8 msgid ":meth:`Document.get_toc`" msgstr "" -#: ../../tutorial.rst:66 84e916269b1c400db732edf6bfbf2cfc +#: ../../tutorial.rst:68 b37c69de939840ebb9e4e3bb5cf3b35e msgid "get the table of contents (*list*)" msgstr "目次を取得する (*list*)" -#: ../../tutorial.rst:67 1d36052736034df4a2beaef0d9e0f367 +#: ../../tutorial.rst:69 4b9427462b01465d9f721e32c45441b3 msgid ":meth:`Document.load_page`" msgstr "" -#: ../../tutorial.rst:67 997fa4117a6144e2914168eb388f3ab9 +#: ../../tutorial.rst:69 55e0bf1b22c84de5a546ee4003634bde msgid "read a :ref:`Page`" msgstr ":ref:`Page` を読む" -#: ../../tutorial.rst:71 ea1d38bbd3e44707a40bb33485575dac +#: ../../tutorial.rst:73 0d0efe9358564831abcdae7b46d423ad msgid "Accessing Meta Data" msgstr "メタデータへのアクセス" -#: ../../tutorial.rst:72 c1ad79422ac1421883ff74a0bf5f07d4 +#: ../../tutorial.rst:74 3bf0259c5d844a5ea33f28f009d1084c msgid "" "PyMuPDF fully supports standard metadata. :attr:`Document.metadata` is a " "Python dictionary with the following keys. It is available for **all " "document types**, though not all entries may always contain data. For " "details of their meanings and formats consult the respective manuals, " "e.g. :ref:`AdobeManual` for PDF. Further information can also be found in" -" chapter :ref:`Document`. The meta data fields are strings or *None* if " -"not otherwise indicated. Also be aware that not all of them always " -"contain meaningful data -- even if they are not *None*." +" chapter :ref:`Document`. The meta data fields are strings or ``None`` if" +" not otherwise indicated. Also be aware that not all of them always " +"contain meaningful data -- even if they are not ``None``." msgstr "" "PyMuPDFは標準的なメタデータを完全にサポートしています。 :attr:`Document.metadata` " "はPythonの辞書で、次のキーが含まれています。これはすべてのドキュメントタイプで利用可能ですが、すべてのエントリが常にデータを含むわけではありません。それらの意味や形式の詳細については、対応するマニュアルを参照してください。例えば、PDFの場合は" " :ref:`AdobeManual` を参照してください。さらなる情報は :ref:`Document` " -"の章でも見つけることができます。メタデータのフィールドは文字列または *None* " +"の章でも見つけることができます。メタデータのフィールドは文字列または ``None`` " "です(特に指定がない場合)。また、それらのすべてが常に意味のあるデータを含んでいるわけではないことにも注意してください。" -#: ../../tutorial.rst:75 21b50e01c419432d82c841cb354aaf08 +#: ../../tutorial.rst:77 c50c4a8525e24079a77ac54b1fc4233c msgid "Key" msgstr "キー" -#: ../../tutorial.rst:75 712ea484df5945ca98d51cd6e6482ee8 +#: ../../tutorial.rst:77 d80dc529b03e4fdcb3723e17909641ec msgid "Value" msgstr "値" -#: ../../tutorial.rst:77 f23d6cb5791a41a7be3d125c90f65d31 +#: ../../tutorial.rst:79 1270501ff746404d9a540ac46ca40289 msgid "producer" msgstr "" -#: ../../tutorial.rst:77 0367d9cff10a4ea99b253ae12d0546de +#: ../../tutorial.rst:79 1d7515f242594d6793585075ae2a1c3e msgid "producer (producing software)" msgstr "プロデューサー(生成ソフトウェア)" -#: ../../tutorial.rst:78 460ea65cbff748c190dabcc16f8949a3 +#: ../../tutorial.rst:80 468ddd00b3c144bd9b3e154204fbed15 msgid "format" msgstr "" -#: ../../tutorial.rst:78 7cf13dd79fa445788e40aabac234a61d +#: ../../tutorial.rst:80 b1eb1e1957bc48a0851024ce094c662f msgid "format: 'PDF-1.4', 'EPUB', etc." msgstr "形式:'PDF-1.4'、'EPUB'など" -#: ../../tutorial.rst:79 4dfa007cf4214e87bbcbae4b175844ad +#: ../../tutorial.rst:81 b1122070ff9b4c4494bedf4f3388d9b5 msgid "encryption" msgstr "" -#: ../../tutorial.rst:79 e10cb466d0a54f96b6c4008fe24d8de6 +#: ../../tutorial.rst:81 91a989f6b4d84da0be125c5870b85629 msgid "encryption method used if any" msgstr "暗号化方法(適用されている場合)" -#: ../../tutorial.rst:80 0fcb3c39bd1541f1a8a73ef8e4aa0297 -#: 336b6b9e481040649151f3b8b4ff4c04 +#: ../../tutorial.rst:82 19480fa53c3544319c83fd3fad08e759 +#: 7f2a63267f694384a554dae16109df23 msgid "author" msgstr "" -#: ../../tutorial.rst:81 99353368720e4fb7975c52a17d580a7a +#: ../../tutorial.rst:83 f5b61af7d3294bdf9ce3dc42e2a1a8b0 msgid "modDate" msgstr "" -#: ../../tutorial.rst:81 51e3e3512b2e4c02aaa084a82029fb65 +#: ../../tutorial.rst:83 801fc48a09794a0fac77225f214744e9 msgid "date of last modification" msgstr "最終更新日" -#: ../../tutorial.rst:82 45ab1bdebda846e09f663712d1d97ec3 -#: ee46c5ccf93148e79eb0525ae52daf16 +#: ../../tutorial.rst:84 5c1f0ad075c14921a33eff59aae70720 +#: 8bade788738649d8a71c0a402d4ee15e msgid "keywords" msgstr "" -#: ../../tutorial.rst:83 5886688cc3674225a5b9ff5b94383087 -#: beaf9c02a04f4adba03af96e23bb7810 +#: ../../tutorial.rst:85 32abcccab99941608fef4dea21fa26ef +#: a7b239e234ac4e738b57649e92f97b58 msgid "title" msgstr "" -#: ../../tutorial.rst:84 b8bae7764cdc477cb4982a275244e8f4 +#: ../../tutorial.rst:86 43ebc843826848f08ba05a060612babd msgid "creationDate" msgstr "" -#: ../../tutorial.rst:84 45eac2e827054b9ea16e60184bdcc610 +#: ../../tutorial.rst:86 6df64ddf396941d9b363802e71a17d4e msgid "date of creation" msgstr "作成日" -#: ../../tutorial.rst:85 331bfd070c0842e0820a50dd7758b451 +#: ../../tutorial.rst:87 8bb3abe30fe64d669b807607a52a2420 msgid "creator" msgstr "" -#: ../../tutorial.rst:85 cec2eb4ceb794737bace6eb05ba36001 +#: ../../tutorial.rst:87 9db959512cba40f4a6390f8fa75faa93 msgid "creating application" msgstr "作成アプリケーション" -#: ../../tutorial.rst:86 08165a39c8c149bbb31c494de7c6c228 -#: 56d66879db304f4b8a76dd31537de773 +#: ../../tutorial.rst:88 1b1f49a6b78841abb58585aa54af2bdc +#: 9ac5fc37fe5d4f25b601404e30ab2154 msgid "subject" msgstr "" -#: ../../tutorial.rst:89 dc7057cc255b49d297c0bcece12a3f4a +#: ../../tutorial.rst:91 219ce7c6343d408ab8d80fbc0a05ec6e msgid "" "Apart from these standard metadata, **PDF documents** starting from PDF " "version 1.4 may also contain so-called *\"metadata streams\"* (see also " @@ -298,7 +303,7 @@ msgstr "" "`lxml`_ " "などのパッケージを使用してストリーム全体を抽出し、検査または変更し、その結果をPDFに再格納することはできます。必要な場合は、このデータを完全に削除することもできます。" -#: ../../tutorial.rst:91 e231fb5a8ed043e1b1e7161121aa68ae +#: ../../tutorial.rst:93 1cdab6c40c754d80b0e856afad24a1db msgid "" "There are two utility scripts in the repository that `metadata import " "(PDF only)`_ resp. `metadata export`_ metadata from resp. to CSV files." @@ -306,17 +311,17 @@ msgstr "" "リポジトリには、`metadata import(PDF only)`_ および `metadata export`_ " "をCSVファイルに行うための2つのユーティリティスクリプトがあります" -#: ../../tutorial.rst:94 58f5f89c300b408c9c25583de0d9dec1 +#: ../../tutorial.rst:96 b5cc3dbefd4d4224905521dd275497b2 msgid "Working with Outlines" msgstr "アウトラインと一緒に作業する" -#: ../../tutorial.rst:95 1e49c4aed5094ba498206b78273e63d0 +#: ../../tutorial.rst:97 436fc3a7e03f4a90bb900308d8dd7548 msgid "" "The easiest way to get all outlines (also called \"bookmarks\") of a " "document, is by loading its *table of contents*::" msgstr "アウトライン(または「ブックマーク」とも呼ばれる)を取得する最も簡単な方法は、そのドキュメントの目次を読み込むことです::" -#: ../../tutorial.rst:99 1235092746c6420886c29a9eb7b1c4d4 +#: ../../tutorial.rst:101 3b688b47071e4d87b3d7cd95ced8dd08 msgid "" "This will return a Python list of lists *[[lvl, title, page, ...], ...]* " "which looks much like a conventional table of contents found in books." @@ -324,7 +329,7 @@ msgstr "" "これにより、Pythonのリストであるリスト [[lvl, title, page, ...], ...] " "が返されます。これは、本に見られる伝統的な目次に非常によく似たものです。" -#: ../../tutorial.rst:101 f134cf60e2474c5ab17036845bc01697 +#: ../../tutorial.rst:103 71983635bbe745518b0e2bf0de62b01c msgid "" "*lvl* is the hierarchy level of the entry (starting from 1), *title* is " "the entry's title, and *page* the page number (1-based!). Other " @@ -333,7 +338,7 @@ msgstr "" "lvl はエントリーの階層レベル(1から開始)を示し、title はエントリーのタイトル、page " "はページ番号(1から始まる)を示します。その他のパラメータはブックマークのターゲットの詳細を説明します。" -#: ../../tutorial.rst:103 2ebeac69e9424be9972f198fc43df27a +#: ../../tutorial.rst:105 4b50bc776e3842c5ad39eb2a80765944 msgid "" "There are two utility scripts in the repository that `toc import (PDF " "only)`_ resp. `toc export`_ table of contents from resp. to CSV files." @@ -341,39 +346,39 @@ msgstr "" "リポジトリ内には、CSVファイルから目次をインポートおよびエクスポートするためのユーティリティスクリプトが2つあります。詳細は、 `toc " "import (PDF only)`_ および `toc export`_ をご覧ください。" -#: ../../tutorial.rst:106 c259e0d9fc6b4cb283ed73134b45ffe2 +#: ../../tutorial.rst:108 e99a2b08c8ac4dbfaaada3a4d3febd23 msgid "Working with Pages" msgstr "ページの操作" -#: ../../tutorial.rst:107 a5a4b014f1784320affafed50bf260c7 +#: ../../tutorial.rst:109 484157f129e74a108d83a0687d390d90 msgid ":ref:`Page` handling is at the core of MuPDF's functionality." msgstr ":ref:`Page` の処理はMuPDFの機能の中核です。" -#: ../../tutorial.rst:109 816bae734c734504bb83cac518a42f63 +#: ../../tutorial.rst:111 39d19b40747a4209be020d521fab3d56 msgid "" "You can render a page into a raster or vector (SVG) image, optionally " "zooming, rotating, shifting or shearing it." msgstr "ページをラスターまたはベクター(SVG)イメージにレンダリングすることができます。オプションでズーム、回転、シフト、またはシアーを行うこともできます" -#: ../../tutorial.rst:110 a5ebd0b3ca86495b980ceb9468065acf +#: ../../tutorial.rst:112 ee05f9cee64f40dbbd92d40df9081fc4 msgid "" "You can extract a page's text and images in many formats and search for " "text strings." msgstr "テキストと画像を多くの形式で抽出し、テキスト文字列を検索することができます。" -#: ../../tutorial.rst:111 95810b4b32e149f78e031e853db265c7 +#: ../../tutorial.rst:113 0a743e8513164292a9ed45182829305a msgid "" "For PDF documents many more methods are available to add text or images " "to pages." msgstr "PDFドキュメントの場合、さらに多くのメソッドが利用可能で、テキストや画像をページに追加することができます" -#: ../../tutorial.rst:113 7319b143b3ae4c22961b89de4dd6787b +#: ../../tutorial.rst:115 33b8b5b674bd42bfa3c10352d8386ded msgid "" "First, a :ref:`Page` must be created. This is a method of " ":ref:`Document`::" msgstr "最初に :ref:`Page` を作成する必要があります。これは :ref:`Document` のメソッドです::" -#: ../../tutorial.rst:118 9572efa6dad4431a882ab96f2b09c2bb +#: ../../tutorial.rst:120 0f62eb911c7a46b8b2f7d6b911449ad4 msgid "" "Any integer `-∞ < pno < page_count` is possible here. Negative numbers " "count backwards from the end, so *doc[-1]* is the last page, like with " @@ -382,21 +387,21 @@ msgstr "" "ここでは、どんな整数 `-∞ < pno < page_count` でも可能です。負の数は末尾から逆に数えますので、doc[-1] " "はPythonのシーケンスと同様に最後のページになります" -#: ../../tutorial.rst:120 726e062734b346f19ed915d49e5bc705 +#: ../../tutorial.rst:122 a6c304f33507429b9a30bd8e926fbf12 msgid "" "Some more advanced way would be using the document as an **iterator** " "over its pages::" msgstr "より高度な方法として、ドキュメントをそのページの **イテレータ** として使用することもできます::" -#: ../../tutorial.rst:134 96de34d5a16b4b1e8a3c0b973dd62085 +#: ../../tutorial.rst:136 dd002e48ae7445049b3b31ec113b9e39 msgid "Once you have your page, here is what you would typically do with it:" msgstr "ページを取得したら、通常は次のようなことを行います:" -#: ../../tutorial.rst:137 c820f555815142e6819155105b20f347 +#: ../../tutorial.rst:139 479b18109bc34625a53a33ca74bca74c msgid "Inspecting the Links, Annotations or Form Fields of a Page" msgstr "リンク、注釈、またはフォームフィールドをページで調査する" -#: ../../tutorial.rst:138 2f43c0cdb45a413aa557d30d91e5534f +#: ../../tutorial.rst:140 93f1bc7076b84e53b34a0bf7b7752426 msgid "" "Links are shown as \"hot areas\" when a document is displayed with some " "viewer software. If you click while your cursor shows a hand symbol, you " @@ -404,34 +409,34 @@ msgid "" "Here is how to get all links::" msgstr "リンクは、ドキュメントがビューアソフトウェアで表示されるときに「ホットエリア」として表示されます。カーソルが手のシンボルを示すときにクリックすると、通常、そのホットエリアにエンコードされたターゲットに移動します。以下はすべてのリンクを取得する方法です::" -#: ../../tutorial.rst:143 af0fe830c7de4648bada2cc1dc2fffce +#: ../../tutorial.rst:145 a0f2daeae55d47ce99d8e84b319faece msgid "" "*links* is a Python list of dictionaries. For details see " ":meth:`Page.get_links`." msgstr "`links` はPythonの辞書のリストです。詳細は :meth:`Page.get_links` を参照してください。" -#: ../../tutorial.rst:145 ac094282215443faba176676d525dce0 +#: ../../tutorial.rst:147 b27868bc6ccb46f282f088bb49db681f msgid "You can also use an iterator which emits one link at a time::" msgstr "また、一度に1つのリンクを生成するイテレータを使用することもできます::" -#: ../../tutorial.rst:150 9720e0ef917744949b9f3bbd21372ff2 +#: ../../tutorial.rst:152 f4ad01b38b1040bfa0d9b295acad14bd msgid "" "If dealing with a PDF document page, there may also exist annotations " "(:ref:`Annot`) or form fields (:ref:`Widget`), each of which have their " "own iterators::" msgstr "PDFドキュメントのページを扱う場合、注釈(:ref:`Annot`)やフォームフィールド(:ref:`Widget`)も存在する場合があります。それぞれに独自のイテレータがあります::" -#: ../../tutorial.rst:160 9af4d9e333f64220b81a3667ef7b3ec1 +#: ../../tutorial.rst:162 aa1e66c76cd84d98a396687a12122803 msgid "Rendering a Page" msgstr "ページのレンダリング" -#: ../../tutorial.rst:161 4a7532782c874655aa4975ba594c3d95 +#: ../../tutorial.rst:163 7114d4014690481fbb394caeafe88cd0 msgid "This example creates a **raster** image of a page's content::" msgstr "以下の例は、ページの内容をラスター画像として作成します::" -#: ../../tutorial.rst:165 f595d799a1364ae0a7263e9bd3d33379 +#: ../../tutorial.rst:167 5d490b2d2071456590b70ad02b2040a3 msgid "" -"*pix* is a :ref:`Pixmap` object which (in this case) contains an **RGB** " +"``pix`` is a :ref:`Pixmap` object which (in this case) contains an **RGB** " "image of the page, ready to be used for many purposes. Method " ":meth:`Page.get_pixmap` offers lots of variations for controlling the " "image: resolution / DPI, colorspace (e.g. to produce a grayscale image or" @@ -445,20 +450,20 @@ msgstr "" "メソッドには、画像を制御するためのさまざまなオプションが用意されています:解像度/DPI、カラースペース(例えば、グレースケールイメージや減色カラースキームのイメージを作成するために)、透明度、回転、ミラーリング、シフト、シアーなどがあります。例えば、RGBAイメージ(アルファチャネルを含むイメージ)を作成する場合は、`pix" " = page.get_pixmap(alpha=True)` と指定します。" -#: ../../tutorial.rst:167 42b644f15d084920a4ff59a3488ea527 +#: ../../tutorial.rst:169 d83c8c8ecf374c119c71005bd91511c7 msgid "" "A :ref:`Pixmap` contains a number of methods and attributes which are " -"referenced below. Among them are the integers *width*, *height* (each in " -"pixels) and *stride* (number of bytes of one horizontal image line). " -"Attribute *samples* represents a rectangular area of bytes representing " -"the image data (a Python *bytes* object)." +"referenced below. Among them are the integers ``width``, ``height`` (each in " +"pixels) and ``stride`` (number of bytes of one horizontal image line). " +"Attribute ``samples`` represents a rectangular area of bytes representing " +"the image data (a Python ``bytes`` object)." msgstr "" ":ref:`Pixmap` " "には、以下で参照されるいくつかのメソッドと属性が含まれています。その中には、ピクセル単位の整数である幅、高さ(それぞれピクセル単位)および " "`stride` (1つの水平イメージラインのバイト数)があります。属性 `samples` " "は、イメージデータを表すバイトの長方形領域(Pythonの `bytes` オブジェクト)を表します。" -#: ../../tutorial.rst:169 8ec3ec02647343c6980f05fe7de31d50 +#: ../../tutorial.rst:171 33dc6238724b49c3a201a622c7289f3c msgid "" "You can also create a **vector** image of a page by using " ":meth:`Page.get_svg_image`. Refer to this `Vector Image Support page`_ " @@ -468,19 +473,19 @@ msgstr "" "を使用することで、ページのベクターイメージを作成することもできます。詳細については、`Vector Image Support page`_ " "ページを参照してください。" -#: ../../tutorial.rst:172 657257197f3140d092ad14ec2cfd588d +#: ../../tutorial.rst:174 845ef517b9e143a1afe1950cb45677ee msgid "Saving the Page Image in a File" msgstr "ページのイメージをファイルに保存する" -#: ../../tutorial.rst:173 0183cddfd10a4f49939fbb238d12b28b +#: ../../tutorial.rst:175 bdeba468768e4188b09289122c78230f msgid "We can simply store the image in a PNG file::" msgstr "簡単にページのイメージをPNGファイルに保存できます::" -#: ../../tutorial.rst:178 c98f92e5ccf241c9a0e63c01a7c52971 +#: ../../tutorial.rst:180 710babb269494a0db2dff3a59b541b75 msgid "Displaying the Image in GUIs" msgstr "GUIでイメージを表示する" -#: ../../tutorial.rst:179 454b4082bf4b40699b13cc26c5412df0 +#: ../../tutorial.rst:181 6f459b063b0e46e39a3a571d118d161c msgid "" "We can also use it in GUI dialog managers. :attr:`Pixmap.samples` " "represents an area of bytes of all the pixels as a Python bytes object. " @@ -490,29 +495,29 @@ msgstr "" "は、すべてのピクセルのバイトの領域をPythonのbytesオブジェクトとして表します。以下はいくつかの例ですが、さらに多くの例は " "`examples`_ ディレクトリで見つけることができます。" -#: ../../tutorial.rst:182 b0eef6e1015b4c7d8df4297d80ec5e58 +#: ../../tutorial.rst:184 04c74142d3a5408cb2df43362abab4a9 msgid "wxPython" msgstr "" -#: ../../tutorial.rst:183 02cff6d545d541a6a01caf6dd8eb9d95 +#: ../../tutorial.rst:185 8ae38c97a4d746519d5b07ea1f0c2915 msgid "" "Consult their documentation for adjustments to RGB(A) pixmaps and, " "potentially, specifics for your wxPython release::" msgstr "RGB(A)のピクセルマップに対する調整や、可能な場合はwxPythonのリリースに特有の詳細については、関連するドキュメントを参照してください。" -#: ../../tutorial.rst:191 123c4ff4599e4840b66de94e1400a4af +#: ../../tutorial.rst:193 4ecff91251c346c1828b5c2212df148d msgid "Tkinter" msgstr "" -#: ../../tutorial.rst:192 09865225740b453fbbcc13354593083a +#: ../../tutorial.rst:194 3937a8f51b8d431183782d33e29fdb0d msgid "Please also see section 3.19 of the `Pillow documentation`_::" msgstr "`Pillow documentation`_ ドキュメントのセクション3.19も参照してください。" -#: ../../tutorial.rst:201 a635f17bbb34429d96332e199506d3b3 +#: ../../tutorial.rst:203 54cb07c2be2245af96a39fc1d108cbd6 msgid "The following **avoids using Pillow**::" msgstr "以下の方法では、Pillowを使用しないようにしています。" -#: ../../tutorial.rst:208 9f2fdfd296454335912e2cf14de6eb7f +#: ../../tutorial.rst:210 278fa9ee08b341d5b6c8abb366fc16ec msgid "" "If you are looking for a complete Tkinter script paging through **any " "supported** document, `here it is!`_. It can also zoom into pages, and it" @@ -524,58 +529,58 @@ msgstr "" "/browse-document/browse.py>`_ また、このスクリプトではページをズームインすることもでき、Python " "2または3で動作します。非常に便利な純粋なPythonパッケージである `PySimpleGUI`_ が必要です。" -#: ../../tutorial.rst:211 e88a0d41461d42ac87116cf57794a018 +#: ../../tutorial.rst:213 c0267a22336c4e4da907533f35f9d341 msgid "PyQt4, PyQt5, PySide" msgstr "" -#: ../../tutorial.rst:212 01fc06b8445441fdba5ba4f05069cdf4 +#: ../../tutorial.rst:214 9a6ff2af3cb64216a96d828ef5117a0d msgid "Please also see section 3.16 of the `Pillow documentation`_::" msgstr "Pillowドキュメントのセクション3.16も参照してください。" -#: ../../tutorial.rst:221 809a1eece82a424dacb05cdba97334c1 +#: ../../tutorial.rst:223 a7cc76e286584e9a867c24ef3add76a8 msgid "" "Again, you also can get along **without using Pillow.** Qt's `QImage` " "luckily supports native Python pointers, so the following is the " "recommended way to create Qt images::" msgstr "Pillowを使用せずに進めることもできます。幸運なことに、QtのQImageはネイティブなPythonポインタをサポートしているので、以下はQtイメージを作成する推奨される方法です。" -#: ../../tutorial.rst:231 6801f71e96284115b96332f1052d127a +#: ../../tutorial.rst:233 10d5fdd6f131454eae7a2e63c574c5bd msgid "Extracting Text and Images" msgstr "テキストや画像を抽出する" -#: ../../tutorial.rst:232 2a7e536bbb5f4ee7889636890e3218ad +#: ../../tutorial.rst:234 1943f89f643845f0b54db821bcc3e09d msgid "" "We can also extract all text, images and other information of a page in " "many different forms, and levels of detail::" msgstr "ページのすべてのテキスト、画像、およびその他の情報を、さまざまな形式や詳細レベルで抽出することもできます。::" -#: ../../tutorial.rst:236 f27ff346213e48049fd8531518568108 +#: ../../tutorial.rst:238 554e63dabc1248f783b976d361dcec69 msgid "" "Use one of the following strings for *opt* to obtain different formats " "[#f2]_:" msgstr "異なるフォーマットを得るために、以下の文字列のうち1つをoptに使用できます [#f2]_:" -#: ../../tutorial.rst:238 f33991c1c3fe47199e5f5b3b64c62cf5 +#: ../../tutorial.rst:240 f44036ad1ba24ece8a18ea2fc98c1f03 msgid "" "**\"text\"**: (default) plain text with line breaks. No formatting, no " "text position details, no images." msgstr "**\"text\"**: (デフォルト) 行送りのプレーンテキスト。書式設定やテキストの位置の詳細、画像は含まれません。" -#: ../../tutorial.rst:240 78e3f23632844b8595703906218e191b +#: ../../tutorial.rst:242 a77470c3dd534162802cade7841cd2f0 msgid "**\"blocks\"**: generate a list of text blocks (= paragraphs)." msgstr "**\"blocks\"**: テキストブロック(段落)のリストを生成します。" -#: ../../tutorial.rst:242 a5be0262a4864c08aa1757e1deba9bc5 +#: ../../tutorial.rst:244 0203e41b56554819a6376440502f5b4b msgid "**\"words\"**: generate a list of words (strings not containing spaces)." msgstr "**\"words\"**: 単語(スペースを含まない文字列)のリストを生成します。" -#: ../../tutorial.rst:244 1ae2b870ed724fb1aee781aa7bf9e600 +#: ../../tutorial.rst:246 04c3946009704057bae58608e81e89bc msgid "" "**\"html\"**: creates a full visual version of the page including any " "images. This can be displayed with your internet browser." msgstr "**\"html\"**: 画像を含むページの完全な視覚的バージョンを作成します。これはインターネットブラウザで表示できます。" -#: ../../tutorial.rst:246 81def871abf14bc8a12ffeb5bd21096d +#: ../../tutorial.rst:248 e96b199aabba4aca94d6b53b75aa27cd msgid "" "**\"dict\"** / **\"json\"**: same information level as HTML, but provided" " as a Python dictionary or resp. JSON string. See " @@ -585,7 +590,7 @@ msgstr "" "HTMLと同じ情報レベルですが、Pythonの辞書またはJSON文字列として提供されます。その構造の詳細については、:meth:`TextPage.extractDICT`" " を参照してください。" -#: ../../tutorial.rst:248 f280f036e1024b5ea8a759edc38d59a1 +#: ../../tutorial.rst:250 69d52fc9b54b4109b44c122576994849 msgid "" "**\"rawdict\"** / **\"rawjson\"**: a super-set of **\"dict\"** / " "**\"json\"**. It additionally provides character detail information like " @@ -595,13 +600,13 @@ msgstr "" "\"json\"のスーパーセットです。これにはXMLのような文字の詳細情報も含まれます。その構造の詳細については、:meth:`TextPage.extractRAWDICT`" " を参照してください。" -#: ../../tutorial.rst:250 d8e212e28a0a4b79af9f807d475f5c29 +#: ../../tutorial.rst:252 a895c3b5c62848bf973a2b44b58097ef msgid "" "**\"xhtml\"**: text information level as the TEXT version but includes " "images. Can also be displayed by internet browsers." msgstr "**\"xhtml\"**: TEXTバージョンのテキスト情報レベルを含み、画像も含まれます。インターネットブラウザでも表示できます。" -#: ../../tutorial.rst:252 176577a4f3c14b4a9cafd98d1dd2057c +#: ../../tutorial.rst:254 7c2a9b1d406a472e990d81723f7546b9 msgid "" "**\"xml\"**: contains no images, but full position and font information " "down to each single text character. Use an XML module to interpret." @@ -609,21 +614,22 @@ msgstr "" "**\"xml\"**: " "画像は含まれませんが、各テキスト文字までの完全な位置とフォント情報を含みます。XMLモジュールを使用して解釈することができます。" -#: ../../tutorial.rst:254 6e04179b7e324ab8bf552f78d950a2d7 +#: ../../tutorial.rst:256 38ebfd1e60f2470db255fe5ce90e60cb + msgid "" "To give you an idea about the output of these alternatives, we did text " -"example extracts. See :ref:`Appendix2`." -msgstr "これらの代替方法の出力のイメージを示すために、テキストの例抽出を行いました。:ref:`Appendix2` を参照してください" +"example extracts. See :ref:`Appendix1`." +msgstr "これらの代替方法の出力のイメージを示すために、テキストの例抽出を行いました。:ref:`Appendix1` を参照してください" -#: ../../tutorial.rst:257 df4280fd734d4bb9b4d2b309686c39c1 +#: ../../tutorial.rst:259 570661af75b040a2ab647ae2c7ed0b06 msgid "Searching for Text" msgstr "テキストを検索す" -#: ../../tutorial.rst:258 decde5e7b2284d1684dfdbde83d9c5ec +#: ../../tutorial.rst:260 bd492032074c47a88220162f66174e76 msgid "You can find out, exactly where on a page a certain text string appears::" msgstr "特定のテキスト文字列がページのどこに現れるかを正確に調べることができます。::" -#: ../../tutorial.rst:262 b45d7cf216454e39992deccd3e2dae89 +#: ../../tutorial.rst:264 d38076507d744dce945e696f5729c684 msgid "" "This delivers a list of rectangles (see :ref:`Rect`), each of which " "surrounds one occurrence of the string \"mupdf\" (case insensitive). You " @@ -633,7 +639,7 @@ msgstr "" "このコードは、\"mupdf\"(大文字と小文字を区別しない)という文字列が含まれる各領域を囲む長方形( :ref:`Rect` " "参照)のリストを生成します。この情報を使って、それらの領域を強調表示したり(PDFのみ)、文書のクロスリファレンスを作成したりすることができます。" -#: ../../tutorial.rst:264 d03ef52663034037b21c5f6b821a40a4 +#: ../../tutorial.rst:266 64b9d94c27d2430a9a761da4084e0510 msgid "" "Please also do have a look at chapter :ref:`cooperation` and at demo " "programs `demo.py`_ and `demo-lowlevel.py`_. Among other things they " @@ -645,11 +651,11 @@ msgstr "" "も参照してください。これらには、:ref:`TextPage` 、 :ref:`Device` 、:ref:`DisplayList` " "クラスをより直接的に制御する方法に関する詳細な情報が含まれています。例えば、パフォーマンスを考慮する必要がある場合などに役立ちます" -#: ../../tutorial.rst:271 632beb6aacd9445ca925978b6f16e9f3 +#: ../../tutorial.rst:273 2fcdc8a391004211a63c3682b7fb5f2b msgid "Stories: Generating PDF from HTML Source" msgstr "ストーリー: HTMLソースからPDFを生成する" -#: ../../tutorial.rst:273 46fc5f3012c24b62a15a98d7478fcff3 +#: ../../tutorial.rst:275 ab8a9b2cdb7641d881c73fc7abf43268 msgid "" "The :ref:`Story` class is a new feature of PyMuPDF version 1.21.0. It " "represents support for MuPDF's **\"story\"** interface." @@ -657,13 +663,13 @@ msgstr "" "ストーリークラスはPyMuPDFバージョン1.21.0の新機能です。これはMuPDFの :ref:`Story` " "インターフェースに対するサポートを表しています。" -#: ../../tutorial.rst:275 d7a66d96d3d3404fa8f28fb7e94b003a +#: ../../tutorial.rst:277 d6963f89881a4fba95e7b1099865b22a msgid "" "The following is a quote from the book `\"MuPDF Explored\"`_ by Robin " "Watts from `Artifex`_:" msgstr "以下はArtifexのRobin Wattsによる書籍「MuPDF Explored」からの引用です。" -#: ../../tutorial.rst:279 df3cedde1e514339a9b1a64b764d5775 +#: ../../tutorial.rst:281 f4ecf26b2cd04a978bf74422d5fa8c30 msgid "" "*Stories provide a way to easily layout styled content for use with " "devices, such as those offered by Document Writers (...). The concept of " @@ -673,7 +679,7 @@ msgid "" "multiple columns, possibly across multiple pages.*" msgstr "*ストーリーは、ドキュメントライターなどのデバイスで使用するためのスタイル付きコンテンツを簡単にレイアウトする方法を提供します。ストーリーという概念は、デスクトップパブリッシングから来ており、それ自体が新聞から取り入れられています。伝統的な新聞のレイアウトを考えると、複数の列や複数のページにわたって配置されたさまざまなニュース記事(ストーリー)で構成されています。*" -#: ../../tutorial.rst:281 19804b1bbea64cfaa709bb87cc0bd2d9 +#: ../../tutorial.rst:283 24ef55c29a4d468781822c3a0c6ae60e msgid "" "*Accordingly, MuPDF uses a story to represent a flow of text with styling" " information. The user of the story can then supply a sequence of " @@ -683,26 +689,26 @@ msgid "" "text should be flowed (the layout).*" msgstr "*それに応じて、MuPDFでは、テキストのフローとスタイリング情報を表すためにストーリーを使用しています。ストーリーのユーザーは、ストーリーをレイアウトするための矩形のシーケンスを提供し、配置されたテキストを出力デバイスに描画できます。これにより、テキスト自体(ストーリー)がテキストを配置する領域(レイアウト)から分離されるという概念が保持されます*" -#: ../../tutorial.rst:285 70b3985beaaf451593764cd6f13ecefa +#: ../../tutorial.rst:287 8a384a5047b544f5900574c11df5e1df msgid "" "A Story works somewhat similar to an internet browser: It faithfully " "parses and renders HTML hypertext and also optional stylesheets (CSS). " "But its **output is a PDF** -- not web pages." msgstr "ストーリーは、インターネットブラウザといくつかの点で似ています。それは忠実にHTMLハイパーテキストとオプションのスタイルシート(CSS)を解析してレンダリングします。ただし、出力されるのはPDFであり、ウェブページではありません。" -#: ../../tutorial.rst:288 4c3c684f667b4dddb375e2dac6895da5 +#: ../../tutorial.rst:290 42027a24ac6c46fc91baef0cd7076471 msgid "" "When creating a :ref:`Story`, the input from up to three different " "information sources is taken into account. All these items are optional." msgstr "ストーリーを作成する際には、最大3つの異なる情報源からの入力が考慮されます。これらのすべてのアイテムはオプションです。" -#: ../../tutorial.rst:290 e7709d03c4664113aa375231155deb0b +#: ../../tutorial.rst:292 9adeb199229844bb83284b74fda7555e msgid "" "HTML source code, either a Python string or **created by the script** " "using methods of :ref:`Xml`." msgstr "HTMLソースコード:Pythonの文字列として提供されるか、 :ref:`Xml` のメソッドを使用してスクリプトによって作成されます。" -#: ../../tutorial.rst:292 1d443460f8a142e683f9a489703e12ef +#: ../../tutorial.rst:294 e48f3a50012241f0849b4d6077b00e10 msgid "" "CSS (Cascaded Style Sheet) source code, provided as a Python string. CSS " "can be used to provide styling information (text font size, color, etc.) " @@ -710,7 +716,7 @@ msgid "" "read from a file." msgstr "CSS(カスケーディングスタイルシート)ソースコード:Pythonの文字列として提供されます。CSSは、ウェブページにおけるように、スタイリング情報(テキストフォントサイズ、色など)を提供するために使用できます。もちろん、この文字列はファイルから読み込むこともできます。" -#: ../../tutorial.rst:294 7e848db4f5b54cbe815c21fdacecfe95 +#: ../../tutorial.rst:296 cb2f2cd086c14b9894c55183dc6a8b80 msgid "" "An :ref:`Archive` **must be used** whenever the DOM references images, or" " uses text fonts except the standard :ref:`Base-14-Fonts`, CJK fonts and " @@ -720,7 +726,7 @@ msgstr "" "、CJKフォント、およびPyMuPDFバイナリに生成されたNOTOフォント以外のテキストフォントを使用する場合、 :ref:`Archive` " "を使用する必要があります。" -#: ../../tutorial.rst:297 cdd0ee1dedc9441598d16724dd3b412e +#: ../../tutorial.rst:299 92aa9219931649b5972b55f06acaba5f msgid "" "The :ref:`API` allows creating DOMs completely from scratch, " "including desired styling information. It can also be used to modify or " @@ -731,7 +737,7 @@ msgstr "" "この :ref:`API` " "では、望むスタイル情報を含めて、DOMを完全にゼロから作成することができます。また、提供されたHTMLを変更したり拡張したりするためにも使用できます。テキストは削除や置換ができ、スタイルも変更できます。データベースから抽出されたテキストを追加して、テンプレートのようなHTMLドキュメントを作成することもできます。" -#: ../../tutorial.rst:299 f758c97a6c5c4e0f97a1167e54d705c0 +#: ../../tutorial.rst:301 bfef6bbfde0e4e9f95799418e6b840d0 msgid "" "It is **not required** to provide syntactically complete HTML documents: " "snippets like `Hello World!` are fully accepted, and many /" @@ -740,7 +746,7 @@ msgstr "" "文法的に完全なHTMLドキュメントを提供する必要はありません。例えば ``HelloWorld!`` " "のような断片も完全に受け入れられ、多くの場合、構文エラーは自動的に修正されます。" -#: ../../tutorial.rst:301 1f116b34f05a4e17b462098251e03ea3 +#: ../../tutorial.rst:303 043777ef2f3349c3a0173448f52cecbb msgid "" "After the HTML is considered complete, it can be used to create a PDF " "document. This happens via the new :ref:`DocumentWriter` class. The " @@ -751,7 +757,7 @@ msgstr "" "クラスを介して行われます。プログラマーはそのメソッドを呼び出して新しい空のページを作成し、:ref:`Story` " "に矩形を渡してそれらを埋めることができます。" -#: ../../tutorial.rst:303 695e45b12fce4782b5c4fd0aa27b6555 +#: ../../tutorial.rst:305 23c7aafe13d34181a4d91db97ba388ce msgid "" "The story in turn will return completion codes indicating whether or not " "more content is waiting to be written. Which part of the content will " @@ -763,23 +769,23 @@ msgstr "" "は、書き込まれる待機中のコンテンツがあるかどうかを示す完了コードを返します。コンテンツのどの部分がどの矩形またはどのページに配置されるかは、:ref:`Story`" " 自体によって自動的に決定されます。矩形を提供すること以外では影響を与えることはできません。" -#: ../../tutorial.rst:305 e21c7de25cdd486aa5f25b939ac8d907 +#: ../../tutorial.rst:307 4c261efdbac741c4982404ab01604e2b msgid "" "Please see the :ref:`Stories recipes` for a number of " "typical use cases." msgstr "典型的な使用例については、 :ref:`Stories recipes` レシピをご覧ください。" -#: ../../tutorial.rst:309 399930cfb2e8488d960d96f3d1355d9c +#: ../../tutorial.rst:311 1cfcd608ebe3470d989d732b1053ef15 msgid "PDF Maintenance" msgstr "PDFメンテナンス" -#: ../../tutorial.rst:310 6da3e65befc0429c9a4ffa71eb88187f +#: ../../tutorial.rst:312 adb1c7c8a9924ac6ad2c05db95c0343a msgid "" "PDFs are the only document type that can be **modified** using PyMuPDF. " "Other file types are read-only." msgstr "PDFはPyMuPDFを使用して変更できる唯一のドキュメントタイプです。他のファイルタイプは読み取り専用です。" -#: ../../tutorial.rst:312 68d32990c279421098c78b364bae7855 +#: ../../tutorial.rst:314 9cd40dae8b664758b29583ab66394808 msgid "" "However, you can convert **any document** (including images) to a PDF and" " then apply all PyMuPDF features to the conversion result. Find out more " @@ -792,43 +798,43 @@ msgstr "" "で詳細を確認できます。また、任意のサポートされているドキュメントをPDFに変換できるデモスクリプト `pdf-converter.py`_ " "も確認してください。" -#: ../../tutorial.rst:314 5f13499a67cb4723bc9beff29bde1579 +#: ../../tutorial.rst:316 f2e2843ced0b43dca260d5fb7417e81a msgid "" ":meth:`Document.save()` always stores a PDF in its current (potentially " "modified) state on disk." msgstr ":meth:`Document.save()` は常に現在の(変更された可能性のある)PDFをディスクに保存します。" -#: ../../tutorial.rst:316 aafb21e9bd5d4bec92efc66f2dc9b3fe +#: ../../tutorial.rst:318 211603a41aaf4aa2bf96e1dcba2c8d1e msgid "" "You normally can choose whether to save to a new file, or just append " "your modifications to the existing one (\"incremental save\"), which " "often is very much faster." msgstr "通常、新しいファイルに保存するか、既存のファイルに変更内容を追加するか(「増分保存」)を選択できます。増分保存は非常に高速な場合があります。" -#: ../../tutorial.rst:318 5a055b9f80a74e1ea22dc0eccc70c054 +#: ../../tutorial.rst:320 f22382b263444329820b3e4b1c1f8ecc msgid "" "The following describes ways how you can manipulate PDF documents. This " "description is by no means complete: much more can be found in the " "following chapters." msgstr "以下にPDFドキュメントを操作する方法を示しますが、これに限らず、詳細は次の章でさらに見つけることができます。" -#: ../../tutorial.rst:321 9dfb0dbe13d042f8ad369bceb1ec00e8 +#: ../../tutorial.rst:323 d99528fe55cc49799b2ad8ee3460f8cd msgid "Modifying, Creating, Re-arranging and Deleting Pages" msgstr "ページの修正、作成、再配置、および削" -#: ../../tutorial.rst:322 3c2d01c1c0d44d82b73f260519b3337d +#: ../../tutorial.rst:324 107ff92570a24cde96fad3fd09fef0fb msgid "" "There are several ways to manipulate the so-called **page tree** (a " "structure describing all the pages) of a PDF:" msgstr "PDFの**ページツリー** (すべてのページを記述する構造)を操作するためには、いくつかの方法があります。" -#: ../../tutorial.rst:324 ddde9b75f1a441b88a2c1def1b695149 +#: ../../tutorial.rst:326 0003af108e2840da87372ff1fd5226f0 msgid "" ":meth:`Document.delete_page` and :meth:`Document.delete_pages` delete " "pages." msgstr ":meth:`Document.delete_page` と :meth:`Document.delete_pages` はページを削除します。" -#: ../../tutorial.rst:326 80586b5f3ab84355b52c1ed1b5ab92ac +#: ../../tutorial.rst:328 a944cc4bb64749afa365e43f0c2c95a3 msgid "" ":meth:`Document.copy_page`, :meth:`Document.fullcopy_page` and " ":meth:`Document.move_page` copy or move a page to other locations within " @@ -837,7 +843,7 @@ msgstr "" ":meth:`Document.copy_page` 、 :meth:`Document.fullcopy_page` 、 " ":meth:`Document.move_page` は、ページを同じドキュメント内の他の場所にコピーしたり移動したりします。" -#: ../../tutorial.rst:328 7fd9845cd7a34926b170a73f91d885fb +#: ../../tutorial.rst:330 d3c938ecfec045e88fcfd36f38d2a459 msgid "" ":meth:`Document.select` shrinks a PDF down to selected pages. Parameter " "is a sequence [#f3]_ of the page numbers that you want to keep. These " @@ -850,55 +856,55 @@ msgstr "" "`0 <= i < page_count` " "にある必要があります。実行されると、このリストに含まれていないすべてのページが削除されます。残ったページは指定した順序通りに(指定回数分!)現れます。" -#: ../../tutorial.rst:330 bee45078771343fe83ad7589e9012370 +#: ../../tutorial.rst:332 e8d7536dada8429993f454c33ebe1bc6 msgid "So you can easily create new PDFs with" msgstr "したがって、次のような簡単な方法で新しいPDFを作成できます:" -#: ../../tutorial.rst:332 25f33f4aacc9481d9fcb26ac31000c06 +#: ../../tutorial.rst:334 500d467e659f464a9be86508595c8f8f msgid "the first or last 10 pages," msgstr "最初または最後の10ページ" -#: ../../tutorial.rst:333 c7c3c8359a674a6491917634dd15c752 +#: ../../tutorial.rst:335 7ac997363c834974a15fe70f9cf887f3 msgid "only the odd or only the even pages (for doing double-sided printing)," msgstr "奇数ページのみまたは偶数ページのみ(両面印刷用)" -#: ../../tutorial.rst:334 dba8bebe0ee64ea882afea944db98add +#: ../../tutorial.rst:336 52d03385fca64465abb5a7a68be887b4 msgid "pages that **do** or **don't** contain a given text," msgstr "特定のテキストを含むまたは含まないページ" -#: ../../tutorial.rst:335 2a6089857c724acabb3bdc592344d853 +#: ../../tutorial.rst:337 312b16ee73bc4053a1765c3727eabba4 msgid "reverse the page sequence, ..." msgstr "ページの順序を逆にする" -#: ../../tutorial.rst:337 01c6ba3f04c54e5e85448bff1b8801ad +#: ../../tutorial.rst:339 0680eca8c5384e47a5c6af617fd6dbd4 msgid "... whatever you can think of." msgstr "... など、思いつく限りのことができます。" -#: ../../tutorial.rst:339 654cd5efc8cb4584bc1b6853a319a9e4 +#: ../../tutorial.rst:341 8ffb226602e84b2d8f7b1aaa97cb6721 msgid "" "The saved new document will contain links, annotations and bookmarks that" " are still valid (i.a.w. either pointing to a selected page or to some " "external resource)." msgstr "保存された新しいドキュメントには、まだ有効なリンク、注釈、およびブックマークが含まれています(選択したページを指すか、あるいは外部リソースを指すかを問わず)。" -#: ../../tutorial.rst:341 f5798f770efb4771baad5858c6577c52 +#: ../../tutorial.rst:343 d0b34cee85ee45e1ab3443c8523a5a4b msgid "" ":meth:`Document.insert_page` and :meth:`Document.new_page` insert new " "pages." msgstr ":meth:`Document.insert_page` および :meth:`Document.new_page` は新しいページを挿入します。" -#: ../../tutorial.rst:343 d3f4a5fbc2e5431da14ef1042b090e43 +#: ../../tutorial.rst:345 f2f4d69bc1a84523881267ef1a381d4f msgid "" "Pages themselves can moreover be modified by a range of methods (e.g. " "page rotation, annotation and link maintenance, text and image " "insertion)." msgstr "さらに、ページ自体はさまざまな方法で変更できます(ページの回転、注釈とリンクの維持、テキストと画像の挿入など)" -#: ../../tutorial.rst:346 886f8b946f4e4815b799d36417df9b2a +#: ../../tutorial.rst:348 92e85309c2254d6bb062cb77b4648dc2 msgid "Joining and Splitting PDF Documents" msgstr "PDF文書の結合と分割" -#: ../../tutorial.rst:348 6a463d0603f84c70b5002c8b6550b832 +#: ../../tutorial.rst:350 7b1f14d511a84c488a347bf0238d9901 msgid "" "Method :meth:`Document.insert_pdf` copies pages **between different** PDF" " documents. Here is a simple **joiner** example (*doc1* and *doc2* being " @@ -907,29 +913,29 @@ msgstr "" "メソッド :meth:`Document.insert_pdf` は異なるPDF文書間でページをコピーします。以下は簡単な結合の例です( " "`doc1` と `doc2` は開かれたPDF文書です)::" -#: ../../tutorial.rst:353 222316e138ce4cf8b89e7d711d14d46f +#: ../../tutorial.rst:355 c79912677faf4c54a26a5189bc4b5b80 msgid "" "Here is a snippet that **splits** *doc1*. It creates a new document of " "its first and its last 10 pages::" msgstr "以下は、 `doc1` を分割するスニペットです。最初の10ページと最後の10ページを含む新しいドキュメントを作成します。" -#: ../../tutorial.rst:360 8b1f5cd97d5d4a58b50e0bc338be4e94 +#: ../../tutorial.rst:362 b3a608ade2a3470186e036c291477c96 msgid "" "More can be found in the :ref:`Document` chapter. Also have a look at " "`PDFjoiner.py`_." msgstr ":ref:`Document` の章にはさらに詳細が記載されています。また、 `PDFjoiner.py`_ も確認してください。" -#: ../../tutorial.rst:363 0bfca11b309e46ff9d4c43b51835a69f +#: ../../tutorial.rst:365 02b0c1a5f04b4dae8aa27371760eead5 msgid "Embedding Data" msgstr "データの埋め込み" -#: ../../tutorial.rst:365 9bbce0f40b384bdb9d054f814f3e32af +#: ../../tutorial.rst:367 b28d4ebda3a14d069e6534c239bf2dac msgid "" "PDFs can be used as containers for arbitrary data (executables, other " "PDFs, text or binary files, etc.) much like ZIP archives." msgstr "PDFはZIPアーカイブのように、任意のデータ(実行可能ファイル、他のPDF、テキストファイル、バイナリファイルなど)をコンテナとして使用できます。" -#: ../../tutorial.rst:367 dcb45e64b7164f3f91e401f4dc7dfe32 +#: ../../tutorial.rst:369 04c4033a230c46ceab62df3ef213205b msgid "" "PyMuPDF fully supports this feature via :ref:`Document` *embfile_** " "methods and attributes. For some detail read :ref:`Appendix 3`, consult " @@ -943,27 +949,27 @@ msgstr "" "、`embedded-export.py`_ 、`embedded-import.py`_ 、および `embedded-list.py`_ " "も参考になるでしょう。" -#: ../../tutorial.rst:371 340d14d57d8a4581acfdc8877d52cc2b +#: ../../tutorial.rst:373 6c50eafa9b144cf3b3aeb36f946eed07 msgid "Saving" msgstr "保存" -#: ../../tutorial.rst:373 b4667ead58a74dcdac8d1e28cfd6d6ad +#: ../../tutorial.rst:375 1b094625b4f6439996e7f95040640fc7 msgid "" "As mentioned above, :meth:`Document.save` will **always** save the " "document in its current state." msgstr "前述のように、 :meth:`Document.save` は常にドキュメントを現在の状態で保存します。" -#: ../../tutorial.rst:375 6002bbacc2c6498b8161677eb0042526 +#: ../../tutorial.rst:377 3884d37d66e24f51a21bf2c8d54682a0 msgid "" "You can write changes back to the **original PDF** by specifying option " -"*incremental=True*. This process is (usually) **extremely fast**, since " +"``incremental=True``. This process is (usually) **extremely fast**, since " "changes are **appended to the original file** without completely " "rewriting it." msgstr "" "オプション `incremental=True` " "を指定することで、変更を元のPDFに書き戻すことができます。このプロセスは(通常)非常に高速です。変更は元のファイルに追加されるため、完全に書き直す必要がありません。" -#: ../../tutorial.rst:377 7eca2c4369e74912b68d3d667864d6fa +#: ../../tutorial.rst:379 d82a59f0f1444f528e7b0b1e41005091 msgid "" ":meth:`Document.save` options correspond to options of MuPDF's command " "line utility *mutool clean*, see the following table." @@ -971,175 +977,175 @@ msgstr "" ":meth:`Document.save` のオプションは、MuPDFのコマンドラインユーティリティmutool " "cleanのオプションと対応しています。以下の表を参照してください。" -#: ../../tutorial.rst:380 deb6ed9fc26d488cbeb48034f7a07864 +#: ../../tutorial.rst:382 a2719cded81243c89f81bd304431e1f0 msgid "**Save Option**" msgstr "**保存オプション**" -#: ../../tutorial.rst:380 8baa3a94461248c7972221b21c6b3ad9 +#: ../../tutorial.rst:382 b9882b9da2064022b9a963dd902e4653 msgid "**mutool**" msgstr "" -#: ../../tutorial.rst:380 2055bebf68c54ac095f22a042ba44554 +#: ../../tutorial.rst:382 881334199d6f47a0adc238b7051b91c1 msgid "**Effect**" msgstr "**効果**" -#: ../../tutorial.rst:382 5408663cb784444ba42fa5563353bf13 +#: ../../tutorial.rst:384 c2182e3340414c48bab7b2e765f85e93 msgid "garbage=1" msgstr "" -#: ../../tutorial.rst:382 965dabeefa5c404fae59f052733757da +#: ../../tutorial.rst:384 dc388d3599fb43f999961f8e2fc8eb8e msgid "g" msgstr "" -#: ../../tutorial.rst:382 a3dda7fbcc8848c6a82bbebf4f4ed658 +#: ../../tutorial.rst:384 b34589850ac84fe1b67edee04343ac0d msgid "garbage collect unused objects" msgstr "未使用のオブジェクトをガベージコレクションします" -#: ../../tutorial.rst:383 486a73fcb8354f50baa862c8d32486ff +#: ../../tutorial.rst:385 92070a3202d74b5db0e7662c386310c9 msgid "garbage=2" msgstr "" -#: ../../tutorial.rst:383 691ad099151c47b68f5030b4fe59e98f +#: ../../tutorial.rst:385 95a46fcf657b4a4991e56eb9755ba000 msgid "gg" msgstr "" -#: ../../tutorial.rst:383 06ec4170fe6042efb8c195d25f5a37c8 +#: ../../tutorial.rst:385 62e16e074c2448d8bc155dfdf6afdda5 msgid "in addition to 1, compact :data:`xref` tables" msgstr "1に加えて、xrefテーブルをコンパクトにします" -#: ../../tutorial.rst:384 2a5e9719d775450da1ef342d656afdbd +#: ../../tutorial.rst:386 77f025b11a83409b84f2eee80fad402d msgid "garbage=3" msgstr "" -#: ../../tutorial.rst:384 2d2d1da053664ec1b6b0de5ef32bcab2 +#: ../../tutorial.rst:386 504485e1d6cb4d1d8786e62f8faa978e msgid "ggg" msgstr "" -#: ../../tutorial.rst:384 5d07495a34e6485396e72c69f87a3a27 +#: ../../tutorial.rst:386 c3e117b3d4be42728175ceb24ebbb432 msgid "in addition to 2, merge duplicate objects" msgstr "2に加えて、重複したオブジェクトをマージします" -#: ../../tutorial.rst:385 d46b5ea944074583a37d04c5a65f13ac +#: ../../tutorial.rst:387 386d21dd828449d48e07ec9006e3324c msgid "garbage=4" msgstr "" -#: ../../tutorial.rst:385 b1eaae90c6774363a9d02d3e0aef52c4 +#: ../../tutorial.rst:387 1778e2d92f1945379bbbaaeb6d1d0a3f msgid "gggg" msgstr "" -#: ../../tutorial.rst:385 50ff9369067d49078e1162941be486a2 +#: ../../tutorial.rst:387 2fb520a34ee84f6c917f2f946463f294 msgid "in addition to 3, merge duplicate stream content" msgstr "3に加えて、重複したストリームの内容をマージします" -#: ../../tutorial.rst:386 646e858cdb5a4b8bab338979983c1247 +#: ../../tutorial.rst:388 057be323cb4046688e8d955e27729089 msgid "clean=True" msgstr "" -#: ../../tutorial.rst:386 f05caab04aff42edba7aecaee7f098c2 +#: ../../tutorial.rst:388 8bcf19b7dc0d4b4eafad5f7a4c84c22d msgid "cs" msgstr "" -#: ../../tutorial.rst:386 db8a8e22ddb34831b596e58ee4b8fea3 +#: ../../tutorial.rst:388 68e84f8fcc4e4051be0ea61e6b72951c msgid "clean and sanitize content streams" msgstr "コンテンツストリームをクリーンアップしてサニタイズします" -#: ../../tutorial.rst:387 abb8410f3ad841c280a0c74967b5fe47 +#: ../../tutorial.rst:389 bcb99a6d5341449f80aaa25be82c209c msgid "deflate=True" msgstr "" -#: ../../tutorial.rst:387 16bc363b9dd043999e379000c6717b26 +#: ../../tutorial.rst:389 f027ea4ce13144049bfd333a3e9a666f msgid "z" msgstr "" -#: ../../tutorial.rst:387 7549c82249954a6e9f904f9da5042a97 +#: ../../tutorial.rst:389 6f2e9b1158804573acb4d20e2daca889 msgid "deflate uncompressed streams" msgstr "非圧縮のストリームをdeflate圧縮します" -#: ../../tutorial.rst:388 eff2557eb8a44805863f9b77af806c32 +#: ../../tutorial.rst:390 53905bc3eb97437e8911ddbc5d100554 msgid "deflate_images=True" msgstr "" -#: ../../tutorial.rst:388 06ac26346e4a4bd0b0277064e027f7af +#: ../../tutorial.rst:390 34acaac300444bf08486a3959b81dece msgid "i" msgstr "" -#: ../../tutorial.rst:388 0dcecb01227f4b478e49543adf890436 +#: ../../tutorial.rst:390 9b6809eb583e495cb5a8a322074180f8 msgid "deflate image streams" msgstr "画像ストリームをdeflate圧縮します" -#: ../../tutorial.rst:389 26fd4348c659461a8ca10e7c35bf06a9 +#: ../../tutorial.rst:391 72d3e5a396dd4fb29d03b762a58b906a msgid "deflate_fonts=True" msgstr "" -#: ../../tutorial.rst:389 d7203ddda227496f88000d659379461e +#: ../../tutorial.rst:391 a4e6652a6a14408f8335a8fe83b9bf96 msgid "f" msgstr "" -#: ../../tutorial.rst:389 c87fc4bea32a4a6b9fef1df82e3fe5be +#: ../../tutorial.rst:391 6ee5c61d2867436ba3dcf2f8ef83ab86 msgid "deflate fontfile streams" msgstr "フォントファイルストリームをdeflate圧縮します" -#: ../../tutorial.rst:390 256c7402189e4b3799a0992ca292865c +#: ../../tutorial.rst:392 7a28d660d2b04da9badd9d56176db271 msgid "ascii=True" msgstr "" -#: ../../tutorial.rst:390 b18baed49d1e4dffa617dee7d7cb24aa +#: ../../tutorial.rst:392 15cdc88f7d8b45d2913cdac93cb0abba msgid "a" msgstr "" -#: ../../tutorial.rst:390 6eee1768e5834126acb294b21992cab1 +#: ../../tutorial.rst:392 3c7d9fd90dab4253a99aa01e0a6a51ff msgid "convert binary data to ASCII format" msgstr "バイナリデータをASCII形式に変換します" -#: ../../tutorial.rst:391 51505b1d2e24438c9cda8d5221d48dcb +#: ../../tutorial.rst:393 76e5877279f846468b87ea5fcba8cb52 msgid "linear=True" msgstr "" -#: ../../tutorial.rst:391 21229be4e9e7439a953c39c66bc82b63 +#: ../../tutorial.rst:393 ef0deabe1236445f823821ccb49065c9 msgid "l" msgstr "" -#: ../../tutorial.rst:391 7ac39bb9d7f74bbb8bd531fd0a1c2761 +#: ../../tutorial.rst:393 5d6bef23e4d5440fa6c61fdaedc7e1e3 msgid "create a linearized version" msgstr "線形化バージョンを作成します" -#: ../../tutorial.rst:392 4306674075b24557bf45156a934bc7af +#: ../../tutorial.rst:394 564a5f2120f64c54aa1efdd8dded2a0d msgid "expand=True" msgstr "" -#: ../../tutorial.rst:392 48ca0fecb42f437c927478eaeb38f69a +#: ../../tutorial.rst:394 70de347592a0460bbfd4e06cdd95a0d4 msgid "d" msgstr "" -#: ../../tutorial.rst:392 093b24d5133c473199016bc675d27cfc +#: ../../tutorial.rst:394 a00de27f23244fc49535777b88b9fc4a msgid "decompress all streams" msgstr "すべてのストリームを解凍します" -#: ../../tutorial.rst:395 2b39cef7f6be4df1908b94343cf5cbe5 +#: ../../tutorial.rst:397 6c7e230d21b34ca7a5f0c7de6b5d5187 msgid "" "For an explanation of terms like *object, stream, xref* consult the " ":ref:`Glossary` chapter." msgstr "オブジェクト、ストリーム、xrefなどの用語の詳細については、 :ref:`Glossary` の章を参照してください。" -#: ../../tutorial.rst:397 2783ed990cb74a8dae331df80f41e201 +#: ../../tutorial.rst:399 dc0df99a528d4978997189a285ab567f msgid "" -"For example, *mutool clean -ggggz file.pdf* yields excellent compression " -"results. It corresponds to *doc.save(filename, garbage=4, deflate=True)*." +"For example, ``mutool clean -ggggz file.pdf`` yields excellent compression " +"results. It corresponds to ``doc.save(filename, garbage=4, deflate=True)``." msgstr "" "例えば、 `mutool clean -ggggz file.pdf` は優れた圧縮結果をもたらします。これは " "`doc.save(filename, garbage=4, deflate=True)` に対応しています。" -#: ../../tutorial.rst:400 908e6ab8d7fa4072a65d5f77e000f63c +#: ../../tutorial.rst:402 77dd1b8c5ae8491eadd5ee69c5c969ca msgid "Closing" msgstr "クローズ" -#: ../../tutorial.rst:401 de8bd0e1f03742df8f8687134e8712da +#: ../../tutorial.rst:403 f54a1c4a6b194905adcc2de9c957a901 msgid "" "It is often desirable to \"close\" a document to relinquish control of " "the underlying file to the OS, while your program continues." msgstr "プログラムが継続する間に、基になるファイルの制御をOSに戻すために、ドキュメントを「クローズ」することがしばしば望まれます。" -#: ../../tutorial.rst:403 f882fd29fc4a45c7b81fbe0f8189f883 +#: ../../tutorial.rst:405 aba7fafb6d144278a587237e62031f63 msgid "" "This can be achieved by the :meth:`Document.close` method. Apart from " "closing the underlying file, buffer areas associated with the document " @@ -1148,11 +1154,11 @@ msgstr "" "これは :meth:`Document.close` " "メソッドによって実現できます。基になるファイルをクローズするだけでなく、ドキュメントに関連するバッファ領域も解放されます。" -#: ../../tutorial.rst:406 4cfd3ca990664a00b8b8c99e06f32c49 +#: ../../tutorial.rst:408 ef36cad35b2b43b3b4e6a75a3cad4061 msgid "Further Reading" msgstr "さらなる情報" -#: ../../tutorial.rst:407 fceb5ce9c12040d4b04b5897ef645190 +#: ../../tutorial.rst:409 413e5c22ce7b4e7c946d398ff40ff7bc msgid "" "Also have a look at PyMuPDF's `Wiki`_ pages. Especially those named in " "the sidebar under title **\"Recipes\"** cover over 15 topics written in " @@ -1162,18 +1168,18 @@ msgstr "" "ページもご覧ください。特に、サイドバーのタイトル「Recipes」の下に名前が挙げられているものは、15以上のトピックが「How-" "To」スタイルで書かれています。" -#: ../../tutorial.rst:409 e8dc5020aeba446b96733d278aed0139 +#: ../../tutorial.rst:411 cc93bd599e14470998e742dc7e454487 msgid "" "This document also contains a :ref:`FAQ`. This chapter has close " "connection to the aforementioned recipes, and it will be extended with " "more content over time." msgstr ":ref:`Recipes: Table of Contents` をご覧ください。" -#: ../../tutorial.rst:416 0741bd44e9d443b793ccf05e83603b91 +#: ../../tutorial.rst:418 cb8fc0b5b1c848168a96624e65dd29fc msgid "Footnotes" msgstr "脚注" -#: ../../tutorial.rst:417 08ab7a977a1b4f2bba932f5b6a98dbb9 +#: ../../tutorial.rst:419 b94228407b8545b2a40f21dedce5ff06 msgid "" "PyMuPDF lets you also open several image file types just like normal " "documents. See section :ref:`ImageFiles` in chapter :ref:`Pixmap` for " @@ -1182,7 +1188,7 @@ msgstr "" "PyMuPDFは通常のドキュメントと同様に、いくつかの画像ファイル形式も開くことができます。詳細は、章 :ref:`Pixmap` のセクション " ":ref:`ImageFiles` を参照してください。" -#: ../../tutorial.rst:419 235b482d363847b192f4fbc3f1487994 +#: ../../tutorial.rst:421 0530b8abe40b49d793ce8d1b1741140a msgid "" ":meth:`Page.get_text` is a convenience wrapper for several methods of " "another PyMuPDF class, :ref:`TextPage`. The names of these methods " @@ -1194,7 +1200,7 @@ msgstr "" "に渡された引数文字列に対応しています。例えば、 `Page.get_text(“dict”)` は " "`TextPage.extractDICT()` と同等です。" -#: ../../tutorial.rst:421 42c3e2f2e9b248cbb898ed7215b52258 +#: ../../tutorial.rst:423 83003f91b1bd4cb183918e279dd80e30 msgid "" "\"Sequences\" are Python objects conforming to the sequence protocol. " "These objects implement a method named *__getitem__()*. Best known " @@ -1203,14 +1209,10 @@ msgid "" "Refer to :ref:`SequenceTypes` for details." msgstr "\"シーケンス\"とは、シーケンスプロトコルに準拠したPythonオブジェクトのことを指します。これらのオブジェクトは、getitem()という名前のメソッドを実装しています。よく知られた例としては、Pythonのタプルやリストがあります。しかし、array.array、numpy.array、およびPyMuPDFの「geometry」オブジェクト(幾何オブジェクトのためのオペレーター代数)もシーケンスです。詳細については、「PyMuPDFにおけるPythonシーケンスの引数の使用」を参照してください" -#: ../../footer.rst:60 8f45ed30bb01436f880f4038e9a238cc +#: ../../footer.rst:60 2332c1f552f94af7ba9abc4470a1da83 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 561d84eb251f45dfb6c1bca52412e0cf -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" @@ -1224,3 +1226,6 @@ msgstr "" #~ " the same Python environment." #~ msgstr "したがって、PyMuPDFは同じPython環境で「fitz」という名前のパッケージと共存することはできません" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/vars.mo b/docs/locales/ja/LC_MESSAGES/vars.mo index d3ad10f6f..e2354943e 100644 Binary files a/docs/locales/ja/LC_MESSAGES/vars.mo and b/docs/locales/ja/LC_MESSAGES/vars.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/vars.po b/docs/locales/ja/LC_MESSAGES/vars.po index f1489b0df..04e054543 100644 --- a/docs/locales/ja/LC_MESSAGES/vars.po +++ b/docs/locales/ja/LC_MESSAGES/vars.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,135 +19,136 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 f32c1f450ad943008bc67b38abf4a053 +#: ../../header.rst:-1 fe9b5e25292345dabfb497bb19edb766 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 8ab6a9c388b543938f9e42b249c03a0b +#: ../../header.rst:-1 d2f8f08d7c614fd4a24526338f98cf81 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 dc460bbd2a3443cd8fb8d2774b1cdcdb +#: ../../header.rst:-1 b21de3ab3c9c435c854c3d2c35b872eb msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../vars.rst:5 723ec42f40c5444a91a39371a05cc44d +#: ../../vars.rst:5 1030466fe621484abb0ed898e9bd858e msgid "Constants and Enumerations" msgstr "定数と列挙型" -#: ../../vars.rst:6 04182006c04f4df2a14270fd152e2968 +#: ../../vars.rst:6 7b9e2d297c744f9896459d857124f8fe +#, fuzzy msgid "" "Constants and enumerations of :title:`MuPDF` as implemented by |PyMuPDF|." -" Each of the following variables is accessible as *pymupdf.variable*." +" Each of the following values is accessible as `pymupdf.value`." msgstr "PyMuPDFによって実装されたMuPDFの定数と列挙型。以下の各変数は、 *pymupdf.variable* としてアクセスできます。" -#: ../../vars.rst:10 a61a5ee445a34361ad701d741e3ef226 +#: ../../vars.rst:10 93b7c9094c1a4a71859329ac3585422e msgid "Constants" msgstr "定数" -#: ../../vars.rst:14 8f23b3878345473fb255d840225c0e31 +#: ../../vars.rst:14 7fb75480ccc840dfaa9e63651abc6c59 msgid "Predefined Python list of valid :ref:`Base-14-Fonts`." msgstr "PDFベース14フォントの事前定義されたPythonリスト。" -#: ../../vars.rst 066ef6249c064db390074cd917f59e4a -#: 0fd9b31af97c4a26bfe354c58b176a76 1fe6071ba3dc442da06fe09a67a1c551 -#: 256f3ddd02654e1287471a34f0827508 33478a534638417bbe75fa09d3f2b675 -#: 406b7fd01bd2437faa4937f0a8f073ba 4e3feb3b712e42a586b3bab6973214e2 -#: 4ff61ac710904134a7597dba0a62866a 642702aaad0142fe81137840adebf454 -#: 7106b226f3f74609995ff1640ed1fe52 7662307b075c46a1815df3c6846e621a -#: 7fbfa638c33d49c6805b5214ff1cbfd9 8ab6e19095d144ca9ff5a965b3e96fe9 -#: 929ed5a723a145dabc8dfc3591e5010b 9cfaf8cd29054e67b69c7f9ada0916d0 -#: a16550359c5c4a218dc44e7c467b6785 a51b50436ff84928b450a88c47b39aa0 -#: aa7f143aca814ca8b38e186df8866d26 c84f797a544b417fa079fdd9b5c9eefe -#: cd71a3dbde9f4f218c57eca39c888067 d2b0853f816b4060bc372041cf762840 -#: dd1edb09ae9e455eab2f81910034ae3a dff0cb83f2d74273b70286604d254769 -#: ef65a0f4c29b41ab83c79f5ae70e0303 f2858c97571446728a4d13aaa7d4d6a6 -#: f62cd627543d4d368ffc62d56c607bbf +#: ../../vars.rst 09c3b969b61646df8d91f86cb079ea60 +#: 10a6d73acab042d7bb131e133536db78 253394944f67424fb6f134c03c18972a +#: 295204de5ddd4acf94e9337133b6ab41 33b601da845b497abfda322b0e34d746 +#: 3d1a316a7eca42a09333ceae6757f67c 428bd79aa9784b51a67935ca4691fe71 +#: 46d1381f7d3444c7bd238119b586a4bf 6866fb6bcf9546da8f1a70dd2f70d55b +#: 6960f8df76ba4eb5a0b01f460d59356d 733a409d043344b5bd9e45771490c344 +#: 74e0236c1bf6493591c4237cf0483e57 8bab110d76ed4c47b11bb57ba1f80010 +#: 9ca5944592834b6495adbddf9e94d1de a09525b0a9b243989d16120571d0edc2 +#: a0ab45345d2d464dbc0138a582ba3cff bc579d3796e14cd99e7bd462936b9388 +#: c98d57fd103f4a13848a71827bda04aa d5b4892f3f1f415b8c2c31ae4268884c +#: d5cd42a0da88418d8c02c0c74ab59e6c dd0c5824dd7348748ee402755d931f64 +#: de9a3ce202f14edab37dc8e0288bc4e5 e540535dea624014bcefd48f86582d30 +#: f3c91524c9c7416ba8088fe263a3aa53 f6ec6d751f8d4b1eb04285b8b8cf1721 +#: f888476feadf4b77b29835b2400cbc94 msgid "type" msgstr "" -#: ../../vars.rst:16 2a160369a5cd413982d7ce269f088a7b +#: ../../vars.rst:16 01a14e397bf64b1ca8867ae79611a594 msgid "list" msgstr "" -#: ../../vars.rst:20 503daa2860ae4e86b451672cc55a9e91 +#: ../../vars.rst:20 144b32ec81dd44a49ce81c0e827d05dd msgid "Predefined RGB colorspace *pymupdf.Colorspace(pymupdf.CS_RGB)*." msgstr "事前定義されたRGBカラースペース *pymupdf.Colorspace(pymupdf.CS_RGB)*。" #: ../../vars.rst:22 ../../vars.rst:28 ../../vars.rst:34 -#: 3541b726a6b74e9e9de665b425d32fab 4127ef4a33b944929329d2b00a9f944b -#: 6df172c4b42a4f73b905315abe30d8ff +#: 2ae706b11a0e42ec85227aca8df8b5da 2b900439e2dd42c48650b9c926a25ad2 +#: 6b0f05140f54460cbdeaf5ae880c66c2 msgid ":ref:`Colorspace`" msgstr ":ref:`Colorspace`" -#: ../../vars.rst:26 03849b75232c4fd48d8e0e212da86ddd +#: ../../vars.rst:26 453c0e5549bb436eabf89d23f4a39e20 msgid "Predefined GRAY colorspace *pymupdf.Colorspace(pymupdf.CS_GRAY)*." msgstr "事前定義されたGRAYカラースペース *pymupdf.Colorspace(pymupdf.CS_GRAY)*。" -#: ../../vars.rst:32 d7956fe137d6453f9a2c05c858102d86 +#: ../../vars.rst:32 f28115ecc14f4b3fa020ef83ae3de01f msgid "Predefined CMYK colorspace *pymupdf.Colorspace(pymupdf.CS_CMYK)*." msgstr "事前定義されたCMYKカラースペース *pymupdf.Colorspace(pymupdf.CS_CMYK)*。" -#: ../../vars.rst:38 812339e1cc7649eea67b3c1c3f9cb29b +#: ../../vars.rst:38 8644c9c449e64f5a83f23be98df5e837 msgid "1 -- Type of :ref:`Colorspace` is RGBA" msgstr "1 – :ref:`Colorspace` のタイプはRGBA" -#: ../../vars.rst:40 ../../vars.rst:46 ../../vars.rst:52 ../../vars.rst:278 -#: ../../vars.rst:284 ../../vars.rst:293 ../../vars.rst:302 ../../vars.rst:308 -#: ../../vars.rst:314 0292459fe85d4021826deab153aaf108 -#: 1e57b74caff944d39eb90bb00222721e 50172dc24cdf4f19b71c8b82ecc3174f -#: 638b8f0072e540c78e5aab6ce2660c76 ad1806542b5d457e81afc599a4ae2412 -#: ba63764d61074efba51d28745985a5e2 cfbea96b43544644bb6c4532904c6025 -#: fe8915a1b8d947bc8ba66804118185be ff09894642434fbf97eb92e4b74cef38 +#: ../../vars.rst:40 ../../vars.rst:46 ../../vars.rst:52 ../../vars.rst:326 +#: ../../vars.rst:332 ../../vars.rst:341 ../../vars.rst:350 ../../vars.rst:356 +#: ../../vars.rst:362 09af83007b7d4e23b12cbc19243303f2 +#: 2edaf272dfa54f8fbc3adf2750b339ea 5c5e36e69bad471783a3dd49d330bd5e +#: 86f5471ae7d1470493fa5da69e5d6aa5 8d8542dcb26c46b9bb6086f15e992bbd +#: a44f189f2ecb4a258d02694763689f54 d835a815ac894c25927034021fda246a +#: dead95221beb45bf8aa3e244ec5e899d f20c657e0b534b5d9a2e87c1a21bb576 msgid "int" msgstr "" -#: ../../vars.rst:44 d6dcbbfc7ace4528997e796920831c6b +#: ../../vars.rst:44 dea4263081ba4994a2eeaa9d81eee74d msgid "2 -- Type of :ref:`Colorspace` is GRAY" msgstr "2 – :ref:`Colorspace` のタイプはGRAY" -#: ../../vars.rst:50 6e8d9146b094403a8cc3ce0cd80c78a2 +#: ../../vars.rst:50 d166778de3d24a18a747305e3d8fcb20 msgid "3 -- Type of :ref:`Colorspace` is CMYK" msgstr "3 – :ref:`Colorspace` のタイプはCMYK" -#: ../../vars.rst:56 143efd674a5441ee8171f3ceefc85420 +#: ../../vars.rst:56 c49bb5d14a654854813f83d5439881cc msgid "'x.xx.x' -- MuPDF version that is being used by PyMuPDF." msgstr "" #: ../../vars.rst:58 ../../vars.rst:70 ../../vars.rst:82 -#: 050e5adeb9fa4117b4f54da2bd69766e 3d037f9f1a2847c996899c2dbe3f1cc8 -#: d013aadde6654bf398074a8f8be1b112 +#: 21a24e7f678c41689906f6f3a44c4d9c 894451110d954f70b83b9c086ee80d49 +#: 956c3e03532b48a1b2d48a54f23ce584 msgid "string" msgstr "" -#: ../../vars.rst:62 48b2d705199a4c6f8b572232b679e284 +#: ../../vars.rst:62 d7f7bbe56b91414984ad7b0319521c10 msgid "MuPDF version as a tuple of integers, `(major, minor, patch)`." msgstr "" #: ../../vars.rst:64 ../../vars.rst:76 ../../vars.rst:88 -#: 20f5b35dad424c0c8dadb81369a93a14 adce243538fe40bf9970bc7423a58202 -#: d0e807b710584cc5849373c3f615b180 +#: 207f5eb93ed945aba7806632b6423da7 3f43e06044e444069fd8df47e546539c +#: 982cdc3ad1c54084ae82883fdf9be7c1 msgid "tuple" msgstr "" -#: ../../vars.rst:68 6e41ec01632b4844a9af04820b96dcc7 +#: ../../vars.rst:68 329db1806650462baee132494f489e4f #, fuzzy msgid "'x.xx.x' -- PyMuPDF version." msgstr "‘x.xxx’ – MuPDFのバージョン" -#: ../../vars.rst:74 f1b22dd4f718478f80385d7af5c911c5 +#: ../../vars.rst:74 c124efc4e65240eb9be8b289a3d5b4e9 msgid "PyMuPDF version as a tuple of integers, `(major, minor, patch)`." msgstr "" -#: ../../vars.rst:80 c397ff6e5a424a1dbdf48bc1feb9f7e7 +#: ../../vars.rst:80 7f0fa59a351b4a1a86275db5260bb276 msgid "ISO timestamp *YYYY-MM-DD HH:MM:SS* when these bindings were built." msgstr "これらのバインディングがビルドされたISOタイムスタンプ YYYY-MM-DD HH:MM:SS。" -#: ../../vars.rst:86 6e2ec1d542ff4bde8f87b54acc6e83be +#: ../../vars.rst:86 fbd22c55345c4f83935292c0f151c564 #, fuzzy msgid "" "(pymupdf_version, mupdf_version, timestamp) -- combined version " @@ -157,191 +158,191 @@ msgstr "" "(VersionBind、VersionFitz、タイムスタンプ) – " "タイムスタンプは「YYYYMMDDhhmmss」という形式で表される、生成時点の時間情報を結合したバージョン情報。" -#: ../../vars.rst:92 ../../vars.rst:100 59910d5cca574788ab58bff8a64a846f -#: e53df2af71884f7bab84c67a6f57710e +#: ../../vars.rst:92 ../../vars.rst:100 892fe0288aeb4e99b8b0d3600184ef2b +#: dfd9229f0ee444b3bdb04a3c04df53ae msgid "Legacy equivalent to `mupdf_version`." msgstr "" -#: ../../vars.rst:96 9d126332b4784536a8eafd9d062699be +#: ../../vars.rst:96 3cd10f8741a94714b233fcdba42963ca msgid "Legacy equivalent to `pymupdf_version`." msgstr "" -#: ../../vars.rst:106 a77a64f39025412fbf8eb46333d9e21f +#: ../../vars.rst:106 7733f01a712e474a8dfadb43f1b97b26 msgid "Document Permissions" msgstr "ドキュメントの許可" #: ../../vars.rst:109 ../../vars.rst:127 ../../vars.rst:140 -#: 8926b63d9f944a7cb737b8df008cfdb6 9a1d94252af14cc0adc728078c9a11ec -#: e50e140e1f8646e69ca31f749c431b5c +#: 23c7da2ac88d4e8aa9d426ebb8cc564e 9b8d302385fe4503b9e770cfe5869d69 +#: aa709efa1b7e4ee2ba21a6a73f45b034 msgid "Code" msgstr "コード" -#: ../../vars.rst:109 1116d95b11674feb94530fefffd069a6 +#: ../../vars.rst:109 b9a1feca1e2247dd8fb3eb8bdf0f54a0 msgid "Permitted Action" msgstr "許可されたアクション" -#: ../../vars.rst:111 bb61a66fb01749b79e96e948ef1e769e +#: ../../vars.rst:111 3dd46d71a51a493b8aff660ddb32b6b7 msgid "PDF_PERM_PRINT" msgstr "" -#: ../../vars.rst:111 a7d22d466e9942eab6406085b045d5b5 +#: ../../vars.rst:111 409c61f885d4482f9a980d219762cb7d msgid "Print the document" msgstr "文書を印刷する" -#: ../../vars.rst:112 dce61bdcafad422699d138c183f0e99a +#: ../../vars.rst:112 6796bebae6f6460fb93342edb0f62341 msgid "PDF_PERM_MODIFY" msgstr "" -#: ../../vars.rst:112 9b01257aba5348fdad9238733b36c385 +#: ../../vars.rst:112 fd898736e37d4f528240b29014abd0e0 msgid "Modify the document's contents" msgstr "文書の内容を変更する" -#: ../../vars.rst:113 1cae0dc165d94c17a2c33c90ac542613 +#: ../../vars.rst:113 d8a4d790db384119ac0305c207be337b msgid "PDF_PERM_COPY" msgstr "" -#: ../../vars.rst:113 1f98d31d5d214833a7ff9388d35e4841 +#: ../../vars.rst:113 f7817d26bfdc4d14b265df25a694076a msgid "Copy or otherwise extract text and graphics" msgstr "テキストやグラフィックスをコピーしたりその他の抽出を行う" -#: ../../vars.rst:114 b45cd9c61d7043e0b63577cf755f931b +#: ../../vars.rst:114 8a02ac6b9a4d4399a2940a96e311a80b msgid "PDF_PERM_ANNOTATE" msgstr "" -#: ../../vars.rst:114 5b3987cf88654495bb03c0fa2989013c +#: ../../vars.rst:114 4ca81a28be8448ce9469dde104486304 msgid "Add or modify text annotations and interactive form fields" msgstr "テキスト注釈やインタラクティブなフォームフィールドを追加または変更する" -#: ../../vars.rst:115 ec801d07f8fb4b338423df9aeb3a42f1 +#: ../../vars.rst:115 8d256680b5a64635a6b4f5aa56432961 msgid "PDF_PERM_FORM" msgstr "" -#: ../../vars.rst:115 24eb9315dccd4b6184b8012b2c9c908e +#: ../../vars.rst:115 257e185d25414ac6b8f8849455d459be msgid "Fill in forms and sign the document" msgstr "フォームに記入し、文書に署名する" -#: ../../vars.rst:116 1994bec6de1b43ba980a1c64602c2d36 +#: ../../vars.rst:116 dab26bdc5a2c41a2825ced24a564d464 msgid "PDF_PERM_ACCESSIBILITY" msgstr "" -#: ../../vars.rst:116 983040381d904871ab47e306e1f43d7d +#: ../../vars.rst:116 c175209ea21a457db4ac47920318e63e msgid "Obsolete, always permitted" msgstr "廃止されましたが、常に許可されています" -#: ../../vars.rst:117 3b3639fbf46f4fee9a2dc7be44fca85f +#: ../../vars.rst:117 204559ad227f46f79d769d00108ab587 msgid "PDF_PERM_ASSEMBLE" msgstr "" -#: ../../vars.rst:117 66f230d45b074648ae2baa512e415dac +#: ../../vars.rst:117 69c2e8a6caf2466396c7936e95acfde0 msgid "Insert, rotate, or delete pages, bookmarks, thumbnail images" msgstr "ページの挿入、回転、削除、ブックマーク、サムネイル画像の操作" -#: ../../vars.rst:118 ca721b2f1c334364adfa9fe980be9e26 +#: ../../vars.rst:118 374d712b7da44ed195cd4c290e1c2716 msgid "PDF_PERM_PRINT_HQ" msgstr "" -#: ../../vars.rst:118 675f65c6e6c7493a978d4a3ed78485ef +#: ../../vars.rst:118 7bd08c2438f7404c9edb7918cfa9dde4 msgid "High quality printing" msgstr "高品質印刷" -#: ../../vars.rst:124 6f8145a67b294c628dd8ce311e998220 +#: ../../vars.rst:124 44c375dc62c84ea4aa0f893f7428fc97 msgid "PDF Optional Content Codes" msgstr "PDFオプショナルコンテンツコード" -#: ../../vars.rst:127 ../../vars.rst:140 4ae979c907334270933b66e5037010f9 -#: ead9a6bac60646cfa01917184924f6ea +#: ../../vars.rst:127 ../../vars.rst:140 1f12957ffd304f15be7b4562fbb70af8 +#: 9fcfaed6b5d44c55a6666f7af39b6e3e msgid "Meaning" msgstr "意味" -#: ../../vars.rst:129 cbc92b5249ad4077afc22b2863c13d1a +#: ../../vars.rst:129 2949b53ec89740089745a91a86f8f8bb msgid "PDF_OC_ON" msgstr "" -#: ../../vars.rst:129 9430787d6b2d4d3f89d27574e9b7ac3b +#: ../../vars.rst:129 04bedb33af514509b6c30bedbe47b114 msgid "Set an OCG to ON temporarily" msgstr "一時的にOCGをONに設定します" -#: ../../vars.rst:130 24389f71baf9462590caf1667ba447df +#: ../../vars.rst:130 4c80348e5c3a4f648165764918eceaec msgid "PDF_OC_TOGGLE" msgstr "" -#: ../../vars.rst:130 ffc17e0d7ca0463a8c3168f8c801ee2c +#: ../../vars.rst:130 146b94ce0c5d4052b94ea728b7cf05cf msgid "Toggle OCG status temporarily" msgstr "OCGステータスを一時的に切り替えます" -#: ../../vars.rst:131 4f5791dba3d54be39d21a9a2f21e78f0 +#: ../../vars.rst:131 88b629a7c41f4b9ba8ef72dfd6335841 msgid "PDF_OC_OFF" msgstr "" -#: ../../vars.rst:131 435131525bde4959bcfe4a7a01780af1 +#: ../../vars.rst:131 977b6700e0a84fafa4bed9ea9115e2e3 msgid "Set an OCG to OFF temporarily" msgstr "一時的にOCGをOFFに設定します" -#: ../../vars.rst:137 25ebd17481eb41df911ba60cdd5e1a2f +#: ../../vars.rst:137 75fa410a0f1e43819577edc2279b177d msgid "PDF encryption method codes" msgstr "PDF暗号化方式コード" -#: ../../vars.rst:142 eb721f2efead42209f78c8d16dd7b5e8 +#: ../../vars.rst:142 0dc98fa47aeb477c850a169dfbc49787 msgid "PDF_ENCRYPT_KEEP" msgstr "" -#: ../../vars.rst:142 72dc293dc4624505a1003ab3a4c60a34 +#: ../../vars.rst:142 ad93d01ac8cd40b48e540af48cae695a msgid "do not change" msgstr "変更しない" -#: ../../vars.rst:143 345e18a2b67a48bbb3db1ac2153133ab +#: ../../vars.rst:143 e793fb9b2a3b451e80fd1cf718ac0a73 msgid "PDF_ENCRYPT_NONE" msgstr "" -#: ../../vars.rst:143 3625a5d98b6744c5980851d00ad54fb5 +#: ../../vars.rst:143 1aa3620babfa401c97204c155b2d5897 msgid "remove any encryption" msgstr "暗号化を解除する" -#: ../../vars.rst:144 1e11922d3a3b4e698a0916c0f690c5c8 +#: ../../vars.rst:144 a60217b47a0845d1a92460e1d91f56ec msgid "PDF_ENCRYPT_RC4_40" msgstr "" -#: ../../vars.rst:144 b10806c46099460eb44714a8d75bb0d8 +#: ../../vars.rst:144 6f4cdbdd522d462c947445aab0ce9afb msgid "RC4 40 bit" msgstr "RC4 40ビット" -#: ../../vars.rst:145 40cdba6abb994f06aa27c2695c69d008 +#: ../../vars.rst:145 16f6da906d544174ad7481a53cad1c77 msgid "PDF_ENCRYPT_RC4_128" msgstr "" -#: ../../vars.rst:145 721a20a9e9a94256a46f7cf00227de50 +#: ../../vars.rst:145 8d40afdfea4f45af888a67cced393b08 msgid "RC4 128 bit" msgstr "RC4 128ビット" -#: ../../vars.rst:146 58439ba7b0d34d658086576f2be4d164 +#: ../../vars.rst:146 668eb7572ef0467f85299de98db772f9 msgid "PDF_ENCRYPT_AES_128" msgstr "" -#: ../../vars.rst:146 2c213c58735647d4a582dcd9e1a30f3a +#: ../../vars.rst:146 0dead0f7d85343cf8806bf240e3be702 msgid "*Advanced Encryption Standard* 128 bit" msgstr "*Advanced Encryption Standard* 128ビット" -#: ../../vars.rst:147 92d5a1d15a8141b9885161c483496468 +#: ../../vars.rst:147 eb827f08580f41dfa6884be021ca8bfa msgid "PDF_ENCRYPT_AES_256" msgstr "" -#: ../../vars.rst:147 206972b21a214d4faba1ae71162107fb +#: ../../vars.rst:147 86463cfed631417d97de185e6ede3875 msgid "*Advanced Encryption Standard* 256 bit" msgstr "*Advanced Encryption Standard* 256ビット" -#: ../../vars.rst:148 00cebb2895a84fbda23a4aabb13e76fe +#: ../../vars.rst:148 7cc2750771844a20af313213e12466b9 msgid "PDF_ENCRYPT_UNKNOWN" msgstr "" -#: ../../vars.rst:148 6cc4fbbca6924cd98395956dd6ff910e +#: ../../vars.rst:148 ecdf191ea39e4dcea3a7b49000707ca4 msgid "unknown" msgstr "不明" -#: ../../vars.rst:154 921a920abbc641369bf67b4502e40c40 +#: ../../vars.rst:154 9ba92b1cac044752afe8a086846edde4 msgid "Font File Extensions" msgstr "フォントファイルの拡張子" -#: ../../vars.rst:155 f2680db76f3240e38da12670142b501b +#: ../../vars.rst:155 d05c8692b98444f19d977acf4654e2c5 msgid "" "The table show file extensions you should use when saving fontfile " "buffers extracted from a PDF. This string is returned by " @@ -351,97 +352,131 @@ msgstr "" "このテーブルは、PDFから抽出されたフォントファイルバッファを保存する際に使用すべきファイル拡張子を示しています。この文字列は、:meth:`Document.get_page_fonts`、:meth:`Page.get_fonts`、および" " :meth:`Document.extract_font` によって返されます。" -#: ../../vars.rst:158 09b9cab340ad41949e0ddd6df6ff26b3 +#: ../../vars.rst:158 10036336cad34de79b475eedb0d89264 msgid "Ext" msgstr "拡張子" -#: ../../vars.rst:158 8b985e5bdf034b2ba5fc9e35202b053d +#: ../../vars.rst:158 286a37d16191417fa1ec3d30013b9905 msgid "Description" msgstr "説明" -#: ../../vars.rst:160 7631e1aa340c4782898771dfd9af1b0f +#: ../../vars.rst:160 2ec4cb1ec4a14555b74fbfed3290a14d msgid "ttf" msgstr "" -#: ../../vars.rst:160 d2126310d14a4f92a8ea0f99ce1a21dd +#: ../../vars.rst:160 9a3d8a2bbdb74e3c9321c00f8fbb00ce msgid "TrueType font" msgstr "TrueTypeフォント" -#: ../../vars.rst:161 600b25451c3e415bb61490da386f0a10 +#: ../../vars.rst:161 d5bcadec8ad74c0493a5485e2c1cb3c3 msgid "pfa" msgstr "" -#: ../../vars.rst:161 a4df6d8b85534c759b1a9e2bf035093e +#: ../../vars.rst:161 e0e30249099043e2a8a2d092ce908af5 msgid "Postscript for ASCII font (various subtypes)" msgstr "ASCII用のPostscriptフォント(さまざまなサブタイプ)" -#: ../../vars.rst:162 53ca2c8d20cd4371a8aff95b96cb6d47 +#: ../../vars.rst:162 dce1949516af496a88009678fa1bdbb6 msgid "cff" msgstr "" -#: ../../vars.rst:162 ee682d7053d64358b839373f2e13abc1 +#: ../../vars.rst:162 6a979379a8bb493d9c0a471fb9948665 msgid "Type1C font (compressed font equivalent to Type1)" msgstr "Type1Cフォント(Type1と同等の圧縮フォント)" -#: ../../vars.rst:163 367b0ca5a5c2433e81f856bdf5972cec +#: ../../vars.rst:163 bf67e41376a74b109bebe33cb2fa217a msgid "cid" msgstr "" -#: ../../vars.rst:163 dcaa6d51718348a5bf6dbcae095aeb82 +#: ../../vars.rst:163 9630223a534d4703ac88c9eac2b049f1 msgid "character identifier font (postscript format)" msgstr "文字識別子フォント(Postscript形式)" -#: ../../vars.rst:164 0e2f190ace26485fb62e80a215f43b95 +#: ../../vars.rst:164 f6f324ea27cb4c1a9d9fb71e4ff86548 msgid "otf" msgstr "" -#: ../../vars.rst:164 b70058f43f494f88a77c4097e9286225 +#: ../../vars.rst:164 bbc8200b8cc241cf9232e2d7e9397e14 msgid "OpenType font" msgstr "OpenTypeフォント" -#: ../../vars.rst:165 0098f826d20748778b2c5cd2671791d6 +#: ../../vars.rst:165 4fa13207e2c4485b9ee155461144bc1b msgid "n/a" msgstr "" -#: ../../vars.rst:165 43eb4927c6864a1881207d6f3c55d4ce +#: ../../vars.rst:165 5bafd17a3f0841efb18a431d74469745 msgid "not extractable, e.g. :ref:`Base-14-Fonts`, Type 3 fonts and others" msgstr "抽出できない、 :ref:`PDFベース14フォント ` 、Type 3フォント、その他" -#: ../../vars.rst:171 718229ae81484c9f848555151793ba63 +#: ../../vars.rst:171 ec7137b3e4b84b3eb6805e102f418a3e msgid "Text Alignment" msgstr "テキストの配置" -#: ../../vars.rst:174 d238376d5abd4a119994dda9216e9411 +#: ../../vars.rst:174 3bbfd7ec062e46429c9b740758e870ff msgid "0 -- align left." msgstr "0 – 左揃え。" -#: ../../vars.rst:178 e54e328764c941b482878cf8d26efe0e +#: ../../vars.rst:178 7b46923a6c57440b9419e91d2a6b6c57 msgid "1 -- align center." msgstr "1 – 中央揃え。" -#: ../../vars.rst:182 84da541cab264684b6d1b6ef4c0e637e +#: ../../vars.rst:182 55454a7de8fa477582234dab9711284e msgid "2 -- align right." msgstr "2 – 右揃え。" -#: ../../vars.rst:186 972948269b2a43de8bdbeb69948ef716 +#: ../../vars.rst:186 caeb62fad8aa4f2dba31742445127af1 msgid "3 -- align justify." msgstr "3 – 両端揃え。" -#: ../../vars.rst:191 e1a78f32d73a4c45a3749d8f3d4653d3 +#: ../../vars.rst:193 f2d396fbbf8241b2bbb96e710f39179c +msgid "Font Properties" +msgstr "" + +#: ../../vars.rst:194 79137841087d4b71b3618b71d459d012 +msgid "" +"Please note that the following bits are derived from what a font has to " +"say about its properties. It may not be (and quite often is not) correct." +msgstr "" + +#: ../../vars.rst:198 99be8995e30b46a8897ade1a103ce5a8 +msgid "" +"1 -- the character or span is a superscript. This property is computed by" +" MuPDF and not part of any font information." +msgstr "" + +#: ../../vars.rst:202 ac50ee48c40445d88e3170a486932cbe +msgid "2 -- the font is italic." +msgstr "" + +#: ../../vars.rst:206 a35ac9ea04ae469a817d3e6356c9edde +msgid "4 -- the font is serifed." +msgstr "" + +#: ../../vars.rst:210 5e36edef7a9a4061876b61d1552ad213 +msgid "8 -- the font is mono-spaced." +msgstr "" + +#: ../../vars.rst:214 793a358252de4e72b691114a0476651d +msgid "16 -- the font is bold." +msgstr "" + +#: ../../vars.rst:217 c7c29302bc3847fdb257f3abff34d9d9 msgid "Text Extraction Flags" msgstr "テキスト抽出フラグ" -#: ../../vars.rst:192 61e1f1014f384282ab0be439d05c6109 +#: ../../vars.rst:218 f83abf5bbd40402890f0db614be6f339 +#, fuzzy msgid "" "Option bits controlling the amount of data, that are parsed into a " -":ref:`TextPage` -- this class is mainly used only internally in PyMuPDF." +":ref:`TextPage`." msgstr ":ref:`TextPage` に解析されるデータの量を制御するオプションビット - このクラスは、主にPyMuPDF内部でのみ使用されます。" -#: ../../vars.rst:194 6d701110f9324274a92d6bd61cf748ab +#: ../../vars.rst:220 43f62f5edc5644ef91134286b5ddbe14 +#, fuzzy msgid "" "For the PyMuPDF programmer, some combination (using Python's `|` " "operator, or simply use `+`) of these values are aggregated in the " -"`flags` integer, a parameter of all text search and text extraction " +"``flags`` integer, a parameter of all text search and text extraction " "methods. Depending on the individual method, different default " "combinations of the values are used. Please use a value that meets your " "situation. Especially make sure to switch off image extraction unless you" @@ -451,7 +486,7 @@ msgstr "" " `flags` " "整数に集約されます。個々のメソッドによっては、異なる値のデフォルトの組み合わせが使用されます。ご自身の状況に合った値を使用してください。特に、必要がない限り画像抽出をオフにしてください。パフォーマンスとメモリに対する影響が大きいです!" -#: ../../vars.rst:198 c43b668b044845b18c42c9c0c8ea1302 +#: ../../vars.rst:224 f745b0af916a4865868cb63378d7ed3b msgid "" "1 -- If set, ligatures are passed through to the application in their " "original form. Otherwise ligatures are expanded into their constituent " @@ -465,7 +500,7 @@ msgstr "" " f、f、および i " "に展開されます。デフォルトはPyMuPDFで「オン」です。MuPDFは以下の7つのリガチャに対応しています:\"ff\"、\"fi\"、\"fl\"、\"ffi\"、\"ffl\"、\"ft\"、\"st\"。" -#: ../../vars.rst:202 2a3870fe3ab743cf989c59a9cc91e5f8 +#: ../../vars.rst:228 1beb177071964f40a7555dd9dcfb5201 msgid "" "2 -- If set, whitespace is passed through. Otherwise any type of " "horizontal whitespace (including horizontal tabs) will be replaced with " @@ -474,7 +509,7 @@ msgstr "" "2 – " "設定されている場合、空白はそのまま渡されます。それ以外の場合、水平空白(水平タブを含む)のいずれかのタイプは可変幅のスペース文字に置き換えられます。デフォルトはPyMuPDFで「オン」です。" -#: ../../vars.rst:206 1238eb6d9cd442f48eb7d34191a3478b +#: ../../vars.rst:232 68845437b4ce4cc99b2247bd79dcca13 msgid "" "4 -- If set, then images will be stored in the :ref:`TextPage`. This " "causes the presence of (usually large!) binary image content in the " @@ -486,7 +521,7 @@ msgstr "" "4 – 設定されている場合、画像は :ref:`TextPage` " "に保存されます。これにより、テキスト抽出の出力に(通常は大きな)バイナリ画像コンテンツが含まれることになります。ただし、これはタイプ「blocks」、「dict」、「json」、「rawdict」、「rawjson」、「html」、および「xhtml」のテキスト抽出にのみ適用され、デフォルトです。ただし、「blocks」とともに使用される場合、画像メタデータのみが返され、画像自体は返されません。" -#: ../../vars.rst:210 98e87efe59a0481faea2ddc4ecf2571e +#: ../../vars.rst:236 0a63f2880d4048bf985562e86a0eb94c msgid "" "8 -- If set, Mupdf will not try to add missing space characters where " "there are large gaps between characters. In PDF, the creator often does " @@ -498,7 +533,7 @@ msgstr "" "設定されている場合、Mupdfは文字間の大きな間隔に欠落したスペース文字を追加しようとしません。PDFでは、作成者はしばしば次の文字の位置を指し示すためにスペースを挿入しませんが、直接の場所のアドレスを提供します。PyMuPDFのデフォルトは「オフ」です" " - したがって、スペースが生成されます。" -#: ../../vars.rst:214 2ac5c8562b694379bd37b6a3cc10c3d5 +#: ../../vars.rst:240 5cc0718f0ecb4c66aa6a721e7da94c4b msgid "" "16 -- Ignore hyphens at line ends and join with next line. Used " "internally with the text search functions. However, it is generally " @@ -515,7 +550,7 @@ msgstr "" "wrong " "results」として結合され、それに応じて更新されたバウンディングボックス(bbox):結果のスパンの文字はもはや同じy座標を持ちません。" -#: ../../vars.rst:218 f010203ab6004eb1a0c0b76430de6f9e +#: ../../vars.rst:244 17848384472243f7919897b9644924c4 msgid "" "32 -- Generate a new line for every span. Not used (\"off\") in PyMuPDF, " "but available for your use. Every line in \"dict\", \"json\", " @@ -524,230 +559,268 @@ msgstr "" "32 – " "各スパンに対して新しい行を生成します。PyMuPDFでは使用されませんが(オフです)、使用可能です。\"dict\"、\"json\"、\"rawdict\"、\"rawjson\"の各行には正確に1つのスパンが含まれます。" -#: ../../vars.rst:222 3805693fdc4648f587de66aeafeb82f8 +#: ../../vars.rst:248 619c77ac3797401f8f15d48e9a869b8c +#, fuzzy msgid "" -"64 -- If set, characters entirely outside a page's **mediabox** will be " -"ignored. This is default in PyMuPDF." +"64 -- Characters entirely outside a page's **mediabox** or contained in " +"other \"clipped\" areas will be ignored. This is default in PyMuPDF." msgstr "64 – ページのメディアボックス外にある文字は無視されます。これはPyMuPDFのデフォルトです。" -#: ../../vars.rst:226 43af947ea67e4d0698e3f4bbae44aed9 +#: ../../vars.rst:252 c5bd44858fb643b29c90dcedbc9b97ce msgid "" -"128 -- If set, use raw character codes instead of U+FFFD. This is the " -"default for **text extraction** in PyMuPDF. If you **want to detect** " -"when encoding information is missing or uncertain, toggle this flag and " -"scan for the presence of U+FFFD (= `chr(0xfffd)`) code points in the " -"resulting text." +"128 -- Use raw character codes instead of U+FFFD. This is the default for" +" **text extraction** in PyMuPDF. If you **want to detect** when encoding " +"information is missing or uncertain, toggle this flag and scan for the " +"presence of U+FFFD (= `chr(0xfffd)`) code points in the resulting text." msgstr "" -"128 -- 設定されている場合、U+FFFDの代わりに生の文字コードを使用します。これは、PyMuPDFにおける **テキスト抽出** " -"のデフォルトです。エンコーディング情報が不足しているか不確かな場合に**検出したい**場合は、このフラグを切り替えて、結果のテキストにU+FFFD" -" (= `chr(0xfffd)`)コードポイントが存在するかどうかをスキャンします。" -#: ../../vars.rst:229 3f716544d6fa4ffc80fcaccdfe870d72 +#: ../../vars.rst:256 20b2145b5f144c1fb2b16ae5beb54928 +msgid "256 -- Not supported." +msgstr "" + +#: ../../vars.rst:260 550ddd5ded6f4f60848443cd8d82d345 +msgid "" +"512 -- Ignore metric values of all fonts when computing character " +"boundary boxes -- most prominently the `ascender " +"`_ and `descender " +"`_ values. Instead, follow the " +"drawing commands of each character's glyph and compute its rectangle " +"hull. This is the smallest rectangle wrapping all points used for drawing" +" the visual appearance - see the :ref:`Shape` class for understanding the" +" background. This will especially result in individual character heights." +" For instance a (white) space will have a **bbox of height 0** (because " +"nothing is drawn) -- in contrast to the non-zero boundary box generated " +"when using font metrics. This option may be useful to cope with getting " +"meaningful boundary boxes even for fonts containing errors. Its use will " +"slow down text extraction somewhat because of the incurred computational " +"effort." +msgstr "" + +#: ../../vars.rst:262 29fa50a96c4b4750a61482a0361601b6 +msgid "" +"Note that this has no effect by default - one must also disable the " +"global quad corrections setting with " +"`pymupdf.TOOLS.unset_quad_corrections(True)`." +msgstr "" + +#: ../../vars.rst:267 7277865b5b5a42678c9305a006d97704 +msgid "1024 -- Not supported." +msgstr "" + +#: ../../vars.rst:271 4cb1830671184382bbc93ad044143ff6 +msgid "" +"2048 -- Ignore built-in differences between text appearing in e.g. PDF " +"viewers versus text stored in the PDF. See :ref:`AdobeManual`, page 615 " +"for background. If set, the **stored** (\"replacement\" text) is ignored " +"in favor of the displayed text." +msgstr "" + +#: ../../vars.rst:275 20bf6709d2844de080c1d5205cf728c6 +msgid "4096 -- Attempt to segment page into different regions." +msgstr "" + +#: ../../vars.rst:277 59ac067b7e44463d8f0fb19b1f87783b msgid "" "The following constants represent the default combinations of the above " "for text extraction and searching:" msgstr "以下の定数は、テキスト抽出と検索のための上記のデフォルトの組み合わせを表します:" -#: ../../vars.rst:233 ../../vars.rst:237 ../../vars.rst:241 ../../vars.rst:261 -#: 1b8f4d3c3a864a88b621e5f6eb29ed05 34c3bacf13424c929ee100d86930f59e -#: d81bde381b3b43d08761afe43ea6dc5e dd264103844e4a3eb274501e5b205714 +#: ../../vars.rst:281 ../../vars.rst:285 ../../vars.rst:289 ../../vars.rst:309 +#: 380a7c5f0e5d42889c3a5d034281f461 74c462ca4834489b9a0da88c2c82c756 +#: b02c43245274409697af49792303311e b4051b129792462d9c73343baea60d95 msgid "" "`TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP " -"| TEXT_CID_FOR_UNKNOWN_UNICODE`" +"| TEXT_USE_CID_FOR_UNKNOWN_UNICODE`" msgstr "" -#: ../../vars.rst:245 ../../vars.rst:249 ../../vars.rst:253 ../../vars.rst:257 -#: 12741fdffb57448cafbcf1fc3e55f15a 7dc1f5cf362a43a2a12062f475fb2b8b -#: a59651b1c41c4785b081fbdcb08378e5 fc6dcf6ae5c445d9b8bac3bb88627aa8 +#: ../../vars.rst:293 ../../vars.rst:297 ../../vars.rst:301 ../../vars.rst:305 +#: 213ae84f9e9e4c3a9cf33fe4a858f208 746d8ce37fcf45ac8770b345347b8ee2 +#: c56d9271be584382aa7d77169d65806a ea42055961404c368f89d72e6ff24025 msgid "" "`TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP " -"| TEXT_PRESERVE_IMAGES | TEXT_CID_FOR_UNKNOWN_UNICODE`" +"| TEXT_PRESERVE_IMAGES | TEXT_USE_CID_FOR_UNKNOWN_UNICODE`" msgstr "" -#: ../../vars.rst:265 a0dbba8829ba49d8b201c159e50c25ed +#: ../../vars.rst:313 b4f425a22ba344cb95039fffc59d16e0 msgid "`TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_DEHYPHENATE`" msgstr "" -#: ../../vars.rst:271 11975681fc9147eba0e7c7f85b6401af +#: ../../vars.rst:319 9f1e6c0231844a7995d5c2ac9d74aa18 msgid "Link Destination Kinds" msgstr "リンクの目的の種類" -#: ../../vars.rst:272 6811e13ba4e0470b84fd95483daf3330 +#: ../../vars.rst:320 52a8f0f028a1481f8143ba4f83fe96a1 msgid "Possible values of :attr:`linkDest.kind` (link destination kind)." msgstr ":attr:`linkDest.kind` (リンクの目的の種類)の可能な値。" -#: ../../vars.rst:276 c46fa0bfe90a4a5a86fb7d89593266c9 +#: ../../vars.rst:324 1f102b8b787148659c55c6aa63d05a45 msgid "0 -- No destination. Indicates a dummy link." msgstr "0 – 目的地なし。ダミーリンクを示します。" -#: ../../vars.rst:282 8421f2888c4c43048b2d8e63a7a564ca +#: ../../vars.rst:330 628b01a5da0243be80ffa1f45fca5b0a msgid "1 -- Points to a place in this document." msgstr "1 – このドキュメント内の場所を指します。" -#: ../../vars.rst:288 92901cae02a445469d0a7a98f832bf5b +#: ../../vars.rst:336 55a042b81e0247b692551330eec2ea72 msgid "" "2 -- Points to a URI -- typically a resource specified with internet " "syntax." msgstr "2 – URIを指します。通常はインターネット構文で指定されたリソースです。" -#: ../../vars.rst:290 23552b26bbab4a9ea43c52aff156a30e +#: ../../vars.rst:338 793a6dd92caf4a8f9c0d2f74ad716b30 msgid "" "PyMuPDF treats any external link that contains a colon and does not start" " with `file:`, as `LINK_URI`." msgstr "PyMuPDFは、コロンを含み、`file:` で始まらない任意の外部リンクを `LINK_URI` として扱います。" -#: ../../vars.rst:297 715cbe645205446ea81722e535dce3b5 +#: ../../vars.rst:345 153598660d514e7abf50c58200473ef0 msgid "3 -- Launch (open) another file (of any \"executable\" type)." msgstr "3 – 別のファイル(任意の「実行可能」タイプ)を開きます。" -#: ../../vars.rst:299 24982c8018844834b1168e98fd6555f4 +#: ../../vars.rst:347 2572f060a8be469a8f239543eee30634 msgid "" "|PyMuPDF| treats any external link that starts with `file:` or doesn't " "contain a colon, as `LINK_LAUNCH`." msgstr "PyMuPDFは、 `file:` で始まるかコロンを含まない外部リンクを `LINK_LAUNCH` として扱います。" -#: ../../vars.rst:306 7d6256db12084a20aade70c5e3fa8eda +#: ../../vars.rst:354 f99887ce5676409a941f3b146c835e70 msgid "4 -- points to a named location." msgstr "4 – 名前付きの場所を指します。" -#: ../../vars.rst:312 964db51500014369aab7a12c97ad2e3c +#: ../../vars.rst:360 4ca695a9178945d1a5c5edcec9340af9 msgid "5 -- Points to a place in another PDF document." msgstr "5 – 別のPDFドキュメント内の場所を指します。" -#: ../../vars.rst:319 ec3f565c58a144538e5d652e7f56afb8 +#: ../../vars.rst:367 2447ac8f911043d48df9f7b68a833fa6 msgid "Link Destination Flags" msgstr "リンクの目的地フラグ" -#: ../../vars.rst:321 3baf341a150149698ace5dc7d04d3fc9 +#: ../../vars.rst:369 426d4c32933f47529ea795d2cc9dd0d3 msgid "" "The rightmost byte of this integer is a bit field, so test the truth of " "these bits with the *&* operator." msgstr "この整数の最も右側のバイトはビットフィールドです。したがって、これらのビットの真偽を *&* 演算子でテストします。" -#: ../../vars.rst:325 05491c2ba4b843f9a1317f109b8db005 +#: ../../vars.rst:373 5feef71290cd4741ac4e24188b65bc22 msgid "1 (bit 0) Top left x value is valid" msgstr "1 (ビット 0) 左上の x 値が有効です" -#: ../../vars.rst:327 ../../vars.rst:333 ../../vars.rst:339 ../../vars.rst:345 -#: ../../vars.rst:351 ../../vars.rst:357 ../../vars.rst:363 -#: 0910988703b7457db139b4591b5c035e 552c19f241f346bd944e8a427c97f88b -#: a2f345a5e2984868b217f05d0c0342f4 b802a6a739874941bd30c2fef6d87690 -#: e388885577514817aefab503f2413085 e83820e994004ca5a742f0c120350fac -#: eb3cef6feb3847449b17cd6eba6820a3 +#: ../../vars.rst:375 ../../vars.rst:381 ../../vars.rst:387 ../../vars.rst:393 +#: ../../vars.rst:399 ../../vars.rst:405 ../../vars.rst:411 +#: 2fc468e70d634444b3316afec29e5d16 36f729a0d67040c5bddd732cd6807bf7 +#: 6925e6a9be744a508bf4526d1478805e bcddf9b8991c4f158a491f4ee81be612 +#: cc183df801ce45ba8b3c94d535cc0739 dfee08f9f29c45419a637f7814445640 +#: fcac1c72ce4d4d4389dda848e316c624 msgid "bool" msgstr "" -#: ../../vars.rst:331 ea8062732a7b4b348aed1f30978e4f4d +#: ../../vars.rst:379 d090868c69104be492ebdd3ece8c4225 msgid "2 (bit 1) Top left y value is valid" msgstr "2 (ビット 1) 左上の y 値が有効です" -#: ../../vars.rst:337 97567e6f80814fbc85d8b9270234a19b +#: ../../vars.rst:385 f20a0948e93043c4be3c860a7aea5b77 msgid "4 (bit 2) Bottom right x value is valid" msgstr "4 (ビット 2) 右下の x 値が有効です" -#: ../../vars.rst:343 cd1e147ac1254c2490a30c068e0c079d +#: ../../vars.rst:391 418e8b406e464b2a8a09ff48ace76f60 msgid "8 (bit 3) Bottom right y value is valid" msgstr "8 (ビット 3) 右下の y 値が有効です" -#: ../../vars.rst:349 1442c93d288d4782b7901573741eb006 +#: ../../vars.rst:397 0b96102f9a934d99bffbd50d41626cb5 msgid "16 (bit 4) Horizontal fit" msgstr "16 (ビット 4) 水平フィット" -#: ../../vars.rst:355 acce499929aa403a9917841c8818d9ce +#: ../../vars.rst:403 ba27d7c3b9944de1b5f9b9ca62246d5a msgid "32 (bit 5) Vertical fit" msgstr "32 (ビット 5) 垂直フィット" -#: ../../vars.rst:361 0941ef00a2a2499694508bd81aea5174 +#: ../../vars.rst:409 2f533e61da7243638eeccd17238f192c msgid "64 (bit 6) Bottom right x is a zoom figure" msgstr "64 (ビット 6) 右下の x はズーム値です" -#: ../../vars.rst:367 278d270e528346e9934c570cf22e3a98 +#: ../../vars.rst:415 c55ea7fa1fd643a5b9a9544ebaa50fdb msgid "Annotation Related Constants" msgstr "注釈関連の定数" -#: ../../vars.rst:368 edd57b59e554444ca2b744a9d39c521b +#: ../../vars.rst:416 3b0b11d864d442ec822894f7d0ae50fb msgid "See chapter 8.4.5, pp. 615 of the :ref:`AdobeManual` for details." msgstr "詳細については、:ref:`Adobe PDFリファレンス ` の第8.4.5章、615ページをご覧ください。" -#: ../../vars.rst:373 a4d0d9daa440416a978cb1bc57b1b97e +#: ../../vars.rst:421 1ecde3a9d7b64b169087ced43b15ad4c msgid "Annotation Types" msgstr "アノテーションタイプ" -#: ../../vars.rst:374 b80ed0b14c1c4ca99840c52bbc5d82a8 +#: ../../vars.rst:422 bd5c20d426de46f9976ae12f4432d2f7 msgid "" "These identifiers also cover **links** and **widgets**: the PDF " "specification technically handles them all in the same way, whereas " -"**MuPDF** (and PyMuPDF) treats them as three basically different types of" -" objects." +"|MuPDF| (and PyMuPDF) treats them as three basically different types of " +"objects." msgstr "" "これらの識別子は **リンク** と **ウィジェット** " -"も含みます。PDF仕様では、技術的にはこれらをすべて同じ方法で処理しますが、**MuPDF** " +"も含みます。PDF仕様では、技術的にはこれらをすべて同じ方法で処理しますが、|MuPDF| " "(およびPyMuPDF)では、基本的には異なる3つのオブジェクトタイプとして扱われます。" -#: ../../vars.rst:411 630c43ba559a493f8ba3611dda8c66cf +#: ../../vars.rst:459 aa4a6bc505df440588c37777df64fd25 msgid "Annotation Flag Bits" msgstr "注釈フラグビット" -#: ../../vars.rst:428 40a7fdf312824dca902ec573a3a908fe +#: ../../vars.rst:476 652eb560a8cd4828920bb3e96d1af25f msgid "Annotation Line Ending Styles" msgstr "注釈の線の終端スタイル" -#: ../../vars.rst:444 3fd01f25b2984cb69b07585a0fc49699 +#: ../../vars.rst:492 91a6e109a521435ab0a009b049d52473 msgid "Widget Constants" msgstr "ウィジェットの定数" -#: ../../vars.rst:449 fe515ac239984d7abeb179854c30f683 +#: ../../vars.rst:497 79858be404974621bbdf883a55cdd335 msgid "Widget Types (*field_type*)" msgstr "ウィジェットのタイプ(*field_type*)" -#: ../../vars.rst:462 4c1d8c1f0d934f3b8ece7ab6d520ac9e +#: ../../vars.rst:510 007cf2a263a5470db51e41cb81182c72 msgid "Text Widget Subtypes (*text_format*)" msgstr "テキストウィジェットのサブタイプ(*text_format*)" -#: ../../vars.rst:473 6f63d67e7a684ffca334fc3e386d1b77 +#: ../../vars.rst:521 1b59a595b14a4b53b47ed18e14dd4955 msgid "Widget flags (*field_flags*)" msgstr "ウィジェットフラグ(*field_flags*)" -#: ../../vars.rst:474 d7260a2898d34b38b799e8afd66d2fc0 +#: ../../vars.rst:522 ae069f2b2f0142bbadf75a94ae527b29 msgid "**Common to all field types**::" msgstr "**すべてのフィールドタイプに共通**:" -#: ../../vars.rst:480 a4c42326c97b4a64803b52ed805cd326 +#: ../../vars.rst:528 931fc1b0c6ec4beab0c8defc28393b89 msgid "**Text widgets**::" msgstr "**テキストウィジェット**:" -#: ../../vars.rst:490 211ae65cb0a64383a5ea488a3e055a0e +#: ../../vars.rst:538 10486d9f5a204298babec68cd00a5762 msgid "**Button widgets**::" msgstr "**ボタンウィジェット**:" -#: ../../vars.rst:497 f6ff6c5fb5dd4a75b66d02e568e7b7b2 +#: ../../vars.rst:545 0a8ec85346a94b15bf76bbf26fabeae0 msgid "**Choice widgets**::" msgstr "**チョイスウィジェット**:" -#: ../../vars.rst:510 3f726c86b2824b8eb7d489ed634ab9f3 +#: ../../vars.rst:558 7073861cbd3241e2b1ab16b85a75612a msgid "PDF Standard Blend Modes" msgstr "PDF標準ブレンドモード" -#: ../../vars.rst:512 c5a6411d678744aeb7a9b052048d37b5 +#: ../../vars.rst:560 6ccb9f3bac5c45a4a9e4d727549d8c65 msgid "For an explanation see :ref:`AdobeManual`, page 324::" msgstr "詳細については、Adobe PDFリファレンスのページ324をご覧ください:" -#: ../../vars.rst:535 ea7a5fd1f81d4bd1ba226f5e6a9e4f78 +#: ../../vars.rst:583 8226db5de8bc4cecaae39937d19979a8 msgid "Stamp Annotation Icons" msgstr "スタンプ注釈アイコン" -#: ../../vars.rst:536 c7ce94ebe09941e7995031e6c2c6618b +#: ../../vars.rst:584 ce323f567b174b05a5ee0de5dff013d7 msgid "MuPDF has defined the following icons for **rubber stamp** annotations::" msgstr "MuPDFは、ラバースタンプ注釈に次のアイコンを定義しています:" -#: ../../footer.rst:60 e002be81b5dd4cc0b539b92fcc94dd0a +#: ../../footer.rst:60 ff648a3da94e4adaa3a122627e288a1e msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 b8657e75fa4a4e2c9fcfbfa309164549 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" @@ -788,3 +861,22 @@ msgstr "" #~ "| TEXT_MEDIABOX_CLIP | TEXT_DEHYPHENATE`" #~ msgstr "" +#~ msgid "" +#~ "128 -- If set, use raw character" +#~ " codes instead of U+FFFD. This is " +#~ "the default for **text extraction** in" +#~ " PyMuPDF. If you **want to detect**" +#~ " when encoding information is missing " +#~ "or uncertain, toggle this flag and " +#~ "scan for the presence of U+FFFD (=" +#~ " `chr(0xfffd)`) code points in the " +#~ "resulting text." +#~ msgstr "" +#~ "128 -- 設定されている場合、U+FFFDの代わりに生の文字コードを使用します。これは、PyMuPDFにおける" +#~ " **テキスト抽出** " +#~ "のデフォルトです。エンコーディング情報が不足しているか不確かな場合に**検出したい**場合は、このフラグを切り替えて、結果のテキストにU+FFFD" +#~ " (= `chr(0xfffd)`)コードポイントが存在するかどうかをスキャンします。" + +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/locales/ja/LC_MESSAGES/version.mo b/docs/locales/ja/LC_MESSAGES/version.mo index 45bc34ff8..8b5ba9746 100644 Binary files a/docs/locales/ja/LC_MESSAGES/version.mo and b/docs/locales/ja/LC_MESSAGES/version.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/version.po b/docs/locales/ja/LC_MESSAGES/version.po index 6445828c6..30485d1e3 100644 --- a/docs/locales/ja/LC_MESSAGES/version.po +++ b/docs/locales/ja/LC_MESSAGES/version.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-11 21:42+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: ja\n" @@ -19,34 +19,34 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../version.rst:3 14fecfaab1d7462ca7db3bed9a24e88d +#: ../../version.rst:3 5da0b4d14ad6412dbaf1fbc368247a52 #, fuzzy msgid "" -"This documentation covers **PyMuPDF v1.24.10** features as of " -"**2024-09-02 00:00:01**." +"This documentation covers **PyMuPDF v1.25.5** features as of **2025-03-31" +" 00:00:01**." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../version.rst:5 a791a0fb3fcb472b813fb33b93260627 +#: ../../version.rst:5 65b61a5748c4422395214d229bc552fc msgid "" -"The major and minor versions of **PyMuPDF** and **MuPDF** will always be " -"the same. Only the third qualifier (patch level) may deviate from that of" -" **MuPDF**." +"The major and minor versions of |PyMuPDF| and |MuPDF| will always be the " +"same. Only the third qualifier (patch level) may deviate from that of " +"|MuPDF|." msgstr "" -"**PyMuPDF** と **MuPDF** のメジャーおよびマイナーバージョンは常に同じになります。第三の修飾子(パッチレベル)のみが " -"**MuPDF** のものと異なる場合があります。" +"|PyMuPDF| と |MuPDF| のメジャーおよびマイナーバージョンは常に同じになります。第三の修飾子(パッチレベル)のみが |MuPDF|" +" のものと異なる場合があります。" -#: ../../version.rst:7 5d97e665327d4a3f84cf075271536562 +#: ../../version.rst:7 5996bf15f5474c8a808d6e5e0885062e msgid "" "Typically PyMuPDF is released more frequently than MuPDF so it will often" " be the case that the patch level of PyMuPDF will be greater than the " "embedded MuPDF." msgstr "" -#: ../../version.rst:11 18d60688cbaf4b8a8d02a165228ce66c +#: ../../version.rst:11 1cac232b69264e9998c5745f46bc36b3 msgid "For example PyMuPDF-1.24.5 contains MuPDF-1.24.2." msgstr "" -#: ../../version.rst:13 2eed4a2fb4024f6f90262b8a7f651dd1 +#: ../../version.rst:13 2e97259ae1cb4975976ce1bf01696d3c msgid "Also see `pymupdf_version` and `mupdf_version`." msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/widget.mo b/docs/locales/ja/LC_MESSAGES/widget.mo index cd70ba7f8..89bed599c 100644 Binary files a/docs/locales/ja/LC_MESSAGES/widget.mo and b/docs/locales/ja/LC_MESSAGES/widget.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/widget.po b/docs/locales/ja/LC_MESSAGES/widget.po index 2fb0c2847..ff47e7c2f 100644 --- a/docs/locales/ja/LC_MESSAGES/widget.po +++ b/docs/locales/ja/LC_MESSAGES/widget.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,31 +19,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 c62c47e19fc341d6b5f7857fcd23a03d +#: ../../header.rst:-1 5a37e663e6e54990a2fdc7914c7b502d msgid "Artifex" msgstr "" -#: ../../header.rst:-1 e91d9ae8d1cf42fc8804ef6957fab7cd +#: ../../header.rst:-1 6ce428f055fa497abf09a94986576135 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 41dbbb2112cc44ee99d1234b1eefedc3 +#: ../../header.rst:-1 a9ada920c19e4ec593e16e678f2a50a4 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../widget.rst:7 18c0a780dfde42c3bf4e0b43d81ed3a4 +#: ../../widget.rst:7 624076b86b264de091f0e582f6640f76 msgid "Widget" msgstr "Widget (ウィジェット)" -#: ../../widget.rst:9 a1a6037ac0d74b6e89f4e94565988d0a +#: ../../widget.rst:9 ffcd4034d2e34d2fac63824314c39935 msgid "|pdf_only_class|" msgstr "PDFのみ。" -#: ../../widget.rst:11 10e206db98ec410baa7ca1150d04d720 +#: ../../widget.rst:11 b7bb6ad05187461ead0062be00f41fe6 msgid "" "This class represents a PDF Form field, also called a \"widget\". " "Throughout this documentation, we are using these terms synonymously. " @@ -52,7 +52,7 @@ msgid "" "primarily used for filling out forms." msgstr "このクラスは、PDFフォームフィールド、または「ウィジェット」とも呼ばれるものを表します。このドキュメンテーション全体で、これらの用語を同義語として使用しています。フィールドは技術的にはPDF注釈の特殊なケースであり、制限付きの権限を持つユーザーがPDFに情報を入力することを可能にします。これは主にフォームの記入に使用されます。" -#: ../../widget.rst:13 7169cabd6ed449409b06d5fa630c5165 +#: ../../widget.rst:13 f7da4535f1244c46be953370d8b27709 msgid "" "Like annotations, widgets live on PDF pages. Similar to annotations, the " "first widget on a page is accessible via :attr:`Page.first_widget` and " @@ -62,12 +62,12 @@ msgstr "" ":attr:`Page.first_widget` 経由でアクセスでき、その後のウィジェットは :attr:`Widget.next` " "プロパティ経由でアクセスできます。" -#: ../../widget.rst:15 1aed511ddcf544dab96af836990cdf00 +#: ../../widget.rst:15 6a4c5c86f7e84180a8066861d64cc4f4 msgid "" "*(Changed in version 1.16.0)* MuPDF no longer treats widgets as a subset " "of general annotations. Consequently, :attr:`Page.first_annot` and " ":meth:`Annot.next` will deliver **non-widget annotations exclusively**, " -"and be *None* if only form fields exist on a page. Vice versa, " +"and be ``None`` if only form fields exist on a page. Vice versa, " ":attr:`Page.first_widget` and :meth:`Widget.next` will only show widgets." " This design decision is purely internal to MuPDF; technically, links, " "annotations and fields have a lot in common and also continue to share " @@ -80,15 +80,15 @@ msgstr "" " および :meth:`Widget.next` " "はウィジェットのみを表示します。この設計の決定はMuPDF内部におけるものであり、技術的にはリンク、注釈、およびフィールドは多くの共通点を持ち、また(Py-)MuPDF内でコードの大部分を共有し続けています。" -#: ../../widget.rst:18 cf065bf7b1254412ae9d477d4adeb635 +#: ../../widget.rst:18 69c3ef7ceec34f689dd615ccd7d5d62e msgid "**Class API**" msgstr "クラスAPI" -#: ../../widget.rst:24 0b0acaf36dfe444d838daa08f5476da9 +#: ../../widget.rst:24 3cdb2777c88743c1b8ca2765bde92b83 msgid "*New in version 1.18.15*" msgstr "*バージョン1.18.15で新しく追加*" -#: ../../widget.rst:26 e487ae9909db409caaeb208703832e03 +#: ../../widget.rst:26 0057129f93684af88acefd31d78713cc msgid "" "Return the names of On / Off (i.e. selected / clicked or not) states a " "button field may have. While the 'Off' state usually is also named like " @@ -98,18 +98,18 @@ msgstr "" "ボタンフィールドが持つOn / Off(選択/クリックしたかどうか)状態の名前を返します。通常、 'Off'状態も同様に名前が付けられていますが、" " 'On'状態は機能的なコンテキストに関連する名前がよく付けられます。たとえば、「Yes」、「Female」などです。" -#: ../../widget.rst:28 9618fb9f93ff48b08e2a8ed1369d4d85 +#: ../../widget.rst:28 a2b4d38b7e6342619083617b782a21aa msgid "" "This method helps finding out the possible values of :attr:`field_value` " "in these cases." msgstr "このメソッドは、これらのケースで :attr:`field_value` の可能な値を調べるのに役立ちます。" -#: ../../widget.rst 019e7af10e184d71b1b2afa15e778647 -#: 89a205ea47d443ba9335949123b1a0ab +#: ../../widget.rst 5639241c379d438fb8e160cc895126f9 +#: ec887bc94866419d829a41c6e01079bc msgid "returns" msgstr "戻り値:" -#: ../../widget.rst:30 ab739091585a403d927ec45945ffba5d +#: ../../widget.rst:30 24a4790a279b4109b83baa31b0b5fdfb msgid "" "a dictionary with the names of 'On' and 'Off' for the *normal* and the " "*pressed-down* appearance of button widgets. The following example shows " @@ -118,18 +118,18 @@ msgstr "" "*normal* の 状態と *pressed-down* 状態のボタンウィジェットの 'On'と " "'Off'の名前を持つ辞書。次の例では、「選択された」値は「Male」であることが示されています:" -#: ../../widget.rst:38 6c1169d687894d8299f6cf521b194fcc +#: ../../widget.rst:38 ed578450970b4a2699c36e278392dc68 msgid "New in version 1.22.2" msgstr "新機能(バージョン1.22.2で追加)" -#: ../../widget.rst:40 6d258d0b3a834fa680e0ddc81e729325 +#: ../../widget.rst:40 174182b4e4ca45e9a99be3a220b409f8 msgid "" "Return the value of the \"ON\" state of check boxes and radio buttons. " "For check boxes this is always the value \"Yes\". For radio buttons, this" " is the value to select / activate the button." msgstr "チェックボックスとラジオボタンの「ON」状態の値を返します。チェックボックスの場合、これは常に「Yes」という値です。ラジオボタンの場合、これはボタンを選択/アクティブ化する値です。" -#: ../../widget.rst:42 c393a837dd4c4929881dadd4dd83df79 +#: ../../widget.rst:42 806816919ec246bfacec626a2c3f54cd msgid "" "the value that sets the button to \"selected\". For non-checkbox, non-" "radiobutton fields, always `None` is returned. For check boxes the return" @@ -139,19 +139,19 @@ msgstr "" "ボタンを「選択」に設定する値が返されます。非チェックボックス、非ラジオボタンフィールドの場合、常に `None` " "が返されます。チェックボックスの場合、戻り値は `True` です。ラジオボタンの場合、次の例では値が「Male」です。" -#: ../../widget.rst:49 6304288d661c4224a166307618deb700 +#: ../../widget.rst:49 335eb13c74ea49ee8bce4bb87ca2c698 msgid "" "So for check boxes and radio buttons, the recommended method to set them " "to \"selected\", or to check the state is the following:" msgstr "したがって、チェックボックスとラジオボタンの場合、それらを「選択」または状態を確認するための推奨される方法は次のとおりです。" -#: ../../widget.rst:58 84866c1bc34b47b0a2e6c77cff9bfacd +#: ../../widget.rst:58 98ebba26b9e34976bc273f6cb51ac715 msgid "" "After any changes to a widget, this method **must be used** to store them" " in the PDF [#f1]_." msgstr "ウィジェットに変更が加えられた後、これらの変更をPDFに保存するためにこのメソッドを **使用する必要があります** [#f1]_。" -#: ../../widget.rst:62 f9a6b9dad78343d7addb2797a1651d17 +#: ../../widget.rst:62 fa156aa2c78e4f1a919837db96371466 msgid "" "Reset the field's value to its default -- if defined -- or remove it. Do " "not forget to issue :meth:`update` afterwards." @@ -159,19 +159,21 @@ msgstr "" "フィールドの値をデフォルト値にリセットします。デフォルトが定義されている場合、それを削除します。その後、:meth:`update` " "を実行するのを忘れないでください。" -#: ../../widget.rst:66 b01793481fe74f07ab3df692d073c0f8 -msgid "Point to the next form field on the page. The last widget returns *None*." -msgstr "ページ上の次のフォームフィールドを指します。最後のウィジェットは *None* を返します。" +#: ../../widget.rst:66 25e74c983f2f4aa7ab7c2fa854c0c76e +msgid "" +"Point to the next form field on the page. The last widget returns " +"``None``." +msgstr "ページ上の次のフォームフィールドを指します。最後のウィジェットは ``None`` を返します。" -#: ../../widget.rst:70 9ee8f261021f4e19b24978d08ea2f69c +#: ../../widget.rst:70 b76719c2b59249c2930f6fa33e4b2722 msgid "" "A list of up to 4 floats defining the field's border color. Default value" -" is *None* which causes border style and border width to be ignored." +" is ``None`` which causes border style and border width to be ignored." msgstr "" -"フィールドの境界線の色を定義する最大4つの浮動小数点数のリストです。デフォルト値は *None* " +"フィールドの境界線の色を定義する最大4つの浮動小数点数のリストです。デフォルト値は ``None`` " "で、これにより境界線スタイルと境界線の幅が無視されます。" -#: ../../widget.rst:74 1a17db11a8e14d7a9ad985804d711217 +#: ../../widget.rst:74 8b795f4b032f4c5aa84b676b9ea65d34 msgid "" "A string defining the line style of the field's border. See " ":attr:`Annot.border`. Default is \"s\" (\"Solid\") -- a continuous line. " @@ -181,11 +183,11 @@ msgstr "" "フィールドの境界線の線スタイルを定義する文字列です。:attr:`Annot.border` を参照してください。デフォルトは \"s\" " "(\"Solid\") で、連続線です。ウィジェットを作成する際、最初の文字(大文字または小文字)のみが考慮されます。" -#: ../../widget.rst:78 881705701aff45db8437a584d11ff2cd +#: ../../widget.rst:78 d09a065ab4ec4c1791b2960690804b09 msgid "A float defining the width of the border line. Default is 1." msgstr "境界線の幅を定義する浮動小数点数です。デフォルトは1です。" -#: ../../widget.rst:82 6e2fa755e5e04704a760a8c970b11388 +#: ../../widget.rst:82 7d99b528b90540d39b723d7f076791c3 msgid "" "A list/tuple of integers defining the dash properties of the border line." " This is only meaningful if *border_style == \"D\"* and " @@ -194,68 +196,68 @@ msgstr "" "*border_style == \"D\"* であり、:attr:`border_color` " "が指定されている場合にのみ意味があります。これは、境界線のダッシュプロパティを定義する整数のリスト/タプルです。" -#: ../../widget.rst:86 d119aa1cd45a410b81c66cee83a6fe8a +#: ../../widget.rst:86 7ed44198f8164b9e9c564dd6ffcb3082 msgid "" "Python sequence of strings defining the valid choices of list boxes and " "combo boxes. For these widget types, this property is mandatory and must " "contain at least two items. Ignored for other types." msgstr "リストボックスとコンボボックスの有効な選択肢を定義するPythonシーケンスの文字列です。これらのウィジェットタイプでは、このプロパティが必須で、少なくとも2つのアイテムを含める必要があります。他のタイプでは無視されます。" -#: ../../widget.rst:90 ae8e998aa0c444b6bbfa6d0d9f45cf8a +#: ../../widget.rst:90 ffd9837719ff414d889670f7b2b970e7 msgid "" "A mandatory string defining the field's name. No checking for duplicates " "takes place." msgstr "フィールドの名前を定義する必須の文字列です。重複をチェックしません。" -#: ../../widget.rst:94 a695af8d2b3f451d822b9d74461d1327 +#: ../../widget.rst:94 6da2fbed18d64beab82cf5acdfa9b2b4 msgid "" "An optional string containing an \"alternate\" field name. Typically used" " for any notes, help on field usage, etc. Default is the field name." msgstr "「代替」フィールド名を含むオプションの文字列です。通常、フィールドの使用方法に関するメモ、ヘルプなどに使用されます。デフォルトはフィールド名です。" -#: ../../widget.rst:98 008e42f479ae476d8497850762c0afc2 +#: ../../widget.rst:98 3e5bf44c11944233a56e69ce9a4ad30c msgid "The value of the field." msgstr "フィールドの値です。" -#: ../../widget.rst:102 c7b32fdb8aef49858497b010f6c10fba +#: ../../widget.rst:102 57f036533748469793b18036e6015982 msgid "" "An integer defining a large amount of properties of a field. Be careful " "when changing this attribute as this may change the field type." msgstr "フィールドの多くのプロパティを定義する整数です。この属性を変更する際は注意してください。これはフィールドのタイプを変更する可能性があります。" -#: ../../widget.rst:106 1554dbc5f44040a8ac1822a3e46b31b2 +#: ../../widget.rst:106 6c9d94075e8748a0a87c22c1dd4b42a9 msgid "" "A mandatory integer defining the field type. This is a value in the range" " of 0 to 6. It cannot be changed when updating the widget." msgstr "フィールドタイプを定義する必須の整数です。これは0から6の範囲の値です。ウィジェットを更新する際に変更できません。" -#: ../../widget.rst:110 e51ad633bc014cab8e4867f90cca0679 +#: ../../widget.rst:110 372318f71bef45158a4257ef3dc31fe3 msgid "A string describing (and derived from) the field type." msgstr "フィールドタイプを説明する文字列(フィールドタイプから派生)。" -#: ../../widget.rst:114 98eb0ed00e19410ab45887afba49db72 +#: ../../widget.rst:114 6a4e2f4cd82547dcbdbb7ed1a032ce74 msgid "A list of up to 4 floats defining the field's background color." msgstr "フィールドの背景色を定義する、最大4つの浮動小数点数のリスト。" -#: ../../widget.rst:118 3c6397632371464eb3dbb710abeb564e +#: ../../widget.rst:118 cd5e1b967c5d420199d69a8f33daf101 msgid "The caption string of a button-type field." msgstr "ボタンタイプのフィールドのキャプション文字列。" -#: ../../widget.rst:122 8e15d8f126a34ddf9f5fef890b0c50df -msgid "A bool indicating the signing status of a signature field, else *None*." -msgstr "署名フィールドの署名ステータスを示すブール値。それ以外の場合は *None*。" +#: ../../widget.rst:122 67815a711eb94148a961ce0704652c4d +msgid "A bool indicating the signing status of a signature field, else ``None``." +msgstr "署名フィールドの署名ステータスを示すブール値。それ以外の場合は ``None``。" -#: ../../widget.rst:126 0469a1e2efcb485f86d728964f836ac5 +#: ../../widget.rst:126 623d98faf9bc4cdc8df9b945f643e22a msgid "The rectangle containing the field." msgstr "フィールドを含む矩形。" -#: ../../widget.rst:130 88d000714e604775bc2f584867423785 +#: ../../widget.rst:130 af99b2e634034ad191540968d0bd4ecb msgid "" "A list of **1, 3 or 4 floats** defining the text color. Default value is " "black (`[0, 0, 0]`)." msgstr "テキストの色を定義する、**1、3、または4つの浮動小数点数** のリスト。デフォルト値は黒 (`[0, 0, 0]`)です。" -#: ../../widget.rst:134 bf9b0472dfa840a095627866f8063d10 +#: ../../widget.rst:134 cce6169ee717445782dd147893bbcaf5 msgid "" "A string defining the font to be used. Default and replacement for " "invalid values is *\"Helv\"*. For valid font reference names see the " @@ -264,7 +266,7 @@ msgstr "" "使用するフォントを定義する文字列。デフォルトおよび無効な値の置換は *「Helv」* " "です。有効なフォント参照名については以下の表を参照してください。" -#: ../../widget.rst:138 1a6ad0e636004d5cb497740f7aa32313 +#: ../../widget.rst:138 236002b2d59149c3a2cd68c3933f48b1 msgid "" "A float defining the text :data:`fontsize`. Default value is zero, which " "causes PDF viewer software to dynamically choose a size suitable for the " @@ -273,111 +275,111 @@ msgstr "" "テキストの :data:`fontsize` " "を定義する浮動小数点数。デフォルト値はゼロで、PDFビューアソフトウェアが注釈の矩形とテキストの量に適したサイズを動的に選択します。" -#: ../../widget.rst:142 6eca99d8a68c40fb9ef4df07c71d1c2d +#: ../../widget.rst:142 1c34f05786ef46f7b714733936efd15f msgid "" "An integer defining the maximum number of text characters. PDF viewers " "will (should) not accept a longer text." msgstr "テキストの最大文字数を定義する整数。PDFビューアは(するはずです)より長いテキストを受け入れません。" -#: ../../widget.rst:146 caac12839f424dc3922fdb7c84320d9b +#: ../../widget.rst:146 e1e9a9fe04dd4386ad599c2be783506b msgid "" "An integer defining acceptable text types (e.g. numeric, date, time, " "etc.). For reference only for the time being -- will be ignored when " "creating or updating widgets." msgstr "許容可能なテキストタイプを定義する整数(例:数値、日付、時刻など)。現時点では参考用のみで、ウィジェットを作成または更新する際には無視されます。" -#: ../../widget.rst:150 0b8ee10852654746a8f50b1ad432c575 +#: ../../widget.rst:150 ae77d0438e6941818caa49a31e97dd57 msgid "The PDF :data:`xref` of the widget." msgstr "ウィジェットのPDF :data:`xref`。" #: ../../widget.rst:154 ../../widget.rst:160 ../../widget.rst:166 -#: ../../widget.rst:172 ../../widget.rst:178 4691a677e65c44d484259ad7f0cf0569 -#: 573d9c021760417fa23c617f636f93e0 5f1553f0e6eb4f19a22fad4b9e28b78e -#: e3668236cf7943d09deef47e99fb1e57 eed47c69545a42c5858b346da6db3882 +#: ../../widget.rst:172 ../../widget.rst:178 1715f560673c4c1a8e500964e658112a +#: 30d474c2165a417084dbb883fa66a96f d42fde5c387c4049aeb6608a842ee8d0 +#: dae799231271447bb14fb4751a73e0a9 f1b5525cacb94ff0875ed93b03ba657c msgid "New in version 1.16.12" msgstr "バージョン1.16.12で新登場" -#: ../../widget.rst:156 caae2d94a2df47c2bfb7d5ae5e12fd3c +#: ../../widget.rst:156 7e5d2653e4664291afdddb06b25b8d67 msgid "" "JavaScript text (unicode) for an action associated with the widget, or " -"*None*. This is the only script action supported for **button type** " +"``None``. This is the only script action supported for **button type** " "widgets." msgstr "" -"ウィジェットに関連付けられたアクション用のJavaScriptテキスト(Unicode)、または *None*。これは **ボタンタイプ** " +"ウィジェットに関連付けられたアクション用のJavaScriptテキスト(Unicode)、または ``None``。これは **ボタンタイプ** " "のウィジェットに対してサポートされる唯一のスクリプトアクションです。" -#: ../../widget.rst:162 1eaecdbbadcb41dea7b03794f34f5b55 +#: ../../widget.rst:162 3066f59272d04b3badfb7216eb5a6f38 msgid "" "JavaScript text (unicode) to be performed when the user types a key-" "stroke into a text field or combo box or modifies the selection in a " "scrollable list box. This action can check the keystroke for validity and" -" reject or modify it. *None* if not present." +" reject or modify it. ``None`` if not present." msgstr "" "JavaScriptテキスト(Unicode)は、ユーザーがテキストフィールドまたはコンボボックスにキーストロークを入力するか、スクロール可能なリストボックスの選択を変更するときに実行されるアクションです。このアクションはキーストロークの妥当性をチェックし、拒否または変更することができます。存在しない場合は" -" *None* です。" +" ``None`` です。" -#: ../../widget.rst:168 1488bfaabc784268903a84e76710999d +#: ../../widget.rst:168 6f83648a153e4db2a5c303bfa80129f9 msgid "" "JavaScript text (unicode) to be performed before the field is formatted " "to display its current value. This action can modify the field’s value " -"before formatting. *None* if not present." +"before formatting. ``None`` if not present." msgstr "" "このアクションは、フィールドが現在の値を表示するためにフォーマットされる前に、フィールドの値を変更するために実行されるJavaScriptテキスト(Unicode)です。存在しない場合は" -" *None* です。" +" ``None`` です。" -#: ../../widget.rst:174 1149c188896c4c22a0c9292eb0a3311f +#: ../../widget.rst:174 8c6c2b8b063243e289aa6bf1261a20cc msgid "" "JavaScript text (unicode) to be performed when the field’s value is " -"changed. This action can check the new value for validity. *None* if not " -"present." +"changed. This action can check the new value for validity. ``None`` if " +"not present." msgstr "" "このアクションは、フィールドの値が変更されたときに実行されるJavaScriptテキスト(Unicode)です。このアクションは新しい値の妥当性をチェックすることができます。存在しない場合は" -" *None* です。" +" ``None`` です。" -#: ../../widget.rst:180 2c6ab01285c04f13918bee90a1f03b23 +#: ../../widget.rst:180 d577aad3bc0a48ff93c19a20bc6df794 msgid "" "JavaScript text (unicode) to be performed to recalculate the value of " -"this field when that of another field changes. *None* if not present." +"this field when that of another field changes. ``None`` if not present." msgstr "バージョン1.16.12で新規追" -#: ../../widget.rst:184 ../../widget.rst:190 113b64153c08403a9595642cf812348b -#: 314f3b67d4424f60a8b0cec5a4c9473c +#: ../../widget.rst:184 ../../widget.rst:190 076a163723124ff695eabcbc6011c9ff +#: dd1a992a5bd445f0925b51350fe3612f msgid "New in version 1.22.6" msgstr "バージョン1.22.6で新規追加" -#: ../../widget.rst:186 9f0d883e51d044c2853a318e928c47a5 +#: ../../widget.rst:186 6a99da600742485683030ca0118a75ab msgid "" "JavaScript text (unicode) to be performed on losing the focus of this " -"field. *None* if not present." -msgstr "このフィールドからフォーカスを失ったときに実行されるJavaScriptテキスト(Unicode)です。存在しない場合は *None* です。" +"field. ``None`` if not present." +msgstr "このフィールドからフォーカスを失ったときに実行されるJavaScriptテキスト(Unicode)です。存在しない場合は ``None`` です。" -#: ../../widget.rst:192 6aa89a8471774875b77db3ccf6d98056 +#: ../../widget.rst:192 bb4cdc46e4a14934b8c9d9b2df8de1e5 msgid "" -"JavaScript text (unicode) to be performed on focusing this field. *None* " -"if not present." -msgstr "このフィールドにフォーカスが当たったときに実行されるJavaScriptテキスト(Unicode)です。存在しない場合は *None* です。" +"JavaScript text (unicode) to be performed on focusing this field. " +"``None`` if not present." +msgstr "このフィールドにフォーカスが当たったときに実行されるJavaScriptテキスト(Unicode)です。存在しない場合は ``None`` です。" -#: ../../widget.rst:196 088db5cda5a9469eb743cca86bfb1f62 +#: ../../widget.rst:196 e061b8c3fae847aeb2b44446c046d044 msgid "For **adding** or **changing** one of the above scripts," msgstr "上記のいずれかのスクリプトを **追加** または **変更** するには、" -#: ../../widget.rst:197 a13da8b83a1245f18b31c96d319fb400 +#: ../../widget.rst:197 c8d6bd5cc57d4e7e9769fd05983533cf msgid "" "just put the appropriate JavaScript source code in the widget attribute. " -"To **remove** a script, set the respective attribute to *None*." +"To **remove** a script, set the respective attribute to ``None``." msgstr "" -"適切なJavaScriptソースコードをウィジェット属性に配置するだけです。スクリプトを **削除する** には、該当する属性を *None* " -"に設定します。" +"適切なJavaScriptソースコードをウィジェット属性に配置するだけです。スクリプトを **削除する** には、該当する属性を ``None``" +" に設定します。" -#: ../../widget.rst:200 8200ffbf5bd440b18f2422353699302b +#: ../../widget.rst:200 90b6fe7fb9664746b9276138127be35f msgid "Button fields only support :attr:`script`." msgstr "ボタンフィールドは :attr:`script` をサポートしています" -#: ../../widget.rst:201 fa3b5a61c24543d2a01e1b9d8212cca5 -msgid "Other script entries will automatically be set to *None*." -msgstr "他のスクリプトエントリは自動的に *None* に設定されます。" +#: ../../widget.rst:201 f1c3f4a0456645b9bebdc6573503cc21 +msgid "Other script entries will automatically be set to ``None``." +msgstr "他のスクリプトエントリは自動的に ``None`` に設定されます。" -#: ../../widget.rst:203 4f330027cada4e549d8ccadabd2a319a +#: ../../widget.rst:203 116ede6258f54afab42748bf7888b1c4 msgid "" "It is worthwhile to look at `this " "`_ " "マニュアルを確認する価値があります。たとえば、日付を表すテキストフィールドを追加する場合、次のスクリプトを保存することができます。これにより、パターン互換の日付形式が確保され、サポートされているビューアで日付ピッカーが表示されます。" -#: ../../widget.rst:215 3aed533c2a4c44cc8b527dffacf1940f +#: ../../widget.rst:215 92aadfd39ff04ff992508c5287cf8f1e msgid "Standard Fonts for Widgets" msgstr "ウィジェット用の標準フォント" -#: ../../widget.rst:216 b24af75637274f58a2222e7e1c60c497 +#: ../../widget.rst:216 4f3a9738e3bc448f90a65c8f40711117 msgid "" "Widgets use their own resources object */DR*. A widget resources object " "must at least contain a */Font* object. Widget fonts are independent from" @@ -410,133 +412,133 @@ msgstr "" "ウィジェットは独自のリソースオブジェクト */DR* を使用します。ウィジェットのリソースオブジェクトには、少なくとも */Font* " "オブジェクトを含める必要があります。ウィジェットフォントはページフォントとは独立しています。現在、以下の固定参照名を使用して、14のPDFベースフォントをサポートしています。また、既存のフィールドフォントの名前でもかまいません。新しいウィジェットまたは変更されたウィジェットのテキストフォントを指定する際には、最初の表の列(大文字と小文字がサポートされています)から1つを選択するか、既存のフォームフォントの1つを選択してください。後者の場合、スペルは厳密に一致する必要があります。" -#: ../../widget.rst:218 d0bc605b86414609abb1286a4780b9cb +#: ../../widget.rst:218 925bed73c43340b182d6f65b8a574e47 msgid "" "To find out already existing field fonts, inspect the list " ":attr:`Document.FormFonts`." msgstr "既存のフィールドフォントを見つけるには、リスト :attr:`Document.FormFonts` を調べてください。" -#: ../../widget.rst:221 ed81543196604e4b870f64d851b63fee +#: ../../widget.rst:221 e3bba5d4620c4ccba5ebc11a7d9175bc msgid "**Reference**" msgstr "**参照**" -#: ../../widget.rst:221 8b7bc3f0ed444f9aaefa492fa2c1e183 +#: ../../widget.rst:221 ea453b1dcd7b4399ac82cc89c98cb502 msgid "**Base14 Fontname**" msgstr "**Base14フォント名**" -#: ../../widget.rst:223 5b8def945de44d0a9db08388c63effe1 +#: ../../widget.rst:223 4a65356cbe2b49f68b0b5304c86b75cd msgid "CoBI" msgstr "" -#: ../../widget.rst:223 a0e6837affd445329b430ee166254651 +#: ../../widget.rst:223 d219453aa72f4e40adc60ba3ed42b917 msgid "Courier-BoldOblique" msgstr "" -#: ../../widget.rst:224 bbc7b2ea3b9e4c6d9bce5acbf58ca6a1 +#: ../../widget.rst:224 ed32a0ad7b904ecd9cc84adcd5062310 msgid "CoBo" msgstr "" -#: ../../widget.rst:224 a072a31bfd924b06807cd10ffff70e2a +#: ../../widget.rst:224 fa650a7e028f455c8f4763efa725b201 msgid "Courier-Bold" msgstr "" -#: ../../widget.rst:225 b7c86b5e197b444ab5f0a213437037ba +#: ../../widget.rst:225 00ec7658b5c14c338b9e0f2dbc500a6f msgid "CoIt" msgstr "" -#: ../../widget.rst:225 9ac958149aa5499ea12751687307b4da +#: ../../widget.rst:225 58d29a1a4e82490d90700630059ff068 msgid "Courier-Oblique" msgstr "" -#: ../../widget.rst:226 7d07378550f9403b9c4575463554716c +#: ../../widget.rst:226 a6dd7d369fe148ecaf163600b06a35d7 msgid "Cour" msgstr "" -#: ../../widget.rst:226 7844ae050c4347e0908afb0d92ff0850 +#: ../../widget.rst:226 ee32dea5ed8c4814b490868e9066d9c9 msgid "Courier" msgstr "" -#: ../../widget.rst:227 f670957f564c4ded84798b09860ac25f +#: ../../widget.rst:227 5b789b2cf2e84e10bde2056d4d1b3537 msgid "HeBI" msgstr "" -#: ../../widget.rst:227 0604a805f09c4c929113d17f6d148981 +#: ../../widget.rst:227 495ab1b7848f4554afdc4c8e35207c9a msgid "Helvetica-BoldOblique" msgstr "" -#: ../../widget.rst:228 be98d598af5f4c7fa572c19c92846568 +#: ../../widget.rst:228 2c2db59156584b3191aea75dfb529469 msgid "HeBo" msgstr "" -#: ../../widget.rst:228 e4368d26e4bb44af9a1011570cde183c +#: ../../widget.rst:228 659b01998b6145aeb08c312004abe053 msgid "Helvetica-Bold" msgstr "" -#: ../../widget.rst:229 c0ebf7c681324abb9e53398e197cf3ce +#: ../../widget.rst:229 8e03594c420e4421a42a1d9425141257 msgid "HeIt" msgstr "" -#: ../../widget.rst:229 a5a06147f26344c5994a0b2419fc70eb +#: ../../widget.rst:229 e29e8c9d103a4790ade38a5873b33a4a msgid "Helvetica-Oblique" msgstr "" -#: ../../widget.rst:230 8c140773b409467f8953a86db6ccefff +#: ../../widget.rst:230 9d04f0ae163e4e10ba656490ddb685b5 msgid "Helv" msgstr "" -#: ../../widget.rst:230 fb70a657e883401e917316986e28fce3 +#: ../../widget.rst:230 7b85ed55f7b641f790198218bef9c00d msgid "Helvetica **(default)**" msgstr "Helvetica **(デフォルト)**" -#: ../../widget.rst:231 017a55a509a84396bacb6465fc6a2b3c +#: ../../widget.rst:231 06febf78ccf14635a504879611ab6c11 msgid "Symb" msgstr "" -#: ../../widget.rst:231 4ddfea5572d944518db3d9b559c1f02a +#: ../../widget.rst:231 8715177d19f74536aec49ff8dbd7542a msgid "Symbol" msgstr "" -#: ../../widget.rst:232 4964b6ad8f8f40a381fe8b73f9e7090f +#: ../../widget.rst:232 52e1e542dad742bd896b23da17169e27 msgid "TiBI" msgstr "" -#: ../../widget.rst:232 dd7fd614ddc2443c85762b6f8e0652c1 +#: ../../widget.rst:232 6a07cf98db214d95bec8c16b5555ef06 msgid "Times-BoldItalic" msgstr "" -#: ../../widget.rst:233 1bcacbd0f02f4a9b83b9457b3a90909e +#: ../../widget.rst:233 ceccd48998684f63b5c60a5cd2f6b313 msgid "TiBo" msgstr "" -#: ../../widget.rst:233 cef6e16624974d01a3ad8007a7b22276 +#: ../../widget.rst:233 f103cbe541d24335990d01e7b36e7e3d msgid "Times-Bold" msgstr "" -#: ../../widget.rst:234 8b316ad4062b4c5eb3371504200f1186 +#: ../../widget.rst:234 ce170947a01b4642bd4f7f6672ae124f msgid "TiIt" msgstr "" -#: ../../widget.rst:234 04711a55506d470b9af7626ec60e2822 +#: ../../widget.rst:234 f475881097734d41bf682dfabdf1f532 msgid "Times-Italic" msgstr "" -#: ../../widget.rst:235 7c56bfd4d00e471b8fa6702131cf667f +#: ../../widget.rst:235 bec22af268124b0b95857a3c54d8e206 msgid "TiRo" msgstr "" -#: ../../widget.rst:235 9f387375233a41b582c39fd654db07f1 +#: ../../widget.rst:235 4c111eb1e9d44136902781dd26427493 msgid "Times-Roman" msgstr "" -#: ../../widget.rst:236 af3dc076dbc34892bc4d885d996eccfe +#: ../../widget.rst:236 bcd602ef00304eaab0ceb263267a1472 msgid "ZaDb" msgstr "" -#: ../../widget.rst:236 40dcc8d8a2fb48b2b97bd9cebe5cf725 +#: ../../widget.rst:236 6db1a28d39f5427386471d41ca17e8e8 msgid "ZapfDingbats" msgstr "" -#: ../../widget.rst:239 cd21cadb4a14420d86303bdda33e4b9b +#: ../../widget.rst:239 ab6b8a8825d54d52a87cb2bb36646531 msgid "" "You are generally free to use any font for every widget. However, we " "recommend using *ZaDb* (\"ZapfDingbats\") and :data:`fontsize` 0 for " @@ -547,37 +549,37 @@ msgstr "" "(「ZapfDingbats」)フォントと :data:`fontsize` " "0を使用することをお勧めします。典型的なビューアは、フィールドの四角形をクリックすると正しくサイズ調整されたチェックマークを配置します。" -#: ../../widget.rst:242 395c4bb3c8ec435289937be1e5f193eb +#: ../../widget.rst:242 55e2525d7b0b440698e50964bd51993a msgid "Supported Widget Types" msgstr "対応ウィジェットの種類" -#: ../../widget.rst:243 d18b2c06b2564821a8aa146e9d33c351 +#: ../../widget.rst:243 5286f138c8a544d5adcc8d3a9f844238 msgid "" "PyMuPDF supports the creation and update of many, but not all widget " "types." msgstr "PyMuPDFは、多くのウィジェットタイプの作成および更新をサポートしていますが、すべてのウィジェットタイプには対応していません。" -#: ../../widget.rst:245 d0fb1ed57de44229a0ebf20eb5aa3ac3 +#: ../../widget.rst:245 11633720f7174322aaba6a6b80395861 msgid "text (`PDF_WIDGET_TYPE_TEXT`)" msgstr "テキスト(`PDF_WIDGET_TYPE_TEXT`)" -#: ../../widget.rst:246 65bc661a5fe343c2a26c9176e904d7b0 +#: ../../widget.rst:246 c7d256722a2840788fcc778a30b0e581 msgid "push button (`PDF_WIDGET_TYPE_BUTTON`)" msgstr "プッシュボタン(`PDF_WIDGET_TYPE_BUTTON`)" -#: ../../widget.rst:247 e4ca245ef723411ba2ae9a24f397d9aa +#: ../../widget.rst:247 e5c912ce96bc48299e4c40f6d77cc040 msgid "check box (`PDF_WIDGET_TYPE_CHECKBOX`)" msgstr "チェックボックス(`PDF_WIDGET_TYPE_CHECKBOX`)" -#: ../../widget.rst:248 5316e9279cde4c6ab0c4b0e04a9dcc70 +#: ../../widget.rst:248 1b23be72c1d04f10b82aeddd9b414ffb msgid "combo box (`PDF_WIDGET_TYPE_COMBOBOX`)" msgstr "コンボボックス(`PDF_WIDGET_TYPE_COMBOBOX`)" -#: ../../widget.rst:249 a2c3315c980b412984167a7255ea8f61 +#: ../../widget.rst:249 ecf203e0683d4b0aa6d5f5d1500555b0 msgid "list box (`PDF_WIDGET_TYPE_LISTBOX`)" msgstr "リストボックス(`PDF_WIDGET_TYPE_LISTBOX`)" -#: ../../widget.rst:250 21a1e195603f44d598afd42bdf27d35a +#: ../../widget.rst:250 74fed154e4164d12bd5b68ca6a25e924 #, fuzzy msgid "" "radio button (`PDF_WIDGET_TYPE_RADIOBUTTON`): PyMuPDF does not currently " @@ -596,15 +598,15 @@ msgstr "" " `True` または `field.on_state()` を割り当てることができます。ボタンの選択解除は、`False` " "を割り当てることによって行う必要があります。" -#: ../../widget.rst:251 beea05a8593a476c95b2c625735d5c44 +#: ../../widget.rst:251 0b9e92d2051f4a8aaf27d9c3bf996b80 msgid "signature (`PDF_WIDGET_TYPE_SIGNATURE`) **read only**." msgstr "署名(`PDF_WIDGET_TYPE_SIGNATURE`)は **読み取り専用です** 。" -#: ../../widget.rst:254 bfe12a5d7f064a02a24a8df54075f1d0 +#: ../../widget.rst:254 3e45d7c9b8ac4c2d99e22048c692e363 msgid "Footnotes" msgstr "脚注" -#: ../../widget.rst:255 e64b397040eb40c6b4fc0a2bf466a2dd +#: ../../widget.rst:255 d512795cfb164d92907502576f225590 msgid "" "If you intend to re-access a new or updated field (e.g. for making a " "pixmap), make sure to reload the page first. Either close and re-open the" @@ -614,11 +616,10 @@ msgstr "" "新しいまたは更新されたフィールドに再アクセスする意図がある場合(たとえば、ピクセルマップを作成する場合)、まずページを再読み込むことを確認してください。文書を閉じて再度開くか、別のページを読み込むか、または単に" " `page = doc.reload_page(page)` を実行してください" -#: ../../footer.rst:60 b99423e9a1104821a57723da42584bc3 +#: ../../footer.rst:60 c0063d35541741e5b2e52915f1014212 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 56ddc000d5674222a62c07614cac90e5 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/xml-class.mo b/docs/locales/ja/LC_MESSAGES/xml-class.mo index d8c473d05..2974a169a 100644 Binary files a/docs/locales/ja/LC_MESSAGES/xml-class.mo and b/docs/locales/ja/LC_MESSAGES/xml-class.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/xml-class.po b/docs/locales/ja/LC_MESSAGES/xml-class.po index ec8ee2cbb..a15e9e7be 100644 --- a/docs/locales/ja/LC_MESSAGES/xml-class.po +++ b/docs/locales/ja/LC_MESSAGES/xml-class.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 14:46+0000\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,31 +19,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 296acac2430a4acb95babbe8059d890f +#: ../../header.rst:-1 35b2e14fdbf9456f870ea5e07c6a1abe msgid "Artifex" msgstr "" -#: ../../header.rst:-1 e629737f67ec46fc90214bfba617ee99 +#: ../../header.rst:-1 9c383ee007cb459a8f5ce0a78b556be8 msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 0400c673f5344ffbb4058ff9e040e0f2 +#: ../../header.rst:-1 7207641edba74fb79cd09bd543f88a77 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../xml-class.rst:7 b3de26d70edc4e13af4d8b5ba5b608ed +#: ../../xml-class.rst:7 5a1acd7449794938872c81139fa8acd0 msgid "Xml" msgstr "" -#: ../../xml-class.rst:11 5013022e2fb5403d806ddeb505d14686 +#: ../../xml-class.rst:11 4ee590d80c2745afaad733bc8ba82e1d msgid "New in v1.21.0" msgstr "v1.21.0で新たに追加" -#: ../../xml-class.rst:13 9b91f192fe714e06a4352de677a55892 +#: ../../xml-class.rst:13 8fa4f25d9d5d4b7ea94cc3b663b67d4c msgid "" "This represents an HTML or an XML node. It is a helper class intended to " "access the DOM (Document Object Model) content of a :ref:`Story` object." @@ -51,7 +51,7 @@ msgstr "" "Xmlクラスは、HTMLまたはXMLノードを表します。これは、:ref:`Story` オブジェクトのDOM(Document Object " "Model)コンテンツにアクセスするためのヘルパークラスです。" -#: ../../xml-class.rst:15 1031c761eae2496b9487063318247c79 +#: ../../xml-class.rst:15 e5105e52125246098e3b455ef2776456 msgid "" "There is no need to ever directly construct an :ref:`Xml` object: after " "creating a :ref:`Story`, simply take :attr:`Story.body` -- which is an " @@ -60,465 +60,466 @@ msgstr "" ":ref:`Xml` オブジェクトを直接構築する必要はありません。:ref:`Story` を作成した後、単に " ":attr:`Story.body` を取得し(これはXmlノードです)、それを使用してストーリーのDOMを操作できます。" -#: ../../xml-class.rst:19 19c764c1c8e14ce4b032628fb106cbe5 +#: ../../xml-class.rst:19 086ba76b6eaa4206b74c6b525b2ae70b msgid "**Method / Attribute**" msgstr "**メソッド/属性**" -#: ../../xml-class.rst:19 fe5243cd99cb431f8ebdd73ae37fc597 +#: ../../xml-class.rst:19 9b744e4fa0694c9986e2250f2278784d msgid "**Description**" msgstr "**説明**" -#: ../../xml-class.rst:21 81d3f25413b74e3db13def07fa949d6c +#: ../../xml-class.rst:21 f46174ffaec14c09984d82014f3fc9a4 msgid ":meth:`~.add_bullet_list`" msgstr "" -#: ../../xml-class.rst:21 b6bb39685adc4920a5a73190a6453858 +#: ../../xml-class.rst:21 eefa1933e3b5485eb89f2e53127bcbf1 msgid "Add a :htmlTag:`ul` tag - bulleted list, context manager." msgstr ":htmlTag:`ul` タグを追加します - 箇条書きリスト、コンテキストマネージャ。" -#: ../../xml-class.rst:22 52f3b9e8b41943dea80380b4f4ca1a77 +#: ../../xml-class.rst:22 16936bcd25534da28940c85397594734 msgid ":meth:`~.add_codeblock`" msgstr "" -#: ../../xml-class.rst:22 87056210553742afa7275574aa980b61 +#: ../../xml-class.rst:22 fcf17dab1d8645fe9307bbaad85e9a78 msgid "Add a :htmlTag:`pre` tag, context manager." msgstr ":htmlTag:`pre` タグを追加します、コンテキストマネージャ。" -#: ../../xml-class.rst:23 8039ac7b64b74fc1ace0a3a04f3a2aae +#: ../../xml-class.rst:23 103a3a5af0f14cd1924448b542f62b6b msgid ":meth:`~.add_description_list`" msgstr "" -#: ../../xml-class.rst:23 786d958850b04e329ff9a2e1a0e90d5c +#: ../../xml-class.rst:23 e2f66dd80053480e97b4eeeb1ff42a9c msgid "Add a :htmlTag:`dl` tag, context manager." msgstr ":htmlTag:`dl` タグを追加します、コンテキストマネージャ。" -#: ../../xml-class.rst:24 3afeb30892844ff1a43aec509cd35103 +#: ../../xml-class.rst:24 b041d519f2b64e188188cddb8b2f4e9b msgid ":meth:`~.add_division`" msgstr "" -#: ../../xml-class.rst:24 3f7a2df72c2c4aacacda2ff0cedcb986 +#: ../../xml-class.rst:24 31129830737949a8bb370681ecfd4d06 msgid "add a :htmlTag:`div` tag (renamed from “section”), context manager." msgstr ":htmlTag:`div` タグを追加します(「section」と名前変更)、コンテキストマネージャ。" -#: ../../xml-class.rst:25 f307a60da478453b8dee7372a5bd0775 +#: ../../xml-class.rst:25 da7da028486141f58cf9c5a7952e1ba0 msgid ":meth:`~.add_header`" msgstr "" -#: ../../xml-class.rst:25 aeb3afc97dc44b7f8b31d39f7ceca02c +#: ../../xml-class.rst:25 228124168ce64130ad9d0ff5b13646e0 msgid "Add a header tag (one of :htmlTag:`h1` to :htmlTag:`h6`), context manager." msgstr "headerタグ(:htmlTag:`h1` から :htmlTag:`h6` のいずれか)を追加します、コンテキストマネージャ。" -#: ../../xml-class.rst:26 3adc2d1525c0435ea783160b69f4fefe +#: ../../xml-class.rst:26 806d8bfb5b3b4ce397764e9d4a0dc1d8 msgid ":meth:`~.add_horizontal_line`" msgstr "" -#: ../../xml-class.rst:26 cdfa333503d54a24a706d95ea551ba6f +#: ../../xml-class.rst:26 c07169b784924633a5e1fd68c8af798c msgid "Add a :htmlTag:`hr` tag." msgstr ":htmlTag:`hr` タグを追加します。" -#: ../../xml-class.rst:27 fc547f0808f44617a43a5387cc0a285d +#: ../../xml-class.rst:27 5a73b0a8f50a496691126bd9d77a5637 msgid ":meth:`~.add_image`" msgstr "" -#: ../../xml-class.rst:27 9b741a151d614af881c4cf0f5eb29c75 +#: ../../xml-class.rst:27 340cf98f4f3f4e4a84c228fd7be2e4d6 msgid "Add a :htmlTag:`img` tag." msgstr ":htmlTag:`img` タグを追加します。" -#: ../../xml-class.rst:28 910a5d4e8e28461ebf10e93ea0768165 +#: ../../xml-class.rst:28 d158603be675421a8b7f39bb5ff0a586 msgid ":meth:`~.add_link`" msgstr "" -#: ../../xml-class.rst:28 0ac282dd6f34451285057893d36ee0d8 +#: ../../xml-class.rst:28 339c28e41d7e44558a1e9b671ba9ef54 msgid "Add a :htmlTag:`a` tag." msgstr ":htmlTag:`a` タグを追加します。" -#: ../../xml-class.rst:29 3c424d2756d6417abfbee088d6d60aea +#: ../../xml-class.rst:29 7f6b79bf740d49b1932cf6a6a6576758 msgid ":meth:`~.add_number_list`" msgstr "" -#: ../../xml-class.rst:29 4c1b652e42d645ffb8ab67e19216b6cf +#: ../../xml-class.rst:29 0c01f30a42cf4468b8213216a1b3297c msgid "Add a :htmlTag:`ol` tag, context manager." msgstr ":htmlTag:`ol` タグを追加します、コンテキストマネージャ。" -#: ../../xml-class.rst:30 89618e939cda4a569dc4a0786192d14e +#: ../../xml-class.rst:30 8f9f02ea8c414d29a83d318465a0ff48 msgid ":meth:`~.add_paragraph`" msgstr "" -#: ../../xml-class.rst:30 b18f51f85ea74b5c88862aaaac1c778c +#: ../../xml-class.rst:30 253c26552e274fbeb3da81a3470eec14 msgid "Add a :htmlTag:`p` tag." msgstr ":htmlTag:`p` タグを追加します。" -#: ../../xml-class.rst:31 85535521eb3a4250b51f3f74ed18fa29 +#: ../../xml-class.rst:31 b2d6acd206bb4cb2a8f6be0b5197c0d8 msgid ":meth:`~.add_span`" msgstr "" -#: ../../xml-class.rst:31 d5a4345f08b34b289d30762e009902a2 +#: ../../xml-class.rst:31 98fe31d20e7a4ae8af4eba0928d53dd1 msgid "Add a :htmlTag:`span` tag, context manager." msgstr ":htmlTag:`span` タグを追加します。コンテキストマネージャーです。" -#: ../../xml-class.rst:32 01160e5a1aed4befb59b2d946d7ec706 +#: ../../xml-class.rst:32 50600afc53a74e6c80d8b4eef6b2304e msgid ":meth:`~.add_subscript`" msgstr "" -#: ../../xml-class.rst:32 5538c3781b414db78a23569c7945cef5 +#: ../../xml-class.rst:32 c9cb764e916a4b27afb3c18ae5983896 msgid "" "Add subscript text(:htmlTag:`sub` tag) - inline element, treated like " "text." msgstr "添字テキスト(:htmlTag:`sub` タグ)を追加します。行内要素で、テキストのように扱われます。" -#: ../../xml-class.rst:33 519e08b13b2540d5998a7e62aabaa021 +#: ../../xml-class.rst:33 b72843ab592f40e8877c99fe4c941dcb msgid ":meth:`~.add_superscript`" msgstr "" -#: ../../xml-class.rst:33 332102c1792b441299bd029455b0b24b +#: ../../xml-class.rst:33 3630b21203814ea190918432f1ca2417 msgid "" "Add subscript text (:htmlTag:`sup` tag) - inline element, treated like " "text." msgstr "上付きテキスト(:htmlTag:`sup` タグ)を追加します。行内要素で、テキストのように扱われます。" -#: ../../xml-class.rst:34 a9f834d9d3444fc5ad6b2475631d92bf +#: ../../xml-class.rst:34 69e9ce07a81841c280b49fa28bd70c97 msgid ":meth:`~.add_code`" msgstr "" #: ../../xml-class.rst:34 ../../xml-class.rst:35 ../../xml-class.rst:36 -#: ../../xml-class.rst:37 3cbd1256a0ab42a590872ceb88d1fde3 -#: 4e81016e770649ffb73502c1d5ba11f0 775d2d1c73dc40c0a4e8db66578b25d9 -#: e4b773105a634eb091fa24047578eb5a +#: ../../xml-class.rst:37 5c6747963ef74d38b09f3a6fbd934145 +#: 8cd903b064c74812942fc2b54fcb182d aa212076d95d4d34aca0fedfba075d7c +#: bbf8c37a914547df93d38bbff33c7496 msgid "Add code text (:htmlTag:`code` tag) - inline element, treated like text." msgstr "コードテキスト(:htmlTag:`code` タグ)を追加します。行内要素で、テキストのように扱われます。" -#: ../../xml-class.rst:35 bf2e2b687ead4e3b9231143383c1178f +#: ../../xml-class.rst:35 ed457783f87b4432965ba520310e2912 msgid ":meth:`~.add_var`" msgstr "" -#: ../../xml-class.rst:36 684bb42dbaab409895640baeca17a995 +#: ../../xml-class.rst:36 baa6b54b7dec48428d61ef058714e1c8 msgid ":meth:`~.add_samp`" msgstr "" -#: ../../xml-class.rst:37 d729ae36103f4f5a9a6542eb8fc0bb59 +#: ../../xml-class.rst:37 2e681286c7934f9e98e30aeed8f1e058 msgid ":meth:`~.add_kbd`" msgstr "" -#: ../../xml-class.rst:38 5e5a8edab0304b6c84a066e9ff353bf1 +#: ../../xml-class.rst:38 c90afbfd1f2a4432aa57f469ce1aa9c3 msgid ":meth:`~.add_text`" msgstr "" #: ../../xml-class.rst:38 ../../xml-class.rst:162 -#: 58bf67df5e1d4051aa07851fac3bb304 a958357715bf49db81db825b68dd3d4e -msgid "Add a text string. Line breaks `\\n` are honored as :htmlTag:`br` tags." +#: e05cf6e5226b4f768bfb698de671c8db fdddcc02af0b4c43a986178f7ab86439 +#, fuzzy +msgid "Add a text string. Line breaks ``\\n`` are honored as :htmlTag:`br` tags." msgstr "テキスト文字列を追加します。改行 ``\\n`` は :htmlTag:`br` タグとして認識されます。" -#: ../../xml-class.rst:39 1fa1ed10fcad496fba63a9acbd408698 +#: ../../xml-class.rst:39 5ae611e247354be1a46cad16dd7fdf40 msgid ":meth:`~.append_child`" msgstr "" -#: ../../xml-class.rst:39 3afb93fbcf534da689ee42692aacefcd +#: ../../xml-class.rst:39 f501e0b055984ba48721852e2de6968d msgid "Append a child node." msgstr "子ノードを追加します。" -#: ../../xml-class.rst:40 df4ee7b42ef249a39dd1d1bfded80141 +#: ../../xml-class.rst:40 25340d7a99fc4ccf860933df50d0ebec msgid ":meth:`~.clone`" msgstr "" -#: ../../xml-class.rst:40 ea753a7e638d433aaaf64fe7332b4c21 +#: ../../xml-class.rst:40 c331f277124c4ee3b8a1e9037493a3db msgid "Make a copy if this node." msgstr "このノードのコピーを作成します。" -#: ../../xml-class.rst:41 218d557d863642ec9841fdb94504e332 +#: ../../xml-class.rst:41 89bd772f48204020b60419c2db9d5bff msgid ":meth:`~.create_element`" msgstr "" -#: ../../xml-class.rst:41 d24145a924454105bd1686200a9434ad +#: ../../xml-class.rst:41 405cddf85d9c49dd8e5b9cd0fcfa855d msgid "Make a new node with a given tag name." msgstr "指定されたタグ名で新しいノードを作成します。" -#: ../../xml-class.rst:42 b42faafe21bc4d9bbb46137ca5e2fee7 +#: ../../xml-class.rst:42 b521f73a8f764b0f87ea954af8981b37 msgid ":meth:`~.create_text_node`" msgstr "" #: ../../xml-class.rst:42 ../../xml-class.rst:306 -#: 9936afee82994e3a92873afa75b87c74 fa7b9e5b696a4b8aa1ab37f0018ac2ff +#: 36b72c94c0534f59897e7d90525f00ab dfd89d799b2a49de8a00c1c68015628f msgid "Create direct text for the current node." msgstr "現在のノードに直接テキストを作成します。" -#: ../../xml-class.rst:43 80438dd735064d739ad9e3bec0085e09 +#: ../../xml-class.rst:43 fe2c4c6a496e4c30a74892bf305be0bf msgid ":meth:`~.find`" msgstr "" -#: ../../xml-class.rst:43 2454baab7d4f41228181c7b76233f956 +#: ../../xml-class.rst:43 318cef4b3a694140908577091226c3e3 msgid "Find a sub-node with given properties." msgstr "指定されたプロパティを持つサブノードを検索します。" -#: ../../xml-class.rst:44 d1daa2bbddd6431ba7780d1850d33b27 +#: ../../xml-class.rst:44 a453fbff3b22420db8f0c51be152f8d6 msgid ":meth:`~.find_next`" msgstr "" -#: ../../xml-class.rst:44 c6ba1311ca9c4cd89291e3b47fbbae63 +#: ../../xml-class.rst:44 8a60922fc34041dfa5e21d0caa6fac06 msgid "Repeat previous \"find\" with the same criteria." msgstr "前回の「find」と同じ条件で繰り返します。" -#: ../../xml-class.rst:45 6e0e533a16f94a35ac186bc525d27115 +#: ../../xml-class.rst:45 e198f0bc22b944d48e40dc5c38223e9b msgid ":meth:`~.insert_after`" msgstr "" -#: ../../xml-class.rst:45 974329517f2e4f9f9f0e48ccd9dddb1c +#: ../../xml-class.rst:45 8f66fccc674d4dd8ab65c02ac8ba24fc msgid "Insert an element after current node." msgstr "現在のノードの後に要素を挿入します。" -#: ../../xml-class.rst:46 a1ab70e4a4f741b6a18db8773798a318 +#: ../../xml-class.rst:46 9d6b713c56884ee1b369e276ec5102a7 msgid ":meth:`~.insert_before`" msgstr "" -#: ../../xml-class.rst:46 88740137ac7c42ce9d70e8c7136acd14 +#: ../../xml-class.rst:46 ae54a30b8bcf44daa6da5370718a075b msgid "Insert an element before current node." msgstr "現在のノードの前に要素を挿入します。" -#: ../../xml-class.rst:47 1c22cb0b8cb140bc98b85bbe55668320 +#: ../../xml-class.rst:47 e9116568aee3452182bda7d5810abf1e msgid ":meth:`~.remove`" msgstr "" -#: ../../xml-class.rst:47 602e3944a2d7454fabf32319b9c04571 +#: ../../xml-class.rst:47 64bec43c81d140e9bb69363bbdaa051c msgid "Remove this node." msgstr "このノードを削除します。" -#: ../../xml-class.rst:48 ae2bcf93c3bc4963bd5b07924422f482 +#: ../../xml-class.rst:48 1ac7caa0aab541d2b460ac445585c6c7 msgid ":meth:`~.set_align`" msgstr "" -#: ../../xml-class.rst:48 69ffb24403904d2aa67649a57b599386 +#: ../../xml-class.rst:48 ac6a6fbe13044fd787cd15a2670459ef msgid "Set the alignment using a CSS style spec. Only works for block-level tags." msgstr "CSS スタイル仕様を使用して配置を設定します。ブロックレベルのタグにのみ適用されます。" -#: ../../xml-class.rst:49 fa79d8d7eecc43a08f285b67d70c1a11 +#: ../../xml-class.rst:49 2c4b7b6457d4484a92058c1de4270fe9 msgid ":meth:`~.set_attribute`" msgstr "" #: ../../xml-class.rst:49 ../../xml-class.rst:172 -#: 1307df1d50464a6081ac5b82135f9d1c 2effd8a8b0414f9e84019d3be3ca8a3c +#: 804a76ddd5074a59b8d94661b6941469 e0a54f2af7784bddb2c2e0baf1536f26 msgid "Set an arbitrary key to some value (which may be empty)." msgstr "任意のキーに値(空である可能性があります)を設定します。" -#: ../../xml-class.rst:50 477a7a09b8fe421ea3e44c506e7843de +#: ../../xml-class.rst:50 fa0b42cca1304379b0bcfebdc442dd15 msgid ":meth:`~.set_bgcolor`" msgstr "" #: ../../xml-class.rst:50 ../../xml-class.rst:199 -#: 8a986926f5ee44b3a51490f4f275da20 f0dbb78ea34a456686fea9cc03a212f3 +#: 63b3f2fe208b457ab9f31e92c5353ce8 bdaa46d0f4da43fca01a888db16337c7 msgid "Set the background color. Only works for block-level tags." msgstr "背景色を設定します。ブロックレベルのタグにのみ適用されます。" -#: ../../xml-class.rst:51 35b521c466a845599d605d96a7ee3962 +#: ../../xml-class.rst:51 ec6d2db5fec44f689ad6be9b934f0a82 msgid ":meth:`~.set_bold`" msgstr "" #: ../../xml-class.rst:51 ../../xml-class.rst:205 -#: 70b544aa9c12417799af06c6d5b1bf1b be969f24fc2c49399d2d69806d2cd237 +#: 9e58087d6ecb42dab3894c28babdec5b bdc6a779999c4686ac0ffe57b93a8bd7 msgid "Set bold on or off or to some string value." msgstr "太字をオンまたはオフに設定するか、ある文字列の値に設定します。" -#: ../../xml-class.rst:52 d2848aa9342146edb7cbe29fc665df80 +#: ../../xml-class.rst:52 de15508d8d384d9da5d0b8cd2b1b780c msgid ":meth:`~.set_color`" msgstr "" -#: ../../xml-class.rst:52 1d8f3eaa0cf44625919ca83d5a8da567 +#: ../../xml-class.rst:52 9189331756f9457b9a92c047923b268d msgid "Set text color." msgstr "テキストの色を設定します。" -#: ../../xml-class.rst:53 27722e7714f340b98c94e2bac412877b +#: ../../xml-class.rst:53 9ac5e040ad994771a04fa353c7930b81 msgid ":meth:`~.set_columns`" msgstr "" -#: ../../xml-class.rst:53 9f2c831a15b341bab917d63dd4e9bdad +#: ../../xml-class.rst:53 5e49161f1d2d43c889352cd9ff8edfc8 msgid "Set the number of columns. Argument may be any valid number or string." msgstr "列数を設定します。引数は任意の有効な数値または文字列である必要があります。" -#: ../../xml-class.rst:54 bc241ab90bf741f6b8599f0cb141cf46 +#: ../../xml-class.rst:54 09f99796e853445c8dcf98822e1ac0f7 msgid ":meth:`~.set_font`" msgstr "" -#: ../../xml-class.rst:54 6f9e3e1e5cec43cfaf5b2926d478afd3 +#: ../../xml-class.rst:54 cf00809415f04821b5afcfb274bc466e msgid "Set the font-family, e.g. “sans-serif”." msgstr "フォントファミリーを設定します。例: \"sans-serif\"。" -#: ../../xml-class.rst:55 01b7813b4e6246d99690d8b79207ccfb +#: ../../xml-class.rst:55 b6ea49c8641c4332b9398bef1a6359a3 msgid ":meth:`~.set_fontsize`" msgstr "" -#: ../../xml-class.rst:55 2ea61f4019a14f349f49b89ffc114bfc +#: ../../xml-class.rst:55 9fe5840d1b4e4891aa77b55e25a5b1e2 msgid "Set the font size. Either a float or a valid HTML/CSS string." msgstr "フォントサイズを設定します。浮動小数点数または有効なHTML/CSS文字列のいずれかです。" -#: ../../xml-class.rst:56 2298a9bb9b8c44028013408f33fb4a8b +#: ../../xml-class.rst:56 893eb791a848403381a5172bc82ba8a2 msgid ":meth:`~.set_id`" msgstr "" -#: ../../xml-class.rst:56 91d7438009f34deebb029f560780b3d5 +#: ../../xml-class.rst:56 f2aa328fbed64085b476f3b70fdf3881 msgid "Set a :htmlTag:`id`. A check for uniqueness is performed." msgstr ":htmlTag:`id` を設定します。一意性のチェックが実行されます。" -#: ../../xml-class.rst:57 0ae28f410adb46dcb61584afa9381274 +#: ../../xml-class.rst:57 783861b6af6e44bc8733b76733ec5da5 msgid ":meth:`~.set_italic`" msgstr "" -#: ../../xml-class.rst:57 60bfe10047314fbe90557257bd2c0cae +#: ../../xml-class.rst:57 0701120232e24ab7a942c75085ee4917 msgid "Set italic on or off or to some string value." msgstr "イタリック体をオンまたはオフ、または一部の文字列値に設定します。" -#: ../../xml-class.rst:58 f13070f015174cb3883a33ab5855c52f +#: ../../xml-class.rst:58 309c49d3870449faa199927e29c64b96 msgid ":meth:`~.set_leading`" msgstr "" #: ../../xml-class.rst:58 ../../xml-class.rst:249 -#: cd2e6532f5ec4357be2a046a728ce9d1 eec6725705284680bdf39575ae948662 +#: 040c50bebd594591ae1e863aa20683a6 dd67658b9d3349cc89ede4628205f1df msgid "" "Set inter-block text distance (`-mupdf-leading`), only works on block-" "level nodes." msgstr "インターブロックテキスト間の距離(`-mupdf-leading`)を設定します。ブロックレベルのノードでのみ機能します。" -#: ../../xml-class.rst:59 be7f70c10d2d46adbbefaacf9a79b89f +#: ../../xml-class.rst:59 2281f01a10cb44209c22340d5f31c661 msgid ":meth:`~.set_lineheight`" msgstr "" -#: ../../xml-class.rst:59 d6ceaf5d3d5349e8af141f148398c5dd +#: ../../xml-class.rst:59 5fd19f3c7efd41d6be0dd0d482afa714 msgid "Set height of a line. Float like 1.5, which sets to `1.5 * fontsize`." msgstr "行の高さを設定します。1.5のような浮動小数点数は、`1.5 * fontsize` に設定します。" -#: ../../xml-class.rst:60 a2f43f3c4a1d42fbaba382655abe93ec +#: ../../xml-class.rst:60 da10321480c547bd877d788cbbc17d19 msgid ":meth:`~.set_margins`" msgstr "" -#: ../../xml-class.rst:60 4cd734fcaeaa480981b859c40b74b310 +#: ../../xml-class.rst:60 562e9cf200d04d618d6ce2d9d0199a52 msgid "Set the margin(s), float or string with up to 4 values." msgstr "マージンを設定します。浮動小数点数または最大4つの値を持つ文字列です。" -#: ../../xml-class.rst:61 d1d9423dcbf24cf3af56e6bce760064b +#: ../../xml-class.rst:61 7a9720be94704744b9ffc66d54860d47 msgid ":meth:`~.set_pagebreak_after`" msgstr "" #: ../../xml-class.rst:61 ../../xml-class.rst:267 -#: 09d384ec96934ff7ae90ee0b75ab23f7 2a734a129f224fc5a121508506fa0e76 +#: 2e26773bf354417d9a1e518e237918a0 b15db1fb04a94a9db2c92c13e5185080 msgid "Insert a page break after this node." msgstr "このノードの後に改ページを挿入します。" -#: ../../xml-class.rst:62 fa930ec581bc4daea8b1bcbdb5a7867a +#: ../../xml-class.rst:62 6f6e3d153b3b4739bb09a561522007a6 msgid ":meth:`~.set_pagebreak_before`" msgstr "" #: ../../xml-class.rst:62 ../../xml-class.rst:271 -#: 80b99e8507c647c08a9f5136d4707133 910b391d1fc64086bffb32b56dd17b62 +#: 7136cfd22a9d457a97a7e2513a45846f c2118e0dbcda4f5da4addfd12c35aa83 msgid "Insert a page break before this node." msgstr "このノードの前に改ページを挿入します。" -#: ../../xml-class.rst:63 e75a164844134d4fa985ecff78c577b3 +#: ../../xml-class.rst:63 1bbac025080541ae80e078311ca65702 msgid ":meth:`~.set_properties`" msgstr "" -#: ../../xml-class.rst:63 48bdbe6858a749739ba1e9676cd1f01c +#: ../../xml-class.rst:63 1b2e863de6b347dd9e0815f739335444 msgid "Set any or all desired properties in one call." msgstr "1つの呼び出しで任意またはすべての所望のプロパティを設定します。" -#: ../../xml-class.rst:64 e59908c884944aeb94419811d38c79b1 +#: ../../xml-class.rst:64 5b7ad8cc67534183884e12223b204bfb msgid ":meth:`~.add_style`" msgstr "" -#: ../../xml-class.rst:64 f3063f32a48046c993a1177620f2b77c +#: ../../xml-class.rst:64 b48568e9492448fea987302ce3977624 msgid "Set (add) a “style” that is not supported by its own `set_` method." msgstr "独自の `set_` メソッドでサポートされていない \"スタイル\" を設定(追加)します。" -#: ../../xml-class.rst:65 21a22ad4c5e742d68ebd77fce3a4bec5 +#: ../../xml-class.rst:65 eeab444cf1874576b113c84b0127b3e9 msgid ":meth:`~.add_class`" msgstr "" -#: ../../xml-class.rst:65 07ca130edf4c44629581e643f4cab271 +#: ../../xml-class.rst:65 c6c3f6a173aa4093ad84ff360356b54b msgid "Set (add) a “class” attribute." msgstr "\"クラス\" 属性を設定(追加)します。" -#: ../../xml-class.rst:66 8f806b3c77fa48c1a4235897c4e08e56 +#: ../../xml-class.rst:66 dacd474bcc8e488ab2843c5b8e98be3a msgid ":meth:`~.set_text_indent`" msgstr "" -#: ../../xml-class.rst:66 abc8782bf2a745309720a0fa3c839384 +#: ../../xml-class.rst:66 2a9fa4287d5043b38c543cccd188d907 msgid "" "Set indentation for first textblock line. Only works for block-level " "nodes." msgstr "最初のテキストブロック行のインデントを設定します。ブロックレベルのノードでのみ機能します。" -#: ../../xml-class.rst:67 b96181331367489099dc6e24008a6e48 +#: ../../xml-class.rst:67 42123ce0b6f24506853dac4a1af569fa msgid ":attr:`~.tagname`" msgstr "" #: ../../xml-class.rst:67 ../../xml-class.rst:370 -#: 15e33e8b8f594a658b9e38cdcf805cfc 85381e985cce46f3b5dccc8bba152573 +#: 36166f24a5d84c408d14f9f1a2dc2468 b8920a310a044b1987fdc6fed230bf95 msgid "Either the HTML tag name like :htmlTag:`p` or `None` if a text node." msgstr "HTMLタグ名(例: :htmlTag:`p`)またはテキストノードの場合は `None`。" -#: ../../xml-class.rst:68 56fa121060c84b5eaef073cd7349c2f2 +#: ../../xml-class.rst:68 66c56dbdcc064ee483ccc6e18e6d9785 msgid ":attr:`~.text`" msgstr "" #: ../../xml-class.rst:68 ../../xml-class.rst:374 -#: 2029a638dfab494180b263a727a1a80b 7ff3168d93254d0da3a63b56e08bf3da +#: 28401b8b52b2423a8c4aa49d5fc3591b e4b6e887c7244003973e168bacadf31e msgid "Either the node's text or `None` if a tag node." msgstr "ノードのテキストまたはテキストノードの場合は `None`。" -#: ../../xml-class.rst:69 300bd8f515ee4e628b9843e141ebd964 +#: ../../xml-class.rst:69 4a66c8e044cb475fa6fb2613a94f66e3 msgid ":attr:`~.is_text`" msgstr "" -#: ../../xml-class.rst:69 8fae5170efa343e692b68bc9070c878f +#: ../../xml-class.rst:69 ca0266179d7442349348788c2abfc7fa msgid "Check if the node is a text." msgstr "ノードがテキストかどうかを確認します。" -#: ../../xml-class.rst:70 8d1880a1f8a24468a03560c18843bcab +#: ../../xml-class.rst:70 e5f96a9fc17b4e368cfce3ef779be88c msgid ":attr:`~.first_child`" msgstr "" #: ../../xml-class.rst:70 ../../xml-class.rst:382 -#: 19262463fbff48fc9e2e867c5df6c5ea 1eb8ae4221234937a0242283c4656a05 +#: 2f21de8ea3a74f8e8afccd49d6b046bc 42e3ed28baa943f6a3b5b61eebe41952 msgid "Contains the first node one level below this one (or `None`)." msgstr "このノードの1レベル下の最初のノードを含みます(または `None`)。" -#: ../../xml-class.rst:71 46a85cea7de84bee89a6ae37ce72100f +#: ../../xml-class.rst:71 84b9f06f42b04e4782acf1d68068c5b4 msgid ":attr:`~.last_child`" msgstr "" #: ../../xml-class.rst:71 ../../xml-class.rst:386 -#: 3f4101f3b8ee483d9ef154d3206b58fe 778b9c92e0684cd1899dd6ef19a65c2f +#: 2c94509d8b3b40b4b94c1944dca9f128 676901a092fc4735b224b379bb0c3f9f msgid "Contains the last node one level below this one (or `None`)." msgstr "このノードの1レベル下の最後のノードを含みます(または `None`)。" -#: ../../xml-class.rst:72 9a3c194c003649e1854a421556773c66 +#: ../../xml-class.rst:72 3dd91ae4326f41568dfd754dde88c7a4 msgid ":attr:`~.next`" msgstr "" #: ../../xml-class.rst:72 ../../xml-class.rst:390 -#: 8fef0e02029b48e9b6b400a8b3424a46 ac1cba1a91974e1298fbded78e764cbd +#: cbabeaa3eefd40249b4dd37b701d59cc d36f34064bfa40a0a40827e73a241423 msgid "The next node at the same level (or `None`)." msgstr "同じレベルの次のノード(または `None`)。" -#: ../../xml-class.rst:73 412b4d03b5a641f4b20f77689cc0c08d +#: ../../xml-class.rst:73 7a0463bd4ac7449dabbfab5a78bbbdd0 msgid ":attr:`~.previous`" msgstr "" #: ../../xml-class.rst:73 ../../xml-class.rst:394 -#: cd964c74d6c64e7da2dbeec0b0c59a2f f8910c07c4214e6287ba3946378c03d7 +#: 21ccb8eec1544ac69539f5504e1c2572 3bc7b50ddc0d48a1b11a3a42ff6bf3ff msgid "The previous node at the same level." msgstr "同じレベルの前のノード。" -#: ../../xml-class.rst:74 9855a2f04e2e46ce9101415b64dc2555 +#: ../../xml-class.rst:74 d61cc5bbd1f146c7972c2ebfc6200683 msgid ":attr:`~.root`" msgstr "" #: ../../xml-class.rst:74 ../../xml-class.rst:398 -#: 3e3b7cb5041e4762bb1c4014b3ceeabe eb8102b6859b495d99145ddc3e4e584f +#: a71d233f5e2e429eb0443f3879620f09 cd5e5bf55358464abc8f27b0b2c4c712 msgid "The top node of the DOM, which hence has the tagname :htmlTag:`html`." msgstr "DOMのトップノードで、したがって :htmlTag:`html` というタグ名を持っています。" -#: ../../xml-class.rst:79 fb9ef43bc439482cad5a951b2c301fe6 +#: ../../xml-class.rst:79 7b4df043605440d3bb688f84d119f814 msgid "**Class API**" msgstr "**クラスAPI**" -#: ../../xml-class.rst:85 50c562c814564c449829bbc9afdbb977 +#: ../../xml-class.rst:85 15f567e4f1754a959a432aa258e0d91d msgid "" "Add an :htmlTag:`ul` tag - bulleted list, context manager. See `ul " "`_." @@ -527,7 +528,7 @@ msgstr "" "`_ " "を参照してください。" -#: ../../xml-class.rst:89 174edc5279694c348b0b3b0db789c16a +#: ../../xml-class.rst:89 3c04822b8860402a8b9573c54e5194e3 msgid "" "Add a :htmlTag:`pre` tag, context manager. See `pre " "`_." @@ -536,7 +537,7 @@ msgstr "" "`_ " "を参照してください。" -#: ../../xml-class.rst:93 bba48ddf46cb4d04a942f63d16959376 +#: ../../xml-class.rst:93 0ed1cc73e1274f0a9666e87961987c78 msgid "" "Add a :htmlTag:`dl` tag, context manager. See `dl " "`_." @@ -545,7 +546,7 @@ msgstr "" "`_ " "を参照してください。" -#: ../../xml-class.rst:97 b2aa11c8d88d4a6e9287a25df228fd11 +#: ../../xml-class.rst:97 0b0a1eaefbc1441fbd61bce939f12692 msgid "" "Add a :htmlTag:`div` tag, context manager. See `div " "`_." @@ -554,7 +555,7 @@ msgstr "" "`_ " "を参照してください。" -#: ../../xml-class.rst:101 da125a4e1e3a46e4aa8a998d31500303 +#: ../../xml-class.rst:101 8be2c66a14014d738a580d04d0c21248 msgid "" "Add a header tag (one of :htmlTag:`h1` to :htmlTag:`h6`), context " "manager. See `headings `_ を参照してください。" -#: ../../xml-class.rst 024cc11a2324423e9672406643c790d3 -#: 07b6c8b5572e40f9a57255f2dacbd3cc 29c13b624cf146969cd16cfc55249705 -#: 4fe3ebba484b42ddb55eba79c9c27a31 5e01d892130e4859abac03db0f6f6fac -#: 5ea5e25c70fb40e5a632629e14ce0152 6320093e8876421aa0c0cde45e1e8cab -#: 6cdc85c2d7324535b7ea0240df808aba 6eed1be97c5042ce9ea6f04625ed6c41 -#: 717fb573fd2f40bd936f93caf7c40c6c 802f512e315e4b638f3e77a1768c9c3e -#: 8be1839a274348638fa38a4f8077b415 8d9be97075ee4dc88381afea5e6edea5 -#: 932121080f8243c9ac385c4e920ba472 9a8885a18a94445698e60de98d8c6725 -#: a0723f84802648158d4a4375ecbb9de2 ab4f4b35396a4590a9be6a5bb3a14c22 -#: ac6cd58df2df43dbbf0969f71ed71701 b8fbdaead6cd44dd8fe1069d634366dd -#: c35b8f2b6d9646ac850f6d988fe17db0 c79c2a5ce2244cdcaa354f0d2f2557e8 -#: ce48aaae71354d05a5fbc667f4bd1862 d593327d41d44e48b4626dadff4fdca4 -#: dedd229740e64133b16bf51f95161b91 deea3b754cb049bbbc5e4e7484bd7d38 -#: fdca45ac119b47adb610197cc64c9afa fec4c1e4576e40429a4dda979b9530e8 +#: ../../xml-class.rst 06667ae7d009417a97c1ecf590b1a67f +#: 0aaa5b3f295942ebbbccb8d389cd898a 1aa126b038ed4ce781aecf808c57cdec +#: 1d2b1dade7d6423bb8e41f0972a59fb3 1d556e1aced24a5a8be36537a9f59e1b +#: 1e0cf1d1d2054403831bfb69810ee742 255c1340c66245b48f2a3cdf80e4214c +#: 2c0eea03634e486dabab3f54b424fad2 46aa4928a5604814a92adf164d7fa247 +#: 49455d15a82740859665ec07012100a3 61e61452d3f94579997370f901426bce +#: 67c4ccac4676478495f011032187051d 6e85e6b82e584e458e9f10f45aeaf176 +#: 9079b60e1ede4c158bdcc07baa224b19 a1450c78b0a74e7a9a133091ddb6e387 +#: a90aa7ae4f834d88b627c22105ee12ce cc4f042b90394b9eb95de870938d8c43 +#: d0e84706994a47c4aad671254c7a85e2 d1095b66b77e4a72a9793960df3fa674 +#: d23494315ac041c791e01f27f2af929e d96c7bfed45740ec810afcba0125a60a +#: dd18489673354a54a1e8b0d472e4d131 e1d5789d094643a8b45b8b3c59f908b1 +#: e6d0fce46e4a49ef89c56b78e0914a3f edfbbc1dbdd840519996cc595579ac32 +#: f5a2500942f844c3ba7e25042d206f66 f9e99192da7d40888802688752c7595e msgid "Parameters" msgstr "" -#: ../../xml-class.rst:103 1ce82c759eea4e3c9800371dd5803375 +#: ../../xml-class.rst:103 05de048c66ba4b459eb9539250326096 msgid "a value 1 - 6." msgstr "値(1 - 6)。" -#: ../../xml-class.rst:107 dcb0489ba089443abe776b0454f77cd1 +#: ../../xml-class.rst:107 2c297e02768c469799efc10e37822f0e msgid "" "Add a :htmlTag:`hr` tag. See `hr `_." @@ -593,13 +594,13 @@ msgstr "" ":htmlTag:`hr` タグを追加します。詳細は `hr `_ を参照してください。" -#: ../../xml-class.rst:111 43e83410852143d6a5c0f43f265bb4f9 +#: ../../xml-class.rst:111 b970bd7ba2b14e329f30ab7f38392367 msgid "" "Add an :htmlTag:`img` tag. This causes the inclusion of the named image " "in the DOM." msgstr ":htmlTag:`img` タグを追加します。これにより、指定された名前の画像が DOM に含まれます。" -#: ../../xml-class.rst:113 a739524e6e014b1692f24668de326291 +#: ../../xml-class.rst:113 9fae2f8598bf4a7b873ba77fe44e109d msgid "" "the filename of the image. This **must be the member name** of some entry" " of the :ref:`Archive` parameter of the :ref:`Story` constructor." @@ -607,7 +608,7 @@ msgstr "" "画像のファイル名。これは :ref:`Story` コンストラクタの :ref:`Archive` パラメータのエントリの " "**メンバー名である必要があります** 。" -#: ../../xml-class.rst:114 9ebf88d72a56409fa42faf5db62280fd +#: ../../xml-class.rst:114 f86a37a277f94897a82aefd1205cbb77 msgid "" "if provided, either an absolute (int) value, or a percentage string like " "\"30%\". A percentage value refers to the width of the specified `where` " @@ -618,7 +619,7 @@ msgstr "" "で指定された `where` の長方形の幅を指します。この値が提供され、`height` " "が省略された場合、画像はアスペクト比を保持したまま含まれます。" -#: ../../xml-class.rst:115 33a68d796a6a4e7aa08cd525b2904672 +#: ../../xml-class.rst:115 fb3d1d9e2800433b822fc09a4d7e5b38 msgid "" "if provided, either an absolute (int) value, or a percentage string like " "\"30%\". A percentage value refers to the height of the specified `where`" @@ -628,71 +629,71 @@ msgstr "" "提供された場合、絶対値(int)または「30%」などのパーセンテージ文字列。パーセンテージ値は :meth:`Story.place` " "で指定された `where` 長方形の高さを指します。この値が提供され、`width` が省略された場合、画像のアスペクト比が維持されます。" -#: ../../xml-class.rst:119 16b08e6b02b448d1869b44939b57b6ad +#: ../../xml-class.rst:119 7dc5d5cd96ba453683175419ccf0139d msgid "Add an :htmlTag:`a` tag - inline element, treated like text." msgstr ":htmlTag:`a` タグを追加します - インライン要素で、テキストのように扱われます。" -#: ../../xml-class.rst:121 4f5885541aec4f1681504c5b8022c421 +#: ../../xml-class.rst:121 0e78457bb88a440b916bc48c1587500a msgid "the URL target." msgstr "URL の対象。" -#: ../../xml-class.rst:122 daf14fcbddfa4e8f9312bfadf1eb4084 +#: ../../xml-class.rst:122 29694751dcf94583ab50b52f45eac3c5 msgid "the text to display. If omitted, the `href` text is shown instead." msgstr "表示するテキスト。省略した場合、`href` のテキストが代わりに表示されます。" -#: ../../xml-class.rst:126 2ed69065bcc54bef8f132896d4735a43 +#: ../../xml-class.rst:126 b5e405fe3b834289ba24aee22e844046 msgid "Add an :htmlTag:`ol` tag, context manager." msgstr ":htmlTag:`ol` タグを追加します。コンテキストマネージャーです。" -#: ../../xml-class.rst:130 38daf667477948bba31f3fbf13705aee +#: ../../xml-class.rst:130 76fa57288ce94e5f83f0c2179b72bfe6 msgid "Add a :htmlTag:`p` tag, context manager." msgstr ":htmlTag:`p` タグを追加します。コンテキストマネージャーです。" -#: ../../xml-class.rst:134 f77310b2d5b9494b9cf5da0eb7663c25 +#: ../../xml-class.rst:134 ab34ee2cc1fd4256ad7020de606ebc05 msgid "Add a :htmlTag:`span` tag, context manager. See `span`_" msgstr ":htmlTag:`span` タグを追加します。コンテキストマネージャーです。span タグについては `span`_ を参照してください。" -#: ../../xml-class.rst:138 b2855744f7694d8688b63669113597b7 +#: ../../xml-class.rst:138 07628e22868f42ffbcf7ddd9c0ac35d5 msgid "" "Add \"subscript\" text(:htmlTag:`sub` tag) - inline element, treated like" " text." msgstr "\"subscript\" テキスト(:htmlTag:`sub` タグ)を追加します。テキストと同様に扱われるインライン要素です。" -#: ../../xml-class.rst:142 7e341b817ad5456fb5940fcfc3df39b9 +#: ../../xml-class.rst:142 dd9903a2ecf4404a9d6accc1e0749f79 msgid "" "Add \"superscript\" text (:htmlTag:`sup` tag) - inline element, treated " "like text." msgstr "\"superscript\" テキスト(:htmlTag:`sup` タグ)を追加します。テキストと同様に扱われるインライン要素です。" -#: ../../xml-class.rst:146 8f7bb64cb4c04d1ca3284b9fc7593f70 +#: ../../xml-class.rst:146 ed86a64559ee476a87e5777052bb75fe msgid "" "Add \"code\" text (:htmlTag:`code` tag) - inline element, treated like " "text." msgstr "\"code\" テキスト(:htmlTag:`code` タグ)を追加します。テキストと同様に扱われるインライン要素です。" -#: ../../xml-class.rst:150 0b4b00a36d184c089979f1c9ff3c6de9 +#: ../../xml-class.rst:150 23a0e0f64af1407a8d78e8b1fc6eba45 msgid "" "Add \"variable\" text (:htmlTag:`var` tag) - inline element, treated like" " text." msgstr "\"variable\" テキスト(:htmlTag:`var` タグ)を追加します。テキストと同様に扱われるインライン要素です。" -#: ../../xml-class.rst:154 895c0d15e29c4e6b8dfaa85263f001e4 +#: ../../xml-class.rst:154 16840c2eee994250a111a670c1982c07 msgid "" "Add \"sample output\" text (:htmlTag:`samp` tag) - inline element, " "treated like text." msgstr "\"sample output\" テキスト(:htmlTag:`samp` タグ)を追加します。テキストと同様に扱われるインライン要素です。" -#: ../../xml-class.rst:158 f307ef2221df4d8cabf352e9f5a19508 +#: ../../xml-class.rst:158 c12b71425d2847eb8bde80f536c4c5ca msgid "" "Add \"keyboard input\" text (:htmlTag:`kbd` tag) - inline element, " "treated like text." msgstr "\"keyboard input\" テキスト(:htmlTag:`kbd` タグ)を追加します。テキストと同様に扱われるインライン要素です。" -#: ../../xml-class.rst:166 6a99c0b9dc7a474e9cf033077936a5db +#: ../../xml-class.rst:166 a0c1e8813cc34b0b905e64b8843960a1 msgid "Set the text alignment. Only works for block-level tags." msgstr "テキストの配置を設定します。ブロックレベルのタグにのみ対応しています。" -#: ../../xml-class.rst:168 568fadc862084cf18f4c1939f65afd7e +#: ../../xml-class.rst:168 5c1f833338ba45238483066cd6ee050f msgid "" "either one of the :ref:`TextAlign` or the `text-align " "`_ values." @@ -701,43 +702,43 @@ msgstr "" "US/docs/Web/CSS/text-align>`_ のいずれかの値です。" #: ../../xml-class.rst:174 ../../xml-class.rst:187 ../../xml-class.rst:195 -#: 6d316d5f35dc47cabd5a9e43808dd906 a71d18e2fc384564a61117cc44ca1890 -#: d68a22a7cc244d228156f4f082b7bcb7 +#: 2fe24dbf6c8e491da8d3a7aca96d7db7 a41e1f3d0e3646c4848ce0ef0df0f734 +#: e6ab290bc6c6427aa52cd824b5abcf95 msgid "the name of the attribute." msgstr "属性の名前。" -#: ../../xml-class.rst:175 e0e47e58fe774dd09b3243078594533b +#: ../../xml-class.rst:175 d389ba2ac4a34151a91a26102e2b6460 msgid "the (optional) value of the attribute." msgstr "(オプションの) 属性の値。" -#: ../../xml-class.rst:179 8332bb38a6c54a5aa9670df64e17dccd +#: ../../xml-class.rst:179 07c3f60cb5574e45abb857f481b45d17 msgid "Retrieve all attributes of the current nodes as a dictionary." msgstr "現在のノードのすべての属性を辞書として取得します。" -#: ../../xml-class.rst 1112bce0d9af4621912d000f0d1d2fb0 -#: 2bf36695ecca41d4a18533449905a8f7 2d9d35c1734f431caa5e5150336433b8 -#: 3fe8b7b42a6b4da48a829b4f2649b9eb 5bc4a41a051e427795a35d51a82da550 -#: 83e1e5ab54984ed4a71db1da79a5c7a5 9368f91ec2714f3f8b958e5f233942b5 +#: ../../xml-class.rst 17192c246086475781cbc2a532fe77f7 +#: 316b287ac38d47998654b66e17120d3c 33b69c8e0c214f7e94b9e785d1d5acb0 +#: 397c2d06aeac40b0a74e6504b51ad4da e796210aabb44877bdc47c5faba1888b +#: f45ca78bcbb745fd8bf01620b26911ca f470a993feb34859b12a4343388d8e3d msgid "Returns" msgstr "戻り値:" -#: ../../xml-class.rst:181 02d0f35a40094bcd925f4e6328544e4d +#: ../../xml-class.rst:181 9a860899e73444138923297266a09e92 msgid "a dictionary with the attributes and their values of the node." msgstr "ノードの属性とその値を含む辞書。" -#: ../../xml-class.rst:185 58f87414daae449a917c2991b3b6fd3f +#: ../../xml-class.rst:185 367b3d6b05fe484c8692a5b9fdf0888d msgid "Get the attribute value of `key`." msgstr "`key` ーの属性値を取得します。" -#: ../../xml-class.rst:189 6670253faadc4dc181423fcc504ba426 +#: ../../xml-class.rst:189 0c606e3db4aa43e4b82e63059d8b9056 msgid "a string with the value of `key`." msgstr "`key` ーの値を含む文字列。" -#: ../../xml-class.rst:193 5dcf2858d61f42efa01043ce0db9a77b +#: ../../xml-class.rst:193 7ab7a2c9a37a49528c76d65040e92e55 msgid "Remove the attribute `key` from the node." msgstr "ノードから属性 `key` を削除します。" -#: ../../xml-class.rst:201 f2b26dea919044509ec1d945b9873e21 +#: ../../xml-class.rst:201 4a286ef8c13b4a818402696f63abbbda msgid "" "either an RGB value like (255, 0, 0) (for \"red\") or a valid " "`background-color `_ 値。" -#: ../../xml-class.rst:207 a849c209d0ac443cab8c46ebb71c1473 +#: ../../xml-class.rst:207 0c4471f9c34f45e3b376695ecd25ae47 msgid "" "`True`, `False` or a valid `font-weight `_ value." @@ -754,11 +755,11 @@ msgstr "" "`True`、`False`、または有効な `font-weight `_ 値。" -#: ../../xml-class.rst:211 14608dcbd63d44778d4a4fa76977c404 +#: ../../xml-class.rst:211 377d0e10d7b548c88d42311255d9ff02 msgid "Set the color of the text following." msgstr "後続するテキストの色を設定します。" -#: ../../xml-class.rst:213 d78009beb81c4b4dbe7435aa0500b604 +#: ../../xml-class.rst:213 0596f8f1cc684e51ac8e6a2e58d3f646 msgid "" "either an RGB value like (255, 0, 0) (for \"red\") or a valid `color " "`_ value." @@ -766,11 +767,11 @@ msgstr "" "RGB値(例:(255, 0, 0)、\"red\"の場合)または有効な `カラー `_ 値。" -#: ../../xml-class.rst:217 62030de0f71c4851b9a8ff602b9cbfc5 +#: ../../xml-class.rst:217 9de3ba47655e45ea86e95f7806cc1761 msgid "Set the number of columns." msgstr "列の数を設定します。" -#: ../../xml-class.rst:219 a9b833c4f8aa4f188672e129958b67f5 +#: ../../xml-class.rst:219 d767dfd34bba48c2bd824015aedbfce5 msgid "" "a valid `columns `_ value." @@ -778,23 +779,23 @@ msgstr "" "有効な `columns `_" " 値。" -#: ../../xml-class.rst:221 d6a80d60383b439a908701930cdb2e7c +#: ../../xml-class.rst:221 c5ee8d67ed604a779b356ad7a3beb3b6 msgid "Currently ignored - supported in a future MuPDF version." msgstr "現在は無視されており、将来のMuPDFバージョンでサポートされます。" -#: ../../xml-class.rst:225 5f7767693a974d12bb8afb150aa5fbc2 +#: ../../xml-class.rst:225 a3e16b087cf149fbbf6f316ad7d79880 msgid "Set the font-family." msgstr "フォントファミリーを設定します。" -#: ../../xml-class.rst:227 bab24823b442489a97603838b2b789ba +#: ../../xml-class.rst:227 56592161ded1480aa5c21631ec00e5ac msgid "e.g. \"sans-serif\"." msgstr "例:\"sans-serif\"など。" -#: ../../xml-class.rst:231 11d2423ad1614409b86032525e09c448 +#: ../../xml-class.rst:231 e716de072f9544618374c016b382f40a msgid "Set the font size for text following." msgstr "後続するテキストのフォントサイズを設定します。" -#: ../../xml-class.rst:233 1a17279ad8b34581898f6047548a25f6 +#: ../../xml-class.rst:233 4699b76ad7694bccbd943643ee021862 msgid "" "a float or a valid `font-size `_ value." @@ -802,7 +803,7 @@ msgstr "" "floatまたは有効な `font-size `_ 値。" -#: ../../xml-class.rst:237 cd0a177eb19441ff8a434dbecc0b6edd +#: ../../xml-class.rst:237 8cfd620b051940348ac0556e9ae65033 msgid "" "Set a :htmlTag:`id`. This serves as a unique identification of the node " "within the DOM. Use it to easily locate the node to inspect or modify it." @@ -811,15 +812,15 @@ msgstr "" ":htmlTag:`id` " "を設定します。これはDOM内でノードを一意に識別するためのもので、ノードを簡単に見つけて調査または変更するために使用します。一意性のチェックが実行されます。" -#: ../../xml-class.rst:239 3dd8ec9655d7401b903bcb84b19ca8ad +#: ../../xml-class.rst:239 b6042d6da5b14d338da93ff2ac9afdc3 msgid "id string of the node." msgstr "ノードのID文字列。" -#: ../../xml-class.rst:243 4931ed385c144bd7b877b5f24b4832d8 +#: ../../xml-class.rst:243 83dcfa78795e4c169619f1b4203a95f7 msgid "Set italic on or off or to some string value for the text following it." msgstr "後続するテキストのイタリックをオンまたはオフ、または一部の有効なフォントスタイル値に設定します。" -#: ../../xml-class.rst:245 6da4ce36e7544163b10683b0e7a3fc35 +#: ../../xml-class.rst:245 e74b3e4a56714306840b8bd5cdcfb8b6 msgid "" "`True`, `False` or some valid `font-style `_ value." @@ -827,26 +828,26 @@ msgstr "" "`True`、`False`、または有効な `font-style `_ 値。" -#: ../../xml-class.rst:251 31c259c3700a4683978ade1aacd4ee68 +#: ../../xml-class.rst:251 b9a0bdede6124f1fbbde6722313e5c2c msgid "the distance in points to the previous block." msgstr "前のブロックからの距離(ポイント単位)。" -#: ../../xml-class.rst:255 f23cdab16b5f48a6be6e6134c22d5400 +#: ../../xml-class.rst:255 f13883ee98f146ca9a924b575b3cc51a msgid "Set height of a line." msgstr "行の高さを設定します。" -#: ../../xml-class.rst:257 02afe7ae37a54c11b990ab5fa3563d71 +#: ../../xml-class.rst:257 74dc61a744d94742a7eb18faf8251006 msgid "" "a float like 1.5 (which sets to `1.5 * fontsize`), or some valid `line-" "height `_ " "value." msgstr "value – 1.5のような浮動小数点数(これは `1.5 * fontsize`に設定されます)または有効な行の高さの値。" -#: ../../xml-class.rst:261 58160829ef30498bbc7a368f4aadcb73 +#: ../../xml-class.rst:261 f4aeb6cd082e4b039f2ef1c241cffc4a msgid "Set the margin(s)." msgstr "マージン(マージン)を設定します。" -#: ../../xml-class.rst:263 6cc5b700b0c84044940763e6718e180f +#: ../../xml-class.rst:263 754876b7c7b84370b81e5f3f15bbae21 msgid "" "float or string with up to 4 values. See `CSS documentation " "`_." @@ -854,13 +855,13 @@ msgstr "" "floatまたは最大4つの値を含む文字列。`CSSのドキュメンテーション `_ を参照してください。" -#: ../../xml-class.rst:275 369d0dfa18af4da8b3aa14b641737bb3 +#: ../../xml-class.rst:275 f2da4761cba1404d8c850cf58d8ba28c msgid "" "Set any or all desired properties in one call. The meaning of argument " "values equal the values of the corresponding `set_` methods." msgstr "一度の呼び出しで任意またはすべての所望のプロパティを設定します。引数の値の意味は、対応する `set_` メソッドの値と同じです。" -#: ../../xml-class.rst:277 457b183445c04a15945f8a6ad21c44fd +#: ../../xml-class.rst:277 c1f136b0c23e4147aef9acbc054decd4 msgid "" "The properties set by this method are directly attached to the node, " "whereas every `set_` method generates a new :htmlTag:`span` below the " @@ -871,31 +872,31 @@ msgstr "" " :htmlTag:`span` " "が生成されます。したがって、本文のいくつかのプロパティを「グローバルに」設定するには、このメソッドを使用する必要があります。" -#: ../../xml-class.rst:281 faa1b60f358148dd9f0eb1b59089bb0f +#: ../../xml-class.rst:281 0b00e9cdb0ed42819aad271da3e10621 msgid "Set (add) some style attribute not supported by its own `set_` method." msgstr "独自の `set_` メソッドでサポートされていないスタイル属性を設定(追加)します。" -#: ../../xml-class.rst:283 114bb7e2919741348dc6dc76790a8899 +#: ../../xml-class.rst:283 457e6d62d41841ee8741782c6bfd201f msgid "any valid CSS style value." msgstr "有効なCSSスタイル値。" -#: ../../xml-class.rst:287 0003f443189f4ea991abc58dcec20006 +#: ../../xml-class.rst:287 996f4ece67a841e59d001f1d260f6571 msgid "Set (add) some \"class\" attribute." msgstr "いくつかの「class」属性を設定(追加)します。" -#: ../../xml-class.rst:289 3ad56c4e78e64512b039ac5583f4563a +#: ../../xml-class.rst:289 0cd9ff6d9c4640ab90612ca481fb1692 msgid "" "the name of the class. Must have been defined in either the HTML or the " "CSS source of the DOM." msgstr "クラスの名前。DOMのHTMLまたはCSSソースで定義されている必要があります。" -#: ../../xml-class.rst:293 526f5d96762240919ce0fcc2fe9ac8d0 +#: ../../xml-class.rst:293 d40d57c4852c46539d9bdf515833a465 msgid "" "Set indentation for the first textblock line. Only works for block-level " "nodes." msgstr "最初のテキストブロックの行のインデントを設定します。ブロックレベルのノードでのみ機能します。" -#: ../../xml-class.rst:295 93db6cf8f4ae4921a6277cf9f19b4534 +#: ../../xml-class.rst:295 0d6bee0b55f24569a45c44d5e814b140 msgid "" "a valid `text-indent `_ value. Please note that negative values do not work." @@ -903,36 +904,36 @@ msgstr "" "有効な `text-indent `_ 値。負の値は機能しないことに注意してください。" -#: ../../xml-class.rst:300 d6471054a05e49e6896fef2fd6664a79 +#: ../../xml-class.rst:300 762e7d8fde1d4ad3ba5ae1bf4fa34033 msgid "" "Append a child node. This is a low-level method used by other methods " "like :meth:`Xml.add_paragraph`." msgstr "子ノードを追加します。これは、:meth:`Xml.add_paragraph` などの他のメソッドで使用される低レベルのメソッドです。" -#: ../../xml-class.rst:302 c3f31ed08a2b42da9812404489ada9d3 +#: ../../xml-class.rst:302 8fe5eebdd2b1421fb687a21dfcea9fae msgid "the :ref:`Xml` node to append." msgstr "追加する :ref:`Xml` ノード。" -#: ../../xml-class.rst:308 f2f4857e67034ac58cc369a80014ca73 +#: ../../xml-class.rst:308 bb3c5252dd3542cc8f263ab35551dedd msgid "the text to append." msgstr "追加するテキスト。" -#: ../../xml-class.rst 0b5c6d05335240f1bea8d5e7fe35da00 -#: 57c5e8858cca4c86a191dbe6c5117226 dec9bdbe2b7a44f3a9c55a2060c9a423 -#: ef49ea189abd4b7c93de4ed70648a439 +#: ../../xml-class.rst 022bf50af61d4a8a854203e9ba18a1ce +#: 70b34bf9aef34db599ca63934a722c36 87a8f73cb5e84da286de4cacee92e249 +#: c5fc1a77039842b2a10f66a29dbdb38e msgid "Return type" msgstr "" #: ../../xml-class.rst:310 ../../xml-class.rst:319 -#: 2d131d264f524eb587df3d9cbe212492 f76c44b538b4474eb598566975d192a6 +#: 14d3d45c8f9f4c94b76c6b34f9156283 e219f8801a92456dacd23c1bab7c5fa4 msgid ":ref:`Xml`" msgstr "" -#: ../../xml-class.rst:311 a11b1d20ae094320ab04203f6b78f3b8 +#: ../../xml-class.rst:311 0ed716b5c85d4de4a0457c85b58e194f msgid "the created element." msgstr "作成された要素。" -#: ../../xml-class.rst:315 269051fcf14d41e1a96a4b89eb195498 +#: ../../xml-class.rst:315 d82360adfca04cbeac23160c0a0c3afa msgid "" "Create a new node with a given tag. This a low-level method used by other" " methods like :meth:`Xml.add_paragraph`." @@ -940,30 +941,30 @@ msgstr "" "指定されたタグで新しいノードを作成します。これは、:meth:`Xml.add_paragraph` " "などの他のメソッドで使用される低レベルなメソッドです。" -#: ../../xml-class.rst:317 54ec4e208ff7471480deb267d2c493c5 +#: ../../xml-class.rst:317 9d7b1665fb704f00a0416ea1627c3c3a msgid "the element tag." msgstr "要素のタグ。" -#: ../../xml-class.rst:320 e1f70947f8a04442971d6f040a21683a +#: ../../xml-class.rst:320 ea5c614b041341e1be82c8015fbed2ef msgid "" "the created element. To actually bind it to the DOM, use " ":meth:`Xml.append_child`." msgstr "作成された要素。実際にDOMにバインドするには、:meth:`Xml.append_child` を使用します。" -#: ../../xml-class.rst:324 1b2a97eec3ae4c90a0b3b3ee07575ce3 +#: ../../xml-class.rst:324 20a9a38c30524aa7bc65ec6cbe680c47 msgid "Insert the given element `elem` before this node." msgstr "指定された要素 `elem` をこのノードの前に挿入します。" #: ../../xml-class.rst:326 ../../xml-class.rst:332 -#: 959d3973a7c04ec0b24714bfc4a06dc9 a690ced3ba004a36aa7e1b23d0b4137e +#: 44a6c046ddfd4baa968b358f7db78b0a 848c5fe3c4bb49ffbb4f55cf1fcd0d94 msgid "some :ref:`Xml` element." msgstr "いくつかの :ref:`Xml` 要素。" -#: ../../xml-class.rst:330 d4a52f9d5c4240bbb865960c420e668c +#: ../../xml-class.rst:330 31950c02ed55490db0883f1568fc5528 msgid "Insert the given element `elem` after this node." msgstr "指定された要素 `elem` をこのノードの後に挿入します。" -#: ../../xml-class.rst:336 d7fba22b08f74338951767ea7255221a +#: ../../xml-class.rst:336 9b8dcc0c94654a25a10773d34514557e msgid "" "Make a copy of this node, which then may be appended (using " ":meth:`Xml.append_child`) or inserted (using one of " @@ -973,65 +974,65 @@ msgstr "" "を使用)または挿入(:meth:`Xml.insert_before` 、:meth:`Xml.insert_after` " "のいずれかを使用)できるようにします。" -#: ../../xml-class.rst:338 e9261f042f214df282a7c876285b8925 +#: ../../xml-class.rst:338 4f1ca41be752476f906e73d07f12fa64 msgid "the clone (:ref:`Xml`) of the current node." msgstr "現在のノードのクローン(:ref:`Xml`)。" -#: ../../xml-class.rst:342 cabe5c672f59467c8ff274a857ae18e0 +#: ../../xml-class.rst:342 0cbed49f156d4211b12cb5bbe7060543 msgid "Remove this node from the DOM." msgstr "このノードをDOMから削除します。" -#: ../../xml-class.rst:347 7b6f5cd9e67c4249bdaa629120165de2 +#: ../../xml-class.rst:347 ef3d6f9aa85c47ca9abe630e29080e81 msgid "For debugging purposes, print this node's structure in a simplified form." msgstr "デバッグ目的で、このノードの構造を簡略化された形式で表示します。" -#: ../../xml-class.rst:351 e6a7ddff5b6a4796806cf337e83187f3 +#: ../../xml-class.rst:351 b77052465aff4e6c8134c42867815823 msgid "" "Under the current node, find the first node with the given `tag`, " "attribute `att` and value `match`." msgstr "現在のノードの下で、指定された `tag` 、属性 `att`、値 `match` を持つ最初のノードを検索します。" -#: ../../xml-class.rst:353 ba64f0b2d33e4c5ba358b133edce6294 +#: ../../xml-class.rst:353 c3b5cf81b4a8466aaf9a51d9aa91aed8 msgid "restrict search to this tag. May be `None` for unrestricted searches." msgstr "このタグに制限して検索します。無制限の検索の場合は `None` にできます。" -#: ../../xml-class.rst:354 ddb431a9911c4fc48c7067e0d14e1a65 +#: ../../xml-class.rst:354 b3e60cf5c1694489b76c6b061502d815 msgid "check this attribute. May be `None`." msgstr "この属性を確認します。`None` にできます。" -#: ../../xml-class.rst:355 96349390d0f745d490ea2f5bb66fd14d +#: ../../xml-class.rst:355 445027aad8f349d5870b74bc71484e02 msgid "the desired attribute value to match. May be `None`." msgstr "致する属性値を指定します。`None` にできます。" #: ../../xml-class.rst:357 ../../xml-class.rst:364 -#: c1263439146e46f7927c4b3fb302ffdc c5f76183d6244baf800735e4d0554419 +#: 458a0f17635a4ee3beaeda11ffc6cf06 d2fbb5102700450a865b3f902ceac384 msgid ":ref:`Xml`." msgstr "" -#: ../../xml-class.rst:358 4269947ef685432b9b599ab250582b22 +#: ../../xml-class.rst:358 b5de014d478e4703b88e1c98ad4dd9dd msgid "`None` if nothing found, otherwise the first matching node." msgstr "何も見つからない場合は `None`、それ以外の場合は最初の一致するノード。" -#: ../../xml-class.rst:362 03e06ac661c24d6cacfb878136b1cf06 +#: ../../xml-class.rst:362 bfac5489d037476889d72ff8311df153 #, fuzzy msgid "" "Continue a previous :meth:`Xml.find` (or :meth:`find_next`) with the same" " values." msgstr "以前の :meth:`Xml.find`(または :meth:`find_next` )を同じ値で継続します。" -#: ../../xml-class.rst:365 6c2d14db6b8a4ffe9ac257883ff96451 +#: ../../xml-class.rst:365 6e37f5e14b8849b1abe7bf97c7015bc2 msgid "`None` if none more found, otherwise the next matching node." msgstr "それ以上見つからない場合は `None`、それ以外の場合は次の一致するノード。" -#: ../../xml-class.rst:378 9abc364a60614c5c82b90ea6f1c467ee +#: ../../xml-class.rst:378 b1a7309c8f0f4aebb4c722ef9ac56d8f msgid "Check if a text node." msgstr "テキストノードであるかどうかを確認します。" -#: ../../xml-class.rst:402 6a91395836664c8885dcc24724d4507e +#: ../../xml-class.rst:402 277f48d6971041c6949eb351109c59a6 msgid "Setting Text properties" msgstr "テキストのプロパティを設定する" -#: ../../xml-class.rst:404 48d3b83460a84a219849466dbee271b2 +#: ../../xml-class.rst:404 e4aa8bc7dde5406984bba698ad774b6a msgid "" "In HTML tags can be nested such that innermost text **inherits " "properties** from the tag enveloping its parent tag. For example " @@ -1041,7 +1042,7 @@ msgstr "" "。たとえば、`

some bold textthis is bold and italicregular " "text

`。" -#: ../../xml-class.rst:406 52066d1f66434115b310775715ccd33a +#: ../../xml-class.rst:406 231ae74dcdca47a1af2c04684d880e45 msgid "" "To achieve the same effect, methods like :meth:`Xml.set_bold` and " ":meth:`Xml.set_italic` each open a temporary :htmlTag:`span` with the " @@ -1050,31 +1051,30 @@ msgstr "" "同じ効果を得るために、:meth:`Xml.set_bold` や :meth:`Xml.set_italic` " "などのメソッドは、各々所望のプロパティを持つ一時的な :htmlTag:`span` を現在のノードの下に追加します。" -#: ../../xml-class.rst:408 67ce19b698e1408a94c6234059a00c29 +#: ../../xml-class.rst:408 703c755313884c3e8e069b836f756d47 msgid "" "In addition, these methods return there parent node, so they can be " "concatenated with each other." msgstr "さらに、これらのメソッドは親ノードを返すため、それらを連結することができます。" -#: ../../xml-class.rst:413 4de7894e99f24e9487de5e5628f83962 +#: ../../xml-class.rst:413 1317fdaa53304e249c7283355ae5ebb4 msgid "Context Manager support" msgstr "コンテキストマネージャのサポート" -#: ../../xml-class.rst:414 16e8d4aff35c4ad4bb0ef8f14b909e94 +#: ../../xml-class.rst:414 66b960c3bdd444e0a671fd3e9b81e5a1 msgid "The standard way to add nodes to a DOM is this::" msgstr "DOMにノードを追加する標準的な方法は次のとおりです::" -#: ../../xml-class.rst:427 e62f4b4e31f9420086354b1b60a6199c +#: ../../xml-class.rst:427 945235d10eaf46368506481d321761b5 msgid "" "Methods that are flagged as \"context managers\" can conveniently be used" " in this way::" msgstr "コンテキストマネージャとしてフラグが付いているメソッドは、次のように便利に使用できます::" -#: ../../footer.rst:71 23b38b6220d54de48a7f1eef9fc88a88 +#: ../../footer.rst:60 1b8fa4a6d5c14ec9becef06082bce778 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 2f8aa8ff20b441949d7339dbb7686a37 -msgid "Discord logo" -msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" diff --git a/docs/locales/ja/LC_MESSAGES/znames.mo b/docs/locales/ja/LC_MESSAGES/znames.mo index d501a7319..c96b910b3 100644 Binary files a/docs/locales/ja/LC_MESSAGES/znames.mo and b/docs/locales/ja/LC_MESSAGES/znames.mo differ diff --git a/docs/locales/ja/LC_MESSAGES/znames.po b/docs/locales/ja/LC_MESSAGES/znames.po index 54cdca9d0..efdd351ab 100644 --- a/docs/locales/ja/LC_MESSAGES/znames.po +++ b/docs/locales/ja/LC_MESSAGES/znames.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PyMuPDF 1.23.0rc1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-01 16:48+0100\n" +"POT-Creation-Date: 2025-04-17 15:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Suzan Sanver \n" "Language: ja\n" @@ -19,27 +19,27 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ../../header.rst:-1 56f684c8509f440f8763f76c64d62cab +#: ../../header.rst:-1 0f9441fa95204b209542b6195fa33e94 msgid "Artifex" msgstr "" -#: ../../header.rst:-1 41d31ae777ea47d5a7472ed30feb1dbb +#: ../../header.rst:-1 b494c998c5e441c78282bc408dffff8c msgid "" "PyMuPDF is a high-performance Python library for data extraction, " "analysis, conversion & manipulation of PDF (and other) documents." msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" -#: ../../header.rst:-1 c61d6c020b9c4db0b2335c5d57697d3d +#: ../../header.rst:-1 6067a6dd9e5242e4b0ce1d3b3ce3b293 msgid "" "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, " "PDF Splitting, PDF Creation, Pyodide, PyScript" msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript" -#: ../../znames.rst:7 7dde67597b46443d9a6fcac4edccd5b8 +#: ../../znames.rst:7 873beb2a37544c07b1a5e70eca5650fe msgid "Deprecated Names" msgstr "非推奨の名前" -#: ../../znames.rst:9 de85276ae1e941299782ebd8ef58d1ef +#: ../../znames.rst:9 78ca6b2b094c43dab0f3efb7a1340a0f msgid "" "The original naming convention for methods and properties has been " "\"camelCase\". Since its creation around 2013, a tremendous increase of " @@ -49,14 +49,14 @@ msgid "" "guess." msgstr "メソッドやプロパティの元々の命名規則は「camelCase」でした。その創造以来、PyMuPDFでの機能の著しい増加がありました。それに伴い、クラス、メソッド、プロパティも対応するように増加しました。多くの場合、これにより直感に反した、論理的でなく見栄えのしない名前が生まれ、覚えたり推測したりが難しくなりました。" -#: ../../znames.rst:11 3144ee3b25884e81a555ce5fee11a487 +#: ../../znames.rst:11 96fde94d6cb6460bb374c4c18ab3c5f2 msgid "" "A few versions ago, I therefore decided to shift gears and switch to a " "\"snake_cased\" naming standard. This was a major effort, which needed a " "step-wise approach. I think am done with it now (version 1.18.14)." msgstr "数バージョン前、私はゆえに、段階的なアプローチが必要な大規模な取り組みであったにもかかわらず、「snake_cased」の命名規則に切り替えることを決定しました。これは大きな努力が必要でした。今はそれが完了したと思っています(バージョン1.18.14)。" -#: ../../znames.rst:14 3f9d9f7355804bc2bde84498e0d40278 +#: ../../znames.rst:14 f1aba321b49d4a50b23fd84d5435c403 msgid "" "The following list maps deprecated names to their new versions. For " "example, property `pageCount` became `page_count` in the :ref:`Document` " @@ -68,13 +68,13 @@ msgstr "" "となりました。また、より明らかでない名前の変更もあります。例えば、メソッドである `getPNGdata` は :ref:`Pixmap` " "クラス内で `tobytes` という名前に変更されました。" -#: ../../znames.rst:16 1a72a22997b744bea7f12b233c6040db +#: ../../znames.rst:16 da72cacf26b1418ebcdd799307695e7f msgid "" "Names of classes (camel case) and package-wide constants (the majority is" " upper case) remain untouched." msgstr "クラスの名前(キャメルケース)やパッケージ全体の定数(大部分は大文字)については、触れずに残ります。" -#: ../../znames.rst:18 e2f2f25d0545459788e7b392dd506f4d +#: ../../znames.rst:18 8caf5f400d46465da41396c978125459 msgid "" "Old names will remain available as deprecated aliases through MuPDF " "version 1.19.0 and **be removed** in the version that follows it - " @@ -83,7 +83,7 @@ msgstr "" "古い名前は、MuPDFバージョン1.19.0まで非推奨のエイリアスとして利用可能であり、その後のバージョン(おそらくバージョン1.20.0ですが、これは上流の決定(MuPDF)に依存します)で" " **削除されます** 。" -#: ../../znames.rst:20 de6071f94dd04dc9a402935ff7859881 +#: ../../znames.rst:20 196848a51a5e49d58753a2b5715c07b8 msgid "" "Starting with version 1.19.0, we will issue deprecation warnings on " "`sys.stderr` like `Deprecation: 'newPage' removed from class 'Document' " @@ -94,7 +94,7 @@ msgstr "" "`Deprecation: 'newPage'はクラス 'Document'からv1.19.0以降で削除されました - 'new_page'` " "を使用してください。非推奨のプロパティを使用した場合、このタイプの警告は発生しません。" -#: ../../znames.rst:22 b9cd42a979c245cd89124929acd4fd73 +#: ../../znames.rst:22 fd326a4ad3c94bfb8d5f9569d40f630d msgid "" "Starting immediately, all deprecated objects (methods and properties) " "will show a copy of the original's docstring, **prefixed** with the " @@ -103,7 +103,7 @@ msgstr "" "直ちに、すべての非推奨のオブジェクト(メソッドとプロパティ)は、元のドキュメント文字列のコピーが表示され、その前に非推奨のメッセージが " "**付加されます** 。例:" -#: ../../znames.rst:39 c23dcd7e32934976ad64724b88fc73a1 +#: ../../znames.rst:39 7ba1507fe4c94e149d0b1642bd1f770f msgid "" "There is a utility script `alias-changer.py `_ which can be used to " @@ -116,14 +116,10 @@ msgstr "" "Utilities/tree/master/alias-changer.py>` " "があり、スクリプト内で大量の名前変更を行うために使用できます。単一のファイルまたはフォルダを引数として受け入れます。フォルダが指定された場合、そのフォルダ内のすべてのPythonファイルおよびそのサブフォルダのファイルが変更されます。必要に応じて、スクリプトのバックアップを取ることもできます。" -#: ../../footer.rst:60 905d62566092434d9b5e28b70c6d7d50 +#: ../../footer.rst:60 317892866ae648e99963bb6a51525df6 msgid "This documentation covers all versions up to |version|." msgstr "このドキュメントは |version| までのすべてのバージョンを対象としています。" -#: ../../footer.rst:-1 b6ba33a0686a4632b501b212526a69f5 -msgid "Discord logo" -msgstr "" - #~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。" #~ msgstr "" @@ -788,3 +784,6 @@ msgstr "" #~ msgid ":index:`xrefStreamRaw` -- :meth:`Document.xref_stream_raw`" #~ msgstr "" +#~ msgid "Discord logo" +#~ msgstr "" + diff --git a/docs/matrix.rst b/docs/matrix.rst index 2fb9d431d..91c0bb1c7 100644 --- a/docs/matrix.rst +++ b/docs/matrix.rst @@ -9,7 +9,7 @@ Matrix Matrix is a row-major 3x3 matrix used by image transformations in MuPDF (which complies with the respective concepts laid down in the :ref:`AdobeManual`). With matrices you can manipulate the rendered image of a page in a variety of ways: (parts of) the page can be rotated, zoomed, flipped, sheared and shifted by setting some or all of just six float values. -Since all points or pixels live in a two-dimensional space, one column vector of that matrix is a constant unit vector, and only the remaining six elements are used for manipulations. These six elements are usually represented by *[a, b, c, d, e, f]*. Here is how they are positioned in the matrix: +Since all points or pixels live in a two-dimensional space, one column vector of that matrix is a constant unit vector, and only the remaining six elements are used for manipulations. These six elements are usually represented by `[a, b, c, d, e, f]`. Here is how they are positioned in the matrix: .. image:: images/img-matrix.* @@ -220,6 +220,34 @@ Here are examples that illustrate some of the achievable effects. All pictures s .. image:: images/img-matrix-7.* :scale: 66 +9. Show some effects on a rectangle:: + import pymupdf + + # just definitions and a temp PDF + RED = (1, 0, 0) + BLUE = (0, 0, 1) + GREEN = (0, 1, 0) + doc = pymupdf.open() + page = doc.new_page() + + # rectangle + r1 = pymupdf.Rect(100, 100, 200, 200) + + # scales down by 50% in x- and up by 50% in y-direction + mat1 = pymupdf.Matrix(0.5, 1.5) + + # shifts by 50 in both directions + mat2 = pymupdf.Matrix(1, 0, 0, 1, 50, 50) + + # draw corresponding rectangles + page.draw_rect(r1, color=RED) # original + page.draw_rect(r1 * mat1, color=GREEN) # scaled + page.draw_rect(r1 * mat2, color=BLUE) # shifted + doc.ez_save("matrix-effects.pdf") + + +.. image:: images/img-matrix-9.* + :scale: 66 .. include:: footer.rst diff --git a/docs/module.rst b/docs/module.rst index c3a61b8a0..47b33d306 100644 --- a/docs/module.rst +++ b/docs/module.rst @@ -21,9 +21,9 @@ The command-line interface can be invoked in two ways. pymupdf -* Or use Python's `-m` switch with PyMuPDF's `fitz` module:: +* Or use Python's `-m` switch with PyMuPDF's `pymupdf` module:: - python -m fitz + python -m pymupdf .. highlight:: python @@ -63,7 +63,7 @@ Cleaning and Copying This command will optimize the PDF and store the result in a new file. You can use it also for encryption, decryption and creating sub documents. It is mostly similar to the MuPDF command line utility *"mutool clean"*:: pymupdf clean -h - usage: fitz clean [-h] [-password PASSWORD] + usage: pymupdf clean [-h] [-password PASSWORD] [-encryption {keep,none,rc4-40,rc4-128,aes-128,aes-256}] [-owner OWNER] [-user USER] [-garbage {0,1,2,3,4}] [-compress] [-ascii] [-linear] [-permission PERMISSION] @@ -103,7 +103,7 @@ Extracting Fonts and Images Extract fonts or images from selected PDF pages to a desired directory:: pymupdf extract -h - usage: fitz extract [-h] [-images] [-fonts] [-output OUTPUT] [-password PASSWORD] + usage: pymupdf extract [-h] [-images] [-fonts] [-output OUTPUT] [-password PASSWORD] [-pages PAGES] input @@ -134,7 +134,7 @@ Joining PDF Documents To join several PDF files specify:: pymupdf join -h - usage: fitz join [-h] -output OUTPUT [input [input ...]] + usage: pymupdf join [-h] -output OUTPUT [input [input ...]] ---------------------------- join PDF documents --------------------------- @@ -164,7 +164,7 @@ Example: To join the following files and store the result as **output.pdf** enter this command: -*pymupdf join -o output.pdf file1.pdf,,N-1 file2.pdf,secret,N,1 file3.pdf,,5-N* +``pymupdf join -o output.pdf file1.pdf,,N-1 file2.pdf,secret,N,1 file3.pdf,,5-N`` Low Level Information @@ -173,7 +173,7 @@ Low Level Information Display PDF internal information. Again, there are similarities to *"mutool show"*:: pymupdf show -h - usage: fitz show [-h] [-password PASSWORD] [-catalog] [-trailer] [-metadata] + usage: pymupdf show [-h] [-password PASSWORD] [-catalog] [-trailer] [-metadata] [-xrefs XREFS] [-pages PAGES] input @@ -250,7 +250,7 @@ Information Show the embedded file names (long or short format):: pymupdf embed-info -h - usage: fitz embed-info [-h] [-name NAME] [-detail] [-password PASSWORD] input + usage: pymupdf embed-info [-h] [-name NAME] [-detail] [-password PASSWORD] input --------------------------- list embedded files --------------------------- @@ -299,7 +299,7 @@ Extraction Extract an embedded file like this:: pymupdf embed-extract -h - usage: fitz embed-extract [-h] -name NAME [-password PASSWORD] [-output OUTPUT] + usage: pymupdf embed-extract [-h] -name NAME [-password PASSWORD] [-output OUTPUT] input ---------------------- extract embedded file to disk ---------------------- @@ -323,7 +323,7 @@ Deletion Delete an embedded file like this:: pymupdf embed-del -h - usage: fitz embed-del [-h] [-password PASSWORD] [-output OUTPUT] -name NAME input + usage: pymupdf embed-del [-h] [-password PASSWORD] [-output OUTPUT] -name NAME input --------------------------- delete embedded file -------------------------- @@ -343,7 +343,7 @@ Insertion Add a new embedded file using this command:: pymupdf embed-add -h - usage: fitz embed-add [-h] [-password PASSWORD] [-output OUTPUT] -name NAME -path + usage: pymupdf embed-add [-h] [-password PASSWORD] [-output OUTPUT] -name NAME -path PATH [-desc DESC] input @@ -367,7 +367,7 @@ Updates Update an existing embedded file using this command:: pymupdf embed-upd -h - usage: fitz embed-upd [-h] -name NAME [-password PASSWORD] [-output OUTPUT] + usage: pymupdf embed-upd [-h] -name NAME [-password PASSWORD] [-output OUTPUT] [-path PATH] [-filename FILENAME] [-ufilename UFILENAME] [-desc DESC] input @@ -397,7 +397,7 @@ Copying Copy embedded files between PDFs:: pymupdf embed-copy -h - usage: fitz embed-copy [-h] [-password PASSWORD] [-output OUTPUT] -source + usage: pymupdf embed-copy [-h] [-password PASSWORD] [-output OUTPUT] -source SOURCE [-pwdsource PWDSOURCE] [-name [NAME [NAME ...]]] input @@ -443,7 +443,7 @@ After each page of the output file, a formfeed character, `hex(12)` is written - Command:: pymupdf gettext -h - usage: fitz gettext [-h] [-password PASSWORD] [-mode {simple,blocks,layout}] [-pages PAGES] [-noligatures] + usage: pymupdf gettext [-h] [-password PASSWORD] [-mode {simple,blocks,layout}] [-pages PAGES] [-noligatures] [-convert-white] [-extra-spaces] [-noformfeed] [-skip-empty] [-output OUTPUT] [-grid GRID] [-fontsize FONTSIZE] input @@ -479,7 +479,7 @@ Command:: * **noligatures:** (bool) corresponds to **not** :data:`TEXT_PRESERVE_LIGATURES`. If specified, ligatures (present in advanced fonts: glyphs combining multiple characters like "fi") are split up into their components (i.e. "f", "i"). Default is passing them through. * **convert-white:** corresponds to **not** :data:`TEXT_PRESERVE_WHITESPACE`. If specified, all white space characters (like tabs) are replaced with one or more spaces. Default is passing them through. * **extra-spaces:** (bool) corresponds to **not** :data:`TEXT_INHIBIT_SPACES`. If specified, large gaps between adjacent characters will be filled with one or more spaces. Default is off. -* **noformfeed:** (bool) instead of `hex(12)` (formfeed), write linebreaks `\n` at end of output pages. +* **noformfeed:** (bool) instead of `hex(12)` (formfeed), write linebreaks ``\n`` at end of output pages. * **skip-empty:** (bool) skip pages with no text. * **grid:** lines with a vertical coordinate difference of no more than this value (in points) will be merged into the same output line. Only relevant for "layout" mode. **Use with care:** 3 or the default 2 should be adequate in most cases. If **too large**, lines that are *intended* to be different in the original may be merged and will result in garbled and / or incomplete output. If **too low**, artifact separate output lines may be generated for some spans in the input line, just because they are coded in a different font with slightly deviating properties. * **fontsize:** include text with :data:`fontsize` larger than this value only (default 3). Only relevant for "layout" option. diff --git a/docs/outline.rst b/docs/outline.rst index 31c686193..f37d6d331 100644 --- a/docs/outline.rst +++ b/docs/outline.rst @@ -6,7 +6,7 @@ Outline ================ -*outline* (or "bookmark"), is a property of *Document*. If not *None*, it stands for the first outline item of the document. Its properties in turn define the characteristics of this item and also point to other outline items in "horizontal" or downward direction. The full tree of all outline items for e.g. a conventional table of contents (TOC) can be recovered by following these "pointers". +The document outline (otherwise known as "bookmarks") is a property of :ref:`Document` (see :attr:`Document.outline`). If not ``None``, it stands for the first outline item of the document. Its properties in turn define the characteristics of this item and also point to other outline items in "horizontal" or downward direction. The full tree of all outline items for e.g. a conventional table of contents (TOC) can be recovered by following these "pointers". ============================ ================================================== **Method / Attribute** **Short Description** @@ -27,13 +27,13 @@ Outline .. attribute:: down - The next outline item on the next level down. Is *None* if the item has no children. + The next outline item on the next level down. Is ``None`` if the item has no children. :type: :ref:`Outline` .. attribute:: next - The next outline item at the same level as this item. Is *None* if this is the last one in its level. + The next outline item at the same level as this item. Is ``None`` if this is the last one in its level. :type: `Outline` @@ -45,19 +45,19 @@ Outline .. attribute:: title - The item's title as a string or *None*. + The item's title as a string or ``None``. :type: str .. attribute:: is_open - Indicator showing whether any sub-outlines should be expanded (*True*) or be collapsed (*False*). This information is interpreted by PDF reader software. + Indicator showing whether any sub-outlines should be expanded (``True``) or be collapsed (``False``). This information is interpreted by PDF reader software. :type: bool .. attribute:: is_external - A bool specifying whether the target is outside (*True*) of the current document. + A bool specifying whether the target is outside (``True``) of the current document. :type: bool @@ -67,13 +67,13 @@ Outline be evaluated in conjunction with property `is_external`: * - `is_external` is true: `uri` points to some target outside the current - PDF, which may be an internet resource (`uri` starts with "http://" or - similar), another file (`uri` starts with "file:" or "file://") or some - other service like an e-mail address (`uri` starts with "mailto:"). + `is_external` is true: ``uri`` points to some target outside the current + PDF, which may be an internet resource (``uri`` starts with ``http://`` or + similar), another file (``uri`` starts with ``file:`` or ``file://``) or some + other service like an e-mail address (``uri`` starts with ``mailto:``). * - `is_external` is false: `uri` will be `None` or point to an + `is_external` is false: ``uri`` will be `None` or point to an internal location. In case of PDF documents, this should either be *#nnnn* to indicate a 1-based (!) page number *nnnn*, or a named location. The format varies for other document types, for example diff --git a/docs/page.rst b/docs/page.rst index 366021dd2..12704deba 100644 --- a/docs/page.rst +++ b/docs/page.rst @@ -62,6 +62,7 @@ In a nutshell, this is what you can do with PyMuPDF: :meth:`Page.annot_xrefs` PDF only: a list of annotation (and widget) xrefs :meth:`Page.annots` return a generator over the annots on the page :meth:`Page.apply_redactions` PDF only: process the redactions of the page +:meth:`Page.clip_to_rect` PDF only: remove page content outside a rectangle :meth:`Page.bound` rectangle of the page :meth:`Page.cluster_drawings` PDF only: bounding boxes of vector graphics :meth:`Page.delete_annot` PDF only: delete an annotation @@ -106,6 +107,7 @@ In a nutshell, this is what you can do with PyMuPDF: :meth:`Page.load_widget` PDF only: load a specific field :meth:`Page.load_links` return the first link on a page :meth:`Page.new_shape` PDF only: create a new :ref:`Shape` +:meth:`Page.recolor` PDF only: change the colorspace of objects :meth:`Page.remove_rotation` PDF only: set page rotation to 0 :meth:`Page.replace_image` PDF only: replace an image :meth:`Page.search_for` search for a string @@ -180,44 +182,63 @@ In a nutshell, this is what you can do with PyMuPDF: :returns: the created annotation. Stroke color yellow = (1, 1, 0), no fill color support. .. index:: - pair: color; add_freetext_annot - pair: fontname; add_freetext_annot - pair: fontsize; add_freetext_annot pair: rect; add_freetext_annot - pair: rotate; add_freetext_annot - pair: align; add_freetext_annot + pair: fontsize; add_freetext_annot + pair: fontname; add_freetext_annot pair: text_color; add_freetext_annot - pair: border_color; add_freetext_annot pair: fill_color; add_freetext_annot + pair: border_width; add_freetext_annot + pair: dashes; add_freetext_annot + pair: callout; add_freetext_annot + pair: line_end; add_freetext_annot + pair: opacity; add_freetext_annot + pair: align; add_freetext_annot + pair: rotate; add_freetext_annot + pair: richtext; add_freetext_annot + pair: style; add_freetext_annot + + .. method:: add_freetext_annot(rect, text, *, fontsize=11, fontname="helv", text_color=0, fill_color=None, border_width=0, dashes=None, callout=None, line_end=PDF_ANNOT_LE_OPEN_ARROW, opacity=1, align=TEXT_ALIGN_LEFT, rotate=0, richtext=False, style=None) + + PDF only: Add text in a given rectangle. Optionally, the appearance of a "callout" shape can be requested by specifying two or three point-like objects -- see below. - .. method:: add_freetext_annot(rect, text, fontsize=12, fontname="helv", border_color=None, text_color=0, fill_color=1, rotate=0, align=TEXT_ALIGN_LEFT) + :arg rect_like rect: the rectangle into which the text should be inserted. Text is automatically wrapped to a new line at box width. Text portions not fitting into the rectangle will be invisible without warning. - PDF only: Add text in a given rectangle. + :arg str text: the text. May contain any mixture of Latin, Greek, Cyrillic, Chinese, Japanese and Korean characters. If `richtext=True` (see below), the string is interpreted as HTML syntax. This adds a plethora of ways for attractive effects. - :arg rect_like rect: the rectangle into which the text should be inserted. Text is automatically wrapped to a new line at box width. Lines not fitting into the box will be invisible. + :arg float fontsize: the :data:`fontsize`. Default is 11. Ignored if `richtext=True`. - :arg str text: the text. May contain any mixture of Latin, Greek, Cyrillic, Chinese, Japanese and Korean characters. The respective required font is automatically determined. (New in v1.17.0) - :arg float fontsize: the :data:`fontsize`. Default is 12. - :arg str fontname: the font name. Default is "Helv". - Accepted alternatives are "Cour", "TiRo", "ZaDb" and "Symb". - The name may be abbreviated to the first two characters, like "Co" for "Cour". - Lower case is also accepted. - Bold or italic variants of the fonts are **not accepted** (changed in v1.16.0). - A user-contributed script provides a circumvention for this restriction -- see section *Using Buttons and JavaScript* in chapter :ref:`FAQ`. - The actual font to use is now determined on a by-character level, and all required fonts (or sub-fonts) are automatically included. - Therefore, you should rarely ever need to care about this parameter and let it default (except you insist on a serifed font for your non-CJK text parts). (New in v1.17.0) + :arg str fontname: The font name. Default is "Helv". Ignored if `richtext=True`, otherwise the following **restritions apply:** - :arg sequence,float text_color: the text color. Default is black. (New in v1.16.0) + * Accepted alternatives are "Helv" (Helvetica), "Cour" (Courier), "TiRo" (Timnes-Roman), "ZaDb" (ZapfDingBats) and "Symb" (Symbol). The name may be abbreviated to the first two characters, like "Co" for "Cour", lower case accepted. - :arg sequence,float fill_color: the fill color. Default is white. (New in v1.16.0) - :arg sequence,float text_color: the text color. Default is black. - :arg sequence,float border_color: the border color. Default is `None`. (New in v1.19.6) - :arg int align: text alignment, one of TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT - justify is **not supported**. (New in v1.17.0) + * Bold or italic variants of the fonts are **not supported.** + + :arg list,tuple,float text_color: the text color. Default is black. Ignored if `richtext=True`. - :arg int rotate: the text orientation. Accepted values are 0, 90, 270, invalid entries are set to zero. + :arg list,tuple,float fill_color: the fill color. This is used for ``rect`` and the end point of the callout lines when applicable. Default is ``None``. + + :arg list,tuple,float border_color: This parameter **only has an effect** if `richtext=True`. Otherwise, ``text_color`` is used. + + :arg float border_width: the width of border and ``callout`` lines. Default is 0 (no border), in which case callout lines may still appear with some hairline width, depending on the PDF viewer used. In any case, this value must be positive to see a border line. + + :arg list,tuple dashes: a list of floats specifying how border and callout lines should be dashed. Default is ``None``. + + :arg list,tuple callout: a list / tuple of two or three :data:`point_like` objects, which will be interpreted as end point [, knee point] and start point (in this sequence) of up to two line segments, converting this annotation into a call-out shape. + + :arg int line_end: the line end symbol of the call-out line. It is drawn at the first point specified in the `callout` list. Default is an open arrow. For possible values see :ref:`AnnotationLineEnds`. + + :arg float opacity: a float `0 <= opacity < 1` turning the annotation transparent. Default is no transparency. + + :arg int align: text alignment, one of TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT - justify is **not supported**. Ignored if `richtext=True`. + + :arg int rotate: the text orientation. Accepted values are integer multiples of 90°. Invalid entries receive a rotation of 0. + + :arg bool richtext: treat ``text`` as HTML syntax. This allows to achieve **bold**, *italic*, arbitrary text colors, font sizes, text alignment including justify and more - as far as the PDF subset of HTML and styling instructions supports this. This is similar to what happens in :meth:`Page.insert_htmlbox`. The base library will for example pull in required fonts if it encounters characters not contained in the standard ones. Some parameters are ignored if this option is set, as mentioned above. Default is ``False``. + + :arg str style: supply optional HTML styling information in CSS syntax. Ignored if `richtext=False`. :rtype: :ref:`Annot` - :returns: the created annotation. Color properties **can only be changed** using special parameters of :meth:`Annot.update`. There, you can also set a border color different from the text color. + :returns: the created annotation. |history_begin| @@ -225,7 +246,7 @@ In a nutshell, this is what you can do with PyMuPDF: |history_end| - .. method:: add_file_annot(pos, buffer, filename, ufilename=None, desc=None, icon="PushPin") + .. method:: add_file_annot(point, buffer_, filename, ufilename=None, desc=None, icon="PushPin") PDF only: Add a file attachment annotation with a "PushPin" icon at the specified location. @@ -281,32 +302,19 @@ In a nutshell, this is what you can do with PyMuPDF: .. method:: add_redact_annot(quad, text=None, fontname=None, fontsize=11, align=TEXT_ALIGN_LEFT, fill=(1, 1, 1), text_color=(0, 0, 0), cross_out=True) - **PDF only**: Add a redaction annotation. A redaction annotation identifies content to be removed from the document. Adding such an annotation is the first of two steps. It makes visible what will be removed in the subsequent step, :meth:`Page.apply_redactions`. + **PDF only**: Add a redaction annotation. A redaction annotation identifies an area whose content should be removed from the document. Adding such an annotation is the first of two steps. It makes visible what will be removed in the subsequent step, :meth:`Page.apply_redactions`. :arg quad_like,rect_like quad: specifies the (rectangular) area to be removed which is always equal to the annotation rectangle. This may be a :data:`rect_like` or :data:`quad_like` object. If a quad is specified, then the enveloping rectangle is taken. :arg str text: text to be placed in the rectangle after applying the redaction (and thus removing old content). (New in v1.16.12) - :arg str fontname: the font to use when *text* is given, otherwise ignored. The same rules apply as for :meth:`Page.insert_textbox` -- which is the method :meth:`Page.apply_redactions` internally invokes. The replacement text will be **vertically centered**, if this is one of the CJK or :ref:`Base-14-Fonts`. (New in v1.16.12) - - .. note:: - - * For an **existing** font of the page, use its reference name as *fontname* (this is *item[4]* of its entry in :meth:`Page.get_fonts`). - * For a **new, non-builtin** font, proceed as follows:: - - page.insert_text(point, # anywhere, but outside all redaction rectangles - "something", # some non-empty string - fontname="newname", # new, unused reference name - fontfile="...", # desired font file - render_mode=3, # makes the text invisible - ) - page.add_redact_annot(..., fontname="newname") + :arg str fontname: the font to use when ``text`` is given, otherwise ignored. Only CJK and the :ref:`Base-14-Fonts` are supported. Apart from this, the same rules apply as for :meth:`Page.insert_textbox` -- which is what the method :meth:`Page.apply_redactions` internally invokes. :arg float fontsize: the :data:`fontsize` to use for the replacing text. If the text is too large to fit, several insertion attempts will be made, gradually reducing the :data:`fontsize` to no less than 4. If then the text will still not fit, no text insertion will take place at all. (New in v1.16.12) - :arg int align: the horizontal alignment for the replacing text. See :meth:`insert_textbox` for available values. The vertical alignment is (approximately) centered if a PDF built-in font is used (CJK or :ref:`Base-14-Fonts`). (New in v1.16.12) + :arg int align: the horizontal alignment for the replacing text. See :meth:`insert_textbox` for available values. The vertical alignment is (approximately) centered. - :arg sequence fill: the fill color of the rectangle **after applying** the redaction. The default is *white = (1, 1, 1)*, which is also taken if *None* is specified. To suppress a fill color altogether, specify *False*. In this cases the rectangle remains transparent. (New in v1.16.12) + :arg sequence fill: the fill color of the rectangle **after applying** the redaction. The default is *white = (1, 1, 1)*, which is also taken if ``None`` is specified. To suppress a fill color altogether, specify ``False``. In this cases the rectangle remains transparent. (New in v1.16.12) :arg sequence text_color: the color of the replacing text. Default is *black = (0, 0, 0)*. (New in v1.16.12) @@ -324,7 +332,7 @@ In a nutshell, this is what you can do with PyMuPDF: |history_end| - .. method:: apply_redactions(images=PDF_REDACT_IMAGE_PIXELS|2, graphics=PDF_REDACT_LINE_ART_IF_TOUCHED|2, text=PDF_REDACT_TEXT_REMOVE|0) + .. method:: apply_redactions(images=PDF_REDACT_IMAGE_PIXELS|2, graphics=PDF_REDACT_LINE_ART_REMOVE_IF_TOUCHED|2, text=PDF_REDACT_TEXT_REMOVE|0) **PDF only**: Remove all **content** contained in any redaction rectangle on the page. @@ -332,7 +340,7 @@ In a nutshell, this is what you can do with PyMuPDF: :arg int images: How to redact overlapping images. The default (2) blanks out overlapping pixels. `PDF_REDACT_IMAGE_NONE | 0` ignores, and `PDF_REDACT_IMAGE_REMOVE | 1` completely removes images overlapping any redaction annotation. Option `PDF_REDACT_IMAGE_REMOVE_UNLESS_INVISIBLE | 3` only removes images that are actually visible. - :arg int graphics: How to redact overlapping vector graphics (also called "line-art" or "drawings"). The default (2) removes any overlapping vector graphics. `PDF_REDACT_LINE_ART_NONE | 0` ignores, and `PDF_REDACT_LINE_ART_IF_COVERED | 1` removes graphics fully contained in a redaction annotation. When removing line-art, please be aware that **stroked** vector graphics (i.e. type "s" or "sf") have a **larger wrapping rectangle** than one might expect: first of all, at least 50% of the path's line width have to be added in each direction to truly include all of the drawing. If a so-called "miter limit" is provided (see page 121 of the PDF specification), the enlarging value is `miter * width / 2`. So, when letting everything default (width = 1, miter = 10), the redaction rectangle should be at least 5 points larger in every direction. + :arg int graphics: How to redact overlapping vector graphics (also called "line-art" or "drawings"). The default (2) removes any overlapping vector graphics. `PDF_REDACT_LINE_ART_NONE | 0` ignores, and `PDF_REDACT_LINE_ART_REMOVE_IF_COVERED | 1` removes graphics fully contained in a redaction annotation. When removing line-art, please be aware that **stroked** vector graphics (i.e. type "s" or "sf") have a **larger wrapping rectangle** than one might expect: first of all, at least 50% of the path's line width have to be added in each direction to truly include all of the drawing. If a so-called "miter limit" is provided (see page 121 of the PDF specification), the enlarging value is `miter * width / 2`. So, when letting everything default (width = 1, miter = 10), the redaction rectangle should be at least 5 points larger in every direction. :arg int text: Whether to redact overlapping text. The default `PDF_REDACT_TEXT_REMOVE | 0` removes all characters whose boundary box overlaps any redaction rectangle. This complies with the original legal / data protection intentions of redaction annotations. Other use cases however may require to **keep text** while redacting vector graphics or images. This can be achieved by setting `text=True|PDF_REDACT_TEXT_NONE | 1`. This does **not comply** with the data protection intentions of redaction annotations. **Do so at your own risk.** @@ -349,7 +357,7 @@ In a nutshell, this is what you can do with PyMuPDF: * For option `images=PDF_REDACT_IMAGE_PIXELS` a new image of format PNG is created, which the page will use in place of the original one. The original image is not deleted or replaced as part of this process, so other pages may still show the original. In addition, the new, modified PNG image currently is **stored uncompressed**. Do keep these aspects in mind when choosing the right garbage collection method and compression options during save. - * **Text removal** is done by character: A character is removed if its bbox has a **non-empty overlap** with a redaction rectangle (changed in MuPDF v1.17). Depending on the font properties and / or the chosen line height, deletion may occur for undesired text parts. Using :meth:`Tools.set_small_glyph_heights` with a *True* argument before text search may help to prevent this. + * **Text removal** is done by character: A character is removed if its bbox has a **non-empty overlap** with a redaction rectangle (changed in MuPDF v1.17). Depending on the font properties and / or the chosen line height, deletion may occur for undesired text parts. Using :meth:`Tools.set_small_glyph_heights` with a ``True`` argument before text search may help to prevent this. * Redactions are a simple way to replace single words in a PDF, or to just physically remove them. Locate the word "secret" using some text extraction or search method and insert a redaction using "xxxxxx" as replacement text for each occurrence. @@ -414,14 +422,14 @@ In a nutshell, this is what you can do with PyMuPDF: the location(s) -- rectangle(s) or quad(s) -- to be marked. (Changed in v1.14.20) A list or tuple must consist of :data:`rect_like` or :data:`quad_like` items (or even a mixture of either). Every item must be finite, convex and not empty (as applicable). - **Set this parameter to** *None* if you want to use the following arguments (Changed in v1.16.14). - And vice versa: if not *None*, the remaining parameters must be *None*. + **Set this parameter to** ``None`` if you want to use the following arguments (Changed in v1.16.14). + And vice versa: if not ``None``, the remaining parameters must be ``None``. - :arg point_like start: start text marking at this point. Defaults to the top-left point of *clip*. Must be provided if `quads` is *None*. (New in v1.16.14) - :arg point_like stop: stop text marking at this point. Defaults to the bottom-right point of *clip*. Must be used if `quads` is *None*. (New in v1.16.14) + :arg point_like start: start text marking at this point. Defaults to the top-left point of *clip*. Must be provided if `quads` is ``None``. (New in v1.16.14) + :arg point_like stop: stop text marking at this point. Defaults to the bottom-right point of *clip*. Must be used if `quads` is ``None``. (New in v1.16.14) :arg rect_like clip: only consider text lines intersecting this area. Defaults to the page rectangle. Only use if `start` and `stop` are provided. (New in v1.16.14) - :rtype: :ref:`Annot` or *None* (changed in v1.16.14). + :rtype: :ref:`Annot` or ``None`` (changed in v1.16.14). :returns: the created annotation. If *quads* is an empty list, **no annotation** is created (changed in v1.16.14). .. note:: @@ -432,7 +440,7 @@ In a nutshell, this is what you can do with PyMuPDF: .. image:: images/img-markers.* :scale: 100 - .. method:: cluster_drawings(clip=None, drawings=None, x_tolerance=3, y_tolerance=3) + .. method:: cluster_drawings(clip=None, drawings=None, x_tolerance=3, y_tolerance=3, final_filter=True) Cluster vector graphics (synonyms are line-art or drawings) based on their geometrical vicinity. The method walks through the output of :meth:`Page.get_drawings` and joins paths whose `path["rect"]` are closer to each other than some tolerance values (given in the arguments). The result is a list of rectangles that each wrap things like tables (with gridlines), pie charts, bar charts, etc. @@ -440,9 +448,11 @@ In a nutshell, this is what you can do with PyMuPDF: :arg list drawings: (optional) provide a previously generated output of :meth:`Page.get_drawings`. If `None` the method will execute the method. - :arg float x_tolerance: + :arg float x_tolerance / y_tolerance: Assume vector graphics to be close enough neighbors for belonging to the same rectangle. Default is 3 points. + + :arg bool final_filter: If `True` (default), the method will to remove rectangles having width or height smaller than the respective tolerance value. If `False` no such filtering is done. - .. method:: find_tables(clip=None, strategy=None, vertical_strategy=None, horizontal_strategy=None, vertical_lines=None, horizontal_lines=None, snap_tolerance=None, snap_x_tolerance=None, snap_y_tolerance=None, join_tolerance=None, join_x_tolerance=None, join_y_tolerance=None, edge_min_length=3, min_words_vertical=3, min_words_horizontal=1, intersection_tolerance=None, intersection_x_tolerance=None, intersection_y_tolerance=None, text_tolerance=None, text_x_tolerance=None, text_y_tolerance=None, add_lines=None) + .. method:: find_tables(clip=None, strategy=None, vertical_strategy=None, horizontal_strategy=None, vertical_lines=None, horizontal_lines=None, snap_tolerance=None, snap_x_tolerance=None, snap_y_tolerance=None, join_tolerance=None, join_x_tolerance=None, join_y_tolerance=None, edge_min_length=3, min_words_vertical=3, min_words_horizontal=1, intersection_tolerance=None, intersection_x_tolerance=None, intersection_y_tolerance=None, text_tolerance=None, text_x_tolerance=None, text_y_tolerance=None, add_lines=None, add_boxes=None, paths=None) Find tables on the page and return an object with related information. Typically, the default values of the many parameters will be sufficient. Adjustments should ever only be needed in corner case situations. @@ -476,7 +486,11 @@ In a nutshell, this is what you can do with PyMuPDF: :arg float text_tolerance: Characters will be combined into words only if their distance is no larger than this value (points). Default is 3. Instead of this value, separate values can be specified for the dimensions using `text_x_tolerance` and `text_y_tolerance`. - :arg tuple,list add_lines: Specify a list of "lines" (i.e. pairs of :data:`point_like` objects) as **additional**, "virtual" vector graphics. These lines may help with table and / or cell detection and will not otherwise influence the detection strategy. Especially, in contrast to parameters `horizontal_lines` and `vertical_lines`, they will not prevent detecting rows or columns in other ways. These lines will be treated exactly like "real" vector graphics in terms of joining, snapping, intersectiing, minimum length and containment in the `clip` rectangle. Similarly, lines not parallel to any of the coordinate axes will be ignored. + :arg tuple,list add_lines: Specify a list of "lines" (i.e. pairs of :data:`point_like` objects) as **additional**, "virtual" vector graphics. These lines may help with table and / or cell detection and will not otherwise influence the detection strategy. Especially, in contrast to parameters `horizontal_lines` and `vertical_lines`, they will not prevent detecting rows or columns in other ways. These lines will be treated exactly like "real" vector graphics in terms of joining, snapping, intersecting, minimum length and containment in the `clip` rectangle. Similarly, lines not parallel to any of the coordinate axes will be ignored. + + :arg tuple,list add_boxes: Specify a list of rectangles (:data:`rect_like` objects) as **additional**, "virtual" vector graphics. These rectangles may help with table and / or cell detection and will not otherwise influence the detection strategy. Especially, in contrast to parameters `horizontal_lines` and `vertical_lines`, they will not prevent detecting rows or columns in other ways. These rectangles will be treated exactly like "real" vector graphics in terms of joining, snapping, intersecting, minimum length and containment in the `clip` rectangle. + + :arg list paths: list of vector graphics in the format as returned be :meth:`Page.get_drawings`. Using this parameter will prevent the method to extract vector graphics itself. This is useful if the vector graphics are already available. This can save execution time significantly. .. image:: images/img-findtables.* @@ -488,15 +502,15 @@ In a nutshell, this is what you can do with PyMuPDF: * The `Table` object has the following attributes: - * `bbox`: the bounding box of the table as a tuple `(x0, y0, x1, y1)`. - * `cells`: bounding boxes of the table's cells (list of tuples). A cell may also be `None`. - * `extract()`: this method returns the text content of each table cell as a list of list of strings. - * `to_markdown()`: this method returns the table as a **string in markdown format** (compatible to Github). Supporting viewers can render the string as a table. This output is optimized for **small token** sizes, which is especially beneficial for LLM/RAG feeds. Pandas DataFrames (see method `to_pandas()` below) offer an equivalent markdown table output which however is better readable for the human eye. - * `to_pandas()`: this method returns the table as a `pandas `_ `DataFrame `_. DataFrames are very versatile objects allowing a plethora of table manipulation methods and outputs to almost 20 well-known formats, among them Excel files, CSV, JSON, markdown-formatted tables and more. `DataFrame.to_markdown()` generates a Github-compatible markdown format optimized for human readability. This method however requires the package [tablutate](https://pypi.org/project/tabulate/) to installed in addition to pandas itself. + * ``bbox``: the bounding box of the table as a tuple `(x0, y0, x1, y1)`. + * ``cells``: bounding boxes of the table's cells (list of tuples). A cell may also be `None`. + * ``extract()``: this method returns the text content of each table cell as a list of list of strings. + * ``to_markdown()``: this method returns the table as a **string in markdown format** (compatible to Github). Markdown viewers can render the string as a table. This output is optimized for **small token** sizes, which is especially beneficial for LLM/RAG feeds. Pandas DataFrames (see method `to_pandas()` below) offer an equivalent markdown table output which however is better readable for the human eye. Any line breaks (``\n``) in cells are replaced by HTML line breaks tags `
`. + * `to_pandas()`: this method returns the table as a `pandas `_ `DataFrame `_. DataFrames are very versatile objects allowing a plethora of table manipulation methods and outputs to almost 20 well-known formats, among them Excel files, CSV, JSON, markdown-formatted tables and more. `DataFrame.to_markdown()` generates a Github-compatible markdown format optimized for human readability. This method however requires the package `tabulate `_ to be installed in addition to pandas itself. * ``header``: a `TableHeader` object containing header information of the table. - * `col_count`: an integer containing the number of table columns. - * `row_count`: an integer containing the number of table rows. - * `rows`: a list of `TableRow` objects containing two attributes, ``bbox`` is the boundary box of the row, and `cells` is a list of table cells contained in this row. + * ``col_count``: an integer containing the number of table columns. + * ``row_count``: an integer containing the number of table rows. + * ``rows``: a list of `TableRow` objects containing two attributes, ``bbox`` is the boundary box of the row, and `cells` is a list of table cells contained in this row. * The `TableHeader` object has the following attributes: @@ -507,10 +521,22 @@ In a nutshell, this is what you can do with PyMuPDF: Please have a look at these `Jupyter notebooks `_, which cover standard situations like multiple tables on one page or joining table fragments across multiple pages. - .. caution:: The lifetime of the TableFinder object, as well as that of all its tables **equals the lifetime of the page**. If the page object is deleted or reassigned, all tables are no longer valid. + .. caution:: The lifetime of the `TableFinder` object, as well as that of all its tables **equals the lifetime of the page**. If the page object is deleted or reassigned, all tables are no longer valid. The only way to keep table content beyond the page's availability is to **extract it** via methods `Table.to_markdown()`, `Table.to_pandas()` or a copy of `Table.extract()` (e.g. `Table.extract()[:]`). + .. note:: + + Once a table has been extracted to a **Pandas DataFrame** with `to_pandas()` it is easy to convert to other file types with the **Pandas API**: + + - table to Markdown, use `to_markdown `_ + - table to JSON, use: `to_json `_ + - table to Excel, use: `to_excel `_ + - table to CSV, use: `to_csv `_ + - table to HTML, use: `to_html `_ + - table to SQL, use: `to_sql `_ + + |history_begin| * New in version 1.23.0 @@ -525,23 +551,34 @@ In a nutshell, this is what you can do with PyMuPDF: .. method:: add_stamp_annot(rect, stamp=0) - PDF only: Add a "rubber stamp" like annotation to e.g. indicate the document's intended use ("DRAFT", "CONFIDENTIAL", etc.). + PDF only: Add a "rubber stamp" annotation to e.g. indicate the document's intended use ("DRAFT", "CONFIDENTIAL", etc.). The parameter may be either an integer to select text from a predefined array of standard texts or an image. :arg rect_like rect: rectangle where to place the annotation. + :arg multiple stamp: The following options are available: + + * The id number (int) of the stamp text. For available stamps see :ref:`StampIcons`. + + * A string specifying an image file path. - :arg int stamp: id number of the stamp text. For available stamps see :ref:`StampIcons`. + * A ``bytes``, ``bytearray`` or ``io.BytesIO`` object for an image in memory. - .. note:: + * A :ref:`Pixmap`. + + 1. **Text-based stamps** - * The stamp's text and its border line will automatically be sized and be put horizontally and vertically centered in the given rectangle. :attr:`Annot.rect` is automatically calculated to fit the given **width** and will usually be smaller than this parameter. + * :attr:`Annot.rect` is automatically calculated as the largest rectangle with an aspect ratio of ``width:height = 3.8`` that fits in the provided ``rect``. Its position is vertically and horizontally centered. * The font chosen is "Times Bold" and the text will be upper case. - * The appearance can be changed using :meth:`Annot.set_opacity` and by setting the "stroke" color (no "fill" color supported). - * This can be used to create watermark images: on a temporary PDF page create a stamp annotation with a low opacity value, make a pixmap from it with *alpha=True* (and potentially also rotate it), discard the temporary PDF page and use the pixmap with :meth:`insert_image` for your target PDF. + * The appearance can be modified using :meth:`Annot.set_opacity` and by setting the "stroke" color. By PDF specification, stamp annotations have no "fill" color. + .. image:: images/img-stampannot.* - .. image:: images/img-stampannot.* - :scale: 80 + 2. **Image-based stamps** + * The image is scaled to fit into the rectangle `rect` such that the image's center and the center of `rect` coincide. The aspect ratio of the image is preserved, so the image may not fill the entire rectangle. However, at least one of the given rectangle's width or height are fully covered. + * The annotation can be modified via :meth:`Annot.set_opacity`. This method therefore is a way to display images transparently even if no alpha channel is present. + * Setting colors has no effect on image stamps. + * Rotating image-based stamps **is not supported**. Setting the rotation may lead to unexpected results. + .. method:: add_widget(widget) PDF only: Add a PDF Form field ("widget") to a page. This also **turns the PDF into a Form PDF**. Because of the large amount of different options available for widgets, we have developed a new class :ref:`Widget`, which contains the possible PDF field attributes. It must be used for both, form field creation and updates. @@ -711,14 +748,15 @@ In a nutshell, this is what you can do with PyMuPDF: pair: morph; insert_text pair: overlay; insert_text pair: render_mode; insert_text + pair: miter_limit; insert_text pair: rotate; insert_text pair: stroke_opacity; insert_text pair: fill_opacity; insert_text pair: oc; insert_text - .. method:: insert_text(point, text, fontsize=11, fontname="helv", fontfile=None, idx=0, color=None, fill=None, render_mode=0, border_width=1, encoding=TEXT_ENCODING_LATIN, rotate=0, morph=None, stroke_opacity=1, fill_opacity=1, overlay=True, oc=0) + .. method:: insert_text(point, text, *, fontsize=11, fontname="helv", fontfile=None, idx=0, color=None, fill=None, render_mode=0, miter_limit=1, border_width=0.05, encoding=TEXT_ENCODING_LATIN, rotate=0, morph=None, stroke_opacity=1, fill_opacity=1, overlay=True, oc=0) - PDF only: Insert text starting at :data:`point_like` *point*. See :meth:`Shape.insert_text`. + PDF only: Insert text lines starting at :data:`point_like` ``point``. See :meth:`Shape.insert_text`. |history_begin| @@ -739,12 +777,13 @@ In a nutshell, this is what you can do with PyMuPDF: pair: morph; insert_textbox pair: overlay; insert_textbox pair: render_mode; insert_textbox + pair: miter_limit; insert_textbox pair: rotate; insert_textbox pair: stroke_opacity; insert_textbox pair: fill_opacity; insert_textbox pair: oc; insert_textbox - .. method:: insert_textbox(rect, buffer, fontsize=11, fontname="helv", fontfile=None, idx=0, color=None, fill=None, render_mode=0, border_width=1, encoding=TEXT_ENCODING_LATIN, expandtabs=8, align=TEXT_ALIGN_LEFT, charwidths=None, rotate=0, morph=None, stroke_opacity=1, fill_opacity=1, oc=0, overlay=True) + .. method:: insert_textbox(rect, buffer, *, fontsize=11, fontname="helv", fontfile=None, idx=0, color=None, fill=None, render_mode=0, miter_limit=1, border_width=1, encoding=TEXT_ENCODING_LATIN, expandtabs=8, align=TEXT_ALIGN_LEFT, charwidths=None, rotate=0, morph=None, stroke_opacity=1, fill_opacity=1, oc=0, overlay=True) PDF only: Insert text into the specified :data:`rect_like` *rect*. See :meth:`Shape.insert_textbox`. @@ -770,9 +809,9 @@ In a nutshell, this is what you can do with PyMuPDF: **PDF only:** Insert text into the specified rectangle. The method has similarities with methods :meth:`Page.insert_textbox` and :meth:`TextWriter.fill_textbox`, but is **much more powerful**. This is achieved by letting a :ref:`Story` object do all the required processing. - * Parameter `text` may be a string as in the other methods. But it will be **interpreted as HTML source** and may therefore also contain HTML language elements -- including styling. The `css` parameter may be used to pass in additional styling instructions. + * Parameter ``text`` may be a string as in the other methods. But it will be **interpreted as HTML source** and may therefore also contain HTML language elements -- including styling. The `css` parameter may be used to pass in additional styling instructions. - * Automatic line breaks are generated at word boundaries. The "soft hyphen" character `"­"` (or `­`) can be used to cause hyphenation and thus may also cause line breaks. **Forced** line breaks however are only achievable via the HTML tag `
` - `"\\n"` is ignored and will be treated like a space. + * Automatic line breaks are generated at word boundaries. The "soft hyphen" character `"­"` (or `­`) can be used to cause hyphenation and thus may also cause line breaks. **Forced** line breaks however are only achievable via the HTML tag ``
`` - ``\n`` is ignored and will be treated like a space. * With this method the following can be achieved: @@ -790,9 +829,9 @@ In a nutshell, this is what you can do with PyMuPDF: :arg rect_like rect: rectangle on page to receive the text. :arg str,Story text: the text to be written. Can contain a mixture of plain text and HTML tags with styling instructions. Alternatively, a :ref:`Story` object may be specified (in which case the internal Story generation step will be omitted). A Story must have been generated with all required styling and Archive information. - :arg str css: optional string containing additional CSS instructions. This parameter is ignored if `text` is a Story. + :arg str css: optional string containing additional CSS instructions. This parameter is ignored if ``text`` is a Story. :arg float scale_low: if necessary, scale down the content until it fits in the target rectangle. This sets the down scaling limit. Default is 0, no limit. A value of 1 means no down-scaling permitted. A value of e.g. 0.2 means maximum down-scaling by 80%. - :arg Archive archive: an Archive object that points to locations where to find images or non-standard fonts. If `text` refers to images or non-standard fonts, this parameter is required. This parameter is ignored if `text` is a Story. + :arg Archive archive: an Archive object that points to locations where to find images or non-standard fonts. If ``text`` refers to images or non-standard fonts, this parameter is required. This parameter is ignored if ``text`` is a Story. :arg int rotate: one of the values 0, 90, 180, 270. Depending on this, text will be filled: - 0: top-left to bottom-right. @@ -808,14 +847,24 @@ In a nutshell, this is what you can do with PyMuPDF: :returns: A tuple of floats `(spare_height, scale)`. - - `spare_height`: -1 if content did not fit, else >= 0. It is the height of the unused (still available) rectangle stripe. Positive only if scale = 1 (no down-scaling happened). - - `scale`: down-scaling factor, 0 < scale <= 1. + - spare_height: The (positive) height of the remaining space in `rect` below the + text, or -1 if we failed to fit. + - scale: The scaling required; `0 < scale <= 1`. Will be `scale_low` + if we failed to fit. - Please refer to examples in this section of the recipes: :ref:`RecipesText_I_c`. + Please refer to examples in this section of the recipes: :ref:`RecipesText_I_c`. |history_begin| - * New in v1.23.8; rebased-only. + * New in v1.26.5: + + * do additional scaling to fit long words. + * + If we succeeded and scaled down, the returned `spare_height` is now + generally positive instead of being fixed to zero, because the final + rect's height is usually not an exact multiple of the font line + height. + * New in v1.23.8: rebased-only. * New in v1.23.9: `opacity` parameter. |history_end| @@ -1366,22 +1415,22 @@ In a nutshell, this is what you can do with PyMuPDF: .. method:: get_text(option,*, clip=None, flags=None, textpage=None, sort=False, delimiters=None) - Retrieves the content of a page in a variety of formats. This is a wrapper for multiple :ref:`TextPage` methods by choosing the output option `opt` as follows: + Retrieves the content of a page in a variety of formats. Depending on the ``flags`` value, this may include text, images and several other object types. The method is a wrapper for multiple :ref:`TextPage` methods by choosing the output option `opt` as follows: - * "text" -- :meth:`TextPage.extractTEXT`, default - * "blocks" -- :meth:`TextPage.extractBLOCKS` - * "words" -- :meth:`TextPage.extractWORDS` - * "html" -- :meth:`TextPage.extractHTML` - * "xhtml" -- :meth:`TextPage.extractXHTML` - * "xml" -- :meth:`TextPage.extractXML` - * "dict" -- :meth:`TextPage.extractDICT` - * "json" -- :meth:`TextPage.extractJSON` - * "rawdict" -- :meth:`TextPage.extractRAWDICT` - * "rawjson" -- :meth:`TextPage.extractRAWJSON` + * "text" -- :meth:`TextPage.extractTEXT`, default. Always includes **text only.** + * "blocks" -- :meth:`TextPage.extractBLOCKS`. Includes text and **may** include image meta information. + * "words" -- :meth:`TextPage.extractWORDS`. Always includes **text only.** + * "html" -- :meth:`TextPage.extractHTML`. May include text and images. + * "xhtml" -- :meth:`TextPage.extractXHTML`. May include text and images. + * "xml" -- :meth:`TextPage.extractXML`. Always includes **text only.** + * "dict" -- :meth:`TextPage.extractDICT`. May include text and images. + * "json" -- :meth:`TextPage.extractJSON`. May include text and images. + * "rawdict" -- :meth:`TextPage.extractRAWDICT`. May include text and images. + * "rawjson" -- :meth:`TextPage.extractRAWJSON`. May include text and images. :arg str opt: A string indicating the requested format, one of the above. A mixture of upper and lower case is supported. If misspelled, option "text" is silently assumed. - :arg rect-like clip: restrict extracted text to this rectangle. If None, the full page is taken. Has **no effect** for options "html", "xhtml" and "xml". + :arg rect-like clip: restrict the extraction to this rectangle. If ``None`` (default), the visible part of the page is taken. Any content (text, images) that is **not fully contained** in ``clip`` will be completely omitted. To avoid clipping altogether use ``clip=pymupdf.INFINITE_RECT()``. Only then the extraction will contain all items. This parameter has **no effect** on options "html", "xhtml" and "xml". :arg int flags: indicator bits to control whether to include images or how text should be handled with respect to white spaces and :data:`ligatures`. See :ref:`TextPreserve` for available indicators and :ref:`text_extraction_flags` for default settings. (New in v1.16.2) @@ -1488,7 +1537,7 @@ In a nutshell, this is what you can do with PyMuPDF: **OCRed text is only available** to PyMuPDF's text extractions and searches if their `textpage` parameter specifies the output of this method. - `This `_ Jupyter notebook walks through an example for using OCR textpages. + `This Jupyter notebook `_ walks through an example for using OCR textpages. |history_begin| @@ -1532,8 +1581,8 @@ In a nutshell, this is what you can do with PyMuPDF: For paths other than groups or clips, key `"type"` takes one of the following values: - * **"f"** -- this is a *fill-only* path. Only key-values relevant for this operation have a meaning, not applicable ones are present with a value of *None*: `"color"`, `"lineCap"`, `"lineJoin"`, `"width"`, `"closePath"`, `"dashes"` and should be ignored. - * **"s"** -- this is a *stroke-only* path. Similar to previous, key `"fill"` is present with value *None*. + * **"f"** -- this is a *fill-only* path. Only key-values relevant for this operation have a meaning, not applicable ones are present with a value of ``None``: `"color"`, `"lineCap"`, `"lineJoin"`, `"width"`, `"closePath"`, `"dashes"` and should be ignored. + * **"s"** -- this is a *stroke-only* path. Similar to previous, key `"fill"` is present with value ``None``. * **"fs"** -- this is a path performing combined *fill* and *stroke* operations. Each item in `path["items"]` is one of the following: @@ -1545,7 +1594,7 @@ In a nutshell, this is what you can do with PyMuPDF: .. note::, quads and rectangles are more reliably recognized as such. (Starting with v1.19.2) - Using class :ref:`Shape`, you should be able to recreate the original drawings on a separate (PDF) page with high fidelity under normal, not too sophisticated circumstances. Please see the following comments on restrictions. A coding draft can be found in section "Extractings Drawings" of chapter :ref:`FAQ`. + Using class :ref:`Shape`, you should be able to recreate the original drawings on a separate (PDF) page with high fidelity under normal, not too sophisticated circumstances. Please see the following comments on restrictions. A coding draft can be found in :ref:`How to Extract Drawings `. Specifying `extended=True` significantly alters the output. Most importantly, new dictionary types are present: "clip" and "group". All paths will now be organized in a hierarchic structure which is encoded by the new integer key "level", the hierarchy level. Each group or clip establishes a new hierarchy, which applies to all subsequent paths having a *larger* level value. (New in v1.22.0) @@ -1651,31 +1700,34 @@ In a nutshell, this is what you can do with PyMuPDF: .. method:: get_image_info(hashes=False, xrefs=False) - Return a list of meta information dictionaries for all images shown on the page. This works for all document types. Technically, this is a subset of the dictionary output of :meth:`Page.get_text`: the image binary content and any text on the page are ignored. + Return a list of meta information dictionaries for all images displayed by the page. This works for all document types. :arg bool hashes: Compute the MD5 hashcode for each encountered image, which allows identifying image duplicates. This adds the key `"digest"` to the output, whose value is a 16 byte `bytes` object. (New in v1.18.13) - :arg bool xrefs: **PDF only.** Try to find the :data:`xref` for each image. Implies `hashes=True`. Adds the `"xref"` key to the dictionary. If not found, the value is 0, which means, the image is either "inline" or otherwise undetectable. Please note that this option has an extended response time, because the MD5 hashcode will be computed at least two times for each image with an xref. (New in v1.18.13) + :arg bool xrefs: **PDF only.** Try to find the :data:`xref` for each image. Implies `hashes=True`. Adds the `"xref"` key to the dictionary. If not found, the value is 0, which means, the image is either "inline" or its xref is undetectable for some reason. Please note that this option has an extended response time, because the MD5 hashcode will be computed at least two times for each image with an xref. (New in v1.18.13) :rtype: list[dict] - :returns: A list of dictionaries. This includes information for **exactly those** images, that are shown on the page -- including *"inline images"*. In contrast to images included in :meth:`Page.get_text`, image **binary content** is not loaded, which drastically reduces memory usage. The dictionary layout is similar to that of image blocks in `page.get_text("dict")`. + :returns: A list of dictionaries. This includes information for **exactly those** images, that are shown on the page -- including *"inline images"*. The dictionary layout is similar to that of image blocks in `page.get_text("dict")`. + + In contrast to images included in :meth:`Page.get_text`, image **binary content** is not loaded by this method, which drastically reduces memory usage. Another difference is that image detection is not restricted to the visible part of the page or any ``clip`` parameter: method :meth:`Page.get_text` will only extract images **fully contained** in the provided ``clip``. =============== =============================================================== **Key** **Value** =============== =============================================================== - number block number *(int)* + number block number (``int``) bbox image bbox on page, :data:`rect_like` - width original image width *(int)* - height original image height *(int)* - cs-name colorspace name *(str)* - colorspace colorspace.n *(int)* - xres resolution in x-direction *(int)* - yres resolution in y-direction *(int)* - bpc bits per component *(int)* - size storage occupied by image *(int)* - digest MD5 hashcode *(bytes)*, if *hashes* is true + width original image width (``int``) + height original image height (``int``) + cs-name colorspace name (``str``) + colorspace colorspace.n (``int``) + xres resolution in x-direction (``int``) [#f10]_ + yres resolution in y-direction (``int``) [#f10]_ + bpc bits per component (``int``) + size storage occupied by image (``int``) + digest MD5 hashcode (``bytes``), if ``hashes`` is true xref image :data:`xref` or 0, if *xrefs* is true transform matrix transforming image rect to bbox, :data:`matrix_like` + has-mask whether the image is transparent and has a mask (``bool``) =============== =============================================================== Multiple occurrences of the same image are always reported. You can detect duplicates by comparing their `digest` values. @@ -1759,7 +1811,7 @@ In a nutshell, this is what you can do with PyMuPDF: Create an SVG image from the page. Only full page images are currently supported. :arg matrix_like matrix: a matrix, default is :ref:`Identity`. - :arg bool text_as_path: -- controls how text is represented. *True* outputs each character as a series of elementary draw commands, which leads to a more precise text display in browsers, but a **very much larger** output for text-oriented pages. Display quality for *False* relies on the presence of the referenced fonts on the current system. For missing fonts, the internet browser will fall back to some default -- leading to unpleasant appearances. Choose *False* if you want to parse the text of the SVG. (New in v1.17.5) + :arg bool text_as_path: -- controls how text is represented. ``True`` outputs each character as a series of elementary draw commands, which leads to a more precise text display in browsers, but a **very much larger** output for text-oriented pages. Display quality for ``False`` relies on the presence of the referenced fonts on the current system. For missing fonts, the internet browser will fall back to some default -- leading to unpleasant appearances. Choose ``False`` if you want to parse the text of the SVG. (New in v1.17.5) :returns: a UTF-8 encoded string that contains the image. Because SVG has XML syntax it can be saved in a text file, the standard extension is `.svg`. @@ -1784,12 +1836,12 @@ In a nutshell, this is what you can do with PyMuPDF: :arg colorspace: The desired colorspace, one of "GRAY", "RGB" or "CMYK" (case insensitive). Or specify a :ref:`Colorspace`, ie. one of the predefined ones: :data:`csGRAY`, :data:`csRGB` or :data:`csCMYK`. :type colorspace: str or :ref:`Colorspace` :arg irect_like clip: restrict rendering to the intersection of this area with the page's rectangle. - :arg bool alpha: whether to add an alpha channel. Always accept the default *False* if you do not really need transparency. This will save a lot of memory (25% in case of RGB ... and pixmaps are typically **large**!), and also processing time. Also note an **important difference** in how the image will be rendered: with *True* the pixmap's samples area will be pre-cleared with *0x00*. This results in **transparent** areas where the page is empty. With *False* the pixmap's samples will be pre-cleared with *0xff*. This results in **white** where the page has nothing to show. + :arg bool alpha: whether to add an alpha channel. Always accept the default ``False`` if you do not really need transparency. This will save a lot of memory (25% in case of RGB ... and pixmaps are typically **large**!), and also processing time. Also note an **important difference** in how the image will be rendered: with ``True`` the pixmap's samples area will be pre-cleared with *0x00*. This results in **transparent** areas where the page is empty. With ``False`` the pixmap's samples will be pre-cleared with *0xff*. This results in **white** where the page has nothing to show. |history_begin| Changed in v1.14.17 - The default alpha value is now *False*. + The default alpha value is now ``False``. * Generated with *alpha=True* @@ -1869,7 +1921,7 @@ In a nutshell, this is what you can do with PyMuPDF: :arg str,int ident: the annotation name or xref. :rtype: :ref:`Annot` - :returns: the annotation or *None*. + :returns: the annotation or ``None``. .. note:: Methods :meth:`Page.annot_names`, :meth:`Page.annot_xrefs` provide lists of names or xrefs, respectively, from where an item may be picked and loaded via this method. @@ -1881,12 +1933,12 @@ In a nutshell, this is what you can do with PyMuPDF: .. method:: load_widget(xref) - PDF only: return the field identified by *xref*. + PDF only: return the field identified by :data:`xref`. :arg int xref: the field's xref. :rtype: :ref:`Widget` - :returns: the field or *None*. + :returns: the field or ``None``. .. note:: This is similar to the analogous method :meth:`Page.load_annot` -- except that here only the xref is supported as identifier. @@ -1901,7 +1953,7 @@ In a nutshell, this is what you can do with PyMuPDF: Return the first link on a page. Synonym of property :attr:`first_link`. :rtype: :ref:`Link` - :returns: first link on the page (or *None*). + :returns: first link on the page (or ``None``). .. index:: pair: rotate; set_rotation @@ -1912,6 +1964,26 @@ In a nutshell, this is what you can do with PyMuPDF: :arg int rotate: An integer specifying the required rotation in degrees. Must be an integer multiple of 90. Values will be converted to one of 0, 90, 180, 270. + .. method:: recolor(components=1) + + PDF only: Change the colorspace components of all objects on page. + + :arg int components: The desired count of color components. Must be one of 1, 3 or 4, which results in color spaces DeviceGray, DeviceRGB or DeviceCMYK respectively. The method affects text, images and vector graphics. For instance, with the default value 1, a page will be converted to grayscale. If a page is already grayscale, the method will not cause visible changes -- independent of the value of ``components``. + + These changes are **permanent** and cannot be reverted. + + .. method:: clip_to_rect(rect) + + PDF only: Permanently remove page content outside the given rectangle. This is similar to :meth:`Page.set_cropbox`, but the page's rectangle will not be changed, only the content outside the rectangle will be removed. + + :arg rect_like rect: The rectangle to clip to. Must be finite and its intersection with the page must not be empty. + + The method works best for text: All text on the page will be removed (decided by single character) that has no intersection with the rectangle. For vector graphics, the method will remove all paths that have no intersection with the rectangle. For images, the method will remove all images that have no intersection with the rectangle. Vectors and images **having** an intersection with the rectangle, will be kept in their entirety. + + The method roughly has the same effect as if four redactions had been applied that cover the rectangle's outside. + + * New in v1.26.4. + .. method:: remove_rotation() PDF only: Set page rotation to 0 while maintaining appearance and page content. @@ -1928,11 +2000,11 @@ In a nutshell, this is what you can do with PyMuPDF: .. method:: show_pdf_page(rect, docsrc, pno=0, keep_proportion=True, overlay=True, oc=0, rotate=0, clip=None) - PDF only: Display a page of another PDF as a **vector image** (otherwise similar to :meth:`Page.insert_image`). This is a multi-purpose method. For example, you can use it to: + PDF only: Display a page of another PDF. This is similar to :meth:`Page.insert_image` but the source page will appear like a copy of itself and will not be rasterized. This is a multi-purpose method. For example, you can use it to: * create "n-up" versions of existing PDF files, combining several input pages into **one output page** (see example `combine.py `_), * create "posterized" PDF files, i.e. every input page is split up in parts which each create a separate output page (see `posterize.py `_), - * include PDF-based vector images like company logos, watermarks, etc., see `svg-logo.py `_, which puts an SVG-based logo on each page (requires additional packages to deal with SVG-to-PDF conversions). + * include PDF-based vector images like company logos, watermarks, etc., see `svg-logo.py `_, which puts an SVG-based logo on each page. :arg rect_like rect: where to place the image on current page. Must be finite and its intersection with the page must not be empty. :arg docsrc: source PDF document containing the page. Must be a different document object, but may be the same file. @@ -1949,7 +2021,7 @@ In a nutshell, this is what you can do with PyMuPDF: :arg rect_like clip: choose which part of the source page to show. Default is the full page, else must be finite and its intersection with the source page must not be empty. - .. note:: In contrast to method :meth:`Document.insert_pdf`, this method does not copy annotations, widgets or links, so these are not included in the target [#f6]_. But all its **other resources (text, images, fonts, etc.)** will be imported into the current PDF. They will therefore appear in text extractions and in :meth:`get_fonts` and :meth:`get_images` lists -- even if they are not contained in the visible area given by *clip*. + .. note:: In contrast to method :meth:`Document.insert_pdf`, this method does not copy annotations, widgets or links, so these objects are not included in the target [#f6]_. But all its **other resources (text, images, fonts, etc.)** will be imported into the current PDF. They will therefore appear in text extractions and in :meth:`get_fonts` and :meth:`get_images` lists -- even if they are not contained in the visible area given by *clip*. Example: Show the same source page, rotated by 90 and by -90 degrees: @@ -2175,19 +2247,19 @@ In a nutshell, this is what you can do with PyMuPDF: .. attribute:: first_link - Contains the first :ref:`Link` of a page (or *None*). + Contains the first :ref:`Link` of a page (or ``None``). :type: :ref:`Link` .. attribute:: first_annot - Contains the first :ref:`Annot` of a page (or *None*). + Contains the first :ref:`Annot` of a page (or ``None``). :type: :ref:`Annot` .. attribute:: first_widget - Contains the first :ref:`Widget` of a page (or *None*). + Contains the first :ref:`Widget` of a page (or ``None``). :type: :ref:`Widget` @@ -2236,7 +2308,7 @@ Each entry of the :meth:`Page.get_links` list is a dictionary with the following * *uri*: a string specifying the destination internet resource. Required for *LINK_URI*, else ignored. You should make sure to start this string with an unambiguous substring, that classifies the subtype of the URL, like `"http://"`, `"https://"`, `"file://"`, `"ftp://"`, `"mailto:"`, etc. Otherwise your browser will try to interpret the text and come to unwanted / unexpected conclusions about the intended URL type. -* *xref*: an integer specifying the PDF :data:`xref` of the link object. Do not change this entry in any way. Required for link deletion and update, otherwise ignored. For non-PDF documents, this entry contains *-1*. It is also *-1* for **all** entries in the *get_links()* list, if **any** of the links is not supported by MuPDF - see :ref:`notes_on_supporting_links`. +* :data:`xref`: an integer specifying the PDF :data:`xref` of the link object. Do not change this entry in any way. Required for link deletion and update, otherwise ignored. For non-PDF documents, this entry contains *-1*. It is also *-1* for **all** entries in the *get_links()* list, if **any** of the links is not supported by MuPDF - see :ref:`notes_on_supporting_links`. .. _notes_on_supporting_links: @@ -2280,20 +2352,171 @@ This is an overview of homologous methods on the :ref:`Document` and on the :ref ====================================== ===================================== **Document Level** **Page Level** ====================================== ===================================== -*Document.get_page_fonts(pno)* :meth:`Page.get_fonts` -*Document.get_page_images(pno)* :meth:`Page.get_images` -*Document.get_page_pixmap(pno, ...)* :meth:`Page.get_pixmap` -*Document.get_page_text(pno, ...)* :meth:`Page.get_text` -*Document.search_page_for(pno, ...)* :meth:`Page.search_for` +:meth:`Document.get_page_fonts` :meth:`Page.get_fonts` +:meth:`Document.get_page_images` :meth:`Page.get_images` +:meth:`Document.get_page_pixmap` :meth:`Page.get_pixmap` +:meth:`Document.get_page_text` :meth:`Page.get_text` +:meth:`Document.search_page_for` :meth:`Page.search_for` ====================================== ===================================== -The page number "pno" is a 0-based integer `-∞ < pno < page_count`. - .. note:: Most document methods (left column) exist for convenience reasons, and are just wrappers for: *Document[pno].*. So they **load and discard the page** on each execution. - However, the first two methods work differently. They only need a page's object definition statement - the page itself will **not** be loaded. So e.g. :meth:`Page.get_fonts` is a wrapper the other way round and defined as follows: *page.get_fonts == page.parent.get_page_fonts(page.number)*. + However, the first two methods work differently. They only need a page's object definition statement - the page itself will **not** be loaded. So e.g. :meth:`Page.get_fonts` is a wrapper the other way round and defined as follows: `page.get_fonts` == `page.parent.get_page_fonts(page.number)`. + + +When calling the :ref:`Document` equivalent methods then the page number is sent through as a parameter, e.g.: + +`Document.get_page_images(pno)` or `Document.get_page_text(pno)` + +.. tip:: + + The page number parameter, ``pno``, is a 0-based integer `-∞ < pno < page_count`. + + + + + +Tables and Related Classes +------------------------------------ + +The `TableFinder` class is returned by :meth:`Page.find_tables` and has related classes as follows: + + +.. class:: TableFinder + + An object always returned by :meth:`Page.find_tables`. Attributes of interest: + + .. attribute:: tables + + A list of :class:`Table` objects, each of which represents a table found on the page. An empty list if no tables are found. + + .. attribute:: page + + A reference to the :ref:`Page` object. + + :type: :ref:`Page` + + +.. class:: Table + + An object representing a table found on the page. + + + .. attribute:: page + + A back-reference to the owning page. + + :type: :ref:`Page` + + .. attribute:: cells + + An array of `Rect` objects for each cell in the table. + + :type: list + + + .. attribute:: header + + A `TableHeader` object. + + :type: `TableHeader` + + + .. attribute:: bbox + + The bounding box of all cells of the table header. + + + :type: :ref:`Rect` + + + + .. attribute:: row_count + + Number of rows in the table. + + :type: int + + + .. attribute:: col_count + + Number of columns in the table. + + :type: int + + + .. attribute:: rows + + An array of `TableRow` objects for each row in the table. + + :type: list + + + .. method:: extract() + + Extracts table cell text data into a list. + + :type: list + + .. method:: to_markdown(clean=False, fill_empty=True) + + Extracts table data into Markdown text format. + + + :arg bool clean: If ``True`` then markdown syntax is removed from cell content. + :arg bool fill_empty: If ``True`` then cell content `None` is replaced by the values above (columns) or left (rows) in an effort to approximate row and columns spans. + + + :type: string + + + .. method:: to_pandas() + + Return a `pandas DataFrame `_ `DataFrame `_ version of the table. + + :type: pandas DataFrame + + + +.. class:: TableHeader + + + Dedicated class for table headers. + + .. attribute:: bbox + + The bounding box of the union of cells belonging to the table header, given as a tuple (x0, y0, x1, y1). This rectangle contains all table header cells. + + :type: :ref:`Rect` + + .. attribute:: cells + + A list of tuples for each bbox of a column header. + + :type: list + + .. attribute:: names + + A list of strings with column header text. + + :type: list + + .. attribute:: external + + A boolean indicating whether the header is outside the table cells. + + :type: `bool` + + +.. class:: TableRow + + Dedicated class for table rows. + + +---- + .. rubric:: Footnotes @@ -2315,4 +2538,6 @@ The page number "pno" is a 0-based integer `-∞ < pno < page_count`. .. [#f9] Objects inside the source page, like images, text or drawings, are never aware of whether their owning page now is under OC control inside the target PDF. If source page objects are OC-controlled in the source PDF, then this will not be retained on the target: they will become unconditionally visible. +.. [#f10] This value is always 96, the default of the PDF interpreter. It **does not reflect** the resolution of the image itself. If you need the image's resolution, use the :meth:`Pixmap.xres` and :meth:`Pixmap.yres` attributes of the :ref:`Pixmap` created from the image binary. + .. include:: footer.rst diff --git a/docs/pixmap.rst b/docs/pixmap.rst index 75251aeec..679773622 100644 --- a/docs/pixmap.rst +++ b/docs/pixmap.rst @@ -33,8 +33,9 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". :meth:`Pixmap.invert_irect` invert the pixels of a given area :meth:`Pixmap.pdfocr_save` save the pixmap as an OCRed 1-page PDF :meth:`Pixmap.pdfocr_tobytes` save the pixmap as an OCRed 1-page PDF -:meth:`Pixmap.pil_save` save as image using pillow -:meth:`Pixmap.pil_tobytes` write to `bytes` object using pillow +:meth:`Pixmap.pil_image` create a Pillow Image +:meth:`Pixmap.pil_save` save as a Pillow Image +:meth:`Pixmap.pil_tobytes` write to `bytes` as a Pillow Image :meth:`Pixmap.pixel` return the value of a pixel :meth:`Pixmap.save` save the pixmap in a variety of formats :meth:`Pixmap.set_alpha` set alpha values @@ -80,17 +81,17 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". :arg irect_like irect: The pixmap's position and dimension. - :arg bool alpha: Specifies whether transparency bytes should be included. Default is *False*. + :arg bool alpha: Specifies whether transparency bytes should be included. Default is ``False``. .. method:: __init__(self, colorspace, source) - **Copy and set colorspace:** Copy *source* pixmap converting colorspace. Any colorspace combination is possible, but source colorspace must not be *None*. + **Copy and set colorspace:** Copy *source* pixmap converting colorspace. Any colorspace combination is possible, but source colorspace must not be ``None``. - :arg colorspace: desired **target** colorspace. This **may also be** *None*. In this case, a "masking" pixmap is created: its :attr:`Pixmap.samples` will consist of the source's alpha bytes only. + :arg colorspace: desired **target** colorspace. This **may also be** ``None``. In this case, a "masking" pixmap is created: its :attr:`Pixmap.samples` will consist of the source's alpha bytes only. :type colorspace: :ref:`Colorspace` :arg source: the source pixmap. - :type source: *Pixmap* + :type source: :ref:`Pixmap`. .. method:: __init__(self, source, mask) @@ -99,17 +100,17 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". **Copy and add image mask:** Copy *source* pixmap, add an alpha channel with transparency data from a mask pixmap. :arg source: pixmap without alpha channel. - :type source: :ref:`Pixmap` + :type source: :ref:`Pixmap`. :arg mask: a mask pixmap. Must be a graysale pixmap. - :type mask: :ref:`Pixmap` + :type mask: :ref:`Pixmap`. .. method:: __init__(self, source, width, height, [clip]) - **Copy and scale:** Copy *source* pixmap, scaling new width and height values -- the image will appear stretched or shrunk accordingly. Supports partial copying. The source colorspace may be *None*. + **Copy and scale:** Copy *source* pixmap, scaling new width and height values -- the image will appear stretched or shrunk accordingly. Supports partial copying. The source colorspace may be ``None``. :arg source: the source pixmap. - :type source: *Pixmap* + :type source: :ref:`Pixmap`. :arg float width: desired target width. @@ -124,9 +125,9 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". **Copy and add or drop alpha:** Copy *source* and add or drop its alpha channel. Identical copy if *alpha* equals *source.alpha*. If an alpha channel is added, its values will be set to 255. :arg source: source pixmap. - :type source: *Pixmap* + :type source: :ref:`Pixmap`. - :arg bool alpha: whether the target will have an alpha channel, default and mandatory if source colorspace is *None*. + :arg bool alpha: whether the target will have an alpha channel, default and mandatory if source colorspace is ``None``. .. note:: A typical use includes separation of color and transparency bytes in separate pixmaps. Some applications require this like e.g. *wx.Bitmap.FromBufferAndAlpha()* of *wxPython*: @@ -178,7 +179,7 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". **From a PDF image:** Create a pixmap from an image **contained in PDF** *doc* identified by its :data:`xref`. All pimap properties are set by the image. Have a look at `extract-img1.py `_ and `extract-img2.py `_ to see how this can be used to recover all of a PDF's images. - :arg doc: an opened **PDF** document. + :arg doc: an opened |PDF| document. :type doc: :ref:`Document` :arg int xref: the :data:`xref` of an image object. For example, you can make a list of images used on a particular page with :meth:`Document.get_page_images`, which also shows the :data:`xref` numbers of each image. @@ -209,7 +210,7 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". .. method:: gamma_with(gamma) - Apply a gamma factor to a pixmap, i.e. lighten or darken it. Pixmaps with colorspace *None* are ignored with a warning. + Apply a gamma factor to a pixmap, i.e. lighten or darken it. Pixmaps with colorspace ``None`` are ignored with a warning. :arg float gamma: *gamma = 1.0* does nothing, *gamma < 1.0* lightens, *gamma > 1.0* darkens the image. @@ -247,7 +248,7 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". :arg sequence color: the desired value, given as a sequence of integers in `range(256)`. The length of the sequence must equal :attr:`Pixmap.n`, which includes any alpha byte. :rtype: bool - :returns: *False* if the rectangle was invalid or had an empty intersection with :attr:`Pixmap.irect`, else *True*. + :returns: ``False`` if the rectangle was invalid or had an empty intersection with :attr:`Pixmap.irect`, else ``True``. .. note:: @@ -284,12 +285,12 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". :arg bytes,bytearray,BytesIO alphavalues: the new alpha values. If provided, its length must be at least *width * height*. If omitted (`None`), all alpha values are set to 255 (no transparency). *Changed in version 1.14.13:* *io.BytesIO* is now also accepted. :arg bool premultiply: *New in v1.18.13:* whether to premultiply color components with the alpha value. - :arg list,tuple opaque: ignore the alpha value and set this color to fully transparent. A sequence of integers in `range(256)` with a length of :attr:`Pixmap.n`. Default is *None*. For example, a typical choice for RGB would be `opaque=(255, 255, 255)` (white). + :arg list,tuple opaque: ignore the alpha value and set this color to fully transparent. A sequence of integers in `range(256)` with a length of :attr:`Pixmap.n`. Default is ``None``. For example, a typical choice for RGB would be `opaque=(255, 255, 255)` (white). .. method:: invert_irect([irect]) - Invert the color of all pixels in :ref:`IRect` *irect*. Will have no effect if colorspace is *None*. + Invert the color of all pixels in :ref:`IRect` *irect*. Will have no effect if colorspace is ``None``. :arg irect_like irect: The area to be inverted. Omit to invert everything. @@ -388,9 +389,14 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". doc.save("ocr-images.pdf") - .. method:: pil_save(*args, unmultiply=False, **kwargs) + .. method:: pil_image() - * New in v1.17.3 + Create a Pillow Image from the pixmap. PIL / Pillow must be installed. + + :raises ImportError: if Pillow is not installed. + :returns: a ``PIL.Image`` object + + .. method:: pil_save(*args, unmultiply=False, **kwargs) Write the pixmap as an image file using Pillow. Use this method for output unsupported by MuPDF. Examples are @@ -400,7 +406,7 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". A simple example: `pix.pil_save("some.webp", optimize=True, dpi=(150, 150))`. - :arg bool unmultiply: If the pixmap's colorspace is RGB with transparency, the alpha values may or may not already be multiplied into the color components ref/green/blue (called "premultiplied"). To enforce undoing premultiplication, set this parameter to `True`. To learn about some background, e.g. look for "Premultiplied alpha" `here `_. + :arg bool unmultiply: If the pixmap's colorspace is RGB with transparency, the alpha values may or may not already be multiplied into the color components ref/green/blue (called "premultiplied"). To enforce undoing premultiplication, set this parameter to `True`. To learn about some background, e.g. look for `"Premultiplied alpha" on this page `_. For details on other parameters see the Pillow documentation. @@ -480,7 +486,7 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". .. attribute:: colorspace - The colorspace of the pixmap. This value may be *None* if the image is to be treated as a so-called *image mask* or *stencil mask* (currently happens for extracted PDF document images only). + The colorspace of the pixmap. This value may be ``None`` if the image is to be treated as a so-called *image mask* or *stencil mask* (currently happens for extracted PDF document images only). :type: :ref:`Colorspace` @@ -546,6 +552,9 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". 367 ns ± 1.75 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) In [4]: %timeit len(pix.samples) 3.52 ms ± 57.5 µs per loop (mean ± std. dev. of 7 runs, 100 loops each) + + After the Pixmap has been destroyed, any attempt to use the memoryview + will fail with ValueError. :type: memoryview @@ -559,6 +568,9 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". img = QtGui.QImage(pix.samples_ptr, pix.width, pix.height, format) # (2) Both of the above lead to the same Qt image, but (2) can be **many hundred times faster**, because it avoids an additional copy of the pixel area. + + Warning: after the Pixmap has been destroyed, the Python pointer will be + invalid and attempting to use it may crash the Python interpreter. :type: int @@ -598,7 +610,7 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". .. attribute:: n - Number of components per pixel. This number depends on colorspace and alpha. If colorspace is not *None* (stencil masks), then *Pixmap.n - Pixmap.alpha == pixmap.colorspace.n* is true. If colorspace is *None*, then *n == alpha == 1*. + Number of components per pixel. This number depends on colorspace and alpha. If colorspace is not ``None`` (stencil masks), then *Pixmap.n - Pixmap.alpha == pixmap.colorspace.n* is true. If colorspace is ``None``, then *n == alpha == 1*. :type: int @@ -616,7 +628,7 @@ Have a look at the :ref:`FAQ` section to see some pixmap usage "at work". .. attribute:: interpolate - An information-only boolean flag set to *True* if the image will be drawn using "linear interpolation". If *False* "nearest neighbour sampling" will be used. + An information-only boolean flag set to ``True`` if the image will be drawn using "linear interpolation". If ``False`` "nearest neighbour sampling" will be used. :type: bool diff --git a/docs/pymupdf-layout/index.rst b/docs/pymupdf-layout/index.rst new file mode 100644 index 000000000..561cabf50 --- /dev/null +++ b/docs/pymupdf-layout/index.rst @@ -0,0 +1,211 @@ + +.. include:: ../header.rst + +.. _pymupdf-layout + + +PyMuPDF Layout +=========================================================================== + + +|PyMuPDF Layout| is a lightweight layout analysis extension for |PyMuPDF| that turns PDFs into clean, structured data with minimal setup. It’s fast, accurate, and efficient without any GPU requirement. + +It is an optional, but recommended, addition to the |PyMuPDF| library especially if you are required to more accurately extract structured data with better semantic information. + + +Installing +---------------------------------- + +Install from |PyPI| with:: + + + pip install pymupdf-layout + + +Using +---------------------------------- + + +In nutshell, |PyMuPDF Layout| detects the layout to extract, but we need |PyMuPDF4LLM| for the API interface. This provides us with options to extract document content as |Markdown|, |JSON| or |TXT|. + +Let's set up the Python coding environment to get started and open a PDF then we'll move on to the semantic data extraction. + +Register packages and open a PDF +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +First up let's import the libraries and open a sample document:: + + import pymupdf.layout + import pymupdf4llm + doc = pymupdf.open("sample.pdf") + +Note, in the above code, that |PyMuPDF Layout| must be imported as shown and before importing |PyMuPDF4LLM| to activate |PyMuPDF|'s layout feature and make it available to |PyMuPDF4LLM|. + +Omitting the first line would cause execution of standard |PyMuPDF4LLM| - without the layout feature! + +Extract the structured data +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +We've activated the |PyMuPDF Layout| library and we've loaded a document, next let's extract the structured data. This is now like a super-charged version of standard |PyMuPDF4LLM| with ``Layout`` working behind the scenes combining heuristics with machine learning - for better extraction results. + +Extract as Markdown +"""""""""""""""""""""""" + +.. code-block:: python + + md = pymupdf4llm.to_markdown(doc) + + +Extract as JSON +""""""""""""""""" + +.. code-block:: python + + json = pymupdf4llm.to_json(doc) + + +Extract as TXT +""""""""""""""""" + +.. code-block:: python + + txt = pymupdf4llm.to_text(doc) + +.. note:: + + Please refer top the full :ref:`PyMuPDF4LLM API ` for more. + +Finally we can save the output to an external file as follows:: + + from pathlib import Path + suffix = ".md" # or ".json" or ".txt" + Path(doc.name).with_suffix(suffix).write_bytes(md.encode()) + + +Headers & Footers +~~~~~~~~~~~~~~~~~~~~~~~ + + +Many documents will have header and footer information on each page of a PDF which you may or may not want to include. This information can be repetitive and simply not needed ( e.g. the same logo and document title or page number information is not always really important when it comes to extracting the document content ). + +|PyMuPDF Layout| is trained in detecting these typical document elements and able to omit them. + +So in this case we can adjust our API calls to ignore these elements as follows:: + + md = pymupdf4llm.to_markdown(doc, header=False, footer=False) + txt = pymupdf4llm.to_text(doc, header=False, footer=False) + + +.. note:: + + Please note that page ``header`` / ``footer`` exclusion is not applicable to JSON output as it aims to always represent all data for the included pages. Please refer top the full :ref:`PyMuPDF4LLM API ` for more. + +Extending Capability +---------------------------------- + + +Using with Pro +~~~~~~~~~~~~~~~~~ + +We are able to extend |PyMuPDF Layout| to work with |PyMuPDF Pro| and thus increase our capability by allowing Office documents to be provided as input files. In this case all we have to do is to include the import for |PyMuPDF Pro| and unlock it before we import & activate |PyMuPDF Layout|:: + + import pymupdf.layout + import pymupdf.pro + import pymupdf4llm + pymupdf.pro.unlock() + +Now we can happily load Office files and convert them as follows:: + + md = pymupdf4llm.to_markdown("sample.docx") + + + +OCR support +~~~~~~~~~~~~~~~~~ + +The new layout-sensitive PyMuPDF4LLM version also evaluates whether a page would benefit from applying OCR to it. If its heuristics come to this conclusion, the built-in Tesseract-OCR module is automatically invoked. Its results are then handled like normal page content. + +If Tesseract is not installed on your platform, no OCR is attempted. + + + +---- + +.. _pymupdf_layout_and_pymupdf4llm_api: + +PyMuPDF Layout and parameter caveats +-------------------------------------- + + +|PyMuPDF Layout| uses |PyMuPDF4LLM| for its interface. However, if you have imported ``Layout`` then the following caveats apply to the method parameters: + + ++-------------------+-------------+---------+---------+----------------------------------+ +| Parameter | to_markdown | to_text | to_json | Comments | ++===================+=============+=========+=========+==================================+ +| doc | ✔️ | ✔️ | ✔️ | | ++-------------------+-------------+---------+---------+----------------------------------+ +| header | ✔️ | ✔️ | ignored | **new:** replaces ``margins`` | ++-------------------+-------------+---------+---------+----------------------------------+ +| footer | ✔️ | ✔️ | ignored | **new:** replaces ``margins`` | ++-------------------+-------------+---------+---------+----------------------------------+ +| detect_bg_color | ❌ | ❌ | ❌ | | ++-------------------+-------------+---------+---------+----------------------------------+ +| dpi | ✔️ | ✔️ | ✔️ | | ++-------------------+-------------+---------+---------+----------------------------------+ +| embed_images | ✔️ | ✔️ | ✔️ | | ++-------------------+-------------+---------+---------+----------------------------------+ +| extract_words | later | later | later | postponed | ++-------------------+-------------+---------+---------+----------------------------------+ +| filename | ✔️ | ✔️ | ✔️ | | ++-------------------+-------------+---------+---------+----------------------------------+ +| fontsize_limit | ❌ | ❌ | ❌ | obsolete | ++-------------------+-------------+---------+---------+----------------------------------+ +| force_text | ❌ | ❌ | ❌ | text in pictures is always | +| | | | | ignored | ++-------------------+-------------+---------+---------+----------------------------------+ +| graphics_limit | ❌ | ❌ | ❌ | obsolete | ++-------------------+-------------+---------+---------+----------------------------------+ +| hdr_info | ❌ | ❌ | ❌ | obsolete | ++-------------------+-------------+---------+---------+----------------------------------+ +| ignore_alpha | ❌ | ❌ | ❌ | | ++-------------------+-------------+---------+---------+----------------------------------+ +| ignore_code | ✔️ | ✔️ | ✔️ | | ++-------------------+-------------+---------+---------+----------------------------------+ +| ignore_graphics | ❌ | ❌ | ❌ | obsolete | ++-------------------+-------------+---------+---------+----------------------------------+ +| ignore_images | ❌ | ❌ | ❌ | obsolete | ++-------------------+-------------+---------+---------+----------------------------------+ +| image_format | ✔️ | ✔️ | ✔️ | | ++-------------------+-------------+---------+---------+----------------------------------+ +| image_path | ✔️ | ✔️ | ✔️ | | ++-------------------+-------------+---------+---------+----------------------------------+ +| image_size_limit | ❌ | ❌ | ❌ | obsolete | ++-------------------+-------------+---------+---------+----------------------------------+ +| margins | ❌ | ❌ | ❌ | obsolete | ++-------------------+-------------+---------+---------+----------------------------------+ +| page_chunks | later | later | later | postponed | ++-------------------+-------------+---------+---------+----------------------------------+ +| page_height | later | later | later | postponed | ++-------------------+-------------+---------+---------+----------------------------------+ +| page_separators | later | later | later | postponed | ++-------------------+-------------+---------+---------+----------------------------------+ +| page_width | later | later | later | postponed | ++-------------------+-------------+---------+---------+----------------------------------+ +| pages | ✔️ | ✔️ | ✔️ | | ++-------------------+-------------+---------+---------+----------------------------------+ +| show_progress | later | later | later | postponed | ++-------------------+-------------+---------+---------+----------------------------------+ +| table_strategy | ❌ | ❌ | ❌ | obsolete | ++-------------------+-------------+---------+---------+----------------------------------+ +| use_glyphs | ❌ | ❌ | ❌ | always show � | ++-------------------+-------------+---------+---------+----------------------------------+ +| write_images | ✔️ | ✔️ | ✔️ | | ++-------------------+-------------+---------+---------+----------------------------------+ + + + + + + +.. include:: ../footer.rst diff --git a/docs/pymupdf-pro.rst b/docs/pymupdf-pro.rst index 1e79076de..b032ea3ef 100644 --- a/docs/pymupdf-pro.rst +++ b/docs/pymupdf-pro.rst @@ -1,126 +1,5 @@ - .. include:: header.rst +.. include:: pymupdf-pro/pymupdf-pro.rst - -.. _pymupdf-pro - -PyMuPDF Pro -============= - - -Enhance |PyMuPDF| capability with **Office** document support. - -|PyMuPDF Pro| offers all the features of |PyMuPDF|, plus enhanced functionality to support **Office** documents. - -- Load, parse and extract text data from **Office** files -- Ablility to render **Office** files - - -Office file support ----------------------- - -In addition to the `standard file types supported by PyMuPDF `, |PyMuPDF Pro| supports: - -.. list-table:: - :header-rows: 1 - - * - **DOC/DOCX** - - **XLS/XLSX** - - **PPT/PPTX** - - **HWP/HWPX** - * - .. image:: images/icons/icon-docx.svg - :width: 40 - :height: 40 - - .. image:: images/icons/icon-xlsx.svg - :width: 40 - :height: 40 - - .. image:: images/icons/icon-pptx.svg - :width: 40 - :height: 40 - - .. image:: images/icons/icon-hangul.svg - :width: 40 - :height: 40 - - - -Usage --------------- - -Installation -~~~~~~~~~~~~~~~~~~ - -Install via pip with: - -.. code-block:: bash - - pip install pymupdfpro - - -Loading an **Office** document -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Import |PyMuPDF Pro| and you can then reference **Office** documents directly, e.g.: - -.. code-block:: python - - import pymupdf.pro - pymupdf.pro.unlock() - # PyMuPDF has now been extended with PyMuPDF Pro features, with some restrictions. - doc = pymupdf.open("my-office-doc.xls") - -.. note:: - - All standard |PyMuPDF| functionality is exposed as expected - |PyMuPDF Pro| handles the extended **Office** file types - - -From then on you can work with document pages just as you would do normally, but with respect to the `restrictions `. - - -.. _PyMuPDFPro_Restrictions: - -Restrictions -~~~~~~~~~~~~~~~~~~~~ - - -|PyMuPDF Pro| functionality is restricted without a license key as follows: - - **Only the first 3 pages of any document will be available.** - -To unlock full functionality you should `obtain a trial key `_. - - -.. _PyMuPDFPro_TrialKeys: - -Trial keys ------------------------ - -To obtain a license key `please fill out the form on this page `_. You will then have the trial key emailled to the address you submitted. - - -Using a key -~~~~~~~~~~~~~~~~ - - -Initialize |PyMuPDF Pro| with a key as follows: - -.. code-block:: python - - import pymupdf.pro - pymupdf.pro.unlock(my_key) - # PyMuPDF has now been extended with PyMuPDF Pro features. - -This will allow you to evaluate the product for a limited time. If you want to use |PyMuPDF Pro| after this time you should then `enquire about obtaining a commercial license `_. - - - - -.. raw:: html - - - - - - - -.. include:: footer.rst \ No newline at end of file +.. include:: footer.rst diff --git a/docs/pymupdf-pro/index.rst b/docs/pymupdf-pro/index.rst new file mode 100644 index 000000000..d0c21903d --- /dev/null +++ b/docs/pymupdf-pro/index.rst @@ -0,0 +1,6 @@ + +.. include:: ../header.rst + +.. include:: pymupdf-pro.rst + +.. include:: ../footer.rst diff --git a/docs/pymupdf-pro/pymupdf-pro.rst b/docs/pymupdf-pro/pymupdf-pro.rst new file mode 100644 index 000000000..80d563d93 --- /dev/null +++ b/docs/pymupdf-pro/pymupdf-pro.rst @@ -0,0 +1,169 @@ + + +.. _pymupdf-pro + +PyMuPDF Pro +============= + + +|PyMuPDF Pro| is a set of *commercial extensions* for |PyMuPDF|. + +Enhance |PyMuPDF| capability with **Office** document support & **RAG/LLM** integrations. + +- Enables Office document handling, including ``doc``, ``docx``, ``hwp``, ``hwpx``, ``ppt``, ``pptx``, ``xls``, ``xlsx``, and others. +- Supports text and table extraction, document conversion and more. +- Includes the commercial version of |PyMuPDF4LLM|. + +To enquire about obtaining a commercial license, then `use this contact page `_. + + +.. note:: + + A licensed version of |PyMuPDF Pro| also gives you a licensed version of |PyMuPDF4LLM|. If you are interested in using the |PyMuPDF4LLM| package you should install it separately. + + +Platform support +-------------------- + +Available for these platforms only: + +- Windows x86_64. +- Linux x86_64 (glibc). +- MacOS x86_64. +- MacOS arm64. + + +Office file support +---------------------- + +In addition to the `standard file types supported by PyMuPDF `, |PyMuPDF Pro| supports: + +.. list-table:: + :header-rows: 1 + + * - **DOC/DOCX** + - **XLS/XLSX** + - **PPT/PPTX** + - **HWP/HWPX** + * - .. image:: images/icons/icon-docx.svg + :width: 40 + :height: 40 + - .. image:: images/icons/icon-xlsx.svg + :width: 40 + :height: 40 + - .. image:: images/icons/icon-pptx.svg + :width: 40 + :height: 40 + - .. image:: images/icons/icon-hangul.svg + :width: 40 + :height: 40 + + + +Usage +-------------- + +Installation +~~~~~~~~~~~~~~~~~~ + +Install via pip with: + +.. code-block:: bash + + pip install pymupdfpro + + +Loading an **Office** document +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Import |PyMuPDF Pro| and you can then reference **Office** documents directly, e.g.: + +.. code-block:: python + + import pymupdf.pro + pymupdf.pro.unlock() + # PyMuPDF has now been extended with PyMuPDF Pro features, with some restrictions. + doc = pymupdf.open("my-office-doc.xls") + +.. note:: + + All standard |PyMuPDF| functionality is exposed as expected - |PyMuPDF Pro| handles the extended **Office** file types + + +From then on you can work with document pages just as you would do normally, but with respect to the `restrictions `. + + +Converting an **Office** document to |PDF| +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following code snippet can convert your **Office** document to |PDF| format: + +.. code-block:: python + + import pymupdf.pro + pymupdf.pro.unlock() + + doc = pymupdf.open("my-office-doc.xlsx") + + pdfdata = doc.convert_to_pdf() + with open('output.pdf', 'wb') as f: + f.write(pdfdata) + + + +.. _PyMuPDFPro_Restrictions: + +Restrictions +~~~~~~~~~~~~~~~~~~~~ + + +|PyMuPDF Pro| functionality is restricted without a license key as follows: + + **Only the first 3 pages of any document will be available.** + +To unlock full functionality you should `obtain a trial key `_. + + +.. _PyMuPDFPro_TrialKeys: + +Trial keys +----------------------- + +To obtain a license key `please fill out the form on this page `_. You will then have the trial key emailled to the address you submitted. + + +Using a key +~~~~~~~~~~~~~~~~ + + +Initialize |PyMuPDF Pro| with a key as follows: + +.. code-block:: python + + import pymupdf.pro + pymupdf.pro.unlock(my_key) + # PyMuPDF has now been extended with PyMuPDF Pro features. + +This will allow you to evaluate the product for a limited time. If you want to use |PyMuPDF Pro| after this time you should then `enquire about obtaining a commercial license `_. + + +Fonts +----------------------- + +By default `pymupdf.pro.unlock()` searches for all installed font directories. + +This can be controlled with keyword-only args: + +* `fontpath`: specific font directories, either as a list/tuple or `os.sep`-separated string. + If None (the default), we use `os.environ['PYMUPDFPRO_FONT_PATH']` if set. +* `fontpath_auto`: Whether to append system font directories. + If None (the default) we use true if `os.environ['PYMUPDFPRO_FONT_PATH_AUTO']` is '1'. + If true we append all system font directories. + +Function `pymupdf.pro.get_fontpath()` returns a tuple of all font directories used by `unlock()`. + + +.. raw:: html + + + diff --git a/docs/pymupdf4llm/api.rst b/docs/pymupdf4llm/api.rst index 53ca304bb..fc3fe167d 100644 --- a/docs/pymupdf4llm/api.rst +++ b/docs/pymupdf4llm/api.rst @@ -16,35 +16,107 @@ The |PyMuPDF4LLM| API Prints the version of the library. -.. method:: to_markdown(doc: pymupdf.Document | str, *, pages: list | range | None = None, hdr_info: Any = None, write_images: bool = False, embed_images: bool = False, dpi: int = 150, image_path="", image_format="png", image_size_limit=0.05, force_text=True, margins=(0, 50, 0, 50), page_chunks: bool = False, page_width: float = 612, page_height: float = None, table_strategy="lines_strict", graphics_limit: int = None, ignore_code: bool = False, extract_words: bool = False, show_progress: bool = True) -> str | list[dict] - Read the pages of the file and outputs the text of its pages in |Markdown| format. How this should happen in detail can be influenced by a number of parameters. Please note that there exists **support for building page chunks** from the |Markdown| text. +.. method:: to_json(doc: pymupdf.Document | str, \ + image_dpi: int = 150, \ + image_format: str = "png", \ + image_path: str = "", \ + pages: list | range | None = None) -> str - :arg Document,str doc: the file, to be specified either as a file path string, or as a |PyMuPDF| Document (created via `pymupdf.open`). In order to use `pathlib.Path` specifications, Python file-like objects, documents in memory etc. you **must** use a |PyMuPDF| Document. - :arg list pages: optional, the pages to consider for output (caution: specify 0-based page numbers). If omitted all pages are processed. + Reads the pages of the file and outputs the text of its pages in |JSON| format. - :arg hdr_info: optional. Use this if you want to provide your own header detection logic. This may be a callable or an object having a method named `get_header_id`. It must accept a text span (a span dictionary as contained in :meth:`~.extractDICT`) and a keyword parameter "page" (which is the owning :ref:`Page ` object). It must return a string "" or up to 6 "#" characters followed by 1 space. If omitted, a full document scan will be performed to find the most popular font sizes and derive header levels based on them. To completely avoid this behavior specify `hdr_info=lambda s, page=None: ""` or `hdr_info=False`. + :arg Document,str doc: the file, to be specified either as a file path string, or as a |PyMuPDF| :class:`Document` (created via `pymupdf.open`). In order to use `pathlib.Path` specifications, Python file-like objects, documents in memory etc. you **must** use a |PyMuPDF| :class:`Document`. - :arg bool write_images: when encountering images or vector graphics, images will be created from the respective page area and stored in the specified folder. Markdown references will be generated pointing to these images. Any text contained in these areas will not be included in the text output (but appear as part of the images). Therefore, if for instance your document has text written on full page images, make sure to set this parameter to `False`. + :arg int image_dpi: specify the desired image resolution in dots per inch. Default value is 150. - :arg bool embed_images: like `write_images`, but images will be included in the markdown text as base64-encoded strings. Ignores `write_images` and `image_path` if used. This may drastically increase the size of your markdown text. + :arg str image_format: specify the desired image format via its extension. Default is "png" (portable network graphics). Another popular format may be "jpg". Possible values are all :ref:`supported output formats `. + + :arg str image_path: store images in this folder. Relevant if `write_images=True`. Default is the path of the script directory. - :arg float image_size_limit: this must be a positive value less than 1. Images are ignored if `width / page.rect.width <= image_size_limit` or `height / page.rect.height <= image_size_limit`. For instance, the default value 0.05 means that to be considered for inclusion, an image's width and height must be larger than 5% of the page's width and height, respectively. + :arg list pages: optional, the pages to consider for output (caution: specify 0-based page numbers). If omitted (`None`) all pages are processed. + + +.. note:: + + Please note that page ``header`` / ``footer`` exclusion is not applicable to |JSON| output as it aims to always represent all data for the included pages. + + +.. method:: to_markdown(doc: pymupdf.Document | str, *, \ + detect_bg_color: bool = True, \ + dpi: int = 150, \ + embed_images: bool = False, \ + extract_words: bool = False, \ + filename: str | None = None, \ + fontsize_limit: float = 3, \ + footer: bool = True, \ + force_text: bool = True, \ + graphics_limit: int = None, \ + hdr_info: Any = None, \ + header: bool = True, \ + ignore_alpha: bool = False, \ + ignore_code: bool = False, \ + ignore_graphics: bool = False, \ + ignore_images: bool = False, \ + image_format: str = "png", \ + image_path: str = "", \ + image_size_limit: float = 0.05, \ + margins: int = 0, \ + page_chunks: bool = False, \ + page_height: float = None, \ + page_separators: bool = False, \ + page_width: float = 612, \ + pages: list | range | None = None, \ + show_progress: bool = False, \ + table_strategy: str = "lines_strict", \ + use_glyphs: bool = False, \ + write_images: bool = False) -> str | list[dict] + + Reads the pages of the file and outputs the text of its pages in |Markdown| format. How this should happen in detail can be influenced by a number of parameters. Please note that **support for building page chunks** from the |Markdown| text is supported. + + :arg Document,str doc: the file, to be specified either as a file path string, or as a |PyMuPDF| :class:`Document` (created via `pymupdf.open`). In order to use `pathlib.Path` specifications, Python file-like objects, documents in memory etc. you **must** use a |PyMuPDF| :class:`Document`. + + :arg bool detect_bg_color: does a simple check for the general background color of the pages (default is ``True``). If any text or vector has this color it will be ignored. May increase detection accuracy. :arg int dpi: specify the desired image resolution in dots per inch. Relevant only if `write_images=True`. Default value is 150. - :arg str image_path: store images in this folder. Relevant if `write_images=True`. Default is the path of the script directory. + :arg bool embed_images: like `write_images`, but images will be included in the markdown text as base64-encoded strings. Ignores `write_images` and `image_path` if used. This may drastically increase the size of your markdown text. - :arg str image_format: specify the desired image format via its extension. Default is "png" (portable network graphics). Another popular format may be "jpg". Possible values are all :ref:`supported output formats `. + :arg bool extract_words: a value of `True` enforces `page_chunks=True` and adds key "words" to each page dictionary. Its value is a list of words as delivered by PyMuPDF's `Page` method `get_text("words")`. The sequence of the words in this list is the same as the extracted text. + + :arg str filename: (New in v.0.0.19) Overwrites or sets the desired image file name of written images. Useful when the document is provided as a memory object (which has no inherent file name). + + :arg float fontsize_limit: limit the font size to consider for text extraction. If the font size is lower than what is set then the text won't be considered for extraction. Default is `3`, meaning only text with a font size `>= 3` will be considered for extraction. + + :arg bool footer: boolean to switch on/off footer content. This parameter controls whether we want to include or omit the footer content from all the document pages. Useful if the document has repetitive footer content which doesn't add any value to the overall extraction data. Default is `True` meaning that footer content will be considered. :arg bool force_text: generate text output even when overlapping images / graphics. This text then appears after the respective image. If `write_images=True` this parameter may be `False` to suppress repetition of text on images. + :arg int graphics_limit: use this to limit dealing with excess amounts of vector graphics elements. Scientific documents, or pages simulating text via graphics commands may contain tens of thousands of these objects. As vector graphics are analyzed for multiple purposes, runtime may quickly become intolerable. With this parameter, all vector graphics will be ignored if their count exceeds the threshold. **Changed in v0.0.19:** The page will still be processed, and text, tables and images should be extracted. + + :arg hdr_info: use this if you want to provide your own header detection logic. This may be a callable or an object having a method named `get_header_id`. It must accept a text span (a span dictionary as contained in :meth:`~.extractDICT`) and a keyword parameter "page" (which is the owning :ref:`Page ` object). It must return a string "" or up to 6 "#" characters followed by 1 space. If omitted (`None`), a full document scan will be performed to find the most popular font sizes and derive header levels based on them. To completely avoid this behavior specify `hdr_info=lambda s, page=None: ""` or `hdr_info=False`. + + :arg bool header: boolean to switch on/off header content. This parameter controls whether we want to include or omit the header content from all the document pages. Useful if the document has repetitive header content which doesn't add any value to the overall extraction data. Default is `True` meaning that header content will be considered. + + :arg bool ignore_alpha: if ``True`` includes text even when completely transparent. Default is ``False``: transparent text will be ignored which usually increases detection accuracy. + + :arg bool ignore_code: if `True` then mono-spaced text does not receive special formatting. Code blocks will no longer be generated. This value is set to `True` if `extract_words=True` is used. + + :arg bool ignore_graphics: (New in v.0.0.20) Disregard vector graphics on the page. This may help detecting text correctly when pages are very crowded (often the case for documents representing presentation slides). Also speeds up processing time. This automatically prevents table detection. + + :arg bool ignore_images: (New in v.0.0.20) Disregard images on the page. This may help detecting text correctly when pages are very crowded (often the case for documents representing presentation slides). Also speeds up processing time. + + :arg str image_format: specify the desired image format via its extension. Default is "png" (portable network graphics). Another popular format may be "jpg". Possible values are all :ref:`supported output formats `. + + :arg str image_path: store images in this folder. Relevant if `write_images=True`. Default is the path of the script directory. + + :arg float image_size_limit: this must be a ``0 <= value < 1``. Images are ignored if `width / page.rect.width <= image_size_limit` or `height / page.rect.height <= image_size_limit`. For instance, the default value 0.05 means that to be considered for inclusion, an image's width and height must be larger than 5% of the page's width and height, respectively. + :arg float,list margins: a float or a sequence of 2 or 4 floats specifying page borders. Only objects inside the margins will be considered for output. * `margin=f` yields `(f, f, f, f)` for `(left, top, right, bottom)`. * `(top, bottom)` yields `(0, top, 0, bottom)`. - * To always read full pages, use `margins=0`. + * To always read full pages **(default)**, use `margins=0`. :arg bool page_chunks: if `True` the output will be a list of `Document.page_count` dictionaries (one per page). Each dictionary has the following structure: @@ -62,25 +134,54 @@ The |PyMuPDF4LLM| API - **"words"** - if `extract_words=True` was used. This is a list of tuples `(x0, y0, x1, y1, "wordstring", bno, lno, wno)` as delivered by `page.get_text("words")`. The **sequence** of these tuples however is the same as produced in the markdown text string and thus honors multi-column text. This is also true for text in tables: words are extracted in the sequence of table row cells. - :arg float page_width: specify a desired page width. This is ignored for documents with a fixed page width like PDF, XPS etc. **Reflowable** documents however, like e-books, office or text files have no fixed page dimensions and by default are assumed to have Letter format width (612) and an **"infinite"** page height. This means that the full document is treated as one large page. - :arg float page_height: specify a desired page height. For relevance see the `page_width` parameter. If using the default `None`, the document will appear as one large page with a width of `page_width`. Consequently in this case, no markdown page separators will occur (except the final one), respectively only one page chunk will be returned. - :arg str table_strategy: table detection strategy. Default is `"lines_strict"` which ignores background colors. In some occasions, other strategies may be more successful, for example `"lines"` which uses all vector graphics objects for detection. + :arg bool page_separators: if ``True`` inserts a string ``--- end of page=n ---`` at the end of each page output. Intended for debugging purposes. The page number if 0-based. The separator string is wrapped with line breaks. Default is ``False``. - :arg int graphics_limit: use this to limit dealing with excess amounts of vector graphics elements. Typically, scientific documents or pages simulating text using graphics commands may contain tens of thousands of these objects. As vector graphics are used for table detection mainly, analyzing pages of this kind may result in excessive runtimes. You can exclude problematic pages via for instance `graphics_limit=5000` or even a smaller value if desired. The respective pages will then be ignored and be represented by one message line in the output text. + :arg float page_width: specify a desired page width. This is ignored for documents with a fixed page width like PDF, XPS etc. **Reflowable** documents however, like e-books, office [#f2]_ or text files have no fixed page dimensions and by default are assumed to have Letter format width (612) and an **"infinite"** page height. This means that the **full document is treated as one large page.** - :arg bool ignore_code: if `True` then mono-spaced text does not receive special formatting treatment. Code blocks will no longer be generated. This value is set to `True` if `extract_words=True` is used. + :arg list pages: optional, the pages to consider for output (caution: specify 0-based page numbers). If omitted (`None`) all pages are processed. - :arg bool extract_words: a value of `True` enforces `page_chunks=True` and adds key "words" to each page dictionary. Its value is a list of words as delivered by PyMuPDF's `Page` method `get_text("words")`. The sequence of the words in this list is the same as the extracted text. - - :arg bool show_progress: a value of `True` (the default) displays a text-based progress bar as pages are being converted to Markdown. It will look similar to the following:: + :arg bool show_progress: Default is `False`. A value of `True` displays a text-based progress bar as pages are being converted to Markdown. It will look similar to the following:: Processing input.pdf... [==================== ] (148/291) + :arg str table_strategy: see: :meth:`table detection strategy `. Default is `"lines_strict"` which ignores background colors. In some occasions, other strategies may be more successful, for example `"lines"` which uses all vector graphics objects for detection. **Changed in v0.0.19:** A value of `None` will not perform any table detection at all. This may be useful when you know that your document contains no tables. Execution time savings can be significant. + + :arg bool use_glyphs: (New in v.0.0.19) Default is `False`. A value of `True` will use the glyph number of the characters instead of the character itself if the font does not store the Unicode value. + + :arg bool write_images: when encountering images or vector graphics, images will be created from the respective page area and stored in the specified folder. |Markdown| references will be generated pointing to these images. Any text contained in these areas will not be included in the text output (but appear as part of the images). Therefore, if for instance your document has text written on full page images, make sure to set this parameter to `False`. + :returns: Either a string of the combined text of all selected document pages, or a list of dictionaries. + +.. note:: + + Please see :ref:`PyMuPDF Layout and parameter caveats `. + +.. method:: to_text(doc: pymupdf.Document | str, \ + header: bool = True, \ + footer: bool = True, \ + ignore_code: bool = False, \ + pages: list | range | None = None) -> str + + + Reads the pages of the file and outputs the text of its pages in |TXT| format. + + :arg Document,str doc: the file, to be specified either as a file path string, or as a |PyMuPDF| :class:`Document` (created via `pymupdf.open`). In order to use `pathlib.Path` specifications, Python file-like objects, documents in memory etc. you **must** use a |PyMuPDF| :class:`Document`. + + :arg bool header: boolean to switch on/off header content. This parameter controls whether we want to include or omit the header content from all the document pages. Useful if the document has repetitive header content which doesn't add any value to the overall extraction data. Default is `True` meaning that header content will be considered. + + :arg bool footer: boolean to switch on/off footer content. This parameter controls whether we want to include or omit the footer content from all the document pages. Useful if the document has repetitive footer content which doesn't add any value to the overall extraction data. Default is `True` meaning that footer content will be considered. + + :arg bool ignore_code: if `True` then mono-spaced text does not receive special formatting. Code blocks will no longer be generated. + + :arg list pages: optional, the pages to consider for output (caution: specify 0-based page numbers). If omitted (`None`) all pages are processed. + + + + .. method:: LlamaMarkdownReader(*args, **kwargs) Create a `pdf_markdown_reader.PDFMarkdownReader` using the `LlamaIndex`_ package. Please note that this package will **not automatically be installed** when installing **pymupdf4llm**. @@ -93,6 +194,177 @@ The |PyMuPDF4LLM| API ---- +.. class:: IdentifyHeaders + + .. method:: __init__(self, doc: pymupdf.Document | str, *, pages: list | range | None = None, body_limit: float = 11, max_levels: int = 6) + + Create an object which maps text font sizes to the respective number of '#' characters which are used by Markdown syntax to indicate header levels. The object is created by scanning the document for font size "popularity". The most popular font size and all smaller sizes are used for body text. Larger font sizes are mapped to the respective header levels - which correspond to the HTML tags `

` to `

`. + + All font sizes are rounded to integer values. + + If more than 6 header levels would be required, then the largest number smaller than the `
` font size is used for body text. + + Please note that creating the object will read and inspect the text of the entire document - independently of reading the document again in the `to_markdown()` method subsequently. Method `to_markdown()` by default **will create this object** if you do not override its `hdr_info=None` parameter. + + + :arg Document,str doc: the file, to be specified either as a file path string, or as a |PyMuPDF| Document (created via `pymupdf.open`). In order to use `pathlib.Path` specifications, Python file-like objects, documents in memory etc. you **must** use a |PyMuPDF| Document. + + :arg list pages: optional, the pages to consider. If omitted all pages are processed. + + :arg float body_limit: the default font size limit for body text. Only used when the document scan does not deliver valid information. + + :arg int max_levels: the maximum number of header levels to be used. Valid values are in `range(1, 7)`. The default is 6, which corresponds to the HTML tags `

` to `

`. A smaller value will limit the number of generated header levels. For instance, a value of 3 will only generate header tags "#", "##" and "###". Body text will be assumed for all font sizes smaller than the one corresponding to "###". + + + .. method:: get_header_id(self, span: dict, page=None) -> str + + Return appropriate markdown header prefix. This is either "" or a string of "#" characters followed by a space. + + Given a text span from a "dict"" extraction, determine the + markdown header prefix string of 0 to n concatenated '#' characters. + + :arg dict span: a dictionary containing the text span information. This is the same dictionary as returned by `page.get_text("dict")`. + + :arg Page page: the owning page object. This can be used when additional information needs to be extracted. + + :returns: a string of "#" characters followed by a space. + + .. attribute:: header_id + + A dictionary mapping (integer) font sizes to Markdown header strings like ``{14: '# ', 12: '## '}``. The dictionary is created by the :class:`IdentifyHeaders` constructor. The keys are the font sizes of the text spans in the document. The values are the respective header strings. + + .. attribute:: body_limit + + An integer value indicating the font size limit for body text. This is computed as ``min(header_id.keys()) - 1``. In the above example, body_limit would be 11. + + +---- + + +**How to limit header levels (example)** + +Limit the generated header levels to 3:: + + import pymupdf, pymupdf4llm + + filename = "input.pdf" + doc = pymupdf.open(filename) # use a Document for subsequent processing + my_headers = pymupdf4llm.IdentifyHeaders(doc, max_levels=3) # generate header info + md_text = pymupdf4llm.to_markdown(doc, hdr_info=my_headers) + + +**How to provide your own header logic (example 1)** + +Provide your own function which uses pre-determined, fixed font sizes:: + + import pymupdf, pymupdf4llm + + filename = "input.pdf" + doc = pymupdf.open(filename) # use a Document for subsequent processing + + def my_headers(span, page=None): + """ + Provide some custom header logic. + This is a callable which accepts a text span and the page. + Could be extended to check for other properties of the span, for + instance the font name, text color and other attributes. + """ + # header level is h1 if font size is larger than 14 + # header level is h2 if font size is larger than 10 + # otherwise it is body text + if span["size"] > 14: + return "# " + elif span["size"] > 10: + return "## " + else: + return "" + + # this will *NOT* scan the document for font sizes! + md_text = pymupdf4llm.to_markdown(doc, hdr_info=my_headers) + +**How to provide your own header logic (example 2)** + +This user function uses the document's Table of Contents -- under the assumption that the bookmark text is also present as a header line on the page (which certainly need not be the case!):: + + import pymupdf, pymupdf4llm + + filename = "input.pdf" + doc = pymupdf.open(filename) # use a Document for subsequent processing + TOC = doc.get_toc() # use the table of contents for determining headers + + def my_headers(span, page=None): + """ + Provide some custom header logic (experimental!). + This callable checks whether the span text matches any of the + TOC titles on this page. + If so, use TOC hierarchy level as header level. + """ + # TOC items on this page: + toc = [t for t in TOC if t[-1] == page.number + 1] + + if not toc: # no TOC items on this page + return "" + + # look for a match in the TOC items + for lvl, title, _ in toc: + if span["text"].startswith(title): + return "#" * lvl + " " + if title.startswith(span["text"]): + return "#" * lvl + " " + + return "" + + # this will *NOT* scan the document for font sizes! + md_text = pymupdf4llm.to_markdown(doc, hdr_info=my_headers) + +---- + + +.. class:: TocHeaders + + .. method:: __init__(self, doc: pymupdf.Document | str) + + Create an object which uses the document's Table of Contents (TOC) to determine header levels. Upon object creation, the table of contents is read via the `Document.get_toc()` method. The TOC data is then used to determine header levels in the `to_markdown()` method. + + This is an alternative to :class:`IdentifyHeaders`. Instead of running through the full document to identify font sizes, it uses the document's Table Of + Contents (TOC) to identify headers on pages. Like :class:`IdentifyHeaders`, this also is no guarantee to find headers, but for well-built Table of Contents, there is a good chance for more correctly identifying header lines on document pages than the font-size-based approach. + + It also has the advantage of being much faster than the font-size-based approach, as it does not execute a full document scan or even access any of the document pages. + + Examples where this approach works very well are the Adobe's files on PDF documentation. + + Please note that this feature **does not read document pages** where the table of contents may exist as normal standard text. It only accesses data as provided by the `Document.get_toc()` method. It will not identify any headers for documents where the table of contents is not available as a collection of bookmarks. + + .. method:: get_header_id(self, span: dict, page=None) -> str + + Return appropriate markdown header prefix. This is either an empty string or a string of "#" characters followed by a space. + + Given a text span from a "dict" extraction variant, determine the markdown header prefix string of 0 to n concatenated "#" characters. + + :arg dict span: a dictionary containing the text span information. This is the same dictionary as returned by `page.get_text("dict")`. + + :arg Page page: the owning page object. This can be used when additional information needs to be extracted. + + :returns: a string of "#" characters followed by a space. + + + +**How to use class TocHeaders** + +This is a version of previous **example 2** that uses :class:`TocHeaders` for header identification:: + + import pymupdf, pymupdf4llm + + filename = "input.pdf" + + doc = pymupdf.open(filename) # use a Document for subsequent processing + my_headers = pymupdf4llm.TocHeaders(doc) # use the table of contents for determining headers + + # this will *NOT* scan the document for font sizes! + md_text = pymupdf4llm.to_markdown(doc, hdr_info=my_headers) + +----- + .. class:: pdf_markdown_reader.PDFMarkdownReader .. method:: load_data(file_path: Union[Path, str], extra_info: Optional[Dict] = None, **load_kwargs: Any) -> List[LlamaIndexDocument] @@ -103,11 +375,16 @@ The |PyMuPDF4LLM| API :returns: a list of `LlamaIndexDocument` documents - one for each page. +----- + +For a list of changes, please see file `CHANGES.md `_. .. rubric:: Footnotes .. [#f1] `LlamaIndex documentation `_ +.. [#f2] When using PyMuPDF-Pro, supported office documents are converted internally into a PDF-like format. Therefore, they **will have fixed page dimensions** and be no longer "reflowable". Consequently, the page width and page height specifications will be ignored as well in these cases. + diff --git a/docs/pymupdf4llm/index.rst b/docs/pymupdf4llm/index.rst index 28574f303..a4cf6d97b 100644 --- a/docs/pymupdf4llm/index.rst +++ b/docs/pymupdf4llm/index.rst @@ -7,7 +7,7 @@ PyMuPDF4LLM =========================================================================== -|PyMuPDF4LLM| is aimed to make it easier to extract **PDF** content in the format you need for **LLM** & **RAG** environments. It supports :ref:`Markdown extraction ` as well as :ref:`LlamaIndex document output `. +|PyMuPDF4LLM| is aimed to make it easier to extract |PDF| content in the format you need for **LLM** & **RAG** environments. It supports :ref:`Markdown extraction ` as well as :ref:`LlamaIndex document output `. .. important:: @@ -142,10 +142,4 @@ Blogs - `Building a RAG Chatbot GUI with the ChatGPT API and PyMuPDF `_ - `RAG/LLM and PDF: Conversion to Markdown Text with PyMuPDF `_ - - - - - - .. include:: ../footer.rst diff --git a/docs/recipes-annotations.rst b/docs/recipes-annotations.rst index 8cc6e595b..84e42f62e 100644 --- a/docs/recipes-annotations.rst +++ b/docs/recipes-annotations.rst @@ -34,31 +34,27 @@ This script should lead to the following output: How to Use FreeText ~~~~~~~~~~~~~~~~~~~~~ -This script shows a couple of ways to deal with 'FreeText' annotations: - -.. literalinclude:: samples/annotations-freetext.py +This script shows a couple of basic ways to deal with 'FreeText' annotations: +.. literalinclude:: samples/annotations-freetext1.py The result looks like this: -.. image:: images/img-freetext.* +.. image:: images/img-freetext1.* :scale: 80 ------------------------------- - +Here is an example for using rich text and call-out lines: +.. literalinclude:: samples/annotations-freetext2.py +The result looks like this: -Using Buttons and JavaScript -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Since MuPDF v1.16, 'FreeText' annotations no longer support bold or italic versions of the Times-Roman, Helvetica or Courier fonts. +.. image:: images/img-freetext2.* + :scale: 80 -A big **thank you** to our user `@kurokawaikki `_, who contributed the following script to **circumvent this restriction**. -.. literalinclude:: samples/make-bold.py - :language: python +------------------------------ --------------------------- .. _RecipesAnnotations_C: diff --git a/docs/recipes-common-issues-and-their-solutions.rst b/docs/recipes-common-issues-and-their-solutions.rst index 981284978..8f8c1a590 100644 --- a/docs/recipes-common-issues-and-their-solutions.rst +++ b/docs/recipes-common-issues-and-their-solutions.rst @@ -165,7 +165,7 @@ Unfortunately there is not much you can do in most of these cases. * :meth:`Annot.set_flags` (annotation behaviour) * :meth:`Annot.set_info` (meta information, except changes to *content*) * :meth:`Annot.set_popup` (create popup or change its rect) - * :meth:`Annot.set_optional_content` (add / remove reference to optional content information) + * :meth:`Annot.set_oc` (add / remove reference to optional content information) * :meth:`Annot.set_open` * :meth:`Annot.update_file` (file attachment changes) diff --git a/docs/recipes-images.rst b/docs/recipes-images.rst index 69070c74c..7eaa77a55 100644 --- a/docs/recipes-images.rst +++ b/docs/recipes-images.rst @@ -215,7 +215,7 @@ Some images in PDFs are accompanied by **image masks**. In their simplest form, Whether an image does have such a mask can be recognized in one of two ways in PyMuPDF: -1. An item of :meth:`Document.get_page_images` has the general format `(xref, smask, ...)`, where *xref* is the image's :data:`xref` and *smask*, if positive, then it is the :data:`xref` of a mask. +1. An item of :meth:`Document.get_page_images` has the general format `(xref, smask, ...)`, where :data:`xref` is the image's :data:`xref` and *smask*, if positive, then it is the :data:`xref` of a mask. 2. The (dictionary) results of :meth:`Document.extract_image` have a key *"smask"*, which also contains any mask's :data:`xref` if positive. If *smask == 0* then the image encountered via :data:`xref` can be processed as it is. @@ -393,7 +393,7 @@ The general scheme is just the following two lines:: 1. The **input** argument of *pymupdf.Pixmap(arg)* can be a file or a bytes / io.BytesIO object containing an image. 2. Instead of an output **file**, you can also create a bytes object via *pix.tobytes("yyy")* and pass this around. -3. As a matter of course, input and output formats must be compatible in terms of colorspace and transparency. The *Pixmap* class has batteries included if adjustments are needed. +3. As a matter of course, input and output formats must be compatible in terms of colorspace and transparency. The ``Pixmap`` class has batteries included if adjustments are needed. .. note:: **Convert JPEG to Photoshop**:: diff --git a/docs/recipes-multiprocessing.rst b/docs/recipes-multiprocessing.rst index ba2a5c359..e47530b1e 100644 --- a/docs/recipes-multiprocessing.rst +++ b/docs/recipes-multiprocessing.rst @@ -16,11 +16,7 @@ Multiprocessing ============================== -:title:`MuPDF` has no integrated support for threading - calling itself "thread-agnostic". While there do exist tricky possibilities to still use threading with :title:`MuPDF`, the baseline consequence for |PyMuPDF| is: - -**No Python threading support**. - -Using |PyMuPDF| in a :title:`Python` threading environment will lead to blocking effects for the main thread. +|PyMuPDF| does not support running on multiple threads - doing so may cause incorrect behaviour or even crash Python itself. However, there is the option to use :title:`Python's` *multiprocessing* module in a variety of ways. diff --git a/docs/recipes-ocr.rst b/docs/recipes-ocr.rst index 32cd50934..fca4455c6 100644 --- a/docs/recipes-ocr.rst +++ b/docs/recipes-ocr.rst @@ -18,7 +18,7 @@ OCR - Optical Character Recognition |PyMuPDF| has integrated support for OCR (Optical Character Recognition). It is possible to use OCR for both, images (via the :ref:`Pixmap` class) and for document pages. -The feature is currently based on Tesseract-OCR which must be installed as a separate application -- see the installation chapter. +The feature is currently based on Tesseract-OCR which must be installed as a separate application -- see the :ref:`installation_ocr`. How to OCR an Image -------------------- diff --git a/docs/recipes-text.rst b/docs/recipes-text.rst index 46d67f34f..5bc1bcbc4 100644 --- a/docs/recipes-text.rst +++ b/docs/recipes-text.rst @@ -198,6 +198,9 @@ This script uses `Page.get_text("words")` to look for a string, handed in via cl How to Mark Searched Text ~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. codespell:ignore-begin + This script searches for text and marks it:: # -*- coding: utf-8 -*- @@ -222,6 +225,8 @@ This script searches for text and marks it:: # save to a new PDF doc.save("a-squiggly.pdf") +.. codespell:ignore-end + The result looks like this: .. image:: images/img-textmarker.* diff --git a/docs/recipes.rst b/docs/recipes.rst index b775111ca..c0125d50b 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -10,6 +10,11 @@ how-to-open-a-file.rst +---- + +.. toctree:: + + converting-files.rst ---- @@ -18,21 +23,18 @@ recipes-text.rst - ---- .. toctree:: recipes-images.rst - ---- .. toctree:: recipes-annotations.rst - ---- .. toctree:: diff --git a/docs/rect.rst b/docs/rect.rst index fbc5f6b6b..b5c2805b9 100644 --- a/docs/rect.rst +++ b/docs/rect.rst @@ -104,11 +104,11 @@ The following remarks are also valid for :ref:`IRect` objects: If "rect" is specified, the constructor creates a **new copy** of it. - Without parameters, the empty rectangle *Rect(0.0, 0.0, 0.0, 0.0)* is created. + Without parameters, the empty rectangle ``Rect(0.0, 0.0, 0.0, 0.0)`` is created. .. method:: round() - Creates the smallest containing :ref:`IRect`. This is **not** the same as simply rounding the rectangle's edges: The top left corner is rounded upwards and to the left while the bottom right corner is rounded downwards and to the right. + Creates the smallest containing :ref:`IRect`. This is **not the same** as simply rounding the rectangle's edges: The top left corner is rounded upwards and to the left while the bottom right corner is rounded downwards and to the right. >>> pymupdf.Rect(0.5, -0.01, 123.88, 455.123456).round() IRect(0, -1, 124, 456) @@ -131,9 +131,9 @@ The following remarks are also valid for :ref:`IRect` objects: Transforms the rectangle with a matrix and **replaces the original**. If the rectangle is empty or infinite, this is a no-operation. :arg m: The matrix for the transformation. - :type m: :ref:`Matrix` + :type m: :data:`matrix_like` - :rtype: *Rect* + :rtype: ``Rect`` :returns: the smallest rectangle that contains the transformed original. .. method:: intersect(r) @@ -141,21 +141,21 @@ The following remarks are also valid for :ref:`IRect` objects: The intersection (common rectangular area, largest rectangle contained in both) of the current rectangle and *r* is calculated and **replaces the current** rectangle. If either rectangle is empty, the result is also empty. If *r* is infinite, this is a no-operation. If the rectangles are (mathematically) disjoint sets, then the result is invalid. If the result is valid but empty, then the rectangles touch each other in a corner or (part of) a side. :arg r: Second rectangle - :type r: :ref:`Rect` + :type r: :data:`rect_like` .. method:: include_rect(r) - The smallest rectangle containing the current one and *r* is calculated and **replaces the current** one. If either rectangle is infinite, the result is also infinite. If one is empty, the other one will be taken as the result. + The smallest rectangle containing the current one and ``r`` is calculated and **replaces the current** one. If either rectangle is infinite, the result is also infinite. If ``r`` is empty, the current rectangle remains unchanged. Else if the current rectangle is empty, it is replaced by ``r``. :arg r: Second rectangle - :type r: :ref:`Rect` + :type r: :data:`rect_like` .. method:: include_point(p) - The smallest rectangle containing the current one and point *p* is calculated and **replaces the current** one. **The infinite rectangle remains unchanged.** To create a rectangle containing a series of points, start with (the empty) *pymupdf.Rect(p1, p1)* and successively include the remaining points. + The smallest rectangle containing the current one and :data:`point_like` ``p`` is calculated and **replaces the current** one. **The infinite rectangle remains unchanged.** To create the rectangle that wraps a sequence of points, start with :meth:`EMPTY_RECT` and successively include the members of the sequence. :arg p: Point to include. - :type p: :ref:`Point` + :type p: :data:`point_like` .. method:: get_area([unit]) @@ -167,7 +167,7 @@ The following remarks are also valid for :ref:`IRect` objects: .. method:: contains(x) - Checks whether *x* is contained in the rectangle. It may be an *IRect*, *Rect*, *Point* or number. If *x* is an empty rectangle, this is always true. If the rectangle is empty this is always *False* for all non-empty rectangles and for all points. `x in rect` and `rect.contains(x)` are equivalent. + Checks whether *x* is contained in the rectangle. It may be an *IRect*, *Rect*, *Point* or number. If *x* is an empty rectangle, this is always true. If the rectangle is empty this is always ``False`` for all non-empty rectangles and for all points. `x in rect` and `rect.contains(x)` are equivalent. :arg x: the object to check. :type x: :data:`rect_like` or :data:`point_like`. @@ -176,7 +176,7 @@ The following remarks are also valid for :ref:`IRect` objects: .. method:: intersects(r) - Checks whether the rectangle and a :data:`rect_like` "r" contain a common non-empty :ref:`Rect`. This will always be *False* if either is infinite or empty. + Checks whether the rectangle and a :data:`rect_like` "r" contain a common non-empty :ref:`Rect`. This will always be ``False`` if either is infinite or empty. :arg rect_like r: the rectangle to check. diff --git a/docs/requirements.txt b/docs/requirements.txt index 008b485ba..cb20fd944 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -6,3 +6,4 @@ furo readthedocs-sphinx-search==0.3.2 sphinx_copybutton sphinx-notfound-page +sphinxcontrib-googleanalytics diff --git a/docs/resources.rst b/docs/resources.rst index 6911618db..37be56dec 100644 --- a/docs/resources.rst +++ b/docs/resources.rst @@ -27,10 +27,10 @@ The :title:`GitHub` repository `PyMuPDF-Utilities +PyMuPDF འདི་ ཡིག་ཆ་བཀྲམ་སྤེལ་གྱི་དོན་ལུ་ པའི་ཐོན་ཐུམ་སྒྲིལ་དྲག་ཤོས་དང་མགྱོགས་ཤོས་ཅིག་ཨིན། +Here is some bold and italic text, followed by bold-italic. Text-based check boxes: {bullet}. +

""" + +# here are some colors +gold = (1, 1, 0) +green = (0, 1, 0) + +# new/empty PDF +doc = pymupdf.open() + +# make a page in ISO-A4 format +page = doc.new_page() + +# text goes into this: +rect = pymupdf.Rect(100, 100, 350, 200) + +# define some points for callout lines +p2 = rect.tr + (50, 30) +p3 = p2 + (0, 30) + +# define the annotation +annot = page.add_freetext_annot( + rect, + text, + fill_color=gold, # fill color + opacity=1, # non-transparent + rotate=0, # no rotation + border_width=1, # border and callout line width + dashes=None, # no dashing + richtext=True, # this is rich text + style=ds, # my styling default + callout=(p3, p2, rect.tr), # define end, knee, start points + line_end=pymupdf.PDF_ANNOT_LE_OPEN_ARROW, # symbol shown at p3 + border_color=green, +) + +doc.save(__file__.replace(".py", ".pdf"), pretty=True) diff --git a/docs/samples/make-bold.py b/docs/samples/make-bold.py deleted file mode 100644 index bdebc03da..000000000 --- a/docs/samples/make-bold.py +++ /dev/null @@ -1,75 +0,0 @@ -""" -Problem: Since MuPDF v1.16 a 'Freetext' annotation font is restricted to the -"normal" versions (no bold, no italics) of Times-Roman, Helvetica, Courier. -It is impossible to use PyMuPDF to modify this. - -Solution: Using Adobe's JavaScript API, it is possible to manipulate properties -of Freetext annotations. Check out these references: -https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_api_reference.pdf, -or https://www.adobe.com/devnet/acrobat/documentation.html. - -Function 'this.getAnnots()' will return all annotations as an array. We loop -over this array to set the properties of the text through the 'richContents' -attribute. -There is no explicit property to set text to bold, but it is possible to set -fontWeight=800 (400 is the normal size) of richContents. -Other attributes, like color, italics, etc. can also be set via richContents. - -If we have 'FreeText' annotations created with PyMuPDF, we can make use of this -JavaScript feature to modify the font - thus circumventing the above restriction. - -Use PyMuPDF v1.16.12 to create a push button that executes a Javascript -containing the desired code. This is what this program does. -Then open the resulting file with Adobe reader (!). -After clicking on the button, all Freetext annotations will be bold, and the -file can be saved. -If desired, the button can be removed again, using free tools like PyMuPDF or -PDF XChange editor. - -Note / Caution: ---------------- -The JavaScript will **only** work if the file is opened with Adobe Acrobat reader! -When using other PDF viewers, the reaction is unforeseeable. -""" -import sys - -import pymupdf - -# this JavaScript will execute when the button is clicked: -jscript = """ -var annt = this.getAnnots(); -annt.forEach(function (item, index) { - try { - var span = item.richContents; - span.forEach(function (it, dx) { - it.fontWeight = 800; - }) - item.richContents = span; - } catch (err) {} -}); -app.alert('Done'); -""" -i_fn = sys.argv[1] # input file name -o_fn = "bold-" + i_fn # output filename -doc = pymupdf.open(i_fn) # open input -page = doc[0] # get desired page - -# ------------------------------------------------ -# make a push button for invoking the JavaScript -# ------------------------------------------------ - -widget = pymupdf.Widget() # create widget - -# make it a 'PushButton' -widget.field_type = pymupdf.PDF_WIDGET_TYPE_BUTTON -widget.field_flags = pymupdf.PDF_BTN_FIELD_IS_PUSHBUTTON - -widget.rect = pymupdf.Rect(5, 5, 20, 20) # button position - -widget.script = jscript # fill in JavaScript source text -widget.field_name = "Make bold" # arbitrary name -widget.field_value = "Off" # arbitrary value -widget.fill_color = (0, 0, 1) # make button visible - -annot = page.add_widget(widget) # add the widget to the page -doc.save(o_fn) # output the file diff --git a/docs/samples/national-capitals.py b/docs/samples/national-capitals.py index 3b29d412d..d417ea85a 100644 --- a/docs/samples/national-capitals.py +++ b/docs/samples/national-capitals.py @@ -20,6 +20,7 @@ Table data. Used to populate a temporary SQL database, which will be processed by the script. Its only purpose is to avoid carrying around a separate database file. """ +# codespell:ignore-begin table_data = """China;Beijing;21542000;1.5%;2018 Japan;Tokyo;13921000;11.2%;2019 DR Congo;Kinshasa;12691000;13.2%;2017 @@ -260,6 +261,7 @@ Cocos (Keeling) Islands (Australia);West Island;134;24.6%;2011 Pitcairn Islands (UK);Adamstown;40;100.0%;2021 South Georgia and the South Sandwich Islands (UK);King Edward Point;22;73.3%;2018""" +# codespell:ignore-end # ------------------------------------------------------------------- # HTML template for the report. We define no table header
items diff --git a/docs/shape.rst b/docs/shape.rst index 6182b71f3..c3a3cb585 100644 --- a/docs/shape.rst +++ b/docs/shape.rst @@ -133,7 +133,7 @@ Several draw methods can be executed in a row and each one of them will contribu Draw a standard cubic Bézier curve from *p1* to *p4*, using *p2* and *p3* as control points. - All arguments are :data:`point_like` \s. + All arguments are :data:`point_like` objects. :rtype: :ref:`Point` :returns: the end point, *p4*. @@ -256,12 +256,12 @@ Several draw methods can be executed in a row and each one of them will contribu The method also supports **morphing the compound drawing** using :ref:`Point` *fixpoint* and :ref:`matrix` *matrix*. - :arg sequence morph: morph the text or the compound drawing around some arbitrary :ref:`Point` *fixpoint* by applying :ref:`Matrix` *matrix* to it. This implies that *fixpoint* is a **fixed point** of this operation: it will not change its position. Default is no morphing (*None*). The matrix can contain any values in its first 4 components, *matrix.e == matrix.f == 0* must be true, however. This means that any combination of scaling, shearing, rotating, flipping, etc. is possible, but translations are not. + :arg sequence morph: morph the text or the compound drawing around some arbitrary :ref:`Point` *fixpoint* by applying :ref:`Matrix` *matrix* to it. This implies that *fixpoint* is a **fixed point** of this operation: it will not change its position. Default is no morphing (``None``). The matrix can contain any values in its first 4 components, *matrix.e == matrix.f == 0* must be true, however. This means that any combination of scaling, shearing, rotating, flipping, etc. is possible, but translations are not. :arg float stroke_opacity: *(new in v1.18.1)* set transparency for stroke colors. Value < 0 or > 1 will be ignored. Default is 1 (intransparent). :arg float fill_opacity: *(new in v1.18.1)* set transparency for fill colors. Default is 1 (intransparent). - :arg bool even_odd: request the **"even-odd rule"** for filling operations. Default is *False*, so that the **"nonzero winding number rule"** is used. These rules are alternative methods to apply the fill color where areas overlap. Only with fairly complex shapes a different behavior is to be expected with these rules. For an in-depth explanation, see :ref:`AdobeManual`, pp. 137 ff. Here is an example to demonstrate the difference. + :arg bool even_odd: request the **"even-odd rule"** for filling operations. Default is ``False``, so that the **"nonzero winding number rule"** is used. These rules are alternative methods to apply the fill color where areas overlap. Only with fairly complex shapes a different behavior is to be expected with these rules. For an in-depth explanation, see :ref:`AdobeManual`, pp. 137 ff. Here is an example to demonstrate the difference. :arg int oc: *(new in v1.18.4)* the :data:`xref` number of an :data:`OCG` or :data:`OCMD` to make this drawing conditionally displayable. @@ -286,21 +286,22 @@ Several draw methods can be executed in a row and each one of them will contribu pair: lineheight; insert_text pair: morph; insert_text pair: render_mode; insert_text + pair: miter_limit; insert_text pair: rotate; insert_text pair: stroke_opacity; insert_text pair: fill_opacity; insert_text pair: oc; insert_text - .. method:: insert_text(point, text, fontsize=11, fontname="helv", fontfile=None, set_simple=False, encoding=TEXT_ENCODING_LATIN, color=None, lineheight=None, fill=None, render_mode=0, border_width=1, rotate=0, morph=None, stroke_opacity=1, fill_opacity=1, oc=0) + .. method:: insert_text(point, text, *, fontsize=11, fontname="helv", fontfile=None, set_simple=False, encoding=TEXT_ENCODING_LATIN, color=None, lineheight=None, fill=None, render_mode=0, miter_limit=1, border_width=1, rotate=0, morph=None, stroke_opacity=1, fill_opacity=1, oc=0) - Insert text lines start at *point*. + Insert text lines starting at ``point``. :arg point_like point: the bottom-left position of the first character of *text* in pixels. It is important to understand, how this works in conjunction with the *rotate* parameter. Please have a look at the following picture. The small red dots indicate the positions of *point* in each of the four possible cases. .. image:: images/img-inserttext.* :scale: 33 - :arg str/sequence text: the text to be inserted. May be specified as either a string type or as a sequence type. For sequences, or strings containing line breaks *\n*, several lines will be inserted. No care will be taken if lines are too wide, but the number of inserted lines will be limited by "vertical" space on the page (in the sense of reading direction as established by the *rotate* parameter). Any rest of *text* is discarded -- the return code however contains the number of inserted lines. + :arg str/sequence text: the text to be inserted. May be specified as either a string type or as a sequence type. For sequences, or strings containing line breaks ``\n``, several lines will be inserted. No care will be taken if lines are too wide, but the number of inserted lines will be limited by "vertical" space on the page (in the sense of reading direction as established by the *rotate* parameter). Any rest of *text* is discarded -- the return code however contains the number of inserted lines. :arg float lineheight: a factor to override the line height calculated from font properties. If not `None`, a line height of `fontsize * lineheight` will be used. :arg float stroke_opacity: *(new in v1.18.1)* set transparency for stroke colors (the **border line** of a character). Only `0 <= value <= 1` will be considered. Default is 1 (intransparent). @@ -328,10 +329,11 @@ Several draw methods can be executed in a row and each one of them will contribu pair: lineheight; insert_textbox pair: morph; insert_textbox pair: render_mode; insert_textbox + pair: miter_limit; insert_textbox pair: rotate; insert_textbox pair: oc; insert_textbox - .. method:: insert_textbox(rect, buffer, fontsize=11, fontname="helv", fontfile=None, set_simple=False, encoding=TEXT_ENCODING_LATIN, color=None, fill=None, render_mode=0, border_width=1, expandtabs=8, align=TEXT_ALIGN_LEFT, rotate=0, lineheight=None, morph=None, stroke_opacity=1, fill_opacity=1, oc=0) + .. method:: insert_textbox(rect, buffer, *, fontsize=11, fontname="helv", fontfile=None, set_simple=False, encoding=TEXT_ENCODING_LATIN, color=None, fill=None, render_mode=0, miter_limit=1, border_width=1, expandtabs=8, align=TEXT_ALIGN_LEFT, rotate=0, lineheight=None, morph=None, stroke_opacity=1, fill_opacity=1, oc=0) PDF only: Insert text into the specified rectangle. The text will be split into lines and words and then filled into the available space, starting from one of the four rectangle corners, which depends on `rotate`. Line feeds and multiple space will be respected. @@ -343,7 +345,7 @@ Several draw methods can be executed in a row and each one of them will contribu :arg float lineheight: a factor to override the line height calculated from font properties. If not `None`, a line height of `fontsize * lineheight` will be used. - :arg int expandtabs: controls handling of tab characters ``\t`` using the `string.expandtabs()` method **per each line**. + :arg int expandtabs: controls handling of tab characters ``\t`` using the `string.expandtabs()` method **per each line**. :arg float stroke_opacity: *(new in v1.18.1)* set transparency for stroke colors. Negative values and values > 1 will be ignored. Default is 1 (intransparent). :arg float fill_opacity: *(new in v1.18.1)* set transparency for fill colors. Default is 1 (intransparent). Use this value to control transparency of the text color. Stroke opacity **only** affects the border line of characters. @@ -420,7 +422,7 @@ Several draw methods can be executed in a row and each one of them will contribu .. attribute:: rect - Rectangle surrounding drawings. This attribute is at your disposal and may be changed at any time. Its value is set to *None* when a shape is created or committed. Every *draw** method, and :meth:`Shape.insert_textbox` update this property (i.e. **enlarge** the rectangle as needed). **Morphing** operations, however (:meth:`Shape.finish`, :meth:`Shape.insert_textbox`) are ignored. + Rectangle surrounding drawings. This attribute is at your disposal and may be changed at any time. Its value is set to ``None`` when a shape is created or committed. Every *draw** method, and :meth:`Shape.insert_textbox` update this property (i.e. **enlarge** the rectangle as needed). **Morphing** operations, however (:meth:`Shape.finish`, :meth:`Shape.insert_textbox`) are ignored. A typical use of this attribute would be setting :attr:`Page.cropbox_position` to this value, when you are creating shapes for later or external use. If you have not manipulated the attribute yourself, it should reflect a rectangle that contains all drawings so far. @@ -441,7 +443,7 @@ Several draw methods can be executed in a row and each one of them will contribu .. attribute:: lastPoint - For reference only: the current point of the drawing path. It is *None* at *Shape* creation and after each *finish()* and *commit()*. + For reference only: the current point of the drawing path. It is ``None`` at *Shape* creation and after each *finish()* and *commit()*. :type: :ref:`Point` @@ -555,9 +557,9 @@ Common Parameters **dashes** (*str*) - Causes lines to be drawn dashed. The general format is `"[n m] p"` of (up to) 3 floats denoting pixel lengths. `n` is the dash length, `m` (optional) is the subsequent gap length, and `p` (the "phase" - **required**, even if 0!) specifies how many pixels should be skipped before the dashing starts. If `m` is omitted, it defaults to `n`. + Causes lines to be drawn dashed. The general format is `"[n m] p"` of (up to) 3 floats denoting pixel lengths. ``n`` is the dash length, ``m`` (optional) is the subsequent gap length, and ``p`` (the "phase" - **required**, even if 0!) specifies how many pixels should be skipped before the dashing starts. If ``m`` is omitted, it defaults to ``n``. - A continuous line (no dashes) is drawn with `"[] 0"` or *None* or `""`. Examples: + A continuous line (no dashes) is drawn with `"[] 0"` or ``None`` or `""`. Examples: * Specifying `"[3 4] 0"` means dashes of 3 and gaps of 4 pixels following each other. * `"[3 3] 0"` and `"[3] 0"` do the same thing. @@ -583,7 +585,7 @@ Common Parameters The stroke ("border") width of the elements in a shape (if applicable). The default value is 1. The values width, color and fill have the following relationship / dependency: * If `fill=None` shape elements will always be drawn with a border - even if `color=None` (in which case black is taken) or `width=0` (in which case 1 is taken). - * Shapes without border can only be achieved if a fill color is specified (which may be white of course). To achieve this, specify `width=0`. In this case, the `color` parameter is ignored. + * Shapes without border can only be achieved if a fill color is specified (which may be white of course). To achieve this, specify `width=0`. In this case, the ``color`` parameter is ignored. ---- @@ -591,7 +593,7 @@ Common Parameters Both values are floats in range [0, 1]. Negative values or values > 1 will ignored (in most cases). Both set the transparency such that a value 0.5 corresponds to 50% transparency, 0 means invisible and 1 means intransparent. For e.g. a rectangle the stroke opacity applies to its border and fill opacity to its interior. - For text insertions (:meth:`Shape.insert_text` and :meth:`Shape.insert_textbox`), use *fill_opacity* for the text. At first sight this seems surprising, but it becomes obvious when you look further down to *render_mode*: *fill_opacity* applies to the yellow and *stroke_opacity* applies to the blue color. + For text insertions (:meth:`Shape.insert_text` and :meth:`Shape.insert_textbox`), use *fill_opacity* for the text. At first sight this seems surprising, but it becomes obvious when you look further down to `render_mode`: `fill_opacity` applies to the yellow and `stroke_opacity` applies to the blue color. ---- @@ -616,6 +618,28 @@ Common Parameters ---- +**miter_limit** (*float*) + + A float specifying the maximum acceptable value of the quotient `miter-length / line-width` ("miter quotient"). Used in text output methods. This is only relevant for non-zero render mode values -- then, characters are written with border lines (i.e. "stroked"). + + If two lines stroking some character meet at a sharp (<= 90°) angle and the line width is large enough, then "spikes" may become visible -- causing an ugly appearance as shown below. For more background, see page 126 of the :ref:`AdobeManual`. + + For instance, when joins meet at 90°, then the miter length is ``sqrt(2) * line-width``, so the miter quotient is ``sqrt(2)``. + + If ``miter_limit`` is exceeded, then all joins with a larger qotient will appear as beveled ("butt" appearance). + + The default value 1 (and any smaller value) will ensure that all joins are rendered as a butt. A value of ``None`` will use the PDF default value. + + Example text showing spikes (``miter_limit=None``): + + .. image:: images/spikes-yes.* + + Example text suppressing spikes (``miter_limit=1``): + + .. image:: images/spikes-no.* + +---- + **overlay** (*bool*) Causes the item to appear in foreground (default) or background. @@ -624,7 +648,7 @@ Common Parameters **morph** (*sequence*) - Causes "morphing" of either a shape, created by the *draw*()* methods, or the text inserted by page methods *insert_textbox()* / *insert_text()*. If not *None*, it must be a pair *(fixpoint, matrix)*, where *fixpoint* is a :ref:`Point` and *matrix* is a :ref:`Matrix`. The matrix can be anything except translations, i.e. *matrix.e == matrix.f == 0* must be true. The point is used as a fixed point for the matrix operation. For example, if *matrix* is a rotation or scaling, then *fixpoint* is its center. Similarly, if *matrix* is a left-right or up-down flip, then the mirroring axis will be the vertical, respectively horizontal line going through *fixpoint*, etc. + Causes "morphing" of either a shape, created by the *draw*()* methods, or the text inserted by page methods *insert_textbox()* / *insert_text()*. If not ``None``, it must be a pair *(fixpoint, matrix)*, where *fixpoint* is a :ref:`Point` and *matrix* is a :ref:`Matrix`. The matrix can be anything except translations, i.e. *matrix.e == matrix.f == 0* must be true. The point is used as a fixed point for the matrix operation. For example, if *matrix* is a rotation or scaling, then *fixpoint* is its center. Similarly, if *matrix* is a left-right or up-down flip, then the mirroring axis will be the vertical, respectively horizontal line going through *fixpoint*, etc. .. note:: Several methods contain checks whether the to be inserted items will actually fit into the page (like :meth:`Shape.insert_text`, or :meth:`Shape.draw_rect`). For the result of a morphing operation there is however no such guaranty: this is entirely the programmer's responsibility. diff --git a/docs/textpage.rst b/docs/textpage.rst index a06d7e4eb..60aa54812 100644 --- a/docs/textpage.rst +++ b/docs/textpage.rst @@ -202,28 +202,25 @@ Block Dictionaries ~~~~~~~~~~~~~~~~~~ Block dictionaries come in two different formats for **image blocks** and for **text blocks**. -* *(Changed in v1.18.0)* -- new dict key *number*, the block number. -* *(Changed in v1.18.11)* -- new dict key *transform*, the image transformation matrix for image blocks. -* *(Changed in v1.18.11)* -- new dict key *size*, the size of the image in bytes for image blocks. - **Image block:** =============== =============================================================== **Key** **Value** =============== =============================================================== -type 1 = image *(int)* +type 1 = image (``int``) bbox image bbox on page (:data:`rect_like`) -number block count *(int)* -ext image type *(str)*, as file extension, see below -width original image width *(int)* -height original image height *(int)* -colorspace colorspace component count *(int)* -xres resolution in x-direction *(int)* -yres resolution in y-direction *(int)* -bpc bits per component *(int)* +number block count (``int``) +ext image type (``str``), as file extension, see below +width original image width (``int``) +height original image height (``int``) +colorspace colorspace component count (``int``) +xres resolution in x-direction (``int``) [#f3]_ +yres resolution in y-direction (``int``) [#f3]_ +bpc bits per component (``int``) transform matrix transforming image rect to bbox (:data:`matrix_like`) -size size of the image in bytes *(int)* -image image content *(bytes)* +size size of the image in bytes (``int``) +image image content (``bytes``) +mask image mask content (``bytes``) for transparent images =============== =============================================================== Possible values of the "ext" key are "bmp", "gif", "jpeg", "jpx" (JPEG 2000), "jxr" (JPEG XR), "png", "pnm", and "tiff". @@ -241,6 +238,12 @@ Possible values of the "ext" key are "bmp", "gif", "jpeg", "jpx" (JPEG 2000), "j 3. The image's "transformation matrix" is defined as the matrix, for which the expression `bbox / transform == pymupdf.Rect(0, 0, 1, 1)` is true, lookup details here: :ref:`ImageTransformation`. + 4. A transparent image may be accompanied by a mask image. This is stored under key `"mask"` and has the format of a `DeviceGray` PNG image. Otherwise the value of this key is ``None``. If present, you may be able to recover (an equivalent of) the original image -- i.e. with transparency -- by creating :ref:`Pixmap` objects from the "image", respectively "mask" values and overlay them. This is not guaranteed to always work because mask images come in multiple formats, of which not all qualify for the conditions under which overlaying Pixmaps are supported. Here is a code snippet: + + >>> base = pymupdf.Pixmap(block["image"]) + >>> mask = pymupdf.Pixmap(block["mask"]) + >>> result = pymupdf.Pixmap(base, mask) + **Text block:** @@ -288,15 +291,23 @@ ascender ascender of the font *(float)* descender descender of the font *(float)* size font size *(float)* flags font characteristics *(int)* -color text color in sRGB format *(int)* +char_flags char characteristics *(int)* +color text color in sRGB format 0xRRGGBB *(int)*. +alpha text opacity 0..255 *(int)*. text (only for :meth:`extractDICT`) text *(str)* chars (only for :meth:`extractRAWDICT`) *list* of character dictionaries =============== ===================================================================== +|history_begin| + +*(New in version 1.25.3.0):* Added *"alpha"* item. + *(New in version 1.16.0):* *"color"* is the text color encoded in sRGB (int) format, e.g. 0xFF0000 for red. There are functions for converting this integer back to formats (r, g, b) (PDF with float values from 0 to 1) :meth:`sRGB_to_pdf`, or (R, G, B), :meth:`sRGB_to_rgb` (with integer values from 0 to 255). *(New in v1.18.5):* *"ascender"* and *"descender"* are font properties, provided relative to :data:`fontsize` 1. Note that descender is a negative value. The following picture shows the relationship to other values and properties. +|history_end| + .. image:: images/img-asc-desc.* :scale: 60 @@ -322,19 +333,35 @@ The following shows the original span rectangle in red and the rectangle with re *"flags"* is an integer, which represents font properties except for the first bit 0. They are to be interpreted like this: -* bit 0: superscripted (2\ :sup:`0`) -- not a font property, detected by MuPDF code. -* bit 1: italic (2\ :sup:`1`) -* bit 2: serifed (2\ :sup:`2`) -* bit 3: monospaced (2\ :sup:`3`) -* bit 4: bold (2\ :sup:`4`) +* bit 0: superscripted (:data:`TEXT_FONT_SUPERSCRIPT`) -- not a font property, detected by MuPDF code. +* bit 1: italic (:data:`TEXT_FONT_ITALIC`) +* bit 2: serifed (:data:`TEXT_FONT_SERIFED`) +* bit 3: monospaced (:data:`TEXT_FONT_MONOSPACED`) +* bit 4: bold (:data:`TEXT_FONT_BOLD`) Test these characteristics like so: ->>> if flags & 2**1: print("italic") ->>> # etc. +>>> if flags & pymupdf.TEXT_FONT_BOLD & pymupdf.TEXT_FONT_ITALIC: + print(f"{span['text']=} is bold and italic") + Bits 1 thru 4 are font properties, i.e. encoded in the font program. Please note, that this information is not necessarily correct or complete: fonts quite often contain wrong data here. +*"char_flags"* is an integer, which represents extra character properties: + +* bit 0: strikeout. +* bit 1: underline. +* bit 2: synthetic (always 0, see char dictionary). +* bit 3: filled. +* bit 4: stroked. +* bit 5: clipped. + +For example if not filled and not stroked (`if not (char_flags & 2**3 & 2**4): +...`) then the text will be invisible. + +(`char_flags` is new in v1.25.2.) + + Character Dictionary for :meth:`extractRAWDICT` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -343,20 +370,24 @@ Character Dictionary for :meth:`extractRAWDICT` =============== =========================================================== origin character's left baseline point, :data:`point_like` bbox character rectangle, :data:`rect_like` +synthetic bool. c the character (unicode) =============== =========================================================== +(`synthetic` is new in v1.25.3.) + This image shows the relationship between a character's bbox and its quad: |textpagechar| .. |textpagechar| image:: images/img-textpage-char.* :align: top :scale: 66 - .. rubric:: Footnotes .. [#f1] Image specifications for a PDF page are done in a page's (sub-) :data:`dictionary`, called `/Resources`. Resource dictionaries can be **inherited** from any of the page's parent objects (usually the :data:`catalog` -- the top-level parent). The PDF creator may e.g. define one `/Resources` on file level, naming all images and / or all fonts ever used by any page. In these cases, :meth:`Page.get_images` and :meth:`Page.get_fonts` will consequently return the same lists for all pages. If desired, this situation can be reverted using :meth:`Page.clean_contents`. After execution, the page's object definition will show fonts and images that are actually used. .. [#f2] The coordinate systems of MuPDF and PDF are different in that MuPDF uses the page's top-left point as `(0, 0)`. In PDF, this is the bottom-left point. Therefore, the positive direction for MuPDF's y-axis is **from top to bottom**. This causes the sign change for the sine value here: a **negative** value indicates anti-clockwise rotation of the text. +.. [#f3] This value is always 96, the default of the PDF interpreter. It **does not reflect** the resolution of the image itself. If you need the image's resolution, use the :meth:`Pixmap.xres` and :meth:`Pixmap.yres` attributes of the :ref:`Pixmap` created from the returned image binary. + .. include:: footer.rst diff --git a/docs/textwriter.rst b/docs/textwriter.rst index e51f33a87..782710f9a 100644 --- a/docs/textwriter.rst +++ b/docs/textwriter.rst @@ -75,7 +75,7 @@ Using this object entails three steps: :arg font: a :ref:`Font`. If omitted, `pymupdf.Font("helv")` will be used. :arg float fontsize: the :data:`fontsize`, a positive number, default 11. :arg str language: the language to use, e.g. "en" for English. Meaningful values should be compliant with the ISO 639 standards 1, 2, 3 or 5. Reserved for future use: currently has no effect as far as we know. - :arg bool right_to_left: *(New in v1.18.9)* whether the text should be written from right to left. Applicable for languages like Arabian or Hebrew. Default is *False*. If *True*, any Latin parts within the text will automatically converted. There are no other consequences, i.e. :attr:`TextWriter.last_point` will still be the rightmost character, and there neither is any alignment taking place. Hence you may want to use :meth:`TextWriter.fill_textbox` instead. + :arg bool right_to_left: *(New in v1.18.9)* whether the text should be written from right to left. Applicable for languages like Arabian or Hebrew. Default is ``False``. If ``True``, any Latin parts within the text will automatically converted. There are no other consequences, i.e. :attr:`TextWriter.last_point` will still be the rightmost character, and there neither is any alignment taking place. Hence you may want to use :meth:`TextWriter.fill_textbox` instead. :arg bool small_caps: *(New in v1.18.15)* look for the character's Small Capital version in the font. If present, take that value instead. Otherwise the original character (this font or the fallback font) will be taken. The fallback font will never return small caps. For example, this snippet:: >>> doc = pymupdf.open() @@ -124,10 +124,10 @@ Using this object entails three steps: :arg font: the :ref:`Font`, default `pymupdf.Font("helv")`. :arg float fontsize: the :data:`fontsize`. :arg int align: text alignment. Use one of TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT or TEXT_ALIGN_JUSTIFY. - :arg bool right_to_left: *(New in v1.18.9)* whether the text should be written from right to left. Applicable for languages like Arabian or Hebrew. Default is *False*. If *True*, any Latin parts are automatically reverted. You must still set the alignment (if you want right alignment), it does not happen automatically -- the other alignment options remain available as well. + :arg bool right_to_left: *(New in v1.18.9)* whether the text should be written from right to left. Applicable for languages like Arabian or Hebrew. Default is ``False``. If ``True``, any Latin parts are automatically reverted. You must still set the alignment (if you want right alignment), it does not happen automatically -- the other alignment options remain available as well. :arg bool warn: on text overflow do nothing, warn, or raise an exception. Overflow text will never be written. **Changed in v1.18.9:** - * Default is *None*. + * Default is ``None``. * The list of overflow lines will be returned. :arg bool small_caps: *(New in v1.18.15)* see :meth:`append`. @@ -184,7 +184,7 @@ Using this object entails three steps: :rtype: :ref:`Rect` -.. note:: To see some demo scripts dealing with TextWriter, have a look at `this `_ repository. +.. note:: To see some demo scripts dealing with TextWriter, have a look at `the TextWriter demo scripts `_. 1. Opacity and color apply to **all the text** in this object. 2. If you need different colors / transparency, you must create a separate TextWriter. Whenever you determine the color should change, simply append the text to the respective TextWriter using the previously returned :attr:`last_point` as position for the new text span. diff --git a/docs/the-basics.rst b/docs/the-basics.rst index 731afb852..9bab2728b 100644 --- a/docs/the-basics.rst +++ b/docs/the-basics.rst @@ -198,7 +198,7 @@ With :meth:`Document.insert_file` you can invoke the method to merge :ref:`suppo **Taking it further** - It is easy to join PDFs with :meth:`Document.insert_pdf` & :meth:`Document.insert_file`. Given open |PDF| documents, you can copy page ranges from one to the other. You can select the point where the copied pages should be placed, you can revert the page sequence and also change page rotation. This Wiki `article `_ contains a full description. + It is easy to join PDFs with :meth:`Document.insert_pdf` & :meth:`Document.insert_file`. Given open |PDF| documents, you can copy page ranges from one to the other. You can select the point where the copied pages should be placed, you can revert the page sequence and also change page rotation. The GUI script `join.py `_ uses this method to join a list of files while also joining the respective table of contents segments. It looks like this: @@ -217,7 +217,7 @@ With :meth:`Document.insert_file` you can invoke the method to merge :ref:`suppo Working with Coordinates ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -There is one *mathematical term* that you should feel comfortable with when using **PyMuPDF** - **"coordinates"**. Please have a quick look at the :ref:`Coordinates` section to understand the coordinate system to help you with positioning objects and understand your document space. +There is one *mathematical term* that you should feel comfortable with when using |PyMuPDF| - **"coordinates"**. Please have a quick look at the :ref:`Coordinates` section to understand the coordinate system to help you with positioning objects and understand your document space. @@ -998,7 +998,7 @@ Annotations (:ref:`Annot`) on pages can be retrieved with the `page.annots()` me .. _The_Basics_Redacting: -Redacting content from a **PDF** +Redacting content from a |PDF| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Redactions are special types of annotations which can be marked onto a document page to denote an area on the page which should be securely removed. After marking an area with a rectangle then this area will be marked for *redaction*, once the redaction is *applied* then the content is securely removed. @@ -1062,7 +1062,7 @@ Another example could be redacting an area of a page, but not to redact any line .. warning:: - Once a redacted version of a document is saved then the redacted content in the **PDF** is *irretrievable*. Thus, a redacted area in a document removes text and graphics completely from that area. + Once a redacted version of a document is saved then the redacted content in the |PDF| is *irretrievable*. Thus, a redacted area in a document removes text and graphics completely from that area. .. note:: @@ -1087,7 +1087,7 @@ Another example could be redacting an area of a page, but not to redact any line Converting PDF Documents ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -We recommend the pdf2docx_ library which uses **PyMuPDF** and the **python-docx** library to provide simple document conversion from **PDF** to **DOCX** format. +We recommend the pdf2docx_ library which uses |PyMuPDF| and the **python-docx** library to provide simple document conversion from |PDF| to **DOCX** format. diff --git a/docs/tools.rst b/docs/tools.rst index c844d155e..2347af6ec 100644 --- a/docs/tools.rst +++ b/docs/tools.rst @@ -65,7 +65,7 @@ This class is a collection of utility methods and attributes, mainly around memo :arg bool on: if omitted or `None`, the current setting is returned. For other values the *bool()* function is applied to set a global variable. If `True`, :meth:`Page.search_for` and :meth:`Page.get_text` methods return character, span, line or block bboxes that have a height of *font size*. If `False` (standard setting when PyMuPDF is imported), bbox height will be based on font properties and normally equal *line height*. :rtype: bool - :returns: *True* or *False*. + :returns: ``True`` or ``False``. .. note:: Text extraction options "xml", "xhtml" and "html", which directly wrap MuPDF code, are not influenced by this. @@ -78,7 +78,7 @@ This class is a collection of utility methods and attributes, mainly around memo :arg bool on: if omitted / `None`, the current setting is returned. Arguments evaluating to `True` or `False` set a global variable. If `True`, options "dict", "json", "rawdict" and "rawjson" will return e.g. `"NOHSJV+Calibri-Light"`, otherwise only `"Calibri-Light"` (the default). The setting remains in effect until changed again. :rtype: bool - :returns: *True* or *False*. + :returns: ``True`` or ``False``. .. note:: Except mentioned above, no other text extraction variants are influenced by this. This is especially true for the options "xml", "xhtml" and "html", which are based on MuPDF code. They extract the font name `"Calibri-Light"`, or even just the **family** name -- `Calibri` in this example. @@ -92,7 +92,7 @@ This class is a collection of utility methods and attributes, mainly around memo :arg bool on: if omitted or `None`, the current setting is returned. For other values the *bool()* function is applied to set a global variable. If `True`, PyMuPDF will not try to access the resp. font properties and use values `ascender=0.8` and `descender=-0.2` instead. :rtype: bool - :returns: *True* or *False*. + :returns: ``True`` or ``False``. .. method:: store_shrink(percent) @@ -137,11 +137,11 @@ This class is a collection of utility methods and attributes, mainly around memo :arg value: * If `None`, the current setting is left unchanged. * Otherwise changes the current setting to `bool(value)`; - if *True*, future MuPDF errors will be shown as :ref:`Messages`. + if ``True``, future MuPDF errors will be shown as :ref:`Messages`. * Regardless of this setting, MuPDF errors will always be stored in the warnings store. - * Upon import of |PyMuPDF| this value is *True*. + * Upon import of |PyMuPDF| this value is ``True``. - :returns: The current setting as *True* or *False*. + :returns: The current setting as ``True`` or ``False``. * New in version 1.16.8 @@ -153,11 +153,11 @@ This class is a collection of utility methods and attributes, mainly around memo :arg value: * If `None`, the current setting is left unchanged. * Otherwise changes the current setting to `bool(value)`; - if *True*, future MuPDF warnings will be shown as :ref:`Messages`. + if ``True``, future MuPDF warnings will be shown as :ref:`Messages`. * Regardless of this setting, MuPDF warnings will always be stored in the warnings store. - * Upon import of |PyMuPDF| this value is *True*. + * Upon import of |PyMuPDF| this value is ``True``. - :returns: The current setting as *True* or *False*. + :returns: The current setting as ``True`` or ``False``. * New in version 1.16.8 @@ -238,13 +238,13 @@ This class is a collection of utility methods and attributes, mainly around memo .. attribute:: store_maxsize - Maximum storables cache size in bytes. **PyMuPDF** is generated with a value of 268'435'456 (256 MB, the default value), which you should therefore always see here. If this value is zero, then an "unlimited" growth is permitted. + Maximum storables cache size in bytes. |PyMuPDF| is generated with a value of 268'435'456 (256 MB, the default value), which you should therefore always see here. If this value is zero, then an "unlimited" growth is permitted. :rtype: int .. attribute:: store_size - Current storables cache size in bytes. This value may change (and will usually increase) with every use of a **PyMuPDF** function. It will (automatically) decrease only when :attr:`Tools.store_maxsize` is going to be exceeded: in this case, **MuPDF** will evict low-usage objects until the value is again in range. + Current storables cache size in bytes. This value may change (and will usually increase) with every use of a |PyMuPDF| function. It will (automatically) decrease only when :attr:`Tools.store_maxsize` is going to be exceeded: in this case, |MuPDF| will evict low-usage objects until the value is again in range. :rtype: int diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 6c2b64b11..19ddb1968 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -9,9 +9,11 @@ Tutorial .. highlight:: python -This tutorial will show you the use of |PyMuPDF|, :title:`MuPDF` in :title:`Python`, step by step. +This tutorial will show you the use of |PyMuPDF|, |MuPDF| in Python, step by step. -Because :title:`MuPDF` supports not only PDF, but also XPS, OpenXPS, CBZ, CBR, FB2 and EPUB formats, so does PyMuPDF [#f1]_. Nevertheless, for the sake of brevity we will only talk about PDF files. At places where indeed only PDF files are supported, this will be mentioned explicitly. +Because |MuPDF| supports not only PDF, but also XPS, OpenXPS, CBZ, CBR, FB2 and EPUB formats, so does |PyMuPDF| [#f1]_. Nevertheless, for the sake of brevity we will only talk about PDF files. At places where indeed only PDF files are supported, this will be mentioned explicitly. + +In addition to this introduction, please do visit PyMuPDF's `YouTube Channel `_ which covers most of the following in the form of YouTube "Shorts" and longer videos. Importing the Bindings ========================== @@ -69,7 +71,7 @@ Some :ref:`Document` Methods and Attributes Accessing Meta Data ======================== -PyMuPDF fully supports standard metadata. :attr:`Document.metadata` is a Python dictionary with the following keys. It is available for **all document types**, though not all entries may always contain data. For details of their meanings and formats consult the respective manuals, e.g. :ref:`AdobeManual` for PDF. Further information can also be found in chapter :ref:`Document`. The meta data fields are strings or *None* if not otherwise indicated. Also be aware that not all of them always contain meaningful data -- even if they are not *None*. +PyMuPDF fully supports standard metadata. :attr:`Document.metadata` is a Python dictionary with the following keys. It is available for **all document types**, though not all entries may always contain data. For details of their meanings and formats consult the respective manuals, e.g. :ref:`AdobeManual` for PDF. Further information can also be found in chapter :ref:`Document`. The meta data fields are strings or ``None`` if not otherwise indicated. Also be aware that not all of them always contain meaningful data -- even if they are not ``None``. ============== ================================= Key Value @@ -162,9 +164,9 @@ This example creates a **raster** image of a page's content:: pix = page.get_pixmap() -*pix* is a :ref:`Pixmap` object which (in this case) contains an **RGB** image of the page, ready to be used for many purposes. Method :meth:`Page.get_pixmap` offers lots of variations for controlling the image: resolution / DPI, colorspace (e.g. to produce a grayscale image or an image with a subtractive color scheme), transparency, rotation, mirroring, shifting, shearing, etc. For example: to create an **RGBA** image (i.e. containing an alpha channel), specify *pix = page.get_pixmap(alpha=True)*. +``pix`` is a :ref:`Pixmap` object which (in this case) contains an **RGB** image of the page, ready to be used for many purposes. Method :meth:`Page.get_pixmap` offers lots of variations for controlling the image: resolution / DPI, colorspace (e.g. to produce a grayscale image or an image with a subtractive color scheme), transparency, rotation, mirroring, shifting, shearing, etc. For example: to create an **RGBA** image (i.e. containing an alpha channel), specify *pix = page.get_pixmap(alpha=True)*. -A :ref:`Pixmap` contains a number of methods and attributes which are referenced below. Among them are the integers *width*, *height* (each in pixels) and *stride* (number of bytes of one horizontal image line). Attribute *samples* represents a rectangular area of bytes representing the image data (a Python *bytes* object). +A :ref:`Pixmap` contains a number of methods and attributes which are referenced below. Among them are the integers ``width``, ``height`` (each in pixels) and ``stride`` (number of bytes of one horizontal image line). Attribute ``samples`` represents a rectangular area of bytes representing the image data (a Python ``bytes`` object). .. note:: You can also create a **vector** image of a page by using :meth:`Page.get_svg_image`. Refer to this `Vector Image Support page`_ for details. @@ -251,7 +253,7 @@ Use one of the following strings for *opt* to obtain different formats [#f2]_: * **"xml"**: contains no images, but full position and font information down to each single text character. Use an XML module to interpret. -To give you an idea about the output of these alternatives, we did text example extracts. See :ref:`Appendix2`. +To give you an idea about the output of these alternatives, we did text example extracts. See :ref:`Appendix1`. Searching for Text ------------------- @@ -364,7 +366,7 @@ Embedding Data PDFs can be used as containers for arbitrary data (executables, other PDFs, text or binary files, etc.) much like ZIP archives. -PyMuPDF fully supports this feature via :ref:`Document` *embfile_** methods and attributes. For some detail read :ref:`Appendix 3`, consult the Wiki on `dealing with embedding files`_, or the example scripts `embedded-copy.py`_, `embedded-export.py`_, `embedded-import.py`_, and `embedded-list.py`_. +PyMuPDF fully supports this feature via :ref:`Document` ``embfile_*`` methods and attributes. For some detail read :ref:`Appendix 3`, consult the Wiki on `dealing with embedding files`_, or the example scripts `embedded-copy.py`_, `embedded-export.py`_, `embedded-import.py`_, and `embedded-list.py`_. Saving @@ -372,7 +374,7 @@ Saving As mentioned above, :meth:`Document.save` will **always** save the document in its current state. -You can write changes back to the **original PDF** by specifying option *incremental=True*. This process is (usually) **extremely fast**, since changes are **appended to the original file** without completely rewriting it. +You can write changes back to the **original PDF** by specifying option ``incremental=True``. This process is (usually) **extremely fast**, since changes are **appended to the original file** without completely rewriting it. :meth:`Document.save` options correspond to options of MuPDF's command line utility *mutool clean*, see the following table. @@ -392,9 +394,9 @@ linear=True l create a linearized version expand=True d decompress all streams =================== =========== ================================================== -.. note:: For an explanation of terms like *object, stream, xref* consult the :ref:`Glossary` chapter. +.. note:: For an explanation of terms like ``object``, ``stream``, ``xref`` consult the :ref:`Glossary` chapter. -For example, *mutool clean -ggggz file.pdf* yields excellent compression results. It corresponds to *doc.save(filename, garbage=4, deflate=True)*. +For example, ``mutool clean -ggggz file.pdf`` yields excellent compression results. It corresponds to ``doc.save(filename, garbage=4, deflate=True)``. Closing ========= diff --git a/docs/vars.rst b/docs/vars.rst index 8b1a575f4..cc0e8a5fc 100644 --- a/docs/vars.rst +++ b/docs/vars.rst @@ -3,7 +3,7 @@ =============================== Constants and Enumerations =============================== -Constants and enumerations of :title:`MuPDF` as implemented by |PyMuPDF|. Each of the following variables is accessible as *pymupdf.variable*. +Constants and enumerations of :title:`MuPDF` as implemented by |PyMuPDF|. Each of the following values is accessible as `pymupdf.value`. Constants @@ -77,10 +77,8 @@ Constants .. py:data:: pymupdf_date - ISO timestamp *YYYY-MM-DD HH:MM:SS* when these bindings were built. - - :type: string - + Disabled (set to None) in 1.26.1. + .. py:data:: version (pymupdf_version, mupdf_version, timestamp) -- combined version information where `timestamp` is the generation point in time formatted as "YYYYMMDDhhmmss". @@ -97,7 +95,7 @@ Constants .. py:data:: VersionDate - Legacy equivalent to `mupdf_version`. + Disabled (set to None) in 1.26.1. .. _PermissionCodes: @@ -187,11 +185,37 @@ Text Alignment .. _TextPreserve: +.. _FontProperties: + +Font Properties +----------------------- +Please note that the following bits are derived from what a font has to say about its properties. It may not be (and quite often is not) correct. + +.. py:data:: TEXT_FONT_SUPERSCRIPT + + 1 -- the character or span is a superscript. This property is computed by MuPDF and not part of any font information. + +.. py:data:: TEXT_FONT_ITALIC + + 2 -- the font is italic. + +.. py:data:: TEXT_FONT_SERIFED + + 4 -- the font is serifed. + +.. py:data:: TEXT_FONT_MONOSPACED + + 8 -- the font is mono-spaced. + +.. py:data:: TEXT_FONT_BOLD + + 16 -- the font is bold. + Text Extraction Flags --------------------- -Option bits controlling the amount of data, that are parsed into a :ref:`TextPage` -- this class is mainly used only internally in PyMuPDF. +Option bits controlling the amount of data, that are parsed into a :ref:`TextPage`. -For the PyMuPDF programmer, some combination (using Python's `|` operator, or simply use `+`) of these values are aggregated in the `flags` integer, a parameter of all text search and text extraction methods. Depending on the individual method, different default combinations of the values are used. Please use a value that meets your situation. Especially make sure to switch off image extraction unless you really need them. The impact on performance and memory is significant! +For the PyMuPDF programmer, some combination (using Python's `|` operator, or simply use `+`) of these values are aggregated in the ``flags`` integer, a parameter of all text search and text extraction methods. Depending on the individual method, different default combinations of the values are used. Please use a value that meets your situation. Especially make sure to switch off image extraction unless you really need them. The impact on performance and memory is significant! .. py:data:: TEXT_PRESERVE_LIGATURES @@ -219,46 +243,68 @@ For the PyMuPDF programmer, some combination (using Python's `|` operator, or si .. py:data:: TEXT_MEDIABOX_CLIP - 64 -- If set, characters entirely outside a page's **mediabox** will be ignored. This is default in PyMuPDF. + 64 -- Characters entirely outside a page's **mediabox** or contained in other "clipped" areas will be ignored. This is default in PyMuPDF. + +.. py:data:: TEXT_USE_CID_FOR_UNKNOWN_UNICODE + + 128 -- Use raw character codes instead of U+FFFD. This is the default for **text extraction** in PyMuPDF. If you **want to detect** when encoding information is missing or uncertain, toggle this flag and scan for the presence of U+FFFD (= `chr(0xfffd)`) code points in the resulting text. + +.. py:data:: TEXT_COLLECT_STRUCTURE + + 256 -- Not supported. + +.. py:data:: TEXT_ACCURATE_BBOXES + + 512 -- Ignore metric values of all fonts when computing character boundary boxes -- most prominently the `ascender `_ and `descender `_ values. Instead, follow the drawing commands of each character's glyph and compute its rectangle hull. This is the smallest rectangle wrapping all points used for drawing the visual appearance - see the :ref:`Shape` class for understanding the background. This will especially result in individual character heights. For instance a (white) space will have a **bbox of height 0** (because nothing is drawn) -- in contrast to the non-zero boundary box generated when using font metrics. This option may be useful to cope with getting meaningful boundary boxes even for fonts containing errors. Its use will slow down text extraction somewhat because of the incurred computational effort. + + Note that this has no effect by default - one must also disable the global + quad corrections setting with `pymupdf.TOOLS.unset_quad_corrections(True)`. + +.. py:data:: TEXT_COLLECT_VECTORS + + 1024 -- Not supported. + +.. py:data:: TEXT_IGNORE_ACTUALTEXT -.. py:data:: TEXT_CID_FOR_UNKNOWN_UNICODE + 2048 -- Ignore built-in differences between text appearing in e.g. PDF viewers versus text stored in the PDF. See :ref:`AdobeManual`, page 615 for background. If set, the **stored** ("replacement" text) is ignored in favor of the displayed text. - 128 -- If set, use raw character codes instead of U+FFFD. This is the default for **text extraction** in PyMuPDF. If you **want to detect** when encoding information is missing or uncertain, toggle this flag and scan for the presence of U+FFFD (= `chr(0xfffd)`) code points in the resulting text. +.. py:data:: TEXT_SEGMENT + 4096 -- Attempt to segment page into different regions. The following constants represent the default combinations of the above for text extraction and searching: .. py:data:: TEXTFLAGS_TEXT - `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_CID_FOR_UNKNOWN_UNICODE` + `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_USE_CID_FOR_UNKNOWN_UNICODE` .. py:data:: TEXTFLAGS_WORDS - `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_CID_FOR_UNKNOWN_UNICODE` + `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_USE_CID_FOR_UNKNOWN_UNICODE` .. py:data:: TEXTFLAGS_BLOCKS - `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_CID_FOR_UNKNOWN_UNICODE` + `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_USE_CID_FOR_UNKNOWN_UNICODE` .. py:data:: TEXTFLAGS_DICT - `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_PRESERVE_IMAGES | TEXT_CID_FOR_UNKNOWN_UNICODE` + `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_PRESERVE_IMAGES | TEXT_USE_CID_FOR_UNKNOWN_UNICODE` .. py:data:: TEXTFLAGS_RAWDICT - `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_PRESERVE_IMAGES | TEXT_CID_FOR_UNKNOWN_UNICODE` + `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_PRESERVE_IMAGES | TEXT_USE_CID_FOR_UNKNOWN_UNICODE` .. py:data:: TEXTFLAGS_HTML - `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_PRESERVE_IMAGES | TEXT_CID_FOR_UNKNOWN_UNICODE` + `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_PRESERVE_IMAGES | TEXT_USE_CID_FOR_UNKNOWN_UNICODE` .. py:data:: TEXTFLAGS_XHTML - `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_PRESERVE_IMAGES | TEXT_CID_FOR_UNKNOWN_UNICODE` + `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_PRESERVE_IMAGES | TEXT_USE_CID_FOR_UNKNOWN_UNICODE` .. py:data:: TEXTFLAGS_XML - `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_CID_FOR_UNKNOWN_UNICODE` + `TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_USE_CID_FOR_UNKNOWN_UNICODE` .. py:data:: TEXTFLAGS_SEARCH @@ -371,7 +417,7 @@ See chapter 8.4.5, pp. 615 of the :ref:`AdobeManual` for details. Annotation Types ~~~~~~~~~~~~~~~~~ -These identifiers also cover **links** and **widgets**: the PDF specification technically handles them all in the same way, whereas **MuPDF** (and PyMuPDF) treats them as three basically different types of objects. +These identifiers also cover **links** and **widgets**: the PDF specification technically handles them all in the same way, whereas |MuPDF| (and PyMuPDF) treats them as three basically different types of objects. :: diff --git a/docs/version.rst b/docs/version.rst index 379ad704b..13deb580f 100644 --- a/docs/version.rst +++ b/docs/version.rst @@ -1,8 +1,8 @@ ---- -This documentation covers **PyMuPDF v1.24.11** features as of **2024-10-03 00:00:01**. +This documentation covers PyMuPDF |version|. -The major and minor versions of **PyMuPDF** and **MuPDF** will always be the same. Only the third qualifier (patch level) may deviate from that of **MuPDF**. +The major and minor versions of |PyMuPDF| and |MuPDF| will always be the same. Only the third qualifier (patch level) may deviate from that of |MuPDF|. Typically PyMuPDF is released more frequently than MuPDF so it will often be the case that the patch level of PyMuPDF will be greater than the embedded diff --git a/docs/widget.rst b/docs/widget.rst index 39097a032..381c8c753 100644 --- a/docs/widget.rst +++ b/docs/widget.rst @@ -12,7 +12,9 @@ This class represents a PDF Form field, also called a "widget". Throughout this Like annotations, widgets live on PDF pages. Similar to annotations, the first widget on a page is accessible via :attr:`Page.first_widget` and subsequent widgets can be accessed via the :attr:`Widget.next` property. -*(Changed in version 1.16.0)* MuPDF no longer treats widgets as a subset of general annotations. Consequently, :attr:`Page.first_annot` and :meth:`Annot.next` will deliver **non-widget annotations exclusively**, and be *None* if only form fields exist on a page. Vice versa, :attr:`Page.first_widget` and :meth:`Widget.next` will only show widgets. This design decision is purely internal to MuPDF; technically, links, annotations and fields have a lot in common and also continue to share the better part of their code within (Py-) MuPDF. +Like annotations, widgets also lose connection to their page when the page becomes unavailable, please see `here `_ for details. This is relevant especially when updating the widget: this will fail if the original page object is no longer available. + +*(Changed in version 1.16.0)* MuPDF no longer treats widgets as a subset of general annotations. Consequently, :attr:`Page.first_annot` and :meth:`Annot.next` will deliver **non-widget annotations exclusively**, and be ``None`` if only form fields exist on a page. Vice versa, :attr:`Page.first_widget` and :meth:`Widget.next` will only show widgets. This design decision is purely internal to MuPDF; technically, links, annotations and fields have a lot in common and also continue to share the better part of their code within (Py-) MuPDF. **Class API** @@ -53,9 +55,11 @@ Like annotations, widgets live on PDF pages. Similar to annotations, the first w True - .. method:: update + .. method:: update(sync_flags=False) + + After any changes to a widget, this **method must be used** to reflect changes in the PDF [#f1]_. - After any changes to a widget, this method **must be used** to store them in the PDF [#f1]_. + :arg bool sync_flags: if ``True``, the widget's :attr:`Widget.field_flags` are copied to the ``Parent`` object (if present) and all widgets named in its ``Kids`` array. This provides a convenient way to -- for example -- set all instances of the widget to read-only, no matter on which page they may occur [#f2]_. .. method:: reset @@ -63,11 +67,11 @@ Like annotations, widgets live on PDF pages. Similar to annotations, the first w .. attribute:: next - Point to the next form field on the page. The last widget returns *None*. + Point to the next form field on the page. The last widget returns ``None``. .. attribute:: border_color - A list of up to 4 floats defining the field's border color. Default value is *None* which causes border style and border width to be ignored. + A list of up to 4 floats defining the field's border color. Default value is ``None`` which causes border style and border width to be ignored. .. attribute:: border_style @@ -119,7 +123,7 @@ Like annotations, widgets live on PDF pages. Similar to annotations, the first w .. attribute:: is_signed - A bool indicating the signing status of a signature field, else *None*. + A bool indicating the signing status of a signature field, else ``None``. .. attribute:: rect @@ -153,52 +157,52 @@ Like annotations, widgets live on PDF pages. Similar to annotations, the first w * New in version 1.16.12 - JavaScript text (unicode) for an action associated with the widget, or *None*. This is the only script action supported for **button type** widgets. + JavaScript text (unicode) for an action associated with the widget, or ``None``. This is the only script action supported for **button type** widgets. .. attribute:: script_stroke * New in version 1.16.12 - JavaScript text (unicode) to be performed when the user types a key-stroke into a text field or combo box or modifies the selection in a scrollable list box. This action can check the keystroke for validity and reject or modify it. *None* if not present. + JavaScript text (unicode) to be performed when the user types a key-stroke into a text field or combo box or modifies the selection in a scrollable list box. This action can check the keystroke for validity and reject or modify it. ``None`` if not present. .. attribute:: script_format * New in version 1.16.12 - JavaScript text (unicode) to be performed before the field is formatted to display its current value. This action can modify the field’s value before formatting. *None* if not present. + JavaScript text (unicode) to be performed before the field is formatted to display its current value. This action can modify the field’s value before formatting. ``None`` if not present. .. attribute:: script_change * New in version 1.16.12 - JavaScript text (unicode) to be performed when the field’s value is changed. This action can check the new value for validity. *None* if not present. + JavaScript text (unicode) to be performed when the field’s value is changed. This action can check the new value for validity. ``None`` if not present. .. attribute:: script_calc * New in version 1.16.12 - JavaScript text (unicode) to be performed to recalculate the value of this field when that of another field changes. *None* if not present. + JavaScript text (unicode) to be performed to recalculate the value of this field when that of another field changes. ``None`` if not present. .. attribute:: script_blur * New in version 1.22.6 - JavaScript text (unicode) to be performed on losing the focus of this field. *None* if not present. + JavaScript text (unicode) to be performed on losing the focus of this field. ``None`` if not present. .. attribute:: script_focus * New in version 1.22.6 - JavaScript text (unicode) to be performed on focusing this field. *None* if not present. + JavaScript text (unicode) to be performed on focusing this field. ``None`` if not present. .. note:: 1. For **adding** or **changing** one of the above scripts, just put the appropriate JavaScript source code in the widget attribute. - To **remove** a script, set the respective attribute to *None*. + To **remove** a script, set the respective attribute to ``None``. 2. Button fields only support :attr:`script`. - Other script entries will automatically be set to *None*. + Other script entries will automatically be set to ``None``. 3. It is worthwhile to look at `this `_ @@ -213,7 +217,7 @@ Like annotations, widgets live on PDF pages. Similar to annotations, the first w Standard Fonts for Widgets ---------------------------------- -Widgets use their own resources object */DR*. A widget resources object must at least contain a */Font* object. Widget fonts are independent from page fonts. We currently support the 14 PDF base fonts using the following fixed reference names, or any name of an already existing field font. When specifying a text font for new or changed widgets, **either** choose one in the first table column (upper and lower case supported), **or** one of the already existing form fonts. In the latter case, spelling must exactly match. +Widgets use their own resources object ``/DR``. A widget resources object must at least contain a ``/Font`` object. Widget fonts are independent from page fonts. We currently support the 14 PDF base fonts using the following fixed reference names, or any name of an already existing field font. When specifying a text font for new or changed widgets, **either** choose one in the first table column (upper and lower case supported), **or** one of the already existing form fonts. In the latter case, spelling must exactly match. To find out already existing field fonts, inspect the list :attr:`Document.FormFonts`. @@ -236,7 +240,7 @@ TiRo Times-Roman ZaDb ZapfDingbats ============= ======================= -You are generally free to use any font for every widget. However, we recommend using *ZaDb* ("ZapfDingbats") and :data:`fontsize` 0 for check boxes: typical viewers will put a correctly sized tickmark in the field's rectangle, when it is clicked. +You are generally free to use any font for every widget. However, we recommend using ``ZaDb`` ("ZapfDingbats") and :data:`fontsize` 0 for check boxes: typical viewers will put a correctly sized tickmark in the field's rectangle, when it is clicked. Supported Widget Types ----------------------- @@ -247,11 +251,13 @@ PyMuPDF supports the creation and update of many, but not all widget types. * check box (`PDF_WIDGET_TYPE_CHECKBOX`) * combo box (`PDF_WIDGET_TYPE_COMBOBOX`) * list box (`PDF_WIDGET_TYPE_LISTBOX`) -* radio button (`PDF_WIDGET_TYPE_RADIOBUTTON`): PyMuPDF does not currently support the **creation** of groups of (interconnected) radio buttons, where setting one automatically unsets the other buttons in the group. The widget object also does not reflect the presence of a button group. However: consistently selecting (or unselecting) a radio button is supported. This includes correctly setting the value maintained in the owning button group. Selecting a radio button may be done by either assigning `True` or `field.on_state()` to the field value. **De-selecting** the button should be done assigning `False`. -* signature (`PDF_WIDGET_TYPE_SIGNATURE`) **read only**. +* radio button (`PDF_WIDGET_TYPE_RADIOBUTTON`): PyMuPDF does not currently support the **creation** of groups of (interconnected) radio buttons, where setting one button automatically unsets the other buttons in the group. The widget object also does not reflect the presence of a button group. However: consistently selecting (or unselecting) a radio button is supported. This includes correctly setting the value maintained in the owning button group. Selecting a radio button may be done by either assigning `True` or `field.on_state()` to the field value. **De-selecting** the button should be done assigning `False`. +* signature (`PDF_WIDGET_TYPE_SIGNATURE`) **read only** -- no update or creation of signatures. .. rubric:: Footnotes .. [#f1] If you intend to re-access a new or updated field (e.g. for making a pixmap), make sure to reload the page first. Either close and re-open the document, or load another page first, or simply do `page = doc.reload_page(page)`. +.. [#f2] Among other purposes, ``Parent`` objects are also used to facilitate multiple occurrences of a field (on the same or on different pages). The ``Kids`` array in this ``Parent`` object contains the cross references of all widgets that are "copies" of the same field. Whenever the field value of any "kid" widget is changed, all the other kids are immediately updated too. This is a very efficient way to handle multiple copies of the same field, e.g. for filling out forms. This simultaneous update only happens for :attr:`Widget.field value`. The new parameter ``sync_flags`` extends this to :attr:`Widget.field_flags`. This cannot be automated in the same way as for the field value to allow for more flexibility. + .. include:: footer.rst diff --git a/docs/xml-class.rst b/docs/xml-class.rst index d0414979e..bfe1e970c 100644 --- a/docs/xml-class.rst +++ b/docs/xml-class.rst @@ -35,7 +35,7 @@ There is no need to ever directly construct an :ref:`Xml` object: after creating :meth:`~.add_var` Add code text (:htmlTag:`code` tag) - inline element, treated like text. :meth:`~.add_samp` Add code text (:htmlTag:`code` tag) - inline element, treated like text. :meth:`~.add_kbd` Add code text (:htmlTag:`code` tag) - inline element, treated like text. -:meth:`~.add_text` Add a text string. Line breaks `\n` are honored as :htmlTag:`br` tags. +:meth:`~.add_text` Add a text string. Line breaks ``\n`` are honored as :htmlTag:`br` tags. :meth:`~.append_child` Append a child node. :meth:`~.clone` Make a copy if this node. :meth:`~.create_element` Make a new node with a given tag name. @@ -159,7 +159,7 @@ There is no need to ever directly construct an :ref:`Xml` object: after creating .. method:: add_text(text) - Add a text string. Line breaks `\n` are honored as :htmlTag:`br` tags. + Add a text string. Line breaks ``\n`` are honored as :htmlTag:`br` tags. .. method:: set_align(value) diff --git a/pipcl.py b/pipcl.py index 051d31731..64348d8b2 100644 --- a/pipcl.py +++ b/pipcl.py @@ -2,18 +2,37 @@ Python packaging operations, including PEP-517 support, for use by a `setup.py` script. -The intention is to take care of as many packaging details as possible so that -setup.py contains only project-specific information, while also giving as much -flexibility as possible. +Overview: -For example we provide a function `build_extension()` that can be used to build -a SWIG extension, but we also give access to the located compiler/linker so -that a `setup.py` script can take over the details itself. + The intention is to take care of as many packaging details as possible so + that setup.py contains only project-specific information, while also giving + as much flexibility as possible. -Run doctests with: `python -m doctest pipcl.py` + For example we provide a function `build_extension()` that can be used + to build a SWIG extension, but we also give access to the located + compiler/linker so that a `setup.py` script can take over the details + itself. + +Doctests: + Doctest strings are provided in some comments. + + Test in the usual way with: + python -m doctest pipcl.py + + Test specific functions/classes with: + python pipcl.py --doctest run_if ... + + If no functions or classes are specified, this tests everything. + +Graal: + For Graal we require that PIPCL_GRAAL_PYTHON is set to non-graal Python (we + build for non-graal except with Graal Python's include paths and library + directory). ''' import base64 +import codecs +import difflib import glob import hashlib import inspect @@ -21,6 +40,7 @@ import os import platform import re +import shlex import shutil import site import subprocess @@ -49,6 +69,9 @@ class Package: by legacy distutils/setuptools and described in: https://pip.pypa.io/en/stable/reference/build-system/setup-py/ + The file pyproject.toml must exist; this is checked if/when fn_build() is + called. + Here is a `doctest` example of using pipcl to create a SWIG extension module. Requires `swig`. @@ -315,63 +338,86 @@ def __init__(self, wheel_compresslevel = None, ): ''' - The initial args before `root` define the package - metadata and closely follow the definitions in: + The initial args before `entry_points` define the + package metadata and closely follow the definitions in: https://packaging.python.org/specifications/core-metadata/ Args: name: + Used for metadata `Name`. A string, the name of the Python package. version: + Used for metadata `Version`. A string, the version of the Python package. Also see PEP-440 `Version Identification and Dependency Specification`. platform: + Used for metadata `Platform`. A string or list of strings. supported_platform: + Used for metadata `Supported-Platform`. A string or list of strings. summary: + Used for metadata `Summary`. A string, short description of the package. description: + Used for metadata `Description`. A string. If contains newlines, a detailed description of the package. Otherwise the path of a file containing the detailed description of the package. description_content_type: + Used for metadata `Description-Content-Type`. A string describing markup of `description` arg. For example `text/markdown; variant=GFM`. keywords: + Used for metadata `Keywords`. A string containing comma-separated keywords. home_page: + Used for metadata `Home-page`. URL of home page. download_url: + Used for metadata `Download-URL`. Where this version can be downloaded from. author: + Used for metadata `Author`. Author. author_email: + Used for metadata `Author-email`. Author email. maintainer: + Used for metadata `Maintainer`. Maintainer. maintainer_email: + Used for metadata `Maintainer-email`. Maintainer email. license: + Used for metadata `License`. A string containing the license text. Written into metadata file `COPYING`. Is also written into metadata itself if not multi-line. classifier: + Used for metadata `Classifier`. A string or list of strings. Also see: * https://pypi.org/pypi?%3Aaction=list_classifiers * https://pypi.org/classifiers/ requires_dist: - A string or list of strings. Also see PEP-508. + Used for metadata `Requires-Dist`. + A string or list of strings, Python packages required + at runtime. None items are ignored. requires_python: + Used for metadata `Requires-Python`. A string or list of strings. requires_external: + Used for metadata `Requires-External`. A string or list of strings. project_url: - A string or list of strings, each of the form: `{name}, {url}`. + Used for metadata `Project-URL`. + A string or list of strings, each of the form: `{name}, + {url}`. provides_extra: + Used for metadata `Provides-Extra`. A string or list of strings. entry_points: @@ -409,8 +455,11 @@ def __init__(self, added. `to_` identifies what the file should be called within a wheel - or when installing. If `to_` ends with `/`, the leaf of `from_` - is appended to it (and `from_` must not be a `bytes`). + or when installing. If `to_` is empty or `/` we set it to the + leaf of `from_` (`from_` must not be a `bytes`) - i.e. we place + the file in the root directory of the wheel; otherwise if + `to_` ends with `/` the leaf of `from_` is appended to it (and + `from_` must not be a `bytes`). Initial `$dist-info/` in `_to` is replaced by `{name}-{version}.dist-info/`; this is useful for license files @@ -433,6 +482,11 @@ def __init__(self, default being `sysconfig.get_path('platlib')` e.g. `myvenv/lib/python3.9/site-packages/`. + When calling this function, we assert that the file + pyproject.toml exists in the current directory. (We do this + here rather than in pipcl.Package's constructor, as otherwise + importing setup.py from non-package-related code could fail.) + fn_clean: A function taking a single arg `all_` that cleans generated files. `all_` is true iff `--all` is in argv. @@ -451,8 +505,7 @@ def __init__(self, It can be convenient to use `pipcl.git_items()`. The specification for sdists requires that the list contains - `pyproject.toml`; we enforce this with a diagnostic rather than - raising an exception, to allow legacy command-line usage. + `pyproject.toml`; we enforce this with a Python assert. tag_python: First element of wheel tag defined in PEP-425. If None we use @@ -489,6 +542,7 @@ def __init__(self, Used as `zipfile.ZipFile()`'s `compresslevel` parameter when creating wheels. + Occurrences of `None` in lists are ignored. ''' assert name assert version @@ -521,6 +575,12 @@ def assert_str_or_multi( v): assert_str_or_multi( requires_external) assert_str_or_multi( project_url) assert_str_or_multi( provides_extra) + + assert re.match('^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])\\Z', name, re.IGNORECASE), ( + f'Invalid package name' + f' (https://packaging.python.org/en/latest/specifications/name-normalization/)' + f': {name!r}' + ) # https://packaging.python.org/en/latest/specifications/core-metadata/. assert re.match('([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$', name, re.IGNORECASE), \ @@ -570,6 +630,11 @@ def assert_str_or_multi( v): self.wheel_compression = wheel_compression self.wheel_compresslevel = wheel_compresslevel + + # If true and we are building for graal, we set PIPCL_PYTHON_CONFIG to + # a command that will print includes/libs from graal_py's sysconfig. + # + self.graal_legacy_python_config = True def build_wheel(self, @@ -590,6 +655,62 @@ def build_wheel(self, f' metadata_directory={metadata_directory!r}' ) + if os.environ.get('CIBUILDWHEEL') == '1': + # Don't special-case graal builds when running under cibuildwheel. + pass + elif sys.implementation.name == 'graalpy': + # We build for Graal by building a native Python wheel with Graal + # Python's include paths and library directory. We then rename the + # wheel to contain graal's tag etc. + # + log0(f'### Graal build: deferring to cpython.') + python_native = os.environ.get('PIPCL_GRAAL_PYTHON') + assert python_native, f'Graal build requires that PIPCL_GRAAL_PYTHON is set.' + env_extra = dict( + PIPCL_SYSCONFIG_PATH_include = sysconfig.get_path('include'), + PIPCL_SYSCONFIG_PATH_platinclude = sysconfig.get_path('platinclude'), + PIPCL_SYSCONFIG_CONFIG_VAR_LIBDIR = sysconfig.get_config_var('LIBDIR'), + ) + # Tell native build to run pipcl.py itself to get python-config + # information about include paths etc. + if self.graal_legacy_python_config: + env_extra['PIPCL_PYTHON_CONFIG'] = f'{python_native} {os.path.abspath(__file__)} --graal-legacy-python-config' + + # Create venv. + venv_name = os.environ.get('PIPCL_GRAAL_NATIVE_VENV') + if venv_name: + log1(f'Graal using pre-existing {venv_name=}') + else: + venv_name = 'venv-pipcl-graal-native' + run(f'{shlex.quote(python_native)} -m venv {venv_name}') + log1(f'Graal using {venv_name=}') + + newfiles = NewFiles(f'{wheel_directory}/*.whl') + run( + f'. {venv_name}/bin/activate && python setup.py --dist-dir {shlex.quote(wheel_directory)} bdist_wheel', + env_extra = env_extra, + prefix = f'pipcl.py graal {python_native}: ', + ) + wheel = newfiles.get_one() + wheel_leaf = os.path.basename(wheel) + python_major_minor = run(f'{shlex.quote(python_native)} -c "import platform; import sys; sys.stdout.write(str().join(platform.python_version_tuple()[:2]))"', capture=1) + cpabi = f'cp{python_major_minor}-abi3' + assert cpabi in wheel_leaf, f'Expected wheel to be for {cpabi=}, but {wheel=}.' + graalpy_ext_suffix = sysconfig.get_config_var('EXT_SUFFIX') + log1(f'{graalpy_ext_suffix=}') + m = re.match(r'\.graalpy(\d+[^\-]*)-(\d+)', graalpy_ext_suffix) + gpver = m[1] + cpver = m[2] + graalpy_wheel_tag = f'graalpy{cpver}-graalpy{gpver}_{cpver}_native' + name = wheel_leaf.replace(cpabi, graalpy_wheel_tag) + destination = f'{wheel_directory}/{name}' + log0(f'### Graal build: copying {wheel=} to {destination=}') + # Copying results in two wheels which appears to confuse pip, showing: + # Found multiple .whl files; unspecified behaviour. Will call build_wheel. + os.rename(wheel, destination) + log1(f'Returning {name=}.') + return name + wheel_name = self.wheel_name() path = f'{wheel_directory}/{wheel_name}' @@ -653,12 +774,12 @@ def add_str(content, to_): z.writestr(f'{dist_info_dir}/RECORD', record.get(f'{dist_info_dir}/RECORD')) st = os.stat(path) - log1( f'Have created wheel size={st.st_size}: {path}') + log1( f'Have created wheel size={st.st_size:,}: {path}') if g_verbose >= 2: with zipfile.ZipFile(path, compression=self.wheel_compression) as z: log2(f'Contents are:') for zi in sorted(z.infolist(), key=lambda z: z.filename): - log2(f' {zi.file_size: 10d} {zi.filename}') + log2(f' {zi.file_size: 10,d} {zi.filename}') return os.path.basename(path) @@ -675,6 +796,7 @@ def build_sdist(self, Returns leafname of generated archive within `sdist_directory`. ''' + assert self.fn_sdist, f'fn_sdist() not provided.' log2( f' sdist_directory={sdist_directory!r}' f' formats={formats!r}' @@ -683,13 +805,12 @@ def build_sdist(self, if formats and formats != 'gztar': raise Exception( f'Unsupported: formats={formats}') items = list() - if self.fn_sdist: - if inspect.signature(self.fn_sdist).parameters: - items = self.fn_sdist(config_settings) - else: - items = self.fn_sdist() + if inspect.signature(self.fn_sdist).parameters: + items = self.fn_sdist(config_settings) + else: + items = self.fn_sdist() - prefix = f'{self.name}-{self.version}' + prefix = f'{_normalise2(self.name)}-{self.version}' os.makedirs(sdist_directory, exist_ok=True) tarpath = f'{sdist_directory}/{prefix}.tar.gz' log2(f'Creating sdist: {tarpath}') @@ -731,12 +852,11 @@ def add_string(text, name): assert 0, f'Path is inside sdist_directory={sdist_directory}: {from_!r}' assert os.path.exists(from_), f'Path does not exist: {from_!r}' assert os.path.isfile(from_), f'Path is not a file: {from_!r}' - if to_rel == 'pyproject.toml': - found_pyproject_toml = True add(from_, to_rel) + if to_rel == 'pyproject.toml': + found_pyproject_toml = True - if not found_pyproject_toml: - log0(f'Warning: no pyproject.toml specified.') + assert found_pyproject_toml, f'Cannot create sdist because file not specified: pyproject.toml' # Always add a PKG-INFO file. add_string(self._metainfo(), 'PKG-INFO') @@ -761,9 +881,11 @@ def tag_python(self): Get two-digit python version, e.g. 'cp3.8' for python-3.8.6. ''' if self.tag_python_: - return self.tag_python_ + ret = self.tag_python_ else: - return 'cp' + ''.join(platform.python_version().split('.')[:2]) + ret = 'cp' + ''.join(platform.python_version().split('.')[:2]) + assert '-' not in ret + return ret def tag_abi(self): ''' @@ -806,23 +928,16 @@ def tag_platform(self): ret = ret.replace('-', '_').replace('.', '_').lower() log0(f'From sysconfig.get_platform(): {ret=}.') - # We need to patch things on MacOS. - # - # E.g. `foo-1.2.3-cp311-none-macosx_13_x86_64.whl` - # causes `pip` to fail with: `not a supported wheel on this - # platform`. We seem to need to add `_0` to the OS version. - # - m = re.match( '^(macosx_[0-9]+)(_[^0-9].+)$', ret) - if m: - ret2 = f'{m.group(1)}_0{m.group(2)}' - log0(f'After macos patch, changing from {ret!r} to {ret2!r}.') - ret = ret2 + ret = _macos_fixup_platform_tag(ret) log0( f'tag_platform(): returning {ret=}.') + assert '-' not in ret return ret def wheel_name(self): - return f'{self.name}-{self.version}-{self.tag_python()}-{self.tag_abi()}-{self.tag_platform()}.whl' + ret = f'{_normalise2(self.name)}-{self.version}-{self.tag_python()}-{self.tag_abi()}-{self.tag_platform()}.whl' + assert ret.count('-') == 4, f'Expected 4 dash characters in {ret=}.' + return ret def wheel_name_match(self, wheel): ''' @@ -851,7 +966,7 @@ def wheel_name_match(self, wheel): log2(f'py_limited_api; {tag_python=} compatible with {self.tag_python()=}.') py_limited_api_compatible = True - log2(f'{self.name == name=}') + log2(f'{_normalise2(self.name) == name=}') log2(f'{self.version == version=}') log2(f'{self.tag_python() == tag_python=} {self.tag_python()=} {tag_python=}') log2(f'{py_limited_api_compatible=}') @@ -860,7 +975,7 @@ def wheel_name_match(self, wheel): log2(f'{self.tag_platform()=}') log2(f'{tag_platform.split(".")=}') ret = (1 - and self.name == name + and _normalise2(self.name) == name and self.version == version and (self.tag_python() == tag_python or py_limited_api_compatible) and self.tag_abi() == tag_abi @@ -882,6 +997,9 @@ def _entry_points_text(self): def _call_fn_build( self, config_settings=None): assert self.fn_build + assert os.path.isfile('pyproject.toml'), ( + 'Cannot create package because file does not exist: pyproject.toml' + ) log2(f'calling self.fn_build={self.fn_build}') if inspect.signature(self.fn_build).parameters: ret = self.fn_build(config_settings) @@ -889,6 +1007,28 @@ def _call_fn_build( self, config_settings=None): ret = self.fn_build() assert isinstance( ret, (list, tuple)), \ f'Expected list/tuple from {self.fn_build} but got: {ret!r}' + + # Check that any extensions that we have built, have same + # py_limited_api value. If package is marked with py_limited_api=True + # then non-py_limited_api extensions seem to fail at runtime on + # Windows. + # + # (We could possibly allow package py_limited_api=False and extensions + # py_limited_api=True, but haven't tested this, and it seems simpler to + # be strict.) + for item in ret: + from_, (to_abs, to_rel) = self._fromto(item) + from_abs = os.path.abspath(from_) + is_py_limited_api = _extensions_to_py_limited_api.get(from_abs) + if is_py_limited_api is not None: + assert bool(self.py_limited_api) == bool(is_py_limited_api), ( + f'Extension was built with' + f' py_limited_api={is_py_limited_api} but pipcl.Package' + f' name={self.name!r} has' + f' py_limited_api={self.py_limited_api}:' + f' {from_abs!r}' + ) + return ret @@ -987,7 +1127,7 @@ def _argv_dist_info(self, root): it writes to a slightly different directory. ''' if root is None: - root = f'{self.name}-{self.version}.dist-info' + root = f'{normalise2(self.name)}-{self.version}.dist-info' self._write_info(f'{root}/METADATA') if self.license: with open( f'{root}/COPYING', 'w') as f: @@ -1135,6 +1275,10 @@ def next( self, eof=ArgsRaise): assert command is None, 'Two commands specified: {command} and {arg}.' command = arg + elif arg in ('windows-vs', 'windows-python', 'show-sysconfig'): + assert command is None, 'Two commands specified: {command} and {arg}.' + command = arg + elif arg == '--all': opt_all = True elif arg == '--compile': pass elif arg == '--dist-dir' or arg == '-d': opt_dist_dir = args.next() @@ -1147,12 +1291,6 @@ def next( self, eof=ArgsRaise): elif arg == '--single-version-externally-managed': pass elif arg == '--verbose' or arg == '-v': g_verbose += 1 - elif arg == 'windows-vs': - command = arg - break - elif arg == 'windows-python': - command = arg - break else: raise Exception(f'Unrecognised arg: {arg}') @@ -1203,6 +1341,39 @@ def next( self, eof=ArgsRaise): vs = wdev.WindowsVS(year=year, grade=grade, version=version) print(f'Visual Studio is:\n{vs.description_ml(" ")}') + elif command == 'show-sysconfig': + show_sysconfig() + for mod in platform, sys: + log0(f'{mod.__name__}:') + for n in dir(mod): + if n.startswith('_'): + continue + log0(f'{mod.__name__}.{n}') + if mod is platform and n == 'uname': + continue + if mod is platform and n == 'pdb': + continue + if mod is sys and n in ('breakpointhook', 'exit'): + # We don't want to call these. + continue + v = getattr(mod, n) + if callable(v): + try: + v = v() + except Exception: + pass + else: + #print(f'{n=}', flush=1) + try: + print(f' {mod.__name__}.{n}()={v!r}') + except Exception: + print(f' Failed to print value of {mod.__name__}.{n}().') + else: + try: + print(f' {mod.__name__}.{n}={v!r}') + except Exception: + print(f' Failed to print value of {mod.__name__}.{n}.') + else: assert 0, f'Unrecognised command: {command}' @@ -1244,7 +1415,7 @@ def __str__(self): ) def _dist_info_dir( self): - return f'{self.name}-{self.version}.dist-info' + return f'{_normalise2(self.name)}-{self.version}.dist-info' def _metainfo(self): ''' @@ -1261,7 +1432,8 @@ def add(key, value): return if isinstance( value, (tuple, list)): for v in value: - add( key, v) + if v is not None: + add( key, v) return if key == 'License' and '\n' in value: # This is ok because we write `self.license` into @@ -1349,8 +1521,12 @@ def _fromto(self, p): `p` is a tuple `(from_, to_)` where `from_` is str/bytes and `to_` is str. If `from_` is a bytes it is contents of file to add, otherwise the path of an existing file; non-absolute paths are assumed to be relative - to `self.root`. If `to_` is empty or ends with `/`, we append the leaf - of `from_` (which must be a str). + to `self.root`. + + If `to_` is empty or `/` we set it to the leaf of `from_` (which must + be a str) - i.e. we place the file in the root directory of the wheel; + otherwise if `to_` ends with `/` we append the leaf of `from_` (which + must be a str). If `to_` starts with `$dist-info/`, we replace this with `self._dist_info_dir()`. @@ -1370,14 +1546,16 @@ def _fromto(self, p): from_, to_ = p assert isinstance(from_, (str, bytes)) assert isinstance(to_, str) - if to_.endswith('/') or to_=='': + if to_ == '/' or to_ == '': + to_ = os.path.basename(from_) + elif to_.endswith('/'): to_ += os.path.basename(from_) prefix = '$dist-info/' if to_.startswith( prefix): to_ = f'{self._dist_info_dir()}/{to_[ len(prefix):]}' prefix = '$data/' if to_.startswith( prefix): - to_ = f'{self.name}-{self.version}.data/{to_[ len(prefix):]}' + to_ = f'{_normalise2(self.name)}-{self.version}.data/{to_[ len(prefix):]}' if isinstance(from_, str): from_, _ = self._path_relative_to_root( from_, assert_within_root=False) to_ = self._path_relative_to_root(to_) @@ -1385,11 +1563,13 @@ def _fromto(self, p): log2(f'returning {from_=} {to_=}') return from_, to_ +_extensions_to_py_limited_api = dict() def build_extension( name, path_i, outdir, + *, builddir=None, includes=None, defines=None, @@ -1399,8 +1579,9 @@ def build_extension( debug=False, compiler_extra='', linker_extra='', - swig='swig', + swig=None, cpp=True, + source_extra=None, prerequisites_swig=None, prerequisites_compile=None, prerequisites_link=None, @@ -1442,7 +1623,7 @@ def build_extension( A string, or a sequence of library names. Each item is prefixed with `-l` on non-Windows. optimise: - Whether to use compiler optimisations. + Whether to use compiler optimisations and define NDEBUG. debug: Whether to build with debug symbols. compiler_extra: @@ -1450,9 +1631,11 @@ def build_extension( linker_extra: Extra linker flags. Can be None. swig: - Base swig command. + Swig command; if false we use 'swig'. cpp: If true we tell SWIG to generate C++ code instead of C. + source_extra: + Extra source files to build into the shared library, prerequisites_swig: prerequisites_compile: prerequisites_link: @@ -1487,10 +1670,15 @@ def build_extension( `compile_extra` (also `/I` on windows) and use them with swig so that it can see the same header files as C/C++. This is useful when using enviromment variables such as `CC` and `CXX` to set - `compile_extra. + `compile_extra`. py_limited_api: If true we build for current Python's limited API / stable ABI. + Note that we will assert false if this extension is added to a + pipcl.Package that has a different , because + on Windows importing a non-py_limited_api extension inside a + py_limited=True package fails. + Returns the leafname of the generated library file within `outdir`, e.g. `_{name}.so` on Unix or `_{name}.cp311-win_amd64.pyd` on Windows. ''' @@ -1500,6 +1688,14 @@ def build_extension( linker_extra = '' if builddir is None: builddir = outdir + if not swig: + swig = 'swig' + + if source_extra is None: + source_extra = list() + if isinstance(source_extra, str): + source_extra = [source_extra] + includes_text = _flags( includes, '-I') defines_text = _flags( defines, '-D') libpaths_text = _flags( libpaths, '/LIBPATH:', '"') if windows() else _flags( libpaths, '-L') @@ -1509,11 +1705,11 @@ def build_extension( os.makedirs( outdir, exist_ok=True) # Run SWIG. - + # if infer_swig_includes: # Extract include flags from `compiler_extra`. swig_includes_extra = '' - compiler_extra_items = compiler_extra.split() + compiler_extra_items = shlex.split(compiler_extra) i = 0 while i < len(compiler_extra_items): item = compiler_extra_items[i] @@ -1548,217 +1744,200 @@ def build_extension( prerequisites_swig2, ) - so_suffix = _so_suffix(use_so_versioning = not py_limited_api) + if pyodide(): + so_suffix = '.so' + log0(f'pyodide: PEP-3149 suffix untested, so omitting. {_so_suffix()=}.') + else: + so_suffix = _so_suffix(use_so_versioning = not py_limited_api) path_so_leaf = f'_{name}{so_suffix}' path_so = f'{outdir}/{path_so_leaf}' py_limited_api2 = current_py_limited_api() if py_limited_api else None - if windows(): - path_obj = f'{path_so}.obj' + compiler_command, pythonflags = base_compiler(cpp=cpp) + linker_command, _ = base_linker(cpp=cpp) + # setuptools on Linux seems to use slightly different compile flags: + # + # -fwrapv -O3 -Wall -O2 -g0 -DPY_CALL_TRAMPOLINE + # + general_flags = '' + if windows(): permissive = '/permissive-' EHsc = '/EHsc' T = '/Tp' if cpp else '/Tc' optimise2 = '/DNDEBUG /O2' if optimise else '/D_DEBUG' - debug2 = '' - if debug: - debug2 = '/Zi' # Generate .pdb. - # debug2 = '/Z7' # Embed debug info in .obj files. - + debug2 = '/Zi' if debug else '' py_limited_api3 = f'/DPy_LIMITED_API={py_limited_api2}' if py_limited_api2 else '' - # As of 2023-08-23, it looks like VS tools create slightly - # .dll's each time, even with identical inputs. - # - # Some info about this is at: - # https://nikhilism.com/post/2020/windows-deterministic-builds/. - # E.g. an undocumented linker flag `/Brepro`. - # - - command, pythonflags = base_compiler(cpp=cpp) - command = f''' - {command} - # General: - /c # Compiles without linking. - {EHsc} # Enable "Standard C++ exception handling". - - #/MD # Creates a multithreaded DLL using MSVCRT.lib. - {'/MDd' if debug else '/MD'} - - # Input/output files: - {T}{path_cpp} # /Tp specifies C++ source file. - /Fo{path_obj} # Output file. codespell:ignore - - # Include paths: - {includes_text} - {pythonflags.includes} # Include path for Python headers. - - # Code generation: - {optimise2} - {debug2} - {permissive} # Set standard-conformance mode. - - # Diagnostics: - #/FC # Display full path of source code files passed to cl.exe in diagnostic text. - /W3 # Sets which warning level to output. /W3 is IDE default. - /diagnostics:caret # Controls the format of diagnostic messages. - /nologo # - - {defines_text} - {compiler_extra} - - {py_limited_api3} - ''' - run_if( command, path_obj, path_cpp, prerequisites_compile) - - command, pythonflags = base_linker(cpp=cpp) - debug2 = '/DEBUG' if debug else '' - base, _ = os.path.splitext(path_so_leaf) - command = f''' - {command} - /DLL # Builds a DLL. - /EXPORT:PyInit__{name} # Exports a function. - /IMPLIB:{base}.lib # Overrides the default import library name. - {libpaths_text} - {pythonflags.ldflags} - /OUT:{path_so} # Specifies the output file name. - {debug2} - /nologo - {libs_text} - {path_obj} - {linker_extra} - ''' - run_if( command, path_so, path_obj, prerequisites_link) - else: + if debug: + general_flags += '/Zi' if windows() else ' -g' + if optimise: + general_flags += ' /DNDEBUG /O2' if windows() else ' -O2 -DNDEBUG' - # Not Windows. - # - command, pythonflags = base_compiler(cpp=cpp) + py_limited_api3 = f'-DPy_LIMITED_API={py_limited_api2}' if py_limited_api2 else '' - # setuptools on Linux seems to use slightly different compile flags: - # - # -fwrapv -O3 -Wall -O2 -g0 -DPY_CALL_TRAMPOLINE + if windows(): + pass + elif darwin(): + # MacOS's linker does not like `-z origin`. + rpath_flag = "-Wl,-rpath,@loader_path/" + # Avoid `Undefined symbols for ... "_PyArg_UnpackTuple" ...'. + general_flags += ' -undefined dynamic_lookup' + elif pyodide(): + # Setting `-Wl,-rpath,'$ORIGIN',-z,origin` gives: + # emcc: warning: ignoring unsupported linker flag: `-rpath` [-Wlinkflags] + # wasm-ld: error: unknown -z value: origin # + rpath_flag = "-Wl,-rpath,'$ORIGIN'" + else: + rpath_flag = "-Wl,-rpath,'$ORIGIN',-z,origin" + + # Fun fact - on Linux, if the -L and -l options are before '{path_cpp}' + # they seem to be ignored... + # + path_os = list() - general_flags = '' - if debug: - general_flags += ' -g' - if optimise: - general_flags += ' -O2 -DNDEBUG' + for path_source in [path_cpp] + source_extra: + path_o = f'{path_source}.obj' if windows() else f'{path_source}.o' + path_os.append(f' {path_o}') - py_limited_api3 = f'-DPy_LIMITED_API={py_limited_api2}' if py_limited_api2 else '' + prerequisites_path = f'{path_o}.d' - if darwin(): - # MacOS's linker does not like `-z origin`. - rpath_flag = "-Wl,-rpath,@loader_path/" + if windows(): + compiler_command2 = f''' + {compiler_command} + # General: + /c # Compiles without linking. + {EHsc} # Enable "Standard C++ exception handling". - # Avoid `Undefined symbols for ... "_PyArg_UnpackTuple" ...'. - general_flags += ' -undefined dynamic_lookup' - elif pyodide(): - # Setting `-Wl,-rpath,'$ORIGIN',-z,origin` gives: - # emcc: warning: ignoring unsupported linker flag: `-rpath` [-Wlinkflags] - # wasm-ld: error: unknown -z value: origin - # - log0(f'pyodide: PEP-3149 suffix untested, so omitting. {_so_suffix()=}.') - path_so_leaf = f'_{name}.so' - path_so = f'{outdir}/{path_so_leaf}' + #/MD # Creates a multithreaded DLL using MSVCRT.lib. + {'/MDd' if debug else '/MD'} - rpath_flag = '' - else: - rpath_flag = "-Wl,-rpath,'$ORIGIN',-z,origin" - path_so = f'{outdir}/{path_so_leaf}' - # Fun fact - on Linux, if the -L and -l options are before '{path_cpp}' - # they seem to be ignored... - # - prerequisites = list() + # Input/output files: + {T}{path_source} # /Tp specifies C++ source file. + /Fo{path_o} # Output file. codespell:ignore - if pyodide(): - # Looks like pyodide's `cc` can't compile and link in one invocation. - prerequisites_compile_path = f'{path_cpp}.o.d' - prerequisites += _get_prerequisites( prerequisites_compile_path) - command = f''' - {command} - -fPIC - {general_flags.strip()} - {pythonflags.includes} + # Include paths: {includes_text} + {pythonflags.includes} # Include path for Python headers. + + # Code generation: + {optimise2} + {debug2} + {permissive} # Set standard-conformance mode. + + # Diagnostics: + #/FC # Display full path of source code files passed to cl.exe in diagnostic text. + /W3 # Sets which warning level to output. /W3 is IDE default. + /diagnostics:caret # Controls the format of diagnostic messages. + /nologo # + {defines_text} - -MD -MF {prerequisites_compile_path} - -c {path_cpp} - -o {path_cpp}.o {compiler_extra} + {py_limited_api3} ''' - prerequisites_link_path = f'{path_cpp}.o.d' - prerequisites += _get_prerequisites( prerequisites_link_path) - ld, _ = base_linker(cpp=cpp) - command += f''' - && {ld} - {path_cpp}.o - -o {path_so} - -MD -MF {prerequisites_link_path} - {rpath_flag} - {libpaths_text} - {libs_text} - {linker_extra} - {pythonflags.ldflags} - ''' - else: - # We use compiler to compile and link in one command. - prerequisites_path = f'{path_so}.d' - prerequisites = _get_prerequisites(prerequisites_path) - command = f''' - {command} + else: + compiler_command2 = f''' + {compiler_command} -fPIC - -shared {general_flags.strip()} {pythonflags.includes} {includes_text} {defines_text} - {path_cpp} -MD -MF {prerequisites_path} - -o {path_so} + -c {path_source} + -o {path_o} {compiler_extra} - {libpaths_text} - {linker_extra} - {pythonflags.ldflags} - {libs_text} - {rpath_flag} {py_limited_api3} ''' - command_was_run = run_if( - command, - path_so, - path_cpp, - prerequisites_compile, - prerequisites_link, - prerequisites, + run_if( + compiler_command2, + path_o, + path_source, + [path_source] + _get_prerequisites(prerequisites_path), ) - if command_was_run and darwin(): - # We need to patch up references to shared libraries in `libs`. - sublibraries = list() - for lib in () if libs is None else libs: - for libpath in libpaths: - found = list() - for suffix in '.so', '.dylib': - path = f'{libpath}/lib{os.path.basename(lib)}{suffix}' - if os.path.exists( path): - found.append( path) - if found: - assert len(found) == 1, f'More than one file matches lib={lib!r}: {found}' - sublibraries.append( found[0]) - break - else: - log2(f'Warning: can not find path of lib={lib!r} in libpaths={libpaths}') - macos_patch( path_so, *sublibraries) + # Link + prerequisites_path = f'{path_so}.d' + if windows(): + debug2 = '/DEBUG' if debug else '' + base, _ = os.path.splitext(path_so_leaf) + command2 = f''' + {linker_command} + /DLL # Builds a DLL. + /EXPORT:PyInit__{name} # Exports a function. + /IMPLIB:{base}.lib # Overrides the default import library name. + {libpaths_text} + {pythonflags.ldflags} + /OUT:{path_so} # Specifies the output file name. + {debug2} + /nologo + {libs_text} + {' '.join(path_os)} + {linker_extra} + ''' + elif pyodide(): + command2 = f''' + {linker_command} + -MD -MF {prerequisites_path} + -o {path_so} + {' '.join(path_os)} + {libpaths_text} + {libs_text} + {linker_extra} + {pythonflags.ldflags} + {rpath_flag} + ''' + else: + command2 = f''' + {linker_command} + -shared + {general_flags.strip()} + -MD -MF {prerequisites_path} + -o {path_so} + {' '.join(path_os)} + {libpaths_text} + {libs_text} + {linker_extra} + {pythonflags.ldflags} + {rpath_flag} + {py_limited_api3} + ''' + link_was_run = run_if( + command2, + path_so, + path_cpp, + *path_os, + *_get_prerequisites(f'{path_so}.d'), + ) + + if link_was_run and darwin(): + # We need to patch up references to shared libraries in `libs`. + sublibraries = list() + for lib in () if libs is None else libs: + for libpath in libpaths: + found = list() + for suffix in '.so', '.dylib': + path = f'{libpath}/lib{os.path.basename(lib)}{suffix}' + if os.path.exists( path): + found.append( path) + if found: + assert len(found) == 1, f'More than one file matches lib={lib!r}: {found}' + sublibraries.append( found[0]) + break + else: + log2(f'Warning: can not find path of lib={lib!r} in libpaths={libpaths}') + macos_patch( path_so, *sublibraries) #run(f'ls -l {path_so}', check=0) #run(f'file {path_so}', check=0) + _extensions_to_py_limited_api[os.path.abspath(path_so)] = py_limited_api + return path_so_leaf @@ -1860,6 +2039,34 @@ def base_linker(vs=None, pythonflags=None, cpp=False, use_env=True): return linker, pythonflags +def git_info( directory): + ''' + Returns `(sha, comment, diff, branch)`, all items are str or None if not + available. + + directory: + Root of git checkout. + ''' + sha, comment, diff, branch = None, None, None, None + e, out = run( + f'cd {directory} && (PAGER= git show --pretty=oneline|head -n 1 && git diff)', + capture=1, + check=0 + ) + if not e: + sha, _ = out.split(' ', 1) + comment, diff = _.split('\n', 1) + e, out = run( + f'cd {directory} && git rev-parse --abbrev-ref HEAD', + capture=1, + check=0 + ) + if not e: + branch = out.strip() + log1(f'git_info(): directory={directory!r} returning branch={branch!r} sha={sha!r} comment={comment!r}') + return sha, comment, diff, branch + + def git_items( directory, submodules=False): ''' Returns list of paths for all files known to git within a `directory`. @@ -1899,7 +2106,169 @@ def git_items( directory, submodules=False): return ret -def run( command, capture=False, check=1, verbose=1, env_extra=None, caller=1): +def git_get( + local, + *, + remote=None, + branch=None, + tag=None, + text=None, + depth=1, + env_extra=None, + update=True, + submodules=True, + ): + ''' + Creates/updates local checkout of remote repository and returns + absolute path of . + + If is set but does not start with 'git:', it is assumed to be an up + to date local checkout, and we return absolute path of without doing + any git operations. + + Args: + local: + Local directory. Created and/or updated using `git clone` and `git + fetch` etc. + remote: + Remote git repostitory, for example + 'https://github.com/ArtifexSoftware/mupdf.git'. Can be overridden + by . + branch: + Branch to use; can be overridden by . + tag: + Tag to use; can be overridden by . + text: + If None or empty: + Ignored. + + If starts with 'git:': + The remaining text should be a command-line + style string containing some or all of these args: + --branch + --tag + + These overrides , and . + Otherwise: + is assumed to be a local directory, and we simply return + it as an absolute path without doing any git operations. + + For example these all clone/update/branch master of https://foo.bar/qwerty.git to local + checkout 'foo-local': + + git_get('foo-local', remote='https://foo.bar/qwerty.git', branch='master') + git_get('foo-local', text='git:--branch master https://foo.bar/qwerty.git') + git_get('foo-local', text='git:--branch master', remote='https://foo.bar/qwerty.git') + git_get('foo-local', text='git:', branch='master', remote='https://foo.bar/qwerty.git') + depth: + Depth of local checkout when cloning and fetching, or None. + env_extra: + Dict of extra name=value environment variables to use whenever we + run git. + update: + If false we do not update existing repository. Might be useful if + testing without network access. + submodules: + If true, we clone with `--recursive --shallow-submodules` and run + `git submodule update --init --recursive` before returning. + ''' + log0(f'{remote=} {local=} {branch=} {tag=} {text=}') + + if text: + if text.startswith('git:'): + args = iter(shlex.split(text[len('git:'):])) + while 1: + try: + arg = next(args) + except StopIteration: + break + if arg == '--branch': + branch = next(args) + tag = None + elif arg == '--tag': + tag = next(args) + branch = None + else: + remote = arg + assert remote, f' unset and no remote specified in {text=}.' + assert branch or tag, f' and unset and no branch/tag specified in {text=}.' + else: + log0(f'Using local directory {text!r}.') + return os.path.abspath(text) + + assert (branch and not tag) or (not branch and tag), f'Must specify exactly one of and ; {branch=} {tag=}.' + + depth_arg = f' --depth {depth}' if depth else '' + + def do_update(): + # This seems to pull in the entire repository. + log0(f'do_update(): attempting to update {local=}.') + # Remove any local changes. + run(f'cd {local} && git reset --hard', env_extra=env_extra) + if tag: + # `-u` avoids `fatal: Refusing to fetch into current branch`. + # Using '+' and `revs/tags/` prefix seems to avoid errors like: + # error: cannot update ref 'refs/heads/v3.16.44': + # trying to write non-commit object + # 06c4ae5fe39a03b37a25a8b95214d9f8f8a867b8 to branch + # 'refs/heads/v3.16.44' + # + run(f'cd {local} && git fetch -fuv{depth_arg} {remote} +refs/tags/{tag}:refs/tags/{tag}', env_extra=env_extra) + run(f'cd {local} && git checkout {tag}', env_extra=env_extra) + if branch: + # `-u` avoids `fatal: Refusing to fetch into current branch`. + run(f'cd {local} && git fetch -fuv{depth_arg} {remote} {branch}:{branch}', env_extra=env_extra) + run(f'cd {local} && git checkout {branch}', env_extra=env_extra) + + do_clone = True + if os.path.isdir(f'{local}/.git'): + if update: + # Try to update existing checkout. + try: + do_update() + do_clone = False + except Exception as e: + log0(f'Failed to update existing checkout {local}: {e}') + else: + do_clone = False + + if do_clone: + # No existing git checkout, so do a fresh clone. + #_fs_remove(local) + log0(f'Cloning to: {local}') + command = f'git clone --config core.longpaths=true{depth_arg}' + if submodules: + command += f' --recursive --shallow-submodules' + if branch: + command += f' -b {branch}' + if tag: + command += f' -b {tag}' + command += f' {remote} {local}' + run(command, env_extra=env_extra) + do_update() + + if submodules: + run(f'cd {local} && git submodule update --init --recursive', env_extra=env_extra) + + # Show sha of checkout. + run( f'cd {local} && git show --pretty=oneline|head -n 1', check=False) + return os.path.abspath(local) + + +def run( + command, + *, + capture=False, + check=1, + verbose=1, + env=None, + env_extra=None, + timeout=None, + caller=1, + prefix=None, + encoding=None, # System default. + errors='backslashreplace', + ): ''' Runs a command using `subprocess.run()`. @@ -1921,8 +2290,22 @@ def run( command, capture=False, check=1, verbose=1, env_extra=None, caller=1): command's returncode in our return value. verbose: If true we show the command. + env: + None or dict to use instead of . env_extra: - None or dict to add to environ. + None or dict to add to or . + timeout: + If not None, timeout in seconds; passed directly to + subprocess.run(). Note that on MacOS subprocess.run() seems to + leave processes running if timeout expires. + prefix: + String prefix for each line of output. + + If true: + * We run command with stdout=subprocess.PIPE and + stderr=subprocess.STDOUT, repetaedly reading the command's output + and writing it to stdout with . + * We do not support , which must be None. Returns: check capture Return -------------------------- @@ -1931,25 +2314,79 @@ def run( command, capture=False, check=1, verbose=1, env_extra=None, caller=1): true false None or raise exception true true output or raise exception ''' - env = None + if env is None: + env = os.environ + if env_extra: + env = env.copy() if env_extra: - env = os.environ.copy() env.update(env_extra) lines = _command_lines( command) - nl = '\n' if verbose: - log1( f'Running: {nl.join(lines)}', caller=caller+1) + text = f'Running:' + nl = '\n ' + text += f' {nl.join(lines)}' + if env_extra: + text += f'\nwith:\n' + for k in sorted(env_extra.keys()): + text += f' {k}={shlex.quote(env_extra[k])}\n' + log1(text, caller=caller+1) sep = ' ' if windows() else ' \\\n' command2 = sep.join( lines) - cp = subprocess.run( - command2, - shell=True, - stdout=subprocess.PIPE if capture else None, - stderr=subprocess.STDOUT if capture else None, - check=check, - encoding='utf8', - env=env, - ) + + if prefix: + assert not timeout, f'Timeout not supported with prefix.' + child = subprocess.Popen( + command2, + shell=True, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + encoding=encoding, + errors=errors, + env=env, + ) + if capture: + capture_text = '' + decoder = codecs.getincrementaldecoder(child.stdout.encoding)(errors) + line_start = True + + while 1: + raw = os.read( child.stdout.fileno(), 10000) + text = decoder.decode(raw, final=not raw) + if capture: + capture_text += text + lines = text.split('\n') + for i, line in enumerate(lines): + if line_start: + sys.stdout.write(prefix) + line_start = False + sys.stdout.write(line) + if i < len(lines) - 1: + sys.stdout.write('\n') + line_start = True + sys.stdout.flush() + if not raw: + break + if not line_start: + sys.stdout.write('\n') + e = child.wait() + if check and e: + raise subprocess.CalledProcessError(e, command2, capture_text if capture else None) + if check: + return capture_text if capture else None + else: + return (e, capture_text) if capture else e + else: + cp = subprocess.run( + command2, + shell=True, + stdout=subprocess.PIPE if capture else None, + stderr=subprocess.STDOUT if capture else None, + check=check, + encoding=encoding, + errors=errors, + env=env, + timeout=timeout, + ) if check: return cp.stdout if capture else None else: @@ -1974,6 +2411,41 @@ def linux(): def openbsd(): return platform.system() == 'OpenBSD' + +def show_system(): + ''' + Show useful information about the system plus argv and environ. + ''' + def log(text): + log0(text, caller=3) + + #log(f'{__file__=}') + #log(f'{__name__=}') + log(f'{os.getcwd()=}') + log(f'{platform.machine()=}') + log(f'{platform.platform()=}') + log(f'{platform.python_implementation()=}') + log(f'{platform.python_version()=}') + log(f'{platform.system()=}') + if sys.implementation.name != 'graalpy': + log(f'{platform.uname()=}') + log(f'{sys.executable=}') + log(f'{sys.version=}') + log(f'{sys.version_info=}') + log(f'{list(sys.version_info)=}') + + log(f'CPU bits: {cpu_bits()}') + + log(f'sys.argv ({len(sys.argv)}):') + for i, arg in enumerate(sys.argv): + log(f' {i}: {arg!r}') + + log(f'os.environ ({len(os.environ)}):') + for k in sorted( os.environ.keys()): + v = os.environ[ k] + log( f' {k}: {v!r}') + + class PythonFlags: ''' Compile/link flags for the current python, for example the include path @@ -1989,8 +2461,23 @@ class PythonFlags: String containing linker flags for library paths. ''' def __init__(self): + + # Experimental detection of python flags from sysconfig.*() instead of + # python-config command. + includes_, ldflags_ = sysconfig_python_flags() + + if pyodide(): + _include_dir = os.environ[ 'PYO3_CROSS_INCLUDE_DIR'] + _lib_dir = os.environ[ 'PYO3_CROSS_LIB_DIR'] + self.includes = f'-I {_include_dir}' + self.ldflags = f'-L {_lib_dir}' - if windows(): + elif 0: + + self.includes = includes_ + self.ldflags = ldflags_ + + elif windows(): wp = wdev.WindowsPython() self.includes = f'/I"{wp.include}"' self.ldflags = f'/LIBPATH:"{wp.libs}"' @@ -2059,8 +2546,11 @@ def __init__(self): log2(f'### Have removed `-lcrypt` from ldflags: {self.ldflags!r} -> {ldflags2!r}') self.ldflags = ldflags2 - log2(f'{self.includes=}') - log2(f'{self.ldflags=}') + if 0: + log1(f'{self.includes=}') + log1(f' {includes_=}') + log1(f'{self.ldflags=}') + log1(f' {ldflags_=}') def macos_add_cross_flags(command): @@ -2123,6 +2613,40 @@ def macos_patch( library, *sublibraries): subprocess.run( f'otool -L {library}', shell=1, check=1) +def _macos_fixup_platform_tag(tag): + ''' + Patch up platform tag on MacOS. + + E.g. `foo-1.2.3-cp311-none-macosx_13_x86_64.whl` causes `pip` to fail with: + `not a supported wheel on this platform`. We seem to need to add `_0` to + the OS version. (This is documented at + https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#macos). + + And with graal we need to replace trailing `universal2` with x86_64 + or arm64. On non-graal this causes problems because non-universal + platform tags seem more restricted than platform tags from + sysconfig.get_platform(). For example: + + pip install ...-macosx_10_13_arm64.whl + ERROR: ...-macosx_10_13_arm64.whl is not a supported wheel on this platform. + pip install ...-macosx_10_13_universal2.whl + Ok. + ''' + m = re.match( '^macosx_([0-9_]+)_([^0-9].+)$', tag) + if not m: + return tag + a = m.group(1) + if '_' not in a: + a += '_0' + b = m.group(2) + if sys.implementation.name == 'graalpy' and b == 'universal2': + # Replace 'universal2' with x86_64 or arm64. + b = platform.machine() + ret = f'macosx_{a}_{b}' + #log0(f'Changing from {tag=} to {ret=}.') + return ret + + # Internal helpers. # @@ -2148,6 +2672,10 @@ def _command_lines( command): return lines +def cpu_bits(): + return int.bit_length(sys.maxsize+1) + + def _cpu_name(): ''' Returns `x32` or `x64` depending on Python build. @@ -2156,7 +2684,7 @@ def _cpu_name(): return f'x{32 if sys.maxsize == 2**31 - 1 else 64}' -def run_if( command, out, *prerequisites): +def run_if( command, out, *prerequisites, caller=1): ''' Runs a command only if the output file is not up to date. @@ -2186,21 +2714,26 @@ def run_if( command, out, *prerequisites): ... os.remove( out) >>> if os.path.exists( f'{out}.cmd'): ... os.remove( f'{out}.cmd') - >>> run_if( f'touch {out}', out) + >>> run_if( f'touch {out}', out, caller=0) pipcl.py:run_if(): Running command because: File does not exist: 'run_if_test_out' pipcl.py:run_if(): Running: touch run_if_test_out True If we repeat, the output file will be up to date so the command is not run: - >>> run_if( f'touch {out}', out) + >>> run_if( f'touch {out}', out, caller=0) pipcl.py:run_if(): Not running command because up to date: 'run_if_test_out' If we change the command, the command is run: - >>> run_if( f'touch {out}', out) - pipcl.py:run_if(): Running command because: Command has changed - pipcl.py:run_if(): Running: touch run_if_test_out + >>> run_if( f'touch {out};', out, caller=0) + pipcl.py:run_if(): Running command because: Command has changed: + pipcl.py:run_if(): @@ -1,2 +1,2 @@ + pipcl.py:run_if(): touch + pipcl.py:run_if(): -run_if_test_out + pipcl.py:run_if(): +run_if_test_out; + pipcl.py:run_if(): + pipcl.py:run_if(): Running: touch run_if_test_out; True If we add a prerequisite that is newer than the output, the command is run: @@ -2209,15 +2742,20 @@ def run_if( command, out, *prerequisites): >>> prerequisite = 'run_if_test_prerequisite' >>> run( f'touch {prerequisite}', caller=0) pipcl.py:run(): Running: touch run_if_test_prerequisite - >>> run_if( f'touch {out}', out, prerequisite) - pipcl.py:run_if(): Running command because: Prerequisite is new: 'run_if_test_prerequisite' + >>> run_if( f'touch {out}', out, prerequisite, caller=0) + pipcl.py:run_if(): Running command because: Command has changed: + pipcl.py:run_if(): @@ -1,2 +1,2 @@ + pipcl.py:run_if(): touch + pipcl.py:run_if(): -run_if_test_out; + pipcl.py:run_if(): +run_if_test_out + pipcl.py:run_if(): pipcl.py:run_if(): Running: touch run_if_test_out True If we repeat, the output will be newer than the prerequisite, so the command is not run: - >>> run_if( f'touch {out}', out, prerequisite) + >>> run_if( f'touch {out}', out, prerequisite, caller=0) pipcl.py:run_if(): Not running command because up to date: 'run_if_test_out' ''' doit = False @@ -2234,13 +2772,34 @@ def run_if( command, out, *prerequisites): cmd = f.read() else: cmd = None - if command != cmd: + cmd_args = shlex.split(cmd or '') + command_args = shlex.split(command or '') + if command_args != cmd_args: if cmd is None: doit = 'No previous command stored' else: doit = f'Command has changed' if 0: - doit += f': {cmd!r} => {command!r}' + doit += f':\n {cmd!r}\n {command!r}' + if 0: + doit += f'\nbefore:\n' + doit += textwrap.indent(cmd, ' ') + doit += f'\nafter:\n' + doit += textwrap.indent(command, ' ') + if 1: + # Show diff based on commands split into pseudo lines by + # shlex.split(). + doit += ':\n' + lines = difflib.unified_diff( + cmd.split(), + command.split(), + lineterm='', + ) + # Skip initial lines. + assert next(lines) == '--- ' + assert next(lines) == '+++ ' + for line in lines: + doit += f' {line}\n' if not doit: # See whether any prerequisites are newer than target. @@ -2253,9 +2812,9 @@ def _make_prerequisites(p): for p in prerequisites: prerequisites_all += _make_prerequisites( p) if 0: - log2( 'prerequisites_all:') + log2( 'prerequisites_all:', caller=caller+1) for i in prerequisites_all: - log2( f' {i!r}') + log2( f' {i!r}', caller=caller+1) pre_mtime = 0 pre_path = None for prerequisite in prerequisites_all: @@ -2271,7 +2830,7 @@ def _make_prerequisites(p): break if not doit: if pre_mtime > out_mtime: - doit = f'Prerequisite is new: {pre_path!r}' + doit = f'Prerequisite is new: {os.path.abspath(pre_path)!r}' if doit: # Remove `cmd_path` before we run the command, so any failure @@ -2281,16 +2840,16 @@ def _make_prerequisites(p): os.remove( cmd_path) except Exception: pass - log1( f'Running command because: {doit}') + log1( f'Running command because: {doit}', caller=caller+1) - run( command) + run( command, caller=caller+1) # Write the command we ran, into `cmd_path`. with open( cmd_path, 'w') as f: f.write( command) return True else: - log1( f'Not running command because up to date: {out!r}') + log1( f'Not running command because up to date: {out!r}', caller=caller+1) if 0: log2( f'out_mtime={time.ctime(out_mtime)} pre_mtime={time.ctime(pre_mtime)}.' @@ -2357,6 +2916,16 @@ def _fs_mtime( filename, default=0): return default +def _normalise(name): + # https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization + return re.sub(r"[-_.]+", "-", name).lower() + + +def _normalise2(name): + # https://packaging.python.org/en/latest/specifications/binary-distribution-format/ + return _normalise(name).replace('-', '_') + + def _assert_version_pep_440(version): assert re.match( r'^([1-9][0-9]*!)?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*((a|b|rc)(0|[1-9][0-9]*))?(\.post(0|[1-9][0-9]*))?(\.dev(0|[1-9][0-9]*))?$', @@ -2386,6 +2955,9 @@ def log_line_numbers(yes): global g_log_line_numbers g_log_line_numbers = bool(yes) +def log(text='', caller=1): + _log(text, 0, caller+1) + def log0(text='', caller=1): _log(text, 0, caller+1) @@ -2397,7 +2969,7 @@ def log2(text='', caller=1): def _log(text, level, caller): ''' - Logs lines with prefix. + Logs lines with prefix, if is lower or equal to . ''' if level <= g_verbose: fr = inspect.stack(context=0)[caller] @@ -2409,19 +2981,31 @@ def _log(text, level, caller): print(f'{filename}:{fr.function}(): {line}', file=sys.stdout, flush=1) -def relpath(path, start=None): +def relpath(path, start=None, allow_up=True): ''' A safe alternative to os.path.relpath(), avoiding an exception on Windows if the drive needs to change - in this case we use os.path.abspath(). + + Args: + path: + Path to be processed. + start: + Start directory or current directory if None. + allow_up: + If false we return absolute path is is not within . ''' if windows(): try: - return os.path.relpath(path, start) + ret = os.path.relpath(path, start) except ValueError: # os.path.relpath() fails if trying to change drives. - return os.path.abspath(path) + ret = os.path.abspath(path) else: - return os.path.relpath(path, start) + ret = os.path.relpath(path, start) + if not allow_up and ret.startswith('../') or ret.startswith('..\\'): + ret = os.path.abspath(path) + return ret + def _so_suffix(use_so_versioning=True): ''' @@ -2554,3 +3138,281 @@ def get(self, record_path=None): if record_path: ret += f'{record_path},,\n' return ret + + +class NewFiles: + ''' + Detects new/modified/updated files matching a glob pattern. Useful for + detecting wheels created by pip or cubuildwheel etc. + ''' + def __init__(self, glob_pattern): + # Find current matches of . + self.glob_pattern = glob_pattern + self.items0 = self._items() + def get(self): + ''' + Returns list of new matches of - paths of files that + were not present previously, or have different mtimes or have different + contents. + ''' + ret = list() + items = self._items() + for path, id_ in items.items(): + id0 = self.items0.get(path) + if id0 != id_: + ret.append(path) + return ret + def get_n(self, n): + ''' + Returns new files matching , asserting that there are + exactly . + ''' + ret = self.get() + assert len(ret) == n, f'{len(ret)=}: {ret}' + return ret + def get_one(self): + ''' + Returns new match of , asserting that there is exactly + one. + ''' + return self.get_n(1)[0] + def _file_id(self, path): + mtime = os.stat(path).st_mtime + with open(path, 'rb') as f: + content = f.read() + hash_ = hashlib.md5(content).digest() + # With python >= 3.11 we can do: + #hash_ = hashlib.file_digest(f, hashlib.md5).digest() + return mtime, hash_ + def _items(self): + ret = dict() + for path in glob.glob(self.glob_pattern): + if os.path.isfile(path): + ret[path] = self._file_id(path) + return ret + + +def swig_get(swig, quick, swig_local='pipcl-swig-git'): + ''' + Returns or a new swig binary. + + If is true and starts with 'git:' (not Windows), the remaining text + is passed to git_get() and we clone/update/build swig, and return the built + binary. We default to the main swig repository, branch master, so for + example 'git:' will return the latest swig from branch master. + + Otherwise we simply return . + + Args: + swig: + If starts with 'git:', passed as arg to git_get(). + quick: + If true, we do not update/build local checkout if the binary is + already present. + swig_local: + path to use for checkout. + ''' + if swig and swig.startswith('git:'): + assert platform.system() != 'Windows', f'Cannot build swig on Windows.' + # Note that {swig_local}/install/bin/swig doesn't work on MacOS because + # {swig_local}/INSTALL is a file and the fs is case-insensitive. + swig_binary = f'{swig_local}/install-dir/bin/swig' + if quick and os.path.isfile(swig_binary): + log1(f'{quick=} and {swig_binary=} already exists, so not downloading/building.') + else: + # Clone swig. + swig_env_extra = None + swig_local = git_get( + swig_local, + text=swig, + remote='https://github.com/swig/swig.git', + branch='master', + ) + if darwin(): + run(f'brew install automake') + run(f'brew install pcre2') + run(f'brew install bison') + # Default bison doesn't work, and Brew's bison is not added to $PATH. + # + # > bison is keg-only, which means it was not symlinked into /opt/homebrew, + # > because macOS already provides this software and installing another version in + # > parallel can cause all kinds of trouble. + # > + # > If you need to have bison first in your PATH, run: + # > echo 'export PATH="/opt/homebrew/opt/bison/bin:$PATH"' >> ~/.zshrc + # + swig_env_extra = dict() + macos_add_brew_path('bison', swig_env_extra) + run(f'which bison') + run(f'which bison', env_extra=swig_env_extra) + # Build swig. + run(f'cd {swig_local} && ./autogen.sh', env_extra=swig_env_extra) + run(f'cd {swig_local} && ./configure --prefix={swig_local}/install-dir', env_extra=swig_env_extra) + run(f'cd {swig_local} && make', env_extra=swig_env_extra) + run(f'cd {swig_local} && make install', env_extra=swig_env_extra) + assert os.path.isfile(swig_binary) + return swig_binary + else: + return swig + + +def macos_add_brew_path(package, env=None, gnubin=True): + ''' + Adds path(s) for Brew 's binaries to env['PATH']. + + We assert-fail if the relevant directory does no exist. + + Args: + package: + Name of package. We get of installed package by + running `brew --prefix `. + env: + The environment dict to modify. If None we use os.environ. If PATH + is not in , we first copy os.environ['PATH'] into . + gnubin: + If true, we also add path to gnu binaries if it exists, + /libexe/gnubin. + ''' + if not darwin(): + return + if env is None: + env = os.environ + if 'PATH' not in env: + env['PATH'] = os.environ['PATH'] + package_root = run(f'brew --prefix {package}', capture=1).strip() + log(f'{package=} {package_root=}') + def add(path): + log(f'{path=}') + if os.path.isdir(path): + log(f'Prepending to $PATH: {path}') + PATH = env['PATH'] + env['PATH'] = f'{path}:{PATH}' + return 1 + else: + log(f'Not a directory: {path=}') + return 0 + n = 0 + n += add(f'{package_root}/bin') + if gnubin: + n += add(f'{package_root}/libexec/gnubin') + assert n, f'Failed to add to $PATH, {package=} {gnubin=}.' + + +def _show_dict(d): + ret = '' + for n in sorted(d.keys()): + v = d[n] + ret += f' {n}: {v!r}\n' + return ret + +def show_sysconfig(): + ''' + Shows contents of sysconfig.get_paths() and sysconfig.get_config_vars() dicts. + ''' + import sysconfig + paths = sysconfig.get_paths() + log0(f'show_sysconfig().') + log0(f'sysconfig.get_paths():\n{_show_dict(sysconfig.get_paths())}') + log0(f'sysconfig.get_config_vars():\n{_show_dict(sysconfig.get_config_vars())}') + + +def sysconfig_python_flags(): + ''' + Returns include paths and library directory for Python. + + Uses sysconfig.*(), overridden by environment variables + PIPCL_SYSCONFIG_PATH_include, PIPCL_SYSCONFIG_PATH_platinclude and + PIPCL_SYSCONFIG_CONFIG_VAR_LIBDIR if set. + ''' + include1_ = os.environ.get('PIPCL_SYSCONFIG_PATH_include') or sysconfig.get_path('include') + include2_ = os.environ.get('PIPCL_SYSCONFIG_PATH_platinclude') or sysconfig.get_path('platinclude') + ldflags_ = os.environ.get('PIPCL_SYSCONFIG_CONFIG_VAR_LIBDIR') or sysconfig.get_config_var('LIBDIR') + + includes_ = [include1_] + if include2_ != include1_: + includes_.append(include2_) + if windows(): + includes_ = [f'/I"{i}"' for i in includes_] + ldflags_ = f'/LIBPATH:"{ldflags_}"' + else: + includes_ = [f'-I {i}' for i in includes_] + ldflags_ = f'-L {ldflags_}' + includes_ = ' '.join(includes_) + return includes_, ldflags_ + + +def venv_in(path=None): + ''' + If path is None, returns true if we are in a venv. Otherwise returns true + only if we are in venv . + ''' + if path: + return os.path.abspath(sys.prefix) == os.path.abspath(path) + else: + return sys.prefix != sys.base_prefix + + +def venv_run(args, path, recreate=True, clean=False): + ''' + Runs Python command inside venv and returns termination code. + + Args: + args: + List of args or string command. + path: + Path of venv directory. + recreate: + If false we do not run ` -m venv ` if + already exists. This avoids a delay in the common case where + is already set up, but fails if exists but does not contain + a valid venv. + clean: + If true we first delete . + ''' + if clean: + log(f'Removing any existing venv {path}.') + assert path.startswith('venv-') + shutil.rmtree(path, ignore_errors=1) + if recreate or not os.path.isdir(path): + run(f'{sys.executable} -m venv {path}') + + if isinstance(args, str): + args_string = args + elif platform.system() == 'Windows': + # shlex not reliable on Windows so we use Use crude quoting with "...". + args_string = '' + for i, arg in enumerate(args): + assert '"' not in arg + if i: + args_string += ' ' + args_string += f'"{arg}"' + else: + args_string = shlex.join(args) + + if platform.system() == 'Windows': + command = f'{path}\\Scripts\\activate && python {args_string}' + else: + command = f'. {path}/bin/activate && python {args_string}' + e = run(command, check=0) + return e + + +if __name__ == '__main__': + # Internal-only limited command line support, used if + # graal_legacy_python_config is true. + # + includes, ldflags = sysconfig_python_flags() + if sys.argv[1] == '--doctest': + import doctest + if sys.argv[2:]: + for f in sys.argv[2:]: + ff = globals()[f] + doctest.run_docstring_examples(ff, globals()) + else: + doctest.testmod(None) + elif sys.argv[1:] == ['--graal-legacy-python-config', '--includes']: + print(includes) + elif sys.argv[1:] == ['--graal-legacy-python-config', '--ldflags']: + print(ldflags) + else: + assert 0, f'Expected `--graal-legacy-python-config --includes|--ldflags` but {sys.argv=}' diff --git a/scripts/gh_release.py b/scripts/gh_release.py index b08d42aef..1cc836894 100755 --- a/scripts/gh_release.py +++ b/scripts/gh_release.py @@ -89,6 +89,14 @@ pymupdf_dir = os.path.abspath( f'{__file__}/../..') +sys.path.insert(0, pymupdf_dir) +import pipcl +del sys.path[0] + +log = pipcl.log0 +run = pipcl.run + + def main(): log( '### main():') @@ -223,7 +231,7 @@ def get_bool(name, default=0): if platform.system() == 'Linux' and inputs_wheels_linux_pyodide: # Pyodide wheels are built by running scripts/test.py, not # cibuildwheel. - command = f'{sys.executable} scripts/test.py' + command = f'{sys.executable} scripts/test.py -P 1' if inputs_PYMUPDF_SETUP_MUPDF_BUILD: command += f' -m {shlex.quote(inputs_PYMUPDF_SETUP_MUPDF_BUILD)}' command += ' pyodide_wheel' @@ -237,14 +245,14 @@ def get_bool(name, default=0): os.chdir( pymupdf_dir) # Create PyMuPDF sdist. run(f'{sys.executable} setup.py sdist') - assert glob.glob('dist/PyMuPDF-*.tar.gz') + assert glob.glob('dist/pymupdf-*.tar.gz') if inputs_flavours: # Create PyMuPDFb sdist. run( f'{sys.executable} setup.py sdist', env_extra=dict(PYMUPDF_SETUP_FLAVOUR='b'), ) - assert glob.glob('dist/PyMuPDFb-*.tar.gz') + assert glob.glob('dist/pymupdfb-*.tar.gz') # Build wheels. # @@ -284,11 +292,11 @@ def make_string(*items): ret.append(item) return ' '.join(ret) - cps = inputs_wheels_cps if inputs_wheels_cps else 'cp39* cp310* cp311* cp312* cp313' + cps = inputs_wheels_cps if inputs_wheels_cps else 'cp39* cp310* cp311* cp312* cp313*' set_if_unset( 'CIBW_BUILD', cps) for cp in cps.split(): m = re.match('cp([0-9]+)[*]', cp) - assert m + assert m, f'{cps=} {cp=}' v = int(m.group(1)) if v == 314: # Need to set CIBW_PRERELEASE_PYTHONS, otherwise cibuildwheel @@ -351,6 +359,8 @@ def env_set(name, value, pass_=False): if pass_: env_pass(name) + env_pass('PYMUPDF_SETUP_PY_LIMITED_API') + if os.environ.get('PYMUPDF_SETUP_LIBCLANG'): env_pass('PYMUPDF_SETUP_LIBCLANG') @@ -389,7 +399,8 @@ def set_cibuild_test(): env_pass('PYMUPDF_SETUP_PY_LIMITED_API') CIBW_BUILD_old = env_extra.get('CIBW_BUILD') assert CIBW_BUILD_old is not None - env_set('CIBW_BUILD', 'cp39*') + cp = cps.split()[0] + env_set('CIBW_BUILD', cp) log(f'Building single wheel.') run( f'cibuildwheel{platform_arg}', env_extra=env_extra) @@ -413,7 +424,16 @@ def set_cibuild_test(): # env_set('CIBW_REPAIR_WHEEL_COMMAND', '') - log(f'Testing on all python versions using wheels in wheelhouse/.') + if platform.system() == 'Linux' and env_extra.get('CIBW_ARCHS_LINUX') == 'aarch64': + log(f'Testing all Python versions on linux-aarch64 is too slow and is killed by github after 6h.') + log(f'Testing on restricted python versions using wheels in wheelhouse/.') + # Testing only on first and last python versions. + cp1 = cps.split()[0] + cp2 = cps.split()[-1] + cp = cp1 if cp1 == cp2 else f'{cp1} {cp2}' + env_set('CIBW_BUILD', cp) + else: + log(f'Testing on all python versions using wheels in wheelhouse/.') run( f'cibuildwheel{platform_arg}', env_extra=env_extra) elif inputs_flavours: @@ -428,7 +448,7 @@ def set_cibuild_test(): # Include MuPDF build-time files. flavour += 'd' env_set( 'PYMUPDF_SETUP_FLAVOUR', flavour, pass_=1) - run( f'cibuildwheel{platform_arg}', env_extra) + run( f'cibuildwheel{platform_arg}', env_extra=env_extra) run( 'echo after {flavour=}') run( 'ls -l wheelhouse') @@ -455,7 +475,7 @@ def set_cibuild_test(): # careful to avoid incompatible wheels, e.g. 32 vs 64-bit wheels # coexist during Windows builds. # - env_set('CIBW_BEFORE_TEST', f'python scripts/gh_release.py pip_install wheelhouse/PyMuPDFb') + env_set('CIBW_BEFORE_TEST', f'python scripts/gh_release.py pip_install wheelhouse/pymupdfb') set_cibuild_test() @@ -576,49 +596,6 @@ def relpath(path, start=None): return os.path.relpath(path, start) -def log(text, caller=0): - ''' - Writes `text` to stdout with prefix showing caller path relative to - pymupdf_dir and fn name. - ''' - frame_record = inspect.stack( context=0)[ caller+1] - filename = frame_record.filename - line = frame_record.lineno - function = frame_record.function - prefix = f'{relpath(filename, pymupdf_dir)}:{line}:{function}(): ' - print(textwrap.indent(text, prefix), flush=1) - - -def run(command, env_extra=None, check=1, timeout=None): - ''' - Runs a command using subprocess.run(). - Args: - command: - The command to run. - env_extra: - None or dict containing extra environment variable settings to add - to os.environ. - check: - Whether to raise exception if command fails. - timeout: - If not None, timeout in seconds; passed directory to - subprocess.run(). Note that on MacOS subprocess.run() seems to - leave processes running if timeout expires. - ''' - env = None - message = 'Running: ' - if env_extra: - env = os.environ.copy() - env.update(env_extra) - message += '\n[environment:\n' - for n, v in env_extra.items(): - message += f' {n}={shlex.quote(v)}\n' - message += ']\n' - message += f'{command}' - log(message, caller=1) - return subprocess.run(command, check=check, shell=1, env=env, timeout=timeout) - - def platform_tag(): bits = cpu_bits() if platform.system() == 'Windows': diff --git a/scripts/sysinstall.py b/scripts/sysinstall.py index 0c2a7f697..d4f2fc14f 100755 --- a/scripts/sysinstall.py +++ b/scripts/sysinstall.py @@ -20,6 +20,7 @@ Args: + --gdb 0|1 --mupdf-dir Path of MuPDF checkout; default is 'mupdf'. --mupdf-do 0|1 @@ -49,7 +50,7 @@ --pymupdf-do 0|1 Whether to build and install pymupdf. --root - Root of install directory; default is `/`. + Root of install directory; default is 'pymupdf-sysinstall-test-root'. --tesseract5 0|1 If 1 (the default), we force installation of libtesseract-dev version 5 (which is not available as a default package in Ubuntu-22.04) from @@ -86,6 +87,14 @@ import test as test_py +pymupdf_dir = os.path.abspath( f'{__file__}/../..') + +sys.path.insert(0, pymupdf_dir) +import pipcl +del sys.path[0] + +log = pipcl.log0 + # Requirements for a system build and install: # # system packages (Debian names): @@ -106,12 +115,14 @@ def main(): if 1: - print(f'## {__file__}: Starting.') - print(f'{sys.executable=}') - print(f'{platform.python_version()=}') - print(f'{__file__=}') - print(f'{sys.argv=}') - print(f'{sysconfig.get_path("platlib")=}') + log(f'## {__file__}: Starting.') + log(f'{sys.executable=}') + log(f'{platform.python_version()=}') + log(f'{__file__=}') + log(f'{os.environ.get("PYMUDF_SCRIPTS_SYSINSTALL_ARGS_PRE")=}') + log(f'{os.environ.get("PYMUDF_SCRIPTS_SYSINSTALL_ARGS_POST")=}') + log(f'{sys.argv=}') + log(f'{sysconfig.get_path("platlib")=}') run_command(f'python -V', check=0) run_command(f'python3 -V', check=0) run_command(f'sudo python -V', check=0) @@ -124,6 +135,7 @@ def main(): # Set default behaviour. # + gdb = False use_installer = True mupdf_do = True mupdf_dir = 'mupdf' @@ -132,8 +144,7 @@ def main(): packages = True prefix = '/usr/local' pymupdf_do = True - pymupdf_dir = os.path.abspath( f'{__file__}/../..') - root = 'sysinstall_test' + root = 'pymupdf-sysinstall-test-root' tesseract5 = True pytest_args = None pytest_do = True @@ -145,15 +156,18 @@ def main(): # Parse command-line. # - args = iter(sys.argv[1:]) + env_args_pre = shlex.split(os.environ.get('PYMUDF_SCRIPTS_SYSINSTALL_ARGS_PRE', '')) + env_args_post = shlex.split(os.environ.get('PYMUDF_SCRIPTS_SYSINSTALL_ARGS_POST', '')) + args = iter(env_args_pre + sys.argv[1:] + env_args_post) while 1: try: arg = next(args) except StopIteration: break if arg in ('-h', '--help'): - print(__doc__) + log(__doc__) return + elif arg == '--gdb': gdb = int(next(args)) elif arg == '--mupdf-do': mupdf_do = int(next(args)) elif arg == '--mupdf-dir': mupdf_dir = next(args) elif arg == '--mupdf-git': mupdf_git = next(args) @@ -161,7 +175,6 @@ def main(): elif arg == '--packages': packages = int(next(args)) elif arg == '--prefix': prefix = next(args) elif arg == '--pymupdf-do': pymupdf_do = int(next(args)) - elif arg == '--pymupdf-dir': pymupdf_dir = next(args) elif arg == '--root': root = next(args) elif arg == '--tesseract5': tesseract5 = int(next(args)) elif arg == '--pytest-do': pytest_do = int(next(args)) @@ -184,30 +197,30 @@ def main(): sudo = '' if root == '/': sudo = f'sudo PATH={os.environ["PATH"]} ' - def run(command): - return run_command(command, doit=mupdf_do) + def run(command, env_extra=None): + return run_command(command, doit=mupdf_do, env_extra=env_extra) # Get MuPDF from git if specified. # if mupdf_git: # Update existing checkout or do `git clone`. if os.path.exists(mupdf_dir): - print(f'## Update MuPDF checkout {mupdf_dir}.') + log(f'## Update MuPDF checkout {mupdf_dir}.') run(f'cd {mupdf_dir} && git pull && git submodule update --init') else: # No existing git checkout, so do a fresh clone. - print(f'## Clone MuPDF into {mupdf_dir}.') + log(f'## Clone MuPDF into {mupdf_dir}.') run(f'git clone --recursive --depth 1 --shallow-submodules {mupdf_git} {mupdf_dir}') if packages: # Install required system packages. We assume a Debian package system. # - print('## Install system packages required by MuPDF.') + log('## Install system packages required by MuPDF.') run(f'sudo apt update') run(f'sudo apt install {" ".join(g_sys_packages)}') # Ubuntu-22.04 has freeglut3-dev, not libglut-dev. run(f'sudo apt install libglut-dev | sudo apt install freeglut3-dev') if tesseract5: - print(f'## Force installation of libtesseract-dev version 5.') + log(f'## Force installation of libtesseract-dev version 5.') # https://stackoverflow.com/questions/76834972/how-can-i-run-pytesseract-python-library-in-ubuntu-22-04 # run('sudo apt install -y software-properties-common') @@ -220,12 +233,24 @@ def run(command): # Build+install MuPDF. We use mupd:Makefile's install-shared-python target. # if pip == 'sudo': - print('## Installing Python packages required for building MuPDF and PyMuPDF.') - run(f'sudo pip install --upgrade pip') + log('## Installing Python packages required for building MuPDF and PyMuPDF.') + #run(f'sudo pip install --upgrade pip') # Breaks on Github see: https://github.com/pypa/get-pip/issues/226. + # We need to install psutil and pillow as system packages, otherwise things like `import psutil` + # fail, seemingly because of pip warning: + # + # WARNING: Running pip as the 'root' user can result in broken + # permissions and conflicting behaviour with the system package + # manager. It is recommended to use a virtual environment instead: + # https://pip.pypa.io/warnings/venv + # names = test_py.wrap_get_requires_for_build_wheel(f'{__file__}/../..') + names = names.split(' ') + names = [n for n in names if n not in ('psutil', 'pillow')] + names = ' '.join(names) run(f'sudo pip install {names}') + run(f'sudo apt install python3-psutil python3-pillow') - print('## Build and install MuPDF.') + log('## Build and install MuPDF.') command = f'cd {mupdf_dir}' command += f' && {sudo}make' command += f' -j {multiprocessing.cpu_count()}' @@ -234,6 +259,9 @@ def run(command): command += f' HAVE_LEPTONICA=yes' command += f' HAVE_TESSERACT=yes' command += f' USE_SYSTEM_LIBS=yes' + # We need latest zxingcpp so system version not ok. + command += f' USE_SYSTEM_ZXINGCPP=no' + command += f' barcode=yes' command += f' VENV_FLAG={"--venv" if pip == "venv" else ""}' if mupdf_so_mode: command += f' SO_INSTALL_MODE={mupdf_so_mode}' @@ -246,10 +274,10 @@ def run(command): # Build+install PyMuPDF. # - print('## Build and install PyMuPDF.') + log('## Build and install PyMuPDF.') def run(command): return run_command(command, doit=pymupdf_do) - flags_freetype2 = run_command('pkg-config --cflags freetype2', capture_output=1).stdout.strip() + flags_freetype2 = run_command('pkg-config --cflags freetype2', capture=1) compile_flags = f'-I {root_prefix}/include {flags_freetype2}' link_flags = f'-L {root_prefix}/lib' env = '' @@ -258,7 +286,7 @@ def run(command): env += f'LDFLAGS="-L {root}/{prefix}/lib" ' env += f'PYMUPDF_SETUP_MUPDF_BUILD= ' # Use system MuPDF. if use_installer: - print(f'## Building wheel.') + log(f'## Building wheel.') if pip == 'venv': venv_name = 'venv-pymupdf-sysinstall' run(f'pwd') @@ -269,7 +297,7 @@ def run(command): run(f'. {venv_name}/bin/activate && pip install --upgrade installer') run(f'{env} {venv_name}/bin/python -m pip wheel -vv -w dist {os.path.abspath(pymupdf_dir)}') elif pip == 'sudo': - run(f'sudo pip install --upgrade pip') + #run(f'sudo pip install --upgrade pip') # Breaks on Github see: https://github.com/pypa/get-pip/issues/226. run(f'sudo pip install installer') run(f'{env} pip wheel -vv -w dist {os.path.abspath(pymupdf_dir)}') else: @@ -277,7 +305,7 @@ def run(command): wheel = glob.glob(f'dist/*') assert len(wheel) == 1, f'{wheel=}' wheel = wheel[0] - print(f'## Installing wheel using `installer`.') + log(f'## Installing wheel using `installer`.') pv = '.'.join(platform.python_version_tuple()[:2]) p = f'{root_prefix}/lib/python{pv}' # `python -m installer` fails to overwrite existing files. @@ -285,7 +313,7 @@ def run(command): run(f'{sudo}rm -r {p}/site-packages/pymupdf.py || true') run(f'{sudo}rm -r {p}/site-packages/fitz || true') run(f'{sudo}rm -r {p}/site-packages/fitz.py || true') - run(f'{sudo}rm -r {p}/site-packages/PyMuPDF-*.dist-info || true') + run(f'{sudo}rm -r {p}/site-packages/pymupdf-*.dist-info || true') run(f'{sudo}rm -r {root_prefix}/bin/pymupdf || true') if pip == 'venv': run(f'{sudo}{venv_name}/bin/python -m installer --destdir {root} --prefix {prefix} {wheel}') @@ -315,13 +343,10 @@ def run(command): if leaf in dirnames: pythonpath.append(os.path.join(dirpath, leaf)) pythonpath = ':'.join(pythonpath) - print(f'{pythonpath=}') + log(f'{pythonpath=}') else: command = f'{env} pip install -vv --root {root} {os.path.abspath(pymupdf_dir)}' run( command) - sys.path.insert(0, pymupdf_dir) - import pipcl - del sys.path[0] pythonpath = pipcl.install_dir(root) # Show contents of installation directory. This is very slow on github, @@ -330,9 +355,9 @@ def run(command): # Run pytest tests. # - print('## Run PyMuPDF pytest tests.') - def run(command): - return run_command(command, doit=pytest_do) + log('## Run PyMuPDF pytest tests.') + def run(command, env_extra=None): + return run_command(command, doit=pytest_do, env_extra=env_extra, caller=1) import gh_release if pip == 'venv': # Create venv. @@ -343,7 +368,11 @@ def run(command): command += f' && pip install --upgrade {gh_release.test_packages}' run(command) elif pip == 'sudo': - run(f'sudo pip install --upgrade {gh_release.test_packages}') + names = gh_release.test_packages + names = names.split(' ') + names = [n for n in names if n not in ('psutil', 'pillow')] + names = ' '.join(names) + run(f'sudo pip install --upgrade {names}') else: log(f'Not installing packages for testing because {pip=}.') # Run pytest. @@ -359,6 +388,8 @@ def run(command): # 2024-03-20: Not sure whether/where `pymupdf` binary is installed, so we # disable the test_cli* tests. command += f' {pymupdf_dir}/scripts/test.py' + if gdb: + command += ' --gdb 1' command += f' -v 0' if pytest_name is None: excluded_tests = ( @@ -369,6 +400,7 @@ def run(command): 'test_pylint', 'test_textbox3', 'test_3493', + 'test_4180', ) excluded_tests = ' and not '.join(excluded_tests) if not pytest_args: @@ -384,16 +416,14 @@ def run(command): command += f' -p {shlex.quote(pytest_args)}' if pytest_do: command += ' test' - run(command) + run(command, env_extra=dict(PYMUPDF_SYSINSTALL_TEST='1')) -def run_command(command, capture_output=False, check=True, doit=True): +def run_command(command, capture=False, check=True, doit=True, env_extra=None, caller=0): if doit: - print(f'## Running: {command}') - sys.stdout.flush() - return subprocess.run(command, shell=1, check=check, text=1, capture_output=capture_output) + return pipcl.run(command, capture=capture, check=check, caller=caller+2, env_extra=env_extra) else: - print(f'## Would have run: {command}') + log(f'## Would have run: {command}', caller=2) if __name__ == '__main__': diff --git a/scripts/test.py b/scripts/test.py index 44f813fa6..8c175c00a 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -4,134 +4,410 @@ Examples: - ./PyMuPDF/scripts/test.py --mupdf mupdf buildtest + ./PyMuPDF/scripts/test.py -m mupdf build test Build and test with pre-existing local mupdf/ checkout. - ./PyMuPDF/scripts/test.py buildtest + ./PyMuPDF/scripts/test.py build test Build and test with default internal download of mupdf. - ./PyMuPDF/scripts/test.py --mupdf 'git:https://git.ghostscript.com/mupdf.git' buildtest - Build and test with internal checkout of mupdf master. + ./PyMuPDF/scripts/test.py -m 'git:https://git.ghostscript.com/mupdf.git' build test + Build and test with internal checkout of MuPDF master. - ./PyMuPDF/scripts/test.py --mupdf 'git:--branch 1.24.x https://github.com/ArtifexSoftware/mupdf.git' buildtest - Build and test using internal checkout of mupdf 1.24.x branch from Github. + ./PyMuPDF/scripts/test.py -m ':1.26.x' build test + Build and test using internal checkout of mupdf 1.26.x branch from + Github. -Usage: - scripts/test.py + ./PyMuPDF/scripts/test.py install test -i 1.26.3 -k test_2596 + Install pymupdf-1.26.3 from pupi.org and test only test_2596. -* Commands are handled in order, so for example `build` should usually be - before `test`. +Usage: -* If we are not already running inside a Python venv, we automatically create a - venv and re-run ourselves inside it. +* Command line arguments are called parameters if they start with `-`, + otherwise they are called commands. +* Parameters are evaluated first in the order that they were specified. +* Then commands are run in the order in which they were specified. +* Usually command `test` would be specified after a `build`, `install` or + `wheel` command. +* Parameters and commands can be interleaved but it may be clearer to separate + them on the command line. -* We build directly with pip (unlike gh_release.py, which builds with - cibuildwheel). +Other: +* If we are not already running inside a Python venv, we automatically create a + venv and re-run ourselves inside it (also see the -v option). +* Build/wheel/install commands always install into the venv. +* Tests use whatever PyMuPDF/MuPDF is currently installed in the venv. * We run tests with pytest. * One can generate call traces by setting environment variables in debug builds. For details see: https://mupdf.readthedocs.io/en/latest/language-bindings.html#environmental-variables -Options: - --help - -h - Show help. +Command line args: + + -a + Read next space-separated argument(s) from environmental variable + . + * Does nothing if is unset. + * Useful when running via Github action. + -b - Set build type for `build` or `buildtest` commands. `` should - be one of 'release', 'debug', 'memento'. [This makes `build` set - environment variable `PYMUPDF_SETUP_MUPDF_BUILD_TYPE`, which is used by - PyMuPDF's `setup.py`.] + Set build type for `build` commands. `` should be one of + 'release', 'debug', 'memento'. [This makes `build` set environment + variable `PYMUPDF_SETUP_MUPDF_BUILD_TYPE`, which is used by PyMuPDF's + `setup.py`.] + + --build-flavour + [Obsolete.] + Combination of 'p', 'b', 'd'. See ../setup.py's description of + PYMUPDF_SETUP_FLAVOUR. Default is 'pbd', i.e. self-contained PyMuPDF + wheels including MuPDF build-time files. + + --build-isolation 0|1 + If true (the default on non-OpenBSD systems), we let pip create and use + its own new venv to build PyMuPDF. Otherwise we force pip to use the + current venv. + + --cibw-archs-linux + Set CIBW_ARCHS_LINUX, e.g. to `auto64 aarch64`. Default is `auto64` so + this allows control over whether to build linux-aarch64 wheels. + + --cibw-name + Name to use when installing cibuildwheel, e.g.: + --cibw-name cibuildwheel==3.0.0b1 + --cibw-name git+https://github.com/pypa/cibuildwheel + Default is `cibuildwheel`, i.e. the current release. + + --cibw-pyodide 0|1 + Experimental, make `cibw` command build a pyodide wheel. + 2025-05-27: this fails when building mupdf C API - `ld -r -b binary + ...` fails with: + emcc: error: binary: No such file or directory ("binary" was expected to be an input file, based on the commandline arguments provided) + + --cibw-pyodide-version + Override default Pyodide version to use with `cibuildwheel` command. If + empty string we use cibuildwheel's default. + + --cibw-release-1 + Set up so that `cibw` builds all wheels except linux-aarch64, and sdist + if on Linux. + + --cibw-release-2 + Set up so that `cibw` builds only linux-aarch64 wheel. + + --cibw-skip-add-defaults 0|1 + If 1 (the default) we add defaults to CIBW_SKIP such as `pp*` (to + exclude pypy) and `cp3??t-*` (to exclude free-threading). + + --cibw-test-project 0|1 + If 1, command `cibw` will use a minimal test project instead of the + PyMuPDF directory itself. + + The test project uses setjmp/longjmp and C++ throw/catch. + + The test checks for current behaviour, so with `--cibw-pyodide 1` it + succeeds if the cibw command fails with the expected error message. + + 2025-08-22: + Builds ok on Linux. + + Fails at runtime with --cibw-pyodide 1: + + With compile/link flags ``: + (+45.0s): remote.py:233:main: jules-devuan: Pyodide has suffered a fatal error. Please report this to the Pyodide maintainers. + (+45.1s): remote.py:233:main: jules-devuan: Stack (most recent call first): + (+45.1s): remote.py:233:main: jules-devuan: File "/tmp/cibw-run-h_pfo0wf/cp312-pyodide_wasm32/venv-test/lib/python3.12/site-packages/foo/__init__.py", line 63 in bar + (+45.1s): remote.py:233:main: jules-devuan: File "The cause of the fatal error was: + (+45.1s): remote.py:233:main: jules-devuan: CppException std::runtime_error: deliberate exception + (+45.1s): remote.py:233:main: jules-devuan: at convertCppException (/home/jules/.cache/cibuildwheel/pyodide-build-0.30.7/0.27.7/xbuildenv/pyodide-root/dist/pyodide.asm.js:10:48959) + (+45.1s): remote.py:233:main: jules-devuan: at API.fatal_error (/home/jules/.cache/cibuildwheel/pyodide-build-0.30.7/0.27.7/xbuildenv/pyodide-root/dist/pyodide.asm.js:10:49253) + (+45.1s): remote.py:233:main: jules-devuan: at main (file:///home/jules/.cache/cibuildwheel/pyodide-build-0.30.7/0.27.7/xbuildenv/pyodide-root/dist/python_cli_entry.mjs:149:13) { + (+45.1s): remote.py:233:main: jules-devuan: ty: 'std::runtime_error', + (+45.1s): remote.py:233:main: jules-devuan: pyodide_fatal_error: true + (+45.1s): remote.py:233:main: jules-devuan: } + (+45.1s): remote.py:233:main: jules-devuan: ", line 1 in + (+45.1s): remote.py:233:main: jules-devuan: CppException std::runtime_error: deliberate exception + (+45.1s): remote.py:233:main: jules-devuan: at convertCppException (/home/jules/.cache/cibuildwheel/pyodide-build-0.30.7/0.27.7/xbuildenv/pyodide-root/dist/pyodide.asm.js:10:48959) + (+45.1s): remote.py:233:main: jules-devuan: at API.fatal_error (/home/jules/.cache/cibuildwheel/pyodide-build-0.30.7/0.27.7/xbuildenv/pyodide-root/dist/pyodide.asm.js:10:49253) + (+45.1s): remote.py:233:main: jules-devuan: at main (file:///home/jules/.cache/cibuildwheel/pyodide-build-0.30.7/0.27.7/xbuildenv/pyodide-root/dist/python_cli_entry.mjs:149:13) { + (+45.1s): remote.py:233:main: jules-devuan: ty: 'std::runtime_error', + (+45.1s): remote.py:233:main: jules-devuan: pyodide_fatal_error: true + (+45.1s): remote.py:233:main: jules-devuan: } + + With compile/link flags `-fwasm-exceptions`: + [LinkError: WebAssembly.instantiate(): Import #60 module="env" function="__c_longjmp": tag import requires a WebAssembly.Tag] + + With compile/link flags `-fwasm-exceptions -sSUPPORT_LONGJMP=wasm`: + [LinkError: WebAssembly.instantiate(): Import #60 module="env" function="__c_longjmp": tag import requires a WebAssembly.Tag] + + --cibw-test-project-setjmp 0|1 + If 1, --cibw-test-project builds a project that uses + setjmp/longjmp. Default is 0 (Windows builds fail when attempting to + compile the output from swig). + -d - Equivalent to `--build-type debug`. + Equivalent to `-b debug`. + + --dummy + Sets PYMUPDF_SETUP_DUMMY=1 which makes setup.py build a dummy wheel + with no content. For internal testing only. + + -e = + Add to environment used in build and test commands. Can be specified + multiple times. + -f 0|1 If 1 we also test alias `fitz` as well as `pymupdf`. Default is '0'. - -i + + --graal + Use graal - run inside a Graal VM instead of a Python venv. + + As of 2025-08-04, if specified: + * We assert-fail if cibw and non-cibw commands are specified. + * If `cibw` is specified: + * We use a conventional venv. + * We set CIBW_ENABLE=graalpy. + * We set CIBW_BUILD = 'gp*'. + * Otherwise: + * We don't create a conventional venv. + * Clone the latest pyenv and build it. + * Use pyenv to install graalpy. + * Use graalpy to create venv. + + [After the first time, suggest `-v 1` to avoid delay from + updating/building pyenv and recreating the graal venv.] + + --help + -h + Show help. + + -I Set PyMuPDF implementations to test. must contain only these individual characters: 'r' - rebased. 'R' - rebased without optimisations. Default is 'r'. Also see `PyMuPDF:tests/run_compound.py`. + + -i + Controls behaviour of `install` command: + + * If ends with `.whl` we use `pip install + `. + * If starts with == or >= or >, we use `pip install + pymupdf`. + * Otherwise we use `pip install pymupdf==`. + -k - Select which test(s) to run; passed straight through to pytest's `-k`. + Specify which test(s) to run; passed straight through to pytest's `-k`. + For example `-k test_3354`. + -m | --mupdf - Location of local mupdf/ directory or 'git:...' to be used - when building PyMuPDF. [This sets environment variable - PYMUPDF_SETUP_MUPDF_BUILD, which is used by PyMuPDF/setup.py. If not - specified PyMuPDF will download its default mupdf .tgz.] + Location of mupdf as local directory or remote git, to be used when + building PyMuPDF. + + This sets environment variable PYMUPDF_SETUP_MUPDF_BUILD, which is used + by PyMuPDF/setup.py. If not specified PyMuPDF will download its default + mupdf .tgz. + + Additionally if starts with ':' we use the remaining text as + the branch name and add https://github.com/ArtifexSoftware/mupdf.git. + + For example: + + -m "git:--branch master https://github.com/ArtifexSoftware/mupdf.git" + -m :master + + -m "git:--branch 1.26.x https://github.com/ArtifexSoftware/mupdf.git" + -m :1.26.x + + --mupdf-clean 0|1 + If 1 we do a clean MuPDF build. + + -M 0|1 + --build-mupdf 0|1 + Whether to rebuild mupdf when we build PyMuPDF. Default is 1. + + -o + Control whether we do nothing on the current platform. + * is a comma-separated list of names. + * If is empty (the default), we always run normally. + * Otherwise we only run if an item in matches (case + insensitive) platform.system(). + * For example `-o linux,darwin` will do nothing unless on Linux or + MacOS. + -p Set pytest options; default is ''. + + -P 0|1 + If 1, automatically install required system packages such as + Valgrind. Default is 1 if running as Github action, otherwise 0. + + --pybind 0|1 + Experimental, for investigating + https://github.com/pymupdf/PyMuPDF/issues/3869. Runs run basic code + inside C++ pybind. Requires `sudo apt install pybind11-dev` or similar. + + --pyodide-build-version + Version of Python package pyodide-build to use with `pyodide` command. + + If None (the default) `pyodide` uses the latest available version. + 2025-02-13: pyodide_build_version='0.29.3' works. + -s 0 | 1 If 1 (the default), build with Python Limited API/Stable ABI. + [This simply sSets $PYMUPDF_SETUP_PY_LIMITED_API, which is used by + PyMuPDF/setup.py.] + + --show-args: + Show sys.argv and exit. For debugging. + + --sync-paths + Do not run anything, instead write required files/directories/checkouts + to , one per line. This is to help with automated running on + remote machines. + + --system-site-packages 0|1 + If 1, use `--system-site-packages` when creating venv. Defaults is 0. + + --swig + Use instead of the `swig` command. + + Unix only: + Clone/update/build swig from a git repository using 'git:' prefix. + + We default to https://github.com/swig/swig.git branch master, so these + are all equivalent: + + --swig 'git:--branch master https://github.com/swig/swig.git' + --swig 'git:--branch master' + --swig git: + + 2025-08-18: This fixes building with py_limited_api on python-3.13. + + --swig-quick 0|1 + If 1 and `--swig` starts with 'git:', we do not update/build swig if + already present. + + See description of PYMUPDF_SETUP_SWIG_QUICK in setup.py. + -t Pytest test names, comma-separated. Should be relative to PyMuPDF directory. For example: -t tests/test_general.py - -t tests/test_general.py::test_subset_fonts. + -t tests/test_general.py::test_subset_fonts To specify multiple tests, use comma-separated list and/or multiple `-t ` args. - -v 0|1|2 + + --timeout + Sets timeout when running tests. + + -T + Use specified prefix when running pytest, must be one of: + gdb + helgrind + valgrind + + -v + venv is: 0 - do not use a venv. 1 - Use venv. If it already exists, we assume the existing directory was created by us earlier and is a valid venv containing all necessary packages; this saves a little time. - 2 - use venv. + 2 - Use venv. + 3 - Use venv but delete it first if it already exists. The default is 2. - --build-isolation 0|1 - If true (the default on non-OpenBSD systems), we let pip create and use - its own new venv to build PyMuPDF. Otherwise we force pip to use the - current venv. - --build-flavour - Combination of 'p', 'b', 'd'. See ../setup.py's description of - PYMUPDF_SETUP_FLAVOUR. Default is 'pb', i.e. self-contained PyMuPDF - wheels without MuPDF build-time files. - --build-mupdf 0|1 - Whether to rebuild mupdf when we build PyMuPDF. Default is 1. - --gdb 0|1 - Run tests under gdb. - --system-site-packages 0|1 - If 1, use `--system-site-packages` when creating venv. - --timeout - Sets timeout when running tests. - --valgrind 0|1 - Use valgrind in `test` or `buildtest`. - This will run `sudo apt update` and `sudo apt install valgrind`. - + Commands: + build Builds and installs PyMuPDF into venv, using `pip install .../PyMuPDF`. + buildtest Same as 'build test'. - test - Runs PyMuPDF's pytest tests in venv. Default is to test rebased and - unoptimised rebased; use `-i` to change this. - wheel - Build wheel. - pyodide_wheel + + cibw + Build and test PyMuPDF wheel(s) using cibuildwheel. Wheels are placed + in directory `wheelhouse`. + * We do not attempt to install wheels. + * So it is generally not useful to do `cibw test`. + + If CIBW_BUILD is unset, we set it as follows: + * On Github we build and test all supported Python versions. + * Otherwise we build and test the current Python version only. + + If CIBW_ARCHS is unset we set $CIBW_ARCHS_WINDOWS, $CIBW_ARCHS_MACOS + and $CIBW_ARCHS_LINUX to auto64 if they are unset. + + install + Install with `pip install --force-reinstall `. + + pyodide Build Pyodide wheel. We clone `emsdk.git`, set it up, and run `pyodide build`. This runs our setup.py with CC etc set up to create Pyodide binaries in a wheel called, for example, `PyMuPDF-1.23.2-cp311-none-emscripten_3_1_32_wasm32.whl`. + + It seems that sys.version must match the Python version inside emsdk; + as of 2025-02-14 this is 3.12. Otherwise we get build errors such as: + [wasm-validator error in function 723] unexpected false: all used features should be allowed, on ... + + test + Runs PyMuPDF's pytest tests. Default is to test rebased and unoptimised + rebased; use `-i` to change this. + + wheel + Build and install wheel. + Environment: PYMUDF_SCRIPTS_TEST_options Is prepended to command line args. ''' -import gh_release - import glob import os import platform import re import shlex +import shutil import subprocess import sys import textwrap -pymupdf_dir = os.path.abspath( f'{__file__}/../..') +pymupdf_dir_abs = os.path.abspath( f'{__file__}/../..') + +try: + sys.path.insert(0, pymupdf_dir_abs) + import pipcl +finally: + del sys.path[0] + +try: + sys.path.insert(0, f'{pymupdf_dir_abs}/scripts') + import gh_release +finally: + del sys.path[0] + + +pymupdf_dir = pipcl.relpath(pymupdf_dir_abs) + +log = pipcl.log0 +run = pipcl.run + + +# We build and test Python 3.x for x in this range. +python_versions_minor = range(9, 14+1) + +def cibw_cp(*version_minors): + ''' + Returns in 'cp39*' format, e.g. suitable for CIBW_BUILD. + ''' + ret = list() + for version_minor in version_minors: + ret.append(f'cp3{version_minor}*') + return ' '.join(ret) def main(argv): @@ -139,30 +415,45 @@ def main(argv): if github_workflow_unimportant(): return - if len(argv) == 1: - show_help() - return - build_isolation = None - valgrind = False - s = True - build_do = 'i' - build_type = None - build_mupdf = True - build_flavour = 'pb' - gdb = False - test_fitz = False + cibw_name = None + cibw_pyodide = None + cibw_pyodide_version = None + cibw_skip_add_defaults = True + cibw_test_project = None + cibw_test_project_setjmp = False + commands = list() + env_extra = dict() + graal = False implementations = 'r' + install_version = None + mupdf_sync = None + os_names = list() + system_packages = True if os.environ.get('GITHUB_ACTIONS') == 'true' else False + pybind = False + pyodide_build_version = None + pytest_options = '' + pytest_prefix = None + cibw_sdist = None + show_args = False + show_help = False + sync_paths = False + system_site_packages = False + swig = None + swig_quick = None + test_fitz = False test_names = list() + test_timeout = None + valgrind = False + warnings = list() venv = 2 - pytest_options = None - timeout = None - pytest_k = None - system_site_packages = False options = os.environ.get('PYMUDF_SCRIPTS_TEST_options', '') options = shlex.split(options) + # Parse args and update the above state. We do this before moving into a + # venv, partly so we can return errors immediately. + # args = iter(options + argv[1:]) i = 0 while 1: @@ -171,119 +462,318 @@ def main(argv): except StopIteration: arg = None break - if not arg.startswith('-'): - break + + if 0: + pass + + elif arg == '-a': + _name = next(args) + _value = os.environ.get(_name, '') + _args = shlex.split(_value) + list(args) + args = iter(_args) + elif arg == '-b': - build_type = next(args) + env_extra['PYMUPDF_SETUP_MUPDF_BUILD_TYPE'] = next(args) + + elif arg == '--build-flavour': + env_extra['PYMUPDF_SETUP_FLAVOUR'] = next(args) + elif arg == '--build-isolation': build_isolation = int(next(args)) + + elif arg == '--cibw-pyodide-version': + cibw_pyodide_version = next(args) + + elif arg == '--cibw-release-1': + cibw_sdist = True + env_extra['CIBW_ARCHS_LINUX'] = 'auto64' + env_extra['CIBW_ARCHS_MACOS'] = 'auto64' + env_extra['CIBW_ARCHS_WINDOWS'] = 'auto' # win32 and win64. + env_extra['CIBW_SKIP'] = '*i686 *musllinux*aarch64* cp3??t-*' + cibw_skip_add_defaults = 0 + + elif arg == '--cibw-release-2': + # Testing only first and last python versions because otherwise + # Github times out after 6h. + env_extra['CIBW_BUILD'] = cibw_cp(python_versions_minor[0], python_versions_minor[-1]) + env_extra['CIBW_ARCHS_LINUX'] = 'aarch64' + env_extra['CIBW_SKIP'] = '*i686 *musllinux*aarch64* cp3??t-*' + cibw_skip_add_defaults = 0 + os_names = ['linux'] + + elif arg == '--cibw-archs-linux': + env_extra['CIBW_ARCHS_LINUX'] = next(args) + + elif arg == '--cibw-name': + cibw_name = next(args) + + elif arg == '--cibw-pyodide': + cibw_pyodide = int(next(args)) + + elif arg == '--cibw-skip-add-defaults': + cibw_skip_add_defaults = int(next(args)) + + elif arg == '--cibw-test-project': + cibw_test_project = int(next(args)) + + elif arg == '--cibw-test-project-setjmp': + cibw_test_project_setjmp = int(next(args)) + elif arg == '-d': - build_type = 'debug' + env_extra['PYMUPDF_SETUP_MUPDF_BUILD_TYPE'] = 'debug' + + elif arg == '--dummy': + env_extra['PYMUPDF_SETUP_DUMMY'] = '1' + env_extra['CIBW_TEST_COMMAND'] = '' + + elif arg == '-e': + _nv = next(args) + assert '=' in _nv, f'-e = does not contain "=": {_nv!r}' + _name, _value = _nv.split('=', 1) + env_extra[_name] = _value + elif arg == '-f': test_fitz = int(next(args)) + + elif arg == '--graal': + graal = True + elif arg in ('-h', '--help'): - show_help() - return + show_help = True + elif arg == '-i': + install_version = next(args) + + elif arg == '-I': implementations = next(args) - elif arg in ('--mupdf', '-m'): - mupdf = next(args) - if not mupdf.startswith('git:'): - assert os.path.isdir(mupdf), f'Not a directory: {mupdf=}.' - mupdf = os.path.abspath(mupdf) - os.environ['PYMUPDF_SETUP_MUPDF_BUILD'] = mupdf + elif arg == '-k': - pytest_k = next(args) + pytest_options += f' -k {shlex.quote(next(args))}' + + elif arg in ('-m', '--mupdf'): + _mupdf = next(args) + if _mupdf == '-': + _mupdf = None + elif _mupdf.startswith(':'): + _branch = _mupdf[1:] + _mupdf = f'git:--branch {_branch} https://github.com/ArtifexSoftware/mupdf.git' + env_extra['PYMUPDF_SETUP_MUPDF_BUILD'] = _mupdf + elif _mupdf.startswith('git:') or '://' in _mupdf: + env_extra['PYMUPDF_SETUP_MUPDF_BUILD'] = _mupdf + else: + assert os.path.isdir(_mupdf), f'Not a directory: {_mupdf=}' + env_extra['PYMUPDF_SETUP_MUPDF_BUILD'] = os.path.abspath(_mupdf) + mupdf_sync = _mupdf + + elif arg == '--mupdf-clean': + env_extra['PYMUPDF_SETUP_MUPDF_CLEAN']=next(args) + + elif arg in ('-M', '--build-mupdf'): + env_extra['PYMUPDF_SETUP_MUPDF_REBUILD'] = next(args) + + elif arg == '-o': + os_names += next(args).split(',') + elif arg == '-p': - pytest_options = next(args) + pytest_options += f' {next(args)}' + + elif arg == '-P': + system_packages = int(next(args)) + + elif arg == '--pybind': + pybind = int(next(args)) + + elif arg == '--pyodide-build-version': + pyodide_build_version = next(args) + elif arg == '-s': - value = next(args) - assert value in ('0', '1'), f'`-s` must be followed by `0` or `1`, not {value=}.' - os.environ['PYMUPDF_SETUP_PY_LIMITED_API'] = value + _value = next(args) + assert _value in ('0', '1'), f'`-s` must be followed by `0` or `1`, not {_value=}.' + env_extra['PYMUPDF_SETUP_PY_LIMITED_API'] = _value + + elif arg == '--show-args': + show_args = 1 + elif arg == '--sync-paths': + sync_paths = next(args) + elif arg == '--system-site-packages': system_site_packages = int(next(args)) + + elif arg == '--swig': + swig = next(args) + + elif arg == '--swig-quick': + swig_quick = int(next(args)) + elif arg == '-t': test_names += next(args).split(',') + elif arg == '--timeout': - timeout = float(next(args)) + test_timeout = float(next(args)) + + elif arg == '-T': + pytest_prefix = next(args) + assert pytest_prefix in ('gdb', 'helgrind', 'valgrind'), \ + f'Unrecognised {pytest_prefix=}, should be one of: gdb valgrind helgrind.' + elif arg == '-v': venv = int(next(args)) - elif arg == '--build-flavour': - build_flavour = next(args) - elif arg == '--build-mupdf': - build_mupdf = int(next(args)) - elif arg == '--gdb': - gdb = int(next(args)) - elif arg == '--valgrind': - valgrind = int(next(args)) + assert venv in (0, 1, 2, 3), f'Invalid {venv=} should be 0, 1, 2 or 3.' + + elif arg in ('build', 'cibw', 'install', 'pyodide', 'test', 'wheel'): + commands.append(arg) + + elif arg == 'buildtest': + commands += ['build', 'test'] + else: - assert 0, f'Unrecognised option: {arg=}.' + assert 0, f'Unrecognised option/command: {arg=}.' - if arg is None: - log(f'No command specified.') + # Handle special args --sync-paths, -h, -v, -o first. + # + if sync_paths: + # Print required files, directories and checkouts. + with open(sync_paths, 'w') as f: + print(pymupdf_dir, file=f) + if mupdf_sync: + print(mupdf_sync, file=f) + return + + if show_help: + print(__doc__) return - commands = list() - while 1: - assert arg in ('build', 'buildtest', 'test', 'wheel', 'pyodide_wheel'), \ - f'Unrecognised command: {arg=}.' - commands.append(arg) - try: - arg = next(args) - except StopIteration: - break + if show_args: + print(f'sys.argv ({len(sys.argv)}):') + for arg in sys.argv: + print(f' {arg!r}') + return - venv_quick = (venv==1) + if os_names: + if platform.system().lower() not in os_names: + log(f'Not running because {platform.system().lower()=} not in {os_names=}') + return - # Run inside a venv. - if venv and sys.prefix == sys.base_prefix: - # We are not running in a venv. - log(f'Re-running in venv {gh_release.venv_name!r}.') - gh_release.venv( - ['python'] + argv, - quick=venv_quick, - system_site_packages=system_site_packages, - ) - return - - def do_build(wheel=False): - build( - build_type=build_type, - build_isolation=build_isolation, - venv_quick=venv_quick, - build_mupdf=build_mupdf, - build_flavour=build_flavour, - wheel=wheel, - ) - def do_test(): - test( - implementations=implementations, - valgrind=valgrind, - venv_quick=venv_quick, - test_names=test_names, - pytest_options=pytest_options, - timeout=timeout, - gdb=gdb, - test_fitz=test_fitz, - pytest_k=pytest_k, - ) + if commands: + if venv: + # Rerun ourselves inside a venv if not already in a venv. + if not venv_in(): + if graal: + if 'cibw' in commands: + # We don't create graal/pyenv so wheel/build commands + # will not work. + assert 'wheel' not in commands + assert 'build' not in commands + if graal and 'cibw' not in commands: + # 2025-07-24: We need the latest pyenv. + graalpy = 'graalpy-24.2.1' + venv_name = f'venv-pymupdf-{graalpy}' + pyenv_dir = f'{pymupdf_dir_abs}/pyenv-git' + os.environ['PYENV_ROOT'] = pyenv_dir + os.environ['PATH'] = f'{pyenv_dir}/bin:{os.environ["PATH"]}' + os.environ['PIPCL_GRAAL_PYTHON'] = sys.executable + + if venv >= 3: + shutil.rmtree(venv_name, ignore_errors=1) + if venv == 1 and os.path.exists(pyenv_dir) and os.path.exists(venv_name): + log(f'{venv=} and {venv_name=} already exists so not building pyenv or creating venv.') + else: + pipcl.git_get(pyenv_dir, remote='https://github.com/pyenv/pyenv.git', branch='master') + run(f'cd {pyenv_dir} && src/configure && make -C src') + run(f'which pyenv') + run(f'pyenv install -v -s {graalpy}') + run(f'{pyenv_dir}/versions/{graalpy}/bin/graalpy -m venv {venv_name}') + e = run(f'. {venv_name}/bin/activate && python {shlex.join(sys.argv)}', + check=False, + ) + else: + venv_name = f'venv-pymupdf-{platform.python_version()}-{int.bit_length(sys.maxsize+1)}' + e = venv_run( + sys.argv, + venv_name, + recreate=(venv>=2), + clean=(venv>=3), + ) + sys.exit(e) + else: + log(f'Warning, no commands specified so nothing to do.') + # Clone/update/build swig if specified. + swig_binary = pipcl.swig_get(swig, swig_quick) + if swig_binary: + os.environ['PYMUPDF_SETUP_SWIG'] = swig_binary + + # Handle commands. + # + have_installed = False for command in commands: + log(f'### {command=}.') if 0: pass - elif command == 'build': - do_build() + + elif command in ('build', 'wheel'): + build( + env_extra, + build_isolation=build_isolation, + venv=venv, + wheel=(command=='wheel'), + ) + have_installed = True + + elif command == 'cibw': + # Build wheel(s) with cibuildwheel. + + if platform.system() == 'Linux': + PYMUPDF_SETUP_MUPDF_BUILD = env_extra.get('PYMUPDF_SETUP_MUPDF_BUILD') + if PYMUPDF_SETUP_MUPDF_BUILD and not PYMUPDF_SETUP_MUPDF_BUILD.startswith('git:'): + assert PYMUPDF_SETUP_MUPDF_BUILD.startswith('/') + env_extra['PYMUPDF_SETUP_MUPDF_BUILD'] = f'/host/{PYMUPDF_SETUP_MUPDF_BUILD}' + + cibuildwheel( + env_extra, + cibw_name or 'cibuildwheel', + cibw_pyodide, + cibw_pyodide_version, + cibw_sdist, + cibw_test_project, + cibw_test_project_setjmp, + cibw_skip_add_defaults, + graal, + ) + + elif command == 'install': + p = 'pymupdf' + if install_version: + if install_version.endswith('.whl'): + p = install_version + elif install_version.startswith(('==', '>=', '>')): + p = f'{p}{install_version}' + else: + p = f'{p}=={install_version}' + run(f'pip install --force-reinstall {p}') + have_installed = True + elif command == 'test': - do_test() - elif command == 'buildtest': - do_build() - do_test() - elif command == 'wheel': - do_build(wheel=True) - elif command == 'pyodide_wheel': - build_pyodide_wheel() + if not have_installed: + log(f'## Warning: have not built/installed PyMuPDF; testing whatever is already installed.') + test( + env_extra=env_extra, + implementations=implementations, + test_names=test_names, + pytest_options=pytest_options, + test_timeout=test_timeout, + pytest_prefix=pytest_prefix, + test_fitz=test_fitz, + pybind=pybind, + system_packages=system_packages, + venv=venv, + ) + + elif command == 'pyodide': + build_pyodide_wheel(pyodide_build_version=pyodide_build_version) + else: - assert 0 + assert 0, f'{command=}' def get_env_bool(name, default=0): @@ -350,26 +840,13 @@ def venv_info(pytest_args=None): def build( - build_type=None, - build_isolation=None, - venv_quick=False, - build_mupdf=True, - build_flavour='pb', - wheel=False, + env_extra, + *, + build_isolation, + venv, + wheel, ): - ''' - Args: - build_type: - See top-level option `-b`. - build_isolation: - See top-level option `--build-isolation`. - venv_quick: - See top-level option `-v`. - build_mupdf: - See top-level option `build-mupdf` - ''' - print(f'{build_type=}') - print(f'{build_isolation=}') + log(f'{build_isolation=}') if build_isolation is None: # On OpenBSD libclang is not available on pypi.org, so we need to force @@ -390,26 +867,307 @@ def build( del sys.path[0] if names: names = ' '.join(names) - if venv_quick: - log(f'{venv_quick=}: Not installing packages with pip: {names}') + if venv == 2: + run( f'python -m pip install --upgrade {names}') else: - gh_release.run( f'python -m pip install --upgrade {names}') + log(f'{venv=}: Not installing packages with pip: {names}') build_isolation_text = ' --no-build-isolation' - env_extra = dict() - if not build_mupdf: - env_extra['PYMUPDF_SETUP_MUPDF_REBUILD'] = '0' - if build_type: - env_extra['PYMUPDF_SETUP_MUPDF_BUILD_TYPE'] = build_type - if build_flavour: - env_extra['PYMUPDF_SETUP_FLAVOUR'] = build_flavour if wheel: - gh_release.run(f'pip wheel{build_isolation_text} -v {pymupdf_dir}', env_extra=env_extra) + new_files = pipcl.NewFiles(f'wheelhouse/*.whl') + run(f'pip wheel{build_isolation_text} -w wheelhouse -v {pymupdf_dir_abs}', env_extra=env_extra) + wheel = new_files.get_one() + run(f'pip install --force-reinstall {wheel}') else: - gh_release.run(f'pip install{build_isolation_text} -v {pymupdf_dir}', env_extra=env_extra) + run(f'pip install{build_isolation_text} -v --force-reinstall {pymupdf_dir_abs}', env_extra=env_extra) + + +def cibuildwheel( + env_extra, + cibw_name, + cibw_pyodide, + cibw_pyodide_version, + cibw_sdist, + cibw_test_project, + cibw_test_project_setjmp, + cibw_skip_add_defaults, + graal, + ): + + if cibw_sdist and platform.system() == 'Linux': + log(f'Building sdist.') + run(f'cd {pymupdf_dir_abs} && {sys.executable} setup.py -d wheelhouse sdist', env_extra=env_extra) + sdists = glob.glob(f'{pymupdf_dir_abs}/wheelhouse/pymupdf-*.tar.gz') + log(f'{sdists=}') + assert sdists + + run(f'pip install --upgrade --force-reinstall {cibw_name}') + + # Some general flags. + if 'CIBW_BUILD_VERBOSITY' not in env_extra: + env_extra['CIBW_BUILD_VERBOSITY'] = '1' + + # Add default flags to CIBW_SKIP. + # 2025-10-07: `cp3??t-*` excludes free-threading, which currently breaks + # some tests. + + if cibw_skip_add_defaults: + CIBW_SKIP = env_extra.get('CIBW_SKIP', '') + CIBW_SKIP += ' *i686 *musllinux* *-win32 *-aarch64 cp3??t-*' + CIBW_SKIP = CIBW_SKIP.split() + CIBW_SKIP = sorted(list(set(CIBW_SKIP))) + CIBW_SKIP = ' '.join(CIBW_SKIP) + env_extra['CIBW_SKIP'] = CIBW_SKIP + + # Set what wheels to build, if not already specified. + if 'CIBW_ARCHS' not in env_extra: + if 'CIBW_ARCHS_WINDOWS' not in env_extra: + env_extra['CIBW_ARCHS_WINDOWS'] = 'auto64' + + if 'CIBW_ARCHS_MACOS' not in env_extra: + env_extra['CIBW_ARCHS_MACOS'] = 'auto64' + + if 'CIBW_ARCHS_LINUX' not in env_extra: + env_extra['CIBW_ARCHS_LINUX'] = 'auto64' + + # Tell cibuildwheel not to use `auditwheel` on Linux and MacOS, + # because it cannot cope with us deliberately having required + # libraries in different wheel - specifically in the PyMuPDF wheel. + # + # We cannot use a subset of auditwheel's functionality + # with `auditwheel addtag` because it says `No tags + # to be added` and terminates with non-zero. See: + # https://github.com/pypa/auditwheel/issues/439. + # + env_extra['CIBW_REPAIR_WHEEL_COMMAND_LINUX'] = '' + env_extra['CIBW_REPAIR_WHEEL_COMMAND_MACOS'] = '' + + # Tell cibuildwheel how to test PyMuPDF. + if 'CIBW_TEST_COMMAND' not in env_extra: + env_extra['CIBW_TEST_COMMAND'] = f'python {{project}}/scripts/test.py test' + + # Specify python versions. + CIBW_BUILD = env_extra.get('CIBW_BUILD') + log(f'{CIBW_BUILD=}') + if CIBW_BUILD is None: + if graal: + CIBW_BUILD = 'gp*' + env_extra['CIBW_ENABLE'] = 'graalpy' + elif cibw_pyodide: + # Using python-3.13 fixes problems with MuPDF's setjmp/longjmp. + CIBW_BUILD = 'cp313*' + elif os.environ.get('GITHUB_ACTIONS') == 'true': + # Build/test all supported Python versions. + CIBW_BUILD = cibw_cp(*python_versions_minor) + else: + # Build/test current Python only. + v = platform.python_version_tuple()[:2] + log(f'{v=}') + CIBW_BUILD = f'cp{"".join(v)}*' + log(f'Defaulting to {CIBW_BUILD=}.') + + cibw_pyodide_args = '' + if cibw_pyodide: + cibw_pyodide_args = ' --platform pyodide' + env_extra['HAVE_LIBCRYPTO'] = 'no' + env_extra['PYMUPDF_SETUP_MUPDF_TESSERACT'] = '0' + if cibw_pyodide_version: + # 2025-07-21: there is no --pyodide-version option so we set + # CIBW_PYODIDE_VERSION. + env_extra['CIBW_PYODIDE_VERSION'] = cibw_pyodide_version + env_extra['CIBW_ENABLE'] = 'pyodide-prerelease' + + # Pass all the environment variables we have set, to Linux docker. Note + # that this will miss any settings in the original environment. We have to + # add CIBW_BUILD explicitly because we haven't set it yet. + CIBW_ENVIRONMENT_PASS_LINUX = set(env_extra.keys()) + CIBW_ENVIRONMENT_PASS_LINUX.add('CIBW_BUILD') + CIBW_ENVIRONMENT_PASS_LINUX = sorted(list(CIBW_ENVIRONMENT_PASS_LINUX)) + CIBW_ENVIRONMENT_PASS_LINUX = ' '.join(CIBW_ENVIRONMENT_PASS_LINUX) + env_extra['CIBW_ENVIRONMENT_PASS_LINUX'] = CIBW_ENVIRONMENT_PASS_LINUX + + if cibw_test_project: + cibw_do_test_project( + env_extra, + CIBW_BUILD, + cibw_pyodide, + cibw_pyodide_args, + cibw_test_project_setjmp, + ) + return + + env_extra['CIBW_BUILD'] = CIBW_BUILD + run(f'cd {pymupdf_dir} && cibuildwheel{cibw_pyodide_args}', env_extra=env_extra, prefix='cibw: ') + run(f'ls -ld {pymupdf_dir}/wheelhouse/*') + + +def cibw_do_test_project( + env_extra, + CIBW_BUILD, + cibw_pyodide, + cibw_pyodide_args, + cibw_test_project_setjmp, + ): + testdir = f'{pymupdf_dir_abs}/cibw_test' + shutil.rmtree(testdir, ignore_errors=1) + os.mkdir(testdir) + with open(f'{testdir}/setup.py', 'w') as f: + f.write(textwrap.dedent(f''' + import shutil + import sys + import os + import pipcl + + def build(): + so_leaf = pipcl.build_extension( + name = 'foo', + path_i = 'foo.i', + outdir = 'build', + source_extra = 'qwerty.cpp', + py_limited_api = True, + ) + + return [ + ('build/foo.py', 'foo/__init__.py'), + (f'build/{{so_leaf}}', f'foo/'), + ] + + p = pipcl.Package( + name = 'pymupdf-test', + version = '1.2.3', + fn_build = build, + py_limited_api=True, + ) + + def get_requires_for_build_wheel(config_settings=None): + return ['swig'] + + build_wheel = p.build_wheel + build_sdist = p.build_sdist + + # Handle old-style setup.py command-line usage: + if __name__ == '__main__': + p.handle_argv(sys.argv) + ''')) + with open(f'{testdir}/foo.i', 'w') as f: + if cibw_test_project_setjmp: + f.write(textwrap.dedent(''' + %{ + #include + #include + #include + #include + #include -def build_pyodide_wheel(): + int qwerty(void); + + static sigjmp_buf jmpbuf; + static int bar0(const char* text) + { + printf("bar0(): text: %s\\n", text); + + int q = qwerty(); + printf("bar0(): q=%i\\n", q); + + int len = (int) strlen(text); + printf("bar0(): len=%i\\n", len); + printf("bar0(): calling longjmp().\\n"); + fflush(stdout); + longjmp(jmpbuf, 1); + assert(0); + } + int bar1(const char* text) + { + int ret = 0; + if (setjmp(jmpbuf) == 0) + { + ret = bar0(text); + } + else + { + printf("bar1(): setjmp() returned non-zero.\\n"); + throw std::runtime_error("deliberate exception"); + } + assert(0); + } + int bar(const char* text) + { + int ret = 0; + try + { + ret = bar1(text); + } + catch(std::exception& e) + { + printf("bar1(): received exception: %s\\n", e.what()); + } + return ret; + } + %} + int bar(const char* text); + ''')) + else: + f.write(textwrap.dedent(''' + %{ + #include + + #include + #include + #include + + int qwerty(void); + + int bar(const char* text) + { + qwerty(); + return strlen(text); + } + %} + int bar(const char* text); + ''')) + + with open(f'{testdir}/qwerty.cpp', 'w') as f: + f.write(textwrap.dedent(''' + #include + int qwerty(void) + { + printf("qwerty()\\n"); + return 3; + } + ''')) + + with open(f'{testdir}/pyproject.toml', 'w') as f: + f.write(textwrap.dedent(''' + [build-system] + # We define required packages in setup.py:get_requires_for_build_wheel(). + requires = [] + + # See pep-517. + # + build-backend = "setup" + backend-path = ["."] + ''')) + + shutil.copy2(f'{pymupdf_dir_abs}/pipcl.py', f'{testdir}/pipcl.py') + shutil.copy2(f'{pymupdf_dir_abs}/wdev.py', f'{testdir}/wdev.py') + + env_extra['CIBW_BUILD'] = CIBW_BUILD + CIBW_TEST_COMMAND = '' + if cibw_pyodide: + CIBW_TEST_COMMAND += 'pyodide xbuildenv search --all; ' + CIBW_TEST_COMMAND += 'python -c "import foo; foo.bar(\\"some text\\")"' + env_extra['CIBW_TEST_COMMAND'] = CIBW_TEST_COMMAND + #env_extra['CIBW_TEST_COMMAND'] = '' + + run(f'cd {testdir} && cibuildwheel --output-dir ../wheelhouse{cibw_pyodide_args}', + env_extra=env_extra, + prefix='cibw: ', + ) + run(f'ls -ldt {pymupdf_dir_abs}/wheelhouse/*') + + +def build_pyodide_wheel(pyodide_build_version=None): ''' Build Pyodide wheel. @@ -441,19 +1199,26 @@ def build_pyodide_wheel(): # current devuan pyodide-build is pyodide_build-0.23.4. # env_extra['PYMUPDF_SETUP_MUPDF_TESSERACT'] = '0' + setup = pyodide_setup(pymupdf_dir, pyodide_build_version=pyodide_build_version) + command = f'{setup} && echo "### Running pyodide build" && pyodide build --exports whole_archive' + + command = command.replace(' && ', '\n && ') - command = f'{pyodide_setup(pymupdf_dir)} && pyodide build --exports pyinit' - gh_release.run(command, env_extra=env_extra) + run(command, env_extra=env_extra) # Copy wheel into `wheelhouse/` so it is picked up as a workflow # artifact. # - gh_release.run(f'ls -l {pymupdf_dir}/dist/') - gh_release.run(f'mkdir -p {pymupdf_dir}/wheelhouse && cp -p {pymupdf_dir}/dist/* {pymupdf_dir}/wheelhouse/') - gh_release.run(f'ls -l {pymupdf_dir}/wheelhouse/') + run(f'ls -l {pymupdf_dir}/dist/') + run(f'mkdir -p {pymupdf_dir}/wheelhouse && cp -p {pymupdf_dir}/dist/* {pymupdf_dir}/wheelhouse/') + run(f'ls -l {pymupdf_dir}/wheelhouse/') -def pyodide_setup(directory, clean=False): +def pyodide_setup( + directory, + clean=False, + pyodide_build_version=None, + ): ''' Returns a command that will set things up for a pyodide build. @@ -463,23 +1228,35 @@ def pyodide_setup(directory, clean=False): clean: If true we create an entirely new environment. Otherwise we reuse any existing emsdk repository and venv. + pyodide_build_version: + Version of Python package pyodide-build; if None we use latest + available version. + 2025-02-13: pyodide_build_version='0.29.3' works. + + The returned command does the following: - * Clone emsdk repository to `pipcl_emsdk` if not already present. - * Create and activate a venv `pipcl_venv_pyodide` if not already present. + * Checkout latest emsdk from https://github.com/emscripten-core/emsdk.git: + * Clone emsdk repository to `emsdk` if not already present. + * Run `git pull -r` inside emsdk checkout. + * Create venv `venv_pyodide_` if not already present. + * Activate venv `venv_pyodide_`. * Install/upgrade package `pyodide-build`. * Run emsdk install scripts and enter emsdk environment. - * Replace emsdk/upstream/bin/wasm-opt - (https://github.com/pyodide/pyodide/issues/4048). Example usage in a build function: - command = pipcl_wasm.pyodide_setup() + command = pyodide_setup() command += ' && pyodide build --exports pyinit' subprocess.run(command, shell=1, check=1) ''' + + pv = platform.python_version_tuple()[:2] + assert pv == ('3', '12'), f'Pyodide builds need to be run with Python-3.12 but current Python is {platform.python_version()}.' command = f'cd {directory}' - # Clone emsdk. + # Clone/update emsdk. We always use the latest emsdk with `git pull`. + # + # 2025-02-13: this works: 2514ec738de72cebbba7f4fdba0cf2fabcb779a5 # dir_emsdk = 'emsdk' if clean: @@ -488,135 +1265,119 @@ def pyodide_setup(directory, clean=False): # important to remove it here. shutil.rmtree('.pyodide-xbuildenv', ignore_errors=1) if not os.path.exists(f'{directory}/{dir_emsdk}'): - command += f' && echo "### cloning emsdk.git"' + command += f' && echo "### Cloning emsdk.git"' command += f' && git clone https://github.com/emscripten-core/emsdk.git {dir_emsdk}' + command += f' && echo "### Updating checkout {dir_emsdk}"' + command += f' && (cd {dir_emsdk} && git pull -r)' + command += f' && echo "### Checkout {dir_emsdk} is:"' + command += f' && (cd {dir_emsdk} && git show -s --oneline)' # Create and enter Python venv. # - # 2024-10-11: we only work with python-3.11; later versions fail with - # pyodide-build==0.23.4 because `distutils` not available. - venv_pyodide = 'venv_pyodide_3.11' python = sys.executable - if sys.version_info[:2] != (3, 11): - log(f'Forcing use of python-3.11 because {sys.version=} is not 3.11.') - python = 'python3.11' + venv_pyodide = f'venv_pyodide_{sys.version_info[0]}.{sys.version_info[1]}' + if not os.path.exists( f'{directory}/{venv_pyodide}'): - command += f' && echo "### creating venv {venv_pyodide}"' + command += f' && echo "### Creating venv {venv_pyodide}"' command += f' && {python} -m venv {venv_pyodide}' command += f' && . {venv_pyodide}/bin/activate' - command += f' && echo "### running pip install ..."' - command += f' && python -m pip install --upgrade pip wheel pyodide-build==0.23.4' - #command += f' && python -m pip install --upgrade pip wheel pyodide-build' + command += f' && echo "### Installing Python packages."' + command += f' && python -m pip install --upgrade pip wheel pyodide-build' + if pyodide_build_version: + command += f'=={pyodide_build_version}' # Run emsdk install scripts and enter emsdk environment. # command += f' && cd {dir_emsdk}' command += ' && PYODIDE_EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version)' - command += ' && echo "### running ./emsdk install"' + command += ' && echo "### PYODIDE_EMSCRIPTEN_VERSION is: $PYODIDE_EMSCRIPTEN_VERSION"' + command += ' && echo "### Running ./emsdk install"' command += ' && ./emsdk install ${PYODIDE_EMSCRIPTEN_VERSION}' - command += ' && echo "### running ./emsdk activate"' + command += ' && echo "### Running ./emsdk activate"' command += ' && ./emsdk activate ${PYODIDE_EMSCRIPTEN_VERSION}' - command += ' && echo "### running ./emsdk_env.sh"' + command += ' && echo "### Running ./emsdk_env.sh"' command += ' && . ./emsdk_env.sh' # Need leading `./` otherwise weird 'Not found' error. - if 1: - # Make our returned command replace emsdk/upstream/bin/wasm-opt - # with a script that does nothing, otherwise the linker - # command fails after it has created the output file. See: - # https://github.com/pyodide/pyodide/issues/4048 - # - - def write( text, path): - with open( path, 'w') as f: - f.write( text) - os.chmod( path, 0o755) - - # Create a script that our command runs, that overwrites - # `emsdk/upstream/bin/wasm-opt`, hopefully in a way that is - # idempotent. - # - # The script moves the original wasm-opt to wasm-opt-0. - # - write( - textwrap.dedent(''' - #! /usr/bin/env python3 - import os - p = 'upstream/bin/wasm-opt' - p0 = 'upstream/bin/wasm-opt-0' - p1 = '../wasm-opt-1' - if os.path.exists( p0): - print(f'### {__file__}: {p0!r} already exists so not overwriting from {p!r}.') - else: - s = os.stat( p) - assert s.st_size > 15000000, f'File smaller ({s.st_size}) than expected: {p!r}' - print(f'### {__file__}: Moving {p!r} -> {p0!r}.') - os.rename( p, p0) - print(f'### {__file__}: Moving {p1!r} -> {p!r}.') - os.rename( p1, p) - ''' - ).strip(), - f'{directory}/wasm-opt-replace.py', - ) - - # Create a wasm-opt script that basically does nothing, except - # defers to the original script when run with `--version`. - # - write( - textwrap.dedent(''' - #!/usr/bin/env python3 - import os - import sys - import subprocess - if sys.argv[1:] == ['--version']: - root = os.path.dirname(__file__) - subprocess.run(f'{root}/wasm-opt-0 --version', shell=1, check=1) - else: - print(f'{__file__}: Doing nothing. {sys.argv=}') - ''' - ).strip(), - f'{directory}/wasm-opt-1', - ) - command += ' && ../wasm-opt-replace.py' - command += ' && cd ..' - return command def test( + *, + env_extra, implementations, - valgrind, - venv_quick=False, + venv=False, test_names=None, pytest_options=None, - timeout=None, - gdb=False, + test_timeout=None, + pytest_prefix=None, test_fitz=True, - pytest_k=None + pytest_k=None, + pybind=False, + system_packages=False, ): - ''' - Args: - implementations: - See top-level option `-i`. - valgrind: - See top-level option `--valgrind`. - venv_quick: - . - test_names: - See top-level option `-t`. - pytest_options: - See top-level option `-p`. - gdb: - See top-level option `--gdb`. - test_fitz: - See top-level option `-f`. - ''' - pymupdf_dir_rel = gh_release.relpath(pymupdf_dir) - if pytest_options is None: - if valgrind: - pytest_options = '-s -vv' + if pybind: + cpp_path = 'pymupdf_test_pybind.cpp' + cpp_exe = 'pymupdf_test_pybind.exe' + cpp = textwrap.dedent(''' + #include + + int main() + { + pybind11::scoped_interpreter guard{}; + pybind11::exec(R"( + print('Hello world', flush=1) + import pymupdf + pymupdf.JM_mupdf_show_warnings = 1 + print(f'{pymupdf.version=}', flush=1) + doc = pymupdf.Document() + pymupdf.mupdf.fz_warn('Dummy warning.') + pymupdf.mupdf.fz_warn('Dummy warning.') + pymupdf.mupdf.fz_warn('Dummy warning.') + print(f'{doc=}', flush=1) + )"); + } + ''') + def fs_read(path): + try: + with open(path) as f: + return f.read() + except Exception: + return + def fs_remove(path): + try: + os.remove(path) + except Exception: + pass + cpp_existing = fs_read(cpp_path) + if cpp == cpp_existing: + log(f'Not creating {cpp_exe} because unchanged: {cpp_path}') else: - pytest_options = '' + with open(cpp_path, 'w') as f: + f.write(cpp) + def getmtime(path): + try: + return os.path.getmtime(path) + except Exception: + return 0 + python_config = f'{os.path.realpath(sys.executable)}-config' + # `--embed` adds `-lpython3.11` to the link command, which appears to + # be necessary when building an executable. + flags = run(f'{python_config} --cflags --ldflags --embed', capture=1) + build_command = f'c++ {cpp_path} -o {cpp_exe} -g -W -Wall {flags}' + build_path = f'{cpp_exe}.cmd' + build_command_prev = fs_read(build_path) + if build_command != build_command_prev or getmtime(cpp_path) >= getmtime(cpp_exe): + fs_remove(build_path) + run(build_command) + with open(build_path, 'w') as f: + f.write(build_command) + run(f'./{cpp_exe}') + return + + pymupdf_dir_rel = gh_release.relpath(pymupdf_dir) + if not pytest_options and pytest_prefix == 'valgrind': + pytest_options = '-sv' if pytest_k: pytest_options += f' -k {shlex.quote(pytest_k)}' pytest_arg = '' @@ -624,74 +1385,118 @@ def test( for test_name in test_names: pytest_arg += f' {pymupdf_dir_rel}/{test_name}' else: - pytest_arg += f' {pymupdf_dir_rel}' + pytest_arg += f' {pymupdf_dir_rel}/tests' python = gh_release.relpath(sys.executable) log('Running tests with tests/run_compound.py and pytest.') - try: - if venv_quick: - log(f'{venv_quick=}: Not installing test packages: {gh_release.test_packages}') - else: - gh_release.run(f'pip install --upgrade {gh_release.test_packages}') - run_compound_args = '' - if implementations: - run_compound_args += f' -i {implementations}' - if timeout: - run_compound_args += f' -t {timeout}' - env_extra = None - if valgrind: + + PYODIDE_ROOT = os.environ.get('PYODIDE_ROOT') + if PYODIDE_ROOT is not None: + # We can't install packages with `pip install`; setup.py will have + # specified pytest in the wheels's , so it will be + # already installed. + # + log(f'Not installing test packages because {PYODIDE_ROOT=}.') + command = f'{pytest_options} {pytest_arg}' + args = shlex.split(command) + log(f'{PYODIDE_ROOT=} so calling pytest.main(args).') + log(f'{command=}') + log(f'args are ({len(args)}):') + for arg in args: + log(f' {arg!r}') + import pytest + e = pytest.main(args) + assert e == 0, f'pytest.main() failed: {e=}' + return + + if venv >= 2: + run(f'pip install --upgrade {gh_release.test_packages}') + else: + log(f'{venv=}: Not installing test packages: {gh_release.test_packages}') + run_compound_args = '' + + if implementations: + run_compound_args += f' -i {implementations}' + + if test_timeout: + run_compound_args += f' -t {test_timeout}' + + if pytest_prefix in ('valgrind', 'helgrind'): + if system_packages: log('Installing valgrind.') - gh_release.run(f'sudo apt update') - gh_release.run(f'sudo apt install --upgrade valgrind') - gh_release.run(f'valgrind --version') - - log('Running PyMuPDF tests under valgrind.') - command = ( - f'{python} {pymupdf_dir_rel}/tests/run_compound.py{run_compound_args}' - f' valgrind --suppressions={pymupdf_dir_rel}/valgrind.supp --error-exitcode=100 --errors-for-leak-kinds=none --fullpath-after=' - f' {python} -m pytest {pytest_options}{pytest_arg}' - ) - env_extra=dict( - PYTHONMALLOC='malloc', - PYMUPDF_RUNNING_ON_VALGRIND='1', + run(f'sudo apt update') + run(f'sudo apt install --upgrade valgrind') + run(f'valgrind --version') + + command = f'{python} {pymupdf_dir_rel}/tests/run_compound.py{run_compound_args}' + + if pytest_prefix is None: + pass + elif pytest_prefix == 'gdb': + command += ' gdb --args' + elif pytest_prefix == 'valgrind': + env_extra['PYMUPDF_RUNNING_ON_VALGRIND'] = '1' + env_extra['PYTHONMALLOC'] = 'malloc' + command += ( + f' valgrind' + f' --suppressions={pymupdf_dir_abs}/valgrind.supp' + f' --trace-children=no' + f' --num-callers=20' + f' --error-exitcode=100' + f' --errors-for-leak-kinds=none' + f' --fullpath-after=' ) - elif gdb: - command = f'{python} {pymupdf_dir_rel}/tests/run_compound.py{run_compound_args} gdb --args {python} -m pytest {pytest_options} {pytest_arg}' - elif platform.system() == 'Windows': - # `python -m pytest` doesn't seem to work. - command = f'{python} {pymupdf_dir_rel}/tests/run_compound.py{run_compound_args} pytest {pytest_options} {pytest_arg}' - else: - # On OpenBSD `pip install pytest` doesn't seem to install the pytest - # command, so we use `python -m pytest ...`. - command = f'{python} {pymupdf_dir_rel}/tests/run_compound.py{run_compound_args} {python} -m pytest {pytest_options} {pytest_arg}' - - # Always start by removing any test_*_fitz.py files. - for p in glob.glob(f'{pymupdf_dir_rel}/tests/test_*_fitz.py'): - print(f'Removing {p=}') - os.remove(p) - if test_fitz: - # Create copies of each test file, modified to use `pymupdf` - # instead of `fitz`. - for p in glob.glob(f'{pymupdf_dir_rel}/tests/test_*.py'): - if os.path.basename(p).startswith('test_fitz_'): - # Don't recursively generate test_fitz_fitz_foo.py, - # test_fitz_fitz_fitz_foo.py, ... etc. - continue - branch, leaf = os.path.split(p) - p2 = f'{branch}/{leaf[:5]}fitz_{leaf[5:]}' - print(f'Converting {p=} to {p2=}.') - with open(p, encoding='utf8') as f: - text = f.read() - text2 = re.sub("([^\'])\\bpymupdf\\b", '\\1fitz', text) - if p.replace(os.sep, '/') == f'{pymupdf_dir_rel}/tests/test_docs_samples.py'.replace(os.sep, '/'): - assert text2 == text - else: - assert text2 != text, f'Unexpectedly unchanged when creating {p!r} => {p2!r}' - with open(p2, 'w', encoding='utf8') as f: - f.write(text2) - + elif pytest_prefix == 'helgrind': + env_extra['PYMUPDF_RUNNING_ON_VALGRIND'] = '1' + env_extra['PYTHONMALLOC'] = 'malloc' + command = ( + f' valgrind' + f' --tool=helgrind' + f' --trace-children=no' + f' --num-callers=20' + f' --error-exitcode=100' + f' --fullpath-after=' + ) + else: + assert 0, f'Unrecognised {pytest_prefix=}' + + if platform.system() == 'Windows': + # `python -m pytest` doesn't seem to work. + command += ' pytest' + else: + # On OpenBSD `pip install pytest` doesn't seem to install the pytest + # command, so we use `python -m pytest ...`. + command += f' {python} -m pytest' + + command += f' {pytest_options} {pytest_arg}' + + # Always start by removing any test_*_fitz.py files. + for p in glob.glob(f'{pymupdf_dir_rel}/tests/test_*_fitz.py'): + log(f'Removing {p=}') + os.remove(p) + if test_fitz: + # Create copies of each test file, modified to use `pymupdf` + # instead of `fitz`. + for p in glob.glob(f'{pymupdf_dir_rel}/tests/test_*.py'): + if os.path.basename(p).startswith('test_fitz_'): + # Don't recursively generate test_fitz_fitz_foo.py, + # test_fitz_fitz_fitz_foo.py, ... etc. + continue + branch, leaf = os.path.split(p) + p2 = f'{branch}/{leaf[:5]}fitz_{leaf[5:]}' + log(f'Converting {p=} to {p2=}.') + with open(p, encoding='utf8') as f: + text = f.read() + text2 = re.sub("([^\'])\\bpymupdf\\b", '\\1fitz', text) + if p.replace(os.sep, '/') == f'{pymupdf_dir_rel}/tests/test_docs_samples.py'.replace(os.sep, '/'): + assert text2 == text + else: + assert text2 != text, f'Unexpectedly unchanged when creating {p!r} => {p2!r}' + with open(p2, 'w', encoding='utf8') as f: + f.write(text2) + try: log(f'Running tests with tests/run_compound.py and pytest.') - gh_release.run(command, env_extra=env_extra, timeout=timeout) - + run(command, env_extra=env_extra, timeout=test_timeout) + except subprocess.TimeoutExpired as e: log(f'Timeout when running tests.') raise @@ -744,8 +1549,51 @@ def wrap_get_requires_for_build_wheel(dir_): return ' '.join(ret) -def log(text): - gh_release.log(text, caller=1) +def venv_in(path=None): + ''' + If path is None, returns true if we are in a venv. Otherwise returns true + only if we are in venv . + ''' + if path: + return os.path.abspath(sys.prefix) == os.path.abspath(path) + else: + return sys.prefix != sys.base_prefix + + +def venv_run(args, path, recreate=True, clean=False): + ''' + Runs command inside venv and returns termination code. + + Args: + args: + List of args. + path: + Name of venv. + recreate: + If false we do not run ` -m venv ` if + already exists. This avoids a delay in the common case where + is already set up, but fails if exists but does not contain + a valid venv. + clean: + If true we first delete . + ''' + if clean: + log(f'Removing any existing venv {path}.') + assert path.startswith('venv-') + shutil.rmtree(path, ignore_errors=1) + if recreate or not os.path.isdir(path): + run(f'{sys.executable} -m venv {path}') + if platform.system() == 'Windows': + command = f'{path}\\Scripts\\activate && python' + # shlex not reliable on Windows. + # Use crude quoting with "...". Seems to work. + for arg in args: + assert '"' not in arg + command += f' "{arg}"' + else: + command = f'. {path}/bin/activate && python {shlex.join(args)}' + e = run(command, check=0) + return e if __name__ == '__main__': diff --git a/setup.py b/setup.py index f1341cc0c..676f0e1db 100755 --- a/setup.py +++ b/setup.py @@ -43,6 +43,9 @@ Location of devenv.com on Windows. If unset we search for it - see wdev.py. if that fails we use just 'devenv.com'. + PYMUPDF_SETUP_DUMMY + If 1, we build dummy sdist and wheel with no files. + PYMUPDF_SETUP_FLAVOUR Control building of separate wheels for PyMuPDF. @@ -80,15 +83,17 @@ For internal testing. PYMUPDF_SETUP_MUPDF_BUILD - If set, overrides location of MuPDF when building PyMuPDF: + If unset or '-', use internal hard-coded default MuPDF location. + Otherwise overrides location of MuPDF when building PyMuPDF: Empty string: Build PyMuPDF with the system MuPDF. A string starting with 'git:': - Use `git clone` to get a MuPDF checkout. We use the - string in the git clone command; it must contain the git - URL from which to clone, and can also contain other `git - clone` args, for example: - PYMUPDF_SETUP_MUPDF_BUILD="git:--branch master https://github.com/ArtifexSoftware/mupdf.git" + We use `git` commands to clone/update a local MuPDF checkout. + Should match `git:[--branch ][--tag ][]`. + If is omitted we use a default. + For example: + PYMUPDF_SETUP_MUPDF_BUILD="git:--branch master" + Passed as arg to pipcl.git_get(). Otherwise: Location of mupdf directory. @@ -151,6 +156,11 @@ PYMUPDF_SETUP_PY_LIMITED_API If not '0', we build for current Python's stable ABI. + + However if unset and we are on Python-3.13 or later, we do + not build for the stable ABI because as of 2025-03-04 SWIG + generates incorrect stable ABI code with Python-3.13 - see: + https://github.com/swig/swig/issues/3059 PYMUPDF_SETUP_URL_WHEEL If set, we use an existing wheel instead of building a new wheel. @@ -167,6 +177,9 @@ Any other prefix is an error. + PYMUPDF_SETUP_SWIG + If set, we use this instead of `swig`. + WDEV_VS_YEAR If set, we use as Visual Studio year, for example '2019' or '2022'. @@ -188,42 +201,22 @@ import subprocess import sys import tarfile +import traceback import urllib.request import zipfile import pipcl -_log_prefix = None -def log( text): - global _log_prefix - if not _log_prefix: - # This typically sets _log_prefix to `PyMuPDF/setup.py`. - p = os.path.abspath( __file__) - p, p1 = os.path.split( p) - p, p0 = os.path.split( p) - _log_prefix = os.path.join( p0, p1) - print(f'{_log_prefix}: {text}', file=sys.stdout) - sys.stdout.flush() +log = pipcl.log0 + +run = pipcl.run if 1: # For debugging. log(f'### Starting.') - log(f'__name__: {__name__!r}') - log(f'platform.platform(): {platform.platform()!r}') - log(f'platform.python_version(): {platform.python_version()!r}') - log(f'sys.executable: {sys.executable!r}') - log(f'CPU bits: {32 if sys.maxsize == 2**31 - 1 else 64} {sys.maxsize=}') - log(f'__file__: {__file__!r}') - log(f'os.getcwd(): {os.getcwd()!r}') - log(f'sys.argv ({len(sys.argv)}):') - for i, arg in enumerate(sys.argv): - log(f' {i}: {arg!r}') - log(f'os.environ ({len(os.environ)}):') - for k in sorted( os.environ.keys()): - v = os.environ[ k] - log( f' {k}: {v!r}') + pipcl.show_system() PYMUPDF_SETUP_FLAVOUR = os.environ.get( 'PYMUPDF_SETUP_FLAVOUR', 'pbd') @@ -235,14 +228,25 @@ def log( text): # Name of file that identifies that we are in a PyMuPDF sdist. g_pymupdfb_sdist_marker = 'pymupdfb_sdist' +python_version_tuple = tuple(int(x) for x in platform.python_version_tuple()[:2]) + PYMUPDF_SETUP_PY_LIMITED_API = os.environ.get('PYMUPDF_SETUP_PY_LIMITED_API') -assert PYMUPDF_SETUP_PY_LIMITED_API in (None, '0', '1'), \ - f'Should be "0", "1" or undefined: {PYMUPDF_SETUP_PY_LIMITED_API=}.' -g_py_limited_api = (PYMUPDF_SETUP_PY_LIMITED_API != '0') +assert PYMUPDF_SETUP_PY_LIMITED_API in (None, '', '0', '1'), \ + f'Should be "", "0", "1" or undefined: {PYMUPDF_SETUP_PY_LIMITED_API=}.' +if PYMUPDF_SETUP_PY_LIMITED_API is None and python_version_tuple >= (3, 13): + log(f'Not defaulting to Python limited api because {platform.python_version_tuple()=}.') + g_py_limited_api = False +else: + g_py_limited_api = (PYMUPDF_SETUP_PY_LIMITED_API != '0') PYMUPDF_SETUP_URL_WHEEL = os.environ.get('PYMUPDF_SETUP_URL_WHEEL') log(f'{PYMUPDF_SETUP_URL_WHEEL=}') +PYMUPDF_SETUP_DUMMY = os.environ.get('PYMUPDF_SETUP_DUMMY') +log(f'{PYMUPDF_SETUP_DUMMY=}') + +PYMUPDF_SETUP_SWIG = os.environ.get('PYMUPDF_SETUP_SWIG') + def _fs_remove(path): ''' Removes file or directory, without raising exception if it doesn't exist. @@ -270,11 +274,6 @@ def error_fn(fn, path, excinfo): assert not os.path.exists( path) -def run(command, check=1): - log(f'Running: {command}') - return subprocess.run( command, shell=1, check=check) - - def _git_get_branch( directory): command = f'cd {directory} && git branch --show-current' log( f'Running: {command}') @@ -363,7 +362,7 @@ def tar_extract(path, mode='r:gz', prefix=None, exists='raise'): return prefix_actual -def get_git_id( directory): +def git_info( directory): ''' Returns `(sha, comment, diff, branch)`, all items are str or None if not available. @@ -389,13 +388,45 @@ def get_git_id( directory): ) if cp.returncode == 0: branch = cp.stdout.strip() - log(f'get_git_id(): directory={directory!r} returning branch={branch!r} sha={sha!r} comment={comment!r}') + log(f'git_info(): directory={directory!r} returning branch={branch!r} sha={sha!r} comment={comment!r}') return sha, comment, diff, branch +def git_patch(directory, patch, hard=False): + ''' + Applies string with `git patch` in . + + If is true we clean the tree with `git checkout .` and then apply + the patch. + + Otherwise we apply patch only if it is not already applied; this might fail + if there are conflicting changes in the tree. + ''' + log(f'Applying patch in {directory}:\n{textwrap.indent(patch, " ")}') + if not patch: + return + # Carriage returns break `git apply` so we use `newline='\n'` in open(). + path = os.path.abspath(f'{directory}/pymupdf_patch.txt') + with open(path, 'w', newline='\n') as f: + f.write(patch) + log(f'Using patch file: {path}') + if hard: + run(f'cd {directory} && git checkout .') + run(f'cd {directory} && git apply {path}') + log(f'Have applied patch in {directory}.') + else: + e = run( f'cd {directory} && git apply --check --reverse {path}', check=0) + if e == 0: + log(f'Not patching {directory} because already patched.') + else: + run(f'cd {directory} && git apply {path}') + log(f'Have applied patch in {directory}.') + run(f'cd {directory} && git diff') + + mupdf_tgz = os.path.abspath( f'{__file__}/../mupdf.tgz') -def get_mupdf_internal(out, location=None, sha=None, local_tgz=None): +def get_mupdf_internal(out, location=None, local_tgz=None): ''' Gets MuPDF as either a .tgz or a local directory. @@ -408,8 +439,6 @@ def get_mupdf_internal(out, location=None, sha=None, local_tgz=None): If starts with 'git:', should be remote git location. Otherwise if containing '://' should be URL for .tgz. Otherwise should path of local mupdf checkout. - sha: - If not None and we use git clone, we checkout this sha. local_tgz: If not None, must be local .tgz file. Returns: @@ -421,10 +450,10 @@ def get_mupdf_internal(out, location=None, sha=None, local_tgz=None): default location. ''' - log(f'get_mupdf_internal(): {out=} {location=} {sha=}') + log(f'get_mupdf_internal(): {out=} {location=}') assert out in ('dir', 'tgz') if location is None: - location = 'https://mupdf.com/downloads/archive/mupdf-1.24.10-source.tar.gz' + location = f'https://mupdf.com/downloads/archive/mupdf-{version_mupdf}-source.tar.gz' #location = 'git:--branch master https://github.com/ArtifexSoftware/mupdf.git' if location == '': @@ -435,20 +464,15 @@ def get_mupdf_internal(out, location=None, sha=None, local_tgz=None): if local_tgz: assert os.path.isfile(local_tgz) elif location.startswith( 'git:'): - location_git = location[4:] local_dir = 'mupdf-git' + pipcl.git_get(local_dir, text=location, remote='https://github.com/ArtifexSoftware/mupdf.git') - # Try to update existing checkout. - e = run(f'cd {local_dir} && git pull && git submodule update --init', check=False).returncode - if e: - # No existing git checkout, so do a fresh clone. - _fs_remove(local_dir) - run(f'git clone --recursive --depth 1 --shallow-submodules {location[4:]} {local_dir}') - # Show sha of checkout. - run( f'cd {local_dir} && git show --pretty=oneline|head -n 1', check=False) - if sha: - run( f'cd {local_dir} && git checkout {sha}') + run( + f'cd {local_dir} && git show --pretty=oneline|head -n 1', + check = False, + prefix = 'mupdf git id: ', + ) elif '://' in location: # Download .tgz. local_tgz = os.path.basename( location) @@ -526,6 +550,9 @@ def get_mupdf(path=None, sha=None): PYMUPDF_SETUP_MUPDF_BUILD; see docs at start of this file for details. ''' m = os.environ.get('PYMUPDF_SETUP_MUPDF_BUILD') + if m == '-': + # This allows easy specification in Github actions. + m = None if m is None and os.path.isfile(mupdf_tgz): # This makes us use tgz inside sdist. log(f'Using local tgz: {mupdf_tgz=}') @@ -539,16 +566,30 @@ def get_mupdf(path=None, sha=None): darwin = sys.platform.startswith( 'darwin') windows = platform.system() == 'Windows' or platform.system().startswith('CYGWIN') msys2 = platform.system().startswith('MSYS_NT-') -pyodide = os.environ.get('OS') == 'pyodide' +if os.environ.get('PYODIDE') == '1': + if os.environ.get('OS') != 'pyodide': + log('PYODIDE=1, setting OS=pyodide.') + os.environ['OS'] = 'pyodide' + +pyodide = os.environ.get('OS') == 'pyodide' def build(): ''' pipcl.py `build_fn()` callback. ''' + #pipcl.show_sysconfig() + + if PYMUPDF_SETUP_DUMMY == '1': + log(f'{PYMUPDF_SETUP_DUMMY=} Building dummy wheel with no files.') + return list() + # Download MuPDF. # mupdf_local, mupdf_location = get_mupdf() + if mupdf_local: + mupdf_version_tuple = get_mupdf_version(mupdf_local) + # else we cannot determine version this way and do not use it build_type = os.environ.get( 'PYMUPDF_SETUP_MUPDF_BUILD_TYPE', 'release') assert build_type in ('debug', 'memento', 'release'), \ @@ -583,6 +624,7 @@ def build(): g_py_limited_api, PYMUPDF_SETUP_MUPDF_REFCHECK_IF, PYMUPDF_SETUP_MUPDF_TRACE_IF, + PYMUPDF_SETUP_SWIG, ) log( f'build(): mupdf_build_dir={mupdf_build_dir!r}') @@ -617,6 +659,7 @@ def add(flavour, from_, to_): add('p', f'{g_root}/src/pymupdf.py', to_dir) add('p', f'{g_root}/src/table.py', to_dir) add('p', f'{g_root}/src/utils.py', to_dir) + add('p', f'{g_root}/src/_wxcolors.py', to_dir) add('p', f'{g_root}/src/_apply_pages.py', to_dir) add('p', f'{g_root}/src/build/extra.py', to_dir) if path_so_leaf: @@ -640,34 +683,72 @@ def add(flavour, from_, to_): # Add Windows .lib files. mupdf_build_dir2 = _windows_lib_directory(mupdf_local, build_type) add('d', f'{mupdf_build_dir2}/mupdfcpp{wp.cpu.windows_suffix}.lib', f'{to_dir_d}/lib/') + if mupdf_version_tuple >= (1, 26): + # MuPDF-1.25+ language bindings build also builds libmuthreads. + add('d', f'{mupdf_build_dir2}/libmuthreads.lib', f'{to_dir_d}/lib/') elif darwin: add('p', f'{mupdf_build_dir}/_mupdf.so', to_dir) add('b', f'{mupdf_build_dir}/libmupdfcpp.so', to_dir) - add('b', f'{mupdf_build_dir}/libmupdf.dylib', f'{to_dir}libmupdf.dylib') + add('b', f'{mupdf_build_dir}/libmupdf.dylib', to_dir) + add('d', f'{mupdf_build_dir}/libmupdf-threads.a', f'{to_dir_d}/lib/') elif pyodide: add('p', f'{mupdf_build_dir}/_mupdf.so', to_dir) - add('b', f'{mupdf_build_dir}/libmupdfcpp.so', 'PyMuPDF.libs/') - add('b', f'{mupdf_build_dir}/libmupdf.so', 'PyMuPDF.libs/') + add('b', f'{mupdf_build_dir}/libmupdfcpp.so', to_dir) + add('b', f'{mupdf_build_dir}/libmupdf.so', to_dir) else: add('p', f'{mupdf_build_dir}/_mupdf.so', to_dir) add('b', pipcl.get_soname(f'{mupdf_build_dir}/libmupdfcpp.so'), to_dir) add('b', pipcl.get_soname(f'{mupdf_build_dir}/libmupdf.so'), to_dir) + add('d', f'{mupdf_build_dir}/libmupdf-threads.a', f'{to_dir_d}/lib/') if 'd' in PYMUPDF_SETUP_FLAVOUR: - # Add MuPDF headers to `ret_d`. Would prefer to use + # Add MuPDF C and C++ headers to `ret_d`. Would prefer to use # pipcl.git_items() but hard-coded mupdf tree is not a git # checkout. # - include = f'{mupdf_local}/include' - for dirpath, dirnames, filenames in os.walk(include): - for filename in filenames: - header_abs = os.path.join(dirpath, filename) - assert header_abs.startswith(include) - header_rel = header_abs[len(include)+1:] - add('d', f'{header_abs}', f'{to_dir_d}/include/{header_rel}') + for root in ( + f'{mupdf_local}/include', + f'{mupdf_local}/platform/c++/include', + ): + for dirpath, dirnames, filenames in os.walk(root): + for filename in filenames: + if not filename.endswith('.h'): + continue + header_abs = os.path.join(dirpath, filename) + assert header_abs.startswith(root) + header_rel = header_abs[len(root)+1:] + add('d', f'{header_abs}', f'{to_dir_d}/include/{header_rel}') # Add a .py file containing location of MuPDF. - text = f"mupdf_location='{mupdf_location}'\n" + try: + sha, comment, diff, branch = git_info(g_root) + except Exception as e: + log(f'Failed to get git information: {e}') + sha, comment, diff, branch = (None, None, None, None) + swig = PYMUPDF_SETUP_SWIG or 'swig' + swig_version_text = run(f'{swig} -version', capture=1) + m = re.search('\nSWIG Version ([^\n]+)', swig_version_text) + log(f'{swig_version_text=}') + assert m, f'Unrecognised {swig_version_text=}' + swig_version = m.group(1) + def int_or_0(text): + try: + return int(text) + except Exception: + return 0 + swig_version_tuple = tuple(int_or_0(i) for i in swig_version.split('.')) + version_p_tuple = tuple(int_or_0(i) for i in version_p.split('.')) + log(f'{swig_version=}') + text = '' + text += f'mupdf_location = {mupdf_location!r}\n' + text += f'pymupdf_version = {version_p!r}\n' + text += f'pymupdf_version_tuple = {version_p_tuple!r}\n' + text += f'pymupdf_git_sha = {sha!r}\n' + text += f'pymupdf_git_diff = {diff!r}\n' + text += f'pymupdf_git_branch = {branch!r}\n' + text += f'swig_version = {swig_version!r}\n' + text += f'swig_version_tuple = {swig_version_tuple!r}\n' + log(f'_build.py is:\n{textwrap.indent(text, " ")}') add('p', text.encode(), f'{to_dir}/_build.py') # Add single README file. @@ -733,13 +814,23 @@ def build_mupdf_windows( tesseract = '' if os.environ.get('PYMUPDF_SETUP_MUPDF_TESSERACT') == '0' else 'tesseract-' windows_build_tail = f'build\\shared-{tesseract}{build_type}' if g_py_limited_api: - windows_build_tail += f'-Py_LIMITED_API={pipcl.current_py_limited_api()}' + windows_build_tail += f'-Py_LIMITED_API_{pipcl.current_py_limited_api()}' windows_build_tail += f'-x{wp.cpu.bits}-py{wp.version}' windows_build_dir = f'{mupdf_local}\\{windows_build_tail}' #log( f'Building mupdf.') devenv = os.environ.get('PYMUPDF_SETUP_DEVENV') if not devenv: - vs = pipcl.wdev.WindowsVS() + try: + # Prefer VS-2022 as that is what Github provide in windows-2022. + log(f'Looking for Visual Studio 2022.') + vs = pipcl.wdev.WindowsVS(year=2022) + except Exception as e: + log(f'Failed to find VS-2022:\n' + f'{textwrap.indent(traceback.format_exc(), " ")}' + ) + log(f'Looking for any Visual Studio.') + vs = pipcl.wdev.WindowsVS() + log(f'vs:\n{vs.description_ml(" ")}') devenv = vs.devenv if not devenv: devenv = 'devenv.com' @@ -804,6 +895,7 @@ def build_mupdf_unix( g_py_limited_api, PYMUPDF_SETUP_MUPDF_REFCHECK_IF, PYMUPDF_SETUP_MUPDF_TRACE_IF, + PYMUPDF_SETUP_SWIG, ): ''' Builds MuPDF. @@ -830,6 +922,34 @@ def build_mupdf_unix( if openbsd or freebsd: env_add(env, 'CXX', 'c++', ' ') + + if darwin and os.environ.get('GITHUB_ACTIONS') == 'true': + if os.environ.get('ImageOS') == 'macos13': + # On Github macos13 we need to use Clang/LLVM (Homebrew) 15.0.7, + # otherwise mupdf:thirdparty/tesseract/src/api/baseapi.cpp fails to + # compile with: + # + # thirdparty/tesseract/src/api/baseapi.cpp:150:25: error: 'recursive_directory_iterator' is unavailable: introduced in macOS 10.15 + # + # See: + # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md + # + log(f'Using llvm@15 clang and clang++') + cl15 = pipcl.run(f'brew --prefix llvm@15', capture=1) + log(f'{cl15=}') + cl15 = cl15.strip() + pipcl.run(f'ls -lL {cl15}') + pipcl.run(f'ls -lL {cl15}/bin') + cc = f'{cl15}/bin/clang' + cxx = f'{cl15}/bin/clang++' + env['CC'] = cc + env['CXX'] = cxx + + # Show compiler versions. + cc = env.get('CC', 'cc') + cxx = env.get('CXX', 'c++') + pipcl.run(f'{cc} --version') + pipcl.run(f'{cxx} --version') # Add extra flags for MacOS cross-compilation, where ARCHFLAGS can be # '-arch arm64'. @@ -839,6 +959,8 @@ def build_mupdf_unix( env_add(env, 'XCFLAGS', archflags) env_add(env, 'XLIBS', archflags) + mupdf_version_tuple = get_mupdf_version(mupdf_local) + # We specify a build directory path containing 'pymupdf' so that we # coexist with non-PyMuPDF builds (because PyMuPDF builds have a # different config.h). @@ -851,7 +973,16 @@ def build_mupdf_unix( # $_PYTHON_HOST_PLATFORM allows cross-compiled cibuildwheel builds # to coexist, e.g. on github. # + # Have experimented with looking at getconf_ARG_MAX to decide whether to + # omit `PyMuPDF-` from the build directory, to avoid command-too-long + # errors with mupdf-1.26. But it seems that `getconf ARG_MAX` returns + # a system limit, not the actual limit of the current shell, and there + # doesn't seem to be a way to find the current shell's limit. + # build_prefix = f'PyMuPDF-' + if mupdf_version_tuple >= (1, 26): + # Avoid link command length problems seen on musllinux. + build_prefix = '' if pyodide: build_prefix += 'pyodide-' else: @@ -868,25 +999,30 @@ def build_mupdf_unix( log(f'PYMUPDF_SETUP_MUPDF_TESSERACT=0 so building mupdf without tesseract.') else: build_prefix += 'tesseract-' - mupdf_version_tuple = get_mupdf_version(mupdf_local) if ( linux and os.environ.get('PYMUPDF_SETUP_MUPDF_BSYMBOLIC', '1') == '1' - and mupdf_version_tuple >= (1, 24, 3) ): log(f'Appending `bsymbolic-` to MuPDF build path.') build_prefix += 'bsymbolic-' log(f'{g_py_limited_api=}') if g_py_limited_api: - build_prefix += f'Py_LIMITED_API={pipcl.current_py_limited_api()}-' + build_prefix += f'Py_LIMITED_API_{pipcl.current_py_limited_api()}-' unix_build_dir = f'{mupdf_local}/build/{build_prefix}{build_type}' + PYMUPDF_SETUP_MUPDF_CLEAN = os.environ.get('PYMUPDF_SETUP_MUPDF_CLEAN') + if PYMUPDF_SETUP_MUPDF_CLEAN == '1': + log(f'{PYMUPDF_SETUP_MUPDF_CLEAN=}, deleting {unix_build_dir=}.') + shutil.rmtree(unix_build_dir, ignore_errors=1) # We need MuPDF's Python bindings, so we build MuPDF with # `mupdf/scripts/mupdfwrap.py` instead of running `make`. # command = f'cd {mupdf_local} &&' for n, v in env.items(): command += f' {n}={shlex.quote(v)}' - command += f' {sys.executable} ./scripts/mupdfwrap.py -d build/{build_prefix}{build_type} -b' + command += f' {sys.executable} ./scripts/mupdfwrap.py' + if PYMUPDF_SETUP_SWIG: + command += f' --swig {shlex.quote(PYMUPDF_SETUP_SWIG)}' + command += f' -d build/{build_prefix}{build_type} -b' #command += f' --m-target libs' if PYMUPDF_SETUP_MUPDF_REFCHECK_IF: command += f' --refcheck-if "{PYMUPDF_SETUP_MUPDF_REFCHECK_IF}"' @@ -986,6 +1122,7 @@ def _build_extension( mupdf_local, mupdf_build_dir, build_type, g_py_limited_api prerequisites_compile = f'{mupdf_local}/include', prerequisites_link = libraries, py_limited_api = g_py_limited_api, + swig = PYMUPDF_SETUP_SWIG, ) return path_so_leaf @@ -1071,6 +1208,8 @@ def _extension_flags( mupdf_local, mupdf_build_dir, build_type): def sdist(): ret = list() + if PYMUPDF_SETUP_DUMMY == '1': + return ret if PYMUPDF_SETUP_FLAVOUR == 'b': # Create a minimal sdist that will build/install a dummy PyMuPDFb. @@ -1128,8 +1267,16 @@ def sdist(): # We generate different wheels depending on PYMUPDF_SETUP_FLAVOUR. # -version_p = '1.24.11' -version_b = '1.24.10' +# PyMuPDF version. +version_p = '1.26.6' + +version_mupdf = '1.26.11' + +# PyMuPDFb version. This is the PyMuPDF version whose PyMuPDFb wheels we will +# (re)use if generating separate PyMuPDFb wheels. Though as of PyMuPDF-1.24.11 +# (2024-10-03) we no longer use PyMuPDFb wheels so this is actually unused. +# +version_b = '1.26.3' if os.path.exists(f'{g_root}/{g_pymupdfb_sdist_marker}'): @@ -1167,7 +1314,7 @@ def get_requires_for_build_wheel(config_settings=None): readme_d = f.read() tag_python = None - requires_dist = None, + requires_dist = list() entry_points = None if 'p' in PYMUPDF_SETUP_FLAVOUR: @@ -1176,7 +1323,7 @@ def get_requires_for_build_wheel(config_settings=None): readme = readme_p summary = 'A high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.' if 'b' not in PYMUPDF_SETUP_FLAVOUR: - requires_dist = f'PyMuPDFb =={version_b}' + requires_dist.append(f'PyMuPDFb =={version_b}') # Create a `pymupdf` command. entry_points = textwrap.dedent(''' [console_scripts] @@ -1196,6 +1343,10 @@ def get_requires_for_build_wheel(config_settings=None): tag_python = 'py3' else: assert 0, f'Unrecognised {PYMUPDF_SETUP_FLAVOUR=}.' + + if os.environ.get('PYODIDE_ROOT'): + # We can't pip install pytest on pyodide, so specify it here. + requires_dist.append('pytest') p = pipcl.Package( name, @@ -1207,8 +1358,8 @@ def get_requires_for_build_wheel(config_settings=None): author = 'Artifex', author_email = 'support@artifex.com', requires_dist = requires_dist, - requires_python = '>=3.9', - license = 'GNU AFFERO GPL 3.0', + requires_python = '>=3.10', + license = 'Dual Licensed - GNU AFFERO GPL 3.0 or Artifex Commercial License', project_url = [ ('Documentation, https://pymupdf.readthedocs.io/'), ('Source, https://github.com/pymupdf/pymupdf'), @@ -1250,9 +1401,6 @@ def platform_release_tuple(): ret.append(libclang) elif openbsd: print(f'OpenBSD: libclang not available via pip; assuming `pkg_add py3-llvm`.') - elif darwin and platform.machine() == 'arm64': - print(f'MacOS/arm64: forcing use of libclang 16.0.6 because 18.1.1 known to fail with `clang.cindex.TranslationUnitLoadError: Error parsing translation unit.`') - ret.append('libclang==16.0.6') elif darwin and platform_release_tuple() < (18,): # There are still of problems when building on old macos. ret.append('libclang==14.0.6') @@ -1262,8 +1410,13 @@ def platform_release_tuple(): print(f'msys2: pip install of swig does not build; assuming `pacman -S swig`.') elif openbsd: print(f'OpenBSD: pip install of swig does not build; assuming `pkg_add swig`.') + elif PYMUPDF_SETUP_SWIG: + pass + elif darwin: + # 2025-10-27: new swig-4.4.0 fails badly at runtime. + ret.append('swig==4.3.1') else: - ret.append( 'swig') + ret.append('swig') return ret diff --git a/src/__init__.py b/src/__init__.py index a9afff7e6..7824eb522 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -28,7 +28,7 @@ import zipfile from . import extra - +import importlib.util # Set up g_out_log and g_out_message from environment variables. # @@ -117,18 +117,18 @@ def _make_output( pylogging_level = int(pylogging_level) pylogging_name = items_d.get('name', 'pymupdf') else: - assert 0, f'Unrecognised {text=}.' + assert 0, f'Expected prefix `fd:`, `path:`. `path+:` or `logging:` in {text=}.' if fd is not None: - ret = open(fd, mode='w', closefd=False) + ret = io.open(fd, mode='w', closefd=False) elif stream is not None: assert hasattr(stream, 'write') assert hasattr(stream, 'flush') ret = stream elif path is not None: - ret = open(path, 'w') + ret = io.open(path, 'w') elif path_append is not None: - ret = open(path_append, 'a') + ret = io.open(path_append, 'a') elif (0 or pylogging is not None or pylogging_logger is not None @@ -154,10 +154,8 @@ def write(self, text): def flush(self): pass ret = Out() - elif default: - ret = default else: - assert 0, f'No output specified.' + ret = default return ret # Set steam used by PyMuPDF messaging. @@ -259,14 +257,18 @@ def log( text='', caller=1): text = f'{filename}:{line}:{function}(): {text}' if _g_log_items_active: _g_log_items.append(text) - print(text, file=_g_out_log, flush=1) + if _g_out_log: + print(text, file=_g_out_log, flush=1) def message(text=''): ''' For user messages. ''' - print(text, file=_g_out_message, flush=1) + # It looks like `print()` does nothing if sys.stdout is None (without + # raising an exception), but we don't rely on this. + if _g_out_message: + print(text, file=_g_out_message, flush=1) def exception_info(): @@ -331,6 +333,37 @@ def __init__(self): _globals = _Globals() +_get_layout: typing.Optional[typing.Callable] = None + +# global switch ensuring that the recommendation message is shown at most once +_recommend_layout = True # must be referred to as "global" everywhere + + +def no_recommend_layout(): + """For users who never want to see the layout recommendation.""" + global _recommend_layout + _recommend_layout = False + + +def _warn_layout_once(): + """Check if we should recommend installing the layout package.""" + msg="""Consider using the pymupdf_layout package for a greatly improved page layout analysis.""" + + global _recommend_layout + if ( + 1 + and _recommend_layout # still True? + and _get_layout is None # no layout function stored here + + # client did not globally disable the recommendation + and os.getenv("PYMUPDF_SUGGEST_LAYOUT_ANALYZER") != "0" + + # layout is not available in this Python + and not importlib.util.find_spec("pymupdf.layout") + ): + print(msg) + _recommend_layout = False # never show the message again + # Optionally use MuPDF via cppyy bindings; experimental and not tested recently # as of 2023-01-20 11:51:40 @@ -358,6 +391,8 @@ def __init__(self): from . import mupdf except Exception: import mupdf + if hasattr(mupdf, 'internal_check_ndebug'): + mupdf.internal_check_ndebug() mupdf.reinit_singlethreaded() def _int_rc(text): @@ -371,13 +406,25 @@ def _int_rc(text): # Basic version information. # -pymupdf_version = "1.24.11" +# (We use `noqa F401` to avoid flake8 errors such as `F401 +# '._build.mupdf_location' imported but unused`. +# +from ._build import mupdf_location # noqa F401 +from ._build import pymupdf_git_branch # noqa F401 +from ._build import pymupdf_git_diff # noqa F401 +from ._build import pymupdf_git_sha # noqa F401 +from ._build import pymupdf_version # noqa F401 +from ._build import pymupdf_version_tuple # noqa F401 +from ._build import swig_version # noqa F401 +from ._build import swig_version_tuple # noqa F401 + mupdf_version = mupdf.FZ_VERSION -pymupdf_date = "2024-10-03 00:00:01" + +# Removed in PyMuPDF-1.26.1. +pymupdf_date = None # Versions as tuples; useful when comparing versions. # -pymupdf_version_tuple = tuple( [_int_rc(i) for i in pymupdf_version.split('.')]) mupdf_version_tuple = tuple( [_int_rc(i) for i in mupdf_version.split('.')]) assert mupdf_version_tuple == (mupdf.FZ_VERSION_MAJOR, mupdf.FZ_VERSION_MINOR, mupdf.FZ_VERSION_PATCH), \ @@ -385,11 +432,10 @@ def _int_rc(text): # Legacy version information. # -pymupdf_date2 = pymupdf_date.replace('-', '').replace(' ', '').replace(':', '') -version = (pymupdf_version, mupdf_version, pymupdf_date2) +version = (pymupdf_version, mupdf_version, None) VersionFitz = mupdf_version VersionBind = pymupdf_version -VersionDate = pymupdf_date +VersionDate = None # String formatting. @@ -410,15 +456,19 @@ def _format_g(value, *, fmt='%g'): ret += _format_g(v, fmt=fmt) return ret else: - if mupdf_version_tuple >= (1, 24, 2): - return mupdf.fz_format_double(fmt, value) - else: - return fmt % value + return mupdf.fz_format_double(fmt, value) format_g = _format_g +# ByteString is gone from typing in 3.14. +# collections.abc.Buffer available from 3.12 only +try: + ByteString = typing.ByteString +except AttributeError: + ByteString = bytes | bytearray | memoryview + # Names required by class method typing annotations. -OptBytes = typing.Optional[typing.ByteString] +OptBytes = typing.Optional[ByteString] OptDict = typing.Optional[dict] OptFloat = typing.Optional[float] OptInt = typing.Union[int, None] @@ -428,7 +478,6 @@ def _format_g(value, *, fmt='%g'): Page = 'Page_forward_decl' Point = 'Point_forward_decl' -TESSDATA_PREFIX = os.environ.get("TESSDATA_PREFIX") matrix_like = 'matrix_like' point_like = 'point_like' quad_like = 'quad_like' @@ -512,6 +561,21 @@ def _as_pdf_page(page, required=True): assert 0, f'Unrecognised {type(page)=}' +def _pdf_annot_page(annot): + ''' + Wrapper for mupdf.pdf_annot_page() which raises an exception if + is not bound to a page instead of returning a mupdf.PdfPage with + `.m_internal=None`. + + [Some other MuPDF functions such as pdf_update_annot()` already raise a + similar exception if a pdf_annot's .page field is null.] + ''' + page = mupdf.pdf_annot_page(annot) + if not page.m_internal: + raise RuntimeError('Annot is not bound to a page') + return page + + # Fixme: we don't support JM_MEMORY=1. JM_MEMORY = 0 @@ -597,7 +661,7 @@ def _setAP(self, buffer_, rect=0): try: annot = self.this annot_obj = mupdf.pdf_annot_obj( annot) - page = mupdf.pdf_annot_page( annot) + page = _pdf_annot_page(annot) apobj = mupdf.pdf_dict_getl( annot_obj, PDF_NAME('AP'), PDF_NAME('N')) if not apobj.m_internal: raise RuntimeError( MSG_BAD_APN) @@ -617,7 +681,7 @@ def _update_appearance(self, opacity=-1, blend_mode=None, fill_color=None, rotat annot = self.this assert annot.m_internal annot_obj = mupdf.pdf_annot_obj( annot) - page = mupdf.pdf_annot_page( annot) + page = _pdf_annot_page(annot) pdf = page.doc() type_ = mupdf.pdf_annot_type( annot) nfcol, fcol = JM_color_FromSequence(fill_color) @@ -653,22 +717,23 @@ def _update_appearance(self, opacity=-1, blend_mode=None, fill_color=None, rotat insert_rot = 0 if insert_rot: - mupdf.pdf_dict_put_int( annot_obj, PDF_NAME('Rotate'), rotate) + mupdf.pdf_dict_put_int(annot_obj, PDF_NAME('Rotate'), rotate) - mupdf.pdf_dirty_annot( annot) - mupdf.pdf_update_annot( annot) # let MuPDF update - pdf.resynth_required = 0 # insert fill color if type_ == mupdf.PDF_ANNOT_FREE_TEXT: if nfcol > 0: - mupdf.pdf_set_annot_color( annot, fcol[:nfcol]) + mupdf.pdf_set_annot_color(annot, fcol[:nfcol]) elif nfcol > 0: - col = mupdf.pdf_new_array( page.doc(), nfcol) + col = mupdf.pdf_new_array(page.doc(), nfcol) for i in range( nfcol): - mupdf.pdf_array_push_real( col, fcol[i]) - mupdf.pdf_dict_put( annot_obj, PDF_NAME('IC'), col) + mupdf.pdf_array_push_real(col, fcol[i]) + mupdf.pdf_dict_put(annot_obj, PDF_NAME('IC'), col) + mupdf.pdf_dirty_annot(annot) + mupdf.pdf_update_annot(annot) # let MuPDF update + pdf.resynth_required = 0 except Exception as e: - if g_exceptions_verbose: exception_info() + if g_exceptions_verbose: + exception_info() message( f'cannot update annot: {e}') raise @@ -828,10 +893,10 @@ def delete_responses(self): CheckParent(self) annot = self.this annot_obj = mupdf.pdf_annot_obj(annot) - page = mupdf.pdf_annot_page(annot) + page = _pdf_annot_page(annot) while 1: irt_annot = JM_find_annot_irt(annot) - if not irt_annot.m_internal: + if not irt_annot: break mupdf.pdf_delete_annot(page, irt_annot) mupdf.pdf_dict_del(annot_obj, PDF_NAME('Popup')) @@ -895,7 +960,7 @@ def file_info(self): size = mupdf.pdf_to_int(o) res[ dictkey_filename] = JM_EscapeStrFromStr(filename) - res[ dictkey_desc] = JM_UnicodeFromStr(desc) + res[ dictkey_descr] = JM_UnicodeFromStr(desc) res[ dictkey_length] = length res[ dictkey_size] = size return res @@ -940,7 +1005,7 @@ def get_parent(self): try: ret = getattr( self, 'parent') except AttributeError: - page = mupdf.pdf_annot_page(self.this) + page = _pdf_annot_page(self.this) assert isinstance( page, mupdf.PdfPage) document = Document( page.doc()) if page.m_internal else None ret = Page(page, document) @@ -1001,12 +1066,22 @@ def get_sound(self): stream = JM_BinFromBuffer(buf) res['stream'] = stream return res + + def get_text(self, *args, **kwargs): + return utils.get_text(self, *args, **kwargs) + + def get_textbox(self, *args, **kwargs): + return utils.get_textbox(self, *args, **kwargs) def get_textpage(self, clip=None, flags=0): """Make annotation TextPage.""" CheckParent(self) - options = mupdf.FzStextOptions() - options.flags = flags + options = mupdf.FzStextOptions(flags) + if clip: + assert hasattr(mupdf, 'FZ_STEXT_CLIP_RECT'), f'MuPDF-{mupdf_version} does not support FZ_STEXT_CLIP_RECT.' + clip2 = JM_rect_from_py(clip) + options.clip = clip2.internal() + options.flags |= mupdf.FZ_STEXT_CLIP_RECT annot = self.this stextpage = mupdf.FzStextPage(annot, options) ret = TextPage(stextpage) @@ -1299,14 +1374,19 @@ def set_colors(self, colors=None, stroke=None, fill=None): Use either a dict or the direct arguments. """ + if self.type[0] == mupdf.PDF_ANNOT_FREE_TEXT: + raise ValueError("cannot be used for FreeText annotations") + CheckParent(self) doc = self.get_parent().parent if type(colors) is not dict: colors = {"fill": fill, "stroke": stroke} fill = colors.get("fill") stroke = colors.get("stroke") + fill_annots = (mupdf.PDF_ANNOT_CIRCLE, mupdf.PDF_ANNOT_SQUARE, mupdf.PDF_ANNOT_LINE, mupdf.PDF_ANNOT_POLY_LINE, mupdf.PDF_ANNOT_POLYGON, mupdf.PDF_ANNOT_REDACT,) + if stroke in ([], ()): doc.xref_set_key(self.xref, "C", "[]") elif stroke is not None: @@ -1372,7 +1452,7 @@ def set_irt_xref(self, xref): ''' annot = self.this annot_obj = mupdf.pdf_annot_obj( annot) - page = mupdf.pdf_annot_page( annot) + page = _pdf_annot_page(annot) if xref < 1 or xref >= mupdf.pdf_xref_len( page.doc()): raise ValueError( MSG_BAD_XREF) irt = mupdf.pdf_new_indirect( page.doc(), xref, 0) @@ -1427,7 +1507,7 @@ def set_opacity(self, opacity): return mupdf.pdf_set_annot_opacity(annot, opacity) if opacity < 1.0: - page = mupdf.pdf_annot_page(annot) + page = _pdf_annot_page(annot) page.transparency = 1 def set_open(self, is_open): @@ -1442,7 +1522,7 @@ def set_popup(self, rect): ''' CheckParent(self) annot = self.this - pdfpage = mupdf.pdf_annot_page( annot) + pdfpage = _pdf_annot_page(annot) rot = JM_rotate_page_matrix(pdfpage) r = mupdf.fz_transform_rect(JM_rect_from_py(rect), rot) mupdf.pdf_set_annot_popup(annot, r) @@ -1452,7 +1532,7 @@ def set_rect(self, rect): CheckParent(self) annot = self.this - pdfpage = mupdf.pdf_annot_page(annot) + pdfpage = _pdf_annot_page(annot) rot = JM_rotate_page_matrix(pdfpage) r = mupdf.fz_transform_rect(JM_rect_from_py(rect), rot) if mupdf.fz_is_empty_rect(r) or mupdf.fz_is_infinite_rect(r): @@ -1535,6 +1615,12 @@ def update(self, cross_out: draw diagonal lines, 'Redact' only. rotate: set rotation, 'FreeText' and some others. """ + annot_obj = mupdf.pdf_annot_obj(self.this) + + if border_color: + is_rich_text = mupdf.pdf_dict_get(annot_obj, PDF_NAME("RC")) + if not is_rich_text: + raise ValueError("cannot set border_color if rich_text is False") Annot.update_timing_test() CheckParent(self) def color_string(cs, code): @@ -1546,6 +1632,7 @@ def color_string(cs, code): return (cc + "\n").encode() annot_type = self.type[0] # get the annot type + dt = self.border.get("dashes", None) # get the dashes spec bwidth = self.border.get("width", -1) # get border line width stroke = self.colors["stroke"] # get the stroke color @@ -1571,42 +1658,27 @@ def color_string(cs, code): if not hasattr(opacity, "__float__"): opacity = self.opacity - if 0 <= opacity < 1 or blend_mode is not None: + if 0 <= opacity < 1 or blend_mode: opa_code = "/H gs\n" # then we must reference this 'gs' else: opa_code = "" if annot_type == mupdf.PDF_ANNOT_FREE_TEXT: - CheckColor(border_color) CheckColor(text_color) CheckColor(fill_color) tcol, fname, fsize = TOOLS._parse_da(self) # read and update default appearance as necessary - update_default_appearance = False if fsize <= 0: fsize = 12 - update_default_appearance = True - if text_color is not None: + if text_color: tcol = text_color - update_default_appearance = True - if fontname is not None: + if fontname: fname = fontname - update_default_appearance = True if fontsize > 0: fsize = fontsize - update_default_appearance = True - - if update_default_appearance: - da_str = "" - if len(tcol) == 3: - fmt = "{:g} {:g} {:g} rg /{f:s} {s:g} Tf" - elif len(tcol) == 1: - fmt = "{:g} g /{f:s} {s:g} Tf" - elif len(tcol) == 4: - fmt = "{:g} {:g} {:g} {:g} k /{f:s} {s:g} Tf" - da_str = fmt.format(*tcol, f=fname, s=fsize) - TOOLS._update_da(self, da_str) + JM_make_annot_DA(self, len(tcol), tcol, fname, fsize) + blend_mode = None # not supported for free text annotations! #------------------------------------------------------------------ # now invoke MuPDF to update the annot appearance @@ -1620,6 +1692,13 @@ def color_string(cs, code): if val is False: raise RuntimeError("Error updating annotation.") + if annot_type == mupdf.PDF_ANNOT_FREE_TEXT: + # in absence of previous opacity, we may need to modify the AP + ap = self._getAP() + if 0 <= opacity < 1 and not ap.startswith(b"/H gs"): + self._setAP(b"/H gs\n" + ap) + return + bfill = color_string(fill, "f") bstroke = color_string(stroke, "c") @@ -1667,36 +1746,6 @@ def color_string(cs, code): ap = b"\n".join(ap_tab) - if annot_type == mupdf.PDF_ANNOT_FREE_TEXT: - BT = ap.find(b"BT") - ET = ap.rfind(b"ET") + 2 - ap = ap[BT:ET] - w, h = self.rect.width, self.rect.height - if rotate in (90, 270) or not (apnmat.b == apnmat.c == 0): - w, h = h, w - re = b"0 0 " + _format_g((w, h)).encode() + b" re" - ap = re + b"\nW\nn\n" + ap - ope = None - fill_string = color_string(fill, "f") - if fill_string: - ope = b"f" - stroke_string = color_string(border_color, "c") - if stroke_string and bwidth > 0: - ope = b"S" - bwidth = _format_g(bwidth).encode() + b" w\n" - else: - bwidth = stroke_string = b"" - if fill_string and stroke_string: - ope = b"B" - if ope is not None: - ap = bwidth + fill_string + stroke_string + re + b"\n" + ope + b"\n" + ap - - if dashes is not None: # handle dashes - ap = dashes + b"\n" + ap - dashes = None - - ap_updated = True - if annot_type in (mupdf.PDF_ANNOT_POLYGON, mupdf.PDF_ANNOT_POLY_LINE): ap = b"\n".join(ap_tab[:-1]) + b"\n" ap_updated = True @@ -1848,7 +1897,7 @@ def vertices(self): annot = self.this assert isinstance(annot, mupdf.PdfAnnot) annot_obj = mupdf.pdf_annot_obj(annot) - page = mupdf.pdf_annot_page(annot) + page = _pdf_annot_page(annot) page_ctm = mupdf.FzMatrix() # page transformation matrix dummy = mupdf.FzRect() # Out-param for mupdf.pdf_page_transform(). mupdf.pdf_page_transform(page, dummy, page_ctm) @@ -1992,7 +2041,7 @@ def make_subarch(entries, mount, fmt): elif os.path.isfile(content): assert isinstance(path, str) and path != '', \ f'Need name for binary content, but {path=}.' - with open(content) as f: + with io.open(content, 'rb') as f: ff = f.read() self._add_treeitem(ff, path) return make_subarch([path], None, 'tree') @@ -2037,7 +2086,7 @@ def make_subarch(entries, mount, fmt): self._add_treeitem(data, name, path=path) elif isinstance(data, str): if os.path.isfile(data): - with open(data, 'rb') as f: + with io.open(data, 'rb') as f: ff = f.read() self._add_treeitem(ff, name, path=path) else: @@ -2077,12 +2126,12 @@ def __enter__(self): def __exit__(self, *args): pass - def __init__( self, rhs): - if isinstance( rhs, mupdf.FzXml): + def __init__(self, rhs): + if isinstance(rhs, mupdf.FzXml): self.this = rhs - elif isinstance( str): - buff = mupdf.fz_new_buffer_from_copied_data( rhs) - self.this = mupdf.fz_parse_xml_from_html5( buff) + elif isinstance(rhs, str): + buff = mupdf.fz_new_buffer_from_copied_data(rhs) + self.this = mupdf.fz_parse_xml_from_html5(buff) else: assert 0, f'Unsupported type for rhs: {type(rhs)}' @@ -2882,6 +2931,7 @@ def __init__(self, filename=None, stream=None, filetype=None, rect=None, width=0 global JM_mupdf_show_errors JM_mupdf_show_errors_old = JM_mupdf_show_errors JM_mupdf_show_errors = 0 + try: self.is_closed = False self.is_encrypted = False @@ -2898,53 +2948,6 @@ def __init__(self, filename=None, stream=None, filetype=None, rect=None, width=0 self.this_is_pdf = True return - # Classic implementation temporarily sets JM_mupdf_show_errors=0 then - # restores the previous value in `fz_always() {...}` before returning. - # - - if not filename or type(filename) is str: - pass - elif hasattr(filename, "absolute"): - filename = str(filename) - elif hasattr(filename, "name"): - filename = filename.name - else: - raise TypeError(f"bad filename: {type(filename)=} {filename=}.") - - if stream is not None: - if type(stream) is bytes: - self.stream = stream - elif type(stream) is bytearray: - self.stream = bytes(stream) - elif type(stream) is io.BytesIO: - self.stream = stream.getvalue() - else: - raise TypeError(f"bad stream: {type(stream)=}.") - stream = self.stream - if not (filename or filetype): - filename = 'pdf' - else: - self.stream = None - - if filename and self.stream is None: - from_file = True - self._name = filename - else: - from_file = False - self._name = "" - - if from_file: - if not os.path.exists(filename): - msg = f"no such file: '{filename}'" - raise FileNotFoundError(msg) - elif not os.path.isfile(filename): - msg = f"'{filename}' is no file" - raise FileDataError(msg) - - if from_file and os.path.getsize(filename) == 0: - raise EmptyFileError(f'Cannot open empty file: {filename=}.') - if type(self.stream) is bytes and len(self.stream) == 0: - raise EmptyFileError(f'Cannot open empty stream.') w = width h = height r = JM_rect_from_py(rect) @@ -2952,92 +2955,86 @@ def __init__(self, filename=None, stream=None, filetype=None, rect=None, width=0 w = r.x1 - r.x0 h = r.y1 - r.y0 - if stream: # stream given, **MUST** be bytes! - assert isinstance(stream, bytes) - c = stream - #len = (size_t) PyBytes_Size(stream); - - if mupdf_cppyy: - buffer_ = mupdf.fz_new_buffer_from_copied_data( c) - data = mupdf.fz_open_buffer( buffer_) + self._name = filename + self.stream = stream + + if stream is not None: + if filename is not None and filetype is None: + # 2025-05-06: Use as the filetype. This is + # reversing precedence - we used to use if both + # were set. + filetype = filename + if isinstance(stream, (bytes, memoryview)): + pass + elif isinstance(stream, bytearray): + stream = bytes(stream) + elif isinstance(stream, io.BytesIO): + stream = stream.getvalue() else: - # Pass raw bytes data to mupdf.fz_open_memory(). This assumes - # that the bytes string will not be modified; i think the - # original PyMuPDF code makes the same assumption. Presumably - # setting self.stream above ensures that the bytes will not be - # garbage collected? - data = mupdf.fz_open_memory(mupdf.python_buffer_data(c), len(c)) - magic = filename - if not magic: - magic = filetype - # fixme: pymupdf does: - # handler = fz_recognize_document(gctx, filetype); - # if (!handler) raise ValueError( MSG_BAD_FILETYPE) - # but prefer to leave fz_open_document_with_stream() to raise. + raise TypeError(f"bad stream: {type(stream)=}.") + self.stream = stream + + assert isinstance(stream, (bytes, memoryview)) + if len(stream) == 0: + # MuPDF raise an exception for this but also generates + # warnings, which is not very helpful for us. So instead we + # raise a specific exception. + raise EmptyFileError('Cannot open empty stream.') + + stream2 = mupdf.fz_open_memory(mupdf.python_buffer_data(stream), len(stream)) try: - doc = mupdf.fz_open_document_with_stream(magic, data) + doc = mupdf.fz_open_document_with_stream(filetype if filetype else '', stream2) except Exception as e: if g_exceptions_verbose > 1: exception_info() - raise FileDataError(f'Failed to open stream') from e - else: - if filename: - if not filetype: - try: - doc = mupdf.fz_open_document(filename) - except Exception as e: - if g_exceptions_verbose > 1: exception_info() - raise FileDataError(f'Failed to open file {filename!r}.') from e - else: - handler = mupdf.ll_fz_recognize_document(filetype) - if handler: - if handler.open: - #log( f'{handler.open=}') - #log( f'{dir(handler.open)=}') - try: - if mupdf_version_tuple >= (1, 24): - stream = mupdf.FzStream(filename) - accel = mupdf.FzStream() - archive = mupdf.FzArchive(None) - if mupdf_version_tuple >= (1, 24, 8): - doc = mupdf.ll_fz_document_handler_open( - handler, - stream.m_internal, - accel.m_internal, - archive.m_internal, - None, # recognize_state - ) - else: - doc = mupdf.ll_fz_document_open_fn_call( - handler.open, - stream.m_internal, - accel.m_internal, - archive.m_internal, - ) - else: - doc = mupdf.ll_fz_document_open_fn_call( handler.open, filename) - except Exception as e: - if g_exceptions_verbose > 1: exception_info() - raise FileDataError(f'Failed to open file {filename!r} as type {filetype!r}.') from e - doc = mupdf.FzDocument( doc) - else: - if mupdf_version_tuple < (1, 24): - if handler.open_with_stream: - data = mupdf.fz_open_file( filename) - doc = mupdf.fz_document_open_with_stream_fn_call( handler.open_with_stream, data) - else: - assert 0 - else: - raise ValueError( MSG_BAD_FILETYPE) + raise FileDataError('Failed to open stream') from e + + elif filename: + assert not stream + if isinstance(filename, str): + pass + elif hasattr(filename, "absolute"): + filename = str(filename) + elif hasattr(filename, "name"): + filename = filename.name + else: + raise TypeError(f"bad filename: {type(filename)=} {filename=}.") + self._name = filename + + # Generate our own specific exceptions. This avoids MuPDF + # generating warnings etc. + if not os.path.exists(filename): + raise FileNotFoundError(f"no such file: '{filename}'") + elif not os.path.isfile(filename): + raise FileDataError(f"'{filename}' is no file") + elif os.path.getsize(filename) == 0: + raise EmptyFileError(f'Cannot open empty file: {filename=}.') + + if filetype: + # Override the type implied by . MuPDF does not + # have a way to do this directly so we open via a stream. + try: + fz_stream = mupdf.fz_open_file(filename) + doc = mupdf.fz_open_document_with_stream(filetype, fz_stream) + except Exception as e: + if g_exceptions_verbose > 1: exception_info() + raise FileDataError(f'Failed to open file {filename!r} as type {filetype!r}.') from e else: - pdf = mupdf.PdfDocument() - doc = mupdf.FzDocument(pdf) + try: + doc = mupdf.fz_open_document(filename) + except Exception as e: + if g_exceptions_verbose > 1: exception_info() + raise FileDataError(f'Failed to open file {filename!r}.') from e + + else: + pdf = mupdf.PdfDocument() + doc = mupdf.FzDocument(pdf) + if w > 0 and h > 0: mupdf.fz_layout_document(doc, w, h, fontsize) elif mupdf.fz_is_document_reflowable(doc): mupdf.fz_layout_document(doc, 400, 600, 11) - this = doc - self.this = this + self.this = doc # fixme: not sure where self.thisown gets initialised in PyMuPDF. # @@ -3098,6 +3095,14 @@ def _addFormFont(self, name, font): v = JM_pdf_obj_from_str( pdf, font) mupdf.pdf_dict_put( fonts, k, v) + def del_toc_item( + self, + idx: int, + ) -> None: + """Delete TOC / bookmark item by index.""" + xref = self.get_outline_xrefs()[idx] + self._remove_toc_item(xref) + def _delToC(self): """Delete the TOC.""" if self.is_closed or self.is_encrypted: @@ -3143,6 +3148,454 @@ def _deleteObject(self, xref): raise ValueError( MSG_BAD_XREF) mupdf.pdf_delete_object(pdf, xref) + def _do_links( + doc1: 'Document', + doc2: 'Document', + from_page: int = -1, + to_page: int = -1, + start_at: int = -1, + ) -> None: + """Insert links contained in copied page range into destination PDF. + + Parameter values **must** equal those of method insert_pdf(), which must + have been previously executed. + """ + #pymupdf.log( 'utils.do_links()') + # -------------------------------------------------------------------------- + # internal function to create the actual "/Annots" object string + # -------------------------------------------------------------------------- + def cre_annot(lnk, xref_dst, pno_src, ctm): + """Create annotation object string for a passed-in link.""" + + r = lnk["from"] * ctm # rect in PDF coordinates + rect = _format_g(tuple(r)) + if lnk["kind"] == LINK_GOTO: + txt = annot_skel["goto1"] # annot_goto + idx = pno_src.index(lnk["page"]) + p = lnk["to"] * ctm # target point in PDF coordinates + annot = txt(xref_dst[idx], p.x, p.y, lnk["zoom"], rect) + + elif lnk["kind"] == LINK_GOTOR: + if lnk["page"] >= 0: + txt = annot_skel["gotor1"] # annot_gotor + pnt = lnk.get("to", Point(0, 0)) # destination point + if type(pnt) is not Point: + pnt = Point(0, 0) + annot = txt( + lnk["page"], + pnt.x, + pnt.y, + lnk["zoom"], + lnk["file"], + lnk["file"], + rect, + ) + else: + txt = annot_skel["gotor2"] # annot_gotor_n + to = get_pdf_str(lnk["to"]) + to = to[1:-1] + f = lnk["file"] + annot = txt(to, f, rect) + + elif lnk["kind"] == LINK_LAUNCH: + txt = annot_skel["launch"] # annot_launch + annot = txt(lnk["file"], lnk["file"], rect) + + elif lnk["kind"] == LINK_URI: + txt = annot_skel["uri"] # annot_uri + annot = txt(lnk["uri"], rect) + + else: + annot = "" + + return annot + + # -------------------------------------------------------------------------- + + # validate & normalize parameters + if from_page < 0: + fp = 0 + elif from_page >= doc2.page_count: + fp = doc2.page_count - 1 + else: + fp = from_page + + if to_page < 0 or to_page >= doc2.page_count: + tp = doc2.page_count - 1 + else: + tp = to_page + + if start_at < 0: + raise ValueError("'start_at' must be >= 0") + sa = start_at + + incr = 1 if fp <= tp else -1 # page range could be reversed + + # lists of source / destination page numbers + pno_src = list(range(fp, tp + incr, incr)) + pno_dst = [sa + i for i in range(len(pno_src))] + + # lists of source / destination page xrefs + xref_src = [] + xref_dst = [] + for i in range(len(pno_src)): + p_src = pno_src[i] + p_dst = pno_dst[i] + old_xref = doc2.page_xref(p_src) + new_xref = doc1.page_xref(p_dst) + xref_src.append(old_xref) + xref_dst.append(new_xref) + + # create the links for each copied page in destination PDF + for i in range(len(xref_src)): + page_src = doc2[pno_src[i]] # load source page + links = page_src.get_links() # get all its links + #log( '{pno_src=}') + #log( '{type(page_src)=}') + #log( '{page_src=}') + #log( '{=i len(links)}') + if len(links) == 0: # no links there + page_src = None + continue + ctm = ~page_src.transformation_matrix # calc page transformation matrix + page_dst = doc1[pno_dst[i]] # load destination page + link_tab = [] # store all link definitions here + for l in links: + if l["kind"] == LINK_GOTO and (l["page"] not in pno_src): + continue # GOTO link target not in copied pages + annot_text = cre_annot(l, xref_dst, pno_src, ctm) + if annot_text: + link_tab.append(annot_text) + if link_tab != []: + page_dst._addAnnot_FromString( tuple(link_tab)) + #log( 'utils.do_links() returning.') + + def _do_widgets( + tar: 'Document', + src: 'Document', + graftmap, + from_page: int = -1, + to_page: int = -1, + start_at: int = -1, + join_duplicates=0, + ) -> None: + """Insert widgets of copied page range into target PDF. + + Parameter values **must** equal those of method insert_pdf() which + must have been previously executed. + """ + if not src.is_form_pdf: # nothing to do: source PDF has no fields + return + + def clean_kid_parents(acro_fields): + """ Make sure all kids have correct "Parent" pointers.""" + for i in range(acro_fields.pdf_array_len()): + parent = acro_fields.pdf_array_get(i) + kids = parent.pdf_dict_get(PDF_NAME("Kids")) + for j in range(kids.pdf_array_len()): + kid = kids.pdf_array_get(j) + kid.pdf_dict_put(PDF_NAME("Parent"), parent) + + def join_widgets(pdf, acro_fields, xref1, xref2, name): + """Called for each pair of widgets having the same name. + + Args: + pdf: target MuPDF document + acro_fields: object Root/AcroForm/Fields + xref1, xref2: widget xrefs having same names + name: (str) the name + + Result: + Defined or updated widget parent that points to both widgets. + """ + + def re_target(pdf, acro_fields, xref1, kids1, xref2, kids2): + """Merge widget in xref2 into "Kids" list of widget xref1. + + Args: + xref1, kids1: target widget and its "Kids" array. + xref2, kids2: source wwidget and its "Kids" array (may be empty). + """ + # make indirect objects from widgets + w1_ind = mupdf.pdf_new_indirect(pdf, xref1, 0) + w2_ind = mupdf.pdf_new_indirect(pdf, xref2, 0) + # find source widget in "Fields" array + idx = acro_fields.pdf_array_find(w2_ind) + acro_fields.pdf_array_delete(idx) + + if not kids2.pdf_is_array(): # source widget has no kids + widget = mupdf.pdf_load_object(pdf, xref2) + + # delete name from widget and insert target as parent + widget.pdf_dict_del(PDF_NAME("T")) + widget.pdf_dict_put(PDF_NAME("Parent"), w1_ind) + + # put in target Kids + kids1.pdf_array_push(w2_ind) + else: # copy source kids to target kids + for i in range(kids2.pdf_array_len()): + kid = kids2.pdf_array_get(i) + kid.pdf_dict_put(PDF_NAME("Parent"), w1_ind) + kid_ind = mupdf.pdf_new_indirect(pdf, kid.pdf_to_num(), 0) + kids1.pdf_array_push(kid_ind) + + def new_target(pdf, acro_fields, xref1, w1, xref2, w2, name): + """Make new "Parent" for two widgets with same name. + + Args: + xref1, w1: first widget + xref2, w2: second widget + name: field name + + Result: + Both widgets have no "Kids". We create a new object with the + name and a "Kids" array containing the widgets. + Original widgets must be removed from AcroForm/Fields. + """ + # make new "Parent" object + new = mupdf.pdf_new_dict(pdf, 5) + new.pdf_dict_put_text_string(PDF_NAME("T"), name) + kids = new.pdf_dict_put_array(PDF_NAME("Kids"), 2) + new_obj = mupdf.pdf_add_object(pdf, new) + new_obj_xref = new_obj.pdf_to_num() + new_ind = mupdf.pdf_new_indirect(pdf, new_obj_xref, 0) + + # copy over some required source widget properties + ft = w1.pdf_dict_get(PDF_NAME("FT")) + w1.pdf_dict_del(PDF_NAME("FT")) + new_obj.pdf_dict_put(PDF_NAME("FT"), ft) + + aa = w1.pdf_dict_get(PDF_NAME("AA")) + w1.pdf_dict_del(PDF_NAME("AA")) + new_obj.pdf_dict_put(PDF_NAME("AA"), aa) + + # remove name field, insert "Parent" field in source widgets + w1.pdf_dict_del(PDF_NAME("T")) + w1.pdf_dict_put(PDF_NAME("Parent"), new_ind) + w2.pdf_dict_del(PDF_NAME("T")) + w2.pdf_dict_put(PDF_NAME("Parent"), new_ind) + + # put source widgets in "kids" array + ind1 = mupdf.pdf_new_indirect(pdf, xref1, 0) + ind2 = mupdf.pdf_new_indirect(pdf, xref2, 0) + kids.pdf_array_push(ind1) + kids.pdf_array_push(ind2) + + # remove source widgets from "AcroForm/Fields" + idx = acro_fields.pdf_array_find(ind1) + acro_fields.pdf_array_delete(idx) + idx = acro_fields.pdf_array_find(ind2) + acro_fields.pdf_array_delete(idx) + + acro_fields.pdf_array_push(new_ind) + + w1 = mupdf.pdf_load_object(pdf, xref1) + w2 = mupdf.pdf_load_object(pdf, xref2) + kids1 = w1.pdf_dict_get(PDF_NAME("Kids")) + kids2 = w2.pdf_dict_get(PDF_NAME("Kids")) + + # check which widget has a suitable "Kids" array + if kids1.pdf_is_array(): + re_target(pdf, acro_fields, xref1, kids1, xref2, kids2) # pylint: disable=arguments-out-of-order + elif kids2.pdf_is_array(): + re_target(pdf, acro_fields, xref2, kids2, xref1, kids1) # pylint: disable=arguments-out-of-order + else: + new_target(pdf, acro_fields, xref1, w1, xref2, w2, name) # pylint: disable=arguments-out-of-order + + def get_kids(parent, kids_list): + """Return xref list of leaf kids for a parent. + + Call with an empty list. + """ + kids = mupdf.pdf_dict_get(parent, PDF_NAME("Kids")) + if not kids.pdf_is_array(): + return kids_list + for i in range(kids.pdf_array_len()): + kid = kids.pdf_array_get(i) + if mupdf.pdf_is_dict(mupdf.pdf_dict_get(kid, PDF_NAME("Kids"))): + kids_list = get_kids(kid, kids_list) + else: + kids_list.append(kid.pdf_to_num()) + return kids_list + + def kids_xrefs(widget): + """Get the xref of top "Parent" and the list of leaf widgets.""" + kids_list = [] + parent = mupdf.pdf_dict_get(widget, PDF_NAME("Parent")) + parent_xref = parent.pdf_to_num() + if parent_xref == 0: + return parent_xref, kids_list + kids_list = get_kids(parent, kids_list) + return parent_xref, kids_list + + def deduplicate_names(pdf, acro_fields, join_duplicates=False): + """Handle any widget name duplicates caused by the merge.""" + names = {} # key is a widget name, value a list of widgets having it. + + # extract all names and widgets in "AcroForm/Fields" + for i in range(mupdf.pdf_array_len(acro_fields)): + wobject = mupdf.pdf_array_get(acro_fields, i) + xref = wobject.pdf_to_num() + + # extract widget name and collect widget(s) using it + T = mupdf.pdf_dict_get_text_string(wobject, PDF_NAME("T")) + xrefs = names.get(T, []) + xrefs.append(xref) + names[T] = xrefs + + for name, xrefs in names.items(): + if len(xrefs) < 2: + continue + xref0, xref1 = xrefs[:2] # only exactly 2 should occur! + if join_duplicates: # combine fields with equal names + join_widgets(pdf, acro_fields, xref0, xref1, name) + else: # make field names unique + newname = name + f" [{xref1}]" # append this to the name + wobject = mupdf.pdf_load_object(pdf, xref1) + wobject.pdf_dict_put_text_string(PDF_NAME("T"), newname) + + clean_kid_parents(acro_fields) + + def get_acroform(doc): + """Retrieve the AcroForm dictionary form a PDF.""" + pdf = mupdf.pdf_document_from_fz_document(doc) + # AcroForm (= central form field info) + return mupdf.pdf_dict_getp(mupdf.pdf_trailer(pdf), "Root/AcroForm") + + tarpdf = mupdf.pdf_document_from_fz_document(tar) + srcpdf = mupdf.pdf_document_from_fz_document(src) + + if tar.is_form_pdf: + # target is a Form PDF, so use it to include source fields + acro = get_acroform(tar) + # Important arrays in AcroForm + acro_fields = acro.pdf_dict_get(PDF_NAME("Fields")) + tar_co = acro.pdf_dict_get(PDF_NAME("CO")) + if not tar_co.pdf_is_array(): + tar_co = acro.pdf_dict_put_array(PDF_NAME("CO"), 5) + else: + # target is no Form PDF, so copy over source AcroForm + acro = mupdf.pdf_deep_copy_obj(get_acroform(src)) # make a copy + + # Clear "Fields" and "CO" arrays: will be populated by page fields. + # This is required to avoid copying unneeded objects. + acro.pdf_dict_del(PDF_NAME("Fields")) + acro.pdf_dict_put_array(PDF_NAME("Fields"), 5) + acro.pdf_dict_del(PDF_NAME("CO")) + acro.pdf_dict_put_array(PDF_NAME("CO"), 5) + + # Enrich AcroForm for copying to target + acro_graft = mupdf.pdf_graft_mapped_object(graftmap, acro) + + # Insert AcroForm into target PDF + acro_tar = mupdf.pdf_add_object(tarpdf, acro_graft) + acro_fields = acro_tar.pdf_dict_get(PDF_NAME("Fields")) + tar_co = acro_tar.pdf_dict_get(PDF_NAME("CO")) + + # get its xref and insert it into target catalog + tar_xref = acro_tar.pdf_to_num() + acro_tar_ind = mupdf.pdf_new_indirect(tarpdf, tar_xref, 0) + root = mupdf.pdf_dict_get(mupdf.pdf_trailer(tarpdf), PDF_NAME("Root")) + root.pdf_dict_put(PDF_NAME("AcroForm"), acro_tar_ind) + + if from_page <= to_page: + src_range = range(from_page, to_page + 1) + else: + src_range = range(from_page, to_page - 1, -1) + + parents = {} # information about widget parents + + # remove "P" owning page reference from all widgets of all source pages + for i in src_range: + src_page = src[i] + for xref in [ + xref + for xref, wtype, _ in src_page.annot_xrefs() + if wtype == mupdf.PDF_ANNOT_WIDGET # pylint: disable=no-member + ]: + w_obj = mupdf.pdf_load_object(srcpdf, xref) + w_obj.pdf_dict_del(PDF_NAME("P")) + + # get the widget's parent structure + parent_xref, old_kids = kids_xrefs(w_obj) + if parent_xref: + parents[parent_xref] = { + "new_xref": 0, + "old_kids": old_kids, + "new_kids": [], + } + # Copy over Parent widgets first - they are not page-dependent + for xref in parents.keys(): # pylint: disable=consider-using-dict-items + parent = mupdf.pdf_load_object(srcpdf, xref) + parent_graft = mupdf.pdf_graft_mapped_object(graftmap, parent) + parent_tar = mupdf.pdf_add_object(tarpdf, parent_graft) + kids_xrefs_new = get_kids(parent_tar, []) + parent_xref_new = parent_tar.pdf_to_num() + parent_ind = mupdf.pdf_new_indirect(tarpdf, parent_xref_new, 0) + acro_fields.pdf_array_push(parent_ind) + parents[xref]["new_xref"] = parent_xref_new + parents[xref]["new_kids"] = kids_xrefs_new + + for i in range(len(src_range)): + # read first copied over page in target + tar_page = tar[start_at + i] + + # read the original page in the source PDF + src_page = src[src_range[i]] + + # now walk through source page widgets and copy over + w_xrefs = [ # widget xrefs of the source page + xref + for xref, wtype, _ in src_page.annot_xrefs() + if wtype == mupdf.PDF_ANNOT_WIDGET # pylint: disable=no-member + ] + if not w_xrefs: # no widgets on this source page + continue + + # convert to formal PDF page + tar_page_pdf = mupdf.pdf_page_from_fz_page(tar_page) + + # extract annotations array + tar_annots = mupdf.pdf_dict_get(tar_page_pdf.obj(), PDF_NAME("Annots")) + if not mupdf.pdf_is_array(tar_annots): + tar_annots = mupdf.pdf_dict_put_array( + tar_page_pdf.obj(), PDF_NAME("Annots"), 5 + ) + + for xref in w_xrefs: + w_obj = mupdf.pdf_load_object(srcpdf, xref) + + # check if field takes part in inter-field validations + is_aac = mupdf.pdf_is_dict(mupdf.pdf_dict_getp(w_obj, "AA/C")) + + # check if parent of widget already in target + parent_xref = mupdf.pdf_to_num( + w_obj.pdf_dict_get(PDF_NAME("Parent")) + ) + if parent_xref == 0: # parent not in target yet + try: + w_obj_graft = mupdf.pdf_graft_mapped_object(graftmap, w_obj) + except Exception as e: + message_warning(f"cannot copy widget at {xref=}: {e}") + continue + w_obj_tar = mupdf.pdf_add_object(tarpdf, w_obj_graft) + tar_xref = w_obj_tar.pdf_to_num() + w_obj_tar_ind = mupdf.pdf_new_indirect(tarpdf, tar_xref, 0) + mupdf.pdf_array_push(tar_annots, w_obj_tar_ind) + mupdf.pdf_array_push(acro_fields, w_obj_tar_ind) + else: + parent = parents[parent_xref] + idx = parent["old_kids"].index(xref) # search for xref in parent + tar_xref = parent["new_kids"][idx] + w_obj_tar_ind = mupdf.pdf_new_indirect(tarpdf, tar_xref, 0) + mupdf.pdf_array_push(tar_annots, w_obj_tar_ind) + + # Into "AcroForm/CO" if a computation field. + if is_aac: + mupdf.pdf_array_push(tar_co, w_obj_tar_ind) + + deduplicate_names(tarpdf, acro_fields, join_duplicates=join_duplicates) + def _embeddedFileGet(self, idx): pdf = _as_pdf_document(self) names = mupdf.pdf_dict_getl( @@ -3238,7 +3691,7 @@ def _embfile_info(self, idx, infodict): infodict[dictkey_ufilename] = JM_EscapeStrFromStr(name) name = mupdf.pdf_to_text_string(mupdf.pdf_dict_get(o, PDF_NAME('Desc'))) - infodict[dictkey_desc] = JM_UnicodeFromStr(name) + infodict[dictkey_descr] = JM_UnicodeFromStr(name) len_ = -1 DL = -1 @@ -3446,8 +3899,10 @@ def _get_page_labels(self): n = mupdf.pdf_array_len(kids) for i in range(n): nums = mupdf.pdf_resolve_indirect( - mupdf.pdf_dict_get( mupdf.pdf_array_get(kids, i)), - PDF_NAME('Nums'), + mupdf.pdf_dict_get( + mupdf.pdf_array_get(kids, i), + PDF_NAME('Nums'), + ) ) JM_get_page_labels(rc, nums) return rc @@ -3915,28 +4370,7 @@ def del_xml_metadata(self): def delete_page(self, pno: int =-1): """ Delete one page from a PDF. """ - if not self.is_pdf: - raise ValueError("is no PDF") - if self.is_closed: - raise ValueError("document closed") - - page_count = self.page_count - while pno < 0: - pno += page_count - - if pno >= page_count: - raise ValueError("bad page number(s)") - - # remove TOC bookmarks pointing to deleted page - toc = self.get_toc() - ol_xrefs = self.get_outline_xrefs() - for i, item in enumerate(toc): - if item[2] == pno + 1: - self._remove_toc_item(ol_xrefs[i]) - - self._remove_links_to(frozenset((pno,))) - self._delete_page(pno) - self._reset_page_refs() + return self.delete_pages(pno) def delete_pages(self, *args, **kw): """Delete pages from a PDF. @@ -3946,6 +4380,7 @@ def delete_pages(self, *args, **kw): specify the first/last page to delete. Or a list/tuple/range object, which can contain arbitrary page numbers. + Or a single integer page number. """ if not self.is_pdf: raise ValueError("is no PDF") @@ -3978,11 +4413,13 @@ def delete_pages(self, *args, **kw): if not f <= t < page_count: raise ValueError("bad page number(s)") numbers = tuple(range(f, t + 1)) + elif isinstance(args[0], int): + pno = args[0] + while pno < 0: + pno += page_count + numbers = (pno,) else: - r = args[0] - if type(r) not in (int, range, list, tuple): - raise ValueError("need int or sequence if one argument") - numbers = tuple(r) + numbers = tuple(args[0]) numbers = list(map(int, set(numbers))) # ensure unique integers if numbers == []: @@ -4006,7 +4443,7 @@ def delete_pages(self, *args, **kw): def embfile_add(self, name: str, - buffer_: typing.ByteString, + buffer_: ByteString, filename: OptStr =None, ufilename: OptStr =None, desc: OptStr =None, @@ -4188,8 +4625,7 @@ def extract_image(self, xref): raise ValueError("document closed or encrypted") pdf = _as_pdf_document(self) - img_type = 0 - smask = 0 + if not _INRANGE(xref, 1, mupdf.pdf_xref_len(pdf)-1): raise ValueError( MSG_BAD_XREF) @@ -4202,65 +4638,15 @@ def extract_image(self, xref): o = mupdf.pdf_dict_geta(obj, PDF_NAME('SMask'), PDF_NAME('Mask')) if o.m_internal: smask = mupdf.pdf_to_num(o) - - if mupdf.pdf_is_jpx_image(obj): - img_type = mupdf.FZ_IMAGE_JPX - res = mupdf.pdf_load_stream(obj) - ext = "jpx" - if JM_is_jbig2_image(obj): - img_type = mupdf.FZ_IMAGE_JBIG2 - res = mupdf.pdf_load_stream(obj) - ext = "jb2" - res = mupdf.pdf_load_raw_stream(obj) - if img_type == mupdf.FZ_IMAGE_UNKNOWN: - res = mupdf.pdf_load_raw_stream(obj) - _, c = mupdf.fz_buffer_storage(res) - #log( '{=_ c}') - img_type = mupdf.fz_recognize_image_format(c) - ext = JM_image_extension(img_type) - if img_type == mupdf.FZ_IMAGE_UNKNOWN: - res = None - img = mupdf.pdf_load_image(pdf, obj) - ll_cbuf = mupdf.ll_fz_compressed_image_buffer(img.m_internal) - if (ll_cbuf - and ll_cbuf.params.type not in ( - mupdf.FZ_IMAGE_RAW, - mupdf.FZ_IMAGE_FAX, - mupdf.FZ_IMAGE_FLATE, - mupdf.FZ_IMAGE_LZW, - mupdf.FZ_IMAGE_RLD, - ) - ): - img_type = ll_cbuf.params.type - ext = JM_image_extension(img_type) - res = mupdf.FzBuffer(mupdf.ll_fz_keep_buffer(ll_cbuf.buffer)) - else: - res = mupdf.fz_new_buffer_from_image_as_png( - img, - mupdf.FzColorParams(mupdf.fz_default_color_params), - ) - ext = "png" else: - img = mupdf.fz_new_image_from_buffer(res) - - xres, yres = mupdf.fz_image_resolution(img) - width = img.w() - height = img.h() - colorspace = img.n() - bpc = img.bpc() - cs_name = mupdf.fz_colorspace_name(img.colorspace()) + smask = 0 + # load the image + img = mupdf.pdf_load_image(pdf, obj) rc = dict() - rc[ dictkey_ext] = ext - rc[ dictkey_smask] = smask - rc[ dictkey_width] = width - rc[ dictkey_height] = height - rc[ dictkey_colorspace] = colorspace - rc[ dictkey_bpc] = bpc - rc[ dictkey_xres] = xres - rc[ dictkey_yres] = yres - rc[ dictkey_cs_name] = cs_name - rc[ dictkey_image] = JM_BinFromBuffer(res) + _make_image_dict(img, rc) + rc[dictkey_smask] = smask + rc[dictkey_cs_name] = mupdf.fz_colorspace_name(img.colorspace()) return rc def ez_save( @@ -4356,7 +4742,7 @@ def fullcopy_page(self, pno, to=-1): res = JM_read_contents( page1) # create new /Contents object for page2 - if res.m_internal: + if res and res.m_internal: #contents = mupdf.pdf_add_stream( pdf, mupdf.fz_new_buffer_from_copied_data( b" ", 1), NULL, 0) contents = mupdf.pdf_add_stream( pdf, mupdf.fz_new_buffer_from_copied_data( b" "), mupdf.PdfObj(), 0) JM_update_stream( pdf, contents, res, 1) @@ -4373,6 +4759,107 @@ def fullcopy_page(self, pno, to=-1): self._reset_page_refs() + def get_char_widths( + doc: 'Document', + xref: int, + limit: int = 256, + idx: int = 0, + fontdict: OptDict = None, + ) -> list: + """Get list of glyph information of a font. + + Notes: + Must be provided by its XREF number. If we already dealt with the + font, it will be recorded in doc.FontInfos. Otherwise we insert an + entry there. + Finally we return the glyphs for the font. This is a list of + (glyph, width) where glyph is an integer controlling the char + appearance, and width is a float controlling the char's spacing: + width * fontsize is the actual space. + For 'simple' fonts, glyph == ord(char) will usually be true. + Exceptions are 'Symbol' and 'ZapfDingbats'. We are providing data for these directly here. + """ + fontinfo = CheckFontInfo(doc, xref) + if fontinfo is None: # not recorded yet: create it + if fontdict is None: + name, ext, stype, asc, dsc = utils._get_font_properties(doc, xref) + fontdict = { + "name": name, + "type": stype, + "ext": ext, + "ascender": asc, + "descender": dsc, + } + else: + name = fontdict["name"] + ext = fontdict["ext"] + stype = fontdict["type"] + ordering = fontdict["ordering"] + simple = fontdict["simple"] + + if ext == "": + raise ValueError("xref is not a font") + + # check for 'simple' fonts + if stype in ("Type1", "MMType1", "TrueType"): + simple = True + else: + simple = False + + # check for CJK fonts + if name in ("Fangti", "Ming"): + ordering = 0 + elif name in ("Heiti", "Song"): + ordering = 1 + elif name in ("Gothic", "Mincho"): + ordering = 2 + elif name in ("Dotum", "Batang"): + ordering = 3 + else: + ordering = -1 + + fontdict["simple"] = simple + + if name == "ZapfDingbats": + glyphs = zapf_glyphs + elif name == "Symbol": + glyphs = symbol_glyphs + else: + glyphs = None + + fontdict["glyphs"] = glyphs + fontdict["ordering"] = ordering + fontinfo = [xref, fontdict] + doc.FontInfos.append(fontinfo) + else: + fontdict = fontinfo[1] + glyphs = fontdict["glyphs"] + simple = fontdict["simple"] + ordering = fontdict["ordering"] + + if glyphs is None: + oldlimit = 0 + else: + oldlimit = len(glyphs) + + mylimit = max(256, limit) + + if mylimit <= oldlimit: + return glyphs + + if ordering < 0: # not a CJK font + glyphs = doc._get_char_widths( + xref, fontdict["name"], fontdict["ext"], fontdict["ordering"], mylimit, idx + ) + else: # CJK fonts use char codes and width = 1 + glyphs = None + + fontdict["glyphs"] = glyphs + fontinfo[1] = fontdict + UpdateFontInfo(doc, fontinfo) + + return glyphs + def get_layer(self, config=-1): """Content of ON, OFF, RBGroups of an OC layer.""" pdf = _as_pdf_document(self) @@ -4430,6 +4917,23 @@ def get_new_xref(self): xref = mupdf.pdf_create_object(pdf) return xref + def get_oc(doc: 'Document', xref: int) -> int: + """Return optional content object xref for an image or form xobject. + + Args: + xref: (int) xref number of an image or form xobject. + """ + if doc.is_closed or doc.is_encrypted: + raise ValueError("document close or encrypted") + t, name = doc.xref_get_key(xref, "Subtype") + if t != "name" or name not in ("/Image", "/Form"): + raise ValueError("bad object type at xref %i" % xref) + t, oc = doc.xref_get_key(xref, "OC") + if t != "xref": + return 0 + rc = int(oc.replace("0 R", "")) + return rc + def get_ocgs(self): """Show existing optional content groups.""" ci = mupdf.pdf_new_name( "CreatorInfo") @@ -4462,7 +4966,11 @@ def get_ocgs(self): o = mupdf.pdf_array_get( intent, j) if mupdf.pdf_is_name( o): intents.append( mupdf.pdf_to_name( o)) - hidden = mupdf.pdf_is_ocg_hidden( pdf, mupdf.PdfObj(), usage, ocg) + if mupdf_version_tuple >= (1, 26, 11): + resource_stack = mupdf.PdfResourceStack() + hidden = mupdf.pdf_is_ocg_hidden( pdf, resource_stack, usage, ocg) + else: + hidden = mupdf.pdf_is_ocg_hidden( pdf, mupdf.PdfObj(), usage, ocg) item = { "name": name, "intent": intents, @@ -4473,6 +4981,73 @@ def get_ocgs(self): rc[ temp] = item return rc + def get_ocmd(doc: 'Document', xref: int) -> dict: + """Return the definition of an OCMD (optional content membership dictionary). + + Recognizes PDF dict keys /OCGs (PDF array of OCGs), /P (policy string) and + /VE (visibility expression, PDF array). Via string manipulation, this + info is converted to a Python dictionary with keys "xref", "ocgs", "policy" + and "ve" - ready to recycle as input for 'set_ocmd()'. + """ + + if xref not in range(doc.xref_length()): + raise ValueError("bad xref") + text = doc.xref_object(xref, compressed=True) + if "/Type/OCMD" not in text: + raise ValueError("bad object type") + textlen = len(text) + + p0 = text.find("/OCGs[") # look for /OCGs key + p1 = text.find("]", p0) + if p0 < 0 or p1 < 0: # no OCGs found + ocgs = None + else: + ocgs = text[p0 + 6 : p1].replace("0 R", " ").split() + ocgs = list(map(int, ocgs)) + + p0 = text.find("/P/") # look for /P policy key + if p0 < 0: + policy = None + else: + p1 = text.find("ff", p0) + if p1 < 0: + p1 = text.find("on", p0) + if p1 < 0: # some irregular syntax + raise ValueError("bad object at xref") + else: + policy = text[p0 + 3 : p1 + 2] + + p0 = text.find("/VE[") # look for /VE visibility expression key + if p0 < 0: # no visibility expression found + ve = None + else: + lp = rp = 0 # find end of /VE by finding last ']'. + p1 = p0 + while lp < 1 or lp != rp: + p1 += 1 + if not p1 < textlen: # some irregular syntax + raise ValueError("bad object at xref") + if text[p1] == "[": + lp += 1 + if text[p1] == "]": + rp += 1 + # p1 now positioned at the last "]" + ve = text[p0 + 3 : p1 + 1] # the PDF /VE array + ve = ( + ve.replace("/And", '"and",') + .replace("/Not", '"not",') + .replace("/Or", '"or",') + ) + ve = ve.replace(" 0 R]", "]").replace(" 0 R", ",").replace("][", "],[") + import json + try: + ve = json.loads(ve) + except Exception: + exception_info() + message(f"bad /VE key: {ve!r}") + raise + return {"xref": xref, "ocgs": ocgs, "policy": policy, "ve": ve} + def get_outline_xrefs(self): """Get list of outline xref numbers.""" xrefs = [] @@ -4505,7 +5080,7 @@ def get_page_fonts(self, pno: int, full: bool =False) -> list: exception_info() raise ValueError("need a Page or page number") val = self._getPageInfo(pno, 1) - if full is False: + if not full: return [v[:-1] for v in val] return val @@ -4517,27 +5092,119 @@ def get_page_images(self, pno: int, full: bool =False) -> list: if not self.is_pdf: return () val = self._getPageInfo(pno, 2) - if full is False: + if not full: return [v[:-1] for v in val] return val - def get_page_xobjects(self, pno: int) -> list: - """Retrieve a list of XObjects used on a page. + def get_page_labels(self): + """Return page label definitions in PDF document. + + Returns: + A list of dictionaries with the following format: + {'startpage': int, 'prefix': str, 'style': str, 'firstpagenum': int}. """ - if self.is_closed or self.is_encrypted: - raise ValueError("document closed or encrypted") - if not self.is_pdf: - return () - val = self._getPageInfo(pno, 3) - return val + # Jorj McKie, 2021-01-10 + return [utils.rule_dict(item) for item in self._get_page_labels()] - def get_sigflags(self): - """Get the /SigFlags value.""" - pdf = _as_pdf_document(self, required=0) - if not pdf.m_internal: - return -1 # not a PDF - sigflags = mupdf.pdf_dict_getl( - mupdf.pdf_trailer(pdf), + def get_page_numbers(doc, label, only_one=False): + """Return a list of page numbers with the given label. + + Args: + doc: PDF document object (resp. 'self'). + label: (str) label. + only_one: (bool) stop searching after first hit. + Returns: + List of page numbers having this label. + """ + # Jorj McKie, 2021-01-06 + + numbers = [] + if not label: + return numbers + labels = doc._get_page_labels() + if labels == []: + return numbers + for i in range(doc.page_count): + plabel = utils.get_label_pno(i, labels) + if plabel == label: + numbers.append(i) + if only_one: + break + return numbers + + def get_page_pixmap( + doc: 'Document', + pno: int, + *, + matrix: matrix_like = None, + dpi=None, + colorspace: Colorspace = None, + clip: rect_like = None, + alpha: bool = False, + annots: bool = True, + ) -> 'Pixmap': + """Create pixmap of document page by page number. + + Notes: + Convenience function calling page.get_pixmap. + Args: + pno: (int) page number + matrix: pymupdf.Matrix for transformation (default: pymupdf.Identity). + colorspace: (str,pymupdf.Colorspace) rgb, rgb, gray - case ignored, default csRGB. + clip: (irect-like) restrict rendering to this area. + alpha: (bool) include alpha channel + annots: (bool) also render annotations + """ + if matrix is None: + matrix = Identity + if colorspace is None: + colorspace = csRGB + return doc[pno].get_pixmap( + matrix=matrix, + dpi=dpi, colorspace=colorspace, + clip=clip, + alpha=alpha, + annots=annots + ) + + def get_page_text( + doc: 'Document', + pno: int, + option: str = "text", + clip: rect_like = None, + flags: OptInt = None, + textpage: 'TextPage' = None, + sort: bool = False, + ) -> typing.Any: + """Extract a document page's text by page number. + + Notes: + Convenience function calling page.get_text(). + Args: + pno: page number + option: (str) text, words, blocks, html, dict, json, rawdict, xhtml or xml. + Returns: + output from page.TextPage(). + """ + return doc[pno].get_text(option, clip=clip, flags=flags, sort=sort) + + def get_page_xobjects(self, pno: int) -> list: + """Retrieve a list of XObjects used on a page. + """ + if self.is_closed or self.is_encrypted: + raise ValueError("document closed or encrypted") + if not self.is_pdf: + return () + val = self._getPageInfo(pno, 3) + return val + + def get_sigflags(self): + """Get the /SigFlags value.""" + pdf = _as_pdf_document(self, required=0) + if not pdf.m_internal: + return -1 # not a PDF + sigflags = mupdf.pdf_dict_getl( + mupdf.pdf_trailer(pdf), PDF_NAME('Root'), PDF_NAME('AcroForm'), PDF_NAME('SigFlags'), @@ -4547,6 +5214,60 @@ def get_sigflags(self): sigflag = mupdf.pdf_to_int(sigflags) return sigflag + def get_toc( + doc: 'Document', + simple: bool = True, + ) -> list: + """Create a table of contents. + + Args: + simple: a bool to control output. Returns a list, where each entry consists of outline level, title, page number and link destination (if simple = False). For details see PyMuPDF's documentation. + """ + def recurse(olItem, liste, lvl): + """Recursively follow the outline item chain and record item information in a list.""" + while olItem and olItem.this.m_internal: + if olItem.title: + title = olItem.title + else: + title = " " + + if not olItem.is_external: + if olItem.uri: + if olItem.page == -1: + resolve = doc.resolve_link(olItem.uri) + page = resolve[0] + 1 + else: + page = olItem.page + 1 + else: + page = -1 + else: + page = -1 + + if not simple: + link = utils.getLinkDict(olItem, doc) + liste.append([lvl, title, page, link]) + else: + liste.append([lvl, title, page]) + + if olItem.down: + liste = recurse(olItem.down, liste, lvl + 1) + olItem = olItem.next + return liste + + # ensure document is open + if doc.is_closed: + raise ValueError("document closed") + doc.init_doc() + olItem = doc.outline + if not olItem: + return [] + lvl = 1 + liste = [] + toc = recurse(olItem, liste, lvl) + if doc.is_pdf and not simple: + doc._extend_toc_items(toc) + return toc + def get_xml_metadata(self): """Get document XML metadata.""" xml = None @@ -4564,6 +5285,31 @@ def get_xml_metadata(self): rc = '' return rc + def has_annots(doc: 'Document') -> bool: + """Check whether there are annotations on any page.""" + if doc.is_closed: + raise ValueError("document closed") + if not doc.is_pdf: + raise ValueError("is no PDF") + for i in range(doc.page_count): + for item in doc.page_annot_xrefs(i): + # pylint: disable=no-member + if not (item[1] == mupdf.PDF_ANNOT_LINK or item[1] == mupdf.PDF_ANNOT_WIDGET): # pylint: disable=no-member + return True + return False + + def has_links(doc: 'Document') -> bool: + """Check whether there are links on any page.""" + if doc.is_closed: + raise ValueError("document closed") + if not doc.is_pdf: + raise ValueError("is no PDF") + for i in range(doc.page_count): + for item in doc.page_annot_xrefs(i): + if item[1] == mupdf.PDF_ANNOT_LINK: # pylint: disable=no-member + return True + return False + def init_doc(self): if self.is_encrypted: raise ValueError("cannot initialize - document still encrypted") @@ -4629,15 +5375,48 @@ def insert_file(self, final=final, ) + def insert_page( + doc: 'Document', + pno: int, + text: typing.Union[str, list, None] = None, + fontsize: float = 11, + width: float = 595, + height: float = 842, + fontname: str = "helv", + fontfile: OptStr = None, + color: OptSeq = (0,), + ) -> int: + """Create a new PDF page and insert some text. + + Notes: + Function combining pymupdf.Document.new_page() and pymupdf.Page.insert_text(). + For parameter details see these methods. + """ + page = doc.new_page(pno=pno, width=width, height=height) + if not bool(text): + return 0 + rc = page.insert_text( + (50, 72), + text, + fontsize=fontsize, + fontname=fontname, + fontfile=fontfile, + color=color, + ) + return rc + def insert_pdf( self, docsrc, + *, from_page=-1, to_page=-1, start_at=-1, rotate=-1, links=1, annots=1, + widgets=1, + join_duplicates=0, show_progress=0, final=1, _gmap=None, @@ -4652,6 +5431,8 @@ def insert_pdf( rotate: (int) rotate copied pages, default -1 is no change. links: (int/bool) whether to also copy links. annots: (int/bool) whether to also copy annotations. + widgets: (int/bool) whether to also copy form fields. + join_duplicates: (int/bool) join or rename duplicate widget names. show_progress: (int) progress message interval, 0 is no messages. final: (bool) indicates last insertion from this source PDF. _gmap: internal use only @@ -4669,6 +5450,26 @@ def insert_pdf( sa = start_at if sa < 0: sa = self.page_count + outCount = self.page_count + srcCount = docsrc.page_count + + # local copies of page numbers + fp = from_page + tp = to_page + sa = start_at + + # normalize page numbers + fp = max(fp, 0) # -1 = first page + fp = min(fp, srcCount - 1) # but do not exceed last page + + if tp < 0: + tp = srcCount - 1 # -1 = last page + tp = min(tp, srcCount - 1) # but do not exceed last page + + if sa < 0: + sa = outCount # -1 = behind last page + sa = min(sa, outCount) # but that is also the limit + if len(docsrc) > show_progress > 0: inname = os.path.basename(docsrc.name) if not inname: @@ -4706,25 +5507,6 @@ def insert_pdf( else: pdfout = _as_pdf_document(self) pdfsrc = _as_pdf_document(docsrc) - outCount = mupdf.fz_count_pages(self) - srcCount = mupdf.fz_count_pages(docsrc.this) - - # local copies of page numbers - fp = from_page - tp = to_page - sa = start_at - - # normalize page numbers - fp = max(fp, 0) # -1 = first page - fp = min(fp, srcCount - 1) # but do not exceed last page - - if tp < 0: - tp = srcCount - 1 # -1 = last page - tp = min(tp, srcCount - 1) # but do not exceed last page - - if sa < 0: - sa = outCount # -1 = behind last page - sa = min(sa, outCount) # but that is also the limit if not pdfout.m_internal or not pdfsrc.m_internal: raise TypeError( "source or target not a PDF") @@ -4735,7 +5517,9 @@ def insert_pdf( self._reset_page_refs() if links: #log( 'insert_pdf(): calling self._do_links()') - self._do_links(docsrc, from_page = from_page, to_page = to_page, start_at = sa) + self._do_links(docsrc, from_page=fp, to_page=tp, start_at=sa) + if widgets: + self._do_widgets(docsrc, _gmap, from_page=fp, to_page=tp, start_at=sa, join_duplicates=join_duplicates) if final == 1: self.Graftmaps[isrt] = None #log( 'insert_pdf(): returning') @@ -4927,8 +5711,6 @@ def language(self): lang = mupdf.pdf_document_language(pdf) if lang == mupdf.FZ_LANG_UNSET: return - if mupdf_version_tuple < (1, 23, 7): - assert 0, 'not implemented yet' return mupdf.fz_string_from_text_language2(lang) @property @@ -5123,6 +5905,24 @@ def needs_pass(self): ret = mupdf.fz_needs_password( document) return ret + def new_page( + doc: 'Document', + pno: int = -1, + width: float = 595, + height: float = 842, + ) -> Page: + """Create and return a new page object. + + Args: + pno: (int) insert before this page. Default: after last page. + width: (float) page width in points. Default: 595 (ISO A4 width). + height: (float) page height in points. Default 842 (ISO A4 height). + Returns: + A pymupdf.Page object. + """ + doc._newPage(pno, width=width, height=height) + return doc[pno] + def next_location(self, page_id): """Get (chapter, page) of next page.""" if self.is_closed or self.is_encrypted: @@ -5264,6 +6064,8 @@ def pages(self, start: OptInt =None, stop: OptInt =None, step: OptInt =None) -> Arguments have the same meaning as for the range() built-in. """ + if not self.page_count: + return # set the start value start = start or 0 while start < 0: @@ -5426,6 +6228,106 @@ def resolve_link(self, uri=None, chapters=0): pno = mupdf.fz_page_number_from_location(self.this, loc) return pno, xp, yp + def rewrite_images( + self, + dpi_threshold=None, + dpi_target=0, + quality=0, + lossy=True, + lossless=True, + bitonal=True, + color=True, + gray=True, + set_to_gray=False, + options=None, + ): + """Rewrite images in a PDF document. + + The typical use case is to reduce the size of the PDF by recompressing + images. Default parameters will convert all images to JPEG where + possible, using the specified resolutions and quality. Exclude + undesired images by setting parameters to False. + Args: + dpi_threshold: look at images with a larger DPI only. + dpi_target: change eligible images to this DPI. + quality: Quality of the recompressed images (0-100). + lossy: process lossy image types (e.g. JPEG). + lossless: process lossless image types (e.g. PNG). + bitonal: process black-and-white images (e.g. FAX) + color: process colored images. + gray: process gray images. + set_to_gray: whether to change the PDF to gray at process start. + options: (PdfImageRewriterOptions) Custom options for image + rewriting (optional). Expert use only. If provided, other + parameters are ignored, except set_to_gray. + """ + quality_str = str(quality) + if not dpi_threshold: + dpi_threshold = dpi_target = 0 + if dpi_target > 0 and dpi_target >= dpi_threshold: + raise ValueError("{dpi_target=} must be less than {dpi_threshold=}") + template_opts = mupdf.PdfImageRewriterOptions() + dir1 = set(dir(template_opts)) # for checking that only existing options are set + if not options: + opts = mupdf.PdfImageRewriterOptions() + if bitonal: + opts.bitonal_image_recompress_method = mupdf.FZ_RECOMPRESS_FAX + opts.bitonal_image_subsample_method = mupdf.FZ_SUBSAMPLE_AVERAGE + opts.bitonal_image_subsample_to = dpi_target + opts.bitonal_image_recompress_quality = quality_str + opts.bitonal_image_subsample_threshold = dpi_threshold + if color: + if lossless: + opts.color_lossless_image_recompress_method = mupdf.FZ_RECOMPRESS_JPEG + opts.color_lossless_image_subsample_method = mupdf.FZ_SUBSAMPLE_AVERAGE + opts.color_lossless_image_subsample_to = dpi_target + opts.color_lossless_image_subsample_threshold = dpi_threshold + opts.color_lossless_image_recompress_quality = quality_str + if lossy: + opts.color_lossy_image_recompress_method = mupdf.FZ_RECOMPRESS_JPEG + opts.color_lossy_image_subsample_method = mupdf.FZ_SUBSAMPLE_AVERAGE + opts.color_lossy_image_subsample_threshold = dpi_threshold + opts.color_lossy_image_subsample_to = dpi_target + opts.color_lossy_image_recompress_quality = quality_str + if gray: + if lossless: + opts.gray_lossless_image_recompress_method = mupdf.FZ_RECOMPRESS_JPEG + opts.gray_lossless_image_subsample_method = mupdf.FZ_SUBSAMPLE_AVERAGE + opts.gray_lossless_image_subsample_to = dpi_target + opts.gray_lossless_image_subsample_threshold = dpi_threshold + opts.gray_lossless_image_recompress_quality = quality_str + if lossy: + opts.gray_lossy_image_recompress_method = mupdf.FZ_RECOMPRESS_JPEG + opts.gray_lossy_image_subsample_method = mupdf.FZ_SUBSAMPLE_AVERAGE + opts.gray_lossy_image_subsample_threshold = dpi_threshold + opts.gray_lossy_image_subsample_to = dpi_target + opts.gray_lossy_image_recompress_quality = quality_str + else: + opts = options + + dir2 = set(dir(opts)) # checking that only possible options were used + invalid_options = dir2 - dir1 + if invalid_options: + raise ValueError(f"Invalid options: {invalid_options}") + + if set_to_gray: + self.recolor(1) + pdf = _as_pdf_document(self) + mupdf.pdf_rewrite_images(pdf, opts) + + def recolor(self, components=1): + """Change the color component count on all pages. + + Args: + components: (int) desired color component count, one of 1, 3, 4. + + Invokes the same-named method for all pages. + """ + if not self.is_pdf: + raise ValueError("is no PDF") + for i in range(self.page_count): + self.load_page(i).recolor(components) + def resolve_names(self): """Convert the PDF's destination names into a Python dict. @@ -5485,26 +6387,28 @@ def get_array(val): templ_dict["dest"] = array # return the orig. string return templ_dict - subval = array[:idx] # stuff before "/" + subval = array[:idx].strip() # stuff before "/" array = array[idx:] # stuff from "/" onwards templ_dict["dest"] = array - # if we start with /XYZ: extract x, y, zoom # 1, 2 or 3 of these values may actually be supplied if array.startswith("/XYZ"): del templ_dict["dest"] # don't return orig string in this case - t = [0, 0, 0] # the resulting x, y, z values + # make a list of the 3 tokens following "/XYZ" + array_list = array.split()[1:4] # omit "/XYZ" - # need to replace any "null" item by "0", then split at - # white spaces, omitting "/XYZ" from the result - for i, v in enumerate(array.replace("null", "0").split()[1:]): - t[i] = float(v) + # fill up missing tokens with "0" strings + while len(array_list) < 3: # fill up if too short + array_list.append("0") # add missing values + + # make list of 3 floats: x, y and zoom + t = list(map(float, array_list)) # the resulting x, y, z values templ_dict["to"] = (t[0], t[1]) templ_dict["zoom"] = t[2] # extract page number - if "0 R" in subval: # page xref given? + if subval.endswith("0 R"): # page xref given? templ_dict["page"] = page_xrefs.get(int(subval.split()[0]),-1) else: # naked page number given templ_dict["page"] = int(subval) @@ -5665,6 +6569,201 @@ def saveIncr(self): """ Save PDF incrementally""" return self.save(self.name, incremental=True, encryption=mupdf.PDF_ENCRYPT_KEEP) + # ------------------------------------------------------------------------------ + # Remove potentially sensitive data from a PDF. Similar to the Adobe + # Acrobat 'sanitize' function + # ------------------------------------------------------------------------------ + def scrub( + doc: 'Document', + attached_files: bool = True, + clean_pages: bool = True, + embedded_files: bool = True, + hidden_text: bool = True, + javascript: bool = True, + metadata: bool = True, + redactions: bool = True, + redact_images: int = 0, + remove_links: bool = True, + reset_fields: bool = True, + reset_responses: bool = True, + thumbnails: bool = True, + xml_metadata: bool = True, + ) -> None: + + def remove_hidden(cont_lines): + """Remove hidden text from a PDF page. + + Args: + cont_lines: list of lines with /Contents content. Should have status + from after page.cleanContents(). + + Returns: + List of /Contents lines from which hidden text has been removed. + + Notes: + The input must have been created after the page's /Contents object(s) + have been cleaned with page.cleanContents(). This ensures a standard + formatting: one command per line, single spaces between operators. + This allows for drastic simplification of this code. + """ + out_lines = [] # will return this + in_text = False # indicate if within BT/ET object + suppress = False # indicate text suppression active + make_return = False + for line in cont_lines: + if line == b"BT": # start of text object + in_text = True # switch on + out_lines.append(line) # output it + continue + if line == b"ET": # end of text object + in_text = False # switch off + out_lines.append(line) # output it + continue + if line == b"3 Tr": # text suppression operator + suppress = True # switch on + make_return = True + continue + if line[-2:] == b"Tr" and line[0] != b"3": + suppress = False # text rendering changed + out_lines.append(line) + continue + if line == b"Q": # unstack command also switches off + suppress = False + out_lines.append(line) + continue + if suppress and in_text: # suppress hidden lines + continue + out_lines.append(line) + if make_return: + return out_lines + else: + return None + + if not doc.is_pdf: # only works for PDF + raise ValueError("is no PDF") + if doc.is_encrypted or doc.is_closed: + raise ValueError("closed or encrypted doc") + + if not clean_pages: + hidden_text = False + redactions = False + + if metadata: + doc.set_metadata({}) # remove standard metadata + + for page in doc: + if reset_fields: + # reset form fields (widgets) + for widget in page.widgets(): + widget.reset() + + if remove_links: + links = page.get_links() # list of all links on page + for link in links: # remove all links + page.delete_link(link) + + found_redacts = False + for annot in page.annots(): + if annot.type[0] == mupdf.PDF_ANNOT_FILE_ATTACHMENT and attached_files: + annot.update_file(buffer_=b" ") # set file content to empty + if reset_responses: + annot.delete_responses() + if annot.type[0] == mupdf.PDF_ANNOT_REDACT: # pylint: disable=no-member + found_redacts = True + + if redactions and found_redacts: + page.apply_redactions(images=redact_images) + + if not (clean_pages or hidden_text): + continue # done with the page + + page.clean_contents() + if not page.get_contents(): + continue + if hidden_text: + xrefs = page.get_contents() + assert len(xrefs) == 1 # only one because of cleaning. + xref = xrefs[0] + cont = doc.xref_stream(xref) + cont_lines = remove_hidden(cont.splitlines()) # remove hidden text + if cont_lines: # something was actually removed + cont = b"\n".join(cont_lines) + doc.update_stream(xref, cont) # rewrite the page /Contents + + if thumbnails: # remove page thumbnails? + if doc.xref_get_key(page.xref, "Thumb")[0] != "null": + doc.xref_set_key(page.xref, "Thumb", "null") + + # pages are scrubbed, now perform document-wide scrubbing + # remove embedded files + if embedded_files: + for name in doc.embfile_names(): + doc.embfile_del(name) + + if xml_metadata: + doc.del_xml_metadata() + if not (xml_metadata or javascript): + xref_limit = 0 + else: + xref_limit = doc.xref_length() + for xref in range(1, xref_limit): + if not doc.xref_object(xref): + msg = "bad xref %i - clean PDF before scrubbing" % xref + raise ValueError(msg) + if javascript and doc.xref_get_key(xref, "S")[1] == "/JavaScript": + # a /JavaScript action object + obj = "<>" # replace with a null JavaScript + doc.update_object(xref, obj) # update this object + continue # no further handling + + if not xml_metadata: + continue + + if doc.xref_get_key(xref, "Type")[1] == "/Metadata": + # delete any metadata object directly + doc.update_object(xref, "<<>>") + doc.update_stream(xref, b"deleted", new=True) + continue + + if doc.xref_get_key(xref, "Metadata")[0] != "null": + doc.xref_set_key(xref, "Metadata", "null") + + def search_page_for( + doc: 'Document', + pno: int, + text: str, + quads: bool = False, + clip: rect_like = None, + flags: int = None, + textpage: 'TextPage' = None, + ) -> list: + """Search for a string on a page. + + Args: + pno: page number + text: string to be searched for + clip: restrict search to this rectangle + quads: (bool) return quads instead of rectangles + flags: bit switches, default: join hyphened words + textpage: reuse a prepared textpage + Returns: + a list of rectangles or quads, each containing an occurrence. + """ + if flags is None: + flags = (0 + | TEXT_DEHYPHENATE + | TEXT_PRESERVE_LIGATURES + | TEXT_PRESERVE_WHITESPACE + | TEXT_MEDIABOX_CLIP + ) + return doc[pno].search_for( + text, + quads=quads, + clip=clip, + flags=flags, + textpage=textpage, + ) + def select(self, pyliste): """Build sub-pdf with page numbers in the list.""" if self.is_closed or self.is_encrypted: @@ -5685,11 +6784,12 @@ def select(self, pyliste): pdf = _as_pdf_document(self) # create page sub-pdf via pdf_rearrange_pages2(). # - if mupdf_version_tuple >= (1, 24): - mupdf.pdf_rearrange_pages2(pdf, pyliste) + if mupdf_version_tuple >= (1, 25, 3): + # We use PDF_CLEAN_STRUCTURE_KEEP otherwise we lose structure tree + # which, for example, breaks test_3705. + mupdf.pdf_rearrange_pages2(pdf, pyliste, mupdf.PDF_CLEAN_STRUCTURE_KEEP) else: - # mupdf.pdf_rearrange_pages2() not available. - extra.rearrange_pages2(pdf, tuple(pyliste)) + mupdf.pdf_rearrange_pages2(pdf, pyliste) # remove any existing pages with their kids self._reset_page_refs() @@ -5808,6 +6908,162 @@ def set_markinfo(self, markinfo: dict) -> bool: self.xref_set_key(xref, "MarkInfo", pdfdict) return True + def set_metadata(doc: 'Document', m: dict = None) -> None: + """Update the PDF /Info object. + + Args: + m: a dictionary like doc.metadata. + """ + if not doc.is_pdf: + raise ValueError("is no PDF") + if doc.is_closed or doc.is_encrypted: + raise ValueError("document closed or encrypted") + if m is None: + m = {} + elif type(m) is not dict: + raise ValueError("bad metadata") + keymap = { + "author": "Author", + "producer": "Producer", + "creator": "Creator", + "title": "Title", + "format": None, + "encryption": None, + "creationDate": "CreationDate", + "modDate": "ModDate", + "subject": "Subject", + "keywords": "Keywords", + "trapped": "Trapped", + } + valid_keys = set(keymap.keys()) + diff_set = set(m.keys()).difference(valid_keys) + if diff_set != set(): + msg = "bad dict key(s): %s" % diff_set + raise ValueError(msg) + + t, temp = doc.xref_get_key(-1, "Info") + if t != "xref": + info_xref = 0 + else: + info_xref = int(temp.replace("0 R", "")) + + if m == {} and info_xref == 0: # nothing to do + return + + if info_xref == 0: # no prev metadata: get new xref + info_xref = doc.get_new_xref() + doc.update_object(info_xref, "<<>>") # fill it with empty object + doc.xref_set_key(-1, "Info", "%i 0 R" % info_xref) + elif m == {}: # remove existing metadata + doc.xref_set_key(-1, "Info", "null") + doc.init_doc() + return + + for key, val in [(k, v) for k, v in m.items() if keymap[k] is not None]: + pdf_key = keymap[key] + if not bool(val) or val in ("none", "null"): + val = "null" + else: + val = get_pdf_str(val) + doc.xref_set_key(info_xref, pdf_key, val) + doc.init_doc() + return + + def set_oc(doc: 'Document', xref: int, oc: int) -> None: + """Attach optional content object to image or form xobject. + + Args: + xref: (int) xref number of an image or form xobject + oc: (int) xref number of an OCG or OCMD + """ + if doc.is_closed or doc.is_encrypted: + raise ValueError("document close or encrypted") + t, name = doc.xref_get_key(xref, "Subtype") + if t != "name" or name not in ("/Image", "/Form"): + raise ValueError("bad object type at xref %i" % xref) + if oc > 0: + t, name = doc.xref_get_key(oc, "Type") + if t != "name" or name not in ("/OCG", "/OCMD"): + raise ValueError("bad object type at xref %i" % oc) + if oc == 0 and "OC" in doc.xref_get_keys(xref): + doc.xref_set_key(xref, "OC", "null") + return None + doc.xref_set_key(xref, "OC", "%i 0 R" % oc) + return None + + def set_ocmd( + doc: 'Document', + xref: int = 0, + ocgs: typing.Union[list, None] = None, + policy: OptStr = None, + ve: typing.Union[list, None] = None, + ) -> int: + """Create or update an OCMD object in a PDF document. + + Args: + xref: (int) 0 for creating a new object, otherwise update existing one. + ocgs: (list) OCG xref numbers, which shall be subject to 'policy'. + policy: one of 'AllOn', 'AllOff', 'AnyOn', 'AnyOff' (any casing). + ve: (list) visibility expression. Use instead of 'ocgs' with 'policy'. + + Returns: + Xref of the created or updated OCMD. + """ + + all_ocgs = set(doc.get_ocgs().keys()) + + def ve_maker(ve): + if type(ve) not in (list, tuple) or len(ve) < 2: + raise ValueError("bad 've' format: %s" % ve) + if ve[0].lower() not in ("and", "or", "not"): + raise ValueError("bad operand: %s" % ve[0]) + if ve[0].lower() == "not" and len(ve) != 2: + raise ValueError("bad 've' format: %s" % ve) + item = "[/%s" % ve[0].title() + for x in ve[1:]: + if type(x) is int: + if x not in all_ocgs: + raise ValueError("bad OCG %i" % x) + item += " %i 0 R" % x + else: + item += " %s" % ve_maker(x) + item += "]" + return item + + text = "<>". + """ + s = "%i<<" % label["startpage"] + if label.get("prefix", "") != "": + s += "/P(%s)" % label["prefix"] + if label.get("style", "") != "": + s += "/S/%s" % label["style"] + if label.get("firstpagenum", 1) > 1: + s += "/St %i" % label["firstpagenum"] + s += ">>" + return s + + def create_nums(labels): + """Return concatenated string of all labels rules. + + Args: + labels: (list) dictionaries as created by function 'rule_dict'. + Returns: + PDF compatible string for page label definitions, ready to be + enclosed in PDF array 'Nums[...]'. + """ + labels.sort(key=lambda x: x["startpage"]) + s = "".join([create_label_str(label) for label in labels]) + return s + + doc._set_page_labels(create_nums(labels)) + + def set_toc( + doc: 'Document', + toc: list, + collapse: int = 1, + ) -> int: + """Create new outline tree (table of contents, TOC). + + Args: + toc: (list, tuple) each entry must contain level, title, page and + optionally top margin on the page. None or '()' remove the TOC. + collapse: (int) collapses entries beyond this level. Zero or None + shows all entries unfolded. + Returns: + the number of inserted items, or the number of removed items respectively. + """ + if doc.is_closed or doc.is_encrypted: + raise ValueError("document closed or encrypted") + if not doc.is_pdf: + raise ValueError("is no PDF") + if not toc: # remove all entries + return len(doc._delToC()) + + # validity checks -------------------------------------------------------- + if type(toc) not in (list, tuple): + raise ValueError("'toc' must be list or tuple") + toclen = len(toc) + page_count = doc.page_count + t0 = toc[0] + if type(t0) not in (list, tuple): + raise ValueError("items must be sequences of 3 or 4 items") + if t0[0] != 1: + raise ValueError("hierarchy level of item 0 must be 1") + for i in list(range(toclen - 1)): + t1 = toc[i] + t2 = toc[i + 1] + if not -1 <= t1[2] <= page_count: + raise ValueError("row %i: page number out of range" % i) + if (type(t2) not in (list, tuple)) or len(t2) not in (3, 4): + raise ValueError("bad row %i" % (i + 1)) + if (type(t2[0]) is not int) or t2[0] < 1: + raise ValueError("bad hierarchy level in row %i" % (i + 1)) + if t2[0] > t1[0] + 1: + raise ValueError("bad hierarchy level in row %i" % (i + 1)) + # no formal errors in toc -------------------------------------------------- + + # -------------------------------------------------------------------------- + # make a list of xref numbers, which we can use for our TOC entries + # -------------------------------------------------------------------------- + old_xrefs = doc._delToC() # del old outlines, get their xref numbers + + # prepare table of xrefs for new bookmarks + old_xrefs = [] + xref = [0] + old_xrefs + xref[0] = doc._getOLRootNumber() # entry zero is outline root xref number + if toclen > len(old_xrefs): # too few old xrefs? + for i in range((toclen - len(old_xrefs))): + xref.append(doc.get_new_xref()) # acquire new ones + + lvltab = {0: 0} # to store last entry per hierarchy level + + # ------------------------------------------------------------------------------ + # contains new outline objects as strings - first one is the outline root + # ------------------------------------------------------------------------------ + olitems = [{"count": 0, "first": -1, "last": -1, "xref": xref[0]}] + # ------------------------------------------------------------------------------ + # build olitems as a list of PDF-like connected dictionaries + # ------------------------------------------------------------------------------ + for i in range(toclen): + o = toc[i] + lvl = o[0] # level + title = get_pdf_str(o[1]) # title + pno = min(doc.page_count - 1, max(0, o[2] - 1)) # page number + page_xref = doc.page_xref(pno) + page_height = doc.page_cropbox(pno).height + top = Point(72, page_height - 36) + dest_dict = {"to": top, "kind": LINK_GOTO} # fall back target + if o[2] < 0: + dest_dict["kind"] = LINK_NONE + if len(o) > 3: # some target is specified + if type(o[3]) in (int, float): # convert a number to a point + dest_dict["to"] = Point(72, page_height - o[3]) + else: # if something else, make sure we have a dict + # We make a copy of o[3] to avoid modifying our caller's data. + dest_dict = o[3].copy() if type(o[3]) is dict else dest_dict + if "to" not in dest_dict: # target point not in dict? + dest_dict["to"] = top # put default in + else: # transform target to PDF coordinates + page = doc[pno] + point = Point(dest_dict["to"]) + point.y = page.cropbox.height - point.y + point = point * page.rotation_matrix + dest_dict["to"] = (point.x, point.y) + d = {} + d["first"] = -1 + d["count"] = 0 + d["last"] = -1 + d["prev"] = -1 + d["next"] = -1 + d["dest"] = utils.getDestStr(page_xref, dest_dict) + d["top"] = dest_dict["to"] + d["title"] = title + d["parent"] = lvltab[lvl - 1] + d["xref"] = xref[i + 1] + d["color"] = dest_dict.get("color") + d["flags"] = dest_dict.get("italic", 0) + 2 * dest_dict.get("bold", 0) + lvltab[lvl] = i + 1 + parent = olitems[lvltab[lvl - 1]] # the parent entry + + if ( + dest_dict.get("collapse") or collapse and lvl > collapse + ): # suppress expansion + parent["count"] -= 1 # make /Count negative + else: + parent["count"] += 1 # positive /Count + + if parent["first"] == -1: + parent["first"] = i + 1 + parent["last"] = i + 1 + else: + d["prev"] = parent["last"] + prev = olitems[parent["last"]] + prev["next"] = i + 1 + parent["last"] = i + 1 + olitems.append(d) + + # ------------------------------------------------------------------------------ + # now create each outline item as a string and insert it in the PDF + # ------------------------------------------------------------------------------ + for i, ol in enumerate(olitems): + txt = "<<" + if ol["count"] != 0: + txt += "/Count %i" % ol["count"] + try: + txt += ol["dest"] + except Exception: + # Verbose in PyMuPDF/tests. + if g_exceptions_verbose >= 2: exception_info() + pass + try: + if ol["first"] > -1: + txt += "/First %i 0 R" % xref[ol["first"]] + except Exception: + if g_exceptions_verbose >= 2: exception_info() + pass + try: + if ol["last"] > -1: + txt += "/Last %i 0 R" % xref[ol["last"]] + except Exception: + if g_exceptions_verbose >= 2: exception_info() + pass + try: + if ol["next"] > -1: + txt += "/Next %i 0 R" % xref[ol["next"]] + except Exception: + # Verbose in PyMuPDF/tests. + if g_exceptions_verbose >= 2: exception_info() + pass + try: + if ol["parent"] > -1: + txt += "/Parent %i 0 R" % xref[ol["parent"]] + except Exception: + # Verbose in PyMuPDF/tests. + if g_exceptions_verbose >= 2: exception_info() + pass + try: + if ol["prev"] > -1: + txt += "/Prev %i 0 R" % xref[ol["prev"]] + except Exception: + # Verbose in PyMuPDF/tests. + if g_exceptions_verbose >= 2: exception_info() + pass + try: + txt += "/Title" + ol["title"] + except Exception: + # Verbose in PyMuPDF/tests. + if g_exceptions_verbose >= 2: exception_info() + pass + + if ol.get("color") and len(ol["color"]) == 3: + txt += f"/C[ {_format_g(tuple(ol['color']))}]" + if ol.get("flags", 0) > 0: + txt += "/F %i" % ol["flags"] + + if i == 0: # special: this is the outline root + txt += "/Type/Outlines" # so add the /Type entry + txt += ">>" + doc.update_object(xref[i], txt) # insert the PDF object + + doc.init_doc() + return toclen + + def set_toc_item( + doc: 'Document', + idx: int, + dest_dict: OptDict = None, + kind: OptInt = None, + pno: OptInt = None, + uri: OptStr = None, + title: OptStr = None, + to: point_like = None, + filename: OptStr = None, + zoom: float = 0, + ) -> None: + """Update TOC item by index. + + It allows changing the item's title and link destination. + + Args: + idx: + (int) desired index of the TOC list, as created by get_toc. + dest_dict: + (dict) destination dictionary as created by get_toc(False). + Outrules all other parameters. If None, the remaining parameters + are used to make a dest dictionary. + kind: + (int) kind of link (pymupdf.LINK_GOTO, etc.). If None, then only + the title will be updated. If pymupdf.LINK_NONE, the TOC item will + be deleted. + pno: + (int) page number (1-based like in get_toc). Required if + pymupdf.LINK_GOTO. + uri: + (str) the URL, required if pymupdf.LINK_URI. + title: + (str) the new title. No change if None. + to: + (point-like) destination on the target page. If omitted, (72, 36) + will be used as target coordinates. + filename: + (str) destination filename, required for pymupdf.LINK_GOTOR and + pymupdf.LINK_LAUNCH. + name: + (str) a destination name for pymupdf.LINK_NAMED. + zoom: + (float) a zoom factor for the target location (pymupdf.LINK_GOTO). + """ + xref = doc.get_outline_xrefs()[idx] + page_xref = 0 + if type(dest_dict) is dict: + if dest_dict["kind"] == LINK_GOTO: + pno = dest_dict["page"] + page_xref = doc.page_xref(pno) + page_height = doc.page_cropbox(pno).height + to = dest_dict.get('to', Point(72, 36)) + to.y = page_height - to.y + dest_dict["to"] = to + action = utils.getDestStr(page_xref, dest_dict) + if not action.startswith("/A"): + raise ValueError("bad bookmark dest") + color = dest_dict.get("color") + if color: + color = list(map(float, color)) + if len(color) != 3 or min(color) < 0 or max(color) > 1: + raise ValueError("bad color value") + bold = dest_dict.get("bold", False) + italic = dest_dict.get("italic", False) + flags = italic + 2 * bold + collapse = dest_dict.get("collapse") + return doc._update_toc_item( + xref, + action=action[2:], + title=title, + color=color, + flags=flags, + collapse=collapse, + ) + + if kind == LINK_NONE: # delete bookmark item + return doc.del_toc_item(idx) + if kind is None and title is None: # treat as no-op + return None + if kind is None: # only update title text + return doc._update_toc_item(xref, action=None, title=title) + + if kind == LINK_GOTO: + if pno is None or pno not in range(1, doc.page_count + 1): + raise ValueError("bad page number") + page_xref = doc.page_xref(pno - 1) + page_height = doc.page_cropbox(pno - 1).height + if to is None: + to = Point(72, page_height - 36) + else: + to = Point(to) + to.y = page_height - to.y + + ddict = { + "kind": kind, + "to": to, + "uri": uri, + "page": pno, + "file": filename, + "zoom": zoom, + } + action = utils.getDestStr(page_xref, ddict) + if action == "" or not action.startswith("/A"): + raise ValueError("bad bookmark dest") + + return doc._update_toc_item(xref, action=action[2:], title=title) + + def set_xml_metadata(self, metadata): + """Store XML document level metadata.""" + if self.is_closed or self.is_encrypted: + raise ValueError("document closed or encrypted") + pdf = _as_pdf_document(self) + root = mupdf.pdf_dict_get( mupdf.pdf_trailer( pdf), PDF_NAME('Root')) + if not root.m_internal: + RAISEPY( MSG_BAD_PDFROOT, JM_Exc_FileDataError) + res = mupdf.fz_new_buffer_from_copied_data( metadata.encode('utf-8')) + xml = mupdf.pdf_dict_get( root, PDF_NAME('Metadata')) + if xml.m_internal: + JM_update_stream( pdf, xml, res, 0) + else: + xml = mupdf.pdf_add_stream( pdf, res, mupdf.PdfObj(), 0) + mupdf.pdf_dict_put( xml, PDF_NAME('Type'), PDF_NAME('Metadata')) + mupdf.pdf_dict_put( xml, PDF_NAME('Subtype'), PDF_NAME('XML')) + mupdf.pdf_dict_put( root, PDF_NAME('Metadata'), xml) + + def subset_fonts(doc: 'Document', verbose: bool = False, fallback: bool = False) -> OptInt: + """Build font subsets in a PDF. + + Eligible fonts are potentially replaced by smaller versions. Page text is + NOT rewritten and thus should retain properties like being hidden or + controlled by optional content. + + This method by default uses MuPDF's own internal feature to create subset + fonts. As this is a new function, errors may still occur. In this case, + please fall back to using the previous version by using "fallback=True". + Fallback mode requires the external package 'fontTools'. + + Args: + fallback: use the older deprecated implementation. + verbose: only used by fallback mode. + + Returns: + The new MuPDF-based code returns None. The deprecated fallback + mode returns 0 if there are no fonts to subset. Otherwise, it + returns the decrease in fontsize (the difference in fontsize), + measured in bytes. + """ + # Font binaries: - "buffer" -> (names, xrefs, (unicodes, glyphs)) + # An embedded font is uniquely defined by its fontbuffer only. It may have + # multiple names and xrefs. + # Once the sets of used unicodes and glyphs are known, we compute a + # smaller version of the buffer user package fontTools. + + if not fallback: # by default use MuPDF function + pdf = mupdf.pdf_document_from_fz_document(doc) + mupdf.pdf_subset_fonts2(pdf, list(range(doc.page_count))) + return + + font_buffers = {} + + def get_old_widths(xref): + """Retrieve old font '/W' and '/DW' values.""" + df = doc.xref_get_key(xref, "DescendantFonts") + if df[0] != "array": # only handle xref specifications + return None, None + df_xref = int(df[1][1:-1].replace("0 R", "")) + widths = doc.xref_get_key(df_xref, "W") + if widths[0] != "array": # no widths key found + widths = None + else: + widths = widths[1] + dwidths = doc.xref_get_key(df_xref, "DW") + if dwidths[0] != "int": + dwidths = None + else: + dwidths = dwidths[1] + return widths, dwidths + + def set_old_widths(xref, widths, dwidths): + """Restore the old '/W' and '/DW' in subsetted font. + + If either parameter is None or evaluates to False, the corresponding + dictionary key will be set to null. + """ + df = doc.xref_get_key(xref, "DescendantFonts") + if df[0] != "array": # only handle xref specs + return None + df_xref = int(df[1][1:-1].replace("0 R", "")) + if (type(widths) is not str or not widths) and doc.xref_get_key(df_xref, "W")[ + 0 + ] != "null": + doc.xref_set_key(df_xref, "W", "null") + else: + doc.xref_set_key(df_xref, "W", widths) + if (type(dwidths) is not str or not dwidths) and doc.xref_get_key( + df_xref, "DW" + )[0] != "null": + doc.xref_set_key(df_xref, "DW", "null") + else: + doc.xref_set_key(df_xref, "DW", dwidths) + return None + + def set_subset_fontname(new_xref): + """Generate a name prefix to tag a font as subset. + + We use a random generator to select 6 upper case ASCII characters. + The prefixed name must be put in the font xref as the "/BaseFont" value + and in the FontDescriptor object as the '/FontName' value. + """ + # The following generates a prefix like 'ABCDEF+' + import random + import string + prefix = "".join(random.choices(tuple(string.ascii_uppercase), k=6)) + "+" + font_str = doc.xref_object(new_xref, compressed=True) + font_str = font_str.replace("/BaseFont/", "/BaseFont/" + prefix) + df = doc.xref_get_key(new_xref, "DescendantFonts") + if df[0] == "array": + df_xref = int(df[1][1:-1].replace("0 R", "")) + fd = doc.xref_get_key(df_xref, "FontDescriptor") + if fd[0] == "xref": + fd_xref = int(fd[1].replace("0 R", "")) + fd_str = doc.xref_object(fd_xref, compressed=True) + fd_str = fd_str.replace("/FontName/", "/FontName/" + prefix) + doc.update_object(fd_xref, fd_str) + doc.update_object(new_xref, font_str) + + def build_subset(buffer, unc_set, gid_set): + """Build font subset using fontTools. + + Args: + buffer: (bytes) the font given as a binary buffer. + unc_set: (set) required glyph ids. + Returns: + Either None if subsetting is unsuccessful or the subset font buffer. + """ + try: + import fontTools.subset as fts + except ImportError: + if g_exceptions_verbose: exception_info() + message("This method requires fontTools to be installed.") + raise + import tempfile + with tempfile.TemporaryDirectory() as tmp_dir: + oldfont_path = f"{tmp_dir}/oldfont.ttf" + newfont_path = f"{tmp_dir}/newfont.ttf" + uncfile_path = f"{tmp_dir}/uncfile.txt" + args = [ + oldfont_path, + "--retain-gids", + f"--output-file={newfont_path}", + "--layout-features=*", + "--passthrough-tables", + "--ignore-missing-glyphs", + "--ignore-missing-unicodes", + "--symbol-cmap", + ] + + # store glyph ids or unicodes as file + with io.open(f"{tmp_dir}/uncfile.txt", "w", encoding='utf8') as unc_file: + if 0xFFFD in unc_set: # error unicode exists -> use glyphs + args.append(f"--gids-file={uncfile_path}") + gid_set.add(189) + unc_list = list(gid_set) + for unc in unc_list: + unc_file.write("%i\n" % unc) + else: + args.append(f"--unicodes-file={uncfile_path}") + unc_set.add(255) + unc_list = list(unc_set) + for unc in unc_list: + unc_file.write("%04x\n" % unc) + + # store fontbuffer as a file + with io.open(oldfont_path, "wb") as fontfile: + fontfile.write(buffer) + try: + os.remove(newfont_path) # remove old file + except Exception: + pass + try: # invoke fontTools subsetter + fts.main(args) + font = Font(fontfile=newfont_path) + new_buffer = font.buffer # subset font binary + if font.glyph_count == 0: # intercept empty font + new_buffer = None + except Exception: + exception_info() + new_buffer = None + return new_buffer + + def repl_fontnames(doc): + """Populate 'font_buffers'. + + For each font candidate, store its xref and the list of names + by which PDF text may refer to it (there may be multiple). + """ + + def norm_name(name): + """Recreate font name that contains PDF hex codes. + + E.g. #20 -> space, chr(32) + """ + while "#" in name: + p = name.find("#") + c = int(name[p + 1 : p + 3], 16) + name = name.replace(name[p : p + 3], chr(c)) + return name + + def get_fontnames(doc, item): + """Return a list of fontnames for an item of page.get_fonts(). + + There may be multiple names e.g. for Type0 fonts. + """ + fontname = item[3] + names = [fontname] + fontname = doc.xref_get_key(item[0], "BaseFont")[1][1:] + fontname = norm_name(fontname) + if fontname not in names: + names.append(fontname) + descendents = doc.xref_get_key(item[0], "DescendantFonts") + if descendents[0] != "array": + return names + descendents = descendents[1][1:-1] + if descendents.endswith(" 0 R"): + xref = int(descendents[:-4]) + descendents = doc.xref_object(xref, compressed=True) + p1 = descendents.find("/BaseFont") + if p1 >= 0: + p2 = descendents.find("/", p1 + 1) + p1 = min(descendents.find("/", p2 + 1), descendents.find(">>", p2 + 1)) + fontname = descendents[p2 + 1 : p1] + fontname = norm_name(fontname) + if fontname not in names: + names.append(fontname) + return names + + for i in range(doc.page_count): + for f in doc.get_page_fonts(i, full=True): + font_xref = f[0] # font xref + font_ext = f[1] # font file extension + basename = f[3] # font basename + + if font_ext not in ( # skip if not supported by fontTools + "otf", + "ttf", + "woff", + "woff2", + ): + continue + # skip fonts which already are subsets + if len(basename) > 6 and basename[6] == "+": + continue + + extr = doc.extract_font(font_xref) + fontbuffer = extr[-1] + names = get_fontnames(doc, f) + name_set, xref_set, subsets = font_buffers.get( + fontbuffer, (set(), set(), (set(), set())) + ) + xref_set.add(font_xref) + for name in names: + name_set.add(name) + font = Font(fontbuffer=fontbuffer) + name_set.add(font.name) + del font + font_buffers[fontbuffer] = (name_set, xref_set, subsets) + + def find_buffer_by_name(name): + for buffer, (name_set, _, _) in font_buffers.items(): + if name in name_set: + return buffer + return None + + # ----------------- + # main function + # ----------------- + repl_fontnames(doc) # populate font information + if not font_buffers: # nothing found to do + if verbose: + message(f'No fonts to subset.') + return 0 + + old_fontsize = 0 + new_fontsize = 0 + for fontbuffer in font_buffers.keys(): + old_fontsize += len(fontbuffer) + + # Scan page text for usage of subsettable fonts + for page in doc: + # go through the text and extend set of used glyphs by font + # we use a modified MuPDF trace device, which delivers us glyph ids. + for span in page.get_texttrace(): + if type(span) is not dict: # skip useless information + continue + fontname = span["font"][:33] # fontname for the span + buffer = find_buffer_by_name(fontname) + if buffer is None: + continue + name_set, xref_set, (set_ucs, set_gid) = font_buffers[buffer] + for c in span["chars"]: + set_ucs.add(c[0]) # unicode + set_gid.add(c[1]) # glyph id + font_buffers[buffer] = (name_set, xref_set, (set_ucs, set_gid)) + + # build the font subsets + for old_buffer, (name_set, xref_set, subsets) in font_buffers.items(): + new_buffer = build_subset(old_buffer, subsets[0], subsets[1]) + fontname = list(name_set)[0] + if new_buffer is None or len(new_buffer) >= len(old_buffer): + # subset was not created or did not get smaller + if verbose: + message(f'Cannot subset {fontname!r}.') + continue + if verbose: + message(f"Built subset of font {fontname!r}.") + val = doc._insert_font(fontbuffer=new_buffer) # store subset font in PDF + new_xref = val[0] # get its xref + set_subset_fontname(new_xref) # tag fontname as subset font + font_str = doc.xref_object( # get its object definition + new_xref, + compressed=True, + ) + # walk through the original font xrefs and replace each by the subset def + for font_xref in xref_set: + # we need the original '/W' and '/DW' width values + width_table, def_width = get_old_widths(font_xref) + # ... and replace original font definition at xref with it + doc.update_object(font_xref, font_str) + # now copy over old '/W' and '/DW' values + if width_table or def_width: + set_old_widths(font_xref, width_table, def_width) + # 'new_xref' remains unused in the PDF and must be removed + # by garbage collection. + new_fontsize += len(new_buffer) + + return old_fontsize - new_fontsize + + def switch_layer(self, config, as_default=0): + """Activate an OC layer.""" + pdf = _as_pdf_document(self) + cfgs = mupdf.pdf_dict_getl( + mupdf.pdf_trailer( pdf), + PDF_NAME('Root'), + PDF_NAME('OCProperties'), + PDF_NAME('Configs') + ) + if not mupdf.pdf_is_array( cfgs) or not mupdf.pdf_array_len( cfgs): + if config < 1: + return + raise ValueError( MSG_BAD_OC_LAYER) + if config < 0: + return + mupdf.pdf_select_layer_config( pdf, config) + if as_default: + mupdf.pdf_set_layer_config_as_default( pdf) + mupdf.ll_pdf_read_ocg( pdf.m_internal) + + def update_object(self, xref, text, page=None): + """Replace object definition source.""" + if self.is_closed or self.is_encrypted: + raise ValueError("document closed or encrypted") + pdf = _as_pdf_document(self) + xreflen = mupdf.pdf_xref_len(pdf) + if not _INRANGE(xref, 1, xreflen-1): + RAISEPY("bad xref", MSG_BAD_XREF) + ENSURE_OPERATION(pdf) + # create new object with passed-in string + new_obj = JM_pdf_obj_from_str(pdf, text) + mupdf.pdf_update_object(pdf, xref, new_obj) + if page: + JM_refresh_links( _as_pdf_page(page)) + + def update_stream(self, xref=0, stream=None, new=1, compress=1): + """Replace xref stream part.""" + if self.is_closed or self.is_encrypted: + raise ValueError("document closed or encrypted") + pdf = _as_pdf_document(self) xreflen = mupdf.pdf_xref_len(pdf) if xref < 1 or xref > xreflen: raise ValueError( MSG_BAD_XREF) @@ -5968,6 +7879,9 @@ def write( compression_effort=compression_effort, ) return bio.getvalue() + + def tobytes(self, *args, **kwargs): + return self.write(*args, **kwargs) @property def xref(self): @@ -5975,6 +7889,41 @@ def xref(self): CheckParent(self) return self.parent.page_xref(self.number) + def xref_copy(doc: 'Document', source: int, target: int, *, keep: list = None) -> None: + """Copy a PDF dictionary object to another one given their xref numbers. + + Args: + doc: PDF document object + source: source xref number + target: target xref number, the xref must already exist + keep: an optional list of 1st level keys in target that should not be + removed before copying. + Notes: + This works similar to the copy() method of dictionaries in Python. The + source may be a stream object. + """ + if doc.xref_is_stream(source): + # read new xref stream, maintaining compression + stream = doc.xref_stream_raw(source) + doc.update_stream( + target, + stream, + compress=False, # keeps source compression + new=True, # in case target is no stream + ) + + # empty the target completely, observe exceptions + if keep is None: + keep = [] + for key in doc.xref_get_keys(target): + if key in keep: + continue + doc.xref_set_key(target, key, "null") + # copy over all source dict items + for key in doc.xref_get_keys(source): + item = doc.xref_get_key(source, key) + doc.xref_set_key(target, key, item[1]) + def xref_get_key(self, xref, key): """Get PDF dict key value of object at 'xref'.""" pdf = _as_pdf_document(self) @@ -6191,7 +8140,6 @@ def xref_xml_metadata(self): __slots__ = ('this', 'page_count2', 'this_is_pdf', '__dict__') outline = property(lambda self: self._outline) - tobytes = write is_stream = xref_is_stream open = Document @@ -6489,16 +8437,11 @@ def valid_codepoints(self): ''' Returns sorted list of valid unicodes of a fz_font. ''' - if 1 or mupdf_version_tuple < (1, 25): - # Not available. - return [] - # This code should be used when MuPDF has been updated to provide - # fz_ft_font_reverse_cmap(). - gid_to_ucs = mupdf.fz_ft_font_reverse_cmap(self.this) - ucs_unique = set(gid_to_ucs) - ucs_unique_sorted = sorted(ucs_unique) - assert ucs_unique_sorted[0] == 0 - return ucs_unique_sorted[1:] + ucs_gids = mupdf.fz_enumerate_font_cmap2(self.this) + ucss = [i.ucs for i in ucs_gids] + ucss_unique = set(ucss) + ucss_unique_sorted = sorted(ucss_unique) + return ucss_unique_sorted class Graftmap: @@ -6718,7 +8661,7 @@ def __bool__(self): def __eq__(self, mat): if not hasattr(mat, "__len__"): return False - return len(mat) == 6 and bool(self - mat) is False + return len(mat) == 6 and not (self - mat) def __getitem__(self, i): return (self.a, self.b, self.c, self.d, self.e, self.f)[i] @@ -7254,6 +9197,51 @@ def _validate(self): self._checker() # any field_type specific checks + def _sync_flags(self): + """Propagate the field flags. + + If this widget has a "/Parent", set its field flags and that of all + its /Kids widgets to the value of the current widget. + Only possible for widgets existing in the PDF. + + Returns True or False. + """ + if not self.xref: + return False # no xref: widget not in the PDF + doc = self.parent.parent # the owning document + assert doc + pdf = _as_pdf_document(doc) + # load underlying PDF object + pdf_widget = mupdf.pdf_load_object(pdf, self.xref) + Parent = mupdf.pdf_dict_get(pdf_widget, PDF_NAME("Parent")) + if not Parent.pdf_is_dict(): + return False # no /Parent: nothing to do + + # put the field flags value into the parent field flags: + Parent.pdf_dict_put_int(PDF_NAME("Ff"), self.field_flags) + + # also put that value into all kids of the Parent + kids = Parent.pdf_dict_get(PDF_NAME("Kids")) + if not kids.pdf_is_array(): + message("warning: malformed PDF, Parent has no Kids array") + return False # no /Kids: should never happen! + + for i in range(kids.pdf_array_len()): # walk through all kids + # access kid widget, and do some precautionary checks + kid = kids.pdf_array_get(i) + if not kid.pdf_is_dict(): + continue + xref = kid.pdf_to_num() # get xref of the kid + if xref == self.xref: # skip self widget + continue + subtype = kid.pdf_dict_get(PDF_NAME("Subtype")) + if not subtype.pdf_to_name() == "Widget": + continue + # put the field flags value into the kid field flags: + kid.pdf_dict_put_int(PDF_NAME("Ff"), self.field_flags) + + return True # all done + def button_states(self): """Return the on/off state names for button widgets. @@ -7318,8 +9306,6 @@ def on_state(self): """ if self.field_type not in (2, 5): return None # no checkbox or radio button - if self.field_type == 2: - return "Yes" bstate = self.button_states() if bstate is None: bstate = dict() @@ -7335,9 +9321,8 @@ def reset(self): """ TOOLS._reset_widget(self._annot) - def update(self): - """Reflect Python object in the PDF. - """ + def update(self, sync_flags=False): + """Reflect Python object in the PDF.""" self._validate() self._adjust_font() # ensure valid text_font name @@ -7363,6 +9348,8 @@ def update(self): # finally update the widget TOOLS._save_widget(self._annot, self) self._text_da = "" + if sync_flags: + self._sync_flags() # propagate field flags to parent and kids from . import _extra @@ -7607,58 +9594,76 @@ def _add_freetext_annot( text_color=None, fill_color=None, border_color=None, + border_width=0, + dashes=None, + callout=None, + line_end=mupdf.PDF_ANNOT_LE_OPEN_ARROW, + opacity=1, align=0, rotate=0, + richtext=False, + style=None, ): + rc = f""" + + {text}""" page = self._pdf_page() + if border_color and not richtext: + raise ValueError("cannot set border_color if rich_text is False") + if border_color and not text_color: + text_color = border_color nfcol, fcol = JM_color_FromSequence(fill_color) ntcol, tcol = JM_color_FromSequence(text_color) r = JM_rect_from_py(rect) if mupdf.fz_is_infinite_rect(r) or mupdf.fz_is_empty_rect(r): raise ValueError( MSG_BAD_RECT) - annot = mupdf.pdf_create_annot( page, mupdf.PDF_ANNOT_FREE_TEXT) - annot_obj = mupdf.pdf_annot_obj( annot) - mupdf.pdf_set_annot_contents( annot, text) - mupdf.pdf_set_annot_rect( annot, r) - mupdf.pdf_dict_put_int( annot_obj, PDF_NAME('Rotate'), rotate) - mupdf.pdf_dict_put_int( annot_obj, PDF_NAME('Q'), align) + annot = mupdf.pdf_create_annot(page, mupdf.PDF_ANNOT_FREE_TEXT) + annot_obj = mupdf.pdf_annot_obj(annot) + + #insert text as 'contents' or 'RC' depending on 'richtext' + if not richtext: + mupdf.pdf_set_annot_contents(annot, text) + else: + mupdf.pdf_dict_put_text_string(annot_obj,PDF_NAME("RC"), rc) + if style: + mupdf.pdf_dict_put_text_string(annot_obj,PDF_NAME("DS"), style) + + mupdf.pdf_set_annot_rect(annot, r) + + while rotate < 0: + rotate += 360 + while rotate >= 360: + rotate -= 360 + if rotate != 0: + mupdf.pdf_dict_put_int(annot_obj, PDF_NAME('Rotate'), rotate) + + mupdf.pdf_set_annot_quadding(annot, align) if nfcol > 0: - mupdf.pdf_set_annot_color( annot, fcol[:nfcol]) + mupdf.pdf_set_annot_color(annot, fcol[:nfcol]) + + mupdf.pdf_set_annot_border_width(annot, border_width) + mupdf.pdf_set_annot_opacity(annot, opacity) + if dashes: + for d in dashes: + mupdf.pdf_add_annot_border_dash_item(annot, float(d)) + + # Insert callout information + if callout: + mupdf.pdf_dict_put(annot_obj, PDF_NAME("IT"), PDF_NAME("FreeTextCallout")) + mupdf.pdf_set_annot_callout_style(annot, line_end) + point_count = len(callout) + extra.JM_set_annot_callout_line(annot, tuple(callout), point_count) # insert the default appearance string - JM_make_annot_DA(annot, ntcol, tcol, fontname, fontsize) - mupdf.pdf_update_annot( annot) + if not richtext: + JM_make_annot_DA(annot, ntcol, tcol, fontname, fontsize) + + mupdf.pdf_update_annot(annot) JM_add_annot_id(annot, "A") val = Annot(annot) - - #%pythonappend _add_freetext_annot - ap = val._getAP() - BT = ap.find(b"BT") - ET = ap.rfind(b"ET") + 2 - ap = ap[BT:ET] - w = rect[2]-rect[0] - h = rect[3]-rect[1] - if rotate in (90, -90, 270): - w, h = h, w - re = f"0 0 {_format_g((w, h))} re".encode() - ap = re + b"\nW\nn\n" + ap - ope = None - bwidth = b"" - fill_string = ColorCode(fill_color, "f").encode() - if fill_string: - fill_string += b"\n" - ope = b"f" - stroke_string = ColorCode(border_color, "c").encode() - if stroke_string: - stroke_string += b"\n" - bwidth = b"1 w\n" - ope = b"S" - if fill_string and stroke_string: - ope = b"B" - if ope is not None: - ap = bwidth + fill_string + stroke_string + re + b"\n" + ope + b"\n" + ap - val._setAP(ap) return val def _add_ink_annot(self, list): @@ -7735,6 +9740,7 @@ def _add_redact_annot(self, quad, text=None, da_str=None, align=0, fill=None, te mupdf.pdf_array_push_real(arr, fcol[i]) mupdf.pdf_dict_put(mupdf.pdf_annot_obj(annot), PDF_NAME('IC'), arr) if text: + assert da_str mupdf.pdf_dict_puts( mupdf.pdf_annot_obj(annot), "OverlayText", @@ -7761,42 +9767,69 @@ def _add_square_or_circle(self, rect, annot_type): return Annot(annot) def _add_stamp_annot(self, rect, stamp=0): + rect = Rect(rect) + r = JM_rect_from_py(rect) + if mupdf.fz_is_infinite_rect(r) or mupdf.fz_is_empty_rect(r): + raise ValueError(MSG_BAD_RECT) page = self._pdf_page() stamp_id = [ - PDF_NAME('Approved'), - PDF_NAME('AsIs'), - PDF_NAME('Confidential'), - PDF_NAME('Departmental'), - PDF_NAME('Experimental'), - PDF_NAME('Expired'), - PDF_NAME('Final'), - PDF_NAME('ForComment'), - PDF_NAME('ForPublicRelease'), - PDF_NAME('NotApproved'), - PDF_NAME('NotForPublicRelease'), - PDF_NAME('Sold'), - PDF_NAME('TopSecret'), - PDF_NAME('Draft'), + "Approved", + "AsIs", + "Confidential", + "Departmental", + "Experimental", + "Expired", + "Final", + "ForComment", + "ForPublicRelease", + "NotApproved", + "NotForPublicRelease", + "Sold", + "TopSecret", + "Draft", ] n = len(stamp_id) - name = stamp_id[0] - r = JM_rect_from_py(rect) - if mupdf.fz_is_infinite_rect(r) or mupdf.fz_is_empty_rect(r): - raise ValueError( MSG_BAD_RECT) - if _INRANGE(stamp, 0, n-1): + buf = None + name = None + if stamp in range(n): name = stamp_id[stamp] + elif isinstance(stamp, Pixmap): + buf = stamp.tobytes() + elif isinstance(stamp, str): + buf = pathlib.Path(stamp).read_bytes() + elif isinstance(stamp, (bytes, bytearray)): + buf = stamp + elif isinstance(stamp, io.BytesIO): + buf = stamp.getvalue() + else: + name = stamp_id[0] + annot = mupdf.pdf_create_annot(page, mupdf.PDF_ANNOT_STAMP) - mupdf.pdf_set_annot_rect(annot, r) - try: - n = PDF_NAME('Name') - mupdf.pdf_dict_put(mupdf.pdf_annot_obj(annot), PDF_NAME('Name'), name) - except Exception: - if g_exceptions_verbose: exception_info() - raise - mupdf.pdf_set_annot_contents( - annot, - mupdf.pdf_dict_get_name(mupdf.pdf_annot_obj(annot), PDF_NAME('Name')), - ) + if buf: # image stamp + fzbuff = mupdf.fz_new_buffer_from_copied_data(buf) + img = mupdf.fz_new_image_from_buffer(fzbuff) + + # compute image boundary box on page + w, h = img.w(), img.h() + scale = min(rect.width / w, rect.height / h) + width = w * scale # bbox width + height = h * scale # bbox height + + # center of "rect" + center = (rect.tl + rect.br) / 2 + x0 = center.x - width / 2 + y0 = center.y - height / 2 + x1 = x0 + width + y1 = y0 + height + r = mupdf.fz_make_rect(x0, y0, x1, y1) + mupdf.pdf_set_annot_rect(annot, r) + mupdf.pdf_set_annot_stamp_image(annot, img) + mupdf.pdf_dict_put(mupdf.pdf_annot_obj(annot), PDF_NAME("Name"), mupdf.pdf_new_name("ImageStamp")) + mupdf.pdf_set_annot_contents(annot, "Image Stamp") + else: # text stamp + mupdf.pdf_set_annot_rect(annot, r) + mupdf.pdf_dict_put(mupdf.pdf_annot_obj(annot), PDF_NAME("Name"), PDF_NAME(name)) + mupdf.pdf_set_annot_contents(annot, name) mupdf.pdf_update_annot(annot) JM_add_annot_id(annot, "A") return Annot(annot) @@ -7950,7 +9983,7 @@ def _get_resource_properties(self): return rc def _get_textpage(self, clip=None, flags=0, matrix=None): - if g_use_extra: + if 1 or g_use_extra: ll_tpage = extra.page_get_textpage(self.this, clip, flags, matrix) tpage = mupdf.FzStextPage(ll_tpage) return tpage @@ -8088,84 +10121,33 @@ def _insert_image(self, do_have_imask = 0 if do_have_imask: - if mupdf_version_tuple >= (1, 24): - # `fz_compressed_buffer` is reference counted and - # `mupdf.fz_new_image_from_compressed_buffer2()` - # is povided as a Swig-friendly wrapper for - # `fz_new_image_from_compressed_buffer()`, so we can do things - # straightfowardly. - # - cbuf1 = mupdf.fz_compressed_image_buffer( image) - if not cbuf1.m_internal: - raise ValueError( "uncompressed image cannot have mask") - bpc = image.bpc() - colorspace = image.colorspace() - xres, yres = mupdf.fz_image_resolution(image) - mask = mupdf.fz_new_image_from_buffer(maskbuf) - image = mupdf.fz_new_image_from_compressed_buffer2( - w, - h, - bpc, - colorspace, - xres, - yres, - 1, # interpolate - 0, # imagemask, - list(), # decode - list(), # colorkey - cbuf1, - mask, - ) - else: - #log( 'do_have_imask') - # mupdf.FzCompressedBuffer is not copyable, so - # mupdf.fz_compressed_image_buffer() does not work - it cannot - # return by value. And sharing a fz_compressed_buffer between two - # `fz_image`'s doesn't work, so we use a raw fz_compressed_buffer - # here, not a mupdf.FzCompressedBuffer. - # - cbuf1 = mupdf.ll_fz_compressed_image_buffer( image.m_internal) - if not cbuf1: - raise ValueError( "uncompressed image cannot have mask") - bpc = image.bpc() - colorspace = image.colorspace() - xres, yres = mupdf.fz_image_resolution(image) - mask = mupdf.fz_new_image_from_buffer(maskbuf) - - # mupdf.ll_fz_new_image_from_compressed_buffer() is not usable. - zimg = extra.fz_new_image_from_compressed_buffer( - w, - h, - bpc, - colorspace.m_internal, - xres, - yres, - 1, # interpolate - 0, # imagemask, - cbuf1, - mask.m_internal, - ) - - zimg = mupdf.FzImage(zimg) - - # `image` and `zimage` both have pointers to the same - # `fz_compressed_buffer`, which is not reference counted, and they - # both think that they own it. - # - # So we do what the classic implementation does, and simply - # ensure that `fz_drop_image(image)` is never called. This will - # leak some of `image`'s allocations (for example the main - # `fz_image` allocation), but it's not trivial to avoid this. - # - # Perhaps we could manually set `fz_image`'s - # `fz_compressed_buffer*` to null? Trouble is we'd have to - # cast the `fz_image*` to a `fz_compressed_image*` to see the - # `fz_compressed_buffer*`, which is probably not possible from - # Python? - # - image.m_internal = None - - image = zimg + # `fz_compressed_buffer` is reference counted and + # `mupdf.fz_new_image_from_compressed_buffer2()` + # is povided as a Swig-friendly wrapper for + # `fz_new_image_from_compressed_buffer()`, so we can do things + # straightfowardly. + # + cbuf1 = mupdf.fz_compressed_image_buffer( image) + if not cbuf1.m_internal: + raise ValueError( "uncompressed image cannot have mask") + bpc = image.bpc() + colorspace = image.colorspace() + xres, yres = mupdf.fz_image_resolution(image) + mask = mupdf.fz_new_image_from_buffer(maskbuf) + image = mupdf.fz_new_image_from_compressed_buffer2( + w, + h, + bpc, + colorspace, + xres, + yres, + 1, # interpolate + 0, # imagemask, + list(), # decode + list(), # colorkey + cbuf1, + mask, + ) if do_have_image: #log( 'do_have_image') @@ -8203,7 +10185,9 @@ def _insertFont(self, fontname, bfname, fontfile, fontbuffer, set_simple, idx, w value = JM_insert_font(pdf, bfname, fontfile,fontbuffer, set_simple, idx, wmode, serif, encoding, ordering) # get the objects /Resources, /Resources/Font - resources = mupdf.pdf_dict_get_inheritable( page.obj(), PDF_NAME('Resources')) + resources = mupdf.pdf_dict_get_inheritable(page.obj(), PDF_NAME('Resources')) + if not resources.pdf_is_dict(): + resources = mupdf.pdf_dict_put_dict(page.obj(), PDF_NAME("Resources"), 5) fonts = mupdf.pdf_dict_get(resources, PDF_NAME('Font')) if not fonts.m_internal: # page has no fonts yet fonts = mupdf.pdf_new_dict(pdf, 5) @@ -8343,6 +10327,8 @@ def _show_pdf_page(self, fz_srcpage, overlay=1, matrix=None, xref=0, oc=0, clip= # 1. insert Xobject in Resources #------------------------------------------------------------- resources = mupdf.pdf_dict_get_inheritable(tpageref, PDF_NAME('Resources')) + if not resources.m_internal: + resources = mupdf.pdf_dict_put_dict(tpageref,PDF_NAME('Resources'), 5) subres = mupdf.pdf_dict_get(resources, PDF_NAME('XObject')) if not subres.m_internal: subres = mupdf.pdf_dict_put_dict(resources, PDF_NAME('XObject'), 5) @@ -8387,7 +10373,7 @@ def add_circle_annot(self, rect: rect_like) -> Annot: def add_file_annot( self, point: point_like, - buffer_: typing.ByteString, + buffer_: ByteString, filename: str, ufilename: OptStr =None, desc: OptStr =None, @@ -8413,13 +10399,21 @@ def add_freetext_annot( self, rect: rect_like, text: str, + *, fontsize: float =11, fontname: OptStr =None, - border_color: OptSeq =None, text_color: OptSeq =None, fill_color: OptSeq =None, + border_color: OptSeq =None, + border_width: float =0, + dashes: OptSeq =None, + callout: OptSeq =None, + line_end: int=mupdf.PDF_ANNOT_LE_OPEN_ARROW, + opacity: float =1, align: int =0, - rotate: int =0 + rotate: int =0, + richtext=False, + style=None, ) -> Annot: """Add a 'FreeText' annotation.""" @@ -8430,11 +10424,18 @@ def add_freetext_annot( text, fontsize=fontsize, fontname=fontname, - border_color=border_color, text_color=text_color, fill_color=fill_color, + border_color=border_color, + border_width=border_width, + dashes=dashes, + callout=callout, + line_end=line_end, + opacity=opacity, align=align, rotate=rotate, + richtext=richtext, + style=style, ) finally: if old_rotation != 0: @@ -8545,6 +10546,8 @@ def add_redact_annot( fill = (fill, fill, fill) if len(fill) > 3: fill = fill[:3] + else: + text = None old_rotation = annot_preprocess(self) try: @@ -8584,7 +10587,7 @@ def add_squiggly_annot( q = CheckMarkerArg(quads) return self._add_text_marker(q, mupdf.PDF_ANNOT_SQUIGGLY) - def add_stamp_annot(self, rect: rect_like, stamp: int =0) -> Annot: + def add_stamp_annot(self, rect: rect_like, stamp=0) -> Annot: """Add a ('rubber') 'Stamp' annotation.""" old_rotation = annot_preprocess(self) try: @@ -8675,29 +10678,177 @@ def annots(self, types=None): annot._yielded=True yield annot - @property - def artbox(self): - """The ArtBox""" - rect = self._other_box("ArtBox") - if rect is None: - return self.cropbox - mb = self.mediabox - return Rect(rect[0], mb.y1 - rect[3], rect[2], mb.y1 - rect[1]) + def apply_redactions( + page: 'Page', + images: int = 2, + graphics: int = 1, + text: int = 0, + ) -> bool: + """Apply the redaction annotations of the page. - @property - def bleedbox(self): - """The BleedBox""" - rect = self._other_box("BleedBox") - if rect is None: - return self.cropbox - mb = self.mediabox - return Rect(rect[0], mb.y1 - rect[3], rect[2], mb.y1 - rect[1]) + Args: + page: the PDF page. + images: + 0 - ignore images + 1 - remove all overlapping images + 2 - blank out overlapping image parts + 3 - remove image unless invisible + graphics: + 0 - ignore graphics + 1 - remove graphics if contained in rectangle + 2 - remove all overlapping graphics + text: + 0 - remove text + 1 - ignore text + """ - def bound(self): - """Get page rectangle.""" - CheckParent(self) - page = _as_fz_page(self.this) - val = mupdf.fz_bound_page(page) + def center_rect(annot_rect, new_text, font, fsize): + """Calculate minimal sub-rectangle for the overlay text. + + Notes: + Because 'insert_textbox' supports no vertical text centering, + we calculate an approximate number of lines here and return a + sub-rect with smaller height, which should still be sufficient. + Args: + annot_rect: the annotation rectangle + new_text: the text to insert. + font: the fontname. Must be one of the CJK or Base-14 set, else + the rectangle is returned unchanged. + fsize: the fontsize + Returns: + A rectangle to use instead of the annot rectangle. + """ + if not new_text or annot_rect.width <= EPSILON: + return annot_rect + try: + text_width = get_text_length(new_text, font, fsize) + except (ValueError, mupdf.FzErrorBase): # unsupported font + if g_exceptions_verbose: + exception_info() + return annot_rect + line_height = fsize * 1.2 + limit = annot_rect.width + h = math.ceil(text_width / limit) * line_height # estimate rect height + if h >= annot_rect.height: + return annot_rect + r = annot_rect + y = (annot_rect.tl.y + annot_rect.bl.y - h) * 0.5 + r.y0 = y + return r + + CheckParent(page) + doc = page.parent + if doc.is_encrypted or doc.is_closed: + raise ValueError("document closed or encrypted") + if not doc.is_pdf: + raise ValueError("is no PDF") + + redact_annots = [] # storage of annot values + for annot in page.annots( + types=(mupdf.PDF_ANNOT_REDACT,) # pylint: disable=no-member + ): + # loop redactions + redact_annots.append(annot._get_redact_values()) # save annot values + + if redact_annots == []: # any redactions on this page? + return False # no redactions + + rc = page._apply_redactions(text, images, graphics) # call MuPDF + if not rc: # should not happen really + raise ValueError("Error applying redactions.") + + # now write replacement text in old redact rectangles + shape = page.new_shape() + for redact in redact_annots: + annot_rect = redact["rect"] + fill = redact["fill"] + if fill: + shape.draw_rect(annot_rect) # colorize the rect background + shape.finish(fill=fill, color=fill) + if "text" in redact.keys(): # if we also have text + new_text = redact["text"] + align = redact.get("align", 0) + fname = redact["fontname"] + fsize = redact["fontsize"] + color = redact["text_color"] + # try finding vertical centered sub-rect + trect = center_rect(annot_rect, new_text, fname, fsize) + + rc = -1 + while rc < 0 and fsize >= 4: # while not enough room + # (re-) try insertion + rc = shape.insert_textbox( + trect, + new_text, + fontname=fname, + fontsize=fsize, + color=color, + align=align, + ) + fsize -= 0.5 # reduce font if unsuccessful + shape.commit() # append new contents object + return True + + def recolor(self, components=1): + """Convert colorspaces of objects on the page. + + Valid values are 1, 3 and 4. + """ + if components not in (1, 3, 4): + raise ValueError("components must be one of 1, 3, 4") + pdfdoc = _as_pdf_document(self.parent) + ropt = mupdf.pdf_recolor_options() + ropt.num_comp = components + ropts = mupdf.PdfRecolorOptions(ropt) + mupdf.pdf_recolor_page(pdfdoc, self.number, ropts) + + def clip_to_rect(self, rect): + """Clip away page content outside the rectangle.""" + clip = Rect(rect) + if clip.is_infinite or (clip & self.rect).is_empty: + raise ValueError("rect must not be infinite or empty") + clip *= self.transformation_matrix + pdfpage = _as_pdf_page(self) + pclip = JM_rect_from_py(clip) + mupdf.pdf_clip_page(pdfpage, pclip) + + def get_layout(self): + """Try to access layout information.""" + + if self.layout_information is not None: + # layout information already present + return + + if not _get_layout: + # no layout information available + return + + layout_info = _get_layout(self) + self.layout_information = layout_info + + @property + def artbox(self): + """The ArtBox""" + rect = self._other_box("ArtBox") + if rect is None: + return self.cropbox + mb = self.mediabox + return Rect(rect[0], mb.y1 - rect[3], rect[2], mb.y1 - rect[1]) + + @property + def bleedbox(self): + """The BleedBox""" + rect = self._other_box("BleedBox") + if rect is None: + return self.cropbox + mb = self.mediabox + return Rect(rect[0], mb.y1 - rect[3], rect[2], mb.y1 - rect[1]) + + def bound(self): + """Get page rectangle.""" + CheckParent(self) + page = _as_fz_page(self.this) + val = mupdf.fz_bound_page(page) val = Rect(val) if val.is_infinite and self.parent.is_pdf: @@ -8760,6 +10911,19 @@ def delete_annot(self, annot): annot._erase() return val + def delete_image(page: 'Page', xref: int): + """Delete the image referred to by xef. + + Actually replaces by a small transparent Pixmap using method Page.replace_image. + + Args: + xref: xref of the image to delete. + """ + # make a small 100% transparent pixmap (of just any dimension) + pix = Pixmap(csGRAY, (0, 0, 1, 1), 1) + pix.clear_with() # clear all samples bytes to 0x00 + page.replace_image(xref, pixmap=pix) + def delete_link(self, linkdict): """Delete a Link.""" CheckParent(self) @@ -8804,6 +10968,20 @@ def finished(): return finished() + def delete_widget(page: 'Page', widget: Widget) -> Widget: + """Delete widget from page and return the next one.""" + CheckParent(page) + annot = getattr(widget, "_annot", None) + if annot is None: + raise ValueError("bad type: widget") + nextwidget = widget.next + page.delete_annot(annot) + widget._annot.parent = None + keylist = list(widget.__dict__.keys()) + for key in keylist: + del widget.__dict__[key] + return nextwidget + @property def derotation_matrix(self) -> Matrix: """Reflects page de-rotation.""" @@ -8814,6 +10992,408 @@ def derotation_matrix(self) -> Matrix: return Matrix(mupdf.FzRect(mupdf.FzRect.UNIT)) return Matrix(JM_derotate_page_matrix(pdfpage)) + def draw_bezier( + page: 'Page', + p1: point_like, + p2: point_like, + p3: point_like, + p4: point_like, + color: OptSeq = (0,), + fill: OptSeq = None, + dashes: OptStr = None, + width: float = 1, + morph: OptStr = None, + closePath: bool = False, + lineCap: int = 0, + lineJoin: int = 0, + overlay: bool = True, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> Point: + """Draw a general cubic Bezier curve from p1 to p4 using control points p2 and p3.""" + img = page.new_shape() + Q = img.draw_bezier(Point(p1), Point(p2), Point(p3), Point(p4)) + img.finish( + color=color, + fill=fill, + dashes=dashes, + width=width, + lineCap=lineCap, + lineJoin=lineJoin, + morph=morph, + closePath=closePath, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + img.commit(overlay) + + return Q + + def draw_circle( + page: 'Page', + center: point_like, + radius: float, + color: OptSeq = (0,), + fill: OptSeq = None, + morph: OptSeq = None, + dashes: OptStr = None, + width: float = 1, + lineCap: int = 0, + lineJoin: int = 0, + overlay: bool = True, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> Point: + """Draw a circle given its center and radius.""" + img = page.new_shape() + Q = img.draw_circle(Point(center), radius) + img.finish( + color=color, + fill=fill, + dashes=dashes, + width=width, + lineCap=lineCap, + lineJoin=lineJoin, + morph=morph, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + img.commit(overlay) + return Q + + def draw_curve( + page: 'Page', + p1: point_like, + p2: point_like, + p3: point_like, + color: OptSeq = (0,), + fill: OptSeq = None, + dashes: OptStr = None, + width: float = 1, + morph: OptSeq = None, + closePath: bool = False, + lineCap: int = 0, + lineJoin: int = 0, + overlay: bool = True, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> Point: + """Draw a special Bezier curve from p1 to p3, generating control points on lines p1 to p2 and p2 to p3.""" + img = page.new_shape() + Q = img.draw_curve(Point(p1), Point(p2), Point(p3)) + img.finish( + color=color, + fill=fill, + dashes=dashes, + width=width, + lineCap=lineCap, + lineJoin=lineJoin, + morph=morph, + closePath=closePath, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + img.commit(overlay) + + return Q + + def draw_line( + page: 'Page', + p1: point_like, + p2: point_like, + color: OptSeq = (0,), + dashes: OptStr = None, + width: float = 1, + lineCap: int = 0, + lineJoin: int = 0, + overlay: bool = True, + morph: OptSeq = None, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc=0, + ) -> Point: + """Draw a line from point p1 to point p2.""" + img = page.new_shape() + p = img.draw_line(Point(p1), Point(p2)) + img.finish( + color=color, + dashes=dashes, + width=width, + closePath=False, + lineCap=lineCap, + lineJoin=lineJoin, + morph=morph, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + img.commit(overlay) + + return p + + def draw_oval( + page: 'Page', + rect: typing.Union[rect_like, quad_like], + color: OptSeq = (0,), + fill: OptSeq = None, + dashes: OptStr = None, + morph: OptSeq = None, + width: float = 1, + lineCap: int = 0, + lineJoin: int = 0, + overlay: bool = True, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> Point: + """Draw an oval given its containing rectangle or quad.""" + img = page.new_shape() + Q = img.draw_oval(rect) + img.finish( + color=color, + fill=fill, + dashes=dashes, + width=width, + lineCap=lineCap, + lineJoin=lineJoin, + morph=morph, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + img.commit(overlay) + + return Q + + def draw_polyline( + page: 'Page', + points: list, + color: OptSeq = (0,), + fill: OptSeq = None, + dashes: OptStr = None, + width: float = 1, + morph: OptSeq = None, + lineCap: int = 0, + lineJoin: int = 0, + overlay: bool = True, + closePath: bool = False, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> Point: + """Draw multiple connected line segments.""" + img = page.new_shape() + Q = img.draw_polyline(points) + img.finish( + color=color, + fill=fill, + dashes=dashes, + width=width, + lineCap=lineCap, + lineJoin=lineJoin, + morph=morph, + closePath=closePath, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + img.commit(overlay) + + return Q + + def draw_quad( + page: 'Page', + quad: quad_like, + color: OptSeq = (0,), + fill: OptSeq = None, + dashes: OptStr = None, + width: float = 1, + lineCap: int = 0, + lineJoin: int = 0, + morph: OptSeq = None, + overlay: bool = True, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> Point: + """Draw a quadrilateral.""" + img = page.new_shape() + Q = img.draw_quad(Quad(quad)) + img.finish( + color=color, + fill=fill, + dashes=dashes, + width=width, + lineCap=lineCap, + lineJoin=lineJoin, + morph=morph, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + img.commit(overlay) + + return Q + + def draw_rect( + page: 'Page', + rect: rect_like, + color: OptSeq = (0,), + fill: OptSeq = None, + dashes: OptStr = None, + width: float = 1, + lineCap: int = 0, + lineJoin: int = 0, + morph: OptSeq = None, + overlay: bool = True, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + radius=None, + ) -> Point: + ''' + Draw a rectangle. See Shape class method for details. + ''' + img = page.new_shape() + Q = img.draw_rect(Rect(rect), radius=radius) + img.finish( + color=color, + fill=fill, + dashes=dashes, + width=width, + lineCap=lineCap, + lineJoin=lineJoin, + morph=morph, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + img.commit(overlay) + + return Q + + def draw_sector( + page: 'Page', + center: point_like, + point: point_like, + beta: float, + color: OptSeq = (0,), + fill: OptSeq = None, + dashes: OptStr = None, + fullSector: bool = True, + morph: OptSeq = None, + width: float = 1, + closePath: bool = False, + lineCap: int = 0, + lineJoin: int = 0, + overlay: bool = True, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> Point: + """Draw a circle sector given circle center, one arc end point and the angle of the arc. + + Parameters: + center -- center of circle + point -- arc end point + beta -- angle of arc (degrees) + fullSector -- connect arc ends with center + """ + img = page.new_shape() + Q = img.draw_sector(Point(center), Point(point), beta, fullSector=fullSector) + img.finish( + color=color, + fill=fill, + dashes=dashes, + width=width, + lineCap=lineCap, + lineJoin=lineJoin, + morph=morph, + closePath=closePath, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + img.commit(overlay) + + return Q + + def draw_squiggle( + page: 'Page', + p1: point_like, + p2: point_like, + breadth: float = 2, + color: OptSeq = (0,), + dashes: OptStr = None, + width: float = 1, + lineCap: int = 0, + lineJoin: int = 0, + overlay: bool = True, + morph: OptSeq = None, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> Point: + """Draw a squiggly line from point p1 to point p2.""" + img = page.new_shape() + p = img.draw_squiggle(Point(p1), Point(p2), breadth=breadth) + img.finish( + color=color, + dashes=dashes, + width=width, + closePath=False, + lineCap=lineCap, + lineJoin=lineJoin, + morph=morph, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + img.commit(overlay) + + return p + + def draw_zigzag( + page: 'Page', + p1: point_like, + p2: point_like, + breadth: float = 2, + color: OptSeq = (0,), + dashes: OptStr = None, + width: float = 1, + lineCap: int = 0, + lineJoin: int = 0, + overlay: bool = True, + morph: OptSeq = None, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> Point: + """Draw a zigzag line from point p1 to point p2.""" + img = page.new_shape() + p = img.draw_zigzag(Point(p1), Point(p2), breadth=breadth) + img.finish( + color=color, + dashes=dashes, + width=width, + closePath=False, + lineCap=lineCap, + lineJoin=lineJoin, + morph=morph, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + img.commit(overlay) + + return p + def extend_textpage(self, tpage, flags=0, matrix=None): page = self.this tp = tpage.this @@ -8897,7 +11477,7 @@ def get_cdrawings(self, extended=None, callback=None, method=None): assert isinstance(page, mupdf.FzPage), f'{self.this=}' clips = True if extended else False prect = mupdf.fz_bound_page(page) - if g_use_extra: + if 1 or g_use_extra: rc = extra.get_cdrawings(page, extended, callback, method) else: rc = list() @@ -9136,28 +11716,190 @@ def get_lineart(self) -> object: val = None return paths - def remove_rotation(self): - """Set page rotation to 0 while maintaining visual appearance.""" - rot = self.rotation # normalized rotation value - if rot == 0: - return Identity # nothing to do + def get_image_info( + page: 'Page', + hashes: bool = False, + xrefs: bool = False + ) -> list: + """Extract image information only from a pymupdf.TextPage. - # need to derotate the page's content - mb = self.mediabox # current mediabox + Args: + hashes: (bool) include MD5 hash for each image. + xrefs: (bool) try to find the xref for each image. Sets hashes to true. + """ + doc = page.parent + if xrefs and doc.is_pdf: + hashes = True + if not doc.is_pdf: + xrefs = False + imginfo = getattr(page, "_image_info", None) + if imginfo and not xrefs: + return imginfo + if not imginfo: + tp = page.get_textpage(flags=TEXT_PRESERVE_IMAGES) + imginfo = tp.extractIMGINFO(hashes=hashes) + del tp + if hashes: + page._image_info = imginfo + if not xrefs or not doc.is_pdf: + return imginfo + imglist = page.get_images() + digests = {} + for item in imglist: + xref = item[0] + pix = Pixmap(doc, xref) + digests[pix.digest] = xref + del pix + for i in range(len(imginfo)): + item = imginfo[i] + xref = digests.get(item["digest"], 0) + item["xref"] = xref + imginfo[i] = item + return imginfo + + def get_image_rects(page: 'Page', name, transform=False) -> list: + """Return list of image positions on a page. - if rot == 90: - # before derotation, shift content horizontally - mat0 = Matrix(1, 0, 0, 1, mb.y1 - mb.x1 - mb.x0 - mb.y0, 0) - elif rot == 270: - # before derotation, shift content vertically - mat0 = Matrix(1, 0, 0, 1, 0, mb.x1 - mb.y1 - mb.y0 - mb.x0) - else: # rot = 180 - mat0 = Matrix(1, 0, 0, 1, -2 * mb.x0, -2 * mb.y0) + Args: + name: (str, list, int) image identification. May be reference name, an + item of the page's image list or an xref. + transform: (bool) whether to also return the transformation matrix. + Returns: + A list of pymupdf.Rect objects or tuples of (pymupdf.Rect, pymupdf.Matrix) + for all image locations on the page. + """ + if type(name) in (list, tuple): + xref = name[0] + elif type(name) is int: + xref = name + else: + imglist = [i for i in page.get_images() if i[7] == name] + if imglist == []: + raise ValueError("bad image name") + elif len(imglist) != 1: + raise ValueError("multiple image names found") + xref = imglist[0][0] + pix = Pixmap(page.parent, xref) # make pixmap of the image to compute MD5 + digest = pix.digest + del pix + infos = page.get_image_info(hashes=True) + if not transform: + bboxes = [Rect(im["bbox"]) for im in infos if im["digest"] == digest] + else: + bboxes = [ + (Rect(im["bbox"]), Matrix(im["transform"])) + for im in infos + if im["digest"] == digest + ] + return bboxes - # prefix with derotation matrix - mat = mat0 * self.derotation_matrix - cmd = _format_g(tuple(mat)) + ' cm ' - cmd = cmd.encode('utf8') + def get_label(page): + """Return the label for this PDF page. + + Args: + page: page object. + Returns: + The label (str) of the page. Errors return an empty string. + """ + # Jorj McKie, 2021-01-06 + + labels = page.parent._get_page_labels() + if not labels: + return "" + labels.sort() + return utils.get_label_pno(page.number, labels) + + def get_links(page: 'Page') -> list: + """Create a list of all links contained in a PDF page. + + Notes: + see PyMuPDF ducmentation for details. + """ + + CheckParent(page) + ln = page.first_link + links = [] + while ln: + nl = utils.getLinkDict(ln, page.parent) + links.append(nl) + ln = ln.next + if links != [] and page.parent.is_pdf: + linkxrefs = [x for x in + #page.annot_xrefs() + JM_get_annot_xref_list2(page) + if x[1] == mupdf.PDF_ANNOT_LINK # pylint: disable=no-member + ] + if len(linkxrefs) == len(links): + for i in range(len(linkxrefs)): + links[i]["xref"] = linkxrefs[i][0] + links[i]["id"] = linkxrefs[i][2] + return links + + def get_pixmap( + page: 'Page', + *, + matrix: matrix_like=Identity, + dpi=None, + colorspace: Colorspace=None, + clip: rect_like=None, + alpha: bool=False, + annots: bool=True, + ) -> 'Pixmap': + """Create pixmap of page. + + Keyword args: + matrix: Matrix for transformation (default: Identity). + dpi: desired dots per inch. If given, matrix is ignored. + colorspace: (str/Colorspace) cmyk, rgb, gray - case ignored, default csRGB. + clip: (irect-like) restrict rendering to this area. + alpha: (bool) whether to include alpha channel + annots: (bool) whether to also render annotations + """ + if colorspace is None: + colorspace = csRGB + if dpi: + zoom = dpi / 72 + matrix = Matrix(zoom, zoom) + + if type(colorspace) is str: + if colorspace.upper() == "GRAY": + colorspace = csGRAY + elif colorspace.upper() == "CMYK": + colorspace = csCMYK + else: + colorspace = csRGB + if colorspace.n not in (1, 3, 4): + raise ValueError("unsupported colorspace") + + dl = page.get_displaylist(annots=annots) + pix = dl.get_pixmap(matrix=matrix, colorspace=colorspace, alpha=alpha, clip=clip) + dl = None + if dpi: + pix.set_dpi(dpi, dpi) + return pix + + def remove_rotation(self): + """Set page rotation to 0 while maintaining visual appearance.""" + rot = self.rotation # normalized rotation value + if rot == 0: + return Identity # nothing to do + + # need to derotate the page's content + mb = self.mediabox # current mediabox + + if rot == 90: + # before derotation, shift content horizontally + mat0 = Matrix(1, 0, 0, 1, mb.y1 - mb.x1 - mb.x0 - mb.y0, 0) + elif rot == 270: + # before derotation, shift content vertically + mat0 = Matrix(1, 0, 0, 1, 0, mb.x1 - mb.y1 - mb.y0 - mb.x0) + else: # rot = 180 + mat0 = Matrix(1, 0, 0, 1, -2 * mb.x0, -2 * mb.y0) + + # prefix with derotation matrix + mat = mat0 * self.derotation_matrix + cmd = _format_g(tuple(mat)) + ' cm ' + cmd = cmd.encode('utf8') _ = TOOLS._insert_contents(self, cmd, False) # prepend to page contents # swap x- and y-coordinates @@ -9191,7 +11933,8 @@ def remove_rotation(self): return rot # the inverse of the generated derotation matrix def cluster_drawings( - self, clip=None, drawings=None, x_tolerance: float = 3, y_tolerance: float = 3 + self, clip=None, drawings=None, x_tolerance: float = 3, y_tolerance: float = 3, + final_filter: bool = True, ) -> list: """Join rectangles of neighboring vector graphic items. @@ -9284,6 +12027,8 @@ def are_neighbors(r1, r2): prects = sorted(set(prects), key=lambda r: (r.y1, r.x0)) new_rects = sorted(set(new_rects), key=lambda r: (r.y1, r.x0)) + if not final_filter: + return new_rects return [r for r in new_rects if r.width > delta_x and r.height > delta_y] def get_fonts(self, full=False): @@ -9323,7 +12068,7 @@ def get_image_bbox(self, name, transform=0): else: raise ValueError("found multiple images named '%s'." % name) xref = item[-1] - if xref != 0 or transform is True: + if xref != 0 or transform: try: return self.get_image_rects(item, transform=transform)[0] except Exception: @@ -9418,6 +12163,21 @@ def get_textbox( del tp return rc + def get_text(self, *args, **kwargs): + return utils.get_text(self, *args, **kwargs) + + def get_text_blocks(self, *args, **kwargs): + return utils.get_text_blocks(self, *args, **kwargs) + + def get_text_selection(self, *args, **kwargs): + return utils.get_text_selection(self, *args, **kwargs) + + def get_text_words(self, *args, **kwargs): + return utils.get_text_words(self, *args, **kwargs) + + def get_textpage_ocr(self, *args, **kwargs): + return utils.get_textpage_ocr(self, *args, **kwargs) + def get_textpage(self, clip: rect_like = None, flags: int = 0, matrix=None) -> "TextPage": CheckParent(self) if matrix is None: @@ -9442,7 +12202,7 @@ def get_texttrace(self): self.set_rotation(0) page = self.this rc = [] - if g_use_extra: + if 1 or g_use_extra: dev = extra.JM_new_texttrace_device(rc) else: dev = JM_new_texttrace_device(rc) @@ -9543,6 +12303,406 @@ def insert_font(self, fontname="helv", fontfile=None, fontbuffer=None, doc.get_char_widths(xref, fontdict=fontdict) return xref + def insert_htmlbox( + page, + rect, + text, + *, + css=None, + scale_low=0, + archive=None, + rotate=0, + oc=0, + opacity=1, + overlay=True, + _scale_word_width=True, + _verbose=False, + ) -> tuple: + """Insert text with optional HTML tags and stylings into a rectangle. + + Args: + rect: (rect-like) rectangle into which the text should be placed. + text: (str) text with optional HTML tags and stylings. + css: (str) CSS styling commands. + scale_low: (float) force-fit content by scaling it down. Must be in + range [0, 1]. If 1, no scaling will take place. If 0, arbitrary + down-scaling is acceptable. A value of 0.1 would mean that content + may be scaled down by at most 90%. + archive: Archive object pointing to locations of used fonts or images + rotate: (int) rotate the text in the box by a multiple of 90 degrees. + oc: (int) the xref of an OCG / OCMD (Optional Content). + opacity: (float) set opacity of inserted content. + overlay: (bool) put text on top of page content. + _scale_word_width: internal, for testing only. + _verbose: internal, for testing only. + Returns: + A tuple of floats (spare_height, scale). + spare_height: + The height of the remaining space in below the + text, or -1 if we failed to fit. + scale: + The scaling required; `0 < scale <= 1`. + Will be less than `scale_low` if we failed to fit. + """ + # normalize rotation angle + if not rotate % 90 == 0: + raise ValueError("bad rotation angle") + while rotate < 0: + rotate += 360 + while rotate >= 360: + rotate -= 360 + + if not 0 <= scale_low <= 1: + raise ValueError("'scale_low' must be in [0, 1]") + + if css is None: + css = "" + + rect = Rect(rect) + if rotate in (90, 270): + temp_rect = Rect(0, 0, rect.height, rect.width) + else: + temp_rect = Rect(0, 0, rect.width, rect.height) + + # use a small border by default + mycss = "body {margin:1px;}" + css # append user CSS + + # either make a story, or accept a given one + if isinstance(text, str): # if a string, convert to a Story + story = Story(html=text, user_css=mycss, archive=archive) + elif isinstance(text, Story): + story = text + else: + raise ValueError("'text' must be a string or a Story") + + # ---------------------------------------------------------------- + # Find a scaling factor that lets our story fit in. Instead of scaling + # the text smaller, we instead look at how much bigger the rect needs + # to be to fit the text, then reverse the scaling to get how much we + # need to scale down the text. + # ---------------------------------------------------------------- + rect_scale_max = None if scale_low == 0 else 1 / scale_low + + fit = story.fit_scale( + temp_rect, + scale_min=1, + scale_max=rect_scale_max, + flags=mupdf.FZ_PLACE_STORY_FLAG_NO_OVERFLOW if _scale_word_width else 0, + verbose=_verbose, + ) + + if not fit.big_enough: # there was no fit + scale = 1 / fit.parameter + return (-1, scale) + + # fit.filled is a tuple; we convert it in place to a Rect for + # convenience. (fit.rect is already a Rect.) + fit.filled = Rect(fit.filled) + assert (fit.rect.x0, fit.rect.y0) == (0, 0) + assert (fit.filled.x0, fit.filled.y0) == (0, 0) + + scale = 1 / fit.parameter + assert scale >= scale_low, f'{scale_low=} {scale=}' + + spare_height = max((fit.rect.y1 - fit.filled.y1) * scale, 0) + + def rect_function(*args): + return fit.rect, fit.rect, None + + # draw story on temp PDF page + doc = story.write_with_links(rect_function) + + # Insert opacity if requested. + # For this, we prepend a command to the /Contents. + if 0 <= opacity < 1: + tpage = doc[0] # load page + # generate /ExtGstate for the page + alp0 = tpage._set_opacity(CA=opacity, ca=opacity) + s = f"/{alp0} gs\n" # generate graphic state command + TOOLS._insert_contents(tpage, s.encode(), 0) + + # put result in target page + page.show_pdf_page(rect, doc, 0, rotate=rotate, oc=oc, overlay=overlay) + + # ------------------------------------------------------------------------- + # re-insert links in target rect (show_pdf_page cannot copy annotations) + # ------------------------------------------------------------------------- + # scaled center point of fit.rect + mp1 = (fit.rect.tl + fit.rect.br) / 2 * scale + + # center point of target rect + mp2 = (rect.tl + rect.br) / 2 + + # compute link positioning matrix: + # - move center of scaled-down fit.rect to (0,0) + # - rotate + # - move (0,0) to center of target rect + mat = ( + Matrix(scale, 0, 0, scale, -mp1.x, -mp1.y) + * Matrix(-rotate) + * Matrix(1, 0, 0, 1, mp2.x, mp2.y) + ) + + # copy over links + for link in doc[0].get_links(): + link["from"] *= mat + page.insert_link(link) + + return spare_height, scale + + def insert_image( + page, + rect, + *, + alpha=-1, + filename=None, + height=0, + keep_proportion=True, + mask=None, + oc=0, + overlay=True, + pixmap=None, + rotate=0, + stream=None, + width=0, + xref=0, + ): + """Insert an image for display in a rectangle. + + Args: + rect: (rect_like) position of image on the page. + alpha: (int, optional) set to 0 if image has no transparency. + filename: (str, Path, file object) image filename. + height: (int) + keep_proportion: (bool) keep width / height ratio (default). + mask: (bytes, optional) image consisting of alpha values to use. + oc: (int) xref of OCG or OCMD to declare as Optional Content. + overlay: (bool) put in foreground (default) or background. + pixmap: (pymupdf.Pixmap) use this as image. + rotate: (int) rotate by 0, 90, 180 or 270 degrees. + stream: (bytes) use this as image. + width: (int) + xref: (int) use this as image. + + 'page' and 'rect' are positional, all other parameters are keywords. + + If 'xref' is given, that image is used. Other input options are ignored. + Else, exactly one of pixmap, stream or filename must be given. + + 'alpha=0' for non-transparent images improves performance significantly. + Affects stream and filename only. + + Optimum transparent insertions are possible by using filename / stream in + conjunction with a 'mask' image of alpha values. + + Returns: + xref (int) of inserted image. Re-use as argument for multiple insertions. + """ + CheckParent(page) + doc = page.parent + if not doc.is_pdf: + raise ValueError("is no PDF") + + if xref == 0 and (bool(filename) + bool(stream) + bool(pixmap) != 1): + raise ValueError("xref=0 needs exactly one of filename, pixmap, stream") + + if filename: + if type(filename) is str: + pass + elif hasattr(filename, "absolute"): + filename = str(filename) + elif hasattr(filename, "name"): + filename = filename.name + else: + raise ValueError("bad filename") + + if filename and not os.path.exists(filename): + raise FileNotFoundError("No such file: '%s'" % filename) + elif stream and type(stream) not in (bytes, bytearray, io.BytesIO): + raise ValueError("stream must be bytes-like / BytesIO") + elif pixmap and type(pixmap) is not Pixmap: + raise ValueError("pixmap must be a Pixmap") + if mask and not (stream or filename): + raise ValueError("mask requires stream or filename") + if mask and type(mask) not in (bytes, bytearray, io.BytesIO): + raise ValueError("mask must be bytes-like / BytesIO") + while rotate < 0: + rotate += 360 + while rotate >= 360: + rotate -= 360 + if rotate not in (0, 90, 180, 270): + raise ValueError("bad rotate value") + + r = Rect(rect) + if r.is_empty or r.is_infinite: + raise ValueError("rect must be finite and not empty") + clip = r * ~page.transformation_matrix + + # Create a unique image reference name. + ilst = [i[7] for i in doc.get_page_images(page.number)] + ilst += [i[1] for i in doc.get_page_xobjects(page.number)] + ilst += [i[4] for i in doc.get_page_fonts(page.number)] + n = "fzImg" # 'pymupdf image' + i = 0 + _imgname = n + "0" # first name candidate + while _imgname in ilst: + i += 1 + _imgname = n + str(i) # try new name + + if overlay: + page.wrap_contents() # ensure a balanced graphics state + digests = doc.InsertedImages + xref, digests = page._insert_image( + filename=filename, + pixmap=pixmap, + stream=stream, + imask=mask, + clip=clip, + overlay=overlay, + oc=oc, + xref=xref, + rotate=rotate, + keep_proportion=keep_proportion, + width=width, + height=height, + alpha=alpha, + _imgname=_imgname, + digests=digests, + ) + if digests is not None: + doc.InsertedImages = digests + + return xref + + def insert_link(page: 'Page', lnk: dict, mark: bool = True) -> None: + """Insert a new link for the current page.""" + CheckParent(page) + annot = utils.getLinkText(page, lnk) + if annot == "": + raise ValueError("link kind not supported") + page._addAnnot_FromString((annot,)) + + def insert_text( + page: 'Page', + point: point_like, + text: typing.Union[str, list], + *, + fontsize: float = 11, + lineheight: OptFloat = None, + fontname: str = "helv", + fontfile: OptStr = None, + set_simple: int = 0, + encoding: int = 0, + color: OptSeq = None, + fill: OptSeq = None, + border_width: float = 0.05, + miter_limit: float = 1, + render_mode: int = 0, + rotate: int = 0, + morph: OptSeq = None, + overlay: bool = True, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ): + + img = page.new_shape() + rc = img.insert_text( + point, + text, + fontsize=fontsize, + lineheight=lineheight, + fontname=fontname, + fontfile=fontfile, + set_simple=set_simple, + encoding=encoding, + color=color, + fill=fill, + border_width=border_width, + render_mode=render_mode, + miter_limit=miter_limit, + rotate=rotate, + morph=morph, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + if rc >= 0: + img.commit(overlay) + return rc + + def insert_textbox( + page: 'Page', + rect: rect_like, + buffer: typing.Union[str, list], + *, + fontname: str = "helv", + fontfile: OptStr = None, + set_simple: int = 0, + encoding: int = 0, + fontsize: float = 11, + lineheight: OptFloat = None, + color: OptSeq = None, + fill: OptSeq = None, + expandtabs: int = 1, + align: int = 0, + rotate: int = 0, + render_mode: int = 0, + miter_limit: float = 1, + border_width: float = 0.05, + morph: OptSeq = None, + overlay: bool = True, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> float: + """Insert text into a given rectangle. + + Notes: + Creates a Shape object, uses its same-named method and commits it. + Parameters: + rect: (rect-like) area to use for text. + buffer: text to be inserted + fontname: a Base-14 font, font name or '/name' + fontfile: name of a font file + fontsize: font size + lineheight: overwrite the font property + color: RGB color triple + expandtabs: handles tabulators with string function + align: left, center, right, justified + rotate: 0, 90, 180, or 270 degrees + morph: morph box with a matrix and a fixpoint + overlay: put text in foreground or background + Returns: + unused or deficit rectangle area (float) + """ + img = page.new_shape() + rc = img.insert_textbox( + rect, + buffer, + fontsize=fontsize, + lineheight=lineheight, + fontname=fontname, + fontfile=fontfile, + set_simple=set_simple, + encoding=encoding, + color=color, + fill=fill, + expandtabs=expandtabs, + render_mode=render_mode, + miter_limit=miter_limit, + border_width=border_width, + align=align, + rotate=rotate, + morph=morph, + stroke_opacity=stroke_opacity, + fill_opacity=fill_opacity, + oc=oc, + ) + if rc >= 0: + img.commit(overlay) + return rc + @property def is_wrapped(self): """Check if /Contents is in a balanced graphics state.""" @@ -9655,6 +12815,9 @@ def mediabox(self): def mediabox_size(self): return Point(self.mediabox.x1, self.mediabox.y1) + def new_shape(self): + return Shape(self) + #@property #def parent( self): # assert self._parent @@ -9674,6 +12837,44 @@ def refresh(self): # fixme this looks wrong. self.this = page + def replace_image( + page: 'Page', + xref: int, + *, + filename=None, + pixmap=None, + stream=None, + ): + """Replace the image referred to by xref. + + Replace the image by changing the object definition stored under xref. This + will leave the pages appearance instructions intact, so the new image is + being displayed with the same bbox, rotation etc. + By providing a small fully transparent image, an effect as if the image had + been deleted can be achieved. + A typical use may include replacing large images by a smaller version, + e.g. with a lower resolution or graylevel instead of colored. + + Args: + xref: the xref of the image to replace. + filename, pixmap, stream: exactly one of these must be provided. The + meaning being the same as in Page.insert_image. + """ + doc = page.parent # the owning document + if not doc.xref_is_image(xref): + raise ValueError("xref not an image") # insert new image anywhere in page + if bool(filename) + bool(stream) + bool(pixmap) != 1: + raise ValueError("Exactly one of filename/stream/pixmap must be given") + new_xref = page.insert_image( + page.rect, filename=filename, stream=stream, pixmap=pixmap + ) + doc.xref_copy(new_xref, xref) # copy over new to old + last_contents_xref = page.get_contents()[-1] + # new image insertion has created a new /Contents source, + # which we will set to spaces now + doc.update_stream(last_contents_xref, b" ") + page._image_info = None # clear cache of extracted image information + @property def rotation(self): """Page rotation.""" @@ -9695,6 +12896,47 @@ def run(self, dw, m): CheckParent(self) mupdf.fz_run_page(self.this, dw.device, JM_matrix_from_py(m), mupdf.FzCookie()) + def search_for( + page, + text, + *, + clip=None, + quads=False, + flags=None, + textpage=None, + ) -> list: + """Search for a string on a page. + + Args: + text: string to be searched for + clip: restrict search to this rectangle + quads: (bool) return quads instead of rectangles + flags: bit switches, default: join hyphened words + textpage: a pre-created pymupdf.TextPage + Returns: + a list of rectangles or quads, each containing one occurrence. + """ + if flags is None: + flags=(0 + | TEXT_DEHYPHENATE + | TEXT_PRESERVE_WHITESPACE + | TEXT_PRESERVE_LIGATURES + | TEXT_MEDIABOX_CLIP + ) + if clip is not None: + clip = Rect(clip) + + CheckParent(page) + tp = textpage + if tp is None: + tp = page.get_textpage(clip=clip, flags=flags) # create pymupdf.TextPage + elif getattr(tp, "parent") != page: + raise ValueError("not a textpage of this page") + rlist = tp.search(text, quads=quads) + if textpage is None: + del tp + return rlist + def set_artbox(self, rect): """Set the ArtBox.""" return self._set_pagebox("ArtBox", rect) @@ -9762,6 +13004,130 @@ def set_trimbox(self, rect): """Set the TrimBox.""" return self._set_pagebox("TrimBox", rect) + def show_pdf_page( + page, + rect, + docsrc, + pno=0, + keep_proportion=True, + overlay=True, + oc=0, + rotate=0, + clip=None, + ) -> int: + """Show page number 'pno' of PDF 'docsrc' in rectangle 'rect'. + + Args: + rect: (rect-like) where to place the source image + docsrc: (document) source PDF + pno: (int) source page number + keep_proportion: (bool) do not change width-height-ratio + overlay: (bool) put in foreground + oc: (xref) make visibility dependent on this OCG / OCMD (which must be defined in the target PDF) + rotate: (int) degrees (multiple of 90) + clip: (rect-like) part of source page rectangle + Returns: + xref of inserted object (for reuse) + """ + def calc_matrix(sr, tr, keep=True, rotate=0): + """Calculate transformation matrix from source to target rect. + + Notes: + The product of four matrices in this sequence: (1) translate correct + source corner to origin, (2) rotate, (3) scale, (4) translate to + target's top-left corner. + Args: + sr: source rect in PDF (!) coordinate system + tr: target rect in PDF coordinate system + keep: whether to keep source ratio of width to height + rotate: rotation angle in degrees + Returns: + Transformation matrix. + """ + # calc center point of source rect + smp = (sr.tl + sr.br) / 2.0 + # calc center point of target rect + tmp = (tr.tl + tr.br) / 2.0 + + # m moves to (0, 0), then rotates + m = Matrix(1, 0, 0, 1, -smp.x, -smp.y) * Matrix(rotate) + + sr1 = sr * m # resulting source rect to calculate scale factors + + fw = tr.width / sr1.width # scale the width + fh = tr.height / sr1.height # scale the height + if keep: + fw = fh = min(fw, fh) # take min if keeping aspect ratio + + m *= Matrix(fw, fh) # concat scale matrix + m *= Matrix(1, 0, 0, 1, tmp.x, tmp.y) # concat move to target center + return JM_TUPLE(m) + + CheckParent(page) + doc = page.parent + + if not doc.is_pdf or not docsrc.is_pdf: + raise ValueError("is no PDF") + + if rect.is_empty or rect.is_infinite: + raise ValueError("rect must be finite and not empty") + + while pno < 0: # support negative page numbers + pno += docsrc.page_count + src_page = docsrc[pno] # load source page + + tar_rect = rect * ~page.transformation_matrix # target rect in PDF coordinates + + src_rect = src_page.rect if not clip else src_page.rect & clip # source rect + if src_rect.is_empty or src_rect.is_infinite: + raise ValueError("clip must be finite and not empty") + src_rect = src_rect * ~src_page.transformation_matrix # ... in PDF coord + + matrix = calc_matrix(src_rect, tar_rect, keep=keep_proportion, rotate=rotate) + + # list of existing /Form /XObjects + ilst = [i[1] for i in doc.get_page_xobjects(page.number)] + ilst += [i[7] for i in doc.get_page_images(page.number)] + ilst += [i[4] for i in doc.get_page_fonts(page.number)] + + # create a name not in that list + n = "fzFrm" + i = 0 + _imgname = n + "0" + while _imgname in ilst: + i += 1 + _imgname = n + str(i) + + isrc = docsrc._graft_id # used as key for graftmaps + if doc._graft_id == isrc: + raise ValueError("source document must not equal target") + + # retrieve / make Graftmap for source PDF + gmap = doc.Graftmaps.get(isrc, None) + if gmap is None: + gmap = Graftmap(doc) + doc.Graftmaps[isrc] = gmap + + # take note of generated xref for automatic reuse + pno_id = (isrc, pno) # id of docsrc[pno] + xref = doc.ShownPages.get(pno_id, 0) + + if overlay: + page.wrap_contents() # ensure a balanced graphics state + xref = page._show_pdf_page( + src_page, + overlay=overlay, + matrix=matrix, + xref=xref, + oc=oc, + clip=src_rect, + graftmap=gmap, + _imgname=_imgname, + ) + doc.ShownPages[pno_id] = xref + + return xref + @property def transformation_matrix(self): """Page transformation matrix.""" @@ -9790,6 +13156,15 @@ def trimbox(self): mb = self.mediabox return Rect(rect[0], mb.y1 - rect[3], rect[2], mb.y1 - rect[1]) + def update_link(page: 'Page', lnk: dict) -> None: + """Update a link on the current page.""" + CheckParent(page) + annot = utils.getLinkText(page, lnk) + if annot == "": + raise ValueError("link kind not supported") + + page.parent.update_object(lnk["xref"], annot, page=page) + def widgets(self, types=None): """ Generator over the widgets of a page. @@ -9817,6 +13192,57 @@ def wrap_contents(self): append = b"\nQ" * pop + b"\n" TOOLS._insert_contents(self, append, True) + def write_text( + page: 'Page', + rect=None, + writers=None, + overlay=True, + color=None, + opacity=None, + keep_proportion=True, + rotate=0, + oc=0, + ) -> None: + """Write the text of one or more pymupdf.TextWriter objects. + + Args: + rect: target rectangle. If None, the union of the text writers is used. + writers: one or more pymupdf.TextWriter objects. + overlay: put in foreground or background. + keep_proportion: maintain aspect ratio of rectangle sides. + rotate: arbitrary rotation angle. + oc: the xref of an optional content object + """ + assert isinstance(page, Page) + if not writers: + raise ValueError("need at least one pymupdf.TextWriter") + if type(writers) is TextWriter: + if rotate == 0 and rect is None: + writers.write_text(page, opacity=opacity, color=color, overlay=overlay) + return None + else: + writers = (writers,) + clip = writers[0].text_rect + textdoc = Document() + tpage = textdoc.new_page(width=page.rect.width, height=page.rect.height) + for writer in writers: + clip |= writer.text_rect + writer.write_text(tpage, opacity=opacity, color=color) + if rect is None: + rect = clip + page.show_pdf_page( + rect, + textdoc, + 0, + overlay=overlay, + keep_proportion=keep_proportion, + rotate=rotate, + clip=clip, + oc=oc, + ) + textdoc = None + tpage = None + @property def xref(self): """PDF xref number of page.""" @@ -9825,6 +13251,9 @@ def xref(self): rect = property(bound, doc="page rectangle") + # any result of layout analysis is stored here + layout_information = None + class Pixmap: @@ -9839,6 +13268,16 @@ def __init__(self, *args): Pixmap(colorspace, width, height, samples, alpha) - from samples data. Pixmap(PDFdoc, xref) - from an image at xref in a PDF document. """ + # Cache for property `self.samples_mv`. Set here so __del_() sees it if + # we raise. + # + self._samples_mv = None + + # 2024-01-16: Experimental support for a memory-view of the underlying + # data. Doesn't seem to make much difference to Pixmap.set_pixel() so + # not currently used. + self._memory_view = None + if 0: pass @@ -9908,9 +13347,6 @@ def __init__(self, *args): elif (args_match(args, (Pixmap, mupdf.FzPixmap), (float, int), (float, int), None) or args_match(args, (Pixmap, mupdf.FzPixmap), (float, int), (float, int))): # create pixmap as scaled copy of another one - if mupdf_version_tuple < (1, 23, 8): - assert 0, f'Cannot handle {args=} because fz_scale_pixmap() and fz_scale_pixmap_cached() are not declared in MuPDF headers' - if len(args) == 3: spix, w, h = args bbox = mupdf.FzIrect(mupdf.fz_infinite_irect) @@ -9918,9 +13354,7 @@ def __init__(self, *args): spix, w, h, clip = args bbox = JM_irect_from_py(clip) - spix, w, h, clip = args src_pix = spix.this if isinstance(spix, Pixmap) else spix - bbox = JM_irect_from_py(clip) if not mupdf.fz_is_infinite_irect(bbox): pm = mupdf.fz_scale_pixmap(src_pix, src_pix.x(), src_pix.y(), w, h, bbox) else: @@ -9957,10 +13391,9 @@ def __init__(self, *args): # copy samples data ------------------------------------------ if 1: - # We use specially-provided (by MuPDF Python bindings) - # ll_fz_pixmap_copy() to get best performance. + # We use our pixmap_copy() to get best performance. # test_pixmap.py:test_setalpha(): 3.9s t=0.0062 - mupdf.ll_fz_pixmap_copy( pm.m_internal, src_pix.m_internal, n) + extra.pixmap_copy( pm.m_internal, src_pix.m_internal, n) elif 1: # Use memoryview. # test_pixmap.py:test_setalpha(): 4.6 t=0.51 @@ -10104,11 +13537,6 @@ def __init__(self, *args): text += f' {type(arg)}: {arg}\n' raise Exception( text) - # 2024-01-16: Experimental support for a memory-view of the underlying - # data. Doesn't seem to make much difference to Pixmap.set_pixel() so - # not currently used. - self._memory_view = None - def __len__(self): return self.size @@ -10133,10 +13561,7 @@ def _tobytes(self, format_, jpg_quality): elif format_ == 5: mupdf.fz_write_pixmap_as_psd(out, pm) elif format_ == 6: mupdf.fz_write_pixmap_as_ps(out, pm) elif format_ == 7: - if mupdf_version_tuple < (1, 24): - mupdf.fz_write_pixmap_as_jpeg(out, pm, jpg_quality) - else: - mupdf.fz_write_pixmap_as_jpeg(out, pm, jpg_quality, 0) + mupdf.fz_write_pixmap_as_jpeg(out, pm, jpg_quality, 0) else: mupdf.fz_write_pixmap_as_png(out, pm) out.fz_close_output() @@ -10173,8 +13598,6 @@ def color_count(self, colors=0, clip=None): ''' pm = self.this rc = JM_color_count( pm, clip) - if not rc: - raise RuntimeError( MSG_COLOR_COUNT_FAILED) if not colors: return len( rc) return rc @@ -10197,7 +13620,10 @@ def color_topusage(self, clip=None): @property def colorspace(self): """Pixmap Colorspace.""" - return Colorspace(mupdf.fz_pixmap_colorspace(self.this)) + cs = Colorspace(mupdf.fz_pixmap_colorspace(self.this)) + if cs.name == "None": + return None + return cs def copy(self, src, bbox): """Copy bbox from another Pixmap.""" @@ -10236,8 +13662,10 @@ def invert_irect(self, bbox=None): return False r = JM_irect_from_py(bbox) if mupdf.fz_is_infinite_irect(r): - r = mupdf.fz_pixmap_bbox( pm) - return bool(JM_invert_pixmap_rect( pm, r)) + mupdf.fz_invert_pixmap(pm) + return True + mupdf.fz_invert_pixmap_rect(pm, r) + return True @property def irect(self): @@ -10263,11 +13691,13 @@ def _pixmap_read_samples(pm, offset, n): for i in range(n): ret.append(mupdf.fz_samples_get(pm, offset+i)) return ret - sample0 = _pixmap_read_samples( pm, 0, n) - for offset in range( n, count, n): - sample = _pixmap_read_samples( pm, offset, n) - if sample != sample0: - return False + for offset in range( 0, count, n): + if offset == 0: + sample0 = _pixmap_read_samples( pm, 0, n) + else: + sample = _pixmap_read_samples( pm, offset, n) + if sample != sample0: + return False return True @property @@ -10287,8 +13717,7 @@ def pdfocr_save(self, filename, compress=1, language=None, tessdata=None): ''' Save pixmap as an OCR-ed PDF page. ''' - if not TESSDATA_PREFIX and not tessdata: - raise RuntimeError('No OCR support: TESSDATA_PREFIX not set') + tessdata = get_tessdata(tessdata) opts = mupdf.FzPdfocrOptions() opts.compress = compress if language: @@ -10300,8 +13729,10 @@ def pdfocr_save(self, filename, compress=1, language=None, tessdata=None): mupdf.fz_save_pixmap_as_pdfocr( pix, filename, 0, opts) else: out = JM_new_output_fileptr( filename) - mupdf.fz_write_pixmap_as_pdfocr( out, pix, opts) - out.fz_close_output() + try: + mupdf.fz_write_pixmap_as_pdfocr( out, pix, opts) + finally: + out.fz_close_output() # Avoid MuPDF warning. def pdfocr_tobytes(self, compress=True, language="eng", tessdata=None): """Save pixmap as an OCR-ed PDF page. @@ -10310,26 +13741,22 @@ def pdfocr_tobytes(self, compress=True, language="eng", tessdata=None): compress: (bool) compress, default 1 (True). language: (str) language(s) occurring on page, default "eng" (English), multiples like "eng+ger" for English and German. - tessdata: (str) folder name of Tesseract's language support. Must be - given if environment variable TESSDATA_PREFIX is not set. + tessdata: (str) folder name of Tesseract's language support. If None + we use environment variable TESSDATA_PREFIX or search for + Tesseract installation. Notes: - On failure, make sure Tesseract is installed and you have set the - environment variable "TESSDATA_PREFIX" to the folder containing your - Tesseract's language support data. + On failure, make sure Tesseract is installed and you have set + or environment variable "TESSDATA_PREFIX" to the folder + containing your Tesseract's language support data. """ - if not TESSDATA_PREFIX and not tessdata: - raise RuntimeError('No OCR support: TESSDATA_PREFIX not set') + tessdata = get_tessdata(tessdata) from io import BytesIO bio = BytesIO() self.pdfocr_save(bio, compress=compress, language=language, tessdata=tessdata) return bio.getvalue() - def pil_save(self, *args, **kwargs): - """Write to image file using Pillow. - - Args are passed to Pillow's Image.save method, see their documentation. - Use instead of save when other output formats are desired. - """ + def pil_image(self): + """Create a Pillow Image from the Pixmap.""" try: from PIL import Image except ImportError: @@ -10337,16 +13764,27 @@ def pil_save(self, *args, **kwargs): raise cspace = self.colorspace - if cspace is None: + if not cspace: mode = "L" elif cspace.n == 1: - mode = "L" if self.alpha == 0 else "LA" + mode = "L" if not self.alpha else "LA" elif cspace.n == 3: - mode = "RGB" if self.alpha == 0 else "RGBA" + mode = "RGB" if not self.alpha else "RGBA" else: mode = "CMYK" img = Image.frombytes(mode, (self.width, self.height), self.samples) + return img + + def pil_save(self, *args, **kwargs): + """Write to image file using Pillow. + + An intermediate PIL Image is created, and its "save" method is used + to store the image. See Pillow documentation to learn about the + meaning of possible positional and keyword parameters. + Use this when other output formats are desired. + """ + img = self.pil_image() if "dpi" not in kwargs.keys(): kwargs["dpi"] = (self.xres, self.yres) @@ -10354,14 +13792,20 @@ def pil_save(self, *args, **kwargs): img.save(*args, **kwargs) def pil_tobytes(self, *args, **kwargs): - """Convert to binary image stream using pillow. + """Convert to an image in memory using Pillow. - Args are passed to Pillow's Image.save method, see their documentation. - Use instead of 'tobytes' when other output formats are needed. + An intermediate PIL Image is created, and its "save" method is used + to store the image. See Pillow documentation to learn about the + meaning of possible positional or keyword parameters. + Use this when other output formats are desired. """ - from io import BytesIO - bytes_out = BytesIO() - self.pil_save(bytes_out, *args, **kwargs) + bytes_out = io.BytesIO() + img = self.pil_image() + + if "dpi" not in kwargs.keys(): + kwargs["dpi"] = (self.xres, self.yres) + + img.save(bytes_out, *args, **kwargs) return bytes_out.getvalue() def pixel(self, x, y): @@ -10392,7 +13836,17 @@ def samples_mv(self): ''' Pixmap samples memoryview. ''' - return mupdf.fz_pixmap_samples_memoryview(self.this) + # We remember the returned memoryview so that our `__del__()` can + # release it; otherwise accessing it after we have been destructed will + # fail, possibly crashing Python; this is #4155. + # + if self._samples_mv is None: + self._samples_mv = mupdf.fz_pixmap_samples_memoryview(self.this) + return self._samples_mv + + def _samples_mv_release(self): + if self._samples_mv: + self._samples_mv.release() @property def samples_ptr(self): @@ -10625,16 +14079,12 @@ def shrink(self, factor): mupdf.fz_subsample_pixmap( self.this, factor) # Pixmap has changed so clear our memory view. self._memory_view = None + self._samples_mv_release() @property def size(self): """Pixmap size.""" - if mupdf_version_tuple >= (1, 23, 8): - return mupdf.fz_pixmap_size( self.this) - # fz_pixmap_size() is not publicly visible, so we implement it - # ourselves. fixme: we don't add on sizeof(fz_pixmap). - pm = self.this - return pm.n() * pm.w() * pm.h() + return mupdf.fz_pixmap_size( self.this) @property def stride(self): @@ -10683,6 +14133,10 @@ def yres(self): width = w height = h + + def __del__(self): + if self._samples_mv: + self._samples_mv.release() del Point @@ -10704,7 +14158,7 @@ def __bool__(self): def __eq__(self, p): if not hasattr(p, "__len__"): return False - return len(p) == 2 and bool(self - p) is False + return len(p) == 2 and not (self - p) def __getitem__(self, i): return (self.x, self.y)[i] @@ -10735,7 +14189,7 @@ def __init__(self, *args, x=None, y=None): self.x = l.x self.y = l.y else: - if hasattr(l, "__getitem__") is False: + if not hasattr(l, "__getitem__"): raise ValueError("Point: bad args") if len(l) != 2: raise ValueError("Point: bad seq len") @@ -10752,6 +14206,9 @@ def __len__(self): def __mul__(self, m): if hasattr(m, "__float__"): return Point(self.x * m, self.y * m) + if hasattr(m, "__getitem__") and len(m) == 2: + # dot product + return self.x * m[0] + self.y * m[1] p = Point(self) return p.transform(m) @@ -10946,7 +14403,7 @@ def __init__(self, *args, ul=None, ur=None, ll=None, lr=None): if isinstance(l, mupdf.FzQuad): self.this = l self.ul, self.ur, self.ll, self.lr = Point(l.ul), Point(l.ur), Point(l.ll), Point(l.lr) - elif hasattr(l, "__getitem__") is False: + elif not hasattr(l, "__getitem__"): raise ValueError("Quad: bad args") elif len(l) != 4: raise ValueError("Quad: bad seq len") @@ -11147,7 +14604,7 @@ def __contains__(self, x): def __eq__(self, rect): if not hasattr(rect, "__len__"): return False - return len(rect) == 4 and bool(self - rect) is False + return len(rect) == 4 and not (self - rect) def __getitem__(self, i): return (self.x0, self.y0, self.x1, self.y1)[i] @@ -11251,6 +14708,10 @@ def contains(self, x): def height(self): return max(0, self.y1 - self.y0) + def get_area(self, *args) -> float: + """Calculate area of rectangle.\nparameter is one of 'px' (default), 'in', 'cm', or 'mm'.""" + return _rect_area(self.width, self.height, args) + def include_point(self, p): """Extend to include point-like p.""" if len(p) != 2: @@ -11292,13 +14753,17 @@ def intersect(self, r): def intersects(self, x): """Check if intersection with rectangle x is not empty.""" - r1 = Rect(x) - if self.is_empty or self.is_infinite or r1.is_empty or r1.is_infinite: - return False - r = Rect(self) - if r.intersect(r1).is_empty: - return False - return True + rect2 = Rect(x) + return (1 + and not self.is_empty + and not self.is_infinite + and not rect2.is_empty + and not rect2.is_infinite + and self.x0 < rect2.x1 + and rect2.x0 < self.x1 + and self.y0 < rect2.y1 + and rect2.y0 < self.y1 + ) @property def is_empty(self): @@ -11388,12 +14853,32 @@ def width(self): class Shape: """Create a new shape.""" + @staticmethod + def horizontal_angle(C, P): + """Return the angle to the horizontal for the connection from C to P. + This uses the arcus sine function and resolves its inherent ambiguity by + looking up in which quadrant vector S = P - C is located. + """ + S = Point(P - C).unit # unit vector 'C' -> 'P' + alfa = math.asin(abs(S.y)) # absolute angle from horizontal + if S.x < 0: # make arcsin result unique + if S.y <= 0: # bottom-left + alfa = -(math.pi - alfa) + else: # top-left + alfa = math.pi - alfa + else: + if S.y >= 0: # top-right + pass + else: # bottom-right + alfa = -alfa + return alfa + def __init__(self, page: Page): CheckParent(page) self.page = page self.doc = page.parent if not self.doc.is_pdf: - raise ValueError("not a PDF") + raise ValueError("is no PDF") self.height = page.mediabox_size.y self.width = page.mediabox_size.x self.x = page.cropbox_position.x @@ -11408,46 +14893,71 @@ def __init__(self, page: Page): self.last_point = None self.rect = None - def commit(self, overlay: bool = True) -> None: - """ - Update the page's /Contents object with Shape data. The argument - controls whether data appear in foreground (default) or background. - """ - CheckParent(self.page) # doc may have died meanwhile - self.totalcont += self.text_cont + def updateRect(self, x): + if self.rect is None: + if len(x) == 2: + self.rect = Rect(x, x) + else: + self.rect = Rect(x) - self.totalcont = self.totalcont.encode() + else: + if len(x) == 2: + x = Point(x) + self.rect.x0 = min(self.rect.x0, x.x) + self.rect.y0 = min(self.rect.y0, x.y) + self.rect.x1 = max(self.rect.x1, x.x) + self.rect.y1 = max(self.rect.y1, x.y) + else: + x = Rect(x) + self.rect.x0 = min(self.rect.x0, x.x0) + self.rect.y0 = min(self.rect.y0, x.y0) + self.rect.x1 = max(self.rect.x1, x.x1) + self.rect.y1 = max(self.rect.y1, x.y1) - if self.totalcont != b"": - # make /Contents object with dummy stream - xref = TOOLS._insert_contents(self.page, b" ", overlay) - # update it with potential compression - mupdf.pdf_update_stream(self.doc, xref, self.totalcont) + def draw_line(self, p1: point_like, p2: point_like) -> Point: + """Draw a line between two points.""" + p1 = Point(p1) + p2 = Point(p2) + if not (self.last_point == p1): + self.draw_cont += _format_g(JM_TUPLE(p1 * self.ipctm)) + " m\n" + self.last_point = p1 + self.updateRect(p1) - self.last_point = None # clean up ... - self.rect = None # - self.draw_cont = "" # for potential ... - self.text_cont = "" # ... - self.totalcont = "" # re-use - return + self.draw_cont += _format_g(JM_TUPLE(p2 * self.ipctm)) + " l\n" + self.updateRect(p2) + self.last_point = p2 + return self.last_point + + def draw_polyline(self, points: list) -> Point: + """Draw several connected line segments.""" + for i, p in enumerate(points): + if i == 0: + if not (self.last_point == Point(p)): + self.draw_cont += _format_g(JM_TUPLE(Point(p) * self.ipctm)) + " m\n" + self.last_point = Point(p) + else: + self.draw_cont += _format_g(JM_TUPLE(Point(p) * self.ipctm)) + " l\n" + self.updateRect(p) + + self.last_point = Point(points[-1]) + return self.last_point def draw_bezier( - self, - p1: point_like, - p2: point_like, - p3: point_like, - p4: point_like, - ):# -> Point: + self, + p1: point_like, + p2: point_like, + p3: point_like, + p4: point_like, + ) -> Point: """Draw a standard cubic Bezier curve.""" p1 = Point(p1) p2 = Point(p2) p3 = Point(p3) p4 = Point(p4) if not (self.last_point == p1): - args = JM_TUPLE(p1 * self.ipctm) - self.draw_cont += f"{_format_g(args)} m\n" + self.draw_cont += _format_g(JM_TUPLE(p1 * self.ipctm)) + " m\n" args = JM_TUPLE(list(p2 * self.ipctm) + list(p3 * self.ipctm) + list(p4 * self.ipctm)) - self.draw_cont += f"{_format_g(args)} c\n" + self.draw_cont += _format_g(args) + " c\n" self.updateRect(p1) self.updateRect(p2) self.updateRect(p3) @@ -11455,44 +14965,7 @@ def draw_bezier( self.last_point = p4 return self.last_point - def draw_circle(self, center: point_like, radius: float):# -> Point: - """Draw a circle given its center and radius.""" - if not radius > EPSILON: - raise ValueError("radius must be positive") - center = Point(center) - p1 = center - (radius, 0) - return self.draw_sector(center, p1, 360, fullSector=False) - - def draw_curve( - self, - p1: point_like, - p2: point_like, - p3: point_like, - ):# -> Point: - """Draw a curve between points using one control point.""" - kappa = 0.55228474983 - p1 = Point(p1) - p2 = Point(p2) - p3 = Point(p3) - k1 = p1 + (p2 - p1) * kappa - k2 = p3 + (p2 - p3) * kappa - return self.draw_bezier(p1, k1, k2, p3) - - def draw_line(self, p1: point_like, p2: point_like):# -> Point: - """Draw a line between two points.""" - p1 = Point(p1) - p2 = Point(p2) - if not (self.last_point == p1): - self.draw_cont += _format_g(JM_TUPLE(p1 * self.ipctm)) + " m\n" - self.last_point = p1 - self.updateRect(p1) - - self.draw_cont += _format_g(JM_TUPLE(p2 * self.ipctm)) + " l\n" - self.updateRect(p2) - self.last_point = p2 - return self.last_point - - def draw_oval(self, tetra: typing.Union[quad_like, rect_like]):# -> Point: + def draw_oval(self, tetra: typing.Union[quad_like, rect_like]) -> Point: """Draw an ellipse inside a tetrapod.""" if len(tetra) != 4: raise ValueError("invalid arg length") @@ -11516,51 +14989,42 @@ def draw_oval(self, tetra: typing.Union[quad_like, rect_like]):# -> Point: self.last_point = ml return self.last_point - def draw_polyline(self, points: list):# -> Point: - """Draw several connected line segments.""" - for i, p in enumerate(points): - if i == 0: - if not (self.last_point == Point(p)): - self.draw_cont += _format_g(JM_TUPLE(Point(p) * self.ipctm)) + " m\n" - self.last_point = Point(p) - else: - self.draw_cont += _format_g(JM_TUPLE(Point(p) * self.ipctm)) + " l\n" - self.updateRect(p) - - self.last_point = Point(points[-1]) - return self.last_point - - def draw_quad(self, quad: quad_like):# -> Point: - """Draw a Quad.""" - q = Quad(quad) - return self.draw_polyline([q.ul, q.ll, q.lr, q.ur, q.ul]) + def draw_circle(self, center: point_like, radius: float) -> Point: + """Draw a circle given its center and radius.""" + if not radius > EPSILON: + raise ValueError("radius must be positive") + center = Point(center) + p1 = center - (radius, 0) + return self.draw_sector(center, p1, 360, fullSector=False) - def draw_rect(self, rect: rect_like):# -> Point: - """Draw a rectangle.""" - r = Rect(rect) - args = JM_TUPLE(list(r.bl * self.ipctm) + [r.width, r.height]) - self.draw_cont += _format_g(args) + " re\n" - - self.updateRect(r) - self.last_point = r.tl - return self.last_point + def draw_curve( + self, + p1: point_like, + p2: point_like, + p3: point_like, + ) -> Point: + """Draw a curve between points using one control point.""" + kappa = 0.55228474983 + p1 = Point(p1) + p2 = Point(p2) + p3 = Point(p3) + k1 = p1 + (p2 - p1) * kappa + k2 = p3 + (p2 - p3) * kappa + return self.draw_bezier(p1, k1, k2, p3) def draw_sector( - self, - center: point_like, - point: point_like, - beta: float, - fullSector: bool = True, - ):# -> Point: + self, + center: point_like, + point: point_like, + beta: float, + fullSector: bool = True, + ) -> Point: """Draw a circle sector.""" center = Point(center) point = Point(point) - def l3(a, b): - return _format_g((a, b)) + " m\n" - def l4(a, b, c, d, e, f): - return _format_g((a, b, c, d, e, f)) + " c\n" - def l5(a, b): - return _format_g((a, b)) + " l\n" + l3 = lambda a, b: _format_g((a, b)) + " m\n" + l4 = lambda a, b, c, d, e, f: _format_g((a, b, c, d, e, f)) + " c\n" + l5 = lambda a, b: _format_g((a, b)) + " l\n" betar = math.radians(-beta) w360 = math.radians(math.copysign(360, betar)) * (-1) w90 = math.radians(math.copysign(90, betar)) @@ -11568,7 +15032,7 @@ def l5(a, b): while abs(betar) > 2 * math.pi: betar += w360 # bring angle below 360 degrees if not (self.last_point == point): - self.draw_cont += l3(JM_TUPLE(point * self.ipctm)) + self.draw_cont += l3(*JM_TUPLE(point * self.ipctm)) self.last_point = point Q = Point(0, 0) # just make sure it exists C = center @@ -11591,7 +15055,7 @@ def l5(a, b): kappa = kappah * abs(P - Q) cp1 = P + (R - P) * kappa # control point 1 cp2 = Q + (R - Q) * kappa # control point 2 - self.draw_cont += l4(JM_TUPLE( + self.draw_cont += l4(*JM_TUPLE( list(cp1 * self.ipctm) + list(cp2 * self.ipctm) + list(Q * self.ipctm) )) @@ -11612,23 +15076,79 @@ def l5(a, b): kappa = kappah * abs(P - Q) / (1 - math.cos(betar)) cp1 = P + (R - P) * kappa # control point 1 cp2 = Q + (R - Q) * kappa # control point 2 - self.draw_cont += l4(JM_TUPLE( + self.draw_cont += l4(*JM_TUPLE( list(cp1 * self.ipctm) + list(cp2 * self.ipctm) + list(Q * self.ipctm) )) if fullSector: - self.draw_cont += l3(JM_TUPLE(point * self.ipctm)) - self.draw_cont += l5(JM_TUPLE(center * self.ipctm)) - self.draw_cont += l5(JM_TUPLE(Q * self.ipctm)) + self.draw_cont += l3(*JM_TUPLE(point * self.ipctm)) + self.draw_cont += l5(*JM_TUPLE(center * self.ipctm)) + self.draw_cont += l5(*JM_TUPLE(Q * self.ipctm)) self.last_point = Q return self.last_point - def draw_squiggle( - self, - p1: point_like, - p2: point_like, - breadth=2, - ):# -> Point: - """Draw a squiggly line from p1 to p2.""" + def draw_rect(self, rect: rect_like, *, radius=None) -> Point: + """Draw a rectangle. + + Args: + radius: if not None, the rectangle will have rounded corners. + This is the radius of the curvature, given as percentage of + the rectangle width or height. Valid are values 0 < v <= 0.5. + For a sequence of two values, the corners will have different + radii. Otherwise, the percentage will be computed from the + shorter side. A value of (0.5, 0.5) will draw an ellipse. + """ + r = Rect(rect) + if radius is None: # standard rectangle + self.draw_cont += _format_g(JM_TUPLE( + list(r.bl * self.ipctm) + [r.width, r.height] + )) + " re\n" + self.updateRect(r) + self.last_point = r.tl + return self.last_point + # rounded corners requested. This requires 1 or 2 values, each + # with 0 < value <= 0.5 + if hasattr(radius, "__float__"): + if radius <= 0 or radius > 0.5: + raise ValueError(f"bad radius value {radius}.") + d = min(r.width, r.height) * radius + px = (d, 0) + py = (0, d) + elif hasattr(radius, "__len__") and len(radius) == 2: + rx, ry = radius + px = (rx * r.width, 0) + py = (0, ry * r.height) + if min(rx, ry) <= 0 or max(rx, ry) > 0.5: + raise ValueError(f"bad radius value {radius}.") + else: + raise ValueError(f"bad radius value {radius}.") + + lp = self.draw_line(r.tl + py, r.bl - py) + lp = self.draw_curve(lp, r.bl, r.bl + px) + + lp = self.draw_line(lp, r.br - px) + lp = self.draw_curve(lp, r.br, r.br - py) + + lp = self.draw_line(lp, r.tr + py) + lp = self.draw_curve(lp, r.tr, r.tr - px) + + lp = self.draw_line(lp, r.tl + px) + self.last_point = self.draw_curve(lp, r.tl, r.tl + py) + + self.updateRect(r) + return self.last_point + + def draw_quad(self, quad: quad_like) -> Point: + """Draw a Quad.""" + q = Quad(quad) + return self.draw_polyline([q.ul, q.ll, q.lr, q.ur, q.ul]) + + def draw_zigzag( + self, + p1: point_like, + p2: point_like, + breadth: float = 2, + ) -> Point: + """Draw a zig-zagged line from p1 to p2.""" p1 = Point(p1) p2 = Point(p2) S = p2 - p1 # vector start - end @@ -11637,35 +15157,27 @@ def draw_squiggle( if cnt < 4: raise ValueError("points too close") mb = rad / cnt # revised breadth - matrix = Matrix(TOOLS._hor_matrix(p1, p2)) # normalize line to x-axis + matrix = Matrix(util_hor_matrix(p1, p2)) # normalize line to x-axis i_mat = ~matrix # get original position - k = 2.4142135623765633 # y of draw_curve helper point - points = [] # stores edges for i in range(1, cnt): if i % 4 == 1: # point "above" connection - p = Point(i, -k) * mb + p = Point(i, -1) * mb elif i % 4 == 3: # point "below" connection - p = Point(i, k) * mb - else: # else on connection line - p = Point(i, 0) * mb + p = Point(i, 1) * mb + else: # ignore others + continue points.append(p * i_mat) - - points = [p1] + points + [p2] - cnt = len(points) - i = 0 - while i + 2 < cnt: - self.draw_curve(points[i], points[i + 1], points[i + 2]) - i += 2 + self.draw_polyline([p1] + points + [p2]) # add start and end points return p2 - def draw_zigzag( - self, - p1: point_like, - p2: point_like, - breadth: float = 2, - ):# -> Point: - """Draw a zig-zagged line from p1 to p2.""" + def draw_squiggle( + self, + p1: point_like, + p2: point_like, + breadth=2, + ) -> Point: + """Draw a squiggly line from p1 to p2.""" p1 = Point(p1) p2 = Point(p2) S = p2 - p1 # vector start - end @@ -11674,159 +15186,62 @@ def draw_zigzag( if cnt < 4: raise ValueError("points too close") mb = rad / cnt # revised breadth - matrix = Matrix(TOOLS._hor_matrix(p1, p2)) # normalize line to x-axis + matrix = Matrix(util_hor_matrix(p1, p2)) # normalize line to x-axis i_mat = ~matrix # get original position + k = 2.4142135623765633 # y of draw_curve helper point + points = [] # stores edges for i in range(1, cnt): if i % 4 == 1: # point "above" connection - p = Point(i, -1) * mb + p = Point(i, -k) * mb elif i % 4 == 3: # point "below" connection - p = Point(i, 1) * mb - else: # ignore others - continue + p = Point(i, k) * mb + else: # else on connection line + p = Point(i, 0) * mb points.append(p * i_mat) - self.draw_polyline([p1] + points + [p2]) # add start and end points - return p2 - def finish( - self, - width: float = 1, - color: OptSeq = (0,), - fill: OptSeq = None, - lineCap: int = 0, - lineJoin: int = 0, - dashes: OptStr = None, - even_odd: bool = False, - morph: OptSeq = None, - closePath: bool = True, - fill_opacity: float = 1, - stroke_opacity: float = 1, - oc: int = 0, - ) -> None: - """Finish the current drawing segment. - - Notes: - Apply colors, opacity, dashes, line style and width, or - morphing. Also whether to close the path - by connecting last to first point. - """ - if self.draw_cont == "": # treat empty contents as no-op - return - - if width == 0: # border color makes no sense then - color = None - elif color is None: # vice versa - width = 0 - # if color == None and fill == None: - # raise ValueError("at least one of 'color' or 'fill' must be given") - color_str = ColorCode(color, "c") # ensure proper color string - fill_str = ColorCode(fill, "f") # ensure proper fill string - - optcont = self.page._get_optional_content(oc) - if optcont is not None: - self.draw_cont = "/OC /%s BDC\n" % optcont + self.draw_cont - emc = "EMC\n" - else: - emc = "" - - alpha = self.page._set_opacity(CA=stroke_opacity, ca=fill_opacity) - if alpha is not None: - self.draw_cont = "/%s gs\n" % alpha + self.draw_cont - - if width != 1 and width != 0: - self.draw_cont += _format_g(width) + " w\n" - - if lineCap != 0: - self.draw_cont = "%i J\n" % lineCap + self.draw_cont - if lineJoin != 0: - self.draw_cont = "%i j\n" % lineJoin + self.draw_cont - - if dashes not in (None, "", "[] 0"): - self.draw_cont = "%s d\n" % dashes + self.draw_cont - - if closePath: - self.draw_cont += "h\n" - self.last_point = None - - if color is not None: - self.draw_cont += color_str - - if fill is not None: - self.draw_cont += fill_str - if color is not None: - if not even_odd: - self.draw_cont += "B\n" - else: - self.draw_cont += "B*\n" - else: - if not even_odd: - self.draw_cont += "f\n" - else: - self.draw_cont += "f*\n" - else: - self.draw_cont += "S\n" - - self.draw_cont += emc - if CheckMorph(morph): - m1 = Matrix( - 1, 0, 0, 1, morph[0].x + self.x, self.height - morph[0].y - self.y - ) - mat = ~m1 * morph[1] * m1 - self.draw_cont = _format_g(JM_TUPLE(mat) + self.draw_cont) + " cm\n" - - self.totalcont += "\nq\n" + self.draw_cont + "Q\n" - self.draw_cont = "" - self.last_point = None - return - - @staticmethod - def horizontal_angle(C, P): - """Return the angle to the horizontal for the connection from C to P. - This uses the arcus sine function and resolves its inherent ambiguity by - looking up in which quadrant vector S = P - C is located. - """ - S = Point(P - C).unit # unit vector 'C' -> 'P' - alfa = math.asin(abs(S.y)) # absolute angle from horizontal - if S.x < 0: # make arcsin result unique - if S.y <= 0: # bottom-left - alfa = -(math.pi - alfa) - else: # top-left - alfa = math.pi - alfa - else: - if S.y >= 0: # top-right - pass - else: # bottom-right - alfa = -alfa - return alfa + points = [p1] + points + [p2] + cnt = len(points) + i = 0 + while i + 2 < cnt: + self.draw_curve(points[i], points[i + 1], points[i + 2]) + i += 2 + return p2 + # ============================================================================== + # Shape.insert_text + # ============================================================================== def insert_text( - self, - point: point_like, - buffer_: typing.Union[str, list], - fontsize: float = 11, - lineheight: OptFloat = None, - fontname: str = "helv", - fontfile: OptStr = None, - set_simple: bool = 0, - encoding: int = 0, - color: OptSeq = None, - fill: OptSeq = None, - render_mode: int = 0, - border_width: float = 1, - rotate: int = 0, - morph: OptSeq = None, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, - ) -> int: + self, + point: point_like, + buffer: typing.Union[str, list], + *, + fontsize: float = 11, + lineheight: OptFloat = None, + fontname: str = "helv", + fontfile: OptStr = None, + set_simple: bool = 0, + encoding: int = 0, + color: OptSeq = None, + fill: OptSeq = None, + render_mode: int = 0, + border_width: float = 0.05, + miter_limit: float = 1, + rotate: int = 0, + morph: OptSeq = None, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> int: + # ensure 'text' is a list of strings, worth dealing with - if not bool(buffer_): + if not bool(buffer): return 0 - if type(buffer_) not in (list, tuple): - text = buffer_.splitlines() + if type(buffer) not in (list, tuple): + text = buffer.splitlines() else: - text = buffer_ + text = buffer if not len(text) > 0: return 0 @@ -11844,11 +15259,8 @@ def insert_text( fname = fname[1:] xref = self.page.insert_font( - fontname=fname, - fontfile=fontfile, - encoding=encoding, - set_simple=set_simple, - ) + fontname=fname, fontfile=fontfile, encoding=encoding, set_simple=set_simple + ) fontinfo = CheckFontInfo(self.doc, xref) fontdict = fontinfo[1] @@ -11893,7 +15305,7 @@ def insert_text( rot += 360 rot = rot % 360 # text rotate = 0, 90, 270, 180 - templ1 = lambda a, b, c, d, e, f, g: f"\nq\n{a}{b}BT\n%{c}1 0 0 1 {_format_g((d, e))} Tm\n/{f} {g} Tf " + templ1 = lambda a, b, c, d, e, f, g: f"\nq\n{a}{b}BT\n{c}1 0 0 1 {_format_g((d, e))} Tm\n/{f} {_format_g(g)} Tf " templ2 = lambda a: f"TJ\n0 -{_format_g(a)} TD\n" cmp90 = "0 1 -1 0 0 0 cm\n" # rotates 90 deg counter-clockwise cmm90 = "0 -1 1 0 0 0 cm\n" # rotates 90 deg clockwise @@ -11912,92 +15324,520 @@ def insert_text( top = height - point.y - self.y # start of 1st char left = point.x + self.x # start of 1. char space = top # space available + #headroom = point.y + self.y # distance to page border if rot == 90: left = height - point.y - self.y top = -point.x - self.x cm += cmp90 - space = width - abs(top) + space = width - abs(top) + #headroom = point.x + self.x + + elif rot == 270: + left = -height + point.y + self.y + top = point.x + self.x + cm += cmm90 + space = abs(top) + #headroom = width - point.x - self.x + + elif rot == 180: + left = -point.x - self.x + top = -height + point.y + self.y + cm += cm180 + space = abs(point.y + self.y) + #headroom = height - point.y - self.y + + optcont = self.page._get_optional_content(oc) + if optcont is not None: + bdc = "/OC /%s BDC\n" % optcont + emc = "EMC\n" + else: + bdc = emc = "" + + alpha = self.page._set_opacity(CA=stroke_opacity, ca=fill_opacity) + if alpha is None: + alpha = "" + else: + alpha = "/%s gs\n" % alpha + nres = templ1(bdc, alpha, cm, left, top, fname, fontsize) + + if render_mode > 0: + nres += "%i Tr " % render_mode + nres += _format_g(border_width * fontsize) + " w " + if miter_limit is not None: + nres += _format_g(miter_limit) + " M " + if color is not None: + nres += color_str + if fill is not None: + nres += fill_str + + # ========================================================================= + # start text insertion + # ========================================================================= + nres += text[0] + nlines = 1 # set output line counter + if len(text) > 1: + nres += templ2(lheight) # line 1 + else: + nres += 'TJ' + for i in range(1, len(text)): + if space < lheight: + break # no space left on page + if i > 1: + nres += "\nT* " + nres += text[i] + 'TJ' + space -= lheight + nlines += 1 + + nres += "\nET\n%sQ\n" % emc + + # ========================================================================= + # end of text insertion + # ========================================================================= + # update the /Contents object + self.text_cont += nres + return nlines + + # ============================================================================== + # Shape.insert_textbox + # ============================================================================== + def insert_textbox( + self, + rect: rect_like, + buffer: typing.Union[str, list], + *, + fontname: OptStr = "helv", + fontfile: OptStr = None, + fontsize: float = 11, + lineheight: OptFloat = None, + set_simple: bool = 0, + encoding: int = 0, + color: OptSeq = None, + fill: OptSeq = None, + expandtabs: int = 1, + border_width: float = 0.05, + miter_limit: float = 1, + align: int = 0, + render_mode: int = 0, + rotate: int = 0, + morph: OptSeq = None, + stroke_opacity: float = 1, + fill_opacity: float = 1, + oc: int = 0, + ) -> float: + """Insert text into a given rectangle. + + Args: + rect -- the textbox to fill + buffer -- text to be inserted + fontname -- a Base-14 font, font name or '/name' + fontfile -- name of a font file + fontsize -- font size + lineheight -- overwrite the font property + color -- RGB stroke color triple + fill -- RGB fill color triple + render_mode -- text rendering control + border_width -- thickness of glyph borders as percentage of fontsize + expandtabs -- handles tabulators with string function + align -- left, center, right, justified + rotate -- 0, 90, 180, or 270 degrees + morph -- morph box with a matrix and a fixpoint + Returns: + unused or deficit rectangle area (float) + """ + rect = Rect(rect) + if rect.is_empty or rect.is_infinite: + raise ValueError("text box must be finite and not empty") + + color_str = ColorCode(color, "c") + fill_str = ColorCode(fill, "f") + if fill is None and render_mode == 0: # ensure fill color for 0 Tr + fill = color + fill_str = ColorCode(color, "f") + + optcont = self.page._get_optional_content(oc) + if optcont is not None: + bdc = "/OC /%s BDC\n" % optcont + emc = "EMC\n" + else: + bdc = emc = "" + + # determine opacity / transparency + alpha = self.page._set_opacity(CA=stroke_opacity, ca=fill_opacity) + if alpha is None: + alpha = "" + else: + alpha = "/%s gs\n" % alpha + + if rotate % 90 != 0: + raise ValueError("rotate must be multiple of 90") + + rot = rotate + while rot < 0: + rot += 360 + rot = rot % 360 + + # is buffer worth of dealing with? + if not bool(buffer): + return rect.height if rot in (0, 180) else rect.width + + cmp90 = "0 1 -1 0 0 0 cm\n" # rotates counter-clockwise + cmm90 = "0 -1 1 0 0 0 cm\n" # rotates clockwise + cm180 = "-1 0 0 -1 0 0 cm\n" # rotates by 180 deg. + height = self.height + + fname = fontname + if fname.startswith("/"): + fname = fname[1:] + + xref = self.page.insert_font( + fontname=fname, fontfile=fontfile, encoding=encoding, set_simple=set_simple + ) + fontinfo = CheckFontInfo(self.doc, xref) + + fontdict = fontinfo[1] + ordering = fontdict["ordering"] + simple = fontdict["simple"] + glyphs = fontdict["glyphs"] + bfname = fontdict["name"] + ascender = fontdict["ascender"] + descender = fontdict["descender"] + + if lineheight: + lheight_factor = lineheight + elif ascender - descender <= 1: + lheight_factor = 1.2 + else: + lheight_factor = ascender - descender + lheight = fontsize * lheight_factor + + # create a list from buffer, split into its lines + if type(buffer) in (list, tuple): + t0 = "\n".join(buffer) + else: + t0 = buffer + + maxcode = max([ord(c) for c in t0]) + # replace invalid char codes for simple fonts + if simple and maxcode > 255: + t0 = "".join([c if ord(c) < 256 else "?" for c in t0]) + + t0 = t0.splitlines() + + glyphs = self.doc.get_char_widths(xref, maxcode + 1) + if simple and bfname not in ("Symbol", "ZapfDingbats"): + tj_glyphs = None + else: + tj_glyphs = glyphs + + # ---------------------------------------------------------------------- + # calculate pixel length of a string + # ---------------------------------------------------------------------- + def pixlen(x): + """Calculate pixel length of x.""" + if ordering < 0: + return sum([glyphs[ord(c)][1] for c in x]) * fontsize + else: + return len(x) * fontsize + + # --------------------------------------------------------------------- + + if ordering < 0: + blen = glyphs[32][1] * fontsize # pixel size of space character + else: + blen = fontsize + + text = "" # output buffer + + if CheckMorph(morph): + m1 = Matrix( + 1, 0, 0, 1, morph[0].x + self.x, self.height - morph[0].y - self.y + ) + mat = ~m1 * morph[1] * m1 + cm = _format_g(JM_TUPLE(mat)) + " cm\n" + else: + cm = "" + + # --------------------------------------------------------------------- + # adjust for text orientation / rotation + # --------------------------------------------------------------------- + progr = 1 # direction of line progress + c_pnt = Point(0, fontsize * ascender) # used for line progress + if rot == 0: # normal orientation + point = rect.tl + c_pnt # line 1 is 'lheight' below top + maxwidth = rect.width # pixels available in one line + maxheight = rect.height # available text height + + elif rot == 90: # rotate counter clockwise + c_pnt = Point(fontsize * ascender, 0) # progress in x-direction + point = rect.bl + c_pnt # line 1 'lheight' away from left + maxwidth = rect.height # pixels available in one line + maxheight = rect.width # available text height + cm += cmp90 - elif rot == 270: - left = -height + point.y + self.y - top = point.x + self.x + elif rot == 180: # text upside down + # progress upwards in y direction + c_pnt = -Point(0, fontsize * ascender) + point = rect.br + c_pnt # line 1 'lheight' above bottom + maxwidth = rect.width # pixels available in one line + progr = -1 # subtract lheight for next line + maxheight =rect.height # available text height + cm += cm180 + + else: # rotate clockwise (270 or -90) + # progress from right to left + c_pnt = -Point(fontsize * ascender, 0) + point = rect.tr + c_pnt # line 1 'lheight' left of right + maxwidth = rect.height # pixels available in one line + progr = -1 # subtract lheight for next line + maxheight = rect.width # available text height cm += cmm90 - space = abs(top) - elif rot == 180: - left = -point.x - self.x - top = -height + point.y + self.y - cm += cm180 - space = abs(point.y + self.y) + # ===================================================================== + # line loop + # ===================================================================== + just_tab = [] # 'justify' indicators per line + + for i, line in enumerate(t0): + line_t = line.expandtabs(expandtabs).split(" ") # split into words + num_words = len(line_t) + lbuff = "" # init line buffer + rest = maxwidth # available line pixels + # ================================================================= + # word loop + # ================================================================= + for j in range(num_words): + word = line_t[j] + pl_w = pixlen(word) # pixel len of word + if rest >= pl_w: # does it fit on the line? + lbuff += word + " " # yes, append word + rest -= pl_w + blen # update available line space + continue # next word + + # word doesn't fit - output line (if not empty) + if lbuff: + lbuff = lbuff.rstrip() + "\n" # line full, append line break + text += lbuff # append to total text + just_tab.append(True) # can align-justify + + lbuff = "" # re-init line buffer + rest = maxwidth # re-init avail. space + + if pl_w <= maxwidth: # word shorter than 1 line? + lbuff = word + " " # start the line with it + rest = maxwidth - pl_w - blen # update free space + continue + + # long word: split across multiple lines - char by char ... + if len(just_tab) > 0: + just_tab[-1] = False # cannot align-justify + for c in word: + if pixlen(lbuff) <= maxwidth - pixlen(c): + lbuff += c + else: # line full + lbuff += "\n" # close line + text += lbuff # append to text + just_tab.append(False) # cannot align-justify + lbuff = c # start new line with this char + + lbuff += " " # finish long word + rest = maxwidth - pixlen(lbuff) # long word stored + + if lbuff: # unprocessed line content? + text += lbuff.rstrip() # append to text + just_tab.append(False) # cannot align-justify + + if i < len(t0) - 1: # not the last line? + text += "\n" # insert line break + + # compute used part of the textbox + if text.endswith("\n"): + text = text[:-1] + lb_count = text.count("\n") + 1 # number of lines written + + # text height = line count * line height plus one descender value + text_height = lheight * lb_count - descender * fontsize + + more = text_height - maxheight # difference to height limit + if more > EPSILON: # landed too much outside rect + return (-1) * more # return deficit, don't output + + more = abs(more) + if more < EPSILON: + more = 0 # don't bother with epsilons + nres = "\nq\n%s%sBT\n" % (bdc, alpha) + cm # initialize output buffer + templ = lambda a, b, c, d: f"1 0 0 1 {_format_g((a, b))} Tm /{c} {_format_g(d)} Tf " + # center, right, justify: output each line with its own specifics + text_t = text.splitlines() # split text in lines again + just_tab[-1] = False # never justify last line + for i, t in enumerate(text_t): + spacing = 0 + pl = maxwidth - pixlen(t) # length of empty line part + pnt = point + c_pnt * (i * lheight_factor) # text start of line + if align == 1: # center: right shift by half width + if rot in (0, 180): + pnt = pnt + Point(pl / 2, 0) * progr + else: + pnt = pnt - Point(0, pl / 2) * progr + elif align == 2: # right: right shift by full width + if rot in (0, 180): + pnt = pnt + Point(pl, 0) * progr + else: + pnt = pnt - Point(0, pl) * progr + elif align == 3: # justify + spaces = t.count(" ") # number of spaces in line + if spaces > 0 and just_tab[i]: # if any, and we may justify + spacing = pl / spaces # make every space this much larger + else: + spacing = 0 # keep normal space length + top = height - pnt.y - self.y + left = pnt.x + self.x + if rot == 90: + left = height - pnt.y - self.y + top = -pnt.x - self.x + elif rot == 270: + left = -height + pnt.y + self.y + top = pnt.x + self.x + elif rot == 180: + left = -pnt.x - self.x + top = -height + pnt.y + self.y + + nres += templ(left, top, fname, fontsize) + + if render_mode > 0: + nres += "%i Tr " % render_mode + nres += _format_g(border_width * fontsize) + " w " + if miter_limit is not None: + nres += _format_g(miter_limit) + " M " + + if align == 3: + nres += _format_g(spacing) + " Tw " + + if color is not None: + nres += color_str + if fill is not None: + nres += fill_str + nres += "%sTJ\n" % getTJstr(t, tj_glyphs, simple, ordering) + + nres += "ET\n%sQ\n" % emc + + self.text_cont += nres + self.updateRect(rect) + return more + + def finish( + self, + width: float = 1, + color: OptSeq = (0,), + fill: OptSeq = None, + lineCap: int = 0, + lineJoin: int = 0, + dashes: OptStr = None, + even_odd: bool = False, + morph: OptSeq = None, + closePath: bool = True, + fill_opacity: float = 1, + stroke_opacity: float = 1, + oc: int = 0, + ) -> None: + """Finish the current drawing segment. + + Notes: + Apply colors, opacity, dashes, line style and width, or + morphing. Also whether to close the path + by connecting last to first point. + """ + if self.draw_cont == "": # treat empty contents as no-op + return + + if width == 0: # border color makes no sense then + color = None + elif color is None: # vice versa + width = 0 + # if color == None and fill == None: + # raise ValueError("at least one of 'color' or 'fill' must be given") + color_str = ColorCode(color, "c") # ensure proper color string + fill_str = ColorCode(fill, "f") # ensure proper fill string optcont = self.page._get_optional_content(oc) if optcont is not None: - bdc = "/OC /%s BDC\n" % optcont + self.draw_cont = "/OC /%s BDC\n" % optcont + self.draw_cont emc = "EMC\n" else: - bdc = emc = "" + emc = "" alpha = self.page._set_opacity(CA=stroke_opacity, ca=fill_opacity) - if alpha is None: - alpha = "" - else: - alpha = "/%s gs\n" % alpha - nres = templ1(bdc, alpha, cm, left, top, fname, fontsize) - if render_mode > 0: - nres += "%i Tr " % render_mode - if border_width != 1: - nres += _format_g(border_width) + " w " - if color is not None: - nres += color_str - if fill is not None: - nres += fill_str + if alpha is not None: + self.draw_cont = "/%s gs\n" % alpha + self.draw_cont - # ========================================================================= - # start text insertion - # ========================================================================= - nres += text[0] - nlines = 1 # set output line counter - if len(text) > 1: - nres += templ2(lheight) # line 1 - else: - nres += 'TJ' - for i in range(1, len(text)): - if space < lheight: - break # no space left on page - if i > 1: - nres += "\nT* " - nres += text[i] + 'TJ' - space -= lheight - nlines += 1 + if width != 1 and width != 0: + self.draw_cont += _format_g(width) + " w\n" - nres += "\nET\n%sQ\n" % emc + if lineCap != 0: + self.draw_cont = "%i J\n" % lineCap + self.draw_cont + if lineJoin != 0: + self.draw_cont = "%i j\n" % lineJoin + self.draw_cont - # ========================================================================= - # end of text insertion - # ========================================================================= - # update the /Contents object - self.text_cont += nres - return nlines + if dashes not in (None, "", "[] 0"): + self.draw_cont = "%s d\n" % dashes + self.draw_cont - def update_rect(self, x): - if self.rect is None: - if len(x) == 2: - self.rect = Rect(x, x) + if closePath: + self.draw_cont += "h\n" + self.last_point = None + + if color is not None: + self.draw_cont += color_str + + if fill is not None: + self.draw_cont += fill_str + if color is not None: + if not even_odd: + self.draw_cont += "B\n" + else: + self.draw_cont += "B*\n" else: - self.rect = Rect(x) + if not even_odd: + self.draw_cont += "f\n" + else: + self.draw_cont += "f*\n" else: - if len(x) == 2: - x = Point(x) - self.rect.x0 = min(self.rect.x0, x.x) - self.rect.y0 = min(self.rect.y0, x.y) - self.rect.x1 = max(self.rect.x1, x.x) - self.rect.y1 = max(self.rect.y1, x.y) - else: - x = Rect(x) - self.rect.x0 = min(self.rect.x0, x.x0) - self.rect.y0 = min(self.rect.y0, x.y0) - self.rect.x1 = max(self.rect.x1, x.x1) - self.rect.y1 = max(self.rect.y1, x.y1) + self.draw_cont += "S\n" + + self.draw_cont += emc + if CheckMorph(morph): + m1 = Matrix( + 1, 0, 0, 1, morph[0].x + self.x, self.height - morph[0].y - self.y + ) + mat = ~m1 * morph[1] * m1 + self.draw_cont = _format_g(JM_TUPLE(mat)) + " cm\n" + self.draw_cont + + self.totalcont += "\nq\n" + self.draw_cont + "Q\n" + self.draw_cont = "" + self.last_point = None + return + + def commit(self, overlay: bool = True) -> None: + """Update the page's /Contents object with Shape data. + + The argument controls whether data appear in foreground (default) + or background. + """ + CheckParent(self.page) # doc may have died meanwhile + self.totalcont += self.text_cont + self.totalcont = self.totalcont.encode() + + if self.totalcont: + if overlay: + self.page.wrap_contents() # ensure a balanced graphics state + # make /Contents object with dummy stream + xref = TOOLS._insert_contents(self.page, b" ", overlay) + # update it with potential compression + self.doc.update_stream(xref, self.totalcont) + + self.last_point = None # clean up ... + self.rect = None # + self.draw_cont = "" # for potential ... + self.text_cont = "" # ... + self.totalcont = "" # re-use class Story: @@ -12161,10 +16001,13 @@ class Position2: function( position2) mupdf.fz_story_positions( self.this, function2) - def place( self, where): + def place( self, where, flags=0): + ''' + Wrapper for fz_place_story_flags(). + ''' where = JM_rect_from_py( where) filled = mupdf.FzRect() - more = mupdf.fz_place_story( self.this, where, filled) + more = mupdf.fz_place_story_flags( self.this, where, filled, flags) return more, JM_py_from_rect( filled) def reset( self): @@ -12281,7 +16124,9 @@ class FitResult: `big_enough`: `True` if the fit succeeded. `filled`: - From the last call to `Story.place()`. + Tuple (x0, y0, x1, y1) from the last call to `Story.place()`. This + will be wider than .rect if any single word (which we never split) + was too wide for .rect. `more`: `False` if the fit succeeded. `numcalls`: @@ -12289,7 +16134,7 @@ class FitResult: `parameter`: The successful parameter value, or the largest failing value. `rect`: - The rect created from `parameter`. + The pumupdf.Rect created from `parameter`. ''' def __init__(self, big_enough=None, filled=None, more=None, numcalls=None, parameter=None, rect=None): self.big_enough = big_enough @@ -12309,7 +16154,7 @@ def __repr__(self): f' rect={self.rect}' ) - def fit(self, fn, pmin=None, pmax=None, delta=0.001, verbose=False): + def fit(self, fn, pmin=None, pmax=None, delta=0.001, verbose=False, flags=0): ''' Finds optimal rect that contains the story `self`. @@ -12336,6 +16181,9 @@ def fit(self, fn, pmin=None, pmax=None, delta=0.001, verbose=False): Maximum error in returned `parameter`. :arg verbose: If true we output diagnostics. + :arg flags: + Passed to mupdf.fz_place_story_flags(). e.g. + zero or `mupdf.FZ_PLACE_STORY_FLAG_NO_OVERFLOW`. ''' def log(text): assert verbose @@ -12391,7 +16239,7 @@ def update(parameter): if verbose: log(f'update(): not calling self.place() because rect is empty.') else: - more, filled = self.place(rect) + more, filled = self.place(rect, flags) state.numcalls += 1 big_enough = not more result = Story.FitResult( @@ -12460,12 +16308,12 @@ def opposite(p, direction): parameter = (state.pmin + state.pmax) / 2 update(parameter) - def fit_scale(self, rect, scale_min=0, scale_max=None, delta=0.001, verbose=False): + def fit_scale(self, rect, scale_min=0, scale_max=None, delta=0.001, verbose=False, flags=0): ''' Finds smallest value `scale` in range `scale_min..scale_max` where `scale * rect` is large enough to contain the story `self`. - Returns a `Story.FitResult` instance. + Returns a `Story.FitResult` instance with `.parameter` set to `scale`. :arg width: width of rect. @@ -12480,13 +16328,15 @@ def fit_scale(self, rect, scale_min=0, scale_max=None, delta=0.001, verbose=Fals Maximum error in returned scale. :arg verbose: If true we output diagnostics. + :arg flags: + Passed to Story.place(). ''' x0, y0, x1, y1 = rect width = x1 - x0 height = y1 - y0 def fn(scale): return Rect(x0, y0, x0 + scale*width, y0 + scale*height) - return self.fit(fn, scale_min, scale_max, delta, verbose) + return self.fit(fn, scale_min, scale_max, delta, verbose, flags) def fit_height(self, width, height_min=0, height_max=None, origin=(0, 0), delta=0.001, verbose=False): ''' @@ -12589,7 +16439,7 @@ def _textpage_dict(self, raw=False): def extractBLOCKS(self): """Return a list with text block information.""" - if g_use_extra: + if 1 or g_use_extra: return extra.extractBLOCKS(self.this) block_n = -1 this_tpage = self.this @@ -12648,7 +16498,7 @@ def extractDICT(self, cb=None, sort=False) -> dict: if cb is not None: val["width"] = cb.width val["height"] = cb.height - if sort is True: + if sort: blocks = val["blocks"] blocks.sort(key=lambda b: (b["bbox"][3], b["bbox"][0])) val["blocks"] = blocks @@ -12669,15 +16519,15 @@ def extractIMGINFO(self, hashes=0): continue img = block.i_image() img_size = 0 - if mupdf_version_tuple >= (1, 24): - compr_buff = mupdf.fz_compressed_image_buffer(img) - if compr_buff.m_internal: - img_size = compr_buff.fz_compressed_buffer_size() - compr_buff = None + mask = img.mask() + if mask.m_internal: + has_mask = True else: - compr_buff = mupdf.ll_fz_compressed_image_buffer(img.m_internal) - if compr_buff: - img_size = mupdf.ll_fz_compressed_buffer_size(compr_buff) + has_mask = False + compr_buff = mupdf.fz_compressed_image_buffer(img) + if compr_buff.m_internal: + img_size = compr_buff.fz_compressed_buffer_size() + compr_buff = None if hashes: r = mupdf.FzIrect(FZ_MIN_INF_RECT, FZ_MIN_INF_RECT, FZ_MAX_INF_RECT, FZ_MAX_INF_RECT) assert mupdf.fz_is_infinite_irect(r) @@ -12689,19 +16539,20 @@ def extractIMGINFO(self, hashes=0): img_size = img.w() * img.h() * img.n() cs = mupdf.FzColorspace(mupdf.ll_fz_keep_colorspace(img.m_internal.colorspace)) block_dict = dict() - block_dict[ dictkey_number] = block_n - block_dict[ dictkey_bbox] = JM_py_from_rect(block.m_internal.bbox) - block_dict[ dictkey_matrix] = JM_py_from_matrix(block.i_transform()) - block_dict[ dictkey_width] = img.w() - block_dict[ dictkey_height] = img.h() - block_dict[ dictkey_colorspace] = mupdf.fz_colorspace_n(cs) - block_dict[ dictkey_cs_name] = mupdf.fz_colorspace_name(cs) - block_dict[ dictkey_xres] = img.xres() - block_dict[ dictkey_yres] = img.yres() - block_dict[ dictkey_bpc] = img.bpc() - block_dict[ dictkey_size] = img_size + block_dict[dictkey_number] = block_n + block_dict[dictkey_bbox] = JM_py_from_rect(block.m_internal.bbox) + block_dict[dictkey_matrix] = JM_py_from_matrix(block.i_transform()) + block_dict[dictkey_width] = img.w() + block_dict[dictkey_height] = img.h() + block_dict[dictkey_colorspace] = mupdf.fz_colorspace_n(cs) + block_dict[dictkey_cs_name] = mupdf.fz_colorspace_name(cs) + block_dict[dictkey_xres] = img.xres() + block_dict[dictkey_yres] = img.yres() + block_dict[dictkey_bpc] = img.bpc() + block_dict[dictkey_size] = img_size if hashes: - block_dict[ "digest"] = digest + block_dict["digest"] = digest + block_dict["has-mask"] = has_mask rc.append(block_dict) return rc @@ -12719,7 +16570,7 @@ def default(self, s): if cb is not None: val["width"] = cb.width val["height"] = cb.height - if sort is True: + if sort: blocks = val["blocks"] blocks.sort(key=lambda b: (b["bbox"][3], b["bbox"][0])) val["blocks"] = blocks @@ -12733,7 +16584,7 @@ def extractRAWDICT(self, cb=None, sort=False) -> dict: if cb is not None: val["width"] = cb.width val["height"] = cb.height - if sort is True: + if sort: blocks = val["blocks"] blocks.sort(key=lambda b: (b["bbox"][3], b["bbox"][0])) val["blocks"] = blocks @@ -12753,7 +16604,7 @@ def default(self,s): if cb is not None: val["width"] = cb.width val["height"] = cb.height - if sort is True: + if sort: blocks = val["blocks"] blocks.sort(key=lambda b: (b["bbox"][3], b["bbox"][0])) val["blocks"] = blocks @@ -12768,7 +16619,7 @@ def extractSelection(self, pointa, pointb): def extractText(self, sort=False) -> str: """Return simple, bare text on the page.""" - if sort is False: + if not sort: return self._extractText(0) blocks = self.extractBLOCKS()[:] blocks.sort(key=lambda b: (b[3], b[0])) @@ -12784,9 +16635,10 @@ def extractTextbox(self, rect): def extractWORDS(self, delimiters=None): """Return a list with text word information.""" - if g_use_extra: + if 1 or g_use_extra: return extra.extractWORDS(self.this, delimiters) buflen = 0 + last_char_rtl = 0 block_n = -1 wbbox = mupdf.FzRect(mupdf.FzRect.Fixed_EMPTY) # word bbox this_tpage = self.this @@ -12811,17 +16663,24 @@ def extractWORDS(self, delimiters=None): and not mupdf.fz_is_infinite_rect(tp_rect) ): continue + + if buflen == 0 and ch.m_internal.c == 0x200d: + # ZERO WIDTH JOINER cannot start a word + continue word_delimiter = JM_is_word_delimiter(ch.m_internal.c, delimiters) - if word_delimiter: - if buflen == 0: + this_char_rtl = JM_is_rtl_char(ch.m_internal.c) + if word_delimiter or this_char_rtl != last_char_rtl: + if buflen == 0 and word_delimiter: continue # skip delimiters at line start if not mupdf.fz_is_empty_rect(wbbox): word_n, wbbox = JM_append_word(lines, buff, wbbox, block_n, line_n, word_n) mupdf.fz_clear_buffer(buff) buflen = 0 # reset char counter - continue + if word_delimiter: + continue # append one unicode character to the word JM_append_rune(buff, ch.m_internal.c) + last_char_rtl = this_char_rtl buflen += 1 # enlarge word bbox wbbox = mupdf.fz_union_rect(wbbox, JM_char_bbox(line, ch)) @@ -12962,51 +16821,277 @@ def appendv(self, pos, text, font=None, fontsize=11, language=None, small_caps=F pos.y += lheight return self.text_rect, self.last_point - def clean_rtl(self, text): - """Revert the sequence of Latin text parts. + def clean_rtl(self, text): + """Revert the sequence of Latin text parts. + + Text with right-to-left writing direction (Arabic, Hebrew) often + contains Latin parts, which are written in left-to-right: numbers, names, + etc. For output as PDF text we need *everything* in right-to-left. + E.g. an input like " ABCDE FG HIJ KL " will be + converted to " JIH GF EDCBA LK ". The Arabic + parts remain untouched. + + Args: + text: str + Returns: + Massaged string. + """ + if not text: + return text + # split into words at space boundaries + words = text.split(" ") + idx = [] + for i in range(len(words)): + w = words[i] + # revert character sequence for Latin only words + if not (len(w) < 2 or max([ord(c) for c in w]) > 255): + words[i] = "".join(reversed(w)) + idx.append(i) # stored index of Latin word + + # adjacent Latin words must revert their sequence, too + idx2 = [] # store indices of adjacent Latin words + for i in range(len(idx)): + if idx2 == []: # empty yet? + idx2.append(idx[i]) # store Latin word number + + elif idx[i] > idx2[-1] + 1: # large gap to last? + if len(idx2) > 1: # at least two consecutives? + words[idx2[0] : idx2[-1] + 1] = reversed( + words[idx2[0] : idx2[-1] + 1] + ) # revert their sequence + idx2 = [idx[i]] # re-initialize + + elif idx[i] == idx2[-1] + 1: # new adjacent Latin word + idx2.append(idx[i]) + + text = " ".join(words) + return text + + def fill_textbox( + writer: 'TextWriter', + rect: rect_like, + text: typing.Union[str, list], + pos: point_like = None, + font: typing.Optional[Font] = None, + fontsize: float = 11, + lineheight: OptFloat = None, + align: int = 0, + warn: bool = None, + right_to_left: bool = False, + small_caps: bool = False, + ) -> tuple: + """Fill a rectangle with text. + + Args: + writer: pymupdf.TextWriter object (= "self") + rect: rect-like to receive the text. + text: string or list/tuple of strings. + pos: point-like start position of first word. + font: pymupdf.Font object (default pymupdf.Font('helv')). + fontsize: the fontsize. + lineheight: overwrite the font property + align: (int) 0 = left, 1 = center, 2 = right, 3 = justify + warn: (bool) text overflow action: none, warn, or exception + right_to_left: (bool) indicate right-to-left language. + """ + rect = Rect(rect) + if rect.is_empty: + raise ValueError("fill rect must not empty.") + if type(font) is not Font: + font = Font("helv") + + def textlen(x): + """Return length of a string.""" + return font.text_length( + x, fontsize=fontsize, small_caps=small_caps + ) # abbreviation + + def char_lengths(x): + """Return list of single character lengths for a string.""" + return font.char_lengths(x, fontsize=fontsize, small_caps=small_caps) + + def append_this(pos, text): + ret = writer.append( + pos, text, font=font, fontsize=fontsize, small_caps=small_caps + ) + return ret + + tolerance = fontsize * 0.2 # extra distance to left border + space_len = textlen(" ") + std_width = rect.width - tolerance + std_start = rect.x0 + tolerance + + def norm_words(width, words): + """Cut any word in pieces no longer than 'width'.""" + nwords = [] + word_lengths = [] + for w in words: + wl_lst = char_lengths(w) + wl = sum(wl_lst) + if wl <= width: # nothing to do - copy over + nwords.append(w) + word_lengths.append(wl) + continue + + # word longer than rect width - split it in parts + n = len(wl_lst) + while n > 0: + wl = sum(wl_lst[:n]) + if wl <= width: + nwords.append(w[:n]) + word_lengths.append(wl) + w = w[n:] + wl_lst = wl_lst[n:] + n = len(wl_lst) + else: + n -= 1 + return nwords, word_lengths + + def output_justify(start, line): + """Justified output of a line.""" + # ignore leading / trailing / multiple spaces + words = [w for w in line.split(" ") if w != ""] + nwords = len(words) + if nwords == 0: + return + if nwords == 1: # single word cannot be justified + append_this(start, words[0]) + return + tl = sum([textlen(w) for w in words]) # total word lengths + gaps = nwords - 1 # number of word gaps + gapl = (std_width - tl) / gaps # width of each gap + for w in words: + _, lp = append_this(start, w) # output one word + start.x = lp.x + gapl # next start at word end plus gap + return + + asc = font.ascender + dsc = font.descender + if not lineheight: + if asc - dsc <= 1: + lheight = 1.2 + else: + lheight = asc - dsc + else: + lheight = lineheight + + LINEHEIGHT = fontsize * lheight # effective line height + width = std_width # available horizontal space + + # starting point of text + if pos is not None: + pos = Point(pos) + else: # default is just below rect top-left + pos = rect.tl + (tolerance, fontsize * asc) + if pos not in rect: + raise ValueError("Text must start in rectangle.") + + # calculate displacement factor for alignment + if align == TEXT_ALIGN_CENTER: + factor = 0.5 + elif align == TEXT_ALIGN_RIGHT: + factor = 1.0 + else: + factor = 0 + + # split in lines if just a string was given + if type(text) is str: + textlines = text.splitlines() + else: + textlines = [] + for line in text: + textlines.extend(line.splitlines()) + + max_lines = int((rect.y1 - pos.y) / LINEHEIGHT) + 1 + + new_lines = [] # the final list of textbox lines + no_justify = [] # no justify for these line numbers + for i, line in enumerate(textlines): + if line in ("", " "): + new_lines.append((line, space_len)) + width = rect.width - tolerance + no_justify.append((len(new_lines) - 1)) + continue + if i == 0: + width = rect.x1 - pos.x + else: + width = rect.width - tolerance + + if right_to_left: # reverses Arabic / Hebrew text front to back + line = writer.clean_rtl(line) + tl = textlen(line) + if tl <= width: # line short enough + new_lines.append((line, tl)) + no_justify.append((len(new_lines) - 1)) + continue + + # we need to split the line in fitting parts + words = line.split(" ") # the words in the line + + # cut in parts any words that are longer than rect width + words, word_lengths = norm_words(width, words) + + n = len(words) + while True: + line0 = " ".join(words[:n]) + wl = sum(word_lengths[:n]) + space_len * (n - 1) + if wl <= width: + new_lines.append((line0, wl)) + words = words[n:] + word_lengths = word_lengths[n:] + n = len(words) + line0 = None + else: + n -= 1 + + if len(words) == 0: + break + assert n + + # ------------------------------------------------------------------------- + # List of lines created. Each item is (text, tl), where 'tl' is the PDF + # output length (float) and 'text' is the text. Except for justified text, + # this is output-ready. + # ------------------------------------------------------------------------- + nlines = len(new_lines) + if nlines > max_lines: + msg = "Only fitting %i of %i lines." % (max_lines, nlines) + if warn is None: + pass + elif warn: + message("Warning: " + msg) + else: + raise ValueError(msg) + + start = Point() + no_justify += [len(new_lines) - 1] # no justifying of last line + for i in range(max_lines): + try: + line, tl = new_lines.pop(0) + except IndexError: + if g_exceptions_verbose >= 2: exception_info() + break - Text with right-to-left writing direction (Arabic, Hebrew) often - contains Latin parts, which are written in left-to-right: numbers, names, - etc. For output as PDF text we need *everything* in right-to-left. - E.g. an input like " ABCDE FG HIJ KL " will be - converted to " JIH GF EDCBA LK ". The Arabic - parts remain untouched. + if right_to_left: # Arabic, Hebrew + line = "".join(reversed(line)) - Args: - text: str - Returns: - Massaged string. - """ - if not text: - return text - # split into words at space boundaries - words = text.split(" ") - idx = [] - for i in range(len(words)): - w = words[i] - # revert character sequence for Latin only words - if not (len(w) < 2 or max([ord(c) for c in w]) > 255): - words[i] = "".join(reversed(w)) - idx.append(i) # stored index of Latin word + if i == 0: # may have different start for first line + start = pos - # adjacent Latin words must revert their sequence, too - idx2 = [] # store indices of adjacent Latin words - for i in range(len(idx)): - if idx2 == []: # empty yet? - idx2.append(idx[i]) # store Latin word number + if align == TEXT_ALIGN_JUSTIFY and i not in no_justify and tl < std_width: + output_justify(start, line) + start.x = std_start + start.y += LINEHEIGHT + continue - elif idx[i] > idx2[-1] + 1: # large gap to last? - if len(idx2) > 1: # at least two consecutives? - words[idx2[0] : idx2[-1] + 1] = reversed( - words[idx2[0] : idx2[-1] + 1] - ) # revert their sequence - idx2 = [idx[i]] # re-initialize + if i > 0 or pos.x == std_start: # left, center, right alignments + start.x += (width - tl) * factor - elif idx[i] == idx2[-1] + 1: # new adjacent Latin word - idx2.append(idx[i]) + append_this(start, line) + start.x = std_start + start.y += LINEHEIGHT - text = " ".join(words) - return text + return new_lines # return non-written lines def write_text(self, page, color=None, opacity=-1, overlay=1, morph=None, matrix=None, render_mode=0, oc=0): """Write the text to a PDF page having the TextWriter's page size. @@ -13170,6 +17255,9 @@ def __eq__(self, r): def __getitem__(self, i): return (self.x0, self.y0, self.x1, self.y1)[i] + def __hash__(self): + return hash(tuple(self)) + def __init__(self, *args, p0=None, p1=None, x0=None, y0=None, x1=None, y1=None): self.x0, self.y0, self.x1, self.y1 = util_make_irect( *args, p0=p0, p1=p1, x0=x0, y0=y0, x1=x1, y1=y1) @@ -13221,6 +17309,14 @@ def bottom_right(self): def height(self): return max(0, self.y1 - self.y0) + def contains(self, x): + """Check if x is in the rectangle.""" + return self.__contains__(x) + + def get_area(self, *args) -> float: + """Calculate area of rectangle.\nparameter is one of 'px' (default), 'in', 'cm', or 'mm'.""" + return _rect_area(self.width, self.height, args) + def include_point(self, p): """Extend rectangle to include point p.""" rect = self.rect.include_point(p) @@ -13366,9 +17462,6 @@ def width(self): assert UCDN_SCRIPT_ADLAM == mupdf.UCDN_SCRIPT_ADLAM # noqa: F821 del _self, _name, _value -_adobe_glyphs = {} -_adobe_unicodes = {} - AnyType = typing.Any Base14_fontnames = ( @@ -13420,6 +17513,18 @@ def width(self): JM_mupdf_show_warnings = 0 +# ------------------------------------------------------------------------------ +# Image recompression constants +# ------------------------------------------------------------------------------ +FZ_RECOMPRESS_NEVER = mupdf.FZ_RECOMPRESS_NEVER +FZ_RECOMPRESS_SAME = mupdf.FZ_RECOMPRESS_SAME +FZ_RECOMPRESS_LOSSLESS = mupdf.FZ_RECOMPRESS_LOSSLESS +FZ_RECOMPRESS_JPEG = mupdf.FZ_RECOMPRESS_JPEG +FZ_RECOMPRESS_J2K = mupdf.FZ_RECOMPRESS_J2K +FZ_RECOMPRESS_FAX = mupdf.FZ_RECOMPRESS_FAX +FZ_SUBSAMPLE_AVERAGE = mupdf.FZ_SUBSAMPLE_AVERAGE +FZ_SUBSAMPLE_BICUBIC = mupdf.FZ_SUBSAMPLE_BICUBIC + # ------------------------------------------------------------------------------ # Various PDF Optional Content Flags # ------------------------------------------------------------------------------ @@ -13486,32 +17591,38 @@ def width(self): TEXT_DEHYPHENATE = mupdf.FZ_STEXT_DEHYPHENATE TEXT_PRESERVE_SPANS = mupdf.FZ_STEXT_PRESERVE_SPANS TEXT_MEDIABOX_CLIP = mupdf.FZ_STEXT_MEDIABOX_CLIP -TEXT_CID_FOR_UNKNOWN_UNICODE = mupdf.FZ_STEXT_USE_CID_FOR_UNKNOWN_UNICODE -if mupdf_version_tuple >= (1, 25): - TEXT_COLLECT_STRUCTURE = mupdf.FZ_STEXT_COLLECT_STRUCTURE - TEXT_ACCURATE_BBOXES = mupdf.FZ_STEXT_ACCURATE_BBOXES - TEXT_COLLECT_VECTORS = mupdf.FZ_STEXT_COLLECT_VECTORS - TEXT_IGNORE_ACTUALTEXT = mupdf.FZ_STEXT_IGNORE_ACTUALTEXT - TEXT_STEXT_SEGMENT = mupdf.FZ_STEXT_SEGMENT -else: - TEXT_COLLECT_STRUCTURE = 256 - TEXT_ACCURATE_BBOXES = 512 - TEXT_COLLECT_VECTORS = 1024 - TEXT_IGNORE_ACTUALTEXT = 2048 - TEXT_STEXT_SEGMENT = 4096 +TEXT_USE_CID_FOR_UNKNOWN_UNICODE = mupdf.FZ_STEXT_USE_CID_FOR_UNKNOWN_UNICODE +TEXT_COLLECT_STRUCTURE = mupdf.FZ_STEXT_COLLECT_STRUCTURE +TEXT_ACCURATE_BBOXES = mupdf.FZ_STEXT_ACCURATE_BBOXES +TEXT_COLLECT_VECTORS = mupdf.FZ_STEXT_COLLECT_VECTORS +TEXT_IGNORE_ACTUALTEXT = mupdf.FZ_STEXT_IGNORE_ACTUALTEXT +TEXT_SEGMENT = mupdf.FZ_STEXT_SEGMENT + +if mupdf_version_tuple >= (1, 26): + TEXT_PARAGRAPH_BREAK = mupdf.FZ_STEXT_PARAGRAPH_BREAK + TEXT_TABLE_HUNT = mupdf.FZ_STEXT_TABLE_HUNT + TEXT_COLLECT_STYLES = mupdf.FZ_STEXT_COLLECT_STYLES + TEXT_USE_GID_FOR_UNKNOWN_UNICODE = mupdf.FZ_STEXT_USE_GID_FOR_UNKNOWN_UNICODE + TEXT_CLIP_RECT = mupdf.FZ_STEXT_CLIP_RECT + TEXT_ACCURATE_ASCENDERS = mupdf.FZ_STEXT_ACCURATE_ASCENDERS + TEXT_ACCURATE_SIDE_BEARINGS = mupdf.FZ_STEXT_ACCURATE_SIDE_BEARINGS + +# 2025-05-07: Non-standard names preserved for backwards compatibility. +TEXT_STEXT_SEGMENT = TEXT_SEGMENT +TEXT_CID_FOR_UNKNOWN_UNICODE = TEXT_USE_CID_FOR_UNKNOWN_UNICODE TEXTFLAGS_WORDS = (0 | TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP - | TEXT_CID_FOR_UNKNOWN_UNICODE + | TEXT_USE_CID_FOR_UNKNOWN_UNICODE ) TEXTFLAGS_BLOCKS = (0 | TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP - | TEXT_CID_FOR_UNKNOWN_UNICODE + | TEXT_USE_CID_FOR_UNKNOWN_UNICODE ) TEXTFLAGS_DICT = (0 @@ -13519,7 +17630,7 @@ def width(self): | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_PRESERVE_IMAGES - | TEXT_CID_FOR_UNKNOWN_UNICODE + | TEXT_USE_CID_FOR_UNKNOWN_UNICODE ) TEXTFLAGS_RAWDICT = TEXTFLAGS_DICT @@ -13528,7 +17639,7 @@ def width(self): | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_DEHYPHENATE - | TEXT_CID_FOR_UNKNOWN_UNICODE + | TEXT_USE_CID_FOR_UNKNOWN_UNICODE ) TEXTFLAGS_HTML = (0 @@ -13536,7 +17647,7 @@ def width(self): | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_PRESERVE_IMAGES - | TEXT_CID_FOR_UNKNOWN_UNICODE + | TEXT_USE_CID_FOR_UNKNOWN_UNICODE ) TEXTFLAGS_XHTML = (0 @@ -13544,21 +17655,21 @@ def width(self): | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP | TEXT_PRESERVE_IMAGES - | TEXT_CID_FOR_UNKNOWN_UNICODE + | TEXT_USE_CID_FOR_UNKNOWN_UNICODE ) TEXTFLAGS_XML = (0 | TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP - | TEXT_CID_FOR_UNKNOWN_UNICODE + | TEXT_USE_CID_FOR_UNKNOWN_UNICODE ) TEXTFLAGS_TEXT = (0 | TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE | TEXT_MEDIABOX_CLIP - | TEXT_CID_FOR_UNKNOWN_UNICODE + | TEXT_USE_CID_FOR_UNKNOWN_UNICODE ) # Simple text encoding options @@ -13591,13 +17702,6 @@ def width(self): PDF_BM_Screen = "Screen" PDF_BM_SoftLight = "Softlight" -# General text flags -TEXT_FONT_SUPERSCRIPT = 1 -TEXT_FONT_ITALIC = 2 -TEXT_FONT_SERIFED = 4 -TEXT_FONT_MONOSPACED = 8 -TEXT_FONT_BOLD = 16 - annot_skel = { "goto1": lambda a, b, c, d, e: f"<>/Rect[{e}]/BS<>/Subtype/Link>>", @@ -13633,6 +17737,7 @@ class EmptyFileError(FileDataError): # dictkey_align = "align" dictkey_asc = "ascender" +dictkey_bidi = "bidi" dictkey_bbox = "bbox" dictkey_blocks = "blocks" dictkey_bpc = "bpc" @@ -13645,7 +17750,7 @@ class EmptyFileError(FileDataError): dictkey_cs_name = "cs-name" dictkey_da = "da" dictkey_dashes = "dashes" -dictkey_desc = "desc" +dictkey_descr = "description" dictkey_desc = "descender" dictkey_dir = "dir" dictkey_effect = "effect" @@ -13653,6 +17758,7 @@ class EmptyFileError(FileDataError): dictkey_filename = "filename" dictkey_fill = "fill" dictkey_flags = "flags" +dictkey_char_flags = "char_flags" dictkey_font = "font" dictkey_glyph = "glyph" dictkey_height = "height" @@ -14217,10 +18323,20 @@ class EmptyFileError(FileDataError): # Functions # +def _rect_area(width, height, args): + # Used by IRect.get_area() and Rect.get_area(). + unit = args[0] if args else 'px' + u = {"px": (1, 1), "in": (1.0, 72.0), "cm": (2.54, 72.0), "mm": (25.4, 72.0)} + f = (u[unit][0] / u[unit][1]) ** 2 + return f * width * height + def _read_samples( pixmap, offset, n): # fixme: need to be able to get a sample in one call, as a Python # bytes or similar. ret = [] + if not pixmap.samples(): + # mupdf.fz_samples_get() gives a segv if pixmap->samples is null. + return ret for i in range( n): ret.append( mupdf.fz_samples_get( pixmap, offset + i)) return bytes( ret) @@ -14469,7 +18585,7 @@ def JM_add_annot_id(annot, stem): Append a number to 'stem' such that the result is a unique name. ''' assert isinstance(annot, mupdf.PdfAnnot) - page = mupdf.pdf_annot_page( annot) + page = _pdf_annot_page(annot) annot_obj = mupdf.pdf_annot_obj( annot) names = JM_get_annot_id_list(page) i = 0 @@ -14700,7 +18816,9 @@ def JM_char_bbox(line, ch): def JM_char_font_flags(font, line, ch): - flags = detect_super_script(line, ch) + flags = 0 + if line and ch: + flags += detect_super_script(line, ch) flags += mupdf.fz_font_is_italic(font) * TEXT_FONT_ITALIC flags += mupdf.fz_font_is_serif(font) * TEXT_FONT_SERIFED flags += mupdf.fz_font_is_monospaced(font) * TEXT_FONT_MONOSPACED @@ -14803,35 +18921,7 @@ def JM_choice_options(annot): ''' annot_obj = mupdf.pdf_annot_obj( annot.this) - if mupdf_version_tuple >= (1, 24): - opts = mupdf.pdf_choice_widget_options2( annot, 0) - else: - # pdf_choice_widget_options() is not usable from python, so we - # implement it ourselves here. - # - def pdf_choice_widget_options( annot, exportval): - #log( '{=type(annot)}') - optarr = mupdf.pdf_dict_get_inheritable( mupdf.pdf_annot_obj(annot.this), PDF_NAME('Opt')) - #log( '{optarr=}') - n = mupdf.pdf_array_len(optarr) - opts = [] - if not n: - return opts - optarr = mupdf.pdf_dict_get(annot_obj, PDF_NAME('Opt')) - for i in range(n): - m = mupdf.pdf_array_len(mupdf.pdf_array_get(optarr, i)) - if m == 2: - val = ( - mupdf.pdf_to_text_string(mupdf.pdf_array_get(mupdf.pdf_array_get(optarr, i), 0)), - mupdf.pdf_to_text_string(mupdf.pdf_array_get(mupdf.pdf_array_get(optarr, i), 1)), - ) - opts.append(val) - else: - val = JM_UnicodeFromStr(mupdf.pdf_to_text_string(mupdf.pdf_array_get(optarr, i))) - opts.append(val) - return opts - - opts = pdf_choice_widget_options( annot, 0) + opts = mupdf.pdf_choice_widget_options2( annot, 0) n = len( opts) if n == 0: return # wrong widget type @@ -14911,7 +19001,7 @@ def JM_clear_pixmap_rect_with_value(dest, value, b): def JM_color_FromSequence(color): if isinstance(color, (int, float)): # maybe just a single float - color = color[0] + color = [color] if not isinstance( color, (list, tuple)): return -1, [] @@ -14927,6 +19017,9 @@ def JM_color_FromSequence(color): def JM_color_count( pm, clip): + if 1 or g_use_extra: + return extra.ll_JM_color_count(pm.m_internal, clip) + rc = dict() cnt = 0 irect = mupdf.fz_pixmap_bbox( pm) @@ -15071,7 +19164,7 @@ def JM_create_widget(doc, page, type, fieldname): sigflags = old_sigflags | (SigFlag_SignaturesExist | SigFlag_AppendOnly) mupdf.pdf_dict_putl( mupdf.pdf_trailer(doc), - mupdf.pdf_new_nt(sigflags), + mupdf.pdf_new_int(sigflags), PDF_NAME('Root'), PDF_NAME('AcroForm'), PDF_NAME('SigFlags'), @@ -15314,7 +19407,7 @@ def JM_find_annot_irt(annot): annot_obj = mupdf.pdf_annot_obj(annot) found = 0 # loop thru MuPDF's internal annots array - page = mupdf.pdf_annot_page(annot) + page = _pdf_annot_page(annot) irt_annot = mupdf.pdf_first_annot(page) while 1: assert isinstance(irt_annot, mupdf.PdfAnnot) @@ -15355,7 +19448,13 @@ def JM_font_descender(font): def JM_is_word_delimiter(ch, delimiters): """Check if ch is an extra word delimiting character. """ - if ch <= 32 or ch == 160: # any whitespace? + if (0 + or ch <= 32 + or ch == 160 + or 0x202a <= ch <= 0x202e + ): + # covers any whitespace plus unicodes that switch between + # right-to-left and left-to-right languages return True if not delimiters: # no extra delimiters provided return False @@ -15364,6 +19463,12 @@ def JM_is_word_delimiter(ch, delimiters): if d == char: return True return False + + +def JM_is_rtl_char(ch): + if ch < 0x590 or ch > 0x900: + return False + return True def JM_font_name(font): @@ -15780,7 +19885,7 @@ def JM_get_widget_properties(annot, Widget): #log( '{type(annot)=}') annot_obj = mupdf.pdf_annot_obj(annot.this) #log( 'Have called mupdf.pdf_annot_obj()') - page = mupdf.pdf_annot_page(annot.this) + page = _pdf_annot_page(annot.this) pdf = page.doc() tw = annot @@ -15810,9 +19915,36 @@ def SETATTR_DROP(mod, key, value): field_name = mupdf.pdf_load_field_name(annot_obj) SETATTR_DROP(Widget, "field_name", field_name) - obj = mupdf.pdf_dict_get_inheritable(annot_obj, PDF_NAME('TU')) - if obj.m_internal: - label = mupdf.pdf_to_text_string(obj) + def pdf_dict_get_inheritable_nonempty_label(node, key): + ''' + This is a modified version of MuPDF's pdf_dict_get_inheritable(), with + some changes: + * Returns string from pdf_to_text_string() or None if not found. + * Recurses to parent if current node exists but with empty string + value. + ''' + slow = node + halfbeat = 11 # Don't start moving slow pointer for a while. + while 1: + if not node.m_internal: + return + val = mupdf.pdf_dict_get(node, key) + if val.m_internal: + label = mupdf.pdf_to_text_string(val) + if label: + return label + node = mupdf.pdf_dict_get(node, PDF_NAME('Parent')) + if node.m_internal == slow.m_internal: + raise Exception("cycle in resources") + halfbeat -= 1 + if halfbeat == 0: + slow = mupdf.pdf_dict_get(slow, PDF_NAME('Parent')) + halfbeat = 2 + + # In order to address #3950, we use our modified pdf_dict_get_inheritable() + # to ignore empty-string child values. + label = pdf_dict_get_inheritable_nonempty_label(annot_obj, PDF_NAME('TU')) + if label is not None: SETATTR_DROP(Widget, "field_label", label) fvalue = None @@ -16142,12 +20274,8 @@ class SanitizeFilterOptions(mupdf.PdfSanitizeFilterOptions2): def __init__(self): super().__init__() self.use_virtual_image_filter() - if mupdf_version_tuple >= (1, 23, 11): - def image_filter(self, ctx, ctm, name, image, scissor): - JM_image_filter(None, mupdf.FzMatrix(ctm), name, image) - else: - def image_filter(self, ctx, ctm, name, image): - JM_image_filter(None, mupdf.FzMatrix(ctm), name, image) + def image_filter(self, ctx, ctm, name, image, scissor): + JM_image_filter(None, mupdf.FzMatrix(ctm), name, image) sanitize_filter_options = SanitizeFilterOptions() @@ -16315,42 +20443,6 @@ def JM_insert_font(pdf, bfname, fontfile, fontbuffer, set_simple, idx, wmode, se ] return value - -def JM_invert_pixmap_rect( dest, b): - ''' - invert a rectangle - also supports non-alpha pixmaps - ''' - assert isinstance( dest, mupdf.FzPixmap) - assert isinstance( b, mupdf.FzIrect) - b = mupdf.fz_intersect_irect(b, mupdf.fz_pixmap_bbox( dest)) - w = b.x1 - b.x0 - y = b.y1 - b.y0 - if w <= 0 or y <= 0: - return 0 - - destspan = dest.stride() - destp = destspan * (b.y0 - dest.y()) + dest.n() * (b.x0 - dest.x()) - n0 = dest.n() - dest.alpha() - alpha = dest.alpha() - while 1: - s = destp - for x in range( w): - for i in range( n0): - ss = mupdf.fz_samples_get( dest, s) - ss = 255 - ss - mupdf.fz_samples_set( dest, s, ss) - s += 1 - if alpha: - ss = mupdf.fz_samples_get( dest, s) - ss += 1 - mupdf.fz_samples_set( dest, s, ss) - destp += destspan - y -= 1 - if y == 0: - break - return 1 - - def JM_irect_from_py(r): ''' PySequence to mupdf.FzIrect. Default: infinite irect @@ -16380,19 +20472,6 @@ def JM_irect_from_py(r): f[i] = FZ_MAX_INF_RECT return mupdf.fz_make_irect(f[0], f[1], f[2], f[3]) - -def JM_is_jbig2_image(dict_): - # fixme: should we remove this function? - return 0 - #filter_ = pdf_dict_get(ctx, dict_, PDF_NAME(Filter)); - #if (pdf_name_eq(ctx, filter_, PDF_NAME(JBIG2Decode))) - # return 1; - #n = pdf_array_len(ctx, filter_); - #for (i = 0; i < n; i++) - # if (pdf_name_eq(ctx, pdf_array_get(ctx, filter_, i), PDF_NAME(JBIG2Decode))) - # return 1; - #return 0; - def JM_listbox_value( annot): ''' ListBox retrieve value @@ -16438,7 +20517,7 @@ def JM_make_annot_DA(annot, ncol, col, fontname, fontsize): def JM_make_spanlist(line_dict, line, raw, buff, tp_rect): - if g_use_extra: + if 1 or g_use_extra: return extra.JM_make_spanlist(line_dict, line, raw, buff, tp_rect) char_list = None span_list = [] @@ -16451,19 +20530,29 @@ def __init__(self, rhs=None): if rhs: self.size = rhs.size self.flags = rhs.flags + if mupdf_version_tuple >= (1, 25, 2): + self.char_flags = rhs.char_flags self.font = rhs.font - self.color = rhs.color + self.argb = rhs.argb self.asc = rhs.asc self.desc = rhs.desc + self.bidi = rhs.bidi else: self.size = -1 self.flags = -1 + if mupdf_version_tuple >= (1, 25, 2): + self.char_flags = -1 self.font = '' - self.color = -1 + self.argb = -1 self.asc = 0 self.desc = 0 + self.bidi = 0 def __str__(self): - return f'{self.size} {self.flags} {self.font} {self.color} {self.asc} {self.desc}' + ret = f'{self.size} {self.flags}' + if mupdf_version_tuple >= (1, 25, 2): + ret += f' {self.char_flags}' + ret += f' {self.font} {self.color} {self.asc} {self.desc}' + return ret old_style = char_style() style = char_style() @@ -16478,19 +20567,34 @@ def __str__(self): ): continue + # Info from: + # detect_super_script() + # fz_font_is_italic() + # fz_font_is_serif() + # fz_font_is_monospaced() + # fz_font_is_bold() + flags = JM_char_font_flags(mupdf.FzFont(mupdf.ll_fz_keep_font(ch.m_internal.font)), line, ch) origin = mupdf.FzPoint(ch.m_internal.origin) style.size = ch.m_internal.size style.flags = flags + if mupdf_version_tuple >= (1, 25, 2): + # FZ_STEXT_SYNTHETIC is per-char, not per-span. + style.char_flags = ch.m_internal.flags & ~mupdf.FZ_STEXT_SYNTHETIC style.font = JM_font_name(mupdf.FzFont(mupdf.ll_fz_keep_font(ch.m_internal.font))) - style.color = ch.m_internal.color + style.argb = ch.m_internal.argb style.asc = JM_font_ascender(mupdf.FzFont(mupdf.ll_fz_keep_font(ch.m_internal.font))) style.desc = JM_font_descender(mupdf.FzFont(mupdf.ll_fz_keep_font(ch.m_internal.font))) + style.bidi = ch.m_internal.bidi if (style.size != old_style.size or style.flags != old_style.flags - or style.color != old_style.color + or (mupdf_version_tuple >= (1, 25, 2) + and (style.char_flags != old_style.char_flags) + ) + or style.argb != old_style.argb or style.font != old_style.font + or style.bidi != old_style.bidi ): if old_style.size >= 0: # not first one, output previous @@ -16518,8 +20622,13 @@ def __str__(self): span[dictkey_size] = style.size span[dictkey_flags] = style.flags + span[dictkey_bidi] = style.bidi + if mupdf_version_tuple >= (1, 25, 2): + span[dictkey_char_flags] = style.char_flags span[dictkey_font] = JM_EscapeStrFromStr(style.font) - span[dictkey_color] = style.color + span[dictkey_color] = style.argb & 0xffffff + if mupdf_version_tuple >= (1, 25, 0): + span['alpha'] = style.argb >> 24 span["ascender"] = asc span["descender"] = desc @@ -16536,6 +20645,7 @@ def __str__(self): char_dict[dictkey_origin] = JM_py_from_point( ch.m_internal.origin) char_dict[dictkey_bbox] = JM_py_from_rect(r) char_dict[dictkey_c] = chr(ch.m_internal.c) + char_dict['synthetic'] = bool(ch.m_internal.flags & mupdf.FZ_STEXT_SYNTHETIC) if char_list is None: char_list = [] @@ -16564,42 +20674,63 @@ def __str__(self): line_dict[dictkey_spans] = span_list return line_rect +def _make_image_dict(img, img_dict): + """Populate a dictionary with information extracted from a given image. + + Used by 'Document.extract_image' and by 'JM_make_image_block'. + Both of these functions will add some more specific information. + """ + img_type = img.fz_compressed_image_type() + ext = JM_image_extension(img_type) + + # compressed image buffer if present, else None + ll_cbuf = mupdf.ll_fz_compressed_image_buffer(img.m_internal) + + if (0 + or not ll_cbuf + or img_type in (mupdf.FZ_IMAGE_JBIG2, mupdf.FZ_IMAGE_UNKNOWN) + or img_type < mupdf.FZ_IMAGE_BMP + ): + # not an image with a compressed buffer: convert to PNG + res = mupdf.fz_new_buffer_from_image_as_png( + img, + mupdf.FzColorParams(mupdf.fz_default_color_params), + ) + ext = "png" + elif ext == "jpeg" and img.n() == 4: + # JPEG with CMYK: invert colors + res = mupdf.fz_new_buffer_from_image_as_jpeg( + img, mupdf.FzColorParams(mupdf.fz_default_color_params), 95, 1) + else: + # copy the compressed buffer + res = mupdf.FzBuffer(mupdf.ll_fz_keep_buffer(ll_cbuf.buffer)) + + bytes_ = JM_BinFromBuffer(res) + img_dict[dictkey_width] = img.w() + img_dict[dictkey_height] = img.h() + img_dict[dictkey_ext] = ext + img_dict[dictkey_colorspace] = img.n() + img_dict[dictkey_xres] = img.xres() + img_dict[dictkey_yres] = img.yres() + img_dict[dictkey_bpc] = img.bpc() + img_dict[dictkey_size] = len(bytes_) + img_dict[dictkey_image] = bytes_ def JM_make_image_block(block, block_dict): - image = block.i_image() - n = mupdf.fz_colorspace_n(image.colorspace()) - w = image.w() - h = image.h() - type_ = mupdf.FZ_IMAGE_UNKNOWN - # fz_compressed_image_buffer() is not available because - # `fz_compressed_buffer` is not copyable. - ll_fz_compressed_buffer = mupdf.ll_fz_compressed_image_buffer(image.m_internal) - if ll_fz_compressed_buffer: - type_ = ll_fz_compressed_buffer.params.type - if type_ < mupdf.FZ_IMAGE_BMP or type_ == mupdf.FZ_IMAGE_JBIG2: - type_ = mupdf.FZ_IMAGE_UNKNOWN - bytes_ = None - if ll_fz_compressed_buffer and type_ != mupdf.FZ_IMAGE_UNKNOWN: - buf = mupdf.FzBuffer( mupdf.ll_fz_keep_buffer( ll_fz_compressed_buffer.buffer)) - ext = JM_image_extension(type_) + img = block.i_image() + _make_image_dict(img, block_dict) + # if the image has a mask, store it as a PNG buffer + mask = img.mask() + if mask.m_internal: + buff = mask.fz_new_buffer_from_image_as_png(mupdf.FzColorParams(mupdf.fz_default_color_params)) + block_dict["mask"] = buff.fz_buffer_extract() else: - buf = mupdf.fz_new_buffer_from_image_as_png(image, mupdf.FzColorParams()) - ext = "png" - bytes_ = JM_BinFromBuffer(buf) - block_dict[ dictkey_width] = w - block_dict[ dictkey_height] = h - block_dict[ dictkey_ext] = ext - block_dict[ dictkey_colorspace] = n - block_dict[ dictkey_xres] = image.xres() - block_dict[ dictkey_yres] = image.yres() - block_dict[ dictkey_bpc] = image.bpc() - block_dict[ dictkey_matrix] = JM_py_from_matrix(block.i_transform()) - block_dict[ dictkey_size] = len(bytes_) - block_dict[ dictkey_image] = bytes_ + block_dict["mask"] = None + block_dict[dictkey_matrix] = JM_py_from_matrix(block.i_transform()) def JM_make_text_block(block, block_dict, raw, buff, tp_rect): - if g_use_extra: + if 1 or g_use_extra: return extra.JM_make_text_block(block.m_internal, block_dict, raw, buff.m_internal, tp_rect.m_internal) line_list = [] block_rect = mupdf.FzRect(mupdf.FzRect.Fixed_EMPTY) @@ -16622,7 +20753,7 @@ def JM_make_text_block(block, block_dict, raw, buff, tp_rect): def JM_make_textpage_dict(tp, page_dict, raw): - if g_use_extra: + if 1 or g_use_extra: return extra.JM_make_textpage_dict(tp.m_internal, page_dict, raw) text_buffer = mupdf.fz_new_buffer(128) block_list = [] @@ -16762,6 +20893,8 @@ def JM_merge_resources( page, temp_res): ''' # page objects /Resources, /Resources/ExtGState, /Resources/Font resources = mupdf.pdf_dict_get(page.obj(), PDF_NAME('Resources')) + if not resources.m_internal: + resources = mupdf.pdf_dict_put_dict(page.obj(), PDF_NAME('Resources'), 5) main_extg = mupdf.pdf_dict_get(resources, PDF_NAME('ExtGState')) main_fonts = mupdf.pdf_dict_get(resources, PDF_NAME('Font')) @@ -17191,7 +21324,7 @@ def JM_read_contents(pageref): elif contents.m_internal: res = mupdf.pdf_load_stream(contents) else: - res = b"" + res = mupdf.FzBuffer(0) return res @@ -17271,7 +21404,7 @@ def JM_rotate_page_matrix(page): def JM_search_stext_page(page, needle): - if g_use_extra: + if 1 or g_use_extra: return extra.JM_search_stext_page(page.m_internal, needle) rect = mupdf.FzRect(page.m_internal.mediabox) @@ -17568,7 +21701,8 @@ def JM_set_widget_properties(annot, Widget): if isinstance( annot, Annot): annot = annot.this assert isinstance( annot, mupdf.PdfAnnot), f'{type(annot)=} {type=}' - page = mupdf.pdf_annot_page(annot) + page = _pdf_annot_page(annot) + assert page.m_internal, 'Annot is not bound to a page' annot_obj = mupdf.pdf_annot_obj(annot) pdf = page.doc() def GETATTR(name): @@ -17732,13 +21866,13 @@ def GETATTR(name): mupdf.pdf_dict_put_name(annot_obj, PDF_NAME('AS'), on) elif text: mupdf.pdf_dict_put_name(annot_obj, PDF_NAME('AS'), text) - elif field_type == mupdf.PDF_WIDGET_TYPE_CHECKBOX: # will always be "Yes" or "Off" - if value is True or text == 'Yes': - onstate = mupdf.pdf_button_field_on_state(annot_obj) - on = mupdf.pdf_to_name(onstate) + elif field_type == mupdf.PDF_WIDGET_TYPE_CHECKBOX: + onstate = mupdf.pdf_button_field_on_state(annot_obj) + on = onstate.pdf_to_name() + if value in (True, on) or text == 'Yes': mupdf.pdf_set_field_value(pdf, annot_obj, on, 1) - mupdf.pdf_dict_put_name(annot_obj, PDF_NAME('AS'), 'Yes') - mupdf.pdf_dict_put_name(annot_obj, PDF_NAME('V'), 'Yes') + mupdf.pdf_dict_put_name(annot_obj, PDF_NAME('AS'), on) + mupdf.pdf_dict_put_name(annot_obj, PDF_NAME('V'), on) else: mupdf.pdf_dict_put_name( annot_obj, PDF_NAME('AS'), 'Off') mupdf.pdf_dict_put_name( annot_obj, PDF_NAME('V'), 'Off') @@ -18042,7 +22176,16 @@ def final(): def PDF_NAME(x): assert isinstance(x, str) - return getattr(mupdf, f'PDF_ENUM_NAME_{x}') + ret = getattr(mupdf, f'PDF_ENUM_NAME_{x}') + # Note that we return a (swig proxy for) pdf_obj*, not a mupdf.PdfObj. In + # the C++ API, the constructor PdfObj::PdfObj(pdf_obj*) is marked as + # explicit, but this seems to be ignored by SWIG. If SWIG started to + # generate code that respected `explicit`, we would need to do `return + # mupdf.PdfObj(ret)`. + # + # [Compare with extra.i, where we define our own PDF_NAME2() macro that + # returns a mupdf::PdfObj.] + return ret def UpdateFontInfo(doc: Document, info: typing.Sequence): @@ -18235,55 +22378,74 @@ def make_utf16be(s): return "(" + r + ")" -def get_tessdata(): - """Detect Tesseract-OCR and return its language support folder. +def get_tessdata(tessdata=None): + """Detect Tesseract language support folder. - This function can be used to enable OCR via Tesseract even if the - environment variable TESSDATA_PREFIX has not been set. - If the value of TESSDATA_PREFIX is None, the function tries to locate - Tesseract-OCR and fills the required variable. + This function is used to enable OCR via Tesseract even if the language + support folder is not specified directly or in environment variable + TESSDATA_PREFIX. - Returns: - Folder name of tessdata if Tesseract-OCR is available, otherwise False. - """ - TESSDATA_PREFIX = os.getenv("TESSDATA_PREFIX") - if TESSDATA_PREFIX: # use environment variable if set - return TESSDATA_PREFIX + * If is set we return it directly. + + * Otherwise we return `os.environ['TESSDATA_PREFIX']` if set. + + * Otherwise we search for a Tesseract installation and return its language + support folder. + * Otherwise we raise an exception. """ - Try to locate the tesseract-ocr installation. - """ + if tessdata: + return tessdata + tessdata = os.getenv("TESSDATA_PREFIX") + if tessdata: # use environment variable if set + return tessdata + + # Try to locate the tesseract-ocr installation. + import subprocess + + cp = subprocess.run('tesseract --list-langs', shell=1, capture_output=1, check=0, text=True) + if cp.returncode == 0: + m = re.search('List of available languages in "(.+)"', cp.stdout) + if m: + tessdata = m.group(1) + return tessdata + # Windows systems: if sys.platform == "win32": cp = subprocess.run("where tesseract", shell=1, capture_output=1, check=0, text=True) response = cp.stdout.strip() if cp.returncode or not response: - message("Tesseract-OCR is not installed") - return False + raise RuntimeError("No tessdata specified and Tesseract is not installed") dirname = os.path.dirname(response) # path of tesseract.exe tessdata = os.path.join(dirname, "tessdata") # language support if os.path.exists(tessdata): # all ok? return tessdata else: # should not happen! - message("unexpected: Tesseract-OCR has no 'tessdata' folder") - return False + raise RuntimeError("No tessdata specified and Tesseract installation has no {tessdata} folder") # Unix-like systems: - cp = subprocess.run("whereis tesseract-ocr", shell=1, capture_output=1, check=0, text=True) - response = cp.stdout.strip().split() - if cp.returncode or len(response) != 2: # if not 2 tokens: no tesseract-ocr - message("tesseract-ocr is not installed") - return False - - # search tessdata in folder structure - dirname = response[1] # contains tesseract-ocr installation folder - tessdatas = glob.glob(f"{dirname}/*/tessdata") - tessdatas.sort() - if len(tessdatas) == 0: - message("unexpected: tesseract-ocr has no 'tessdata' folder") - return False - return tessdatas[-1] + attempts = list() + for path in 'tesseract-ocr', 'tesseract': + cp = subprocess.run(f'whereis {path}', shell=1, capture_output=1, check=0, text=True) + if cp.returncode == 0: + response = cp.stdout.strip().split() + if len(response) == 2: + # search tessdata in folder structure + dirname = response[1] # contains tesseract-ocr installation folder + pattern = f"{dirname}/*/tessdata" + attempts.append(pattern) + tessdatas = glob.glob(pattern) + tessdatas.sort() + if tessdatas: + return tessdatas[-1] + if attempts: + text = 'No tessdata specified and no match for:\n' + for attempt in attempts: + text += f' {attempt}' + raise RuntimeError(text) + else: + raise RuntimeError('No tessdata specified and Tesseract is not installed') def css_for_pymupdf_font( @@ -18397,7 +22559,7 @@ def get_text_length(text: str, fontname: str ="helv", fontsize: float =11, encod raise ValueError("Font '%s' is unsupported" % fontname) -def image_profile(img: typing.ByteString) -> dict: +def image_profile(img: ByteString) -> dict: """ Return basic properties of an image. Args: @@ -18668,7 +22830,7 @@ def jm_trace_text_span(dev, span, type_, ctm, colorspace, color, alpha, seqno): mat = mupdf.fz_concat(span.trm(), ctm) # text transformation matrix dir = mupdf.fz_transform_vector(mupdf.fz_make_point(1, 0), mat) # writing direction - fsize = math.sqrt(dir.x * dir.x + dir.y * dir.y) # font size + fsize = math.sqrt(dir.x * dir.x + dir.y * dir.y) # font size dir = mupdf.fz_normalize_vector(dir) @@ -18748,7 +22910,7 @@ def jm_trace_text_span(dev, span, type_, ctm, colorspace, color, alpha, seqno): chars = tuple(chars) if not space_adv: - if not mono: + if not (fflags & TEXT_FONT_MONOSPACED): c, out_font = mupdf.fz_encode_character_with_fallback( span.font(), 32, 0, 0) space_adv = mupdf.fz_advance_glyph( span.font(), @@ -19265,6 +23427,7 @@ def __init__(self, result, layers): super().__init__() self.result = result self.layers = layers + self.layer_name = "" self.use_virtual_fill_path() self.use_virtual_stroke_path() self.use_virtual_fill_text() @@ -19469,479 +23632,6 @@ def __init__(self, out): end_layer = jm_lineart_end_layer -def _get_glyph_text() -> bytes: - ''' - Adobe Glyph List function - ''' - import base64 - import gzip - return gzip.decompress(base64.b64decode( - b'H4sIABmRaF8C/7W9SZfjRpI1useviPP15utzqroJgBjYWhEkKGWVlKnOoapVO0YQEYSCJE' - b'IcMhT569+9Ppibg8xevHdeSpmEXfPBfDZ3N3f/t7u//r//k/zb3WJ4eTv2T9vzXTaZZH/N' - b'Junsbr4Z7ru7/7s9n1/+6z//8/X19T/WRP7jYdj/57//R/Jv8Pax2/Sn87G/v5z74XC3Pm' - b'zuLqfurj/cnYbL8aEzyH1/WB/f7h6H4/70l7vX/ry9G47wzK/hcr7bD5v+sX9YM4i/3K2P' - b'3d1Ld9z353O3uXs5Dl/7DT7O2/UZ/3Tw9zjsdsNrf3i6exgOm57eTsbbvjv/1w2xTnfDo5' - b'fnYdjA3eV0vjt25zXkRJB36/vhKwN+kEw4DOf+ofsLuP3pboewGISO7bAxPkUU+EaUD7t1' - b'v++O/3FTCESmcsILgQRuLhDs/w857lz6NsPDZd8dzmtfSP85HO8GcI53+/W5O/br3QkeJa' - b'9NERmPKgE2Ue+73vgj97Ded5TH1pPDEFCT4/35RFFtAMORMezXb3dwiioCsYe77rABjjCO' - b'jHs/nLs7mx3wuYFYX+HsEQyTfHg/DY/nVxa0rzmnl+6BVQfeegTyemSlOdjqczqJ0J9/ev' - b'fp7tOH1ed/zj+2d/j+9eOHf7xbtsu75jcw27vFh19/+/jux58+3/304edl+/HT3fz9kq3i' - b'w/vPH981Xz5/APR/5p/g9/+Qhb+/3bX/8+vH9tOnuw8f79798uvP7xAcwv84f//5XfvpL/' - b'D97v3i5y/Ld+9//Msdgrh7/+Hz3c/vfnn3GQ4/f/iLifja492HFbz+0n5c/ARg3rz7+d3n' - b'30ycq3ef3zO+FSKc3/06//j53eLLz/OPd79++fjrh0/tHRIHr8t3nxY/z9/90i7/AxIg1r' - b'v2H+37z3effpr//PPN1CIF47Q2LUSdNz+3NjakdvnuY7v4/BcEGb4WyEPI+DMT++nXdvEO' - b'n8iWFomaf/ztL8wZhPqp/e8vcAbm3XL+y/xHpPH/xlnDejXKHJTQ4svH9hdK/mF19+lL8+' - b'nzu89fPrd3P374sDSZ/qn9+I93i/bTD/D+8wcWxOruy6f2L4jl89xEjkCQaZ9+4Hfz5dM7' - b'k33v3n9uP3788uvndx/e/zu8/vThn8ggSDqH56XJ6Q/vTZKRVx8+/sZgmRemIP5y98+fWu' - b'Ao8vc+z+bMjE/Iu8Vn7RBxIis/q7TevW9//Pndj+37RWuz/AND+ue7T+2/o+zefaKTdzbq' - b'f84R7xeTdJYYJLOf7z4xq11N/osp2bt3q7v58h/vKLxzjtrw6Z2rOSbzFj+5rEd7+P84UL' - b'xH8/6vO/lj2/6Pu7eX7d3P6C3Y2tb3u+7ua3dkA/yvu+w/JqyV6GeUt0/dy7nb36MjySZ/' - b'MUMO3Hz5+LNycsdx54SB5wmN/XJvRh0z/vz1/PaCf4Zhd/rP9dPur/j7eDDtfIV+dX3+r7' - b'vz63B36vb9w7AbDn/ddLseown7kr7bbU4YIhD6/03//e7JiM0O669/vbyg1/hPdKLd8WGN' - b'PmnXoSs52h5200OGk/WW/fvdl0NvhpHTw3q3Pt59Xe8uCOARA8ydCcX433Z/rjfonfbrnf' - b'hP5j9MJtM0mbf4XZT4XT9czt0Pk3S1ALFfPxyHA6g2A3WCz90Pq6qFO+dsskjdtzAB3B+7' - b'rwwDeWi/reu0nbcOeMBostv1Dz9MpsuJwzbD+b5DcuGuKR32dFx/pcfGO9oOw7MZlAj64M' - b'/9bmOAaTJ/WFuJF0t898eHXfdDNmV4JC77x133J8XONCDiTTWq5JkvNMMLNY9C1ZLNa82R' - b'rIki9ULP50AZ/6pczOyn92DSE3IqRSZs7nc2+gmqKMi+O3an/sQkTQOpszcLsBTnsg2gSE' - b'f/KskTQ4YaANrFPFn4b/ELIEo/Iu2jQkbg/QEtEJXe1Y6MtWP3sl3/MMlnqf08D4cBaclr' - b'5KzEzHTuyXhZPyCXVhkcD0/DoXsmEwEfoWVQqsJ+Sg2eW9qniOGQFqHh3n+XCNMWCMLJ3b' - b'c4BPB2vz5CYenXkKjI06Rhu8mSJlSxKmmQX+uHB6g1jC0ztEQ+TRqdISmC6A46TLiH/sfM' - b'wBczE0mo4WrXHzoJpUyaKCvglLnpJC1XiEWSBN55eIHcDChLFpQ4TxZrHWkL2mUXwl6Yto' - b'N6OLefEmyRLHy7mizwDT1yt1szryqhfCOa1AJJBtKVZFRtCd8WU3pATvFrbr5cHlo6Dome' - b'tzoF0xmAbn3/vF2fgKgcbhbkKCCrCKBYETp0uZt+2siJ5pSGc92+kOVgbLVIOREE/rw+jc' - b'JfNGSxGWBysYMmOzxrCU3qelSBOUV1VQCf456kXEGaqB4gykGJUKTJQupBnixZ9NNk+S+2' - b'ihS/0kkCjOoD6ccjhCO3niVLKfYW367Y0xY90TIU6MwSVkRfVdMM6HFYsxzpPGobc0NLrV' - b'4ky6htQIoOA9rLmWTeIupuh6aRZaij5vPp2LH15zO49PmEMH1niBrcCCWd60KgH00/Bmgp' - b'kM8t9NzL/mm930scS/j7XYuHlr2MGiXkiwoDQvnESoFVyfKEarx1uSGFA7ehkULobywiRP' - b'BNiqgAcbOCo9MFRwtGp1GVn6wSDuzTImllwJ65b2mcAPyAjZxvfcTpHN+2xC0bZboApKt6' - b'joBDPZhbIgyyEeD7B7Sx9kZ1qTWqKgeUkvZ66MUI1N4eejGytzeG3kgUP/QumFyVWyD1+E' - b'pSja9NICVYYqbrSkvzJV2Xo0WhQfIedV+EsGU0rd23hAogyuUKtNZ7kBjOxTEPBT9LS/Cv' - b'BlfE32OqDgVzo+JFfWt3uqkhATv4OEhYCFtGXrRhR/jCY7Is4kuCVWavQ0QdiVoDqoiute' - b'kS9K0eFjpDy3E8nc75EdVjKGbtgVmg+1KkWtQAVp/hpaPQM1SNl1O/YwryWeEJUS3gUkeb' - b'wTnzDLP+DdtgG0jtClLrXh86SHu6mQoIb1r5HM1KWjmksEN7xQ9VsjVpEQ1ezvA7gUqMD+' - b'97RcpruAv3Le0G8V2Oww/ZBDpq+40xQxPBh2/G6D1BqRSiKq7YJ5TJKjTdJlnpDjptk1U0' - b'phVwrbvkabJy/S5Ut1UPnyELqgwIovM1Cm6jCoGgMDERdp6sJJ/K5EeKViU/Nqc/Lutj90' - b'OeYwD8UVS6Kb7RNzMrc/sZhqsZmYenfh3EnCc/StfWJj9KniAe0WFSKFE/hpxYWEK0k5TA' - b'wIh806Z72+hRd37UjZ50NJBBxu16o3UD+N1iHrjZ7LpRfab42+5KJ5gZH5eX8+WomxFq+Y' - b'++BBALJnWqVgGIRywArlFjJgefUXkgf/142NpPKQ84le/KfdtYs1kD2gjLDJ0mP7Hg6uSn' - b'tEb8P2TFYmW+p/xGo+B3kfK7SX7CQF4ZPE1++lUKGh3sT+tbAx3G5J/WN5WyDIzj5tQ/ae' - b'cZYrMDKqraT6b8fWshK2gxGcINBb+0hBQ8uuifpPuHY4SlmwhqwU+qg6frKFcRttbIphPQ' - b'R9WCwJesxfcF85bjZb9bX84siFWEiBYBh98kv1AF3jHTZ8k7PUvMVsm7v0F+TCjefdF4m7' - b'wTJWDpvmXIAeBbSrZI3on2gcBCFrWWCAN8BEhYRFXlK5N3elStQapRdRVIP8hQ0huaNirZ' - b'u6sBmN5NW8wn5kvaoqNFjZgn77qrpQeIFrXXInn3eFw/o62hZ8IU7Z2M0Qv3LREDiNQOJK' - b'vXQZEej8mQoT9th+NZO0TxyYCL+ukInW4UZFS14AO1SrX3Jnk36ByH4DIyMjMHO/jMzJfq' - b'MEsDhNLI0VCJyIAEUiopfEt7xzj2zk2XU9T0d9GQxPrzbdufT9GgMPWgrwuaWSZ/Y02eJ3' - b'+L5nZp8rdQ+VaWkPaJucrfok6uTv42mog1yd+ijEP4kpx58ndG2SR/V0NNkfz976E/WiZ/' - b'X99DZ3/uoxF+AtjV1Nx8q8JEqDd7qhkZYwUmB/byYoqG7OuuvwX63cnibJH8XQa0Gt8yoO' - b'UlKJ9v0JT/Ho9fZKuWgX7i7/FYPwUQLU2skr9vdTKh0/19q9UBhOgHI0gSjz0QU8+WUGx/' - b'jwoFJTAgF5SXemIhmYEhH066cZUEfEE2yc8syEXyM3s9aIU//4yuEtXlZ6815DN87+83Jq' - b'fh3OdavsR3yDVyJNdSS8STlByRjPISnlz/szJfgWNp8VoGUoZiqH8/969RViOG35kMcOJs' - b'RBqibJwnP0fZCI9+gol2Y79l3IBnya9F8gvza5n8oip+mfxihVqVUD7tt0yJVwRchW+TX0' - b'ImZckvekjEGPeLSjJ0nV+iejSdJr9EMkMGEQvfVHGMioqq/cuFhbVI3lPWNnlvynaevPdl' - b'Os2T974coS++D+WIye77IGJuibgc0dG8j8uRnqKkTA0tHsrkPSv4rnuk69kyeY+yEBW2Tt' - b'6bQmvwGxUa4tGFBv3ofZQBSNjwqnMI8UiOgOmXJJep+5Y5AQCTQ8vkA3NolXzARD8tMvxK' - b'qc+TD37AX+buWwIAACXpGM1y0I048Nbwi+C8ioAS+eBzH7J9YK7Bw8aPCTPIE8pgaglRG5' - b'YR4KsW6t2HmysAy1oz/LxzmWlUD8Vx8JLgCPXzKWgAH3T/jXRhfPKVrJgYUlSXBcigutDv' - b'rXxSsEROTCkjCMiMz1JUDQCnajBhkaqxAhD1zwXoPeodVNIPkQ7Skj6yUDBImU/J3LmllR' - b'BtZiHJ0IWlo6x0IfrsahmsVlVtHvWMEcFdKTzwLroNeugP8WICa2u8mMDA9t3T2iWOn7rb' - b'd1w/LmCKbejjcDnoalzNLX7uzzutF1ULh3v1BrV031vx8pkQwqZz3VrhQjV6CCNKFtuGJc' - b'J+CXy7FQn0rh9c3zxhZTbfMqVtHSDFTRe+D0CUduDXzrX6WJH2vUThvn0GM8sNoOYxU+9B' - b'4iuSX+EZWf+rFMw0+TU0X/B111iUya+R0rwCHaldcwA3p7hzeLXr2/ywCsMccRkI8fevR1' - b'3P8+RXnf9Qtn49Gac1P3QmkOOSg+//ZnLS5L9DEsrkv6OQwBT3afKR7rPkY6R7LkD7bmCa' - b'fPS9XVHjW8Ya5MXHEEsFIhpVyFb9RzoBqXOyNrRvkMU8kKIiFJAj1s4QiJqjgL0dmCdIRt' - b'jbKlcLknFrTJFEPRoVbfIxyhXwJVf8tw8E/ut0hJ0uLx2tXMBryuQTczFPPq24YzeZYHqP' - b'/hJU5qh0Sir31ITU1FM1qcJRufFXOiozVOV5JpTa+zO8mXdJnoncxM4YUpElI+VdlimozL' - b'ssycu8SxQaKC81OltQXuqS6cu81IUJxUtdVKS81MWSlJe6oJyZl7poQOXisiUlLlekxOWc' - b'lJe6YPqmIvWMlJe6pNRTL3XJtE+91IWhvNQlZZl6qUtKPfWylCyHqZelNPF5WUrmxFRkYe' - b'yFl6Wgv0JykPlZSA4yzwrJQaa9EFmQPmll/ls3EYqw3r/0vsvHAPTJN8XSf0ceSgdKS0BB' - b'qAaLzH7YvvITvb/51OsBtYVubaNDutDSa0vIXJTlGzX9jDU6kmtiaN/2WOU8GTmDt7gzhf' - b'jR+jzSF2+AVgT05AxBbB9iCIUVzdcQ+zZy0SB5236vlk6Rov7JrLTOUYD9nyIAqkHUa4A7' - b'PJ7Ha3DwLn0JXJwZlszn5slndhbT5POaSiyGgM92wQ6p+yzFCzQUHDLsc8j/mSVirR49/+' - b'e4/6WnKHfnhpZCWCSfow1iOL+5+Tunw1AEiL07n6KNW8i6dbv3NT7d0LbgJ/WxCRQp8ymD' - b'Lmlkh4SJqNWgXJIfzwyh4n/WvTemB5+jcoAIesERk97PUEgee6OwNwtDnXrW1npqiPPrQC' - b'Gr5POxg47h1WhiCDtKH5Sxz6d4Z7EB4gsY4b12O7XkD+brIFSafGFxF8kXmY7M3bfkBwA/' - b'uUCxfJHJRY5vKfa5JcJEotGA1INSoxID3aoUIWCl6aPufNEj9RSk0vQXgfQ+llXAJOYsYJ' - b'KCmcKU2cAkwC7WlMm5NtUpAihpoTxKk4e0MnuYuW9xC0Cr9JiefPGThJX99Gofpn9fRpME' - b'iqknCVB0v4wnCegqvkSThBZ0PElg9mpIZwTy7EpTgYxab6wgmGQIGvGX6zXS1oNK1a3oUj' - b'cRZKWo7Cwr2SacF55I2T8Jy+QM03p6298PO+nAcnEgi6lN6jG9ntqMwRuBTb2bwIuEkPkI' - b'0mhNnVI0/i/jheQJMd8ikR7MG9bcJdb9WBvga+MTlJGfv2MY+hLNJCoPSFWfJv9goy6Tf4' - b'T22ST/UHUHU5N/RBOFDHS02gEHrsdpwIuKCuFG2yd18g9JHHi+rmFK90+KUSX/9KLWWfLP' - b'INLCEjJSQ+5/qipSk1QjBKZq/1RJqOvkn77q15Pkn5GIiFNEqpL/oRh18j8h6mXyPzqmBU' - b'gd0zz5n2ikz+Ges5tZm/xPFA8ClXjq5DfGM0t+k6506b6lwRPQpY6x5bcgVWuJkCFl8luo' - b'sSljuOpuVsC06K2hpY+YJr9hHqA714bI5Va3h+B9hqLl/+aLP7efvktZQSi9wzEtQOu6Xo' - b'GOhkfonL9FuYYsklzDt68wFOByuu+fdAbNHXbLYGJB3q4/n3e6LkNREfiWrzr5F8tpnvwr' - b'Mq8qQfsRZ5aIGVa1dN8y/K8ASJE5whVZ2s4myb/sonPVmC9ReBztS2aWJf+KWmAF+ub2RE' - b'3GDa23BW7VGoi+7XRa5gTGO2qLlKiO0vi7Gafl3Ih0kfxLazqzafKvqGgRsxQtv/2uVFMk' - b'tEmEvrFe33cYbXZoTzM06bVvLC1Zm+4rnM0mxJ8uv6+P6zPczWtLH/eXZ65RzA1/v0Z3qc' - b'C8BXi8yML5JAf9dYD2QwU4RNq0Gncx5hGooqbre2Zlb87D7NfHZ121VxFXBYhhVScUyb8f' - b'Xob98Dj8kNN+ay2G2Ln7FkvnlQN0vqcO03ZLlcPEENs7igySfPBipgJRZAsZiZO6vJxYQl' - b'Q4TEXWNwyxC41qq+SlZoghdqXRyBB5pjlict0kvkZAczefJoKH/T2qelpZyFKT1FFDRLoS' - b'KJx3LtkMXCRBYzUABm0XwJQ+Qi7nyAG9pgzuZrN+VnWsIuTqKPJB6aFQ9G7OTfMAB70Rgu' - b'iMSw0ZlidBmxaBWh4WF5G73fNw7FDvcq7srrvgAZE89v2EO/g/QOzCkvVsmtL4aGrIdII+' - b'yFqqe7K2xs6enFlFwJHZxFrJeDK11p+ezOyevCdzu7ftyantXjxZ2A7Ok6XdhPdkZbfaPV' - b'nbzVpPzqwpnCPzibVj82RqzdY8mdmNAk/mdg3Uk1NrU+bJwhqLebK000xPVnYm4snaWgZ6' - b'cma3Wh05ndiJmCdTa9LsycxO/T2Z22m/J6fWLsaThR2kPVnaGbsnK2vw5snaGo94cmZtTB' - b'xZTKwxkidTayDrycxaH3kyt1aWnpxao1VPFtZaxJOlHeg9Wdk9fk/WdlPUkzO73ebIcmKn' - b'qJ5M7Ua0JzOrLnsyp8WNSFVOSYpUZeEarSMpVS4FWlKqXNJbUqpc0ltSqlxCrihVLiFXlK' - b'qQoCpKlUvyK+ZVLsmvmFe5JL8yUknyKyOVJL8yUknyKyOVJL8yUkn51kYqyY2aUuVSvjWl' - b'mkrya0o1FZlrSjWV5NeUairJrynVVJJfU6qpJL+mVFNJb02pppLeGaWaSnpnlGoq6Z0ZqS' - b'S9MyOVpHdmpJL0zoxUkt6ZkUrSOzNSSXpnlGomCZxRqsInEADJXEhTglMhKVVRCEmpilJI' - b'SlVUQlKqohaSUhUzISlVMReSUhWNkEYqn8A0NVL5FKWmdU9WQpZ2DuDJyppoerK2xjmORM' - b'ai8ovMJmMLCcpkbCnJNxlbBZIRVT75NbpNBFUJaUL26a2NVEub3gy5nE1cg8y5MDxx4mO4' - b'JWHLrqhyVs6ynAsJ4UvXrkGyVpTlRMicZCrklGQmZEEyF7IkORWyIlkIyYjKUsgZycqRU9' - b'aKsqyFNELOhKQYbnAhyZDdeEGSQWVeyCmLsswyIRlUlgvJBGZTIRlyVgjJBGalkExgJkKm' - b'TGAmQnKYLjMRksN0mc2FNFKJzJmRaiGkkWoppJGqFdJIJQnkMF3mEyEpVS7p5TBd5pJeDt' - b'NlLunlMF3mkl4O02Uu6eUwXeaSXg7TZS7p5TBd5pJeDtNlLunNjVSSXo6t5VSE5NhaTkVI' - b'jq3lVITk2FpORUiOreVUhGTrK6ciJOt5ORUh2dzKqUjFwbScilSFEUOkKowYUgqFEUNKoT' - b'BiSCkURgwphcKIIaXAwbQsJIEcTMtCEsjBtCwkgZURw+dkwZ6qnE+FZFBVKySDqkshGdSs' - b'FpIJnHsxClOfq5mQTFEtjk19nqVCMkXNXEgGtfRCFqYElz6fUQ+ohXrHJUuhaLyQJRNYLH' - b'yRoZ2DXE6EpONlKmRJMhOyIhn8MqjlVMgZSRGDWVcsSyFTkpWQGclayJzkTEgjlSShMlI1' - b'QhqpFkIaqZZCGqkkvZWRymd7ySG+aCW97EWLVtLLIb5oJb0c4otW0sshvmglvRzii1bSyy' - b'G+aCW9HOKLVtLL/rloJb0c4otW0jszUkl60T+vmiyQBUmf/Ap97KqZBpJc6UUrdm7FaiIk' - b'xVilQlKMlU9ghQ5q1Ug3UnGYKJqpkExvE7imIpVCMqJGxOAwUTS1kIyoqYRkehsvVc1hom' - b'gyIVkKTSokS6HJhaRUi+CYUi2CYyPGTEgjhq8bdW7i9XWjnpqIVkIyooWXasZONXN+yzRD' - b'B5WlTicHiSLLUjdBK9McXVCWujlXmRY04p9kCyGnJJdCFiRbR7LRYSh3jvO0NCOsczydcS' - b'qUUWa/kcHqqldniiRanAG57Y/rp/Vh/UPOk7jraNoPifuwMsL5Sa+XRiBU76bYnKrGR5UR' - b'dK9iNp5V1MbDeF2IXTpvUlnfMwwz0PSHRyA7h61ogQ4M/517jTZE990mAhcER7ZUTNKNlS' - b'aqVP14pWkagSoxdP28PuOvybd5Fsjtevf42m/O2x9WKy5ByDoAR5Fd9+i6THxJMqldgN6s' - b'n7rT1iwGvrJpWVdx6uvWgNv1/tvalFIIJB9xRh6ngW0WM4LHYsQZeawt24olwu/WyGyR1a' - b'VtzzWYkVjZiDMK3bOfT5fjWnxxLA9w7GU10bxxRVjlmjuqECubCS8oqpDPmc3SP7hIeQqo' - b'SdHLFg2Vfdxu1/1xWe9+yDJqDu64PXsdfdx+DlY4bg+mXm6lHrR/6Y6n9WHzAxdWAqmdTR' - b'TuV2eN22BPjyw7qFbIHD48aWBK4Hm7PjxvL+ftGhWWRlHAuHaYcVWFn/fH9cNzdza2uJgt' - b'1FeoN5lHxnEiq7jmCiN6ml3DytfUxWSiyPLMuba+QRuZuOxsrDDRgg/DGY575m2NNnG4bN' - b'bns1/Eo2J1uJy+sjTDYm0A/VpfQHS/BzRcdoACfVmj2ML684TIsTv8kPFAwPploFgv0Uo9' - b's1Bwu0rJ/v7lBbm6qlcrfh6H9cO2OyGXqSSS/lPqTa2B4Yi+74nFwWQZnJ1ht3sT9xDyuO' - b'7UQiLbPpEAoJ8/PiAnuRJocpWdj9nbTNvZnJi50YF6RnSjQ2NpOXmNqnk8Dq/3w5n1fTa1' - b'5GZ92m6GV9oeUI/xkC1NXmQhkCtRXm8i2OWFgAt5c79zgS+ngriwl7kgLujlRBAf8jITyA' - b'S89AHbMGZ5IF0gs1mAfChUqD32uu2RGRDRuUNZb4i79ecioAzQoVlATZgOzgN8eXGYS+cW' - b'Jf2t+xM1hPocES/fJJBIlUq2Q9x+TMYrWARHB3r0qeH6gsclNQ6TFGeKjgJdKQYE//r2Q1' - b'bNWgUyKierT4zBJSqXmWfeCmSrxFQQqREuH02hzVJPbEyhFYG8PzHIeS0ISuJ+PQJ9zpUa' - b'GB5dHVhIcJL4yiMis0OMTmAKBWGdHvrebm5wr7HVQLRf5jjeTLjStHZogzj2LzRg4+zQEv' - b'5Yhmnx9gio0rxSh2mtYoxp1YLLJife8HZ65mgyF2q9456JjKRUDT3nBoY+B60yS0No0WAU' - b'gnVjUcuFIAuh0zYKo5ivrkq2pdPb/uU8mCFAdWZoIWcesEAV9/nHPuUcGYaTKfGgjwo5Bs' - b'5F6aFTkmrAI9vroeRptdPSQe0kvUNQ5y33B0OgnF5ervRRdPCXW9pihHttMQK1tgjGV2rk' - b'Wz9Icdk4ugqH2frWH9wM8o0KD4sxqCMTg4oWBlf33KPFjxoNoYDcYyT2RvKFIqOaTNxJkv' - b'FbyTq3tOSA4auKWk1In51aAb3gXivCS3KPbBz0doxaBRBVZhiD78N2ZprcRxeb5IaW8Qlu' - b'O+pyp/7PcwcnWyoKGGXLEoF2D+sLO4ospzO9RYhQaRriNdGaZKxLohMGNtYhZ8ajSvOM9E' - b'iXRM9qwG4/8r6YrYRzGnYY1DfCmhgZDsMQT2oWaJH3nc5HxqjtMljQ3dmur9xbU4LGQOuR' - b'FRQTdLYzCc4h0kCGiYUBg0JvSGjZobahJt9vdb1akvY1xhC6yjgg1BkC9nh7gZLsdVaS1g' - b'klvUMurHcPKDVzIh551B82eq4Ine6+V+YCTMEONdtXIJ6SNwBKCHVuQ6R0CAaHl6E/nKHv' - b'QEF1SjBn+YbNEcSzzW93pOfpNVd5xqzfscF5uKAYY106/d/4WqtuvuPO69dp+r850CH55P' - b'CWO8aipEU/G3jGo2ZmlnnsHs4em7vAjNvrzGnmN9g6a13Om57cFZm5u8Ch/Q7uH9kpZKXP' - b'geDMZd3pjG4kK9nySZrb98bpmireVbqCRyehEUeLOR270EyTLYdn9E0Zs09fU1SBHlBTsw' - b'JT4/toigdfwz1XNXrXP6ZI9aCrP7J20NUftMw70Gr+CLM8RIuy7oyWgnmrIey5yUnVBPL+' - b'TH4egH2/IZIpRPfCyqsfajV2fqHnNAC6klUWtrUTYiwVbeVoFeIE0Y4iSTRDRFko0MqiES' - b'1MnehGh8Gu0YAVZ6Ihq++tNBQNipF/E3fbJlGDRCTLCLGxNBFmC2weYVE8cRA2keju3frU' - b'sk7CVRvW8iVrLeQMaUpLycKWcriKWc4OJ43RzXCBwm55JXn95imKbu6wGzHk5GECcbCj/B' - b'yyiNlYjdzWuiCchiu5UEEvuh3A40W3A9KY/p251Jm5bxM/R3au9VtoQPCYtx+pss4Mdure' - b'TJfcJg/Uh/LkQVsKloDVOIY58YPc01fh2yuNxLXSaOmgNJLehWPeNcjDhoP3YaP00jrVuM' - b'v9icb8GkXkUC9TkPFysv0Lj0M+IMbh0a4lO0uwbFHZT11mCwu5KmIo9GZP3bGjEg3/Dfzr' - b'pVskQe6kW+JbriLEFOlhfBXhDJDoapklwr2D5F6OO472iMRdQdiYr3AFIenQucGdRNjUnn' - b'BpgQDGE5dV+dU/cXGHeZBb+vDoK9lyZRDdvtqJgYbd5nR+49JM5YLRdRNuotM/0PAetMIz' - b'a0j72mEIXT0cEOoHAZ27U9C3b1NckvPwzLkHJtxpbsjAn1YE/vfLFVeRE82xnm+YCxdkaC' - b'vpykR8+3LFBVnfv1yRWUUDa1bDbd9deEbKVA6/LpVVgWMGN2Gkwhj5KGeeEZbL5x6Kw2B1' - b'2w4ImlM4M8hO5h7xQG2BPjhxnobOA0yku/EQrhnPVSpKh4/S4OBxClwoQX4HjKR36GUUKM' - b'QRXbZx3/vL7ty/7N7Q2c0qh6FxgZo56mV34VrjrPD0AL1pZ+pWjs7dobxTnWMalw+MysMe' - b'daKYsnQo3DTRTTxblMnofJBrqkuFu74HjW3XUXkzDZk6/Xr3tcM8iOPAIrPQhnfW7whMLM' - b'Bp0tEiqUXkMBUx1Nbd5Z4TPvt1uvRnJ6yG3DIPbUoe9g/omUOXM0eTjHQ1+HJr6soRpNHH' - b'JdgdD+ZoywQjn/nc88TX+vjGbfJUIAk2dc64AqCciH5TWNqqmlTome12xXCZjnkOp1Dmsj' - b'buEdqTedxIceNLriBTkA4vEn2Ib1UuvEM/H574wNQS99JCqodtUwtFy0LOp78NT4szjVlu' - b'ndyFK9ngkqS75MxCds1HhxgxXHgNsRd0XZxDUJrD0/HCdJp1c75NMFyOnLA8Hc36E1Qo82' - b'DBAILG5o6YL3h5ETQqRzct78ChZuBoHsZmk7XkYs5rVNJA88Q7R09LLhcp2WmgM9JZoHPS' - b'eaCnpKdCm9irldA/89JRKhCWbnnhDNQeT77nAf1JIfQHngadSHDtJ15VzKHJ0Z952XJaBZ' - b'pnbUJmrHidoSlaSzLtqZA/GlLS+pOJS2T52fide/L9nPmaimgfjWcpg0+8b20i6fzEq1cm' - b'gWvTIdn2ycop2frpi0mHRPbpN1MqUohfTGQS+j9MaMwF9/QGFYtZIE/rw4m6voZQKR+pXR' - b'BDrRtN700ejeBoaTa75utdsTRmy2ba8gYehZvfcKADNvG+DEd7vsF3aqZCBdWL5Q9Pz08B' - b'QtbJJBTFcLx863p7FyZChALQnalWcGkGnqHpvXELM6ONvqGMOk4F/HJEIA9vzGDUwrejuV' - b'Ob+ZiSWrEvX9H0CMS9ZxmHj45VJNwaLafJJlLiSavFqBLkJtgIGNItTZnveImvaYmNl/ig' - b'RAEd2wtMErdyZsxAomUzjzxxDWSSTdy32bmZZClJtSJWGjosiJFW05+S3tX0x0S8CyuVFG' - b'5nl/ty+xlW9CIgrOk5eItA7f628XxnLGVGnLDyd8U/dU88Nek46Zgz8un5AXVAf+z/EFdT' - b'BY4C8CxoB3sBZwocuXesOH2VAkfuHctu7Qtaa3Tkw/Mu9xflo9HoyIfjxTlXKnDk3rO2ps' - b'o6cKLAkXvHYqfUCVgocOTesOImMJ8D00P/dGUBbQbisfP6MNpCmi4CJ8IOvApuZprn8SnI' - b'Pa8sYPrFCMRM4+XQcZdFjvKYQX5aQ+r7nb8/lfWIy2/XRgrzWwy9KrQcO5DetbnJ0X5b4+' - b'LIecP10or1rvZv0XN5RG1Sc1vb54tJ05NPUymUU5RXBLSOsiCAGLnayKNBlaLd8ovJGLMx' - b'GzATzsux33ujBJNJPmFcf8k4OiqMnpWGNWHC1c4MWtl9GBzQImShAFGpy+vR/MOqQG6J0W' - b'3kRP3l9XAedeOG9h23IXQP6oDQhRog9JGYtW3GFb2pIfpmIxP3Ajm6ifYxskSxM0vpWD0S' - b'oiWid6YaQ8tiMOqbfQrm1L2szdJU2GVtrni06zFjmmOqvSrUpo6bOFwQQZPvtn1oOktDh9' - b'EDFUPfQoJS0XtHC7LROYjZTeNosbspCdg9pKn9lCsDa8Z1GPbIVsiLn8sJXcHhsrfrbiEr' - b'V8j/jvdkZxjr40yuEpXHhtBZ7ICQwwTcZhE+MR6/nblD5E/rFyPMnQacJrLXwxMFjogmgS' - b'i6cOZvXifx1RNoklUS3TzhWvpUUNc8gk9pzAGK5NSFxNh1qZA+nwc3OYfaven5JhtEW1Xu' - b'm3P5zDL4wpLdxs0y6NGb6D7EAmE9n7ZmUayYwUO0P4HqEJYqobFtwj30aEPRHBhJPchmBg' - b'guomzWfokE3cKAmuW3MsjXCURb01sZC9I7M82fMA/Nt55I5g6LZpLeoVquE89iCuBD1tNF' - b'Ojo8UUdF9R7U3iBrd1h4zJazQLryrBLfgl2J5wEYFKISt2IkGGxOvDgtzVNP/c4rUluh7G' - b'KZq80mQ8/OwGJRkOCavCzzoHMyK/Fvw8YqNMYSO8ZEvzOc1wMS8qyP2LaCurUCRCOqPLzo' - b'HEMSzuveLNMii8LSPOTQS/MctvTSPCU3r2kgT75ZzYCNnpQcTS5J2CXgOZ3ffmcjJUdXYz' - b'qNVj+LVcIGARE6OWo+w/eReciTJJ1abIdbveS6SDq5ox7+7fq6X29fekCvtQt4ZchRXHG0' - b'NYfhuhbV4Hv0uAeD1UutTM3D9i2+Z6GuAMrgObVEOM0914C8+LHSqIyxM43q2zErzZAXP1' - b'KNRtde5pojb3tQelVCEFUfuwbX5zGk02eskTPuSY8q6aInPSwtR+Mhf6f3+hFOd2WHAz/6' - b'3Q/0XJ1YuNf4VsUK/1H2w2u0No/y0YZX8B2dwYfckY07gnOrBnltP8MI74BQKdvWIlK0jD' - b'0AbkeLSw52jSGrZql14HKxdAF0mEj7MKpUMN+2MdoIxAa+YXufWUzlhRdH5aSPYIs+4yoh' - b'XFT/th0uyJfMQzS1sdY3HFMbi2KwGpD/L9verRzkWeZSKl1+NqldGNECqcNUh+/z1Seucp' - b'FIyuqVAE59Wjkv/m6sykUu/V02qZwTbwBNcnwWgL5u3DqCzNVmeHUgI+N+1MHn4YBc1JcO' - b'GNCf/AehX4nJkbBdt7frlFArOvNkTKgrc4dIRrQekDLOHCIJp59d/8JGl9Go3FMyscky1o' - b'KgA+SekLdoKo/IWzTIAP0WTY6+db8xygiXK+23njmhgkZ6Bf2/cAA4je/gaMg5v506kwVw' - b'F1myQzY9YmA21x18vLn71vFmxG5dNEfH5g2chh86CkY5ehSH0PhOeRTOwSbHPGHZhRdy0M' - b'qGUMKIyN5OmzFp/HzYDSe7WDa3QHgzBoN+DInboo0ZXiFGBvjKMJ/g21+0hVl+F99qhUmC' - b'NbZEP+U+o2bnMNGpSkerBrMg1H/FvP3AdGclivWo8w5+dC5PIZFOXB1I7Qox671IjuK3n/' - b'xBBnLpLatzfjh9oi5JDEffQUIrtfTVoG0cegF2w/DCq9nmBKkbnpWk7D2vDHArh+mWP8ai' - b'1VgGfTZG+xseX6BcSttCZtoZVsUPNRzVpKXU4Ms8VbRCXsqtL0v3LUM8cuaM2M/rxwH9jE' - b'wMOXYoPFpvCbwb0LVLP/9bIu6LVG/WAHkVqbtlB1sp2BeExrTeBPzPB7PSxwVT+637hoXD' - b'7JpqLiTNuyfcSgu03KnvwWhS4UE5P0MAUzXaDpgeEbMvO3dlf6reeFoZyla8mXGjH3yaEb' - b'AqdNrMk0dqqmXyKKsNLb7VUGBoBHDYdj1XhyYz0OetWoVrLRCtwjksWmtrkke9PlMnj0F1' - b'LJLH6MWpVfKobF7R2B4jbQjN6XFsBLvMiI1XyJc50dEKOTTVR730gNgxdlASHvt+fMRMZc' - b'Lfnh8I4HHHD3gyAITpHyPVBtqIg0SzyQSRQQ8y0xq080MBnex2GMeHP63JoCVpw2jNF036' - b'nteP9iCwp8Ia+hgLy+iBE5ZVAxYWkud2sThmKC8xWxZ753ZFN8JHvhx33+3tyWRPBWcOO1' - b'wO9nSyp4ILh7109giyI4LxuIP4ikxvzyEHOrgiejydzRVMqB7diToTpvmPPeS2Vlck4kfL' - b'GLRRy/PCfAUd09JKV24MEOrCVNE3NOW6NXyvKFvfVkeF7pMWSwNo7bdxSFB+LRLrvoXDgu' - b'prkVs6rhVRq7jWbTTUWkgruBYRta62pKi3C0977da6Fx3PxqqHauvAq7agTDtDu+DBMvMm' - b'Eb4jlQxtKBwhxFThcXgUexl2GsOjX/eBqvAIXXAv7CnZR3alvM474XPYLN+p+Qr5aGlVvn' - b'MDhPLNFX2rfJeG78vX+tbF6ZFQnBaJi3PqsFCcFrlVnFYiXZzWbVScFrq1BFoZji5o61YK' - b'2joIBd142he0dS8FbeXRBW0dxH3mUjDpNNMASa9ZWMzVERfQdtSaIZEomAjkuH7g3jFP9k' - b'xJHR449ucJTxFiKvukTeRI+gOFBb69tRzxcLZ5viIZL9NjaH3iod5owGlmU6LxgNPMGLI2' - b'vasMHSzvSGs1bgFaq3Ck7UuHTW4/dwjJKRCYMDlQ3cHfTgDF7x82iZ5DTJYg/VITkifqA2' - b'RRzyEi5DBMl5YIzyEijNFziHDvnkNMzVfggI72CuBSL2EUGWiV5ob0sOcOV3QIq2A4x45v' - b'ZjDkoAAuHC7IKnfI/vLHRu3CzpbEUVl5kpCXpq5II8A33nkeB9oGVggXRQzt162BY0r3FB' - b'ld1qT1M49VZhBXsQxb1wUHhMpgAH1/wNwCoxsEWote3SGwsvhY50F9+N5bkwVZ10+KMWE3' - b'3ppE/m/D5tTcUFphJGInfiXjVE8UIkC9uQAt8UlvLsxJa12a1brfdzt7A4v5DNpPBATVx8' - b'FBiwAQbzsg0N1wxvRBXq6QK0NbzzqdOfHK2JgDoF6/gDKnGO6s7ERjaqLG/L1mOE/pLZ5u' - b'x5EIXtRsnl7DKso5Uh3e+ITbaBRFC9d7IOhVn/QeSANautOM38G0EI3syOsl7eJPlfjlSx' - b'Y1P/WyfpnojWLnwN+c6UhfjXJLhpszWwtEcjs/6jZNIh2NLjmUt57wXQWUIo0MR25vAF82' - b'Ho+GSPE/HGUJgcms8sBwIVSVQF9VfILKAgUkkEO0mIc+hUdSwdEbFgWScuEEYD/4syDzJk' - b'De5qux2Kk/PLlz5pN8FiC3OUo7zye9/dEw9ON6HzaY2Mu8hf3xWcL5O6b129uPrs7IiA0q' - b'UHV1v9fQyU177jwJJ0bpSN91a+lwoy5pddhxSXJkBpIRG/d689ygYf9nRXrUB86nAPuz2m' - b'WbJ9vIgmmlaL1MUtPhDrqkXs2ncLymRKRNLRBbqWTpnTFLCSw9K7bcheXGE2vLahXr2mNj' - b'udFFKKlgz+vTcRQeqlnEvQ7Spep0eb6MWAVznja9ZqJ65MoKM/Tqyd0pM+v4MgzmEoP79f' - b'HenJtvFh62p448vqBIoSbSs7L+ajJFm5udIiTLr5DHMRJs3zR6cJcd3OJRGLTi20zUie6K' - b'I3NqU9sFSO+voKy+gvLpFRQiiOCx0BHzSuqIG4vtWN7eq0kVbS7MipBsOkbyyRgJYWt0LL' - b'DmXcmrmbG44LhHnKtEb4NN0K7iN53RItSbzuhOgvZaWSK86VwkW/2mM/jRm865oSVkuO7s' - b'bW+8UOXMfaTCfkZ2/AoTGw6I3wXNZSpUUFuIbW90sHoVrCIpeo3xYbtG7W3VzCvNOb8O0v' - b'9h7rkdL5tZ7Dv3LTXzIuaOj4I3cyOG741HgtSaJxE2Bg2H6Iwr11OPApgplvhHNwI5OhRc' - b'6DUqBqpP4tWKjjryJRmXc3Rve14CPIjWyvw7XtQwwVHJ2rGSpSxFQXpPpf3Ur6Ch+Prucn' - b'2uqHH46PCMg8cncpYWDidyWguMTuTQmc5V9EvRCXVNRxnCaK2hK/Q+85lOFZGlmtgoIrRO' - b'B4zbuoOvmrnD4xYOMLrmH/kZ6X4oUH2mpcKgAR32xS0MsNlHJ5RJ6+RrOko+ctPZ7VIX4W' - b'c6U0RWKiLPFBFEd8A4+Q6+Sr7D4+QTPAzP24s3VMoomNvQ9zrzzEAPmnjhQgAUsG+xnWdq' - b'mHL4SLMysoJd/ZS0fop+ZuhvA482ObPLgpA7lclqOpxPL7x5ydxdwYIxN1fw0NRW5g3oPH' - b'VbQHHJPSjsIqNjtKT7Xl1klcN3dLC2UHRUfOgMoseFsuUyQlxmQeivXE9EOG8vW+508mpC' - b'+62tuzw/2ojxDkWpzz2gdspKh/EdrYzHXXrq07OkFxOgJb+VlrRK1KWEdZVoe42MpFucga' - b'C9vB+FcMOAVid9bHDTJvpdlKJMem3lAmH86qExRnIB5Vm9CpzH/tgFRpOoBUea3GJW0PmF' - b'x3yluWQLZx5xkCsqUIwpmsnNY5oSlhFqjorlPC8zRs2sZ7WC6hlxuO1/vuzMoRERo4rdHL' - b'm3EuTINdfkiCypRikzzxmjwp9CypcR/8+Hbse5ogQ9i/iP3GHFbNL7xqxVczHgHh54c4j4' - b'Lm/yJfIR+yhiZVFxbddfg8BZxIH+HbIhysieBxj9syMsgKiwduiOjkHO+oon8cUsFFmILy' - b'oU9kvCiRLGYf+B9uHCnsXsc8gSdJaaNYQqkEU18bDehyyJ0u0WnHOaSWiYx+9CgqNoMPI+' - b'SI2Z5jHrBVolaoRENovZJ24hBFHicJXpFVId5eSpe+A5JhFoFjN3jyJPlIzT8NB35zeJLx' - b'LW9nN8kjNGu6jSRfXgdB4enoWVxqzLJkQUVcjTJbTMOC72o191+1po9itXVKRAY9YwbIQT' - b'Nbpv3XFgolRtM1Um9G0q01ljAkNVGVaYkNuqxiAtAVeJMbKGoJSwFDUwjKzWFIQSKovDVS' - b'C9bVOmMG2KyjJRlpLI7KsnmKCiRvfZshw7jo9jpdTjI6XUwWOltLJwUEodMFJKgYp9I7JC' - b'2zeSpcwlQeqVYeR0ZNSJeq4HS7QJPdCxt5Hs5LeOyNIhJtJXhpkowSuzOmRnP35Wj+345r' - b'27E417E5II1DYkYPxOC2y0Q73+PU1uqujQ5ftgzAI/5ua5bIkc3V3ewgEL0GIgx6Hg+l3E' - b'PDH3dQ7Hm3d1FoY9euIKVS/Sw5EBB/RB3vwPXfbB7IHxfH+KJnXQL7WVkEIdDQrU/cBDBD' - b'zFkQbsHNP2CppCaC7Jw8EkAIo+ome0e35ZRhHPfbgVlUF89Rez8BYWkGLAvqTrr7zPqQu3' - b'OfX6ofgCIonhHJviYE2iZuZLve+4mEeIt45i9wDYbNhR+7X+xHYKAYrSjApw1JWVJX9l4p' - b'U7TNecMRaZeCHBp9N2rfd8IalsJRi+0mTRNXklQEU7U7A+UkDYvRPJjI8svtgjRzccwsFF' - b'q8CoL7eeS1slV20p15heQAb+bdufT5H5RuFBOaymmFXyO1XzefJ7dHdKClrt4i1A+i07fu' - b'sdO0uHDTvQ2tZ6kvzu9fUVv0Vfn1lCFqDQGf+OJno6df5MA3L5d3cMQ8qnWCXxBlYNutuH' - b'tdmFoUdXArYGvLoTcGXg8bo4pFQLTTNGsB2dSWuS36NdziVpn0GG0DnkgJBFBOKrWxAgWk' - b'3Oo/6/Rz0MCkYaBDJIzyKzhNeEolfByLA+bZ/7yPIyJRwkLEC6ATQnS3fjc9A3nyFsDMOm' - b'igE82mcXnpUtABpgZIbVJDcssAw4MlBjpMogyzi5slcz6HjvdkEwvttwCUjneGHokOGkda' - b'/BcMfmwVNguhdpFB0NQCUYLy+m15vbz/i+RlRzoG/dcDnsoQfsZbSqUmG8cNXqJaxj1dPA' - b'Iif4qYVxOq2hU8TcGbjH4dirDp55cdr2mzUm/EMop4mGUcF69kz2CunYzag3XTHvwjVZlF' - b'PvoxST5GrrxBTH9Q76KmGwLAYMtztjjnR8jnKWYX33kiI0o2e92N0mz9EFXjPSzmqD32K1' - b'gYnvc+h2UGSxkQbZSnGEGvIcm1dOCai9SZRiZJqh6Sg5kCK+8BM5cGWQvEJ1Ys057NaHDR' - b'OaQoF7jnqXkrQeKQoCvmEarq78Dgi13wBqH7E19Ggj0Tq62kmsDDzuIimhthmlq2AFMTOU' - b'toIggor7fL38WwtnpGsLY6xtzz0j6NuNh0YaN50Oz1u5uhHTWQMMcqtUYYHL2p8pmeQWeQ' - b'2epkT2Fzl1wtjsNVMzpgv647O+uYoZqcw8UDsiZR61OFJzNR3VHuRpfxzGG9WFQfddd9YH' - b'JFnEgAMNmXt0Gs/j/C5bzxhllcfH7icOl8zm6GGQUQDe4akfTsExcjMertF565VtDPrP6m' - b'QrCn18xxNSFg2IyP3rO55QrpENR05aPa8A4ZBkKdHUkKEF54qOygAVaECXE/IV2TSgw1cp' - b'qhkYk3s685KA48Y9U466vSJnOPhDxxwqZSwv+R0SgIhOehLHruIc5CflF4yhzDzrBeMpmH' - b'p5eK7pKDXI3a8SZgPqNVBtwmMm5SLZaSuGDKSzB4SWsBPDBeJa77R0mCeRfjat4m09eJPT' - b'IuHhgKvnT1YLj3/vnZNVfe1ivPfWrqrI0Y1XT1bzaxfXwcy8o2tW41nfe/kEffmVi+tgbD' - b'7IYDkleb8x+kTjvsUwZmYQljsfuDKfQdeKgKBtOTjoVh7wV7Is7L0rAZQbchzrztyMM+ar' - b'AG+6GvPJGil9LbHrYWaxMEVzpf6tiN7Q3BcLE/jzrZBMhhlptuOsX65YL8f6fjuxYHdDsG' - b'Vde+ZVRAvPuTW1WK7uEPL0zkwnnLtb46tyx5iOT2I7X7RIvd3mnyF3UFuN1RRi1UoQSK/0' - b'5MhcpfSQI0pPY4n4lHG+BBqrQvBk7VWhCu60vaqjxWsVSLGsy1Eo3aO9clpf9jY38PiYO5' - b'JL67EJDwXxS8zGpoEcjt6gLcuWc4NHNmrW59hALXNo8AuV3UDaOs1CsovFWM3xIYyQvDTR' - b'XaCAGKK9QzpAtqH3tS877+Ij4CwermWxfsbjHgC+Xo+RaBe60ZyE7kcJ6NER5aacI7rd1w' - b'FKb/+gTPLTgHo7ewXdWFFo8xts7xU8axbr1jEyzC+jU4dTJDGMrEukZ3jYcqvJ7dSCPTxR' - b'gbcXimWVpw+DMeNbKFpsNDPeqetwc/VYhuox7MJlnxk6zYF7rJMUw6q/QMfsRZmrdVbttE' - b'3ie3UyT/OIEeKAE5Tc8A35YM65oD7JaAwh3QML6RT+/NXlPFm706tBiOMsl3Qgl/1TTBlq' - b'01XJsPLEBTMJyK1yyZLvFgtYf4ZMzxMeuENF3Os7WtrEL3hSB7Df+p7n1GFuF3jqyGBlun' - b'RIdPVuTtAtHDBUfwkMY9N3wFg6XAFDmkq9Ots4nwoW3yNlcLUFTr/cskOn8UrjPNN/MKdX' - b'Nab2Me8oB8LBnGqm1zsaDYZb550Xpq/vnuNYUHQe1eHXjYV9yLUlx2HWc+LQfrh+oPGpwv' - b'1rGyyV/rzuMQnRTmcB9rFVBsJQG4u6CnAka+tw733m6Ctpl4aBrirO6CzAUR6nDvfhzh19' - b'lbMTMt7W+0HyqwSiDRlaRUeGDEyTPYFIKQ6nN22jwXz4Q60dNQzmePKu0fO7WU+oYAwvrB' - b'SgyPUYivDC3VhLlFEYN1ENRtMRVD9tFjdNDe07bKj4e70aCZ13f7UaiXZ+Q6FoW+t3rJ1M' - b'HXqtgSzTwBo/SsKqOZojovfb63WMmt77b7HlGLJSr220qaJ1CbF22NOM9LEPOqkig0ZqwK' - b'AektSjZsU0cikoFFjhkOfuEWNLwMsIj3sRz4tRhOSs0iokRs/MkQQz0qlrgaKdgsLwzajV' - b'oI5wKe9q+SJz+GjxwsHjyfQ0iRcEWXsIvKCK62lzNfF4NMV23uMlQOgrBo0CwPRxHxnAkd' - b'YtT9NRuTLmg7mB2iQCn9pcynF9A6FxhgHcTUWVpdwV1hg8SdLoE17xfezvI0tDdh0AA40u' - b'iqP8rnuS2S6zQi0QIL5xi0QskX6Can61QDBDevUCQZ2RVgsEKAi9IsAmenNFgMPFEORZQp' - b'5hL7oPQ6FGE4SrIkRJjfYp2of5DiwMMiEEqIR7rYEgIcF0DMSFtRM19ZL6D9XRIRWXh23Q' - b'g6HLEXDHNkpk/+UxuEZnd/Fr2I0hAg+ZqtccapSKXnNoNR3lF7LkosqPArob0CcT1peLOs' - b'FK6Q7KQp1FSyBu0ARPToE09sRzDZiLBkqTUGCP6BXttd18IM1A3Pt78RgzUOU180utkKBw' - b'L2qJBFnydd89hfzFFHevnCM1rzEfwSv/y4SqGdrrQWttNUlM2cwBooNfbZlO8e1VLTrRqp' - b'alg6pFWp/2mCeH6ByHpqNhtgBDnr9krDMAodDTRN/kMmlA2lYGBXOSHPzEE2PNIUw8MciH' - b'c63LpSXiiSc0skM88aSnaFgtDC0ekDPRbYkINroeUdNRCiFa9wr1/w+rTtuH0A+q0kOU6A' - b'TsjLRfWjeEXlp3QFhaJ4Aey+toLEK9TZwn5hYae4SJo8VhPJus4ITGIlcLtSuHj8YAB8fv' - b'EuSFR+MwUgvHJtN5adEATC0wHoXK2uORBC7Q2GllwXP/3F3OAWZUutyQ29EFipqOyo0ezX' - b'qJ1p+Z/Q71GiUKntO/Cc998SucGbe0ml2tDBCOXNeKvnWJV2b4fgJmfeuj6x4JR9ctEh9d' - b'nzksHF23yK2j61YifXTduo3WPCykD6hbRA6oLywpZ8YnnvYH1K17OaBuY9UH1K2D+L6yTD' - b'A5oF4GSCKbW8ztlCAgsxoCkeLVEDjTW2B5IKPBA6ULXcDMPqgXcCkMvadeIWGPFY3+4KsR' - b'BfFEnW1O2nerhtD9qgNCx0oguEdU0WWZiCq6LFPTUWWmxwOGr/UzzcRVD8prWP0NDTlJ34' - b'+wlIdB7aiWydUDg21rwaftBUKK02au0NEZ/ZVh3TqGUt2ZsyRkX/MMfGsZdpkF1tUMpDG8' - b'8XSmduiNwIrAugqsNbzrRxahmGDU57MA6/5ApWbCRJzVlWwzRfPVJY/4dUAWw1mpSCtFHw' - b'ZZL8TkIcL90VcTWL8xj/nZAJknZ69itZ7QQZkoeX3wbtcZU7DSAEdeO2kujK2Ni9Pl3t6p' - b'Vk8tidERKiSB1AJs1NYF8+5VT6kQpOiXkFEpOfCrGzvS619vXYF1ofKHTI2uD0WeRteHaj' - b'qq6RUZZ72DtLCIX8J0pF7zFChsHxHa37PHejKHE3JFR4cRNEMeIlkl9mIPax3lFFrMMRVq' - b'3k0UVmFZAxf8kG/mDh5otPiQee1UkcHsxIDhch2QSh1EqEr5Q2t403pGS9rrGYbQeoYDgp' - b'7RJgN1x1Uy+BMU6DSHsOucLZPhfn082jlT4Qlt7jjz4C3j2QbMIByC1iZcZLrjF1NIEF3D' - b'mqYe0PILeGUFOrviaFNQw3WHOzJ8ix7ZWkIOd6ymGvALlMtUo0qBXM40w9+JuMw1qk1s0R' - b'cN1/emYr6iTSFzCMXr4p3KXqSGlAMmKBGfR4hHGTWvykDqMkDo2oAZ/k2w8Kyun5wn3vqS' - b'B/ftt5uc18ng7YtXyDxdHggjMmlB8vQOMgKNDIxXpI8shXlqPyWHG0srQdvcQpKrS0tH+e' - b'lC9DnZMtjoqJLJPl7EjFF4uLI+hne9wz1Pbm/XI1khp5CdegkQgos9MNTGIb4wk7kcX5hJ' - b'efbeomWCb8zsaNY6s58pH+Yt7bfet08tZOxb5SrIqrLocUAfoq0vG4ufoebqmlUtHe7MYq' - b'FaDHtVnkvK09vEcJbpCHG+AKKVIriwSnKaRO+IG1KpyBXpoCFPAnnrbqc52V4/Nl5RKzpo' - b'bOgbzIMqU2L2Ni9e5tWQfOx5YzbvW1+Q1Ap1ZYGgTxsgVqdTC+14UR+GqSFWrQ33lmZtUq' - b'IVa+My0qsNcutGKJMKrW8bl6JuG3a4Dqp2pFe2jWN36pEym1SL7m3kCjadk2ZGwKvPqSX6' - b'Iy+jZA0Vw2v215aQOt0uCakhg+6vTPvpz91tCsFFQ0BRAhWrcGiWNO2iAXmeoVEdN49GXz' - b'OViI6Pm/369HDZWaQhct5SIKPgpKhv+n7PNHP01WgAj/5h81XtvuUCKoYyNveeOUz3BmMs' - b'WsRFgq0xRRRsWFBboQj0mQboQ4PoQ4X79r0E+w0DqIPybFyRWTdKzT3mwXXPVqh4t3KexE' - b'9+TAoBwn7lLGD3u9f11zeCCwE90hjk9DAcO7v3N9w6lNEo2Oe/xvQ43CQvfLZskrys1/uX' - b'oDzWBuFZrmATlcGxnmPNQfpetcC3nz4Rf+rMzZ9ZigGBlLnyAoP7SzQPMy7VNIy0XsxOQf' - b'dva0wH/CZUxuD0+jaduLPAxkh/9DTNlOzhYRvZQS+YuNFCPMNFxOxOWNHLRKvtTN2xO7gL' - b'ajD+Chkf3V/mbWCZ94XRWAWwbxgvAqD7KeUuUnxVXKL3zhSmFHwVhH0BuQmAvnjZpcbfrZ' - b'PNFD1Oz0rx7IPJtULsWZVKITpJrcKjNOkIJVFzDapU6VDse8ulQnS6DM6Z5qZ/NPO/DMCp' - b'Cyf2Tbmfolt1KUpYkCfl7l+p7GeaamKjiGytiLBF6YDxqXgHX52Kd3h8Kp7gN+UKutmLXp' - b'9FQoPCjBLSC6rQhuzNoaj50Qk4uAuXcUynQoVJDrHuW9ilyVF/rN3b2GUORjAzZhHFhxzm' - b'ib6wlOGOzlUYKceLE01RGzS0fxPO6FJB1v7ozgs6unnB25yRxMcHKOnRPVDMVm2JoHXMPR' - b'TVV3EoRkTGHRUBBNO6b612zxxmhwKqhtxZtFg0aqUO1KfxvcNIBh+LtJfMA2rPqDbYCTUF' - b'kphZrzNINY4x8G/6B75NisYxN4milcDJ2O9gYAJw4r3XGe/OflFL50ht9EZQQ9r39obQnb' - b'oDQq9OwLw5XPLD6NNF4s5FXO2zzoUz2mkVxnjte5GMz1hg9HbQaEXbOPUn0qqa1OEsdhe5' - b'iSI+4mEktTbgc/P5El4qxlzdABeZnKeMYDiteX++N8eASvpiUs9fyHSV4tzho/Q6OF7/r0' - b'qPxnlQWHhkwV1lSbyFPHXAKFucbzMgjkKYKpaEosDRPkDlgjoz+8+hRDAvsvjIOROpGzxD' - b'1m2b9KhAmAOvR93YEAj3odEUG/OljQ9XBgnb2IWh7c73hCc6DGk3tUtHqFZnA5Rmn1lSjU' - b'6oMtoD5o8vymYONSy6ngX1cuAhzcNTD83sT6pI/rIkSqp5HLSFt4h5ZuQTZhszLy/CYXQ6' - b'N0m/iAFfisTpJ6ehvAf60R6OZ+WVuQPch5VLphyasbnkz8wfUgqiHrKbWSpY/vFS6ZfjsL' - b'k8mOXaFYnfeXz1q7lFxTC5+N9t/G7BgtBLtzOWgjQkNeQxLJdmgoQF0txgmIPYY7F5pWg7' - b'aUE2nEyLrPmhpwQpgV3/nWcOUT/U6ipyJrrNBfFEd7eAVmuEqMhqjXCe/EGtO03+kKM0Nb' - b'/3ygCGgDp9l5EcGVmXxK4MjSui46N0DM1f1ea/00lErSPqQVNZFVEzTeW5pjidClRQaTwy' - b'1os8/gfPlX0H/l/9XGlUETfWq4T1PT/Xzo+Hjtc6KI1xlfyhl0xRhqKLtZPkD2eCNMdn1D' - b'HA3cBTlRjd8REUMUUGNcWA0X2AbWVfe43woGKNuP5+O4unMT7yZbkBM6S7Gsu6mAo08moZ' - b'7rCBhWYCjdwaRpyaSqCRW8OQ+mqxOmAj15bj33y1WBOwkWvDifOnFGjk1jLc9f8Wmgg0cm' - b'sY/p1XCxUCjdyCIZ3qInG10Ru5IKN8Wiis+U5rTWWFpvJUU6H2emTcejx+1Qg8I24ERHmR' - b'j7E2xiTCU9IzpRoL74G0gronQJpVhPjnPRQs2zTBb7RwF1x6z0YeZwuE4T8T6n59Mq+wto' - b'K4W2PThSDRQB+8mlGLw2EbQzKQ5XxJ3bP8zbMe8tHUgVQjYNpY+BbkA5op+mBNdQxgLrr1' - b'6ZorjEtBWaWBKGVVwvVGqILH6Nz/ArTavZuA9NsbRSKbPjnxjdvwRKyOsCsZxt3IDK4dYc' - b'oQbkVWIJcJp2asYqtETdIcrfcNJ0l8NwdpbaI2A61N1DQdWRkgK9ZmQxBjo1nCVIu/KXjO' - b'SvSayRj3J7tTQuNOcx8ElYsy0W8spSD9rhamqcdgK4X5bnhLoUVcsVUU2WpHCYPKMZrTzw' - b'zt92GKJpByJqdAfnaYQ/L5J6PQQd9qCKGwgsJUChIUJsTdPfGBHTtPZRE6mpsALOg6IGZL' - b'YFVi0n1UKwB5asmgk08IjA4eM2BdbgvSb52x49UH5fL0btWucvxTt3fm3NwxMlVeKDoqXw' - b'plTrcZiU/b8bBq0Xhcre3IGTNCfz1my8hR27EzZoz8OXYALe0H19qOoYKNfDuOH15rO4oK' - b'NnJtOXGyqoCNXFtOGGJrO5AGcOTesWSQre1QGsCRe8uKM6sM2Mi14/iBtrbjqWAj15YjQ2' - b'1tR1TBRq7JsZ2tXezPeIsdoF6pdJUFaBS7VuVlcXWoyRxeOvIFHW9o3gZSXUNfoQfTCyaY' - b'eB3DoXkSA6cfKT9sOEv7GYyhGw3ou0AKMkbXUJiAzv0Dfbi5LATDfHt3tdiQOny02ODg8b' - b'JCbuHRTawTi46Pi881HBsNzhxL3DogNpJnf0X0yjxx4fFo1cIJN178gU5g8WjlI18oNA7d' - b'xRofZ19acLyOkbt8HZs/urQj5cd+ZIVZMiiurJuh2uyZ2bXs0THJmYOPvXfJgVCvjtSMRX' - b'eEmo46QjTXnlZ0PEvJL23ZXxjE7UVZNv06y1UTZ0C0RjeLOFr0RcQJa57ZMheO223ImjaG' - b'9Lm1WczSAWVkxbYCKQM/RydfMMs6aqPBAqlx5wzYqBZChYaGHIjmaYgoOj+A0ovOC2g6yn' - b'NUI4giJwQgnOj48KOVreWCtNewUhL6Cg1y9bVEqaFH9xIxyOsTopOA+u16BekteAXf2kKc' - b'3mD7rcRbPL2lCL7edoX4Z3/KdoZoQ9bPPKH7N/iOzh8gW6PzB5qO8h+hIRij+yjNLbNonL' - b'xVTrTnq90l+2Y53InIrw93NskoTycB0TfuBfRWjubJdzP0BkvnZ55wqbLCj1bY6+QkCnvj' - b'vrXOWBYAN0GnMqSrcvS7iZWzZk5svJbUMOTNaC2pWQDU+nlt6KCfk9Z3dDBqfQmHpiOrHs' - b'YGfRn/b4cLYnzbdq9rA+3DyX4Kuu+ejZaTuu+wnBIjQfXzeNAOiGBK5Btsnlna22RMHb/f' - b'8/+dXCmC6h/wS3hmLbfw3gfnaE9ODCmBW7Lv9enM0mHeS2Fp7cRB3oUVRc592hRcuk57qT' - b'3oPVUO0I485t1YUWRfxIUh9Cw56VkPSD/rKVP3HVVFBK+mQitQ29c1LVNm9lNf3OmgG2Zz' - b'y8ay/PO6qAhhSpVZQu6Yg5Z1iuZYGcWMpEoN7YcK6DpCRs7grUP13u30SIUm0D0Mdt8sd9' - b'+jx9nmib+bccL9tFPXqaetckOPmmBmwKs2aN2OGyHK3j9iUdrPNNfEoyKyB0WEebYDxgtE' - b'Dr5aH3K43j3PkhuPVtBdtBu8JKD6A5RjdK2WpqP+oAVj3z8MO7v41AQyrD4pMFosUrhsmU' - b'4N9nXoURs5TjgBZosbeDS2oMp2+m7NLEtGpjEspK/mgnU2MH6GTWUHqHF6aZFggFdq4NYZ' - b'lYl14Ed1F4B6QLO1iB7jlx4KhnYOik3tKg8G+zoH3bKwc6JqQw/nOsp/h2lzOgeJQd3c0W' - b'JS1wrgjeqcFzGjc5HrHTjnJD7EMgmgnGKZKkyOsdQOdIZ4COzxLHflQ3E7baNVs4qAGoVL' - b'0vrCtpoAbwSSa/NSh+jnkVaLMoLDnXqrBUvScPSzSPAw0bC+hK9wTyJZtr60D74yDUfRrB' - b'K538I64ikMo6TlltzZFUlef2Fo9kCXvXJvlQmTBVodcEDQBwyww1R+px4RMbHoUQRj2/Yh' - b'zkx0vduo25xaYNRvlha96jgri497ThaRvtKOgvDYoD0yaL+dmB4x6xLNxH5CVE1pIss00S' - b'kidI8OGPe6Dr7qdR0ed7EEo6xiH7rlzceSKlbd3pxvmJmvoCJpOihIGjVfwxlwtriGxU/M' - b'FC/LKzT4cLwh1INFaqCgl1lBlAhzDYSgHCzOGkUHV0StvlCj1vZP5jFRqtT8pCnKwsGmTi' - b'l6dzmsz91ooYU8PZKhhukJeaPpaCRDTvW7i3o7ZmmB6MCzAfe9tc+hijHKKcY+nK6WdKYW' - b'Hq3oWHRkPdI6MF7lKZNblh/zJDb6KAwdHyilxt6zz48WZmx4o/tLl8ktcxEmkqc82Ef0f4' - b'YhyZBqwDTuwnBZBPKWvfqKbD9UGq96WHRAGBQNEA+JpYXCgGiAW8OhEUUPhsZlNBQaRA+E' - b'BpBhcGYoGQSXjvRDoHEsA6CJTg9/hh0/MbwS6HLkfsDbBuPwHvU7NnefeWcyQuaCyPhYGc' - b'iNjojL2XBnK/sZ7TQRs4c3K/epFekZ6oq+bhz1K1p4QeTcDT6pVrIwWDwec0d19O4eyi+6' - b'E5KudKvUdNQqIeWw6zcXI6uxtV6/OQW/9ixjzh7zkCdcdBKTZGQk2l+4GIt+T35WNmlIhX' - b'UhJNudC80m9lPXPAduzE6w+4yeWVOYPLM2TU6y1IQWbnRSPVlpHPbwwAswpp7a89zs0lF+' - b'08vcyw394mHL1w4x2M9nzkV4HslzfEjPTzQSXHnKhNsK9bB+6eGJUXtwd6BxVOqpgf6XmS' - b'P3JjTvFDWGzMKTJvCFp5zs3E70oYXzCddJKZ2bcIHRYLYDzWqjd1RpR3ZJ1rqiB++odo68' - b'+bHHvZymbF5RQ8zcw5Ueb7Q4HYN1GMolWtKpSHu1yhBarTIAn6TQPTqHbaLxkjPXCYjGj1' - b'XUE4uO1+0zC8c9e+mCGNkP5haNR4bSgqO+nU1IrwMiGnsqgs+RMyccFd1BhlI0ZziuG2Tp' - b'ODfaI0RVFmH2Wx38recOCwdz2UmHQ7YcxS4PW6rVNEwjpbsTZHH0pqymo+5kmcSvhxYUht' - b'q9tURLkbgLLyPh0B4ZrHlKC90IqsRGHQg2ZUsE8zZcXtfRvU6LhLbNUAr04dw5yYdneyQj' - b'c5Q1VeB7UHJqNyNH2/JaOpjyklbbvhXJ0fvcGbGr17nz5BytCa5IjzTzBUPvmaYoRcvkHC' - b'0frhQdnUmegHF+7bqdvuf8vOZBZxP0V6qXc34Y5ZRab6C2IzJoxgYM+ilIe1kn5s1nbZUP' - b'hiyDFfjG6Mu3DdBXnMPqV4mMeNDPW6IqGiBe30eVNOjYQp7F+3D1OGTDPLLw1Wl7eDEXjy' - b'bnsFiWWyK+q6VKgUZWCZRVnX+CLnCOVsYaQ8sCGmTQBw6mqAjdrccG5nSoLimfkxw941AS' - b'u3Hp6zzzjPHFAZMFOVcPP1QGDQfcTcC3bjjAAOI5V0E3ZO35cO9ZvSs8U+hI/KlhxbV7Vl' - b'vwRtRT4VxF3ZJ1fRtChaKJ7sUpFR01CjrcdS9bngvNeGZNSK9TmDh2PSft3WbQd7BNPOOP' - b'jksHgcGkK4XTkLeUY8MQRXdpKFEtKUpY2aFTqpZ8KO1sXx1lhp3DhXOKDBfOGTBcOGfIk6' - b'6GDZpi97UPM+pZY4Fo6kUwOuJQkPa9oiF0t+iA0C8aIPQ7+cTQI/uXBUEuNT1jpBndwViP' - b'eNFFjJVm+tX+KLSrKxlRH3QvkzWGHlXTuQGv2ox1O66+jA99Qfdnfzqb+zdyCzzyMGLGd+' - b'VA2ieCavtpTnqk9ntkxE/U7KxfzWZnwhlNaIUxnr42yXiX3uSNgUYzU+P0GM+WFoLJPGgS' - b'IKmtTB60SqOvhLs2UybEHQ9Z8vPFnCYRdkaMVmOTVZtYb+r8SOUgASYWGMKBktoi6ogJS9' - b'Ye2tF302eCnsx7cpzrhens4gY3TDENGyXDeXhuP4NXB6i5+MwiIQczDdyaj7vw/YzcBaAW' - b'r50DPUufeSjM0x0Uz9RzD4a5uoNudUhOVD1fd66jGbvDbh0SLy1LT+eda+nnnJMwpZ8L4C' - b'f1zotb7TNHUdoY4t2aJ7NB7RjSU7o06MPkLjg/Tyeprr9E1Y3u5kKdje7m0nQ0dhgGmtFV' - b'I514xqiNenzcRLNkPDmoHDJqoHQoz7yFR7Wcoj+xkLNdyR01RORmuNzvnJPSeeARERajXV' - b'azUDSDmFrQz+Yciozv9506PEShedIxDBulQ+LBxKAv0YtmlERd/eBOlFDm6FrxCsqtNmAp' - b'QUerJJBUvwfNNhFdVYX+IrqqStNR2TIgxIPs//NMc9qnrbUca4uIIXdGs0FaXLktPRac1R' - b'7a9xsHVQZ67M29Ms3SUGbZjxNVEnw8GB2o8WrutbDShd01hkAzRn+/8ATZwmlgj45m22GC' - b'fUSf0Jkb5GiePf0uV7YCl991ok8Uz266sqZMOR+I/i5bImq/70bHhC4CqrWMGwjZHWv3o0' - b'uTnGWRB6mn/ZA1803ZqXnSW+zOFeRNdhGC3Efo18SR5cd+/bRBsHziwRC7R16aPrXEkTtA' - b'zdwSPMRPa1jagPLZWr4013NO5D7DRCoCwlTKwWEyRSCaNBjAGHZSceNnmmlCc7J7RYRVdA' - b'eMN1gcfLXB4vB4g4XgNrrIDrmnVzPQcvUEe7Yi7W/BMIS+lccB4coOAvoE9czQ8RyQ88vr' - b'KU3DJn41u2jYEcQa7MQAXoW1lNZhPRKUWCLeOKtG5NHNYKgP0c1gmo46FlSPy/g2D47Sl/' - b'F1HosrMDoZjSx67XZflZ7ROEQGWu8kaGm5Q2SwNH4O57ewNZw7RDSGIp9OHSYaYOUBCZkB' - b'8WauPONH0D8MqbSjmnSQOQ3kLc3IhOr1IuN1dLNO4bDvIboPmZCjdajaAkGDMkCsP2UWCt' - b'qTAW7pTiYpWnMyLiO9ySC3tCYjtNaZjEspSMMO+tLMkV5bMo6lSI0c8m5OY7JQK0PGtVeF' - b'HNEfN0bRnCa8RhnxXeR2tXlyMes5GaK9KLM/UuqylxqkuxqtXCYXubwMIYaFFUeEy8saDc' - b'hKS5VEz4HmyWWzDt1HkYIOt41VlpSzIZDd2yFCRH3b2CKQ3jMmxIJJ9HnAJBlzhQXRVmmA' - b'nQDpUkUjdxItS4DqpjAIKTeUQUptJmnI8C4xSH3tD8LR14lBd7i4C8qaif30V860M0uraC' - b'muvqCsbSwdhbi0mFxQtgIdX1DGHNeQzhDk3ZUdMmTUtxSVye3lYXjVt1Ogz7+EO8yQqZKZ' - b'6Ogu148YrzyoluQq43J08xOkj1RGlAVX4PytQcVK0eYS7QlTIJD2m2u3uqvJFe4vJ6Jb9x' - b'TxnJ/s7cyy9QQlJxdaMRt8u2eRvsgLPCTQiqMtbzQonsg2158tCk/ox4ebMeh1SBO44fgL' - b'HzAPc4jcn4bK8DI2xPeYO0kBEaL8ZQKsdT0v37+Mn8qGwnc1/E2L5Gr0m4+xaPBD3UAPtz' - b'ZW8GrldBXgq1czG5S7f5KY/qP7rCoPSCeA6HVvh6yRboXfusVaOjRZ0le1LgN4y+45wr3F' - b'cwRqW2cwbgWSJtdhaEwHkSZf2cWXyVfZSyvwrbfSLB0MlEjrW4or0NwsWJIRtgdyRZbFCA' - b'hLkgYMS5KWNKe4oAE3QgWt2GDaz2pC5G0IL7uhZ/sahhkEqXo9qEHRS88YW78q3XI+JTlS' - b'LRtiV5rlguhYsVwC1JkzA23ejeDuiu8TzAg6qRYCcBKrngabLCOOPo8yizjhjaI4LAfWAK' - b'Pbb9vkq5/LIE16WWMFt2iC+uEkNHcL+TrkaV1/iJ3WR31XPObpDvNNRADdTgBGHS+qoJ6r' - b'VxDImJjefGe8HTN1UjxTG602yf9isEoPOoB58lU6XVQlP/hVSGxQ+ZHjeiyeoeLogW01TV' - b'5ZyFXy6rsVJPl1re4snYHUhzdWoPXhDU1H8i7IkGBqUOM+tG49qAMkeFZ2uAWF+2ou1uME' - b'ncF+fbs9hCE169ewU8g4R89ImtBfw0uUYTV9GjNib3WZvKpnhpbJa2i5pSXETB3d8Ksaz2' - b'uSaosN85BX1dKhO73q3axZChq+OSbwFuo0RSqixkoHIV+Rnk7dmwrJvKZUwyFNFvTFkAaQ' - b'Rwox0CrAzWWAL2cOh07VHeOFmEn7HZ4qB2i/1278Cstk9T2mDmFqHaHb2huT/GJRRYi7NJ' - b'zn4LjlZSqRclw7x8PrwV+kY5yEk3g8kn7lRrOXls2kfS+IRX7tRrNTz+b94ryja7SmVX6H' - b'L4tRLs2G/m46Zjccab4LxPjzb+PxRl2H9jTYCAZcFhVnLgmnMw0Yy4mTWG0/lr48/7fFu/' - b'r7TiStLhnQF7+X0GLsQjNRFHpBfDYBrVuNoaWZQOaoW0ce6SXXWQZa+9Z0pNQhQwbzMMmM' - b'H5HdC1noSf1GUIY4pL9GeEbfTLmF/KrPysFV6L1RB98OZqK0Sjj3xHDzpxqB82Xypza3zp' - b'JgT4lZ1p+6F4LTqBdqkj+jEx3QCf7kBUpNm0SWjui4xawRmfynkrXNEz4EBD30bb3ehA57' - b'2ib6tnRouG8yM18mcnF6Rlz1ZFkSXaNuvOmlLNJ68JiC1uOGpqOByDAkmhTUfs3h1e+6Ut' - b'yroSn3oI7iCozqwgJcrdqXcB7Ko7ZEGCaq5E3P9JG8qIAsLdPgInlTCuB0TtLcCB+GsGUW' - b'wFg3ZF6Od4pXxvWtkbCMGaORcB5zxzvNqFgRf7TlDIXk7Xp7GlPwt6vdaegmb7eNKzD+vn' - b'3HuALV9e2WccXMBGa3LIezXTcJGYc6oSoi029MU5nncZsmokZbQ16dDq8ZwHG9RRN4Q9sM' - b'JhbzCI8fxjI8fXHZlBl5vLmCgwYHKDYETAUbH7VnVXasGGcFOPdhijKDDF55YIm4bYpmaj' - b'/9agumUm+91oGRC1rwgvxgdIhY+sMb+mmMFWzD8eYYhYi6G6RtMA9mm48wT1NkmJYZMEzL' - b'DBlNsTKH6PsyVk0KMaID4ag0QxC5Zji62deKjnqWkgypDSiwqzuvoe29XV163V6BUT+C/s' - b'g8VmLPJ6AgBt1PGmFVh2ZieJNttIxJfgtv72KWJkvgLMmX4alDIe9ZAryXaR5D+oJRlCtt' - b'4uZIpR+skDN6sIIoftrBShkGLiQhOvGNIC4qg9EJRAfAS0VHGVyQIVVpAup03z/pPrZxWD' - b'+c+8c+ejQDQxp4u/4MPUTDVYBv+ZqRPS7GwoNa7CswKkbGrroVdowX3XuwJ9Xj5HJF2i8Y' - b'r5JvHFvnyTd9WA36xjdZRCbPO2/wrS8cIK2MOmuSI6NOBnVt1FkZNBh1Gldjo04G16szXJ' - b'mhR0e4JgC1jSdD+qN7xIRbHVhFCRs0visQvfW39fEPtSnPGN/M2adlaT9D1xABoXNwcOge' - b'AGhtCSn1S+VVi28ZqWeWcCM1an0KwBp+8tO+sV4tzJcYVjraj9ezPPkWLeAgtpuWk2hS37' - b'pbJ6NRAaITtgg/OmFL+mh2rybmK2z/WFrtX5UG8FtSltJ7Sh4Jm0oWiXeVbLB6s8gi0W6R' - b'hfSukEXUzo8F9HkXi/jtHUuZZvT7wLfOqAusAngYDg7PJpNFwK0MwFD3ndEakhGdR0ShbD' - b'vdnOYEzKK/vko+I6oLj+HcLr3KcG4U3zL5Fh0rQwWOjpWRPgzqPnBUQW0lwoYRDYwQNToR' - b'A/fRiRjQ0s/D79gsABOib2GDDQmK7OEReGQPP0/+7a59v0z+H+SUGTTsMAEA' - )).decode().splitlines() - - def ConversionHeader(i: str, filename: OptStr ="unknown"): t = i.lower() import textwrap @@ -20017,34 +23707,6 @@ def ConversionTrailer(i: str): return r -def adobe_glyph_names() -> tuple: - ''' - Adobe Glyph List function - ''' - if _adobe_unicodes == {}: - for line in _get_glyph_text(): - if line.startswith("#"): - continue - gname, unc = line.split(";") - c = int("0x" + unc[:4], base=16) - _adobe_unicodes[gname] = c - return tuple(_adobe_unicodes.keys()) - - -def adobe_glyph_unicodes() -> tuple: - ''' - Adobe Glyph List function - ''' - if _adobe_unicodes == {}: - for line in _get_glyph_text(): - if line.startswith("#"): - continue - gname, unc = line.split(";") - c = int("0x" + unc[:4], base=16) - _adobe_unicodes[gname] = c - return tuple(_adobe_unicodes.values()) - - def annot_preprocess(page: "Page") -> int: """Prepare for annotation insertion on the page. @@ -20246,17 +23908,13 @@ def get_highlight_selection(page, start: point_like =None, stop: point_like =Non def glyph_name_to_unicode(name: str) -> int: - ''' - Adobe Glyph List function - ''' - if _adobe_unicodes == {}: - for line in _get_glyph_text(): - if line.startswith("#"): - continue - gname, unc = line.split(";") - c = int(unc[:4], base=16) - _adobe_unicodes[gname] = c - return _adobe_unicodes.get(name, 65533) + """Convenience function accessing unicodedata.""" + import unicodedata + try: + unc = ord(unicodedata.lookup(name)) + except Exception: + unc = 65533 + return unc def hdist(dir, a, b): @@ -20382,18 +24040,24 @@ def handle_args(): arg = args[0] if isinstance( arg, (list, tuple)) and len( arg) == 2: p1, p2 = arg - return *p1, *p2 + ret = *p1, *p2 + assert len(ret) == 4 + return ret if isinstance( arg, (list, tuple)) and len( arg) == 3: a, b, c = arg a = make_tuple(a) b = make_tuple(b) c = make_tuple(c) ret = *a, *b, *c + assert len(ret) == 4 return ret - arg = make_tuple( arg) - return arg + ret = make_tuple( arg) + assert len(ret) == 4, f'{arg=} {ret=}' + return ret elif len(args) == 2: - return get_xy( args[0]) + get_xy( args[1]) + ret = get_xy( args[0]) + get_xy( args[1]) + assert len(ret) == 4 + return ret elif len(args) == 3: x0, y0 = get_xy( args[0]) if (x0, y0) != (None, None): @@ -20416,13 +24080,15 @@ def handle_args(): def util_make_irect( *args, p0=None, p1=None, x0=None, y0=None, x1=None, y1=None): a, b, c, d = util_make_rect( *args, p0=p0, p1=p1, x0=x0, y0=y0, x1=x1, y1=y1) - def convert(x): - ret = int(x) - return ret - a = convert(a) - b = convert(b) - c = convert(c) - d = convert(d) + def convert(x, ceil): + if ceil: + return int(math.ceil(x)) + else: + return int(math.floor(x)) + a = convert(a, False) + b = convert(b, False) + c = convert(c, True) + d = convert(d, True) return a, b, c, d @@ -20693,9 +24359,6 @@ def page_merge(doc_des, doc_src, page_from, page_to, rotate, links, copy_annots, continue if mupdf.pdf_name_eq( subtype, PDF_NAME('Popup')): continue - if mupdf.pdf_name_eq( subtype, PDF_NAME('Widget')): - mupdf.fz_warn( "skipping widget annotation") - continue if mupdf.pdf_name_eq(subtype, PDF_NAME('Widget')): continue mupdf.pdf_dict_del( o, PDF_NAME('Popup')) @@ -20797,97 +24460,8 @@ def paper_sizes(): "tabloid-extra": (864, 1296), } -if mupdf_version_tuple >= (1, 23, 8): - def pdf_lookup_page_loc(doc, needle): - return mupdf.pdf_lookup_page_loc(doc, needle) - -else: - def pdf_lookup_page_loc_imp(doc, node, skip, parentp, indexp): - assert isinstance(node, mupdf.PdfObj) - assert isinstance(skip, list) and len(skip) == 1 - assert isinstance(indexp, list) and len(indexp) == 1 - assert isinstance(parentp, list) and len(parentp) == 1 and isinstance(parentp[0], mupdf.PdfObj) - # Copy of MuPDF's internal pdf_lookup_page_loc_imp(). - hit = None - stack = [] - try: - while 1: - kids = mupdf.pdf_dict_get(node, PDF_NAME('Kids')) - len_ = mupdf.pdf_array_len( kids) - - if len_ == 0: - raise Exception("malformed page tree") - - # Every node we need to unmark goes into the stack - stack.append(node) - - if mupdf.pdf_mark_obj( node): - raise Exception( "cycle in page tree") - - for i in range(len_): - kid = mupdf.pdf_array_get( kids, i) - type_ = mupdf.pdf_dict_get( kid, PDF_NAME('Type')) - if type_.m_internal: - a = mupdf.pdf_name_eq( type_, PDF_NAME('Pages')) - else: - a = ( - mupdf.pdf_dict_get( kid, PDF_NAME('Kids')).m_internal - and not mupdf.pdf_dict_get( kid, PDF_NAME('MediaBox')).m_internal - ) - if a: - count = mupdf.pdf_dict_get_int( kid, PDF_NAME('Count')) - if (skip[0] < count): - node = kid - break - else: - skip[0] -= count - else: - if type_.m_internal: - a = not mupdf.pdf_name_eq( type_, PDF_NAME('Page')) - else: - a = not mupdf.pdf_dict_get( kid, PDF_NAME('MediaBox')).m_internal - if a: - mupdf.fz_warn( f"non-page object in page tree ({mupdf.pdf_to_name( type_)})") - if skip[0] == 0: - parentp[0] = node - indexp[0] = i - hit = kid - break - else: - skip[0] -= 1 - - # If i < len && hit != NULL the desired page was found in the - # Kids array, done. If i < len && hit == NULL the found page tree - # node contains a Kids array that contains the desired page, loop - # back to top to extract it. When i == len the Kids array has been - # exhausted without finding the desired page, give up. - if not ((hit is None or hit.m_internal is None) and i < len_): - break - finally: - for i in range(len(stack), 0, -1): # (i = stack_len; i > 0; i--) - mupdf.pdf_unmark_obj( stack[i-1]) - - return hit - - def pdf_lookup_page_loc(doc, needle): - ''' - Copy of MuPDF's internal pdf_lookup_page_loc(). - ''' - root = mupdf.pdf_dict_get( mupdf.pdf_trailer( doc), PDF_NAME('Root')) - node = mupdf.pdf_dict_get( root, PDF_NAME('Pages')) - skip = [needle] - - if not node.m_internal: - raise Exception("cannot find page tree") - parentp = [mupdf.PdfObj()] - indexp = [0] - hit = pdf_lookup_page_loc_imp(doc, node, skip, parentp, indexp) - skip = skip[0] - parentp = parentp[0] - indexp = indexp[0] - if not hit.m_internal: - raise Exception("cannot find page %d in page tree" % needle+1) - return hit, parentp, indexp # We don't seem to return skip. +def pdf_lookup_page_loc(doc, needle): + return mupdf.pdf_lookup_page_loc(doc, needle) def pdfobj_string(o, prefix=''): @@ -20992,10 +24566,12 @@ def sRGB_to_rgb(srgb: int) -> tuple: There is **no error checking** for performance reasons! Args: - srgb: (int) RRGGBB (red, green, blue), each color in range(255). + srgb: (int) SSRRGGBB (red, green, blue), each color in range(255). + With MuPDF < 1.26, `s` is always 0. Returns: Tuple (red, green, blue) each item in interval 0 <= item <= 255. """ + srgb &= 0xffffff r = srgb >> 16 g = (srgb - (r << 16)) >> 8 b = srgb - (r << 16) - (g << 8) @@ -21084,19 +24660,15 @@ def strip_outlines(doc, outlines, page_count, page_object_nums, names_list): def unicode_to_glyph_name(ch: int) -> str: - ''' - Adobe Glyph List function - ''' - if _adobe_glyphs == {}: - for line in _get_glyph_text(): - if line.startswith("#"): - continue - name, unc = line.split(";") - uncl = unc.split() - for unc in uncl: - c = int(unc[:4], base=16) - _adobe_glyphs[c] = name - return _adobe_glyphs.get(ch, ".notdef") + """ + Convenience function accessing unicodedata. + """ + import unicodedata + try: + name = unicodedata.name(chr(ch)) + except ValueError: + name = ".notdef" + return name def vdist(dir, a, b): @@ -21169,7 +24741,10 @@ def apply_pages( initfn(*initfn_args, **initfn_kwargs) ret = list() document = Document(path) - for page in document: + if pages is None: + pages = range(len(document)) + for pno in pages: + page = document[pno] r = pagefn(page, *pagefn_args, **initfn_kwargs) ret.append(r) @@ -21871,20 +25446,6 @@ def unset_quad_corrections(on=None): fitz_config = JM_fitz_config() -# We cannot import utils earlier because it imports this .py file itself and -# uses some pymupdf.* types in function typing. -# -from . import utils - - -pdfcolor = dict( - [ - (k, (r / 255, g / 255, b / 255)) - for k, (r, g, b) in utils.getColorInfoDict().items() - ] - ) - - # Callbacks not yet supported with cppyy. if not mupdf_cppyy: mupdf.fz_set_warning_callback(JM_mupdf_warning) @@ -21917,6 +25478,123 @@ def _atexit(): atexit.register( _atexit) +# List of (name, red, green, blue) where: +# name: upper-case name. +# red, green, blue: integer in range 0..255. +# +from . import _wxcolors +_wxcolors = _wxcolors._wxcolors + + +# Dict mapping from name to (red, green, blue). +# name: lower-case name. +# red, green, blue: float in range 0..1. +# +pdfcolor = dict() +for name, r, g, b in _wxcolors: + pdfcolor[name.lower()] = (r/255, g/255, b/255) + + +def colors_pdf_dict(): + ''' + Returns dict mapping from name to (red, green, blue). + name: lower-case name. + red, green, blue: float in range 0..1. + ''' + return pdfcolor + + +def colors_wx_list(): + ''' + Returns list of (name, red, green, blue) tuples: + name: upper-case name. + red, green, blue: integers in range 0..255. + ''' + return _wxcolors + + +def _mupdf_devel(make_links=True): + ''' + Allows PyMuPDF installation to be used to compile and link programmes that + use the MuPDF C/C++ API. + + Args: + make_links: + If true, then on non-windows we also create softlinks to any shared + libraries that are supplied with a version suffix; this allows them + to be used in a link command. + + For example we create links such as: + + site-packages/pymupdf/ + libmupdf.so -> libmupdf.so.26.7 + libmupdfcpp.so -> libmupdfcpp.so.26.7 + + Returns: (mupdf_include, mupdf_lib). + mupdf_include: + Path of MuPDF include directory within PyMuPDF install. + mupdf_lib + Path of MuPDF library directory within PyMuPDF install. + ''' + import platform + + log(f'{mupdf_version=}') + + p = os.path.normpath(f'{__file__}/..') + + mupdf_include = f'{p}/mupdf-devel/include' + + if platform.system() == 'Windows': + # Separate .lib files are used at build time. + mupdf_lib = f'{p}/mupdf-devel/lib' + else: + # .so files are used for both buildtime and runtime linking. + mupdf_lib = p + log(f'Within installed PyMuPDF:') + log(f' {mupdf_include=}') + log(f' {mupdf_lib=}') + + assert os.path.isdir(mupdf_include), f'Not a directory: {mupdf_include=}.' + assert os.path.isdir(mupdf_lib), f'Not a directory: {mupdf_lib=}.' + + if platform.system() != 'Windows' and make_links: + # Make symbolic links within the installed pymupdf module so + # that ld can find libmupdf.so etc. This is a bit of a hack, but + # necessary because wheels cannot contain symbolic links. + # + # For example we create `libmupdf.so -> libmupdf.so.24.8`. + # + # We are careful to only create symlinks for the expected MuPDF + # version, in case old .so files from a previous install are still + # in place. + # + log(f'Creating symlinks in {mupdf_lib=} for MuPDF-{mupdf_version} .so files.') + regex_suffix = mupdf_version.split('.')[1:3] + regex_suffix = '[.]'.join(regex_suffix) + mupdf_lib_regex = f'^(lib[^.]+[.]so)[.]{regex_suffix}$' + log(f'{mupdf_lib_regex=}.') + for leaf in os.listdir(mupdf_lib): + m = re.match(mupdf_lib_regex, leaf) + if m: + pfrom = f'{mupdf_lib}/{m.group(1)}' + # os.path.exists() can return false if softlink exists + # but points to non-existent file, so we also use + # `os.path.islink()`. + if os.path.islink(pfrom) or os.path.exists(pfrom): + log(f'Removing existing link {pfrom=}.') + os.remove(pfrom) + log(f'Creating symlink: {pfrom} -> {leaf}') + os.symlink(leaf, pfrom) + + return mupdf_include, mupdf_lib + + +# We cannot import utils earlier because it imports this .py file itself and +# uses some pymupdf.* types in function typing. +# +from . import utils + + # Use utils.*() fns for some class methods. # recover_bbox_quad = utils.recover_bbox_quad @@ -21925,81 +25603,9 @@ def _atexit(): recover_quad = utils.recover_quad recover_span_quad = utils.recover_span_quad -Annot.get_text = utils.get_text -Annot.get_textbox = utils.get_textbox - -Document._do_links = utils.do_links -Document.del_toc_item = utils.del_toc_item -Document.get_char_widths = utils.get_char_widths -Document.get_oc = utils.get_oc -Document.get_ocmd = utils.get_ocmd -Document.get_page_labels = utils.get_page_labels -Document.get_page_numbers = utils.get_page_numbers -Document.get_page_pixmap = utils.get_page_pixmap -Document.get_page_text = utils.get_page_text -Document.get_toc = utils.get_toc -Document.has_annots = utils.has_annots -Document.has_links = utils.has_links -Document.insert_page = utils.insert_page -Document.new_page = utils.new_page -Document.scrub = utils.scrub -Document.search_page_for = utils.search_page_for -Document.set_metadata = utils.set_metadata -Document.set_oc = utils.set_oc -Document.set_ocmd = utils.set_ocmd -Document.set_page_labels = utils.set_page_labels -Document.set_toc = utils.set_toc -Document.set_toc_item = utils.set_toc_item -Document.subset_fonts = utils.subset_fonts -Document.tobytes = Document.write -Document.xref_copy = utils.xref_copy - -IRect.get_area = utils.get_area - -Page.apply_redactions = utils.apply_redactions -Page.delete_image = utils.delete_image -Page.delete_widget = utils.delete_widget -Page.draw_bezier = utils.draw_bezier -Page.draw_circle = utils.draw_circle -Page.draw_curve = utils.draw_curve -Page.draw_line = utils.draw_line -Page.draw_oval = utils.draw_oval -Page.draw_polyline = utils.draw_polyline -Page.draw_quad = utils.draw_quad -Page.draw_rect = utils.draw_rect -Page.draw_sector = utils.draw_sector -Page.draw_squiggle = utils.draw_squiggle -Page.draw_zigzag = utils.draw_zigzag -Page.get_image_info = utils.get_image_info -Page.get_image_rects = utils.get_image_rects -Page.get_label = utils.get_label -Page.get_links = utils.get_links -Page.get_pixmap = utils.get_pixmap -Page.get_text = utils.get_text -Page.get_text_blocks = utils.get_text_blocks -Page.get_text_selection = utils.get_text_selection -Page.get_text_words = utils.get_text_words -Page.get_textbox = utils.get_textbox -Page.get_textpage_ocr = utils.get_textpage_ocr -Page.insert_image = utils.insert_image -Page.insert_link = utils.insert_link -Page.insert_text = utils.insert_text -Page.insert_textbox = utils.insert_textbox -Page.insert_htmlbox = utils.insert_htmlbox -Page.new_shape = lambda x: utils.Shape(x) -Page.replace_image = utils.replace_image -Page.search_for = utils.search_for -Page.show_pdf_page = utils.show_pdf_page -Page.update_link = utils.update_link -Page.write_text = utils.write_text from .table import find_tables - Page.find_tables = find_tables -Rect.get_area = utils.get_area - -TextWriter.fill_textbox = utils.fill_textbox - class FitzDeprecation(DeprecationWarning): pass @@ -22269,19 +25875,19 @@ def deprecated_function( *args, **kwargs): _alias( Rect, 'is_infinite') _alias( TextWriter, 'fill_textbox') _alias( TextWriter, 'write_text') - _alias( utils.Shape, 'draw_bezier') - _alias( utils.Shape, 'draw_circle') - _alias( utils.Shape, 'draw_curve') - _alias( utils.Shape, 'draw_line') - _alias( utils.Shape, 'draw_oval') - _alias( utils.Shape, 'draw_polyline') - _alias( utils.Shape, 'draw_quad') - _alias( utils.Shape, 'draw_rect') - _alias( utils.Shape, 'draw_sector') - _alias( utils.Shape, 'draw_squiggle') - _alias( utils.Shape, 'draw_zigzag') - _alias( utils.Shape, 'insert_text') - _alias( utils.Shape, 'insert_textbox') + _alias( Shape, 'draw_bezier') + _alias( Shape, 'draw_circle') + _alias( Shape, 'draw_curve') + _alias( Shape, 'draw_line') + _alias( Shape, 'draw_oval') + _alias( Shape, 'draw_polyline') + _alias( Shape, 'draw_quad') + _alias( Shape, 'draw_rect') + _alias( Shape, 'draw_sector') + _alias( Shape, 'draw_squiggle') + _alias( Shape, 'draw_zigzag') + _alias( Shape, 'insert_text') + _alias( Shape, 'insert_textbox') if 0: restore_aliases() diff --git a/src/__main__.py b/src/__main__.py index 672cffdf7..35914d6c7 100644 --- a/src/__main__.py +++ b/src/__main__.py @@ -330,12 +330,9 @@ def embedded_del(args): ): sys.exit("cannot save PDF incrementally") - exception_types = (ValueError, pymupdf.mupdf.FzErrorBase) - if pymupdf.mupdf_version_tuple < (1, 24): - exception_types = ValueError try: doc.embfile_del(args.name) - except exception_types as e: # pylint: disable=catching-non-exception + except (ValueError, pymupdf.mupdf.FzErrorBase) as e: sys.exit(f'no such embedded file {args.name!r}: {e}') if not args.output or args.output == args.input: doc.saveIncr() @@ -347,13 +344,10 @@ def embedded_del(args): def embedded_get(args): """Retrieve contents of an embedded file.""" doc = open_file(args.input, args.password, pdf=True) - exception_types = (ValueError, pymupdf.mupdf.FzErrorBase) - if pymupdf.mupdf_version_tuple < (1, 24): - exception_types = ValueError try: stream = doc.embfile_get(args.name) d = doc.embfile_info(args.name) - except exception_types as e: # pylint: disable=catching-non-exception + except (ValueError, pymupdf.mupdf.FzErrorBase) as e: sys.exit(f'no such embedded file {args.name!r}: {e}') filename = args.output if args.output else d["filename"] with open(filename, "wb") as output: diff --git a/src/_apply_pages.py b/src/_apply_pages.py index 119a51edf..0aae54c78 100644 --- a/src/_apply_pages.py +++ b/src/_apply_pages.py @@ -36,7 +36,7 @@ def _worker_init( def _stats_write(t, label): t = time.time() - t - if t >= 0.1: + if t >= 10: pymupdf.log(f'{os.getpid()=}: {t:2f}s: {label}.') diff --git a/src/_wxcolors.py b/src/_wxcolors.py new file mode 100644 index 000000000..730fcbc3b --- /dev/null +++ b/src/_wxcolors.py @@ -0,0 +1,562 @@ +_wxcolors = [ + ("ALICEBLUE", 240, 248, 255), + ("ANTIQUEWHITE", 250, 235, 215), + ("ANTIQUEWHITE1", 255, 239, 219), + ("ANTIQUEWHITE2", 238, 223, 204), + ("ANTIQUEWHITE3", 205, 192, 176), + ("ANTIQUEWHITE4", 139, 131, 120), + ("AQUA", 0, 255, 255), + ("AQUAMARINE", 127, 255, 212), + ("AQUAMARINE1", 127, 255, 212), + ("AQUAMARINE2", 118, 238, 198), + ("AQUAMARINE3", 102, 205, 170), + ("AQUAMARINE4", 69, 139, 116), + ("AZURE", 240, 255, 255), + ("AZURE1", 240, 255, 255), + ("AZURE2", 224, 238, 238), + ("AZURE3", 193, 205, 205), + ("AZURE4", 131, 139, 139), + ("BEIGE", 245, 245, 220), + ("BISQUE", 255, 228, 196), + ("BISQUE1", 255, 228, 196), + ("BISQUE2", 238, 213, 183), + ("BISQUE3", 205, 183, 158), + ("BISQUE4", 139, 125, 107), + ("BLACK", 0, 0, 0), + ("BLANCHEDALMOND", 255, 235, 205), + ("BLUE", 0, 0, 255), + ("BLUE1", 0, 0, 255), + ("BLUE2", 0, 0, 238), + ("BLUE3", 0, 0, 205), + ("BLUE4", 0, 0, 139), + ("BLUEVIOLET", 138, 43, 226), + ("BROWN", 165, 42, 42), + ("BROWN1", 255, 64, 64), + ("BROWN2", 238, 59, 59), + ("BROWN3", 205, 51, 51), + ("BROWN4", 139, 35, 35), + ("BURLYWOOD", 222, 184, 135), + ("BURLYWOOD1", 255, 211, 155), + ("BURLYWOOD2", 238, 197, 145), + ("BURLYWOOD3", 205, 170, 125), + ("BURLYWOOD4", 139, 115, 85), + ("CADETBLUE", 95, 158, 160), + ("CADETBLUE1", 152, 245, 255), + ("CADETBLUE2", 142, 229, 238), + ("CADETBLUE3", 122, 197, 205), + ("CADETBLUE4", 83, 134, 139), + ("CHARTREUSE", 127, 255, 0), + ("CHARTREUSE1", 127, 255, 0), + ("CHARTREUSE2", 118, 238, 0), + ("CHARTREUSE3", 102, 205, 0), + ("CHARTREUSE4", 69, 139, 0), + ("CHOCOLATE", 210, 105, 30), + ("CHOCOLATE1", 255, 127, 36), + ("CHOCOLATE2", 238, 118, 33), + ("CHOCOLATE3", 205, 102, 29), + ("CHOCOLATE4", 139, 69, 19), + ("COFFEE", 156, 79, 0), + ("CORAL", 255, 127, 80), + ("CORAL1", 255, 114, 86), + ("CORAL2", 238, 106, 80), + ("CORAL3", 205, 91, 69), + ("CORAL4", 139, 62, 47), + ("CORNFLOWERBLUE", 100, 149, 237), + ("CORNSILK", 255, 248, 220), + ("CORNSILK1", 255, 248, 220), + ("CORNSILK2", 238, 232, 205), + ("CORNSILK3", 205, 200, 177), + ("CORNSILK4", 139, 136, 120), + ("CRIMSON", 220, 20, 60), + ("CYAN", 0, 255, 255), + ("CYAN1", 0, 255, 255), + ("CYAN2", 0, 238, 238), + ("CYAN3", 0, 205, 205), + ("CYAN4", 0, 139, 139), + ("DARKBLUE", 0, 0, 139), + ("DARKCYAN", 0, 139, 139), + ("DARKGOLDENROD", 184, 134, 11), + ("DARKGOLDENROD1", 255, 185, 15), + ("DARKGOLDENROD2", 238, 173, 14), + ("DARKGOLDENROD3", 205, 149, 12), + ("DARKGOLDENROD4", 139, 101, 8), + ("DARKGRAY", 169, 169, 169), + ("DARKGREEN", 0, 100, 0), + ("DARKGREY", 169, 169, 169), + ("DARKKHAKI", 189, 183, 107), + ("DARKMAGENTA", 139, 0, 139), + ("DARKOLIVEGREEN", 85, 107, 47), + ("DARKOLIVEGREEN1", 202, 255, 112), + ("DARKOLIVEGREEN2", 188, 238, 104), + ("DARKOLIVEGREEN3", 162, 205, 90), + ("DARKOLIVEGREEN4", 110, 139, 61), + ("DARKORANGE", 255, 140, 0), + ("DARKORANGE1", 255, 127, 0), + ("DARKORANGE2", 238, 118, 0), + ("DARKORANGE3", 205, 102, 0), + ("DARKORANGE4", 139, 69, 0), + ("DARKORCHID", 153, 50, 204), + ("DARKORCHID1", 191, 62, 255), + ("DARKORCHID2", 178, 58, 238), + ("DARKORCHID3", 154, 50, 205), + ("DARKORCHID4", 104, 34, 139), + ("DARKRED", 139, 0, 0), + ("DARKSALMON", 233, 150, 122), + ("DARKSEAGREEN", 143, 188, 143), + ("DARKSEAGREEN1", 193, 255, 193), + ("DARKSEAGREEN2", 180, 238, 180), + ("DARKSEAGREEN3", 155, 205, 155), + ("DARKSEAGREEN4", 105, 139, 105), + ("DARKSLATEBLUE", 72, 61, 139), + ("DARKSLATEGRAY", 47, 79, 79), + ("DARKSLATEGREY", 47, 79, 79), + ("DARKTURQUOISE", 0, 206, 209), + ("DARKVIOLET", 148, 0, 211), + ("DEEPPINK", 255, 20, 147), + ("DEEPPINK1", 255, 20, 147), + ("DEEPPINK2", 238, 18, 137), + ("DEEPPINK3", 205, 16, 118), + ("DEEPPINK4", 139, 10, 80), + ("DEEPSKYBLUE", 0, 191, 255), + ("DEEPSKYBLUE1", 0, 191, 255), + ("DEEPSKYBLUE2", 0, 178, 238), + ("DEEPSKYBLUE3", 0, 154, 205), + ("DEEPSKYBLUE4", 0, 104, 139), + ("DIMGRAY", 105, 105, 105), + ("DIMGREY", 105, 105, 105), + ("DODGERBLUE", 30, 144, 255), + ("DODGERBLUE1", 30, 144, 255), + ("DODGERBLUE2", 28, 134, 238), + ("DODGERBLUE3", 24, 116, 205), + ("DODGERBLUE4", 16, 78, 139), + ("FIREBRICK", 178, 34, 34), + ("FIREBRICK1", 255, 48, 48), + ("FIREBRICK2", 238, 44, 44), + ("FIREBRICK3", 205, 38, 38), + ("FIREBRICK4", 139, 26, 26), + ("FLORALWHITE", 255, 250, 240), + ("FORESTGREEN", 34, 139, 34), + ("FUCHSIA", 255, 0, 255), + ("GAINSBORO", 220, 220, 220), + ("GHOSTWHITE", 248, 248, 255), + ("GOLD", 255, 215, 0), + ("GOLD1", 255, 215, 0), + ("GOLD2", 238, 201, 0), + ("GOLD3", 205, 173, 0), + ("GOLD4", 139, 117, 0), + ("GOLDENROD", 218, 165, 32), + ("GOLDENROD1", 255, 193, 37), + ("GOLDENROD2", 238, 180, 34), + ("GOLDENROD3", 205, 155, 29), + ("GOLDENROD4", 139, 105, 20), + ("GRAY", 190, 190, 190), + ("GRAY0", 0, 0, 0), + ("GRAY1", 3, 3, 3), + ("GRAY10", 26, 26, 26), + ("GRAY100", 255, 255, 255), + ("GRAY11", 28, 28, 28), + ("GRAY12", 31, 31, 31), + ("GRAY13", 33, 33, 33), + ("GRAY14", 36, 36, 36), + ("GRAY15", 38, 38, 38), + ("GRAY16", 41, 41, 41), + ("GRAY17", 43, 43, 43), + ("GRAY18", 46, 46, 46), + ("GRAY19", 48, 48, 48), + ("GRAY2", 5, 5, 5), + ("GRAY20", 51, 51, 51), + ("GRAY21", 54, 54, 54), + ("GRAY22", 56, 56, 56), + ("GRAY23", 59, 59, 59), + ("GRAY24", 61, 61, 61), + ("GRAY25", 64, 64, 64), + ("GRAY26", 66, 66, 66), + ("GRAY27", 69, 69, 69), + ("GRAY28", 71, 71, 71), + ("GRAY29", 74, 74, 74), + ("GRAY3", 8, 8, 8), + ("GRAY30", 77, 77, 77), + ("GRAY31", 79, 79, 79), + ("GRAY32", 82, 82, 82), + ("GRAY33", 84, 84, 84), + ("GRAY34", 87, 87, 87), + ("GRAY35", 89, 89, 89), + ("GRAY36", 92, 92, 92), + ("GRAY37", 94, 94, 94), + ("GRAY38", 97, 97, 97), + ("GRAY39", 99, 99, 99), + ("GRAY4", 10, 10, 10), + ("GRAY40", 102, 102, 102), + ("GRAY41", 105, 105, 105), + ("GRAY42", 107, 107, 107), + ("GRAY43", 110, 110, 110), + ("GRAY44", 112, 112, 112), + ("GRAY45", 115, 115, 115), + ("GRAY46", 117, 117, 117), + ("GRAY47", 120, 120, 120), + ("GRAY48", 122, 122, 122), + ("GRAY49", 125, 125, 125), + ("GRAY5", 13, 13, 13), + ("GRAY50", 127, 127, 127), + ("GRAY51", 130, 130, 130), + ("GRAY52", 133, 133, 133), + ("GRAY53", 135, 135, 135), + ("GRAY54", 138, 138, 138), + ("GRAY55", 140, 140, 140), + ("GRAY56", 143, 143, 143), + ("GRAY57", 145, 145, 145), + ("GRAY58", 148, 148, 148), + ("GRAY59", 150, 150, 150), + ("GRAY6", 15, 15, 15), + ("GRAY60", 153, 153, 153), + ("GRAY61", 156, 156, 156), + ("GRAY62", 158, 158, 158), + ("GRAY63", 161, 161, 161), + ("GRAY64", 163, 163, 163), + ("GRAY65", 166, 166, 166), + ("GRAY66", 168, 168, 168), + ("GRAY67", 171, 171, 171), + ("GRAY68", 173, 173, 173), + ("GRAY69", 176, 176, 176), + ("GRAY7", 18, 18, 18), + ("GRAY70", 179, 179, 179), + ("GRAY71", 181, 181, 181), + ("GRAY72", 184, 184, 184), + ("GRAY73", 186, 186, 186), + ("GRAY74", 189, 189, 189), + ("GRAY75", 191, 191, 191), + ("GRAY76", 194, 194, 194), + ("GRAY77", 196, 196, 196), + ("GRAY78", 199, 199, 199), + ("GRAY79", 201, 201, 201), + ("GRAY8", 20, 20, 20), + ("GRAY80", 204, 204, 204), + ("GRAY81", 207, 207, 207), + ("GRAY82", 209, 209, 209), + ("GRAY83", 212, 212, 212), + ("GRAY84", 214, 214, 214), + ("GRAY85", 217, 217, 217), + ("GRAY86", 219, 219, 219), + ("GRAY87", 222, 222, 222), + ("GRAY88", 224, 224, 224), + ("GRAY89", 227, 227, 227), + ("GRAY9", 23, 23, 23), + ("GRAY90", 229, 229, 229), + ("GRAY91", 232, 232, 232), + ("GRAY92", 235, 235, 235), + ("GRAY93", 237, 237, 237), + ("GRAY94", 240, 240, 240), + ("GRAY95", 242, 242, 242), + ("GRAY96", 245, 245, 245), + ("GRAY97", 247, 247, 247), + ("GRAY98", 250, 250, 250), + ("GRAY99", 252, 252, 252), + ("GREEN YELLOW", 173, 255, 47), + ("GREEN", 0, 255, 0), + ("GREEN1", 0, 255, 0), + ("GREEN2", 0, 238, 0), + ("GREEN3", 0, 205, 0), + ("GREEN4", 0, 139, 0), + ("GREENYELLOW", 173, 255, 47), + ("GREY", 128, 128, 128), + ("HONEYDEW", 240, 255, 240), + ("HONEYDEW1", 240, 255, 240), + ("HONEYDEW2", 224, 238, 224), + ("HONEYDEW3", 193, 205, 193), + ("HONEYDEW4", 131, 139, 131), + ("HOTPINK", 255, 105, 180), + ("HOTPINK1", 255, 110, 180), + ("HOTPINK2", 238, 106, 167), + ("HOTPINK3", 205, 96, 144), + ("HOTPINK4", 139, 58, 98), + ("INDIANRED", 205, 92, 92), + ("INDIANRED1", 255, 106, 106), + ("INDIANRED2", 238, 99, 99), + ("INDIANRED3", 205, 85, 85), + ("INDIANRED4", 139, 58, 58), + ("INDIGO", 75, 0, 130), + ("IVORY", 255, 255, 240), + ("IVORY1", 255, 255, 240), + ("IVORY2", 238, 238, 224), + ("IVORY3", 205, 205, 193), + ("IVORY4", 139, 139, 131), + ("KHAKI", 240, 230, 140), + ("KHAKI1", 255, 246, 143), + ("KHAKI2", 238, 230, 133), + ("KHAKI3", 205, 198, 115), + ("KHAKI4", 139, 134, 78), + ("LAVENDER", 230, 230, 250), + ("LAVENDERBLUSH", 255, 240, 245), + ("LAVENDERBLUSH1", 255, 240, 245), + ("LAVENDERBLUSH2", 238, 224, 229), + ("LAVENDERBLUSH3", 205, 193, 197), + ("LAVENDERBLUSH4", 139, 131, 134), + ("LAWNGREEN", 124, 252, 0), + ("LEMONCHIFFON", 255, 250, 205), + ("LEMONCHIFFON1", 255, 250, 205), + ("LEMONCHIFFON2", 238, 233, 191), + ("LEMONCHIFFON3", 205, 201, 165), + ("LEMONCHIFFON4", 139, 137, 112), + ("LIGHTBLUE", 173, 216, 230), + ("LIGHTBLUE1", 191, 239, 255), + ("LIGHTBLUE2", 178, 223, 238), + ("LIGHTBLUE3", 154, 192, 205), + ("LIGHTBLUE4", 104, 131, 139), + ("LIGHTCORAL", 240, 128, 128), + ("LIGHTCYAN", 224, 255, 255), + ("LIGHTCYAN1", 224, 255, 255), + ("LIGHTCYAN2", 209, 238, 238), + ("LIGHTCYAN3", 180, 205, 205), + ("LIGHTCYAN4", 122, 139, 139), + ("LIGHTGOLDENROD", 238, 221, 130), + ("LIGHTGOLDENROD1", 255, 236, 139), + ("LIGHTGOLDENROD2", 238, 220, 130), + ("LIGHTGOLDENROD3", 205, 190, 112), + ("LIGHTGOLDENROD4", 139, 129, 76), + ("LIGHTGOLDENRODYELLOW", 250, 250, 210), + ("LIGHTGRAY", 211, 211, 211), + ("LIGHTGREEN", 144, 238, 144), + ("LIGHTGREY", 211, 211, 211), + ("LIGHTPINK", 255, 182, 193), + ("LIGHTPINK1", 255, 174, 185), + ("LIGHTPINK2", 238, 162, 173), + ("LIGHTPINK3", 205, 140, 149), + ("LIGHTPINK4", 139, 95, 101), + ("LIGHTSALMON", 255, 160, 122), + ("LIGHTSALMON1", 255, 160, 122), + ("LIGHTSALMON2", 238, 149, 114), + ("LIGHTSALMON3", 205, 129, 98), + ("LIGHTSALMON4", 139, 87, 66), + ("LIGHTSEAGREEN", 32, 178, 170), + ("LIGHTSKYBLUE", 135, 206, 250), + ("LIGHTSKYBLUE1", 176, 226, 255), + ("LIGHTSKYBLUE2", 164, 211, 238), + ("LIGHTSKYBLUE3", 141, 182, 205), + ("LIGHTSKYBLUE4", 96, 123, 139), + ("LIGHTSLATEBLUE", 132, 112, 255), + ("LIGHTSLATEGRAY", 119, 136, 153), + ("LIGHTSLATEGREY", 119, 136, 153), + ("LIGHTSTEELBLUE", 176, 196, 222), + ("LIGHTSTEELBLUE1", 202, 225, 255), + ("LIGHTSTEELBLUE2", 188, 210, 238), + ("LIGHTSTEELBLUE3", 162, 181, 205), + ("LIGHTSTEELBLUE4", 110, 123, 139), + ("LIGHTYELLOW", 255, 255, 224), + ("LIGHTYELLOW1", 255, 255, 224), + ("LIGHTYELLOW2", 238, 238, 209), + ("LIGHTYELLOW3", 205, 205, 180), + ("LIGHTYELLOW4", 139, 139, 122), + ("LIME", 0, 255, 0), + ("LIMEGREEN", 50, 205, 50), + ("LINEN", 250, 240, 230), + ("MAGENTA", 255, 0, 255), + ("MAGENTA1", 255, 0, 255), + ("MAGENTA2", 238, 0, 238), + ("MAGENTA3", 205, 0, 205), + ("MAGENTA4", 139, 0, 139), + ("MAROON", 176, 48, 96), + ("MAROON1", 255, 52, 179), + ("MAROON2", 238, 48, 167), + ("MAROON3", 205, 41, 144), + ("MAROON4", 139, 28, 98), + ("MEDIUMAQUAMARINE", 102, 205, 170), + ("MEDIUMBLUE", 0, 0, 205), + ("MEDIUMORCHID", 186, 85, 211), + ("MEDIUMORCHID1", 224, 102, 255), + ("MEDIUMORCHID2", 209, 95, 238), + ("MEDIUMORCHID3", 180, 82, 205), + ("MEDIUMORCHID4", 122, 55, 139), + ("MEDIUMPURPLE", 147, 112, 219), + ("MEDIUMPURPLE1", 171, 130, 255), + ("MEDIUMPURPLE2", 159, 121, 238), + ("MEDIUMPURPLE3", 137, 104, 205), + ("MEDIUMPURPLE4", 93, 71, 139), + ("MEDIUMSEAGREEN", 60, 179, 113), + ("MEDIUMSLATEBLUE", 123, 104, 238), + ("MEDIUMSPRINGGREEN", 0, 250, 154), + ("MEDIUMTURQUOISE", 72, 209, 204), + ("MEDIUMVIOLETRED", 199, 21, 133), + ("MIDNIGHTBLUE", 25, 25, 112), + ("MINTCREAM", 245, 255, 250), + ("MISTYROSE", 255, 228, 225), + ("MISTYROSE1", 255, 228, 225), + ("MISTYROSE2", 238, 213, 210), + ("MISTYROSE3", 205, 183, 181), + ("MISTYROSE4", 139, 125, 123), + ("MOCCASIN", 255, 228, 181), + ("MUPDFBLUE", 37, 114, 172), + ("NAVAJOWHITE", 255, 222, 173), + ("NAVAJOWHITE1", 255, 222, 173), + ("NAVAJOWHITE2", 238, 207, 161), + ("NAVAJOWHITE3", 205, 179, 139), + ("NAVAJOWHITE4", 139, 121, 94), + ("NAVY", 0, 0, 128), + ("NAVYBLUE", 0, 0, 128), + ("OLDLACE", 253, 245, 230), + ("OLIVE", 128, 128, 0), + ("OLIVEDRAB", 107, 142, 35), + ("OLIVEDRAB1", 192, 255, 62), + ("OLIVEDRAB2", 179, 238, 58), + ("OLIVEDRAB3", 154, 205, 50), + ("OLIVEDRAB4", 105, 139, 34), + ("ORANGE", 255, 165, 0), + ("ORANGE1", 255, 165, 0), + ("ORANGE2", 238, 154, 0), + ("ORANGE3", 205, 133, 0), + ("ORANGE4", 139, 90, 0), + ("ORANGERED", 255, 69, 0), + ("ORANGERED1", 255, 69, 0), + ("ORANGERED2", 238, 64, 0), + ("ORANGERED3", 205, 55, 0), + ("ORANGERED4", 139, 37, 0), + ("ORCHID", 218, 112, 214), + ("ORCHID1", 255, 131, 250), + ("ORCHID2", 238, 122, 233), + ("ORCHID3", 205, 105, 201), + ("ORCHID4", 139, 71, 137), + ("PALEGOLDENROD", 238, 232, 170), + ("PALEGREEN", 152, 251, 152), + ("PALEGREEN1", 154, 255, 154), + ("PALEGREEN2", 144, 238, 144), + ("PALEGREEN3", 124, 205, 124), + ("PALEGREEN4", 84, 139, 84), + ("PALETURQUOISE", 175, 238, 238), + ("PALETURQUOISE1", 187, 255, 255), + ("PALETURQUOISE2", 174, 238, 238), + ("PALETURQUOISE3", 150, 205, 205), + ("PALETURQUOISE4", 102, 139, 139), + ("PALEVIOLETRED", 219, 112, 147), + ("PALEVIOLETRED1", 255, 130, 171), + ("PALEVIOLETRED2", 238, 121, 159), + ("PALEVIOLETRED3", 205, 104, 137), + ("PALEVIOLETRED4", 139, 71, 93), + ("PAPAYAWHIP", 255, 239, 213), + ("PEACHPUFF", 255, 218, 185), + ("PEACHPUFF1", 255, 218, 185), + ("PEACHPUFF2", 238, 203, 173), + ("PEACHPUFF3", 205, 175, 149), + ("PEACHPUFF4", 139, 119, 101), + ("PERU", 205, 133, 63), + ("PINK", 255, 192, 203), + ("PINK1", 255, 181, 197), + ("PINK2", 238, 169, 184), + ("PINK3", 205, 145, 158), + ("PINK4", 139, 99, 108), + ("PLUM", 221, 160, 221), + ("PLUM1", 255, 187, 255), + ("PLUM2", 238, 174, 238), + ("PLUM3", 205, 150, 205), + ("PLUM4", 139, 102, 139), + ("POWDERBLUE", 176, 224, 230), + ("PURPLE", 160, 32, 240), + ("PURPLE1", 155, 48, 255), + ("PURPLE2", 145, 44, 238), + ("PURPLE3", 125, 38, 205), + ("PURPLE4", 85, 26, 139), + ("PY_COLOR", 240, 255, 210), + ("RED", 255, 0, 0), + ("RED1", 255, 0, 0), + ("RED2", 238, 0, 0), + ("RED3", 205, 0, 0), + ("RED4", 139, 0, 0), + ("ROSYBROWN", 188, 143, 143), + ("ROSYBROWN1", 255, 193, 193), + ("ROSYBROWN2", 238, 180, 180), + ("ROSYBROWN3", 205, 155, 155), + ("ROSYBROWN4", 139, 105, 105), + ("ROYALBLUE", 65, 105, 225), + ("ROYALBLUE1", 72, 118, 255), + ("ROYALBLUE2", 67, 110, 238), + ("ROYALBLUE3", 58, 95, 205), + ("ROYALBLUE4", 39, 64, 139), + ("SADDLEBROWN", 139, 69, 19), + ("SALMON", 250, 128, 114), + ("SALMON1", 255, 140, 105), + ("SALMON2", 238, 130, 98), + ("SALMON3", 205, 112, 84), + ("SALMON4", 139, 76, 57), + ("SANDYBROWN", 244, 164, 96), + ("SEAGREEN", 46, 139, 87), + ("SEAGREEN1", 84, 255, 159), + ("SEAGREEN2", 78, 238, 148), + ("SEAGREEN3", 67, 205, 128), + ("SEAGREEN4", 46, 139, 87), + ("SEASHELL", 255, 245, 238), + ("SEASHELL1", 255, 245, 238), + ("SEASHELL2", 238, 229, 222), + ("SEASHELL3", 205, 197, 191), + ("SEASHELL4", 139, 134, 130), + ("SIENNA", 160, 82, 45), + ("SIENNA1", 255, 130, 71), + ("SIENNA2", 238, 121, 66), + ("SIENNA3", 205, 104, 57), + ("SIENNA4", 139, 71, 38), + ("SILVER", 192, 192, 192), + ("SKYBLUE", 135, 206, 235), + ("SKYBLUE1", 135, 206, 255), + ("SKYBLUE2", 126, 192, 238), + ("SKYBLUE3", 108, 166, 205), + ("SKYBLUE4", 74, 112, 139), + ("SLATEBLUE", 106, 90, 205), + ("SLATEBLUE1", 131, 111, 255), + ("SLATEBLUE2", 122, 103, 238), + ("SLATEBLUE3", 105, 89, 205), + ("SLATEBLUE4", 71, 60, 139), + ("SLATEGRAY", 112, 128, 144), + ("SLATEGREY", 112, 128, 144), + ("SNOW", 255, 250, 250), + ("SNOW1", 255, 250, 250), + ("SNOW2", 238, 233, 233), + ("SNOW3", 205, 201, 201), + ("SNOW4", 139, 137, 137), + ("SPRINGGREEN", 0, 255, 127), + ("SPRINGGREEN1", 0, 255, 127), + ("SPRINGGREEN2", 0, 238, 118), + ("SPRINGGREEN3", 0, 205, 102), + ("SPRINGGREEN4", 0, 139, 69), + ("STEELBLUE", 70, 130, 180), + ("STEELBLUE1", 99, 184, 255), + ("STEELBLUE2", 92, 172, 238), + ("STEELBLUE3", 79, 148, 205), + ("STEELBLUE4", 54, 100, 139), + ("TAN", 210, 180, 140), + ("TAN1", 255, 165, 79), + ("TAN2", 238, 154, 73), + ("TAN3", 205, 133, 63), + ("TAN4", 139, 90, 43), + ("TEAL", 0, 128, 128), + ("THISTLE", 216, 191, 216), + ("THISTLE1", 255, 225, 255), + ("THISTLE2", 238, 210, 238), + ("THISTLE3", 205, 181, 205), + ("THISTLE4", 139, 123, 139), + ("TOMATO", 255, 99, 71), + ("TOMATO1", 255, 99, 71), + ("TOMATO2", 238, 92, 66), + ("TOMATO3", 205, 79, 57), + ("TOMATO4", 139, 54, 38), + ("TURQUOISE", 64, 224, 208), + ("TURQUOISE1", 0, 245, 255), + ("TURQUOISE2", 0, 229, 238), + ("TURQUOISE3", 0, 197, 205), + ("TURQUOISE4", 0, 134, 139), + ("VIOLET", 238, 130, 238), + ("VIOLETRED", 208, 32, 144), + ("VIOLETRED1", 255, 62, 150), + ("VIOLETRED2", 238, 58, 140), + ("VIOLETRED3", 205, 50, 120), + ("VIOLETRED4", 139, 34, 82), + ("WHEAT", 245, 222, 179), + ("WHEAT1", 255, 231, 186), + ("WHEAT2", 238, 216, 174), + ("WHEAT3", 205, 186, 150), + ("WHEAT4", 139, 126, 102), + ("WHITE", 255, 255, 255), + ("WHITESMOKE", 245, 245, 245), + ("YELLOW", 255, 255, 0), + ("YELLOW1", 255, 255, 0), + ("YELLOW2", 238, 238, 0), + ("YELLOW3", 205, 205, 0), + ("YELLOW4", 139, 139, 0), + ("YELLOWGREEN", 154, 205, 50), + ] diff --git a/src/extra.i b/src/extra.i index d5fad46a2..8e4e75efb 100644 --- a/src/extra.i +++ b/src/extra.i @@ -1,5 +1,3 @@ -%module fitz_extra - %pythoncode %{ # pylint: disable=all %} @@ -23,6 +21,7 @@ otherwise compilation can fail because free() and malloc() are not declared. */ dictkey_align = PyUnicode_InternFromString("align"); dictkey_ascender = PyUnicode_InternFromString("ascender"); + dictkey_bidi = PyUnicode_InternFromString("bidi"); dictkey_bbox = PyUnicode_InternFromString("bbox"); dictkey_blocks = PyUnicode_InternFromString("blocks"); dictkey_bpc = PyUnicode_InternFromString("bpc"); @@ -43,6 +42,7 @@ otherwise compilation can fail because free() and malloc() are not declared. */ dictkey_filename = PyUnicode_InternFromString("filename"); dictkey_fill = PyUnicode_InternFromString("fill"); dictkey_flags = PyUnicode_InternFromString("flags"); + dictkey_char_flags = PyUnicode_InternFromString("char_flags"); /* Only used with mupdf >= 1.25.2. */ dictkey_font = PyUnicode_InternFromString("font"); dictkey_glyph = PyUnicode_InternFromString("glyph"); dictkey_height = PyUnicode_InternFromString("height"); @@ -103,6 +103,18 @@ catch(...) { #include +#define MAKE_MUPDF_VERSION_INT(major, minor, patch) ((major << 16) + (minor << 8) + (patch << 0)) + +#define MUPDF_VERSION_INT MAKE_MUPDF_VERSION_INT(FZ_VERSION_MAJOR, FZ_VERSION_MINOR, FZ_VERSION_PATCH) + +#define MUPDF_VERSION_GE(major, minor, patch) \ + MUPDF_VERSION_INT >= MAKE_MUPDF_VERSION_INT(major, minor, patch) + +/* Define a wrapper for PDF_NAME that returns a mupdf::PdfObj instead of a +pdf_obj*. This avoids implicit construction of a mupdf::PdfObj, which is +deliberately prohibited (with `explicit` on constructors) by recent MuPDF. */ +#define PDF_NAME2(X) mupdf::PdfObj(PDF_NAME(X)) + /* Returns equivalent of `repr(x)`. */ static std::string repr(PyObject* x) { @@ -256,23 +268,6 @@ PyObject* JM_EscapeStrFromBuffer(fz_buffer* buff) return val; } -// Only used for mupdf < 1.24. mupdf >= 1.24 has pdf_rearrange_pages2(). -void rearrange_pages2( - mupdf::PdfDocument& doc, - PyObject *new_pages - ) -{ - int len = (int) PyTuple_Size(new_pages); - int *pages = (int *) malloc((int) len * sizeof(int)); - int i; - for (i = 0; i < len; i++) { - pages[i] = (int) PyLong_AsLong(PyTuple_GET_ITEM(new_pages, (Py_ssize_t) i)); - } - mupdf::pdf_rearrange_pages(doc, len, pages); - free(pages); -} - - //---------------------------------------------------------------------------- // Deep-copies a source page to the target. // Modified version of function of pdfmerge.c: we also copy annotations, but @@ -318,7 +313,7 @@ static void page_merge( // make new page dict in dest doc mupdf::PdfObj page_dict = mupdf::pdf_new_dict(doc_des, 4); - mupdf::pdf_dict_put(page_dict, PDF_NAME(Type), PDF_NAME(Page)); + mupdf::pdf_dict_put(page_dict, PDF_NAME2(Type), PDF_NAME2(Page)); for (int i = 0; i < known_page_objs_num; ++i) { @@ -338,11 +333,11 @@ static void page_merge( // If selected, remove dict keys P (parent) and Popup if (copy_annots) { - mupdf::PdfObj old_annots = mupdf::pdf_dict_get(page_ref, PDF_NAME(Annots)); + mupdf::PdfObj old_annots = mupdf::pdf_dict_get(page_ref, PDF_NAME2(Annots)); int n = mupdf::pdf_array_len(old_annots); if (n > 0) { - mupdf::PdfObj new_annots = mupdf::pdf_dict_put_array(page_dict, PDF_NAME(Annots), n); + mupdf::PdfObj new_annots = mupdf::pdf_dict_put_array(page_dict, PDF_NAME2(Annots), n); for (int i = 0; i < n; i++) { mupdf::PdfObj o = mupdf::pdf_array_get(old_annots, i); @@ -350,18 +345,13 @@ static void page_merge( { continue; // skip invalid/null/non-dict items } - if (mupdf::pdf_dict_get(o, PDF_NAME(IRT)).m_internal) continue; - mupdf::PdfObj subtype = mupdf::pdf_dict_get(o, PDF_NAME(Subtype)); - if (mupdf::pdf_name_eq(subtype, PDF_NAME(Link))) continue; - if (mupdf::pdf_name_eq(subtype, PDF_NAME(Popup))) continue; - if (mupdf::pdf_name_eq(subtype, PDF_NAME(Widget))) - { - mupdf::fz_warn("skipping widget annotation"); - continue; - } - if (mupdf::pdf_name_eq(subtype, PDF_NAME(Widget))) continue; - mupdf::pdf_dict_del(o, PDF_NAME(Popup)); - mupdf::pdf_dict_del(o, PDF_NAME(P)); + if (mupdf::pdf_dict_get(o, PDF_NAME2(IRT)).m_internal) continue; + mupdf::PdfObj subtype = mupdf::pdf_dict_get(o, PDF_NAME2(Subtype)); + if (mupdf::pdf_name_eq(subtype, PDF_NAME2(Link))) continue; + if (mupdf::pdf_name_eq(subtype, PDF_NAME2(Popup))) continue; + if (mupdf::pdf_name_eq(subtype, PDF_NAME2(Widget))) continue; + mupdf::pdf_dict_del(o, PDF_NAME2(Popup)); + mupdf::pdf_dict_del(o, PDF_NAME2(P)); mupdf::PdfObj copy_o = mupdf::pdf_graft_mapped_object(graft_map, o); mupdf::PdfObj annot = mupdf::pdf_new_indirect( doc_des, @@ -375,7 +365,7 @@ static void page_merge( // rotate the page if (rotate != -1) { - mupdf::pdf_dict_put_int(page_dict, PDF_NAME(Rotate), rotate); + mupdf::pdf_dict_put_int(page_dict, PDF_NAME2(Rotate), rotate); } // Now add the page dictionary to dest PDF mupdf::PdfObj ref = mupdf::pdf_add_object(doc_des, page_dict); @@ -545,7 +535,7 @@ static void _newPage(mupdf::FzDocument& self, int pno=-1, float width=595, float static std::vector< std::string> JM_get_annot_id_list(mupdf::PdfPage& page) { std::vector< std::string> names; - mupdf::PdfObj annots = mupdf::pdf_dict_get(page.obj(), PDF_NAME(Annots)); + mupdf::PdfObj annots = mupdf::pdf_dict_get(page.obj(), PDF_NAME2(Annots)); if (!annots.m_internal) return names; int n = mupdf::pdf_array_len(annots); for (int i = 0; i < n; i++) @@ -560,6 +550,7 @@ static std::vector< std::string> JM_get_annot_id_list(mupdf::PdfPage& page) return names; } + //------------------------------------------------------------------------ // Add a unique /NM key to an annotation or widget. // Append a number to 'stem' such that the result is a unique name. @@ -613,7 +604,7 @@ static const char* Tools_parse_da(mupdf::PdfAnnot& this_annot) mupdf::PdfDocument pdf = mupdf::pdf_get_bound_document(this_annot_obj); try { - mupdf::PdfObj da = mupdf::pdf_dict_get_inheritable(this_annot_obj, PDF_NAME(DA)); + mupdf::PdfObj da = mupdf::pdf_dict_get_inheritable(this_annot_obj, PDF_NAME2(DA)); if (!da.m_internal) { mupdf::PdfObj trailer = mupdf::pdf_trailer(pdf); @@ -672,9 +663,9 @@ static PyObject* Annot_getAP(mupdf::PdfAnnot& annot) void Tools_update_da(mupdf::PdfAnnot& this_annot, const char* da_str) { mupdf::PdfObj this_annot_obj = mupdf::pdf_annot_obj(this_annot); - mupdf::pdf_dict_put_text_string(this_annot_obj, PDF_NAME(DA), da_str); - mupdf::pdf_dict_del(this_annot_obj, PDF_NAME(DS)); /* not supported */ - mupdf::pdf_dict_del(this_annot_obj, PDF_NAME(RC)); /* not supported */ + mupdf::pdf_dict_put_text_string(this_annot_obj, PDF_NAME2(DA), da_str); + mupdf::pdf_dict_del(this_annot_obj, PDF_NAME2(DS)); /* not supported */ + mupdf::pdf_dict_del(this_annot_obj, PDF_NAME2(RC)); /* not supported */ } static int @@ -789,6 +780,22 @@ jm_init_item(PyObject* obj, Py_ssize_t idx, int* result) return 0; } +// TODO: ------------------------------------------------------------------ +// This is a temporary solution and should be replaced by a C++ extension: +// There is no way in Python specify an array of fz_point - as is required +// for function pdf_set_annot_callout_line(). +static void JM_set_annot_callout_line(mupdf::PdfAnnot& annot, PyObject *callout, int count) +{ + fz_point points[3]; + mupdf::FzPoint p; + for (int i = 0; i < count; i++) + { + p = JM_point_from_py(PyTuple_GetItem(callout, (Py_ssize_t) i)); + points[i] = fz_make_point(p.x, p.y); + } + mupdf::pdf_set_annot_callout_line(annot, points, count); +} + //---------------------------------------------------------------------------- // Return list of outline xref numbers. Recursive function. Arguments: @@ -808,7 +815,7 @@ static PyObject* JM_outline_xrefs(mupdf::PdfObj obj, PyObject* xrefs) int nxr = mupdf::pdf_to_num(thisobj); newxref = PyLong_FromLong((long) nxr); if (PySequence_Contains(xrefs, newxref) - or mupdf::pdf_dict_get(thisobj, PDF_NAME(Type)).m_internal + or mupdf::pdf_dict_get(thisobj, PDF_NAME2(Type)).m_internal ) { // circular ref or top of chain: terminate @@ -816,13 +823,13 @@ static PyObject* JM_outline_xrefs(mupdf::PdfObj obj, PyObject* xrefs) break; } s_list_append_drop(xrefs, newxref); - mupdf::PdfObj first = mupdf::pdf_dict_get(thisobj, PDF_NAME(First)); // try go down + mupdf::PdfObj first = mupdf::pdf_dict_get(thisobj, PDF_NAME2(First)); // try go down if (mupdf::pdf_is_dict(first)) { xrefs = JM_outline_xrefs(first, xrefs); } - thisobj = mupdf::pdf_dict_get(thisobj, PDF_NAME(Next)); // try go next - mupdf::PdfObj parent = mupdf::pdf_dict_get(thisobj, PDF_NAME(Parent)); // get parent + thisobj = mupdf::pdf_dict_get(thisobj, PDF_NAME2(Next)); // try go next + mupdf::PdfObj parent = mupdf::pdf_dict_get(thisobj, PDF_NAME2(Parent)); // get parent if (!mupdf::pdf_is_dict(thisobj)) { thisobj = parent; @@ -834,6 +841,7 @@ static PyObject* JM_outline_xrefs(mupdf::PdfObj obj, PyObject* xrefs) PyObject* dictkey_align = NULL; PyObject* dictkey_ascender = NULL; +PyObject* dictkey_bidi = NULL; PyObject* dictkey_bbox = NULL; PyObject* dictkey_blocks = NULL; PyObject* dictkey_bpc = NULL; @@ -854,6 +862,8 @@ PyObject* dictkey_ext = NULL; PyObject* dictkey_filename = NULL; PyObject* dictkey_fill = NULL; PyObject* dictkey_flags = NULL; +PyObject* dictkey_char_bidi = NULL; +PyObject* dictkey_char_flags = NULL; PyObject* dictkey_font = NULL; PyObject* dictkey_glyph = NULL; PyObject* dictkey_height = NULL; @@ -930,13 +940,13 @@ static void Document_extend_toc_items(mupdf::PdfDocument& pdf, PyObject* items) Py_ssize_t n; Py_ssize_t m; - root = mupdf::pdf_dict_get(mupdf::pdf_trailer(pdf), PDF_NAME(Root)); + root = mupdf::pdf_dict_get(mupdf::pdf_trailer(pdf), PDF_NAME2(Root)); if (!root.m_internal) goto end; - olroot = mupdf::pdf_dict_get(root, PDF_NAME(Outlines)); + olroot = mupdf::pdf_dict_get(root, PDF_NAME2(Outlines)); if (!olroot.m_internal) goto end; - first = mupdf::pdf_dict_get(olroot, PDF_NAME(First)); + first = mupdf::pdf_dict_get(olroot, PDF_NAME2(First)); if (!first.m_internal) goto end; xrefs = PyList_New(0); // pre-allocate an empty list @@ -962,7 +972,7 @@ static void Document_extend_toc_items(mupdf::PdfDocument& pdf, PyObject* items) } PyDict_SetItem(itemdict, dictkey_xref, PySequence_ITEM(xrefs, i)); mupdf::PdfObj bm = mupdf::pdf_load_object(pdf, xref); - int flags = mupdf::pdf_to_int(mupdf::pdf_dict_get(bm, PDF_NAME(F))); + int flags = mupdf::pdf_to_int(mupdf::pdf_dict_get(bm, PDF_NAME2(F))); if (flags == 1) { PyDict_SetItem(itemdict, italic, Py_True); @@ -976,7 +986,7 @@ static void Document_extend_toc_items(mupdf::PdfDocument& pdf, PyObject* items) PyDict_SetItem(itemdict, italic, Py_True); PyDict_SetItem(itemdict, bold, Py_True); } - int count = mupdf::pdf_to_int(mupdf::pdf_dict_get(bm, PDF_NAME(Count))); + int count = mupdf::pdf_to_int(mupdf::pdf_dict_get(bm, PDF_NAME2(Count))); if (count < 0) { PyDict_SetItem(itemdict, collapse, Py_True); @@ -985,7 +995,7 @@ static void Document_extend_toc_items(mupdf::PdfDocument& pdf, PyObject* items) { PyDict_SetItem(itemdict, collapse, Py_False); } - mupdf::PdfObj col = mupdf::pdf_dict_get(bm, PDF_NAME(C)); + mupdf::PdfObj col = mupdf::pdf_dict_get(bm, PDF_NAME2(C)); if (mupdf::pdf_is_array(col) && mupdf::pdf_array_len(col) == 3) { PyObject* color = PyTuple_New(3); @@ -995,7 +1005,7 @@ static void Document_extend_toc_items(mupdf::PdfDocument& pdf, PyObject* items) dict_setitem_drop(itemdict, dictkey_color, color); } float z=0; - mupdf::PdfObj obj = mupdf::pdf_dict_get(bm, PDF_NAME(Dest)); + mupdf::PdfObj obj = mupdf::pdf_dict_get(bm, PDF_NAME2(Dest)); if (!obj.m_internal || !mupdf::pdf_is_array(obj)) { obj = mupdf::pdf_dict_getl(&bm, PDF_NAME(A), PDF_NAME(D), nullptr); @@ -1156,7 +1166,7 @@ static int JM_page_rotation(mupdf::PdfPage& page) { int rotate = 0; rotate = mupdf::pdf_to_int( - mupdf::pdf_dict_get_inheritable(page.obj(), PDF_NAME(Rotate)) + mupdf::pdf_dict_get_inheritable(page.obj(), PDF_NAME2(Rotate)) ); rotate = JM_norm_rotation(rotate); return rotate; @@ -1169,7 +1179,7 @@ static int JM_page_rotation(mupdf::PdfPage& page) static mupdf::FzRect JM_mediabox(mupdf::PdfObj& page_obj) { mupdf::FzRect mediabox = mupdf::pdf_to_rect( - mupdf::pdf_dict_get_inheritable(page_obj, PDF_NAME(MediaBox)) + mupdf::pdf_dict_get_inheritable(page_obj, PDF_NAME2(MediaBox)) ); if (mupdf::fz_is_empty_rect(mediabox) || mupdf::fz_is_infinite_rect(mediabox)) { @@ -1201,7 +1211,7 @@ mupdf::FzRect JM_cropbox(mupdf::PdfObj& page_obj) { mupdf::FzRect mediabox = JM_mediabox(page_obj); mupdf::FzRect cropbox = mupdf::pdf_to_rect( - mupdf::pdf_dict_get_inheritable(page_obj, PDF_NAME(CropBox)) + mupdf::pdf_dict_get_inheritable(page_obj, PDF_NAME2(CropBox)) ); if (mupdf::fz_is_infinite_rect(cropbox) || mupdf::fz_is_empty_rect(cropbox)) { @@ -1455,11 +1465,11 @@ PyObject* Page_addAnnot_FromString(mupdf::PdfPage& page, PyObject* linklist) { throw std::runtime_error(MSG_IS_NO_PDF); } - if (!mupdf::pdf_dict_get(page.obj(), PDF_NAME(Annots)).m_internal) + if (!mupdf::pdf_dict_get(page.obj(), PDF_NAME2(Annots)).m_internal) { - mupdf::pdf_dict_put_array(page.obj(), PDF_NAME(Annots), lcount); + mupdf::pdf_dict_put_array(page.obj(), PDF_NAME2(Annots), lcount); } - mupdf::PdfObj annots = mupdf::pdf_dict_get(page.obj(), PDF_NAME(Annots)); + mupdf::PdfObj annots = mupdf::pdf_dict_get(page.obj(), PDF_NAME2(Annots)); mupdf::PdfDocument doc = page.doc(); //printf("lcount=%i\n", lcount); fz_context* ctx = mupdf::internal_context_get(); @@ -1676,6 +1686,10 @@ static int JM_is_word_delimiter(int c, PyObject *delimiters) { if (c <= 32 || c == 160) return 1; // a standard delimiter + if (0x202a <= c && c <= 0x202e) + { + return 1; // change between writing directions + } // extra delimiters must be a non-empty sequence if (!delimiters || PyObject_Not(delimiters) || !PySequence_Check(delimiters)) { @@ -1707,6 +1721,12 @@ JM_is_word_delimiter(int c, PyObject *delimiters) return 0; } +static int +JM_is_rtl_char(int c) +{ + if (c < 0x590 || c > 0x900) return 0; + return 1; +} static const char* JM_font_name(fz_font* font) { @@ -1834,7 +1854,7 @@ static void jm_trace_text_span( } if (!space_adv) { - if (!mono) + if (!(fflags & TEXT_FONT_MONOSPACED)) { fz_font* out_font = nullptr; space_adv = mupdf::ll_fz_advance_glyph( @@ -1894,7 +1914,6 @@ static void jm_trace_text_span( << " fsize=" << fsize << " linewidth=" << linewidth << "\n"; - dict_setitem_drop(span_dict, dictkey_color, Py_BuildValue("fff", rgb[0], rgb[1], rgb[2])); dict_setitem_drop(span_dict, dictkey_size, PyFloat_FromDouble(fsize)); dict_setitemstr_drop(span_dict, "opacity", PyFloat_FromDouble((double) alpha)); @@ -2255,37 +2274,64 @@ void JM_append_rune(fz_buffer *buff, int ch); // but lines within a block are concatenated by space instead a new-line // character (which else leads to 2 new-lines). //----------------------------------------------------------------------------- -void JM_print_stext_page_as_text(mupdf::FzBuffer& res, mupdf::FzStextPage& page) +void _as_text(fz_stext_block *block, mupdf::FzBuffer& res, mupdf::FzStextPage& page) { + /* + Recursive function for output by blocks as identified by the + MuPDF SEGMENT logic. + The recursion happens when we encounter a structure block. + */ fz_rect rect = page.m_internal->mediabox; - - for (auto block: page) + int last_char; + fz_stext_line *line; + fz_stext_char *ch; + while (block) { - if (block.m_internal->type == FZ_STEXT_BLOCK_TEXT) + switch (block->type) { - for (auto line: block) - { - int last_char = 0; - for (auto ch: line) + case FZ_STEXT_BLOCK_STRUCT: + if (block->u.s.down) + { + _as_text(block->u.s.down->first_block, res, page); + } + break; + + case FZ_STEXT_BLOCK_TEXT: + last_char = 0; + for (line = block->u.t.first_line; line; line = line->next) { - fz_rect chbbox = JM_char_bbox( line, ch); - if (mupdf::ll_fz_is_infinite_rect(rect) - || JM_rects_overlap(rect, chbbox) - ) + for (ch = line->first_char; ch; ch = ch->next) + { + fz_rect chbbox = JM_char_bbox( line, ch); + if (mupdf::ll_fz_is_infinite_rect(rect) || JM_rects_overlap(rect, chbbox)) + { + last_char = ch->c; + JM_append_rune(res.m_internal, last_char); + } + } + if (last_char != 10 && last_char > 0) { - last_char = ch.m_internal->c; - JM_append_rune(res.m_internal, last_char); + mupdf::ll_fz_append_string(res.m_internal, "\n"); + last_char = 10; } } if (last_char != 10 && last_char > 0) { mupdf::ll_fz_append_string(res.m_internal, "\n"); + last_char = 10; } - } + break; } + block = block->next; } } +void JM_print_stext_page_as_text(mupdf::FzBuffer& res, mupdf::FzStextPage& page) +{ + fz_stext_block *block = page.m_internal->first_block; + _as_text(block, res, page); +} + // path_type is one of: @@ -3033,11 +3079,26 @@ mupdf::FzRect JM_make_spanlist( struct char_style { float size = -1; - int flags = -1; + unsigned flags = 0; + + #if MUPDF_VERSION_GE(1, 25, 2) + /* From mupdf:include/mupdf/fitz/structured-text.h:fz_stext_char::flags, which + uses anonymous enum values: + FZ_STEXT_STRIKEOUT = 1, + FZ_STEXT_UNDERLINE = 2, + FZ_STEXT_SYNTHETIC = 4, + FZ_STEXT_FILLED = 16, + FZ_STEXT_STROKED = 32, + FZ_STEXT_CLIPPED = 64 + */ + unsigned char_flags = 0; + #endif + const char *font = ""; - int color = -1; + unsigned argb = 0; float asc = 0; float desc = 0; + uint16_t bidi = 0; }; char_style old_style; char_style style; @@ -3049,20 +3110,39 @@ mupdf::FzRect JM_make_spanlist( { continue; } + /* Info from: + detect_super_script() + fz_font_is_italic() + fz_font_is_serif() + fz_font_is_monospaced() + fz_font_is_bold() + */ int flags = JM_char_font_flags( ch.m_internal->font, line.m_internal, ch.m_internal); fz_point origin = ch.m_internal->origin; style.size = ch.m_internal->size; style.flags = flags; + #if MUPDF_VERSION_GE(1, 25, 2) + /* FZ_STEXT_SYNTHETIC is per-char, not per-span. */ + style.char_flags = ch.m_internal->flags & ~FZ_STEXT_SYNTHETIC; + #endif style.font = JM_font_name(ch.m_internal->font); - style.color = ch.m_internal->color; + #if MUPDF_VERSION_GE(1, 25, 0) + style.argb = ch.m_internal->argb; + #else + style.argb = ch.m_internal->color; + #endif style.asc = JM_font_ascender(ch.m_internal->font); style.desc = JM_font_descender(ch.m_internal->font); if (0 || style.size != old_style.size || style.flags != old_style.flags - || style.color != old_style.color + #if MUPDF_VERSION_GE(1, 25, 2) + || style.char_flags != old_style.char_flags + #endif + || style.argb != old_style.argb || strcmp(style.font, old_style.font) != 0 + || style.bidi != old_style.bidi ) { if (old_style.size >= 0) @@ -3097,9 +3177,16 @@ mupdf::FzRect JM_make_spanlist( } DICT_SETITEM_DROP(span, dictkey_size, Py_BuildValue("f", style.size)); - DICT_SETITEM_DROP(span, dictkey_flags, Py_BuildValue("i", style.flags)); + DICT_SETITEM_DROP(span, dictkey_flags, Py_BuildValue("I", style.flags)); + DICT_SETITEM_DROP(span, dictkey_bidi, Py_BuildValue("I", style.bidi)); + #if MUPDF_VERSION_GE(1, 25, 2) + DICT_SETITEM_DROP(span, dictkey_char_flags, Py_BuildValue("I", style.char_flags)); + #endif DICT_SETITEM_DROP(span, dictkey_font, JM_EscapeStrFromStr(style.font)); - DICT_SETITEM_DROP(span, dictkey_color, Py_BuildValue("i", style.color)); + DICT_SETITEM_DROP(span, dictkey_color, Py_BuildValue("I", style.argb & 0xffffff)); + #if MUPDF_VERSION_GE(1, 25, 0) + DICT_SETITEMSTR_DROP(span, "alpha", Py_BuildValue("I", style.argb >> 24)); + #endif DICT_SETITEMSTR_DROP(span, "ascender", Py_BuildValue("f", asc)); DICT_SETITEMSTR_DROP(span, "descender", Py_BuildValue("f", desc)); @@ -3119,7 +3206,7 @@ mupdf::FzRect JM_make_spanlist( DICT_SETITEM_DROP(char_dict, dictkey_bbox, JM_py_from_rect(r)); DICT_SETITEM_DROP(char_dict, dictkey_c, Py_BuildValue("C", ch.m_internal->c)); - + DICT_SETITEMSTR_DROP(char_dict, "synthetic", Py_BuildValue("O", (ch.m_internal->flags & FZ_STEXT_SYNTHETIC) ? Py_True : Py_False)); if (!char_list) { char_list = PyList_New(0); @@ -3200,45 +3287,77 @@ int JM_append_word( return word_n + 1; // word counter } -PyObject* extractWORDS(mupdf::FzStextPage& this_tpage, PyObject *delimiters) +int _as_words(fz_stext_block *block, mupdf::FzBuffer& buff, fz_rect tp_rect, PyObject *lines, int block_n, PyObject *delimiters) { - int block_n = -1; - fz_rect wbbox = fz_empty_rect; // word bbox - fz_rect tp_rect = this_tpage.m_internal->mediabox; - - PyObject *lines = NULL; - mupdf::FzBuffer buff = mupdf::fz_new_buffer(64); - lines = PyList_New(0); - for (mupdf::FzStextBlock block: this_tpage) + /* 'buff' is intermediate storage for composing a word. Used as parameter only for + avoiding repeated allocation of an FzBuffer.*/ + int line_n; + fz_stext_line *line; + fz_stext_char *ch; + fz_rect wbbox, blockrect; + while (block) { - block_n++; - if (block.m_internal->type != FZ_STEXT_BLOCK_TEXT) + switch (block->type) { - continue; - } - int line_n = -1; - for (mupdf::FzStextLine line: block) - { - line_n++; - int word_n = 0; // word counter per line - mupdf::fz_clear_buffer(buff); // reset word buffer - size_t buflen = 0; // reset char counter - for (mupdf::FzStextChar ch: line) - { - mupdf::FzRect cbbox = JM_char_bbox(line, ch); - if (!JM_rects_overlap(tp_rect, *cbbox.internal()) && !fz_is_infinite_rect(tp_rect)) + case FZ_STEXT_BLOCK_STRUCT: + if (block->u.s.down) { - continue; + block_n = _as_words(block->u.s.down->first_block, buff, tp_rect, lines, block_n, delimiters); } - - int word_delimiter = JM_is_word_delimiter(ch.m_internal->c, delimiters); - if (word_delimiter) + break; + + case FZ_STEXT_BLOCK_TEXT: + block_n++; + blockrect = block->bbox; + wbbox = fz_empty_rect; + line_n = -1; + for (line = block->u.t.first_line; line; line = line->next) { - if (buflen == 0) + line_n++; + int word_n = 0; // word counter per line + mupdf::fz_clear_buffer(buff); // reset word buffer + int last_char_rtl = 0; // was last character RTL? + for (ch = line->first_char; ch; ch = ch->next) { - continue; // skip delimiters at line start + mupdf::FzRect cbbox = JM_char_bbox(line, ch); + if (!JM_rects_overlap(tp_rect, *cbbox.internal()) && !fz_is_infinite_rect(tp_rect)) + { + continue; + } + // prevent Unicode ZWJ 0x200d to start a word + if (mupdf::fz_buffer_storage(buff, NULL) == 0 && ch->c == 0x200d) + { + continue; + } + int word_delimiter = JM_is_word_delimiter(ch->c, delimiters); + int this_char_rtl = JM_is_rtl_char(ch->c); + if (word_delimiter || this_char_rtl != last_char_rtl) + { + if (mupdf::fz_buffer_storage(buff, NULL) == 0 && word_delimiter) + { + continue; // skip delimiters at line start + } + if (!fz_is_empty_rect(wbbox)) + { + word_n = JM_append_word( + lines, + buff.m_internal, + &wbbox, + block_n, + line_n, + word_n + ); + } + mupdf::fz_clear_buffer(buff); + if (word_delimiter) continue; + } + // append one unicode character to the word + JM_append_rune(buff.m_internal, ch->c); + last_char_rtl = this_char_rtl; + // enlarge word bbox + wbbox = fz_union_rect(wbbox, JM_char_bbox(line, ch)); } - if (!fz_is_empty_rect(wbbox)) + if (mupdf::fz_buffer_storage(buff, NULL) && !fz_is_empty_rect(wbbox)) { word_n = JM_append_word( lines, @@ -3250,34 +3369,27 @@ PyObject* extractWORDS(mupdf::FzStextPage& this_tpage, PyObject *delimiters) ); } mupdf::fz_clear_buffer(buff); - buflen = 0; // reset char counter - continue; } - // append one unicode character to the word - JM_append_rune(buff.m_internal, ch.m_internal->c); - buflen++; - // enlarge word bbox - wbbox = fz_union_rect(wbbox, JM_char_bbox(line, ch)); - } - if (buflen && !fz_is_empty_rect(wbbox)) - { - word_n = JM_append_word( - lines, - buff.m_internal, - &wbbox, - block_n, - line_n, - word_n - ); - } - mupdf::fz_clear_buffer(buff); - buflen = 0; + break; } + block = block->next; } - return lines; + return block_n; } +PyObject* extractWORDS(mupdf::FzStextPage& this_tpage, PyObject *delimiters) +{ + int block_n = -1; + fz_rect tp_rect = this_tpage.m_internal->mediabox; + PyObject *lines = NULL; + mupdf::FzBuffer buff = mupdf::fz_new_buffer(64); + lines = PyList_New(0); + mupdf::FzStextBlock block = this_tpage.m_internal->first_block; + block_n = _as_words(block.m_internal, buff, tp_rect, lines, block_n, delimiters); + return lines; +} + struct ScopedPyObject /* PyObject* wrapper, destructor calls Py_CLEAR() unless `release()` has been @@ -3314,74 +3426,116 @@ called. */ PyObject* m_pyobject = nullptr; }; - -PyObject* extractBLOCKS(mupdf::FzStextPage& self) +int _as_blocks(fz_stext_block *block, fz_rect tp_rect, PyObject *lines, int block_n) { - fz_stext_page *this_tpage = self.m_internal; - fz_rect tp_rect = this_tpage->mediabox; - mupdf::FzBuffer res(1024); - ScopedPyObject lines( PyList_New(0)); - int block_n = -1; - for (fz_stext_block* block = this_tpage->first_block; block; block = block->next) + /* + Recursive function for output by blocks as identified by the + MuPDF SEGMENT logic. + Recursion happens on encountering a structure block. + In addition to the previous support of text and image, we now also support + vector blocks. + */ + PyObject *text = NULL; + fz_rect blockrect; + mupdf::FzBuffer res; + while (block) { - ScopedPyObject text; - block_n++; - fz_rect blockrect = fz_empty_rect; - if (block->type == FZ_STEXT_BLOCK_TEXT) + switch (block->type) { - mupdf::fz_clear_buffer(res); // set text buffer to empty - int line_n = -1; - int last_char = 0; - (void) line_n; /* Not actually used, but keeping in the code for now. */ - for (fz_stext_line* line = block->u.t.first_line; line; line = line->next) - { - line_n++; - fz_rect linerect = fz_empty_rect; - for (fz_stext_char* ch = line->first_char; ch; ch = ch->next) + case FZ_STEXT_BLOCK_STRUCT: + if (block->u.s.down) { - fz_rect cbbox = JM_char_bbox(line, ch); - if (!JM_rects_overlap(tp_rect, cbbox) && !fz_is_infinite_rect(tp_rect)) + block_n = _as_blocks(block->u.s.down->first_block, tp_rect, lines, block_n); + } + break; + + case FZ_STEXT_BLOCK_TEXT: + blockrect = fz_empty_rect; + res = mupdf::fz_new_buffer(1024); + int last_char; + for (fz_stext_line* line = block->u.t.first_line; line; line = line->next) + { + fz_rect linerect = fz_empty_rect; + for (fz_stext_char* ch = line->first_char; ch; ch = ch->next) + { + fz_rect cbbox = JM_char_bbox(line, ch); + if (!JM_rects_overlap(tp_rect, cbbox) && !fz_is_infinite_rect(tp_rect)) + { + continue; + } + JM_append_rune(res.m_internal, ch->c); + last_char = ch->c; + linerect = fz_union_rect(linerect, cbbox); + } + if (last_char != 10 && !fz_is_empty_rect(linerect)) { - continue; + JM_append_rune(res.m_internal, 10); } - JM_append_rune(res.m_internal, ch->c); - last_char = ch->c; - linerect = fz_union_rect(linerect, cbbox); + blockrect = fz_union_rect(blockrect, linerect); } - if (last_char != 10 && !fz_is_empty_rect(linerect)) + text = JM_EscapeStrFromBuffer(res); + break; + + case FZ_STEXT_BLOCK_IMAGE: + if (fz_contains_rect(tp_rect, block->bbox) || fz_is_infinite_rect(tp_rect)) { - mupdf::fz_append_byte(res, 10); + blockrect = block->bbox; + fz_image *img = block->u.i.image; + fz_colorspace *cs = img->colorspace; + text = PyUnicode_FromFormat( + "\n", + mupdf::ll_fz_colorspace_name(cs), + img->w, + img->h, + img->bpc + ); } - blockrect = fz_union_rect(blockrect, linerect); - } - text = JM_EscapeStrFromBuffer(res); + break; + + case FZ_STEXT_BLOCK_VECTOR: + if (JM_rects_overlap(tp_rect, block->bbox) || fz_is_infinite_rect(tp_rect)) + { + blockrect = block->bbox; + int alpha = (int) (block->u.v.argb >> 24); + int color = (int) (block->u.v.argb & 0xffffff); + text = PyUnicode_FromFormat( + "\n\n", + (block->u.v.flags & FZ_STEXT_VECTOR_IS_STROKED) ? "stroked" : "filled", + color, + alpha, + (block->u.v.flags & FZ_STEXT_VECTOR_IS_RECTANGLE) ? "true":"false", + (block->u.v.flags & FZ_STEXT_VECTOR_CONTINUES) ? "true":"false"); + } + break; } - else if (JM_rects_overlap(tp_rect, block->bbox) || fz_is_infinite_rect(tp_rect)) + + if (text) { - fz_image *img = block->u.i.image; - fz_colorspace *cs = img->colorspace; - text = PyUnicode_FromFormat( - "", - mupdf::ll_fz_colorspace_name(cs), - img->w, - img->h, - img->bpc - ); - blockrect = fz_union_rect(blockrect, block->bbox); + block_n += 1; + PyObject *litem = PyTuple_New(7); + PyTuple_SET_ITEM(litem, 0, Py_BuildValue("f", blockrect.x0)); + PyTuple_SET_ITEM(litem, 1, Py_BuildValue("f", blockrect.y0)); + PyTuple_SET_ITEM(litem, 2, Py_BuildValue("f", blockrect.x1)); + PyTuple_SET_ITEM(litem, 3, Py_BuildValue("f", blockrect.y1)); + PyTuple_SET_ITEM(litem, 4, Py_BuildValue("O", text)); + PyTuple_SET_ITEM(litem, 5, Py_BuildValue("i", block_n)); + PyTuple_SET_ITEM(litem, 6, Py_BuildValue("i", block->type)); + LIST_APPEND(lines, litem); } - if (!fz_is_empty_rect(blockrect)) - { - ScopedPyObject litem = PyTuple_New(7); - PyTuple_SET_ITEM(litem.get(), 0, Py_BuildValue("f", blockrect.x0)); - PyTuple_SET_ITEM(litem.get(), 1, Py_BuildValue("f", blockrect.y0)); - PyTuple_SET_ITEM(litem.get(), 2, Py_BuildValue("f", blockrect.x1)); - PyTuple_SET_ITEM(litem.get(), 3, Py_BuildValue("f", blockrect.y1)); - PyTuple_SET_ITEM(litem.get(), 4, Py_BuildValue("O", text.get())); - PyTuple_SET_ITEM(litem.get(), 5, Py_BuildValue("i", block_n)); - PyTuple_SET_ITEM(litem.get(), 6, Py_BuildValue("i", block->type)); - LIST_APPEND(lines.get(), litem.get()); + text = NULL; + block = block->next; } + return block_n; } + +PyObject* extractBLOCKS(mupdf::FzStextPage& self) +{ + fz_stext_page *this_tpage = self.m_internal; + fz_rect tp_rect = this_tpage->mediabox; + ScopedPyObject lines(PyList_New(0)); + int block_n = -1; + fz_stext_block *block = this_tpage->first_block; + block_n = _as_blocks(block, tp_rect, lines.get(), block_n); return lines.release(); } @@ -3460,30 +3614,47 @@ void JM_make_image_block(fz_stext_block *block, PyObject *block_dict) { fz_context* ctx = mupdf::internal_context_get(); fz_image *image = block->u.i.image; - fz_buffer *buf = NULL, *freebuf = NULL; + fz_buffer *buf = NULL, *freebuf = NULL, *mask_buf = NULL; fz_compressed_buffer *buffer = fz_compressed_image_buffer(ctx, image); fz_var(buf); fz_var(freebuf); + fz_var(mask_buf); int n = fz_colorspace_n(ctx, image->colorspace); int w = image->w; int h = image->h; - const char *ext = NULL; + const char *ext = ""; int type = FZ_IMAGE_UNKNOWN; - if (buffer) + if (buffer) { type = buffer->params.type; + ext = JM_image_extension(type); + } if (type < FZ_IMAGE_BMP || type == FZ_IMAGE_JBIG2) type = FZ_IMAGE_UNKNOWN; PyObject *bytes = NULL; fz_var(bytes); + PyObject *mask_bytes = NULL; + fz_var(mask_bytes); fz_try(ctx) { - if (buffer && type != FZ_IMAGE_UNKNOWN) { - buf = buffer->buffer; - ext = JM_image_extension(type); - } else { + if (!buffer || type == FZ_IMAGE_UNKNOWN) + { buf = freebuf = fz_new_buffer_from_image_as_png(ctx, image, fz_default_color_params); ext = "png"; } + else if (n == 4 && strcmp(ext, "jpeg") == 0) // JPEG CMYK needs another step + { + buf = freebuf = fz_new_buffer_from_image_as_jpeg(ctx, image, fz_default_color_params, 95, 1); + } + else + { + buf = buffer->buffer; + } bytes = JM_BinFromBuffer(buf); + if (image->mask) { + mask_buf = fz_new_buffer_from_image_as_png(ctx, image->mask, fz_default_color_params); + mask_bytes = JM_BinFromBuffer(mask_buf); + } else { + mask_bytes = Py_BuildValue("s", NULL); + } } fz_always(ctx) { if (!bytes) @@ -3507,13 +3678,92 @@ void JM_make_image_block(fz_stext_block *block, PyObject *block_dict) DICT_SETITEM_DROP(block_dict, dictkey_size, Py_BuildValue("n", PyBytes_Size(bytes))); DICT_SETITEM_DROP(block_dict, dictkey_image, bytes); - + DICT_SETITEMSTR_DROP(block_dict, "mask", mask_bytes); + fz_drop_buffer(ctx, mask_buf); fz_drop_buffer(ctx, freebuf); } - fz_catch(ctx) {;} + fz_catch(ctx) + { + fz_ignore_error(ctx); + } + return; +} + + +void JM_make_vector_block(fz_stext_block *block, PyObject *block_dict) +{ + DICT_SETITEM_DROP(block_dict, dictkey_bbox, JM_py_from_rect(block->bbox)); + DICT_SETITEMSTR_DROP(block_dict, "stroked", JM_BOOL(block->u.v.flags & FZ_STEXT_VECTOR_IS_STROKED)); + DICT_SETITEMSTR_DROP(block_dict, "isrect", JM_BOOL(block->u.v.flags & FZ_STEXT_VECTOR_IS_RECTANGLE)); + DICT_SETITEMSTR_DROP(block_dict, "continues", JM_BOOL(block->u.v.flags & FZ_STEXT_VECTOR_CONTINUES)); + int color = (int) block->u.v.argb & 0xffffff; // extract color components + int alpha = block->u.v.argb >> 24; // extract alpha value + DICT_SETITEM_DROP(block_dict, dictkey_color, Py_BuildValue("i", color)); + DICT_SETITEMSTR_DROP(block_dict, "alpha", Py_BuildValue("i", alpha)); return; } +void JM_make_grid_block(fz_stext_block *block, PyObject *block_dict) +{ + Py_ssize_t i; + PyObject *pos; + + DICT_SETITEM_DROP(block_dict, dictkey_bbox, JM_py_from_rect(block->bbox)); + + DICT_SETITEM_DROP(block_dict, dictkey_type, Py_BuildValue("i", block->type)); + + DICT_SETITEMSTR_DROP(block_dict, "max_uncertain", Py_BuildValue("ii", + block->u.b.xs->max_uncertainty, + block->u.b.ys->max_uncertainty)); + + // x coordinates with uncertainties + pos = PyList_New((size_t) block->u.b.xs->len); + for (i = 0; i < block->u.b.xs->len; i++) + { + PyList_SetItem(pos, i, Py_BuildValue("fi", + block->u.b.xs->list[i].pos, + block->u.b.xs->list[i].uncertainty)); + } + DICT_SETITEMSTR_DROP(block_dict, "xpos", pos); + + // y coordinates with uncertainties + pos = PyList_New((size_t) block->u.b.ys->len); + for (i = 0; i < block->u.b.ys->len; i++) + { + PyList_SetItem(pos, i, Py_BuildValue("fi", + block->u.b.ys->list[i].pos, + block->u.b.ys->list[i].uncertainty)); + } + DICT_SETITEMSTR_DROP(block_dict, "ypos", pos); + + return; +} + + +void make_table_dict(fz_stext_page *tp, PyObject *table_dict, PyObject *bbox) +{ + fz_rect bounds = JM_rect_from_py(bbox); + fz_stext_block *block; + + try + { + block = mupdf::ll_fz_find_table_within_bounds(tp, bounds); + } + catch (std::exception&) + { + /* Ignore failure to find a table structure. */ + return; + } + + // Check if a table structure was found + if (block && block->type == FZ_STEXT_BLOCK_GRID) + { + JM_make_grid_block(block, table_dict); + } + +} + + static void JM_make_text_block(fz_stext_block *block, PyObject *block_dict, int raw, fz_buffer *buff, fz_rect tp_rect) { fz_stext_line *line; @@ -3549,38 +3799,111 @@ static void JM_make_text_block(fz_stext_block *block, PyObject *block_dict, int return; } + +void JM_make_struct_block(fz_stext_block *block, PyObject *block_dict) +{ + DICT_SETITEMSTR_DROP(block_dict, "index", Py_BuildValue("i",block->u.s.index)); + if (block->u.s.down) + { + DICT_SETITEMSTR_DROP(block_dict, "raw", Py_BuildValue("s",block->u.s.down->raw)); + DICT_SETITEMSTR_DROP(block_dict, "std", Py_BuildValue("s",fz_structure_to_string(block->u.s.down->standard))); + } + +} + + +int _as_dict(PyObject *block_list, fz_stext_block *block, fz_buffer *text_buffer, int raw, fz_rect tp_rect, int block_n) +{ + /* + Recursive function for output by blocks as identified by the + MuPDF SEGMENT logic. + */ + PyObject *block_dict; + while (block) + { + switch (block->type) + { + case FZ_STEXT_BLOCK_STRUCT: + if (block->u.s.down && block->u.s.down->first_block) + { + block_n++; + block_dict = PyDict_New(); + DICT_SETITEM_DROP(block_dict, dictkey_type, Py_BuildValue("i", block->type)); + DICT_SETITEM_DROP(block_dict, dictkey_number, Py_BuildValue("i", block_n)); + DICT_SETITEM_DROP(block_dict, dictkey_bbox, JM_py_from_rect(block->bbox)); + JM_make_struct_block(block, block_dict); + PyObject *subblocks = PyList_New(0); + block_n = _as_dict(subblocks, block->u.s.down->first_block, text_buffer, raw, tp_rect, block_n); + DICT_SETITEM_DROP(block_dict, dictkey_blocks, subblocks); + LIST_APPEND_DROP(block_list, block_dict); + } + break; + + case FZ_STEXT_BLOCK_TEXT: + if (JM_rects_overlap(tp_rect, block->bbox) || fz_is_infinite_rect(tp_rect)) + { + block_dict = PyDict_New(); + block_n++; + DICT_SETITEM_DROP(block_dict, dictkey_type, Py_BuildValue("i", block->type)); + DICT_SETITEM_DROP(block_dict, dictkey_number, Py_BuildValue("i", block_n)); + DICT_SETITEMSTR_DROP(block_dict, "flags", Py_BuildValue("i", block->u.t.flags)); + JM_make_text_block(block, block_dict, raw, text_buffer, tp_rect); + LIST_APPEND_DROP(block_list, block_dict); + } + break; + + case FZ_STEXT_BLOCK_IMAGE: + if (fz_contains_rect(tp_rect, block->bbox) || fz_is_infinite_rect(tp_rect)) + { + block_dict = PyDict_New(); + block_n++; + DICT_SETITEM_DROP(block_dict, dictkey_type, Py_BuildValue("i", block->type)); + DICT_SETITEM_DROP(block_dict, dictkey_number, Py_BuildValue("i", block_n)); + DICT_SETITEM_DROP(block_dict, dictkey_bbox, JM_py_from_rect(block->bbox)); + JM_make_image_block(block, block_dict); + LIST_APPEND_DROP(block_list, block_dict); + } + break; + + case FZ_STEXT_BLOCK_VECTOR: + if (JM_rects_overlap(tp_rect, block->bbox) || fz_is_infinite_rect(tp_rect)) + { + block_dict = PyDict_New(); + block_n++; + DICT_SETITEM_DROP(block_dict, dictkey_type, Py_BuildValue("i", block->type)); + DICT_SETITEM_DROP(block_dict, dictkey_number, Py_BuildValue("i", block_n)); + JM_make_vector_block(block, block_dict); + LIST_APPEND_DROP(block_list, block_dict); + } + break; + + case FZ_STEXT_BLOCK_GRID: + if (JM_rects_overlap(tp_rect, block->bbox) || fz_is_infinite_rect(tp_rect)) + { + block_dict = PyDict_New(); + block_n++; + DICT_SETITEM_DROP(block_dict, dictkey_type, Py_BuildValue("i", block->type)); + DICT_SETITEM_DROP(block_dict, dictkey_number, Py_BuildValue("i", block_n)); + JM_make_grid_block(block, block_dict); + LIST_APPEND_DROP(block_list, block_dict); + } + break; + } + block = block->next; + } + return block_n; +} + void JM_make_textpage_dict(fz_stext_page *tp, PyObject *page_dict, int raw) { fz_context* ctx = mupdf::internal_context_get(); fz_stext_block *block; fz_buffer *text_buffer = fz_new_buffer(ctx, 128); - PyObject *block_dict, *block_list = PyList_New(0); + PyObject *block_list = PyList_New(0); fz_rect tp_rect = tp->mediabox; + block = tp->first_block; int block_n = -1; - for (block = tp->first_block; block; block = block->next) { - block_n++; - if (!fz_contains_rect(tp_rect, block->bbox) && - !fz_is_infinite_rect(tp_rect) && - block->type == FZ_STEXT_BLOCK_IMAGE) { - continue; - } - if (!fz_is_infinite_rect(tp_rect) && - fz_is_empty_rect(fz_intersect_rect(tp_rect, block->bbox))) { - continue; - } - - block_dict = PyDict_New(); - DICT_SETITEM_DROP(block_dict, dictkey_number, Py_BuildValue("i", block_n)); - DICT_SETITEM_DROP(block_dict, dictkey_type, Py_BuildValue("i", block->type)); - if (block->type == FZ_STEXT_BLOCK_IMAGE) { - DICT_SETITEM_DROP(block_dict, dictkey_bbox, JM_py_from_rect(block->bbox)); - JM_make_image_block(block, block_dict); - } else { - JM_make_text_block(block, block_dict, raw, text_buffer, tp_rect); - } - - LIST_APPEND_DROP(block_list, block_dict); - } + block_n = _as_dict(block_list, block, text_buffer, raw, tp_rect, block_n); DICT_SETITEM_DROP(page_dict, dictkey_blocks, block_list); fz_drop_buffer(ctx, text_buffer); } @@ -3956,38 +4279,113 @@ no_more_matches:; return quads; } -/* MuPDF-1.23.x has an incorrect and unusable -fz_new_image_from_compressed_buffer() wrapper that thinks the `decode` and -`colorkey` args are out-params. So we provide an alternative wrapper where -we always set these to args to null, which is sufficient for PyMuPDF caller -`Document._insert_image()`. */ -fz_image* fz_new_image_from_compressed_buffer( - int w, - int h, - int bpc, - fz_colorspace *colorspace, - int xres, - int yres, - int interpolate, - int imagemask, - fz_compressed_buffer *buffer, - fz_image *mask - ) +void pixmap_copy( fz_pixmap* pm, const fz_pixmap* src, int n) { - return mupdf::ll_fz_new_image_from_compressed_buffer( - w, - h, - bpc, - colorspace, - xres, - yres, - interpolate, - imagemask, - nullptr, - nullptr, - buffer, - mask - ); + assert(pm->w == src->w); + assert(pm->h == src->h); + assert(n <= pm->n); + assert(n <= src->n); + + if (pm->n == src->n) + { + // identical samples + assert(pm->stride == src->stride); + memcpy(pm->samples, src->samples, pm->w * pm->h * pm->n); + } + else + { + int nn; + int do_alpha; + if (pm->n > src->n) + { + assert(pm->n == src->n + 1); + nn = src->n; + assert(!src->alpha); + assert(pm->alpha); + do_alpha = 1; + } + else + { + assert(src->n == pm->n + 1); + nn = pm->n; + assert(src->alpha); + assert(!pm->alpha); + do_alpha = 0; + } + for (int y=0; yh; ++y) + { + for (int x=0; xw; ++x) + { + memcpy( + pm->samples + pm->stride * y + pm->n * x, + src->samples + src->stride * y + src->n * x, + nn + ); + if (do_alpha) + { + pm->samples[pm->stride * y + pm->n * x + pm->n-1] = 255; + } + } + } + } +} + + +PyObject* ll_JM_color_count(fz_pixmap *pm, PyObject *clip) +{ + fz_context* ctx = mupdf::internal_context_get(); + PyObject* rc = PyDict_New(); + fz_irect irect = fz_pixmap_bbox(ctx, pm); + irect = fz_intersect_irect(irect, fz_round_rect(JM_rect_from_py(clip))); + if (fz_is_empty_irect(irect)) + { + return rc; + } + size_t stride = pm->stride; + size_t width = irect.x1 - irect.x0; + size_t height = irect.y1 - irect.y0; + size_t n = (size_t) pm->n; + size_t substride = width * n; + unsigned char* s = pm->samples + stride * (irect.y0 - pm->y) + n * (irect.x0 - pm->x); + // Cache previous pixel. + char oldpix[10]; + assert(n <= sizeof(oldpix)); + memcpy(oldpix, s, n); + long cnt = 0; + for (size_t i = 0; i < height; i++) + { + for (size_t j = 0; j < substride; j += n) + { + const char* newpix = (const char*) s + j; + if (memcmp(oldpix, newpix, n)) + { + /* Pixel differs from previous pixel, so update results with + last run of pixels. We get a PyObject representation of pixel + so we can look up in Python dict . */ + PyObject* pixel = PyBytes_FromStringAndSize(&oldpix[0], n); + PyObject* c = PyDict_GetItem(rc, pixel); + if (c) cnt += PyLong_AsLong(c); + DICT_SETITEM_DROP(rc, pixel, PyLong_FromLong(cnt)); + Py_DECREF(pixel); + /* Start next run of identical pixels. */ + cnt = 1; + memcpy(oldpix, newpix, n); + } + else + { + cnt += 1; + } + } + s += stride; + } + /* Update results with last pixel. */ + PyObject* pixel = PyBytes_FromStringAndSize(&oldpix[0], n); + PyObject* c = PyDict_GetItem(rc, pixel); + if (c) cnt += PyLong_AsLong(c); + DICT_SETITEM_DROP(rc, pixel, PyLong_FromLong(cnt)); + Py_DECREF(pixel); + PyErr_Clear(); + return rc; } %} @@ -4036,6 +4434,7 @@ int page_xref(mupdf::FzDocument& this_doc, int pno); void _newPage(mupdf::FzDocument& self, int pno=-1, float width=595, float height=842); void _newPage(mupdf::PdfDocument& self, int pno=-1, float width=595, float height=842); void JM_add_annot_id(mupdf::PdfAnnot& annot, const char* stem); +void JM_set_annot_callout_line(mupdf::PdfAnnot& annot, PyObject *callout, int count); std::vector< std::string> JM_get_annot_id_list(mupdf::PdfPage& page); mupdf::PdfAnnot _add_caret_annot(mupdf::PdfPage& self, mupdf::FzPoint& point); mupdf::PdfAnnot _add_caret_annot(mupdf::FzPage& self, mupdf::FzPoint& point); @@ -4105,6 +4504,7 @@ fz_stext_page* page_get_textpage( PyObject* matrix ); +void make_table_dict(fz_stext_page *tp, PyObject *table_dict, PyObject *bbox); void JM_make_textpage_dict(fz_stext_page *tp, PyObject *page_dict, int raw); PyObject *pixmap_pixel(fz_pixmap* pm, int x, int y); int pixmap_n(mupdf::FzPixmap& pixmap); @@ -4113,17 +4513,10 @@ PyObject* JM_search_stext_page(fz_stext_page *page, const char *needle); PyObject *set_pixel(fz_pixmap* pm, int x, int y, PyObject *color); -fz_image* fz_new_image_from_compressed_buffer( - int w, - int h, - int bpc, - fz_colorspace *colorspace, - int xres, - int yres, - int interpolate, - int imagemask, - fz_compressed_buffer *buffer, - fz_image *mask - ); +/* Copies from to , which must have same width and height. pm->n - +src->n must be -1, 0 or +1. If -1, must have alpha and must not have +alpha, and we copy the non-alpha bytes. If +1 must not have alpha and + must have alpha and we set 's alpha bytes all to 255.*/ +void pixmap_copy(fz_pixmap* pm, const fz_pixmap* src, int n); -void rearrange_pages2( mupdf::PdfDocument& doc, PyObject *new_pages); +PyObject* ll_JM_color_count(fz_pixmap *pm, PyObject *clip); diff --git a/src/fitz___init__.py b/src/fitz___init__.py index 1373a88f0..c4c7bd88c 100644 --- a/src/fitz___init__.py +++ b/src/fitz___init__.py @@ -9,3 +9,5 @@ from pymupdf import _log_items_clear from pymupdf import __version__ from pymupdf import __doc__ +from pymupdf import _globals +from pymupdf import _g_out_message diff --git a/src/table.py b/src/table.py index b9301e65a..9b73782d3 100644 --- a/src/table.py +++ b/src/table.py @@ -79,25 +79,224 @@ from collections.abc import Sequence from dataclasses import dataclass from operator import itemgetter +import weakref +import pymupdf +from pymupdf import mupdf # ------------------------------------------------------------------- # Start of PyMuPDF interface code # ------------------------------------------------------------------- -from . import ( - Rect, - Matrix, - TEXTFLAGS_TEXT, - TOOLS, - EMPTY_RECT, - sRGB_to_pdf, - Point, - message, -) EDGES = [] # vector graphics from PyMuPDF CHARS = [] # text characters from PyMuPDF TEXTPAGE = None +TEXT_BOLD = mupdf.FZ_STEXT_BOLD +TEXT_STRIKEOUT = mupdf.FZ_STEXT_STRIKEOUT +FLAGS = ( + 0 + | pymupdf.TEXTFLAGS_TEXT + | pymupdf.TEXT_COLLECT_STYLES + | pymupdf.TEXT_ACCURATE_BBOXES + | pymupdf.TEXT_MEDIABOX_CLIP +) +# needed by mupdf function fz_find_table_within_bounds(). +TABLE_DETECTOR_FLAGS = ( + 0 + | pymupdf.TEXT_ACCURATE_BBOXES + | pymupdf.TEXT_SEGMENT + | pymupdf.TEXT_COLLECT_VECTORS + | pymupdf.TEXT_MEDIABOX_CLIP +) white_spaces = set(string.whitespace) # for checking white space only cells + + +def _iou(r1, r2): + """Compute intersection over union of two rectangles.""" + ix = max(0, min(r1[2], r2[2]) - max(r1[0], r2[0])) + iy = max(0, min(r1[3], r2[3]) - max(r1[1], r2[1])) + intersection = ix * iy # intersection area + if not intersection: + return 0 + area1 = (r1[2] - r1[0]) * (r1[3] - r1[1]) + area2 = (r2[2] - r2[0]) * (r2[3] - r2[1]) + return intersection / (area1 + area2 - intersection) + + +def intersects_words_h(bbox, y, word_rects) -> bool: + """Check whether any of the words in bbox are cut through by + horizontal line y. + """ + return any(r.y0 < y < r.y1 for r in word_rects if r in bbox) + + +def get_table_dict_from_rect(textpage, rect): + """Extract MuPDF table structure information from a given rectangle.""" + table_dict = {} + pymupdf.extra.make_table_dict(textpage.this.m_internal, table_dict, rect) + return table_dict + + +def make_table_from_bbox(textpage, word_rects, rect): + """Detect table structure within a given rectangle.""" + cells = [] # table cells as (x0,y0,x1,y1) tuples + + # calls fz_find_table_within_bounds + block = get_table_dict_from_rect(textpage, rect) + # No table structure found if not a grid block + if block.get("type") != mupdf.FZ_STEXT_BLOCK_GRID: + return cells + bbox = pymupdf.Rect(block["bbox"]) # resulting table bbox + + # lists of (pos,uncertainty) tuples + xpos = sorted(block["xpos"], key=lambda x: x[0]) + ypos = sorted(block["ypos"], key=lambda y: y[0]) + + # maximum uncertainties in x and y directions + xmaxu, ymaxu = block["max_uncertain"] + + # Modify ypos to remove uncertain positions, and y positions + # that cut through words. + nypos = [] + for y, yunc in ypos: + if yunc > 0: # allow no uncertain y values + continue + if intersects_words_h(bbox, y, word_rects): + continue # allow no y that cuts through words + if nypos and (y - nypos[-1] < 3): + nypos[-1] = y # snap close positions + else: + nypos.append(y) + + # New max y uncertainty: 35% of remaining y positions. + # Omit x positions that intersect too many words, otherwise + # only remove x for the affected cells. + ymaxu = max(0, round((len(nypos) - 2) * 0.35)) + + # Exclude x positions with too high uncertainty + # (we allow more uncertainty in x direction) + nxpos = [x[0] for x in xpos if x[1] <= ymaxu] + if bbox.x1 > nxpos[-1] + 3: + nxpos.append(bbox.x1) # ensure right table border + + # Compose cells from the remaining x and y positions. + for i in range(len(nypos) - 1): + row_box = pymupdf.Rect(bbox.x0, nypos[i], bbox.x1, nypos[i + 1]) + # Sub-select words in this row and sort them by left coordinate + row_words = sorted([r for r in word_rects if r in row_box], key=lambda r: r.x0) + # Sub-select x values that do not cut through words + this_xpos = [x for x in nxpos if not any(r.x0 < x < r.x1 for r in row_words)] + for j in range(len(this_xpos) - 1): + cell = pymupdf.Rect(this_xpos[j], nypos[i], this_xpos[j + 1], nypos[i + 1]) + if not cell.is_empty: # valid cell + cells.append(tuple(cell)) + # Add new table to TableFinder tables + return cells + + +def extract_cells(textpage, cell, markdown=False): + """Extract text from a rect-like 'cell' as plain or MD styled text. + + This function should ultimately be used to extract text from a table cell. + Markdown output will only work correctly if extraction flag bit + TEXT_COLLECT_STYLES is set. + + Args: + textpage: A PyMuPDF TextPage object. Must have been created with + TEXTFLAGS_TEXT | TEXT_COLLECT_STYLES. + cell: A tuple (x0, y0, x1, y1) defining the cell's bbox. + markdown: If True, return text formatted for Markdown. + + Returns: + A string with the text extracted from the cell. + """ + text = "" + for block in textpage.extractRAWDICT()["blocks"]: + if block["type"] != 0: + continue + block_bbox = block["bbox"] + if ( + 0 + or block_bbox[0] > cell[2] + or block_bbox[2] < cell[0] + or block_bbox[1] > cell[3] + or block_bbox[3] < cell[1] + ): + continue # skip block outside cell + for line in block["lines"]: + lbbox = line["bbox"] + if ( + 0 + or lbbox[0] > cell[2] + or lbbox[2] < cell[0] + or lbbox[1] > cell[3] + or lbbox[3] < cell[1] + ): + continue # skip line outside cell + + if text: # must be a new line in the cell + text += "
" if markdown else "\n" + + # strikeout detection only works with horizontal text + horizontal = line["dir"] == (0, 1) or line["dir"] == (1, 0) + + for span in line["spans"]: + sbbox = span["bbox"] + if ( + 0 + or sbbox[0] > cell[2] + or sbbox[2] < cell[0] + or sbbox[1] > cell[3] + or sbbox[3] < cell[1] + ): + continue # skip spans outside cell + + # only include chars with more than 50% bbox overlap + span_text = "" + for char in span["chars"]: + this_char = char["c"] + bbox = pymupdf.Rect(char["bbox"]) + if abs(bbox & cell) > 0.5 * abs(bbox): + span_text += this_char + elif this_char in white_spaces: + span_text += " " + + if not span_text: + continue # skip empty span + + if not markdown: # no MD styling + text += span_text + continue + + prefix = "" + suffix = "" + if horizontal and span["char_flags"] & TEXT_STRIKEOUT: + prefix += "~~" + suffix = "~~" + suffix + if span["char_flags"] & TEXT_BOLD: + prefix += "**" + suffix = "**" + suffix + if span["flags"] & pymupdf.TEXT_FONT_ITALIC: + prefix += "_" + suffix = "_" + suffix + if span["flags"] & pymupdf.TEXT_FONT_MONOSPACED: + prefix += "`" + suffix = "`" + suffix + + if len(span["chars"]) > 2: + span_text = span_text.rstrip() + + # if span continues previous styling: extend cell text + if (ls := len(suffix)) and text.endswith(suffix): + text = text[:-ls] + span_text + suffix + else: # append the span with new styling + if not span_text.strip(): + text += " " + else: + text += prefix + span_text + suffix + + return text.strip() + + # ------------------------------------------------------------------- # End of PyMuPDF interface code # ------------------------------------------------------------------- @@ -1061,7 +1260,7 @@ def get_center(word): if not overlap: condensed_bboxes.append(bbox) - if len(condensed_bboxes) == 0: + if not condensed_bboxes: return [] condensed_rects = map(bbox_to_rect, condensed_bboxes) @@ -1244,7 +1443,7 @@ def bbox_to_corners(bbox) -> tuple: # PyMuPDF modification: # Remove tables without text or having only 1 column for i in range(len(tables) - 1, -1, -1): - r = EMPTY_RECT() + r = pymupdf.EMPTY_RECT() x1_vals = set() x0_vals = set() for c in tables[i]: @@ -1367,33 +1566,69 @@ def char_in_bbox(char, bbox) -> bool: return table_arr - def to_markdown(self, clean=True): + def to_markdown(self, clean=False, fill_empty=True): """Output table content as a string in Github-markdown format. - If clean is true, markdown syntax is removed from cell content.""" + If "clean" then markdown syntax is removed from cell content. + If "fill_empty" then cell content None is replaced by the values + above (columns) or left (rows) in an effort to approximate row and + columns spans. + + """ output = "|" + rows = self.row_count + cols = self.col_count + + # cell coordinates + cell_boxes = [[c for c in r.cells] for r in self.rows] + + # cell text strings + cells = [[None for i in range(cols)] for j in range(rows)] + for i, row in enumerate(cell_boxes): + for j, cell in enumerate(row): + if cell is not None: + cells[i][j] = extract_cells( + TEXTPAGE, cell_boxes[i][j], markdown=True + ) + + if fill_empty: # fill "None" cells where possible - # generate header string and MD underline + # for rows, copy content from left to right + for j in range(rows): + for i in range(cols - 1): + if cells[j][i + 1] is None: + cells[j][i + 1] = cells[j][i] + + # for columns, copy top to bottom + for i in range(cols): + for j in range(rows - 1): + if cells[j + 1][i] is None: + cells[j + 1][i] = cells[j][i] + + # generate header string and MD separator for i, name in enumerate(self.header.names): - if name is None or name == "": # generate a name if empty + if not name: # generate a name if empty name = f"Col{i+1}" - name = name.replace("\n", " ") # remove any line breaks + name = name.replace("\n", "
") # use HTML line breaks if clean: # remove sensitive syntax name = html.escape(name.replace("-", "-")) output += name + "|" output += "\n" + # insert GitHub header line separator output += "|" + "|".join("---" for i in range(self.col_count)) + "|\n" # skip first row in details if header is part of the table j = 0 if self.header.external else 1 # iterate over detail rows - for row in self.extract()[j:]: + for row in cells[j:]: line = "|" for i, cell in enumerate(row): - # output None cells with empty string - cell = "" if cell is None else cell.replace("\n", " ") + # replace None cells with empty string + # use HTML line break tag + if cell is None: + cell = "" if clean: # remove sensitive syntax cell = html.escape(cell.replace("-", "-")) line += cell + "|" @@ -1406,7 +1641,7 @@ def to_pandas(self, **kwargs): try: import pandas as pd except ModuleNotFoundError: - message("Package 'pandas' is not installed") + pymupdf.message("Package 'pandas' is not installed") raise pd_dict = {} @@ -1462,77 +1697,111 @@ def _get_header(self, y_tolerance=3): page = self.page y_delta = y_tolerance - def top_row_is_bold(bbox): - """Check if row 0 has bold text anywhere. + def top_row_bg_color(self): + """ + Compare top row background color with color of same-sized bbox + above. If different, return True indicating that the original + table top row is already the header. + """ + bbox0 = pymupdf.Rect(self.rows[0].bbox) + bboxt = bbox0 + (0, -bbox0.height, 0, -bbox0.height) # area above + top_color0 = page.get_pixmap(clip=bbox0).color_topusage()[1] + top_colort = page.get_pixmap(clip=bboxt).color_topusage()[1] + if top_color0 != top_colort: + return True # top row is header + return False - If this is true, then any non-bold text in lines above disqualify - these lines as header. + def row_has_bold(bbox): + """Check if a row contains some bold text. - bbox is the (potentially repaired) row 0 bbox. + If e.g. true for the top row, then it will be used as (internal) + column header row if any of the following is true: + * the previous (above) text line has no bold span + * the second table row text has no bold span - Returns True or False + Returns True if any spans are bold else False. """ - for b in page.get_text("dict", flags=TEXTFLAGS_TEXT, clip=bbox)["blocks"]: - for l in b["lines"]: - for s in l["spans"]: - if s["flags"] & 16: - return True - return False + blocks = page.get_text("dict", flags=pymupdf.TEXTFLAGS_TEXT, clip=bbox)[ + "blocks" + ] + spans = [s for b in blocks for l in b["lines"] for s in l["spans"]] + + return any(s["flags"] & pymupdf.TEXT_FONT_BOLD for s in spans) try: row = self.rows[0] cells = row.cells - bbox = Rect(row.bbox) + bbox = pymupdf.Rect(row.bbox) except IndexError: # this table has no rows return None # return this if we determine that the top row is the header header_top_row = TableHeader(bbox, cells, self.extract()[0], False) - # one-line tables have no extra header + # 1-line tables have no extra header if len(self.rows) < 2: return header_top_row - # x-ccordinates of columns between x0 and x1 of the table + # 1-column tables have no extra header if len(cells) < 2: return header_top_row - col_x = [ - c[2] if c is not None else None for c in cells[:-1] - ] # column (x) coordinates + # assume top row is the header if second row is empty + row2 = self.rows[1] # second row + if all(c is None for c in row2.cells): # no valid cell bboxes in row2 + return header_top_row # Special check: is top row bold? - # If first line above table is not bold, but top-left table cell is bold, - # we take first table row as header - top_row_bold = top_row_is_bold(bbox) + top_row_bold = row_has_bold(bbox) + + # assume top row is header if it is bold and any cell + # of 2nd row is non-bold + if top_row_bold and not row_has_bold(row2.bbox): + return header_top_row - # clip = area above table + if top_row_bg_color(self): + # if area above top row has a different background color, + # then top row is already the header + return header_top_row + + # column coordinates (x1 values) in top row + col_x = [c[2] if c is not None else None for c in cells[:-1]] + + # clip = page area above the table # We will inspect this area for text qualifying as column header. clip = +bbox # take row 0 bbox clip.y0 = 0 # start at top of page clip.y1 = bbox.y0 # end at top of table - spans = [] # the text spans inside clip - for b in page.get_text("dict", clip=clip, flags=TEXTFLAGS_TEXT)["blocks"]: - for l in b["lines"]: - for s in l["spans"]: - if ( - not s["flags"] & 1 and s["text"].strip() - ): # ignore superscripts and empty text - spans.append(s) + blocks = page.get_text("dict", clip=clip, flags=pymupdf.TEXTFLAGS_TEXT)[ + "blocks" + ] + # non-empty, non-superscript spans above table, sorted descending by y1 + spans = sorted( + [ + s + for b in blocks + for l in b["lines"] + for s in l["spans"] + if not ( + white_spaces.issuperset(s["text"]) + or s["flags"] & pymupdf.TEXT_FONT_SUPERSCRIPT + ) + ], + key=lambda s: s["bbox"][3], + reverse=True, + ) select = [] # y1 coordinates above, sorted descending line_heights = [] # line heights above, sorted descending line_bolds = [] # bold indicator per line above, same sorting - # spans sorted descending - spans.sort(key=lambda s: s["bbox"][3], reverse=True) # walk through the spans and fill above 3 lists for i in range(len(spans)): s = spans[i] y1 = s["bbox"][3] # span bottom h = y1 - s["bbox"][1] # span bbox height - bold = s["flags"] & 16 + bold = s["flags"] & pymupdf.TEXT_FONT_BOLD # use first item to start the lists if i == 0: @@ -1541,7 +1810,7 @@ def top_row_is_bold(bbox): line_bolds.append(bold) continue - # get last items from the 3 lists + # get previous items from the 3 lists y0 = select[-1] h0 = line_heights[-1] bold0 = line_bolds[-1] @@ -1565,13 +1834,13 @@ def top_row_is_bold(bbox): if select == []: # nothing above the table? return header_top_row - select = select[:5] # only accept up to 5 lines in any header + select = select[:5] # accept up to 5 lines for an external header - # take top row as header if text above table is too far apart + # assume top row as header if text above is too far away if bbox.y0 - select[0] >= line_heights[0]: return header_top_row - # if top table row is bold, but line above is not: + # accept top row as header if bold, but line above is not if top_row_bold and not line_bolds[0]: return header_top_row @@ -1579,7 +1848,7 @@ def top_row_is_bold(bbox): return header_top_row # re-compute clip above table - nclip = EMPTY_RECT() + nclip = pymupdf.EMPTY_RECT() for s in [s for s in spans if s["bbox"][3] >= select[-1]]: nclip |= s["bbox"] if not nclip.is_empty: @@ -1588,7 +1857,7 @@ def top_row_is_bold(bbox): clip.y1 = bbox.y0 # make sure we still include every word above # Confirm that no word in clip is intersecting a column separator - word_rects = [Rect(w[:4]) for w in page.get_text("words", clip=clip)] + word_rects = [pymupdf.Rect(w[:4]) for w in page.get_text("words", clip=clip)] word_tops = sorted(list(set([r[1] for r in word_rects])), reverse=True) select = [] @@ -1738,7 +2007,7 @@ class TableFinder: """ def __init__(self, page, settings=None): - self.page = page + self.page = weakref.proxy(page) self.settings = TableSettings.resolve(settings) self.edges = self.get_edges() self.intersections = edges_to_intersections( @@ -1883,18 +2152,18 @@ def __getitem__(self, i): # ----------------------------------------------------------------------------- def make_chars(page, clip=None): """Extract text as "rawdict" to fill CHARS.""" - global CHARS, TEXTPAGE + global TEXTPAGE page_number = page.number + 1 page_height = page.rect.height ctm = page.transformation_matrix - TEXTPAGE = page.get_textpage(clip=clip, flags=TEXTFLAGS_TEXT) + TEXTPAGE = page.get_textpage(clip=clip, flags=FLAGS) blocks = page.get_text("rawdict", textpage=TEXTPAGE)["blocks"] doctop_base = page_height * page.number for block in blocks: for line in block["lines"]: ldir = line["dir"] # = (cosine, sine) of angle ldir = (round(ldir[0], 4), round(ldir[1], 4)) - matrix = Matrix(ldir[0], -ldir[1], ldir[1], ldir[0], 0, 0) + matrix = pymupdf.Matrix(ldir[0], -ldir[1], ldir[1], ldir[0], 0, 0) if ldir[1] == 0: upright = True else: @@ -1902,11 +2171,11 @@ def make_chars(page, clip=None): for span in sorted(line["spans"], key=lambda s: s["bbox"][0]): fontname = span["font"] fontsize = span["size"] - color = sRGB_to_pdf(span["color"]) + color = pymupdf.sRGB_to_pdf(span["color"]) for char in sorted(span["chars"], key=lambda c: c["bbox"][0]): - bbox = Rect(char["bbox"]) + bbox = pymupdf.Rect(char["bbox"]) bbox_ctm = bbox * ctm - origin = Point(char["origin"]) * ctm + origin = pymupdf.Point(char["origin"]) * ctm matrix.e = origin.x matrix.f = origin.y text = char["c"] @@ -1942,8 +2211,7 @@ def make_chars(page, clip=None): # We are ignoring Bézier curves completely and are converting everything # else to lines. # ------------------------------------------------------------------------ -def make_edges(page, clip=None, tset=None, add_lines=None): - global EDGES +def make_edges(page, clip=None, tset=None, paths=None, add_lines=None, add_boxes=None): snap_x = tset.snap_x_tolerance snap_y = tset.snap_y_tolerance min_length = tset.edge_min_length @@ -1957,9 +2225,9 @@ def make_edges(page, clip=None, tset=None, add_lines=None): prect = page.rect if page.rotation in (90, 270): w, h = prect.br - prect = Rect(0, 0, h, w) + prect = pymupdf.Rect(0, 0, h, w) if clip is not None: - clip = Rect(clip) + clip = pymupdf.Rect(clip) else: clip = prect @@ -1995,16 +2263,19 @@ def are_neighbors(r1, r2): return True return False - def clean_graphics(): + def clean_graphics(npaths=None): """Detect and join rectangles of "connected" vector graphics.""" - - paths = [] # paths relevant for table detection - for p in page.get_drawings(): - # ignore fill-only graphics if they do not simulate lines, - # which means one of width or height are small. + if npaths is None: + allpaths = page.get_drawings() + else: # accept passed-in vector graphics + allpaths = npaths[:] # paths relevant for table detection + paths = [] + for p in allpaths: + # If only looking at lines, we ignore fill-only paths, + # except simulated lines (i.e. small width or height). if ( - p["type"] == "f" - and lines_strict + lines_strict + and p["type"] == "f" and p["rect"].width > snap_x and p["rect"].height > snap_y ): @@ -2039,7 +2310,7 @@ def clean_graphics(): return new_rects, paths - bboxes, paths = clean_graphics() + bboxes, paths = clean_graphics(npaths=paths) def is_parallel(p1, p2): """Check if line is roughly axis-parallel.""" @@ -2127,8 +2398,8 @@ def make_line(p, p1, p2, clip): rect.width <= min_length and rect.width < rect.height ): # simulates a vertical line x = abs(rect.x1 + rect.x0) / 2 # take middle value for x - p1 = Point(x, rect.y0) - p2 = Point(x, rect.y1) + p1 = pymupdf.Point(x, rect.y0) + p2 = pymupdf.Point(x, rect.y1) line_dict = make_line(p, p1, p2, clip) if line_dict: EDGES.append(line_to_edge(line_dict)) @@ -2138,8 +2409,8 @@ def make_line(p, p1, p2, clip): rect.height <= min_length and rect.height < rect.width ): # simulates a horizontal line y = abs(rect.y1 + rect.y0) / 2 # take middle value for y - p1 = Point(rect.x0, y) - p2 = Point(rect.x1, y) + p1 = pymupdf.Point(rect.x0, y) + p2 = pymupdf.Point(rect.x1, y) line_dict = make_line(p, p1, p2, clip) if line_dict: EDGES.append(line_to_edge(line_dict)) @@ -2204,12 +2475,31 @@ def make_line(p, p1, p2, clip): else: add_lines = [] for p1, p2 in add_lines: - p1 = Point(p1) - p2 = Point(p2) + p1 = pymupdf.Point(p1) + p2 = pymupdf.Point(p2) line_dict = make_line(path, p1, p2, clip) if line_dict: EDGES.append(line_to_edge(line_dict)) + if add_boxes is not None: # add user-specified rectangles + assert isinstance(add_boxes, (tuple, list)) + else: + add_boxes = [] + for box in add_boxes: + r = pymupdf.Rect(box) + line_dict = make_line(path, r.tl, r.bl, clip) + if line_dict: + EDGES.append(line_to_edge(line_dict)) + line_dict = make_line(path, r.bl, r.br, clip) + if line_dict: + EDGES.append(line_to_edge(line_dict)) + line_dict = make_line(path, r.br, r.tr, clip) + if line_dict: + EDGES.append(line_to_edge(line_dict)) + line_dict = make_line(path, r.tr, r.tl, clip) + if line_dict: + EDGES.append(line_to_edge(line_dict)) + def page_rotation_set0(page): """Nullify page rotation. @@ -2225,17 +2515,17 @@ def page_rotation_set0(page): if rot == 90: # before derotation, shift content horizontally - mat0 = Matrix(1, 0, 0, 1, mb.y1 - mb.x1 - mb.x0 - mb.y0, 0) + mat0 = pymupdf.Matrix(1, 0, 0, 1, mb.y1 - mb.x1 - mb.x0 - mb.y0, 0) elif rot == 270: # before derotation, shift content vertically - mat0 = Matrix(1, 0, 0, 1, 0, mb.x1 - mb.y1 - mb.y0 - mb.x0) + mat0 = pymupdf.Matrix(1, 0, 0, 1, 0, mb.x1 - mb.y1 - mb.y0 - mb.x0) else: - mat0 = Matrix(1, 0, 0, 1, -2 * mb.x0, -2 * mb.y0) + mat0 = pymupdf.Matrix(1, 0, 0, 1, -2 * mb.x0, -2 * mb.y0) # prefix with derotation matrix mat = mat0 * page.derotation_matrix cmd = b"%g %g %g %g %g %g cm " % tuple(mat) - xref = TOOLS._insert_contents(page, cmd, 0) + xref = pymupdf.TOOLS._insert_contents(page, cmd, 0) # swap x- and y-coordinates if rot in (90, 270): @@ -2291,13 +2581,16 @@ def find_tables( text_x_tolerance=3, text_y_tolerance=3, strategy=None, # offer abbreviation - add_lines=None, # optional user-specified lines + add_lines=None, # user-specified lines + add_boxes=None, # user-specified rectangles + paths=None, # accept vector graphics as parameter ): + pymupdf._warn_layout_once() global CHARS, EDGES CHARS = [] EDGES = [] - old_small = bool(TOOLS.set_small_glyph_heights()) # save old value - TOOLS.set_small_glyph_heights(True) # we need minimum bboxes + old_small = bool(pymupdf.TOOLS.set_small_glyph_heights()) # save old value + pymupdf.TOOLS.set_small_glyph_heights(True) # we need minimum bboxes if page.rotation != 0: page, old_xref, old_rot, old_mediabox = page_rotation_set0(page) else: @@ -2340,16 +2633,65 @@ def find_tables( "text_x_tolerance": text_x_tolerance, "text_y_tolerance": text_y_tolerance, } - tset = TableSettings.resolve(settings=settings) - page.table_settings = tset - - make_chars(page, clip=clip) # create character list of page - make_edges( - page, clip=clip, tset=tset, add_lines=add_lines - ) # create lines and curves - tables = TableFinder(page, settings=tset) - - TOOLS.set_small_glyph_heights(old_small) - if old_xref is not None: - page = page_rotation_reset(page, old_xref, old_rot, old_mediabox) - return tables + + old_quad_corrections = pymupdf.TOOLS.unset_quad_corrections() + try: + page.get_layout() + if page.layout_information: + pymupdf.TOOLS.unset_quad_corrections(True) + boxes = [ + pymupdf.Rect(b[:4]) for b in page.layout_information if b[-1] == "table" + ] + else: + boxes = [] + + if boxes: # layout did find some tables + pass + elif page.layout_information is not None: + # layout was executed but found no tables + # make sure we exit quickly with an empty TableFinder + tbf = TableFinder(page) + return tbf + + tset = TableSettings.resolve(settings=settings) + page.table_settings = tset + + make_chars(page, clip=clip) # create character list of page + make_edges( + page, + clip=clip, + tset=tset, + paths=paths, + add_lines=add_lines, + add_boxes=add_boxes, + ) # create lines and curves + + tbf = TableFinder(page, settings=tset) + + if boxes: + # only keep Finder tables that match a layout box + tbf.tables = [ + tab + for tab in tbf.tables + if any(_iou(tab.bbox, r) >= 0.6 for r in boxes) + ] + # build the complementary list of layout table boxes + my_boxes = [ + r for r in boxes if all(_iou(r, tab.bbox) < 0.6 for tab in tbf.tables) + ] + if my_boxes: + word_rects = [pymupdf.Rect(w[:4]) for w in TEXTPAGE.extractWORDS()] + tp2 = page.get_textpage(flags=TABLE_DETECTOR_FLAGS) + for rect in my_boxes: + cells = make_table_from_bbox(tp2, word_rects, rect) # pylint: disable=E0606 + tbf.tables.append(Table(page, cells)) + except Exception as e: + pymupdf.message("find_tables: exception occurred: %s" % str(e)) + return None + finally: + pymupdf.TOOLS.set_small_glyph_heights(old_small) + if old_xref is not None: + page = page_rotation_reset(page, old_xref, old_rot, old_mediabox) + pymupdf.TOOLS.unset_quad_corrections(old_quad_corrections) + + return tbf diff --git a/src/utils.py b/src/utils.py index 3d7d10e25..4ea5668f3 100644 --- a/src/utils.py +++ b/src/utils.py @@ -6,9 +6,7 @@ # lightweight PDF, XPS, and E-book viewer, renderer and toolkit which is # maintained and developed by Artifex Software, Inc. https://artifex.com. # ------------------------------------------------------------------------ -import io import math -import os import typing import weakref @@ -25,17 +23,25 @@ g_exceptions_verbose = pymupdf.g_exceptions_verbose -TESSDATA_PREFIX = os.environ.get("TESSDATA_PREFIX") point_like = "point_like" rect_like = "rect_like" matrix_like = "matrix_like" quad_like = "quad_like" + +# ByteString is gone from typing in 3.14. +# collections.abc.Buffer available from 3.12 only +try: + ByteString = typing.ByteString +except AttributeError: + # pylint: disable=unsupported-binary-operation + ByteString = bytes | bytearray | memoryview + AnyType = typing.Any OptInt = typing.Union[int, None] OptFloat = typing.Optional[float] OptStr = typing.Optional[str] OptDict = typing.Optional[dict] -OptBytes = typing.Optional[typing.ByteString] +OptBytes = typing.Optional[ByteString] OptSeq = typing.Optional[typing.Sequence] """ @@ -43,429 +49,6 @@ """ -def write_text( - page: pymupdf.Page, - rect=None, - writers=None, - overlay=True, - color=None, - opacity=None, - keep_proportion=True, - rotate=0, - oc=0, - ) -> None: - """Write the text of one or more pymupdf.TextWriter objects. - - Args: - rect: target rectangle. If None, the union of the text writers is used. - writers: one or more pymupdf.TextWriter objects. - overlay: put in foreground or background. - keep_proportion: maintain aspect ratio of rectangle sides. - rotate: arbitrary rotation angle. - oc: the xref of an optional content object - """ - assert isinstance(page, pymupdf.Page) - if not writers: - raise ValueError("need at least one pymupdf.TextWriter") - if type(writers) is pymupdf.TextWriter: - if rotate == 0 and rect is None: - writers.write_text(page, opacity=opacity, color=color, overlay=overlay) - return None - else: - writers = (writers,) - clip = writers[0].text_rect - textdoc = pymupdf.Document() - tpage = textdoc.new_page(width=page.rect.width, height=page.rect.height) - for writer in writers: - clip |= writer.text_rect - writer.write_text(tpage, opacity=opacity, color=color) - if rect is None: - rect = clip - page.show_pdf_page( - rect, - textdoc, - 0, - overlay=overlay, - keep_proportion=keep_proportion, - rotate=rotate, - clip=clip, - oc=oc, - ) - textdoc = None - tpage = None - - -def show_pdf_page( - page, - rect, - src, - pno=0, - keep_proportion=True, - overlay=True, - oc=0, - rotate=0, - clip=None, - ) -> int: - """Show page number 'pno' of PDF 'src' in rectangle 'rect'. - - Args: - rect: (rect-like) where to place the source image - src: (document) source PDF - pno: (int) source page number - keep_proportion: (bool) do not change width-height-ratio - overlay: (bool) put in foreground - oc: (xref) make visibility dependent on this OCG / OCMD (which must be defined in the target PDF) - rotate: (int) degrees (multiple of 90) - clip: (rect-like) part of source page rectangle - Returns: - xref of inserted object (for reuse) - """ - def calc_matrix(sr, tr, keep=True, rotate=0): - """Calculate transformation matrix from source to target rect. - - Notes: - The product of four matrices in this sequence: (1) translate correct - source corner to origin, (2) rotate, (3) scale, (4) translate to - target's top-left corner. - Args: - sr: source rect in PDF (!) coordinate system - tr: target rect in PDF coordinate system - keep: whether to keep source ratio of width to height - rotate: rotation angle in degrees - Returns: - Transformation matrix. - """ - # calc center point of source rect - smp = (sr.tl + sr.br) / 2.0 - # calc center point of target rect - tmp = (tr.tl + tr.br) / 2.0 - - # m moves to (0, 0), then rotates - m = pymupdf.Matrix(1, 0, 0, 1, -smp.x, -smp.y) * pymupdf.Matrix(rotate) - - sr1 = sr * m # resulting source rect to calculate scale factors - - fw = tr.width / sr1.width # scale the width - fh = tr.height / sr1.height # scale the height - if keep: - fw = fh = min(fw, fh) # take min if keeping aspect ratio - - m *= pymupdf.Matrix(fw, fh) # concat scale matrix - m *= pymupdf.Matrix(1, 0, 0, 1, tmp.x, tmp.y) # concat move to target center - return pymupdf.JM_TUPLE(m) - - pymupdf.CheckParent(page) - doc = page.parent - - if not doc.is_pdf or not src.is_pdf: - raise ValueError("is no PDF") - - if rect.is_empty or rect.is_infinite: - raise ValueError("rect must be finite and not empty") - - while pno < 0: # support negative page numbers - pno += src.page_count - src_page = src[pno] # load source page - if src_page.get_contents() == []: - raise ValueError("nothing to show - source page empty") - - tar_rect = rect * ~page.transformation_matrix # target rect in PDF coordinates - - src_rect = src_page.rect if not clip else src_page.rect & clip # source rect - if src_rect.is_empty or src_rect.is_infinite: - raise ValueError("clip must be finite and not empty") - src_rect = src_rect * ~src_page.transformation_matrix # ... in PDF coord - - matrix = calc_matrix(src_rect, tar_rect, keep=keep_proportion, rotate=rotate) - - # list of existing /Form /XObjects - ilst = [i[1] for i in doc.get_page_xobjects(page.number)] - ilst += [i[7] for i in doc.get_page_images(page.number)] - ilst += [i[4] for i in doc.get_page_fonts(page.number)] - - # create a name not in that list - n = "fzFrm" - i = 0 - _imgname = n + "0" - while _imgname in ilst: - i += 1 - _imgname = n + str(i) - - isrc = src._graft_id # used as key for graftmaps - if doc._graft_id == isrc: - raise ValueError("source document must not equal target") - - # retrieve / make pymupdf.Graftmap for source PDF - gmap = doc.Graftmaps.get(isrc, None) - if gmap is None: - gmap = pymupdf.Graftmap(doc) - doc.Graftmaps[isrc] = gmap - - # take note of generated xref for automatic reuse - pno_id = (isrc, pno) # id of src[pno] - xref = doc.ShownPages.get(pno_id, 0) - - if overlay: - page.wrap_contents() # ensure a balanced graphics state - xref = page._show_pdf_page( - src_page, - overlay=overlay, - matrix=matrix, - xref=xref, - oc=oc, - clip=src_rect, - graftmap=gmap, - _imgname=_imgname, - ) - doc.ShownPages[pno_id] = xref - - return xref - - -def replace_image(page: pymupdf.Page, xref: int, *, filename=None, pixmap=None, stream=None): - """Replace the image referred to by xref. - - Replace the image by changing the object definition stored under xref. This - will leave the pages appearance instructions intact, so the new image is - being displayed with the same bbox, rotation etc. - By providing a small fully transparent image, an effect as if the image had - been deleted can be achieved. - A typical use may include replacing large images by a smaller version, - e.g. with a lower resolution or graylevel instead of colored. - - Args: - xref: the xref of the image to replace. - filename, pixmap, stream: exactly one of these must be provided. The - meaning being the same as in Page.insert_image. - """ - doc = page.parent # the owning document - if not doc.xref_is_image(xref): - raise ValueError("xref not an image") # insert new image anywhere in page - if bool(filename) + bool(stream) + bool(pixmap) != 1: - raise ValueError("Exactly one of filename/stream/pixmap must be given") - new_xref = page.insert_image( - page.rect, filename=filename, stream=stream, pixmap=pixmap - ) - doc.xref_copy(new_xref, xref) # copy over new to old - last_contents_xref = page.get_contents()[-1] - # new image insertion has created a new /Contents source, - # which we will set to spaces now - doc.update_stream(last_contents_xref, b" ") - - -def delete_image(page: pymupdf.Page, xref: int): - """Delete the image referred to by xef. - - Actually replaces by a small transparent Pixmap using method Page.replace_image. - - Args: - xref: xref of the image to delete. - """ - # make a small 100% transparent pixmap (of just any dimension) - pix = pymupdf.Pixmap(pymupdf.csGRAY, (0, 0, 1, 1), 1) - pix.clear_with() # clear all samples bytes to 0x00 - page.replace_image(xref, pixmap=pix) - - -def insert_image( - page, - rect, - *, - alpha=-1, - filename=None, - height=0, - keep_proportion=True, - mask=None, - oc=0, - overlay=True, - pixmap=None, - rotate=0, - stream=None, - width=0, - xref=0, - ): - """Insert an image for display in a rectangle. - - Args: - rect: (rect_like) position of image on the page. - alpha: (int, optional) set to 0 if image has no transparency. - filename: (str, Path, file object) image filename. - height: (int) - keep_proportion: (bool) keep width / height ratio (default). - mask: (bytes, optional) image consisting of alpha values to use. - oc: (int) xref of OCG or OCMD to declare as Optional Content. - overlay: (bool) put in foreground (default) or background. - pixmap: (pymupdf.Pixmap) use this as image. - rotate: (int) rotate by 0, 90, 180 or 270 degrees. - stream: (bytes) use this as image. - width: (int) - xref: (int) use this as image. - - 'page' and 'rect' are positional, all other parameters are keywords. - - If 'xref' is given, that image is used. Other input options are ignored. - Else, exactly one of pixmap, stream or filename must be given. - - 'alpha=0' for non-transparent images improves performance significantly. - Affects stream and filename only. - - Optimum transparent insertions are possible by using filename / stream in - conjunction with a 'mask' image of alpha values. - - Returns: - xref (int) of inserted image. Re-use as argument for multiple insertions. - """ - pymupdf.CheckParent(page) - doc = page.parent - if not doc.is_pdf: - raise ValueError("is no PDF") - - if xref == 0 and (bool(filename) + bool(stream) + bool(pixmap) != 1): - raise ValueError("xref=0 needs exactly one of filename, pixmap, stream") - - if filename: - if type(filename) is str: - pass - elif hasattr(filename, "absolute"): - filename = str(filename) - elif hasattr(filename, "name"): - filename = filename.name - else: - raise ValueError("bad filename") - - if filename and not os.path.exists(filename): - raise FileNotFoundError("No such file: '%s'" % filename) - elif stream and type(stream) not in (bytes, bytearray, io.BytesIO): - raise ValueError("stream must be bytes-like / BytesIO") - elif pixmap and type(pixmap) is not pymupdf.Pixmap: - raise ValueError("pixmap must be a pymupdf.Pixmap") - if mask and not (stream or filename): - raise ValueError("mask requires stream or filename") - if mask and type(mask) not in (bytes, bytearray, io.BytesIO): - raise ValueError("mask must be bytes-like / BytesIO") - while rotate < 0: - rotate += 360 - while rotate >= 360: - rotate -= 360 - if rotate not in (0, 90, 180, 270): - raise ValueError("bad rotate value") - - r = pymupdf.Rect(rect) - if r.is_empty or r.is_infinite: - raise ValueError("rect must be finite and not empty") - clip = r * ~page.transformation_matrix - - # Create a unique image reference name. - ilst = [i[7] for i in doc.get_page_images(page.number)] - ilst += [i[1] for i in doc.get_page_xobjects(page.number)] - ilst += [i[4] for i in doc.get_page_fonts(page.number)] - n = "fzImg" # 'pymupdf image' - i = 0 - _imgname = n + "0" # first name candidate - while _imgname in ilst: - i += 1 - _imgname = n + str(i) # try new name - - if overlay: - page.wrap_contents() # ensure a balanced graphics state - digests = doc.InsertedImages - xref, digests = page._insert_image( - filename=filename, - pixmap=pixmap, - stream=stream, - imask=mask, - clip=clip, - overlay=overlay, - oc=oc, - xref=xref, - rotate=rotate, - keep_proportion=keep_proportion, - width=width, - height=height, - alpha=alpha, - _imgname=_imgname, - digests=digests, - ) - if digests is not None: - doc.InsertedImages = digests - - return xref - - -def search_for( - page, - text, - *, - clip=None, - quads=False, - flags=pymupdf.TEXT_DEHYPHENATE - | pymupdf.TEXT_PRESERVE_WHITESPACE - | pymupdf.TEXT_PRESERVE_LIGATURES - | pymupdf.TEXT_MEDIABOX_CLIP - , - textpage=None, - ) -> list: - """Search for a string on a page. - - Args: - text: string to be searched for - clip: restrict search to this rectangle - quads: (bool) return quads instead of rectangles - flags: bit switches, default: join hyphened words - textpage: a pre-created pymupdf.TextPage - Returns: - a list of rectangles or quads, each containing one occurrence. - """ - if clip is not None: - clip = pymupdf.Rect(clip) - - pymupdf.CheckParent(page) - tp = textpage - if tp is None: - tp = page.get_textpage(clip=clip, flags=flags) # create pymupdf.TextPage - elif getattr(tp, "parent") != page: - raise ValueError("not a textpage of this page") - rlist = tp.search(text, quads=quads) - if textpage is None: - del tp - return rlist - - -def search_page_for( - doc: pymupdf.Document, - pno: int, - text: str, - quads: bool = False, - clip: rect_like = None, - flags: int = pymupdf.TEXT_DEHYPHENATE - | pymupdf.TEXT_PRESERVE_LIGATURES - | pymupdf.TEXT_PRESERVE_WHITESPACE - | pymupdf.TEXT_MEDIABOX_CLIP - , - textpage: pymupdf.TextPage = None, -) -> list: - """Search for a string on a page. - - Args: - pno: page number - text: string to be searched for - clip: restrict search to this rectangle - quads: (bool) return quads instead of rectangles - flags: bit switches, default: join hyphened words - textpage: reuse a prepared textpage - Returns: - a list of rectangles or quads, each containing an occurrence. - """ - - return doc[pno].search_for( - text, - quads=quads, - clip=clip, - flags=flags, - textpage=textpage, - ) - - def get_text_blocks( page: pymupdf.Page, clip: rect_like = None, @@ -495,7 +78,7 @@ def get_text_blocks( blocks = tp.extractBLOCKS() if textpage is None: del tp - if sort is True: + if sort: blocks.sort(key=lambda b: (b[3], b[0])) return blocks @@ -572,7 +155,7 @@ def sort_words(words): if textpage is None: del tp - if words and sort is True: + if words and sort: # advanced sort if any words found words = sort_words(words) @@ -632,7 +215,7 @@ def line_text(clip, line): # convert distance to previous word to multiple spaces dist = max( int(round((r.x0 - x1) / r.width * len(t))), - 0 if x1 == clip.x0 else 1, + 0 if (x1 == clip.x0 or r.x0 <= x1) else 1, ) # number of space characters ltext += " " * dist + t # append word string @@ -748,8 +331,7 @@ def get_textpage_ocr( full: (bool) whether to OCR the full page image, or only its images (default) """ pymupdf.CheckParent(page) - if not TESSDATA_PREFIX and not tessdata: - raise RuntimeError("No OCR support: TESSDATA_PREFIX not set") + tessdata = pymupdf.get_tessdata(tessdata) def full_ocr(page, dpi, language, flags): zoom = dpi / 72 @@ -773,7 +355,7 @@ def full_ocr(page, dpi, language, flags): return tpage # if OCR for the full page, OCR its pixmap @ desired dpi - if full is True: + if full: return full_ocr(page, dpi, language, flags) # For partial OCR, make a normal textpage, then extend it with text that @@ -786,9 +368,6 @@ def full_ocr(page, dpi, language, flags): bbox = pymupdf.Rect(block["bbox"]) if bbox.width <= 3 or bbox.height <= 3: # ignore tiny stuff continue - exception_types = (RuntimeError, mupdf.FzErrorBase) - if pymupdf.mupdf_version_tuple < (1, 24): - exception_types = RuntimeError try: pix = pymupdf.Pixmap(block["image"]) # get image pixmap if pix.n - pix.alpha != 3: # we need to convert this to RGB! @@ -807,8 +386,11 @@ def full_ocr(page, dpi, language, flags): mat = shrink * block["transform"] imgpage.extend_textpage(tpage, flags=0, matrix=mat) imgdoc.close() - except exception_types: - if g_exceptions_verbose: pymupdf.exception_info() + except (RuntimeError, mupdf.FzErrorBase): + if 0 and g_exceptions_verbose: + # Don't show exception info here because it can happen in + # normal operation (see test_3842b). + pymupdf.exception_info() tpage = None pymupdf.message("Falling back to full page OCR") return full_ocr(page, dpi, language, flags) @@ -816,84 +398,10 @@ def full_ocr(page, dpi, language, flags): return tpage -def get_image_info(page: pymupdf.Page, hashes: bool = False, xrefs: bool = False) -> list: - """Extract image information only from a pymupdf.TextPage. - - Args: - hashes: (bool) include MD5 hash for each image. - xrefs: (bool) try to find the xref for each image. Sets hashes to true. - """ - doc = page.parent - if xrefs and doc.is_pdf: - hashes = True - if not doc.is_pdf: - xrefs = False - imginfo = getattr(page, "_image_info", None) - if imginfo and not xrefs: - return imginfo - if not imginfo: - tp = page.get_textpage(flags=pymupdf.TEXT_PRESERVE_IMAGES) - imginfo = tp.extractIMGINFO(hashes=hashes) - del tp - if hashes: - page._image_info = imginfo - if not xrefs or not doc.is_pdf: - return imginfo - imglist = page.get_images() - digests = {} - for item in imglist: - xref = item[0] - pix = pymupdf.Pixmap(doc, xref) - digests[pix.digest] = xref - del pix - for i in range(len(imginfo)): - item = imginfo[i] - xref = digests.get(item["digest"], 0) - item["xref"] = xref - imginfo[i] = item - return imginfo - - -def get_image_rects(page: pymupdf.Page, name, transform=False) -> list: - """Return list of image positions on a page. - - Args: - name: (str, list, int) image identification. May be reference name, an - item of the page's image list or an xref. - transform: (bool) whether to also return the transformation matrix. - Returns: - A list of pymupdf.Rect objects or tuples of (pymupdf.Rect, pymupdf.Matrix) - for all image locations on the page. - """ - if type(name) in (list, tuple): - xref = name[0] - elif type(name) is int: - xref = name - else: - imglist = [i for i in page.get_images() if i[7] == name] - if imglist == []: - raise ValueError("bad image name") - elif len(imglist) != 1: - raise ValueError("multiple image names found") - xref = imglist[0][0] - pix = pymupdf.Pixmap(page.parent, xref) # make pixmap of the image to compute MD5 - digest = pix.digest - del pix - infos = page.get_image_info(hashes=True) - if not transform: - bboxes = [pymupdf.Rect(im["bbox"]) for im in infos if im["digest"] == digest] - else: - bboxes = [ - (pymupdf.Rect(im["bbox"]), pymupdf.Matrix(im["transform"])) - for im in infos - if im["digest"] == digest - ] - return bboxes - - def get_text( page: pymupdf.Page, option: str = "text", + *, clip: rect_like = None, flags: OptInt = None, textpage: pymupdf.TextPage = None, @@ -931,6 +439,7 @@ def get_text( "blocks": pymupdf.TEXTFLAGS_BLOCKS, } option = option.lower() + assert option in formats if option not in formats: option = "text" if flags is None: @@ -950,7 +459,7 @@ def get_text( page, clip=clip, flags=flags, textpage=textpage, sort=sort ) - if option == "text" and sort is True: + if option == "text" and sort: return get_sorted_text( page, clip=clip, @@ -998,101 +507,6 @@ def get_text( return t -def get_page_text( - doc: pymupdf.Document, - pno: int, - option: str = "text", - clip: rect_like = None, - flags: OptInt = None, - textpage: pymupdf.TextPage = None, - sort: bool = False, -) -> typing.Any: - """Extract a document page's text by page number. - - Notes: - Convenience function calling page.get_text(). - Args: - pno: page number - option: (str) text, words, blocks, html, dict, json, rawdict, xhtml or xml. - Returns: - output from page.TextPage(). - """ - return doc[pno].get_text(option, clip=clip, flags=flags, sort=sort) - -def get_pixmap( - page: pymupdf.Page, - *, - matrix: matrix_like=pymupdf.Identity, - dpi=None, - colorspace: pymupdf.Colorspace=pymupdf.csRGB, - clip: rect_like=None, - alpha: bool=False, - annots: bool=True, - ) -> pymupdf.Pixmap: - """Create pixmap of page. - - Keyword args: - matrix: Matrix for transformation (default: Identity). - dpi: desired dots per inch. If given, matrix is ignored. - colorspace: (str/Colorspace) cmyk, rgb, gray - case ignored, default csRGB. - clip: (irect-like) restrict rendering to this area. - alpha: (bool) whether to include alpha channel - annots: (bool) whether to also render annotations - """ - if dpi: - zoom = dpi / 72 - matrix = pymupdf.Matrix(zoom, zoom) - - if type(colorspace) is str: - if colorspace.upper() == "GRAY": - colorspace = pymupdf.csGRAY - elif colorspace.upper() == "CMYK": - colorspace = pymupdf.csCMYK - else: - colorspace = pymupdf.csRGB - if colorspace.n not in (1, 3, 4): - raise ValueError("unsupported colorspace") - - dl = page.get_displaylist(annots=annots) - pix = dl.get_pixmap(matrix=matrix, colorspace=colorspace, alpha=alpha, clip=clip) - dl = None - if dpi: - pix.set_dpi(dpi, dpi) - return pix - - -def get_page_pixmap( - doc: pymupdf.Document, - pno: int, - *, - matrix: matrix_like = pymupdf.Identity, - dpi=None, - colorspace: pymupdf.Colorspace = pymupdf.csRGB, - clip: rect_like = None, - alpha: bool = False, - annots: bool = True, -) -> pymupdf.Pixmap: - """Create pixmap of document page by page number. - - Notes: - Convenience function calling page.get_pixmap. - Args: - pno: (int) page number - matrix: pymupdf.Matrix for transformation (default: pymupdf.Identity). - colorspace: (str,pymupdf.Colorspace) rgb, rgb, gray - case ignored, default csRGB. - clip: (irect-like) restrict rendering to this area. - alpha: (bool) include alpha channel - annots: (bool) also render annotations - """ - return doc[pno].get_pixmap( - matrix=matrix, - dpi=dpi, colorspace=colorspace, - clip=clip, - alpha=alpha, - annots=annots - ) - - def getLinkDict(ln, document=None) -> dict: if isinstance(ln, pymupdf.Outline): dest = ln.destination(document) @@ -1152,280 +566,6 @@ def getLinkDict(ln, document=None) -> dict: return nl -def get_links(page: pymupdf.Page) -> list: - """Create a list of all links contained in a PDF page. - - Notes: - see PyMuPDF ducmentation for details. - """ - - pymupdf.CheckParent(page) - ln = page.first_link - links = [] - while ln: - nl = getLinkDict(ln, page.parent) - links.append(nl) - ln = ln.next - if links != [] and page.parent.is_pdf: - linkxrefs = [x for x in - #page.annot_xrefs() - pymupdf.JM_get_annot_xref_list2(page) - if x[1] == pymupdf.PDF_ANNOT_LINK # pylint: disable=no-member - ] - if len(linkxrefs) == len(links): - for i in range(len(linkxrefs)): - links[i]["xref"] = linkxrefs[i][0] - links[i]["id"] = linkxrefs[i][2] - return links - - -def get_toc( - doc: pymupdf.Document, - simple: bool = True, -) -> list: - """Create a table of contents. - - Args: - simple: a bool to control output. Returns a list, where each entry consists of outline level, title, page number and link destination (if simple = False). For details see PyMuPDF's documentation. - """ - def recurse(olItem, liste, lvl): - """Recursively follow the outline item chain and record item information in a list.""" - while olItem and olItem.this.m_internal: - if olItem.title: - title = olItem.title - else: - title = " " - - if not olItem.is_external: - if olItem.uri: - if olItem.page == -1: - resolve = doc.resolve_link(olItem.uri) - page = resolve[0] + 1 - else: - page = olItem.page + 1 - else: - page = -1 - else: - page = -1 - - if not simple: - link = getLinkDict(olItem, doc) - liste.append([lvl, title, page, link]) - else: - liste.append([lvl, title, page]) - - if olItem.down: - liste = recurse(olItem.down, liste, lvl + 1) - olItem = olItem.next - return liste - - # ensure document is open - if doc.is_closed: - raise ValueError("document closed") - doc.init_doc() - olItem = doc.outline - if not olItem: - return [] - lvl = 1 - liste = [] - toc = recurse(olItem, liste, lvl) - if doc.is_pdf and simple is False: - doc._extend_toc_items(toc) - return toc - - -def del_toc_item( - doc: pymupdf.Document, - idx: int, -) -> None: - """Delete TOC / bookmark item by index.""" - xref = doc.get_outline_xrefs()[idx] - doc._remove_toc_item(xref) - - -def set_toc_item( - doc: pymupdf.Document, - idx: int, - dest_dict: OptDict = None, - kind: OptInt = None, - pno: OptInt = None, - uri: OptStr = None, - title: OptStr = None, - to: point_like = None, - filename: OptStr = None, - zoom: float = 0, -) -> None: - """Update TOC item by index. - - It allows changing the item's title and link destination. - - Args: - idx: - (int) desired index of the TOC list, as created by get_toc. - dest_dict: - (dict) destination dictionary as created by get_toc(False). - Outrules all other parameters. If None, the remaining parameters - are used to make a dest dictionary. - kind: - (int) kind of link (pymupdf.LINK_GOTO, etc.). If None, then only - the title will be updated. If pymupdf.LINK_NONE, the TOC item will - be deleted. - pno: - (int) page number (1-based like in get_toc). Required if - pymupdf.LINK_GOTO. - uri: - (str) the URL, required if pymupdf.LINK_URI. - title: - (str) the new title. No change if None. - to: - (point-like) destination on the target page. If omitted, (72, 36) - will be used as target coordinates. - filename: - (str) destination filename, required for pymupdf.LINK_GOTOR and - pymupdf.LINK_LAUNCH. - name: - (str) a destination name for pymupdf.LINK_NAMED. - zoom: - (float) a zoom factor for the target location (pymupdf.LINK_GOTO). - """ - xref = doc.get_outline_xrefs()[idx] - page_xref = 0 - if type(dest_dict) is dict: - if dest_dict["kind"] == pymupdf.LINK_GOTO: - pno = dest_dict["page"] - page_xref = doc.page_xref(pno) - page_height = doc.page_cropbox(pno).height - to = dest_dict.get('to', pymupdf.Point(72, 36)) - to.y = page_height - to.y - dest_dict["to"] = to - action = getDestStr(page_xref, dest_dict) - if not action.startswith("/A"): - raise ValueError("bad bookmark dest") - color = dest_dict.get("color") - if color: - color = list(map(float, color)) - if len(color) != 3 or min(color) < 0 or max(color) > 1: - raise ValueError("bad color value") - bold = dest_dict.get("bold", False) - italic = dest_dict.get("italic", False) - flags = italic + 2 * bold - collapse = dest_dict.get("collapse") - return doc._update_toc_item( - xref, - action=action[2:], - title=title, - color=color, - flags=flags, - collapse=collapse, - ) - - if kind == pymupdf.LINK_NONE: # delete bookmark item - return doc.del_toc_item(idx) - if kind is None and title is None: # treat as no-op - return None - if kind is None: # only update title text - return doc._update_toc_item(xref, action=None, title=title) - - if kind == pymupdf.LINK_GOTO: - if pno is None or pno not in range(1, doc.page_count + 1): - raise ValueError("bad page number") - page_xref = doc.page_xref(pno - 1) - page_height = doc.page_cropbox(pno - 1).height - if to is None: - to = pymupdf.Point(72, page_height - 36) - else: - to = pymupdf.Point(to) - to.y = page_height - to.y - - ddict = { - "kind": kind, - "to": to, - "uri": uri, - "page": pno, - "file": filename, - "zoom": zoom, - } - action = getDestStr(page_xref, ddict) - if action == "" or not action.startswith("/A"): - raise ValueError("bad bookmark dest") - - return doc._update_toc_item(xref, action=action[2:], title=title) - - -def get_area(*args) -> float: - """Calculate area of rectangle.\nparameter is one of 'px' (default), 'in', 'cm', or 'mm'.""" - rect = args[0] - if len(args) > 1: - unit = args[1] - else: - unit = "px" - u = {"px": (1, 1), "in": (1.0, 72.0), "cm": (2.54, 72.0), "mm": (25.4, 72.0)} - f = (u[unit][0] / u[unit][1]) ** 2 - return f * rect.width * rect.height - - -def set_metadata(doc: pymupdf.Document, m: dict = None) -> None: - """Update the PDF /Info object. - - Args: - m: a dictionary like doc.metadata. - """ - if not doc.is_pdf: - raise ValueError("is no PDF") - if doc.is_closed or doc.is_encrypted: - raise ValueError("document closed or encrypted") - if m is None: - m = {} - elif type(m) is not dict: - raise ValueError("bad metadata") - keymap = { - "author": "Author", - "producer": "Producer", - "creator": "Creator", - "title": "Title", - "format": None, - "encryption": None, - "creationDate": "CreationDate", - "modDate": "ModDate", - "subject": "Subject", - "keywords": "Keywords", - "trapped": "Trapped", - } - valid_keys = set(keymap.keys()) - diff_set = set(m.keys()).difference(valid_keys) - if diff_set != set(): - msg = "bad dict key(s): %s" % diff_set - raise ValueError(msg) - - t, temp = doc.xref_get_key(-1, "Info") - if t != "xref": - info_xref = 0 - else: - info_xref = int(temp.replace("0 R", "")) - - if m == {} and info_xref == 0: # nothing to do - return - - if info_xref == 0: # no prev metadata: get new xref - info_xref = doc.get_new_xref() - doc.update_object(info_xref, "<<>>") # fill it with empty object - doc.xref_set_key(-1, "Info", "%i 0 R" % info_xref) - elif m == {}: # remove existing metadata - doc.xref_set_key(-1, "Info", "null") - doc.init_doc() - return - - for key, val in [(k, v) for k, v in m.items() if keymap[k] is not None]: - pdf_key = keymap[key] - if not bool(val) or val in ("none", "null"): - val = "null" - else: - val = pymupdf.get_pdf_str(val) - doc.xref_set_key(info_xref, pdf_key, val) - doc.init_doc() - return - - def getDestStr(xref: int, ddict: dict) -> str: """Calculate the PDF action string. @@ -1484,321 +624,6 @@ def getDestStr(xref: int, ddict: dict) -> str: return "" -def set_toc( - doc: pymupdf.Document, - toc: list, - collapse: int = 1, -) -> int: - """Create new outline tree (table of contents, TOC). - - Args: - toc: (list, tuple) each entry must contain level, title, page and - optionally top margin on the page. None or '()' remove the TOC. - collapse: (int) collapses entries beyond this level. Zero or None - shows all entries unfolded. - Returns: - the number of inserted items, or the number of removed items respectively. - """ - if doc.is_closed or doc.is_encrypted: - raise ValueError("document closed or encrypted") - if not doc.is_pdf: - raise ValueError("is no PDF") - if not toc: # remove all entries - return len(doc._delToC()) - - # validity checks -------------------------------------------------------- - if type(toc) not in (list, tuple): - raise ValueError("'toc' must be list or tuple") - toclen = len(toc) - page_count = doc.page_count - t0 = toc[0] - if type(t0) not in (list, tuple): - raise ValueError("items must be sequences of 3 or 4 items") - if t0[0] != 1: - raise ValueError("hierarchy level of item 0 must be 1") - for i in list(range(toclen - 1)): - t1 = toc[i] - t2 = toc[i + 1] - if not -1 <= t1[2] <= page_count: - raise ValueError("row %i: page number out of range" % i) - if (type(t2) not in (list, tuple)) or len(t2) not in (3, 4): - raise ValueError("bad row %i" % (i + 1)) - if (type(t2[0]) is not int) or t2[0] < 1: - raise ValueError("bad hierarchy level in row %i" % (i + 1)) - if t2[0] > t1[0] + 1: - raise ValueError("bad hierarchy level in row %i" % (i + 1)) - # no formal errors in toc -------------------------------------------------- - - # -------------------------------------------------------------------------- - # make a list of xref numbers, which we can use for our TOC entries - # -------------------------------------------------------------------------- - old_xrefs = doc._delToC() # del old outlines, get their xref numbers - - # prepare table of xrefs for new bookmarks - old_xrefs = [] - xref = [0] + old_xrefs - xref[0] = doc._getOLRootNumber() # entry zero is outline root xref number - if toclen > len(old_xrefs): # too few old xrefs? - for i in range((toclen - len(old_xrefs))): - xref.append(doc.get_new_xref()) # acquire new ones - - lvltab = {0: 0} # to store last entry per hierarchy level - - # ------------------------------------------------------------------------------ - # contains new outline objects as strings - first one is the outline root - # ------------------------------------------------------------------------------ - olitems = [{"count": 0, "first": -1, "last": -1, "xref": xref[0]}] - # ------------------------------------------------------------------------------ - # build olitems as a list of PDF-like connected dictionaries - # ------------------------------------------------------------------------------ - for i in range(toclen): - o = toc[i] - lvl = o[0] # level - title = pymupdf.get_pdf_str(o[1]) # title - pno = min(doc.page_count - 1, max(0, o[2] - 1)) # page number - page_xref = doc.page_xref(pno) - page_height = doc.page_cropbox(pno).height - top = pymupdf.Point(72, page_height - 36) - dest_dict = {"to": top, "kind": pymupdf.LINK_GOTO} # fall back target - if o[2] < 0: - dest_dict["kind"] = pymupdf.LINK_NONE - if len(o) > 3: # some target is specified - if type(o[3]) in (int, float): # convert a number to a point - dest_dict["to"] = pymupdf.Point(72, page_height - o[3]) - else: # if something else, make sure we have a dict - # We make a copy of o[3] to avoid modifying our caller's data. - dest_dict = o[3].copy() if type(o[3]) is dict else dest_dict - if "to" not in dest_dict: # target point not in dict? - dest_dict["to"] = top # put default in - else: # transform target to PDF coordinates - page = doc[pno] - point = pymupdf.Point(dest_dict["to"]) - point.y = page.cropbox.height - point.y - point = point * page.rotation_matrix - dest_dict["to"] = (point.x, point.y) - d = {} - d["first"] = -1 - d["count"] = 0 - d["last"] = -1 - d["prev"] = -1 - d["next"] = -1 - d["dest"] = getDestStr(page_xref, dest_dict) - d["top"] = dest_dict["to"] - d["title"] = title - d["parent"] = lvltab[lvl - 1] - d["xref"] = xref[i + 1] - d["color"] = dest_dict.get("color") - d["flags"] = dest_dict.get("italic", 0) + 2 * dest_dict.get("bold", 0) - lvltab[lvl] = i + 1 - parent = olitems[lvltab[lvl - 1]] # the parent entry - - if ( - dest_dict.get("collapse") or collapse and lvl > collapse - ): # suppress expansion - parent["count"] -= 1 # make /Count negative - else: - parent["count"] += 1 # positive /Count - - if parent["first"] == -1: - parent["first"] = i + 1 - parent["last"] = i + 1 - else: - d["prev"] = parent["last"] - prev = olitems[parent["last"]] - prev["next"] = i + 1 - parent["last"] = i + 1 - olitems.append(d) - - # ------------------------------------------------------------------------------ - # now create each outline item as a string and insert it in the PDF - # ------------------------------------------------------------------------------ - for i, ol in enumerate(olitems): - txt = "<<" - if ol["count"] != 0: - txt += "/Count %i" % ol["count"] - try: - txt += ol["dest"] - except Exception: - # Verbose in PyMuPDF/tests. - if g_exceptions_verbose >= 2: pymupdf.exception_info() - pass - try: - if ol["first"] > -1: - txt += "/First %i 0 R" % xref[ol["first"]] - except Exception: - if g_exceptions_verbose >= 2: pymupdf.exception_info() - pass - try: - if ol["last"] > -1: - txt += "/Last %i 0 R" % xref[ol["last"]] - except Exception: - if g_exceptions_verbose >= 2: pymupdf.exception_info() - pass - try: - if ol["next"] > -1: - txt += "/Next %i 0 R" % xref[ol["next"]] - except Exception: - # Verbose in PyMuPDF/tests. - if g_exceptions_verbose >= 2: pymupdf.exception_info() - pass - try: - if ol["parent"] > -1: - txt += "/Parent %i 0 R" % xref[ol["parent"]] - except Exception: - # Verbose in PyMuPDF/tests. - if g_exceptions_verbose >= 2: pymupdf.exception_info() - pass - try: - if ol["prev"] > -1: - txt += "/Prev %i 0 R" % xref[ol["prev"]] - except Exception: - # Verbose in PyMuPDF/tests. - if g_exceptions_verbose >= 2: pymupdf.exception_info() - pass - try: - txt += "/Title" + ol["title"] - except Exception: - # Verbose in PyMuPDF/tests. - if g_exceptions_verbose >= 2: pymupdf.exception_info() - pass - - if ol.get("color") and len(ol["color"]) == 3: - txt += f"/C[ {_format_g(tuple(ol['color']))}]" - if ol.get("flags", 0) > 0: - txt += "/F %i" % ol["flags"] - - if i == 0: # special: this is the outline root - txt += "/Type/Outlines" # so add the /Type entry - txt += ">>" - doc.update_object(xref[i], txt) # insert the PDF object - - doc.init_doc() - return toclen - - -def do_links( - doc1: pymupdf.Document, - doc2: pymupdf.Document, - from_page: int = -1, - to_page: int = -1, - start_at: int = -1, -) -> None: - """Insert links contained in copied page range into destination PDF. - - Parameter values **must** equal those of method insert_pdf(), which must - have been previously executed. - """ - #pymupdf.log( 'utils.do_links()') - # -------------------------------------------------------------------------- - # internal function to create the actual "/Annots" object string - # -------------------------------------------------------------------------- - def cre_annot(lnk, xref_dst, pno_src, ctm): - """Create annotation object string for a passed-in link.""" - - r = lnk["from"] * ctm # rect in PDF coordinates - rect = _format_g(tuple(r)) - if lnk["kind"] == pymupdf.LINK_GOTO: - txt = pymupdf.annot_skel["goto1"] # annot_goto - idx = pno_src.index(lnk["page"]) - p = lnk["to"] * ctm # target point in PDF coordinates - annot = txt(xref_dst[idx], p.x, p.y, lnk["zoom"], rect) - - elif lnk["kind"] == pymupdf.LINK_GOTOR: - if lnk["page"] >= 0: - txt = pymupdf.annot_skel["gotor1"] # annot_gotor - pnt = lnk.get("to", pymupdf.Point(0, 0)) # destination point - if type(pnt) is not pymupdf.Point: - pnt = pymupdf.Point(0, 0) - annot = txt( - lnk["page"], - pnt.x, - pnt.y, - lnk["zoom"], - lnk["file"], - lnk["file"], - rect, - ) - else: - txt = pymupdf.annot_skel["gotor2"] # annot_gotor_n - to = pymupdf.get_pdf_str(lnk["to"]) - to = to[1:-1] - f = lnk["file"] - annot = txt(to, f, rect) - - elif lnk["kind"] == pymupdf.LINK_LAUNCH: - txt = pymupdf.annot_skel["launch"] # annot_launch - annot = txt(lnk["file"], lnk["file"], rect) - - elif lnk["kind"] == pymupdf.LINK_URI: - txt = pymupdf.annot_skel["uri"] # annot_uri - annot = txt(lnk["uri"], rect) - - else: - annot = "" - - return annot - - # -------------------------------------------------------------------------- - - # validate & normalize parameters - if from_page < 0: - fp = 0 - elif from_page >= doc2.page_count: - fp = doc2.page_count - 1 - else: - fp = from_page - - if to_page < 0 or to_page >= doc2.page_count: - tp = doc2.page_count - 1 - else: - tp = to_page - - if start_at < 0: - raise ValueError("'start_at' must be >= 0") - sa = start_at - - incr = 1 if fp <= tp else -1 # page range could be reversed - - # lists of source / destination page numbers - pno_src = list(range(fp, tp + incr, incr)) - pno_dst = [sa + i for i in range(len(pno_src))] - - # lists of source / destination page xrefs - xref_src = [] - xref_dst = [] - for i in range(len(pno_src)): - p_src = pno_src[i] - p_dst = pno_dst[i] - old_xref = doc2.page_xref(p_src) - new_xref = doc1.page_xref(p_dst) - xref_src.append(old_xref) - xref_dst.append(new_xref) - - # create the links for each copied page in destination PDF - for i in range(len(xref_src)): - page_src = doc2[pno_src[i]] # load source page - links = page_src.get_links() # get all its links - #pymupdf.log( '{pno_src=}') - #pymupdf.log( '{type(page_src)=}') - #pymupdf.log( '{page_src=}') - #pymupdf.log( '{=i len(links)}') - if len(links) == 0: # no links there - page_src = None - continue - ctm = ~page_src.transformation_matrix # calc page transformation matrix - page_dst = doc1[pno_dst[i]] # load destination page - link_tab = [] # store all link definitions here - for l in links: - if l["kind"] == pymupdf.LINK_GOTO and (l["page"] not in pno_src): - continue # GOTO link target not in copied pages - annot_text = cre_annot(l, xref_dst, pno_src, ctm) - if annot_text: - link_tab.append(annot_text) - if link_tab != []: - page_dst._addAnnot_FromString( tuple(link_tab)) - #pymupdf.log( 'utils.do_links() returning.') - - def getLinkText(page: pymupdf.Page, lnk: dict) -> str: # -------------------------------------------------------------------------- # define skeletons for /Annots object texts @@ -1882,1352 +707,52 @@ def getLinkText(page: pymupdf.Page, lnk: dict) -> str: return annot -def delete_widget(page: pymupdf.Page, widget: pymupdf.Widget) -> pymupdf.Widget: - """Delete widget from page and return the next one.""" - pymupdf.CheckParent(page) - annot = getattr(widget, "_annot", None) - if annot is None: - raise ValueError("bad type: widget") - nextwidget = widget.next - page.delete_annot(annot) - widget._annot.parent = None - keylist = list(widget.__dict__.keys()) - for key in keylist: - del widget.__dict__[key] - return nextwidget - - -def update_link(page: pymupdf.Page, lnk: dict) -> None: - """Update a link on the current page.""" - pymupdf.CheckParent(page) - annot = getLinkText(page, lnk) - if annot == "": - raise ValueError("link kind not supported") - - page.parent.update_object(lnk["xref"], annot, page=page) - - -def insert_link(page: pymupdf.Page, lnk: dict, mark: bool = True) -> None: - """Insert a new link for the current page.""" - pymupdf.CheckParent(page) - annot = getLinkText(page, lnk) - if annot == "": - raise ValueError("link kind not supported") - page._addAnnot_FromString((annot,)) - +# ---------------------------------------------------------------------- +# Name: wx.lib.colourdb.py +# Purpose: Adds a bunch of colour names and RGB values to the +# colour database so they can be found by name +# +# Author: Robin Dunn +# +# Created: 13-March-2001 +# Copyright: (c) 2001-2017 by Total Control Software +# Licence: wxWindows license +# Tags: phoenix-port, unittest, documented +# ---------------------------------------------------------------------- -def insert_textbox( - page: pymupdf.Page, - rect: rect_like, - buffer: typing.Union[str, list], - fontname: str = "helv", - fontfile: OptStr = None, - set_simple: int = 0, - encoding: int = 0, - fontsize: float = 11, - lineheight: OptFloat = None, - color: OptSeq = None, - fill: OptSeq = None, - expandtabs: int = 1, - align: int = 0, - rotate: int = 0, - render_mode: int = 0, - border_width: float = 0.05, - morph: OptSeq = None, - overlay: bool = True, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, -) -> float: - """Insert text into a given rectangle. - Notes: - Creates a Shape object, uses its same-named method and commits it. - Parameters: - rect: (rect-like) area to use for text. - buffer: text to be inserted - fontname: a Base-14 font, font name or '/name' - fontfile: name of a font file - fontsize: font size - lineheight: overwrite the font property - color: RGB color triple - expandtabs: handles tabulators with string function - align: left, center, right, justified - rotate: 0, 90, 180, or 270 degrees - morph: morph box with a matrix and a fixpoint - overlay: put text in foreground or background - Returns: - unused or deficit rectangle area (float) +def getColorList() -> list: """ - img = page.new_shape() - rc = img.insert_textbox( - rect, - buffer, - fontsize=fontsize, - lineheight=lineheight, - fontname=fontname, - fontfile=fontfile, - set_simple=set_simple, - encoding=encoding, - color=color, - fill=fill, - expandtabs=expandtabs, - render_mode=render_mode, - border_width=border_width, - align=align, - rotate=rotate, - morph=morph, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - if rc >= 0: - img.commit(overlay) - return rc - + Returns a list of upper-case colour names. + :rtype: list of strings + """ + return [name for name, r, g, b in pymupdf.colors_wx_list()] -def insert_text( - page: pymupdf.Page, - point: point_like, - text: typing.Union[str, list], - fontsize: float = 11, - lineheight: OptFloat = None, - fontname: str = "helv", - fontfile: OptStr = None, - set_simple: int = 0, - encoding: int = 0, - color: OptSeq = None, - fill: OptSeq = None, - border_width: float = 0.05, - render_mode: int = 0, - rotate: int = 0, - morph: OptSeq = None, - overlay: bool = True, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, -): - img = page.new_shape() - rc = img.insert_text( - point, - text, - fontsize=fontsize, - lineheight=lineheight, - fontname=fontname, - fontfile=fontfile, - set_simple=set_simple, - encoding=encoding, - color=color, - fill=fill, - border_width=border_width, - render_mode=render_mode, - rotate=rotate, - morph=morph, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - if rc >= 0: - img.commit(overlay) - return rc +def getColorInfoList() -> list: + """ + Returns list of (name, red, gree, blue) tuples, where: + name: upper-case color name. + read, green, blue: integers in range 0..255. + :rtype: list of tuples + """ + return pymupdf.colors_wx_list() -def insert_htmlbox( - page, - rect, - text, - *, - css=None, - scale_low=0, - archive=None, - rotate=0, - oc=0, - opacity=1, - overlay=True, -) -> float: - """Insert text with optional HTML tags and stylings into a rectangle. +def getColor(name: str) -> tuple: + """Retrieve RGB color in PDF format by name. - Args: - rect: (rect-like) rectangle into which the text should be placed. - text: (str) text with optional HTML tags and stylings. - css: (str) CSS styling commands. - scale_low: (float) force-fit content by scaling it down. Must be in - range [0, 1]. If 1, no scaling will take place. If 0, arbitrary - down-scaling is acceptable. A value of 0.1 would mean that content - may be scaled down by at most 90%. - archive: Archive object pointing to locations of used fonts or images - rotate: (int) rotate the text in the box by a multiple of 90 degrees. - oc: (int) the xref of an OCG / OCMD (Optional Content). - opacity: (float) set opacity of inserted content. - overlay: (bool) put text on top of page content. Returns: - A tuple of floats (spare_height, scale). - spare_height: -1 if content did not fit, else >= 0. It is the height of the - unused (still available) rectangle stripe. Positive only if - scale_min = 1 (no down scaling). - scale: downscaling factor, 0 < scale <= 1. Set to 0 if spare_height = -1 (no fit). + a triple of floats in range 0 to 1. In case of name-not-found, "white" is returned. """ + return pymupdf.colors_pdf_dict().get(name.lower(), (1, 1, 1)) - # normalize rotation angle - if not rotate % 90 == 0: - raise ValueError("bad rotation angle") - while rotate < 0: - rotate += 360 - while rotate >= 360: - rotate -= 360 - - if not 0 <= scale_low <= 1: - raise ValueError("'scale_low' must be in [0, 1]") - - if css is None: - css = "" - rect = pymupdf.Rect(rect) - if rotate in (90, 270): - temp_rect = pymupdf.Rect(0, 0, rect.height, rect.width) - else: - temp_rect = pymupdf.Rect(0, 0, rect.width, rect.height) - - # use a small border by default - mycss = "body {margin:1px;}" + css # append user CSS - - # either make a story, or accept a given one - if isinstance(text, str): # if a string, convert to a Story - story = pymupdf.Story(html=text, user_css=mycss, archive=archive) - elif isinstance(text, pymupdf.Story): - story = text - else: - raise ValueError("'text' must be a string or a Story") - # ---------------------------------------------------------------- - # Find a scaling factor that lets our story fit in - # ---------------------------------------------------------------- - scale_max = None if scale_low == 0 else 1 / scale_low - - fit = story.fit_scale(temp_rect, scale_min=1, scale_max=scale_max) - if not fit.big_enough: # there was no fit - return (-1, scale_low) - - filled = fit.filled - scale = 1 / fit.parameter # shrink factor - - spare_height = fit.rect.y1 - filled[3] # unused room at rectangle bottom - # Note: due to MuPDF's logic this may be negative even for successful fits. - if scale != 1 or spare_height < 0: # if scaling occurred, set spare_height to 0 - spare_height = 0 - - def rect_function(*args): - return fit.rect, fit.rect, pymupdf.Identity - - # draw story on temp PDF page - doc = story.write_with_links(rect_function) - - # Insert opacity if requested. - # For this, we prepend a command to the /Contents. - if 0 <= opacity < 1: - tpage = doc[0] # load page - # generate /ExtGstate for the page - alp0 = tpage._set_opacity(CA=opacity, ca=opacity) - s = f"/{alp0} gs\n" # generate graphic state command - pymupdf.TOOLS._insert_contents(tpage, s.encode(), 0) - - # put result in target page - page.show_pdf_page(rect, doc, 0, rotate=rotate, oc=oc, overlay=overlay) - - # ------------------------------------------------------------------------- - # re-insert links in target rect (show_pdf_page cannot copy annotations) - # ------------------------------------------------------------------------- - # scaled center point of fit.rect - mp1 = (fit.rect.tl + fit.rect.br) / 2 * scale - - # center point of target rect - mp2 = (rect.tl + rect.br) / 2 - - # compute link positioning matrix: - # - move center of scaled-down fit.rect to (0,0) - # - rotate - # - move (0,0) to center of target rect - mat = ( - pymupdf.Matrix(scale, 0, 0, scale, -mp1.x, -mp1.y) - * pymupdf.Matrix(-rotate) - * pymupdf.Matrix(1, 0, 0, 1, mp2.x, mp2.y) - ) - - # copy over links - for link in doc[0].get_links(): - link["from"] *= mat - page.insert_link(link) - - return spare_height, scale - - -def new_page( - doc: pymupdf.Document, - pno: int = -1, - width: float = 595, - height: float = 842, -) -> pymupdf.Page: - """Create and return a new page object. +def getColorHSV(name: str) -> tuple: + """Retrieve the hue, saturation, value triple of a color name. - Args: - pno: (int) insert before this page. Default: after last page. - width: (float) page width in points. Default: 595 (ISO A4 width). - height: (float) page height in points. Default 842 (ISO A4 height). Returns: - A pymupdf.Page object. - """ - doc._newPage(pno, width=width, height=height) - return doc[pno] - - -def insert_page( - doc: pymupdf.Document, - pno: int, - text: typing.Union[str, list, None] = None, - fontsize: float = 11, - width: float = 595, - height: float = 842, - fontname: str = "helv", - fontfile: OptStr = None, - color: OptSeq = (0,), -) -> int: - """Create a new PDF page and insert some text. - - Notes: - Function combining pymupdf.Document.new_page() and pymupdf.Page.insert_text(). - For parameter details see these methods. - """ - page = doc.new_page(pno=pno, width=width, height=height) - if not bool(text): - return 0 - rc = page.insert_text( - (50, 72), - text, - fontsize=fontsize, - fontname=fontname, - fontfile=fontfile, - color=color, - ) - return rc - - -def draw_line( - page: pymupdf.Page, - p1: point_like, - p2: point_like, - color: OptSeq = (0,), - dashes: OptStr = None, - width: float = 1, - lineCap: int = 0, - lineJoin: int = 0, - overlay: bool = True, - morph: OptSeq = None, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc=0, -) -> pymupdf.Point: - """Draw a line from point p1 to point p2.""" - img = page.new_shape() - p = img.draw_line(pymupdf.Point(p1), pymupdf.Point(p2)) - img.finish( - color=color, - dashes=dashes, - width=width, - closePath=False, - lineCap=lineCap, - lineJoin=lineJoin, - morph=morph, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - img.commit(overlay) - - return p - - -def draw_squiggle( - page: pymupdf.Page, - p1: point_like, - p2: point_like, - breadth: float = 2, - color: OptSeq = (0,), - dashes: OptStr = None, - width: float = 1, - lineCap: int = 0, - lineJoin: int = 0, - overlay: bool = True, - morph: OptSeq = None, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, -) -> pymupdf.Point: - """Draw a squiggly line from point p1 to point p2.""" - img = page.new_shape() - p = img.draw_squiggle(pymupdf.Point(p1), pymupdf.Point(p2), breadth=breadth) - img.finish( - color=color, - dashes=dashes, - width=width, - closePath=False, - lineCap=lineCap, - lineJoin=lineJoin, - morph=morph, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - img.commit(overlay) - - return p - - -def draw_zigzag( - page: pymupdf.Page, - p1: point_like, - p2: point_like, - breadth: float = 2, - color: OptSeq = (0,), - dashes: OptStr = None, - width: float = 1, - lineCap: int = 0, - lineJoin: int = 0, - overlay: bool = True, - morph: OptSeq = None, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, -) -> pymupdf.Point: - """Draw a zigzag line from point p1 to point p2.""" - img = page.new_shape() - p = img.draw_zigzag(pymupdf.Point(p1), pymupdf.Point(p2), breadth=breadth) - img.finish( - color=color, - dashes=dashes, - width=width, - closePath=False, - lineCap=lineCap, - lineJoin=lineJoin, - morph=morph, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - img.commit(overlay) - - return p - - -def draw_rect( - page: pymupdf.Page, - rect: rect_like, - color: OptSeq = (0,), - fill: OptSeq = None, - dashes: OptStr = None, - width: float = 1, - lineCap: int = 0, - lineJoin: int = 0, - morph: OptSeq = None, - overlay: bool = True, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, - radius=None, - ) -> pymupdf.Point: - ''' - Draw a rectangle. See Shape class method for details. - ''' - img = page.new_shape() - Q = img.draw_rect(pymupdf.Rect(rect), radius=radius) - img.finish( - color=color, - fill=fill, - dashes=dashes, - width=width, - lineCap=lineCap, - lineJoin=lineJoin, - morph=morph, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - img.commit(overlay) - - return Q - - -def draw_quad( - page: pymupdf.Page, - quad: quad_like, - color: OptSeq = (0,), - fill: OptSeq = None, - dashes: OptStr = None, - width: float = 1, - lineCap: int = 0, - lineJoin: int = 0, - morph: OptSeq = None, - overlay: bool = True, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, -) -> pymupdf.Point: - """Draw a quadrilateral.""" - img = page.new_shape() - Q = img.draw_quad(pymupdf.Quad(quad)) - img.finish( - color=color, - fill=fill, - dashes=dashes, - width=width, - lineCap=lineCap, - lineJoin=lineJoin, - morph=morph, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - img.commit(overlay) - - return Q - - -def draw_polyline( - page: pymupdf.Page, - points: list, - color: OptSeq = (0,), - fill: OptSeq = None, - dashes: OptStr = None, - width: float = 1, - morph: OptSeq = None, - lineCap: int = 0, - lineJoin: int = 0, - overlay: bool = True, - closePath: bool = False, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, -) -> pymupdf.Point: - """Draw multiple connected line segments.""" - img = page.new_shape() - Q = img.draw_polyline(points) - img.finish( - color=color, - fill=fill, - dashes=dashes, - width=width, - lineCap=lineCap, - lineJoin=lineJoin, - morph=morph, - closePath=closePath, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - img.commit(overlay) - - return Q - - -def draw_circle( - page: pymupdf.Page, - center: point_like, - radius: float, - color: OptSeq = (0,), - fill: OptSeq = None, - morph: OptSeq = None, - dashes: OptStr = None, - width: float = 1, - lineCap: int = 0, - lineJoin: int = 0, - overlay: bool = True, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, -) -> pymupdf.Point: - """Draw a circle given its center and radius.""" - img = page.new_shape() - Q = img.draw_circle(pymupdf.Point(center), radius) - img.finish( - color=color, - fill=fill, - dashes=dashes, - width=width, - lineCap=lineCap, - lineJoin=lineJoin, - morph=morph, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - img.commit(overlay) - return Q - - -def draw_oval( - page: pymupdf.Page, - rect: typing.Union[rect_like, quad_like], - color: OptSeq = (0,), - fill: OptSeq = None, - dashes: OptStr = None, - morph: OptSeq = None, - width: float = 1, - lineCap: int = 0, - lineJoin: int = 0, - overlay: bool = True, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, -) -> pymupdf.Point: - """Draw an oval given its containing rectangle or quad.""" - img = page.new_shape() - Q = img.draw_oval(rect) - img.finish( - color=color, - fill=fill, - dashes=dashes, - width=width, - lineCap=lineCap, - lineJoin=lineJoin, - morph=morph, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - img.commit(overlay) - - return Q - - -def draw_curve( - page: pymupdf.Page, - p1: point_like, - p2: point_like, - p3: point_like, - color: OptSeq = (0,), - fill: OptSeq = None, - dashes: OptStr = None, - width: float = 1, - morph: OptSeq = None, - closePath: bool = False, - lineCap: int = 0, - lineJoin: int = 0, - overlay: bool = True, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, -) -> pymupdf.Point: - """Draw a special Bezier curve from p1 to p3, generating control points on lines p1 to p2 and p2 to p3.""" - img = page.new_shape() - Q = img.draw_curve(pymupdf.Point(p1), pymupdf.Point(p2), pymupdf.Point(p3)) - img.finish( - color=color, - fill=fill, - dashes=dashes, - width=width, - lineCap=lineCap, - lineJoin=lineJoin, - morph=morph, - closePath=closePath, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - img.commit(overlay) - - return Q - - -def draw_bezier( - page: pymupdf.Page, - p1: point_like, - p2: point_like, - p3: point_like, - p4: point_like, - color: OptSeq = (0,), - fill: OptSeq = None, - dashes: OptStr = None, - width: float = 1, - morph: OptStr = None, - closePath: bool = False, - lineCap: int = 0, - lineJoin: int = 0, - overlay: bool = True, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, -) -> pymupdf.Point: - """Draw a general cubic Bezier curve from p1 to p4 using control points p2 and p3.""" - img = page.new_shape() - Q = img.draw_bezier(pymupdf.Point(p1), pymupdf.Point(p2), pymupdf.Point(p3), pymupdf.Point(p4)) - img.finish( - color=color, - fill=fill, - dashes=dashes, - width=width, - lineCap=lineCap, - lineJoin=lineJoin, - morph=morph, - closePath=closePath, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - img.commit(overlay) - - return Q - - -def draw_sector( - page: pymupdf.Page, - center: point_like, - point: point_like, - beta: float, - color: OptSeq = (0,), - fill: OptSeq = None, - dashes: OptStr = None, - fullSector: bool = True, - morph: OptSeq = None, - width: float = 1, - closePath: bool = False, - lineCap: int = 0, - lineJoin: int = 0, - overlay: bool = True, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, -) -> pymupdf.Point: - """Draw a circle sector given circle center, one arc end point and the angle of the arc. - - Parameters: - center -- center of circle - point -- arc end point - beta -- angle of arc (degrees) - fullSector -- connect arc ends with center - """ - img = page.new_shape() - Q = img.draw_sector(pymupdf.Point(center), pymupdf.Point(point), beta, fullSector=fullSector) - img.finish( - color=color, - fill=fill, - dashes=dashes, - width=width, - lineCap=lineCap, - lineJoin=lineJoin, - morph=morph, - closePath=closePath, - stroke_opacity=stroke_opacity, - fill_opacity=fill_opacity, - oc=oc, - ) - img.commit(overlay) - - return Q - - -# ---------------------------------------------------------------------- -# Name: wx.lib.colourdb.py -# Purpose: Adds a bunch of colour names and RGB values to the -# colour database so they can be found by name -# -# Author: Robin Dunn -# -# Created: 13-March-2001 -# Copyright: (c) 2001-2017 by Total Control Software -# Licence: wxWindows license -# Tags: phoenix-port, unittest, documented -# ---------------------------------------------------------------------- - - -def getColorList() -> list: - """ - Returns a list of just the colour names used by this module. - :rtype: list of strings - """ - - return [x[0] for x in getColorInfoList()] - - -def getColorInfoList() -> list: - """ - Returns the list of colour name/value tuples used by this module. - :rtype: list of tuples - """ - - return [ - ("ALICEBLUE", 240, 248, 255), - ("ANTIQUEWHITE", 250, 235, 215), - ("ANTIQUEWHITE1", 255, 239, 219), - ("ANTIQUEWHITE2", 238, 223, 204), - ("ANTIQUEWHITE3", 205, 192, 176), - ("ANTIQUEWHITE4", 139, 131, 120), - ("AQUAMARINE", 127, 255, 212), - ("AQUAMARINE1", 127, 255, 212), - ("AQUAMARINE2", 118, 238, 198), - ("AQUAMARINE3", 102, 205, 170), - ("AQUAMARINE4", 69, 139, 116), - ("AZURE", 240, 255, 255), - ("AZURE1", 240, 255, 255), - ("AZURE2", 224, 238, 238), - ("AZURE3", 193, 205, 205), - ("AZURE4", 131, 139, 139), - ("BEIGE", 245, 245, 220), - ("BISQUE", 255, 228, 196), - ("BISQUE1", 255, 228, 196), - ("BISQUE2", 238, 213, 183), - ("BISQUE3", 205, 183, 158), - ("BISQUE4", 139, 125, 107), - ("BLACK", 0, 0, 0), - ("BLANCHEDALMOND", 255, 235, 205), - ("BLUE", 0, 0, 255), - ("BLUE1", 0, 0, 255), - ("BLUE2", 0, 0, 238), - ("BLUE3", 0, 0, 205), - ("BLUE4", 0, 0, 139), - ("BLUEVIOLET", 138, 43, 226), - ("BROWN", 165, 42, 42), - ("BROWN1", 255, 64, 64), - ("BROWN2", 238, 59, 59), - ("BROWN3", 205, 51, 51), - ("BROWN4", 139, 35, 35), - ("BURLYWOOD", 222, 184, 135), - ("BURLYWOOD1", 255, 211, 155), - ("BURLYWOOD2", 238, 197, 145), - ("BURLYWOOD3", 205, 170, 125), - ("BURLYWOOD4", 139, 115, 85), - ("CADETBLUE", 95, 158, 160), - ("CADETBLUE1", 152, 245, 255), - ("CADETBLUE2", 142, 229, 238), - ("CADETBLUE3", 122, 197, 205), - ("CADETBLUE4", 83, 134, 139), - ("CHARTREUSE", 127, 255, 0), - ("CHARTREUSE1", 127, 255, 0), - ("CHARTREUSE2", 118, 238, 0), - ("CHARTREUSE3", 102, 205, 0), - ("CHARTREUSE4", 69, 139, 0), - ("CHOCOLATE", 210, 105, 30), - ("CHOCOLATE1", 255, 127, 36), - ("CHOCOLATE2", 238, 118, 33), - ("CHOCOLATE3", 205, 102, 29), - ("CHOCOLATE4", 139, 69, 19), - ("COFFEE", 156, 79, 0), - ("CORAL", 255, 127, 80), - ("CORAL1", 255, 114, 86), - ("CORAL2", 238, 106, 80), - ("CORAL3", 205, 91, 69), - ("CORAL4", 139, 62, 47), - ("CORNFLOWERBLUE", 100, 149, 237), - ("CORNSILK", 255, 248, 220), - ("CORNSILK1", 255, 248, 220), - ("CORNSILK2", 238, 232, 205), - ("CORNSILK3", 205, 200, 177), - ("CORNSILK4", 139, 136, 120), - ("CYAN", 0, 255, 255), - ("CYAN1", 0, 255, 255), - ("CYAN2", 0, 238, 238), - ("CYAN3", 0, 205, 205), - ("CYAN4", 0, 139, 139), - ("DARKBLUE", 0, 0, 139), - ("DARKCYAN", 0, 139, 139), - ("DARKGOLDENROD", 184, 134, 11), - ("DARKGOLDENROD1", 255, 185, 15), - ("DARKGOLDENROD2", 238, 173, 14), - ("DARKGOLDENROD3", 205, 149, 12), - ("DARKGOLDENROD4", 139, 101, 8), - ("DARKGREEN", 0, 100, 0), - ("DARKGRAY", 169, 169, 169), - ("DARKKHAKI", 189, 183, 107), - ("DARKMAGENTA", 139, 0, 139), - ("DARKOLIVEGREEN", 85, 107, 47), - ("DARKOLIVEGREEN1", 202, 255, 112), - ("DARKOLIVEGREEN2", 188, 238, 104), - ("DARKOLIVEGREEN3", 162, 205, 90), - ("DARKOLIVEGREEN4", 110, 139, 61), - ("DARKORANGE", 255, 140, 0), - ("DARKORANGE1", 255, 127, 0), - ("DARKORANGE2", 238, 118, 0), - ("DARKORANGE3", 205, 102, 0), - ("DARKORANGE4", 139, 69, 0), - ("DARKORCHID", 153, 50, 204), - ("DARKORCHID1", 191, 62, 255), - ("DARKORCHID2", 178, 58, 238), - ("DARKORCHID3", 154, 50, 205), - ("DARKORCHID4", 104, 34, 139), - ("DARKRED", 139, 0, 0), - ("DARKSALMON", 233, 150, 122), - ("DARKSEAGREEN", 143, 188, 143), - ("DARKSEAGREEN1", 193, 255, 193), - ("DARKSEAGREEN2", 180, 238, 180), - ("DARKSEAGREEN3", 155, 205, 155), - ("DARKSEAGREEN4", 105, 139, 105), - ("DARKSLATEBLUE", 72, 61, 139), - ("DARKSLATEGRAY", 47, 79, 79), - ("DARKTURQUOISE", 0, 206, 209), - ("DARKVIOLET", 148, 0, 211), - ("DEEPPINK", 255, 20, 147), - ("DEEPPINK1", 255, 20, 147), - ("DEEPPINK2", 238, 18, 137), - ("DEEPPINK3", 205, 16, 118), - ("DEEPPINK4", 139, 10, 80), - ("DEEPSKYBLUE", 0, 191, 255), - ("DEEPSKYBLUE1", 0, 191, 255), - ("DEEPSKYBLUE2", 0, 178, 238), - ("DEEPSKYBLUE3", 0, 154, 205), - ("DEEPSKYBLUE4", 0, 104, 139), - ("DIMGRAY", 105, 105, 105), - ("DODGERBLUE", 30, 144, 255), - ("DODGERBLUE1", 30, 144, 255), - ("DODGERBLUE2", 28, 134, 238), - ("DODGERBLUE3", 24, 116, 205), - ("DODGERBLUE4", 16, 78, 139), - ("FIREBRICK", 178, 34, 34), - ("FIREBRICK1", 255, 48, 48), - ("FIREBRICK2", 238, 44, 44), - ("FIREBRICK3", 205, 38, 38), - ("FIREBRICK4", 139, 26, 26), - ("FLORALWHITE", 255, 250, 240), - ("FORESTGREEN", 34, 139, 34), - ("GAINSBORO", 220, 220, 220), - ("GHOSTWHITE", 248, 248, 255), - ("GOLD", 255, 215, 0), - ("GOLD1", 255, 215, 0), - ("GOLD2", 238, 201, 0), - ("GOLD3", 205, 173, 0), - ("GOLD4", 139, 117, 0), - ("GOLDENROD", 218, 165, 32), - ("GOLDENROD1", 255, 193, 37), - ("GOLDENROD2", 238, 180, 34), - ("GOLDENROD3", 205, 155, 29), - ("GOLDENROD4", 139, 105, 20), - ("GREEN YELLOW", 173, 255, 47), - ("GREEN", 0, 255, 0), - ("GREEN1", 0, 255, 0), - ("GREEN2", 0, 238, 0), - ("GREEN3", 0, 205, 0), - ("GREEN4", 0, 139, 0), - ("GREENYELLOW", 173, 255, 47), - ("GRAY", 190, 190, 190), - ("GRAY0", 0, 0, 0), - ("GRAY1", 3, 3, 3), - ("GRAY10", 26, 26, 26), - ("GRAY100", 255, 255, 255), - ("GRAY11", 28, 28, 28), - ("GRAY12", 31, 31, 31), - ("GRAY13", 33, 33, 33), - ("GRAY14", 36, 36, 36), - ("GRAY15", 38, 38, 38), - ("GRAY16", 41, 41, 41), - ("GRAY17", 43, 43, 43), - ("GRAY18", 46, 46, 46), - ("GRAY19", 48, 48, 48), - ("GRAY2", 5, 5, 5), - ("GRAY20", 51, 51, 51), - ("GRAY21", 54, 54, 54), - ("GRAY22", 56, 56, 56), - ("GRAY23", 59, 59, 59), - ("GRAY24", 61, 61, 61), - ("GRAY25", 64, 64, 64), - ("GRAY26", 66, 66, 66), - ("GRAY27", 69, 69, 69), - ("GRAY28", 71, 71, 71), - ("GRAY29", 74, 74, 74), - ("GRAY3", 8, 8, 8), - ("GRAY30", 77, 77, 77), - ("GRAY31", 79, 79, 79), - ("GRAY32", 82, 82, 82), - ("GRAY33", 84, 84, 84), - ("GRAY34", 87, 87, 87), - ("GRAY35", 89, 89, 89), - ("GRAY36", 92, 92, 92), - ("GRAY37", 94, 94, 94), - ("GRAY38", 97, 97, 97), - ("GRAY39", 99, 99, 99), - ("GRAY4", 10, 10, 10), - ("GRAY40", 102, 102, 102), - ("GRAY41", 105, 105, 105), - ("GRAY42", 107, 107, 107), - ("GRAY43", 110, 110, 110), - ("GRAY44", 112, 112, 112), - ("GRAY45", 115, 115, 115), - ("GRAY46", 117, 117, 117), - ("GRAY47", 120, 120, 120), - ("GRAY48", 122, 122, 122), - ("GRAY49", 125, 125, 125), - ("GRAY5", 13, 13, 13), - ("GRAY50", 127, 127, 127), - ("GRAY51", 130, 130, 130), - ("GRAY52", 133, 133, 133), - ("GRAY53", 135, 135, 135), - ("GRAY54", 138, 138, 138), - ("GRAY55", 140, 140, 140), - ("GRAY56", 143, 143, 143), - ("GRAY57", 145, 145, 145), - ("GRAY58", 148, 148, 148), - ("GRAY59", 150, 150, 150), - ("GRAY6", 15, 15, 15), - ("GRAY60", 153, 153, 153), - ("GRAY61", 156, 156, 156), - ("GRAY62", 158, 158, 158), - ("GRAY63", 161, 161, 161), - ("GRAY64", 163, 163, 163), - ("GRAY65", 166, 166, 166), - ("GRAY66", 168, 168, 168), - ("GRAY67", 171, 171, 171), - ("GRAY68", 173, 173, 173), - ("GRAY69", 176, 176, 176), - ("GRAY7", 18, 18, 18), - ("GRAY70", 179, 179, 179), - ("GRAY71", 181, 181, 181), - ("GRAY72", 184, 184, 184), - ("GRAY73", 186, 186, 186), - ("GRAY74", 189, 189, 189), - ("GRAY75", 191, 191, 191), - ("GRAY76", 194, 194, 194), - ("GRAY77", 196, 196, 196), - ("GRAY78", 199, 199, 199), - ("GRAY79", 201, 201, 201), - ("GRAY8", 20, 20, 20), - ("GRAY80", 204, 204, 204), - ("GRAY81", 207, 207, 207), - ("GRAY82", 209, 209, 209), - ("GRAY83", 212, 212, 212), - ("GRAY84", 214, 214, 214), - ("GRAY85", 217, 217, 217), - ("GRAY86", 219, 219, 219), - ("GRAY87", 222, 222, 222), - ("GRAY88", 224, 224, 224), - ("GRAY89", 227, 227, 227), - ("GRAY9", 23, 23, 23), - ("GRAY90", 229, 229, 229), - ("GRAY91", 232, 232, 232), - ("GRAY92", 235, 235, 235), - ("GRAY93", 237, 237, 237), - ("GRAY94", 240, 240, 240), - ("GRAY95", 242, 242, 242), - ("GRAY96", 245, 245, 245), - ("GRAY97", 247, 247, 247), - ("GRAY98", 250, 250, 250), - ("GRAY99", 252, 252, 252), - ("HONEYDEW", 240, 255, 240), - ("HONEYDEW1", 240, 255, 240), - ("HONEYDEW2", 224, 238, 224), - ("HONEYDEW3", 193, 205, 193), - ("HONEYDEW4", 131, 139, 131), - ("HOTPINK", 255, 105, 180), - ("HOTPINK1", 255, 110, 180), - ("HOTPINK2", 238, 106, 167), - ("HOTPINK3", 205, 96, 144), - ("HOTPINK4", 139, 58, 98), - ("INDIANRED", 205, 92, 92), - ("INDIANRED1", 255, 106, 106), - ("INDIANRED2", 238, 99, 99), - ("INDIANRED3", 205, 85, 85), - ("INDIANRED4", 139, 58, 58), - ("IVORY", 255, 255, 240), - ("IVORY1", 255, 255, 240), - ("IVORY2", 238, 238, 224), - ("IVORY3", 205, 205, 193), - ("IVORY4", 139, 139, 131), - ("KHAKI", 240, 230, 140), - ("KHAKI1", 255, 246, 143), - ("KHAKI2", 238, 230, 133), - ("KHAKI3", 205, 198, 115), - ("KHAKI4", 139, 134, 78), - ("LAVENDER", 230, 230, 250), - ("LAVENDERBLUSH", 255, 240, 245), - ("LAVENDERBLUSH1", 255, 240, 245), - ("LAVENDERBLUSH2", 238, 224, 229), - ("LAVENDERBLUSH3", 205, 193, 197), - ("LAVENDERBLUSH4", 139, 131, 134), - ("LAWNGREEN", 124, 252, 0), - ("LEMONCHIFFON", 255, 250, 205), - ("LEMONCHIFFON1", 255, 250, 205), - ("LEMONCHIFFON2", 238, 233, 191), - ("LEMONCHIFFON3", 205, 201, 165), - ("LEMONCHIFFON4", 139, 137, 112), - ("LIGHTBLUE", 173, 216, 230), - ("LIGHTBLUE1", 191, 239, 255), - ("LIGHTBLUE2", 178, 223, 238), - ("LIGHTBLUE3", 154, 192, 205), - ("LIGHTBLUE4", 104, 131, 139), - ("LIGHTCORAL", 240, 128, 128), - ("LIGHTCYAN", 224, 255, 255), - ("LIGHTCYAN1", 224, 255, 255), - ("LIGHTCYAN2", 209, 238, 238), - ("LIGHTCYAN3", 180, 205, 205), - ("LIGHTCYAN4", 122, 139, 139), - ("LIGHTGOLDENROD", 238, 221, 130), - ("LIGHTGOLDENROD1", 255, 236, 139), - ("LIGHTGOLDENROD2", 238, 220, 130), - ("LIGHTGOLDENROD3", 205, 190, 112), - ("LIGHTGOLDENROD4", 139, 129, 76), - ("LIGHTGOLDENRODYELLOW", 250, 250, 210), - ("LIGHTGREEN", 144, 238, 144), - ("LIGHTGRAY", 211, 211, 211), - ("LIGHTPINK", 255, 182, 193), - ("LIGHTPINK1", 255, 174, 185), - ("LIGHTPINK2", 238, 162, 173), - ("LIGHTPINK3", 205, 140, 149), - ("LIGHTPINK4", 139, 95, 101), - ("LIGHTSALMON", 255, 160, 122), - ("LIGHTSALMON1", 255, 160, 122), - ("LIGHTSALMON2", 238, 149, 114), - ("LIGHTSALMON3", 205, 129, 98), - ("LIGHTSALMON4", 139, 87, 66), - ("LIGHTSEAGREEN", 32, 178, 170), - ("LIGHTSKYBLUE", 135, 206, 250), - ("LIGHTSKYBLUE1", 176, 226, 255), - ("LIGHTSKYBLUE2", 164, 211, 238), - ("LIGHTSKYBLUE3", 141, 182, 205), - ("LIGHTSKYBLUE4", 96, 123, 139), - ("LIGHTSLATEBLUE", 132, 112, 255), - ("LIGHTSLATEGRAY", 119, 136, 153), - ("LIGHTSTEELBLUE", 176, 196, 222), - ("LIGHTSTEELBLUE1", 202, 225, 255), - ("LIGHTSTEELBLUE2", 188, 210, 238), - ("LIGHTSTEELBLUE3", 162, 181, 205), - ("LIGHTSTEELBLUE4", 110, 123, 139), - ("LIGHTYELLOW", 255, 255, 224), - ("LIGHTYELLOW1", 255, 255, 224), - ("LIGHTYELLOW2", 238, 238, 209), - ("LIGHTYELLOW3", 205, 205, 180), - ("LIGHTYELLOW4", 139, 139, 122), - ("LIMEGREEN", 50, 205, 50), - ("LINEN", 250, 240, 230), - ("MAGENTA", 255, 0, 255), - ("MAGENTA1", 255, 0, 255), - ("MAGENTA2", 238, 0, 238), - ("MAGENTA3", 205, 0, 205), - ("MAGENTA4", 139, 0, 139), - ("MAROON", 176, 48, 96), - ("MAROON1", 255, 52, 179), - ("MAROON2", 238, 48, 167), - ("MAROON3", 205, 41, 144), - ("MAROON4", 139, 28, 98), - ("MEDIUMAQUAMARINE", 102, 205, 170), - ("MEDIUMBLUE", 0, 0, 205), - ("MEDIUMORCHID", 186, 85, 211), - ("MEDIUMORCHID1", 224, 102, 255), - ("MEDIUMORCHID2", 209, 95, 238), - ("MEDIUMORCHID3", 180, 82, 205), - ("MEDIUMORCHID4", 122, 55, 139), - ("MEDIUMPURPLE", 147, 112, 219), - ("MEDIUMPURPLE1", 171, 130, 255), - ("MEDIUMPURPLE2", 159, 121, 238), - ("MEDIUMPURPLE3", 137, 104, 205), - ("MEDIUMPURPLE4", 93, 71, 139), - ("MEDIUMSEAGREEN", 60, 179, 113), - ("MEDIUMSLATEBLUE", 123, 104, 238), - ("MEDIUMSPRINGGREEN", 0, 250, 154), - ("MEDIUMTURQUOISE", 72, 209, 204), - ("MEDIUMVIOLETRED", 199, 21, 133), - ("MIDNIGHTBLUE", 25, 25, 112), - ("MINTCREAM", 245, 255, 250), - ("MISTYROSE", 255, 228, 225), - ("MISTYROSE1", 255, 228, 225), - ("MISTYROSE2", 238, 213, 210), - ("MISTYROSE3", 205, 183, 181), - ("MISTYROSE4", 139, 125, 123), - ("MOCCASIN", 255, 228, 181), - ("MUPDFBLUE", 37, 114, 172), - ("NAVAJOWHITE", 255, 222, 173), - ("NAVAJOWHITE1", 255, 222, 173), - ("NAVAJOWHITE2", 238, 207, 161), - ("NAVAJOWHITE3", 205, 179, 139), - ("NAVAJOWHITE4", 139, 121, 94), - ("NAVY", 0, 0, 128), - ("NAVYBLUE", 0, 0, 128), - ("OLDLACE", 253, 245, 230), - ("OLIVEDRAB", 107, 142, 35), - ("OLIVEDRAB1", 192, 255, 62), - ("OLIVEDRAB2", 179, 238, 58), - ("OLIVEDRAB3", 154, 205, 50), - ("OLIVEDRAB4", 105, 139, 34), - ("ORANGE", 255, 165, 0), - ("ORANGE1", 255, 165, 0), - ("ORANGE2", 238, 154, 0), - ("ORANGE3", 205, 133, 0), - ("ORANGE4", 139, 90, 0), - ("ORANGERED", 255, 69, 0), - ("ORANGERED1", 255, 69, 0), - ("ORANGERED2", 238, 64, 0), - ("ORANGERED3", 205, 55, 0), - ("ORANGERED4", 139, 37, 0), - ("ORCHID", 218, 112, 214), - ("ORCHID1", 255, 131, 250), - ("ORCHID2", 238, 122, 233), - ("ORCHID3", 205, 105, 201), - ("ORCHID4", 139, 71, 137), - ("PALEGOLDENROD", 238, 232, 170), - ("PALEGREEN", 152, 251, 152), - ("PALEGREEN1", 154, 255, 154), - ("PALEGREEN2", 144, 238, 144), - ("PALEGREEN3", 124, 205, 124), - ("PALEGREEN4", 84, 139, 84), - ("PALETURQUOISE", 175, 238, 238), - ("PALETURQUOISE1", 187, 255, 255), - ("PALETURQUOISE2", 174, 238, 238), - ("PALETURQUOISE3", 150, 205, 205), - ("PALETURQUOISE4", 102, 139, 139), - ("PALEVIOLETRED", 219, 112, 147), - ("PALEVIOLETRED1", 255, 130, 171), - ("PALEVIOLETRED2", 238, 121, 159), - ("PALEVIOLETRED3", 205, 104, 137), - ("PALEVIOLETRED4", 139, 71, 93), - ("PAPAYAWHIP", 255, 239, 213), - ("PEACHPUFF", 255, 218, 185), - ("PEACHPUFF1", 255, 218, 185), - ("PEACHPUFF2", 238, 203, 173), - ("PEACHPUFF3", 205, 175, 149), - ("PEACHPUFF4", 139, 119, 101), - ("PERU", 205, 133, 63), - ("PINK", 255, 192, 203), - ("PINK1", 255, 181, 197), - ("PINK2", 238, 169, 184), - ("PINK3", 205, 145, 158), - ("PINK4", 139, 99, 108), - ("PLUM", 221, 160, 221), - ("PLUM1", 255, 187, 255), - ("PLUM2", 238, 174, 238), - ("PLUM3", 205, 150, 205), - ("PLUM4", 139, 102, 139), - ("POWDERBLUE", 176, 224, 230), - ("PURPLE", 160, 32, 240), - ("PURPLE1", 155, 48, 255), - ("PURPLE2", 145, 44, 238), - ("PURPLE3", 125, 38, 205), - ("PURPLE4", 85, 26, 139), - ("PY_COLOR", 240, 255, 210), - ("RED", 255, 0, 0), - ("RED1", 255, 0, 0), - ("RED2", 238, 0, 0), - ("RED3", 205, 0, 0), - ("RED4", 139, 0, 0), - ("ROSYBROWN", 188, 143, 143), - ("ROSYBROWN1", 255, 193, 193), - ("ROSYBROWN2", 238, 180, 180), - ("ROSYBROWN3", 205, 155, 155), - ("ROSYBROWN4", 139, 105, 105), - ("ROYALBLUE", 65, 105, 225), - ("ROYALBLUE1", 72, 118, 255), - ("ROYALBLUE2", 67, 110, 238), - ("ROYALBLUE3", 58, 95, 205), - ("ROYALBLUE4", 39, 64, 139), - ("SADDLEBROWN", 139, 69, 19), - ("SALMON", 250, 128, 114), - ("SALMON1", 255, 140, 105), - ("SALMON2", 238, 130, 98), - ("SALMON3", 205, 112, 84), - ("SALMON4", 139, 76, 57), - ("SANDYBROWN", 244, 164, 96), - ("SEAGREEN", 46, 139, 87), - ("SEAGREEN1", 84, 255, 159), - ("SEAGREEN2", 78, 238, 148), - ("SEAGREEN3", 67, 205, 128), - ("SEAGREEN4", 46, 139, 87), - ("SEASHELL", 255, 245, 238), - ("SEASHELL1", 255, 245, 238), - ("SEASHELL2", 238, 229, 222), - ("SEASHELL3", 205, 197, 191), - ("SEASHELL4", 139, 134, 130), - ("SIENNA", 160, 82, 45), - ("SIENNA1", 255, 130, 71), - ("SIENNA2", 238, 121, 66), - ("SIENNA3", 205, 104, 57), - ("SIENNA4", 139, 71, 38), - ("SKYBLUE", 135, 206, 235), - ("SKYBLUE1", 135, 206, 255), - ("SKYBLUE2", 126, 192, 238), - ("SKYBLUE3", 108, 166, 205), - ("SKYBLUE4", 74, 112, 139), - ("SLATEBLUE", 106, 90, 205), - ("SLATEBLUE1", 131, 111, 255), - ("SLATEBLUE2", 122, 103, 238), - ("SLATEBLUE3", 105, 89, 205), - ("SLATEBLUE4", 71, 60, 139), - ("SLATEGRAY", 112, 128, 144), - ("SNOW", 255, 250, 250), - ("SNOW1", 255, 250, 250), - ("SNOW2", 238, 233, 233), - ("SNOW3", 205, 201, 201), - ("SNOW4", 139, 137, 137), - ("SPRINGGREEN", 0, 255, 127), - ("SPRINGGREEN1", 0, 255, 127), - ("SPRINGGREEN2", 0, 238, 118), - ("SPRINGGREEN3", 0, 205, 102), - ("SPRINGGREEN4", 0, 139, 69), - ("STEELBLUE", 70, 130, 180), - ("STEELBLUE1", 99, 184, 255), - ("STEELBLUE2", 92, 172, 238), - ("STEELBLUE3", 79, 148, 205), - ("STEELBLUE4", 54, 100, 139), - ("TAN", 210, 180, 140), - ("TAN1", 255, 165, 79), - ("TAN2", 238, 154, 73), - ("TAN3", 205, 133, 63), - ("TAN4", 139, 90, 43), - ("THISTLE", 216, 191, 216), - ("THISTLE1", 255, 225, 255), - ("THISTLE2", 238, 210, 238), - ("THISTLE3", 205, 181, 205), - ("THISTLE4", 139, 123, 139), - ("TOMATO", 255, 99, 71), - ("TOMATO1", 255, 99, 71), - ("TOMATO2", 238, 92, 66), - ("TOMATO3", 205, 79, 57), - ("TOMATO4", 139, 54, 38), - ("TURQUOISE", 64, 224, 208), - ("TURQUOISE1", 0, 245, 255), - ("TURQUOISE2", 0, 229, 238), - ("TURQUOISE3", 0, 197, 205), - ("TURQUOISE4", 0, 134, 139), - ("VIOLET", 238, 130, 238), - ("VIOLETRED", 208, 32, 144), - ("VIOLETRED1", 255, 62, 150), - ("VIOLETRED2", 238, 58, 140), - ("VIOLETRED3", 205, 50, 120), - ("VIOLETRED4", 139, 34, 82), - ("WHEAT", 245, 222, 179), - ("WHEAT1", 255, 231, 186), - ("WHEAT2", 238, 216, 174), - ("WHEAT3", 205, 186, 150), - ("WHEAT4", 139, 126, 102), - ("WHITE", 255, 255, 255), - ("WHITESMOKE", 245, 245, 245), - ("YELLOW", 255, 255, 0), - ("YELLOW1", 255, 255, 0), - ("YELLOW2", 238, 238, 0), - ("YELLOW3", 205, 205, 0), - ("YELLOW4", 139, 139, 0), - ("YELLOWGREEN", 154, 205, 50), - ] - - -def getColorInfoDict() -> dict: - d = {} - for item in getColorInfoList(): - d[item[0].lower()] = item[1:] - return d - - -def getColor(name: str) -> tuple: - """Retrieve RGB color in PDF format by name. - - Returns: - a triple of floats in range 0 to 1. In case of name-not-found, "white" is returned. - """ - try: - c = getColorInfoList()[getColorList().index(name.upper())] - return (c[1] / 255.0, c[2] / 255.0, c[3] / 255.0) - except Exception: - pymupdf.exception_info() - return (1, 1, 1) - - -def getColorHSV(name: str) -> tuple: - """Retrieve the hue, saturation, value triple of a color name. - - Returns: - a triple (degree, percent, percent). If not found (-1, -1, -1) is returned. + a triple (degree, percent, percent). If not found (-1, -1, -1) is returned. """ try: x = getColorInfoList()[getColorList().index(name.upper())] @@ -3299,1356 +824,6 @@ def _get_font_properties(doc: pymupdf.Document, xref: int) -> tuple: return fontname, ext, stype, asc, dsc -def get_char_widths( - doc: pymupdf.Document, xref: int, limit: int = 256, idx: int = 0, fontdict: OptDict = None -) -> list: - """Get list of glyph information of a font. - - Notes: - Must be provided by its XREF number. If we already dealt with the - font, it will be recorded in doc.FontInfos. Otherwise we insert an - entry there. - Finally we return the glyphs for the font. This is a list of - (glyph, width) where glyph is an integer controlling the char - appearance, and width is a float controlling the char's spacing: - width * fontsize is the actual space. - For 'simple' fonts, glyph == ord(char) will usually be true. - Exceptions are 'Symbol' and 'ZapfDingbats'. We are providing data for these directly here. - """ - fontinfo = pymupdf.CheckFontInfo(doc, xref) - if fontinfo is None: # not recorded yet: create it - if fontdict is None: - name, ext, stype, asc, dsc = _get_font_properties(doc, xref) - fontdict = { - "name": name, - "type": stype, - "ext": ext, - "ascender": asc, - "descender": dsc, - } - else: - name = fontdict["name"] - ext = fontdict["ext"] - stype = fontdict["type"] - ordering = fontdict["ordering"] - simple = fontdict["simple"] - - if ext == "": - raise ValueError("xref is not a font") - - # check for 'simple' fonts - if stype in ("Type1", "MMType1", "TrueType"): - simple = True - else: - simple = False - - # check for CJK fonts - if name in ("Fangti", "Ming"): - ordering = 0 - elif name in ("Heiti", "Song"): - ordering = 1 - elif name in ("Gothic", "Mincho"): - ordering = 2 - elif name in ("Dotum", "Batang"): - ordering = 3 - else: - ordering = -1 - - fontdict["simple"] = simple - - if name == "ZapfDingbats": - glyphs = pymupdf.zapf_glyphs - elif name == "Symbol": - glyphs = pymupdf.symbol_glyphs - else: - glyphs = None - - fontdict["glyphs"] = glyphs - fontdict["ordering"] = ordering - fontinfo = [xref, fontdict] - doc.FontInfos.append(fontinfo) - else: - fontdict = fontinfo[1] - glyphs = fontdict["glyphs"] - simple = fontdict["simple"] - ordering = fontdict["ordering"] - - if glyphs is None: - oldlimit = 0 - else: - oldlimit = len(glyphs) - - mylimit = max(256, limit) - - if mylimit <= oldlimit: - return glyphs - - if ordering < 0: # not a CJK font - glyphs = doc._get_char_widths( - xref, fontdict["name"], fontdict["ext"], fontdict["ordering"], mylimit, idx - ) - else: # CJK fonts use char codes and width = 1 - glyphs = None - - fontdict["glyphs"] = glyphs - fontinfo[1] = fontdict - pymupdf.UpdateFontInfo(doc, fontinfo) - - return glyphs - - -class Shape: - """Create a new shape.""" - - @staticmethod - def horizontal_angle(C, P): - """Return the angle to the horizontal for the connection from C to P. - This uses the arcus sine function and resolves its inherent ambiguity by - looking up in which quadrant vector S = P - C is located. - """ - S = pymupdf.Point(P - C).unit # unit vector 'C' -> 'P' - alfa = math.asin(abs(S.y)) # absolute angle from horizontal - if S.x < 0: # make arcsin result unique - if S.y <= 0: # bottom-left - alfa = -(math.pi - alfa) - else: # top-left - alfa = math.pi - alfa - else: - if S.y >= 0: # top-right - pass - else: # bottom-right - alfa = -alfa - return alfa - - def __init__(self, page: pymupdf.Page): - pymupdf.CheckParent(page) - self.page = page - self.doc = page.parent - if not self.doc.is_pdf: - raise ValueError("is no PDF") - self.height = page.mediabox_size.y - self.width = page.mediabox_size.x - self.x = page.cropbox_position.x - self.y = page.cropbox_position.y - - self.pctm = page.transformation_matrix # page transf. matrix - self.ipctm = ~self.pctm # inverted transf. matrix - - self.draw_cont = "" - self.text_cont = "" - self.totalcont = "" - self.last_point = None - self.rect = None - - def updateRect(self, x): - if self.rect is None: - if len(x) == 2: - self.rect = pymupdf.Rect(x, x) - else: - self.rect = pymupdf.Rect(x) - - else: - if len(x) == 2: - x = pymupdf.Point(x) - self.rect.x0 = min(self.rect.x0, x.x) - self.rect.y0 = min(self.rect.y0, x.y) - self.rect.x1 = max(self.rect.x1, x.x) - self.rect.y1 = max(self.rect.y1, x.y) - else: - x = pymupdf.Rect(x) - self.rect.x0 = min(self.rect.x0, x.x0) - self.rect.y0 = min(self.rect.y0, x.y0) - self.rect.x1 = max(self.rect.x1, x.x1) - self.rect.y1 = max(self.rect.y1, x.y1) - - def draw_line(self, p1: point_like, p2: point_like) -> pymupdf.Point: - """Draw a line between two points.""" - p1 = pymupdf.Point(p1) - p2 = pymupdf.Point(p2) - if not (self.last_point == p1): - self.draw_cont += _format_g(pymupdf.JM_TUPLE(p1 * self.ipctm)) + " m\n" - self.last_point = p1 - self.updateRect(p1) - - self.draw_cont += _format_g(pymupdf.JM_TUPLE(p2 * self.ipctm)) + " l\n" - self.updateRect(p2) - self.last_point = p2 - return self.last_point - - def draw_polyline(self, points: list) -> pymupdf.Point: - """Draw several connected line segments.""" - for i, p in enumerate(points): - if i == 0: - if not (self.last_point == pymupdf.Point(p)): - self.draw_cont += _format_g(pymupdf.JM_TUPLE(pymupdf.Point(p) * self.ipctm)) + " m\n" - self.last_point = pymupdf.Point(p) - else: - self.draw_cont += _format_g(pymupdf.JM_TUPLE(pymupdf.Point(p) * self.ipctm)) + " l\n" - self.updateRect(p) - - self.last_point = pymupdf.Point(points[-1]) - return self.last_point - - def draw_bezier( - self, - p1: point_like, - p2: point_like, - p3: point_like, - p4: point_like, - ) -> pymupdf.Point: - """Draw a standard cubic Bezier curve.""" - p1 = pymupdf.Point(p1) - p2 = pymupdf.Point(p2) - p3 = pymupdf.Point(p3) - p4 = pymupdf.Point(p4) - if not (self.last_point == p1): - self.draw_cont += _format_g(pymupdf.JM_TUPLE(p1 * self.ipctm)) + " m\n" - args = pymupdf.JM_TUPLE(list(p2 * self.ipctm) + list(p3 * self.ipctm) + list(p4 * self.ipctm)) - self.draw_cont += _format_g(args) + " c\n" - self.updateRect(p1) - self.updateRect(p2) - self.updateRect(p3) - self.updateRect(p4) - self.last_point = p4 - return self.last_point - - def draw_oval(self, tetra: typing.Union[quad_like, rect_like]) -> pymupdf.Point: - """Draw an ellipse inside a tetrapod.""" - if len(tetra) != 4: - raise ValueError("invalid arg length") - if hasattr(tetra[0], "__float__"): - q = pymupdf.Rect(tetra).quad - else: - q = pymupdf.Quad(tetra) - - mt = q.ul + (q.ur - q.ul) * 0.5 - mr = q.ur + (q.lr - q.ur) * 0.5 - mb = q.ll + (q.lr - q.ll) * 0.5 - ml = q.ul + (q.ll - q.ul) * 0.5 - if not (self.last_point == ml): - self.draw_cont += _format_g(pymupdf.JM_TUPLE(ml * self.ipctm)) + " m\n" - self.last_point = ml - self.draw_curve(ml, q.ll, mb) - self.draw_curve(mb, q.lr, mr) - self.draw_curve(mr, q.ur, mt) - self.draw_curve(mt, q.ul, ml) - self.updateRect(q.rect) - self.last_point = ml - return self.last_point - - def draw_circle(self, center: point_like, radius: float) -> pymupdf.Point: - """Draw a circle given its center and radius.""" - if not radius > pymupdf.EPSILON: - raise ValueError("radius must be positive") - center = pymupdf.Point(center) - p1 = center - (radius, 0) - return self.draw_sector(center, p1, 360, fullSector=False) - - def draw_curve( - self, - p1: point_like, - p2: point_like, - p3: point_like, - ) -> pymupdf.Point: - """Draw a curve between points using one control point.""" - kappa = 0.55228474983 - p1 = pymupdf.Point(p1) - p2 = pymupdf.Point(p2) - p3 = pymupdf.Point(p3) - k1 = p1 + (p2 - p1) * kappa - k2 = p3 + (p2 - p3) * kappa - return self.draw_bezier(p1, k1, k2, p3) - - def draw_sector( - self, - center: point_like, - point: point_like, - beta: float, - fullSector: bool = True, - ) -> pymupdf.Point: - """Draw a circle sector.""" - center = pymupdf.Point(center) - point = pymupdf.Point(point) - l3 = lambda a, b: _format_g((a, b)) + " m\n" - l4 = lambda a, b, c, d, e, f: _format_g((a, b, c, d, e, f)) + " c\n" - l5 = lambda a, b: _format_g((a, b)) + " l\n" - betar = math.radians(-beta) - w360 = math.radians(math.copysign(360, betar)) * (-1) - w90 = math.radians(math.copysign(90, betar)) - w45 = w90 / 2 - while abs(betar) > 2 * math.pi: - betar += w360 # bring angle below 360 degrees - if not (self.last_point == point): - self.draw_cont += l3(*pymupdf.JM_TUPLE(point * self.ipctm)) - self.last_point = point - Q = pymupdf.Point(0, 0) # just make sure it exists - C = center - P = point - S = P - C # vector 'center' -> 'point' - rad = abs(S) # circle radius - - if not rad > pymupdf.EPSILON: - raise ValueError("radius must be positive") - - alfa = self.horizontal_angle(center, point) - while abs(betar) > abs(w90): # draw 90 degree arcs - q1 = C.x + math.cos(alfa + w90) * rad - q2 = C.y + math.sin(alfa + w90) * rad - Q = pymupdf.Point(q1, q2) # the arc's end point - r1 = C.x + math.cos(alfa + w45) * rad / math.cos(w45) - r2 = C.y + math.sin(alfa + w45) * rad / math.cos(w45) - R = pymupdf.Point(r1, r2) # crossing point of tangents - kappah = (1 - math.cos(w45)) * 4 / 3 / abs(R - Q) - kappa = kappah * abs(P - Q) - cp1 = P + (R - P) * kappa # control point 1 - cp2 = Q + (R - Q) * kappa # control point 2 - self.draw_cont += l4(*pymupdf.JM_TUPLE( - list(cp1 * self.ipctm) + list(cp2 * self.ipctm) + list(Q * self.ipctm) - )) - - betar -= w90 # reduce param angle by 90 deg - alfa += w90 # advance start angle by 90 deg - P = Q # advance to arc end point - # draw (remaining) arc - if abs(betar) > 1e-3: # significant degrees left? - beta2 = betar / 2 - q1 = C.x + math.cos(alfa + betar) * rad - q2 = C.y + math.sin(alfa + betar) * rad - Q = pymupdf.Point(q1, q2) # the arc's end point - r1 = C.x + math.cos(alfa + beta2) * rad / math.cos(beta2) - r2 = C.y + math.sin(alfa + beta2) * rad / math.cos(beta2) - R = pymupdf.Point(r1, r2) # crossing point of tangents - # kappa height is 4/3 of segment height - kappah = (1 - math.cos(beta2)) * 4 / 3 / abs(R - Q) # kappa height - kappa = kappah * abs(P - Q) / (1 - math.cos(betar)) - cp1 = P + (R - P) * kappa # control point 1 - cp2 = Q + (R - Q) * kappa # control point 2 - self.draw_cont += l4(*pymupdf.JM_TUPLE( - list(cp1 * self.ipctm) + list(cp2 * self.ipctm) + list(Q * self.ipctm) - )) - if fullSector: - self.draw_cont += l3(*pymupdf.JM_TUPLE(point * self.ipctm)) - self.draw_cont += l5(*pymupdf.JM_TUPLE(center * self.ipctm)) - self.draw_cont += l5(*pymupdf.JM_TUPLE(Q * self.ipctm)) - self.last_point = Q - return self.last_point - - def draw_rect(self, rect: rect_like, *, radius=None) -> pymupdf.Point: - """Draw a rectangle. - - Args: - radius: if not None, the rectangle will have rounded corners. - This is the radius of the curvature, given as percentage of - the rectangle width or height. Valid are values 0 < v <= 0.5. - For a sequence of two values, the corners will have different - radii. Otherwise, the percentage will be computed from the - shorter side. A value of (0.5, 0.5) will draw an ellipse. - """ - r = pymupdf.Rect(rect) - if radius is None: # standard rectangle - self.draw_cont += _format_g(pymupdf.JM_TUPLE( - list(r.bl * self.ipctm) + [r.width, r.height] - )) + " re\n" - self.updateRect(r) - self.last_point = r.tl - return self.last_point - # rounded corners requested. This requires 1 or 2 values, each - # with 0 < value <= 0.5 - if hasattr(radius, "__float__"): - if radius <= 0 or radius > 0.5: - raise ValueError(f"bad radius value {radius}.") - d = min(r.width, r.height) * radius - px = (d, 0) - py = (0, d) - elif hasattr(radius, "__len__") and len(radius) == 2: - rx, ry = radius - px = (rx * r.width, 0) - py = (0, ry * r.height) - if min(rx, ry) <= 0 or max(rx, ry) > 0.5: - raise ValueError(f"bad radius value {radius}.") - else: - raise ValueError(f"bad radius value {radius}.") - - lp = self.draw_line(r.tl + py, r.bl - py) - lp = self.draw_curve(lp, r.bl, r.bl + px) - - lp = self.draw_line(lp, r.br - px) - lp = self.draw_curve(lp, r.br, r.br - py) - - lp = self.draw_line(lp, r.tr + py) - lp = self.draw_curve(lp, r.tr, r.tr - px) - - lp = self.draw_line(lp, r.tl + px) - self.last_point = self.draw_curve(lp, r.tl, r.tl + py) - - self.updateRect(r) - return self.last_point - - def draw_quad(self, quad: quad_like) -> pymupdf.Point: - """Draw a Quad.""" - q = pymupdf.Quad(quad) - return self.draw_polyline([q.ul, q.ll, q.lr, q.ur, q.ul]) - - def draw_zigzag( - self, - p1: point_like, - p2: point_like, - breadth: float = 2, - ) -> pymupdf.Point: - """Draw a zig-zagged line from p1 to p2.""" - p1 = pymupdf.Point(p1) - p2 = pymupdf.Point(p2) - S = p2 - p1 # vector start - end - rad = abs(S) # distance of points - cnt = 4 * int(round(rad / (4 * breadth), 0)) # always take full phases - if cnt < 4: - raise ValueError("points too close") - mb = rad / cnt # revised breadth - matrix = pymupdf.Matrix(pymupdf.util_hor_matrix(p1, p2)) # normalize line to x-axis - i_mat = ~matrix # get original position - points = [] # stores edges - for i in range(1, cnt): - if i % 4 == 1: # point "above" connection - p = pymupdf.Point(i, -1) * mb - elif i % 4 == 3: # point "below" connection - p = pymupdf.Point(i, 1) * mb - else: # ignore others - continue - points.append(p * i_mat) - self.draw_polyline([p1] + points + [p2]) # add start and end points - return p2 - - def draw_squiggle( - self, - p1: point_like, - p2: point_like, - breadth=2, - ) -> pymupdf.Point: - """Draw a squiggly line from p1 to p2.""" - p1 = pymupdf.Point(p1) - p2 = pymupdf.Point(p2) - S = p2 - p1 # vector start - end - rad = abs(S) # distance of points - cnt = 4 * int(round(rad / (4 * breadth), 0)) # always take full phases - if cnt < 4: - raise ValueError("points too close") - mb = rad / cnt # revised breadth - matrix = pymupdf.Matrix(pymupdf.util_hor_matrix(p1, p2)) # normalize line to x-axis - i_mat = ~matrix # get original position - k = 2.4142135623765633 # y of draw_curve helper point - - points = [] # stores edges - for i in range(1, cnt): - if i % 4 == 1: # point "above" connection - p = pymupdf.Point(i, -k) * mb - elif i % 4 == 3: # point "below" connection - p = pymupdf.Point(i, k) * mb - else: # else on connection line - p = pymupdf.Point(i, 0) * mb - points.append(p * i_mat) - - points = [p1] + points + [p2] - cnt = len(points) - i = 0 - while i + 2 < cnt: - self.draw_curve(points[i], points[i + 1], points[i + 2]) - i += 2 - return p2 - - # ============================================================================== - # Shape.insert_text - # ============================================================================== - def insert_text( - self, - point: point_like, - buffer: typing.Union[str, list], - fontsize: float = 11, - lineheight: OptFloat = None, - fontname: str = "helv", - fontfile: OptStr = None, - set_simple: bool = 0, - encoding: int = 0, - color: OptSeq = None, - fill: OptSeq = None, - render_mode: int = 0, - border_width: float = 0.05, - rotate: int = 0, - morph: OptSeq = None, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, - ) -> int: - - # ensure 'text' is a list of strings, worth dealing with - if not bool(buffer): - return 0 - - if type(buffer) not in (list, tuple): - text = buffer.splitlines() - else: - text = buffer - - if not len(text) > 0: - return 0 - - point = pymupdf.Point(point) - try: - maxcode = max([ord(c) for c in " ".join(text)]) - except Exception: - pymupdf.exception_info() - return 0 - - # ensure valid 'fontname' - fname = fontname - if fname.startswith("/"): - fname = fname[1:] - - xref = self.page.insert_font( - fontname=fname, fontfile=fontfile, encoding=encoding, set_simple=set_simple - ) - fontinfo = pymupdf.CheckFontInfo(self.doc, xref) - - fontdict = fontinfo[1] - ordering = fontdict["ordering"] - simple = fontdict["simple"] - bfname = fontdict["name"] - ascender = fontdict["ascender"] - descender = fontdict["descender"] - if lineheight: - lheight = fontsize * lineheight - elif ascender - descender <= 1: - lheight = fontsize * 1.2 - else: - lheight = fontsize * (ascender - descender) - - if maxcode > 255: - glyphs = self.doc.get_char_widths(xref, maxcode + 1) - else: - glyphs = fontdict["glyphs"] - - tab = [] - for t in text: - if simple and bfname not in ("Symbol", "ZapfDingbats"): - g = None - else: - g = glyphs - tab.append(pymupdf.getTJstr(t, g, simple, ordering)) - text = tab - - color_str = pymupdf.ColorCode(color, "c") - fill_str = pymupdf.ColorCode(fill, "f") - if not fill and render_mode == 0: # ensure fill color when 0 Tr - fill = color - fill_str = pymupdf.ColorCode(color, "f") - - morphing = pymupdf.CheckMorph(morph) - rot = rotate - if rot % 90 != 0: - raise ValueError("bad rotate value") - - while rot < 0: - rot += 360 - rot = rot % 360 # text rotate = 0, 90, 270, 180 - - templ1 = lambda a, b, c, d, e, f, g: f"\nq\n{a}{b}BT\n{c}1 0 0 1 {_format_g((d, e))} Tm\n/{f} {_format_g(g)} Tf " - templ2 = lambda a: f"TJ\n0 -{_format_g(a)} TD\n" - cmp90 = "0 1 -1 0 0 0 cm\n" # rotates 90 deg counter-clockwise - cmm90 = "0 -1 1 0 0 0 cm\n" # rotates 90 deg clockwise - cm180 = "-1 0 0 -1 0 0 cm\n" # rotates by 180 deg. - height = self.height - width = self.width - - # setting up for standard rotation directions - # case rotate = 0 - if morphing: - m1 = pymupdf.Matrix(1, 0, 0, 1, morph[0].x + self.x, height - morph[0].y - self.y) - mat = ~m1 * morph[1] * m1 - cm = _format_g(pymupdf.JM_TUPLE(mat)) + " cm\n" - else: - cm = "" - top = height - point.y - self.y # start of 1st char - left = point.x + self.x # start of 1. char - space = top # space available - #headroom = point.y + self.y # distance to page border - if rot == 90: - left = height - point.y - self.y - top = -point.x - self.x - cm += cmp90 - space = width - abs(top) - #headroom = point.x + self.x - - elif rot == 270: - left = -height + point.y + self.y - top = point.x + self.x - cm += cmm90 - space = abs(top) - #headroom = width - point.x - self.x - - elif rot == 180: - left = -point.x - self.x - top = -height + point.y + self.y - cm += cm180 - space = abs(point.y + self.y) - #headroom = height - point.y - self.y - - optcont = self.page._get_optional_content(oc) - if optcont is not None: - bdc = "/OC /%s BDC\n" % optcont - emc = "EMC\n" - else: - bdc = emc = "" - - alpha = self.page._set_opacity(CA=stroke_opacity, ca=fill_opacity) - if alpha is None: - alpha = "" - else: - alpha = "/%s gs\n" % alpha - nres = templ1(bdc, alpha, cm, left, top, fname, fontsize) - - if render_mode > 0: - nres += "%i Tr " % render_mode - nres += _format_g(border_width * fontsize) + " w " - - if color is not None: - nres += color_str - if fill is not None: - nres += fill_str - - # ========================================================================= - # start text insertion - # ========================================================================= - nres += text[0] - nlines = 1 # set output line counter - if len(text) > 1: - nres += templ2(lheight) # line 1 - else: - nres += 'TJ' - for i in range(1, len(text)): - if space < lheight: - break # no space left on page - if i > 1: - nres += "\nT* " - nres += text[i] + 'TJ' - space -= lheight - nlines += 1 - - nres += "\nET\n%sQ\n" % emc - - # ========================================================================= - # end of text insertion - # ========================================================================= - # update the /Contents object - self.text_cont += nres - return nlines - - # ============================================================================== - # Shape.insert_textbox - # ============================================================================== - def insert_textbox( - self, - rect: rect_like, - buffer: typing.Union[str, list], - fontname: OptStr = "helv", - fontfile: OptStr = None, - fontsize: float = 11, - lineheight: OptFloat = None, - set_simple: bool = 0, - encoding: int = 0, - color: OptSeq = None, - fill: OptSeq = None, - expandtabs: int = 1, - border_width: float = 0.05, - align: int = 0, - render_mode: int = 0, - rotate: int = 0, - morph: OptSeq = None, - stroke_opacity: float = 1, - fill_opacity: float = 1, - oc: int = 0, - ) -> float: - """Insert text into a given rectangle. - - Args: - rect -- the textbox to fill - buffer -- text to be inserted - fontname -- a Base-14 font, font name or '/name' - fontfile -- name of a font file - fontsize -- font size - lineheight -- overwrite the font property - color -- RGB stroke color triple - fill -- RGB fill color triple - render_mode -- text rendering control - border_width -- thickness of glyph borders as percentage of fontsize - expandtabs -- handles tabulators with string function - align -- left, center, right, justified - rotate -- 0, 90, 180, or 270 degrees - morph -- morph box with a matrix and a fixpoint - Returns: - unused or deficit rectangle area (float) - """ - rect = pymupdf.Rect(rect) - if rect.is_empty or rect.is_infinite: - raise ValueError("text box must be finite and not empty") - - color_str = pymupdf.ColorCode(color, "c") - fill_str = pymupdf.ColorCode(fill, "f") - if fill is None and render_mode == 0: # ensure fill color for 0 Tr - fill = color - fill_str = pymupdf.ColorCode(color, "f") - - optcont = self.page._get_optional_content(oc) - if optcont is not None: - bdc = "/OC /%s BDC\n" % optcont - emc = "EMC\n" - else: - bdc = emc = "" - - # determine opacity / transparency - alpha = self.page._set_opacity(CA=stroke_opacity, ca=fill_opacity) - if alpha is None: - alpha = "" - else: - alpha = "/%s gs\n" % alpha - - if rotate % 90 != 0: - raise ValueError("rotate must be multiple of 90") - - rot = rotate - while rot < 0: - rot += 360 - rot = rot % 360 - - # is buffer worth of dealing with? - if not bool(buffer): - return rect.height if rot in (0, 180) else rect.width - - cmp90 = "0 1 -1 0 0 0 cm\n" # rotates counter-clockwise - cmm90 = "0 -1 1 0 0 0 cm\n" # rotates clockwise - cm180 = "-1 0 0 -1 0 0 cm\n" # rotates by 180 deg. - height = self.height - - fname = fontname - if fname.startswith("/"): - fname = fname[1:] - - xref = self.page.insert_font( - fontname=fname, fontfile=fontfile, encoding=encoding, set_simple=set_simple - ) - fontinfo = pymupdf.CheckFontInfo(self.doc, xref) - - fontdict = fontinfo[1] - ordering = fontdict["ordering"] - simple = fontdict["simple"] - glyphs = fontdict["glyphs"] - bfname = fontdict["name"] - ascender = fontdict["ascender"] - descender = fontdict["descender"] - - if lineheight: - lheight_factor = lineheight - elif ascender - descender <= 1: - lheight_factor = 1.2 - else: - lheight_factor = ascender - descender - lheight = fontsize * lheight_factor - - # create a list from buffer, split into its lines - if type(buffer) in (list, tuple): - t0 = "\n".join(buffer) - else: - t0 = buffer - - maxcode = max([ord(c) for c in t0]) - # replace invalid char codes for simple fonts - if simple and maxcode > 255: - t0 = "".join([c if ord(c) < 256 else "?" for c in t0]) - - t0 = t0.splitlines() - - glyphs = self.doc.get_char_widths(xref, maxcode + 1) - if simple and bfname not in ("Symbol", "ZapfDingbats"): - tj_glyphs = None - else: - tj_glyphs = glyphs - - # ---------------------------------------------------------------------- - # calculate pixel length of a string - # ---------------------------------------------------------------------- - def pixlen(x): - """Calculate pixel length of x.""" - if ordering < 0: - return sum([glyphs[ord(c)][1] for c in x]) * fontsize - else: - return len(x) * fontsize - - # --------------------------------------------------------------------- - - if ordering < 0: - blen = glyphs[32][1] * fontsize # pixel size of space character - else: - blen = fontsize - - text = "" # output buffer - - if pymupdf.CheckMorph(morph): - m1 = pymupdf.Matrix( - 1, 0, 0, 1, morph[0].x + self.x, self.height - morph[0].y - self.y - ) - mat = ~m1 * morph[1] * m1 - cm = _format_g(pymupdf.JM_TUPLE(mat)) + " cm\n" - else: - cm = "" - - # --------------------------------------------------------------------- - # adjust for text orientation / rotation - # --------------------------------------------------------------------- - progr = 1 # direction of line progress - c_pnt = pymupdf.Point(0, fontsize * ascender) # used for line progress - if rot == 0: # normal orientation - point = rect.tl + c_pnt # line 1 is 'lheight' below top - maxwidth = rect.width # pixels available in one line - maxheight = rect.height # available text height - - elif rot == 90: # rotate counter clockwise - c_pnt = pymupdf.Point(fontsize * ascender, 0) # progress in x-direction - point = rect.bl + c_pnt # line 1 'lheight' away from left - maxwidth = rect.height # pixels available in one line - maxheight = rect.width # available text height - cm += cmp90 - - elif rot == 180: # text upside down - # progress upwards in y direction - c_pnt = -pymupdf.Point(0, fontsize * ascender) - point = rect.br + c_pnt # line 1 'lheight' above bottom - maxwidth = rect.width # pixels available in one line - progr = -1 # subtract lheight for next line - maxheight =rect.height # available text height - cm += cm180 - - else: # rotate clockwise (270 or -90) - # progress from right to left - c_pnt = -pymupdf.Point(fontsize * ascender, 0) - point = rect.tr + c_pnt # line 1 'lheight' left of right - maxwidth = rect.height # pixels available in one line - progr = -1 # subtract lheight for next line - maxheight = rect.width # available text height - cm += cmm90 - - # ===================================================================== - # line loop - # ===================================================================== - just_tab = [] # 'justify' indicators per line - - for i, line in enumerate(t0): - line_t = line.expandtabs(expandtabs).split(" ") # split into words - num_words = len(line_t) - lbuff = "" # init line buffer - rest = maxwidth # available line pixels - # ================================================================= - # word loop - # ================================================================= - for j in range(num_words): - word = line_t[j] - pl_w = pixlen(word) # pixel len of word - if rest >= pl_w: # does it fit on the line? - lbuff += word + " " # yes, append word - rest -= pl_w + blen # update available line space - continue # next word - - # word doesn't fit - output line (if not empty) - if lbuff: - lbuff = lbuff.rstrip() + "\n" # line full, append line break - text += lbuff # append to total text - just_tab.append(True) # can align-justify - - lbuff = "" # re-init line buffer - rest = maxwidth # re-init avail. space - - if pl_w <= maxwidth: # word shorter than 1 line? - lbuff = word + " " # start the line with it - rest = maxwidth - pl_w - blen # update free space - continue - - # long word: split across multiple lines - char by char ... - if len(just_tab) > 0: - just_tab[-1] = False # cannot align-justify - for c in word: - if pixlen(lbuff) <= maxwidth - pixlen(c): - lbuff += c - else: # line full - lbuff += "\n" # close line - text += lbuff # append to text - just_tab.append(False) # cannot align-justify - lbuff = c # start new line with this char - - lbuff += " " # finish long word - rest = maxwidth - pixlen(lbuff) # long word stored - - if lbuff: # unprocessed line content? - text += lbuff.rstrip() # append to text - just_tab.append(False) # cannot align-justify - - if i < len(t0) - 1: # not the last line? - text += "\n" # insert line break - - # compute used part of the textbox - if text.endswith("\n"): - text = text[:-1] - lb_count = text.count("\n") + 1 # number of lines written - - # text height = line count * line height plus one descender value - text_height = lheight * lb_count - descender * fontsize - - more = text_height - maxheight # difference to height limit - if more > pymupdf.EPSILON: # landed too much outside rect - return (-1) * more # return deficit, don't output - - more = abs(more) - if more < pymupdf.EPSILON: - more = 0 # don't bother with epsilons - nres = "\nq\n%s%sBT\n" % (bdc, alpha) + cm # initialize output buffer - templ = lambda a, b, c, d: f"1 0 0 1 {_format_g((a, b))} Tm /{c} {_format_g(d)} Tf " - # center, right, justify: output each line with its own specifics - text_t = text.splitlines() # split text in lines again - just_tab[-1] = False # never justify last line - for i, t in enumerate(text_t): - spacing = 0 - pl = maxwidth - pixlen(t) # length of empty line part - pnt = point + c_pnt * (i * lheight_factor) # text start of line - if align == 1: # center: right shift by half width - if rot in (0, 180): - pnt = pnt + pymupdf.Point(pl / 2, 0) * progr - else: - pnt = pnt - pymupdf.Point(0, pl / 2) * progr - elif align == 2: # right: right shift by full width - if rot in (0, 180): - pnt = pnt + pymupdf.Point(pl, 0) * progr - else: - pnt = pnt - pymupdf.Point(0, pl) * progr - elif align == 3: # justify - spaces = t.count(" ") # number of spaces in line - if spaces > 0 and just_tab[i]: # if any, and we may justify - spacing = pl / spaces # make every space this much larger - else: - spacing = 0 # keep normal space length - top = height - pnt.y - self.y - left = pnt.x + self.x - if rot == 90: - left = height - pnt.y - self.y - top = -pnt.x - self.x - elif rot == 270: - left = -height + pnt.y + self.y - top = pnt.x + self.x - elif rot == 180: - left = -pnt.x - self.x - top = -height + pnt.y + self.y - - nres += templ(left, top, fname, fontsize) - - if render_mode > 0: - nres += "%i Tr " % render_mode - nres += _format_g(border_width * fontsize) + " w " - - if align == 3: - nres += _format_g(spacing) + " Tw " - - if color is not None: - nres += color_str - if fill is not None: - nres += fill_str - nres += "%sTJ\n" % pymupdf.getTJstr(t, tj_glyphs, simple, ordering) - - nres += "ET\n%sQ\n" % emc - - self.text_cont += nres - self.updateRect(rect) - return more - - def finish( - self, - width: float = 1, - color: OptSeq = (0,), - fill: OptSeq = None, - lineCap: int = 0, - lineJoin: int = 0, - dashes: OptStr = None, - even_odd: bool = False, - morph: OptSeq = None, - closePath: bool = True, - fill_opacity: float = 1, - stroke_opacity: float = 1, - oc: int = 0, - ) -> None: - """Finish the current drawing segment. - - Notes: - Apply colors, opacity, dashes, line style and width, or - morphing. Also whether to close the path - by connecting last to first point. - """ - if self.draw_cont == "": # treat empty contents as no-op - return - - if width == 0: # border color makes no sense then - color = None - elif color is None: # vice versa - width = 0 - # if color == None and fill == None: - # raise ValueError("at least one of 'color' or 'fill' must be given") - color_str = pymupdf.ColorCode(color, "c") # ensure proper color string - fill_str = pymupdf.ColorCode(fill, "f") # ensure proper fill string - - optcont = self.page._get_optional_content(oc) - if optcont is not None: - self.draw_cont = "/OC /%s BDC\n" % optcont + self.draw_cont - emc = "EMC\n" - else: - emc = "" - - alpha = self.page._set_opacity(CA=stroke_opacity, ca=fill_opacity) - if alpha is not None: - self.draw_cont = "/%s gs\n" % alpha + self.draw_cont - - if width != 1 and width != 0: - self.draw_cont += _format_g(width) + " w\n" - - if lineCap != 0: - self.draw_cont = "%i J\n" % lineCap + self.draw_cont - if lineJoin != 0: - self.draw_cont = "%i j\n" % lineJoin + self.draw_cont - - if dashes not in (None, "", "[] 0"): - self.draw_cont = "%s d\n" % dashes + self.draw_cont - - if closePath: - self.draw_cont += "h\n" - self.last_point = None - - if color is not None: - self.draw_cont += color_str - - if fill is not None: - self.draw_cont += fill_str - if color is not None: - if not even_odd: - self.draw_cont += "B\n" - else: - self.draw_cont += "B*\n" - else: - if not even_odd: - self.draw_cont += "f\n" - else: - self.draw_cont += "f*\n" - else: - self.draw_cont += "S\n" - - self.draw_cont += emc - if pymupdf.CheckMorph(morph): - m1 = pymupdf.Matrix( - 1, 0, 0, 1, morph[0].x + self.x, self.height - morph[0].y - self.y - ) - mat = ~m1 * morph[1] * m1 - self.draw_cont = _format_g(pymupdf.JM_TUPLE(mat)) + " cm\n" + self.draw_cont - - self.totalcont += "\nq\n" + self.draw_cont + "Q\n" - self.draw_cont = "" - self.last_point = None - return - - def commit(self, overlay: bool = True) -> None: - """Update the page's /Contents object with Shape data. - - The argument controls whether data appear in foreground (default) - or background. - """ - pymupdf.CheckParent(self.page) # doc may have died meanwhile - self.totalcont += self.text_cont - self.totalcont = self.totalcont.encode() - - if self.totalcont: - if overlay: - self.page.wrap_contents() # ensure a balanced graphics state - # make /Contents object with dummy stream - xref = pymupdf.TOOLS._insert_contents(self.page, b" ", overlay) - # update it with potential compression - self.doc.update_stream(xref, self.totalcont) - - self.last_point = None # clean up ... - self.rect = None # - self.draw_cont = "" # for potential ... - self.text_cont = "" # ... - self.totalcont = "" # re-use - - -def apply_redactions( - page: pymupdf.Page, images: int = 2, graphics: int = 1, text: int = 0 -) -> bool: - """Apply the redaction annotations of the page. - - Args: - page: the PDF page. - images: - 0 - ignore images - 1 - remove all overlapping images - 2 - blank out overlapping image parts - 3 - remove image unless invisible - graphics: - 0 - ignore graphics - 1 - remove graphics if contained in rectangle - 2 - remove all overlapping graphics - text: - 0 - remove text - 1 - ignore text - """ - - def center_rect(annot_rect, new_text, font, fsize): - """Calculate minimal sub-rectangle for the overlay text. - - Notes: - Because 'insert_textbox' supports no vertical text centering, - we calculate an approximate number of lines here and return a - sub-rect with smaller height, which should still be sufficient. - Args: - annot_rect: the annotation rectangle - new_text: the text to insert. - font: the fontname. Must be one of the CJK or Base-14 set, else - the rectangle is returned unchanged. - fsize: the fontsize - Returns: - A rectangle to use instead of the annot rectangle. - """ - exception_types = (ValueError, mupdf.FzErrorBase) - if pymupdf.mupdf_version_tuple < (1, 24): - exception_types = ValueError - if not new_text or annot_rect.width <= pymupdf.EPSILON: - return annot_rect - try: - text_width = pymupdf.get_text_length(new_text, font, fsize) - except exception_types: # unsupported font - if g_exceptions_verbose: - pymupdf.exception_info() - return annot_rect - line_height = fsize * 1.2 - limit = annot_rect.width - h = math.ceil(text_width / limit) * line_height # estimate rect height - if h >= annot_rect.height: - return annot_rect - r = annot_rect - y = (annot_rect.tl.y + annot_rect.bl.y - h) * 0.5 - r.y0 = y - return r - - pymupdf.CheckParent(page) - doc = page.parent - if doc.is_encrypted or doc.is_closed: - raise ValueError("document closed or encrypted") - if not doc.is_pdf: - raise ValueError("is no PDF") - - redact_annots = [] # storage of annot values - for annot in page.annots( - types=(pymupdf.PDF_ANNOT_REDACT,) # pylint: disable=no-member - ): - # loop redactions - redact_annots.append(annot._get_redact_values()) # save annot values - - if redact_annots == []: # any redactions on this page? - return False # no redactions - - rc = page._apply_redactions(text, images, graphics) # call MuPDF - if not rc: # should not happen really - raise ValueError("Error applying redactions.") - - # now write replacement text in old redact rectangles - shape = page.new_shape() - for redact in redact_annots: - annot_rect = redact["rect"] - fill = redact["fill"] - if fill: - shape.draw_rect(annot_rect) # colorize the rect background - shape.finish(fill=fill, color=fill) - if "text" in redact.keys(): # if we also have text - new_text = redact["text"] - align = redact.get("align", 0) - fname = redact["fontname"] - fsize = redact["fontsize"] - color = redact["text_color"] - # try finding vertical centered sub-rect - trect = center_rect(annot_rect, new_text, fname, fsize) - - rc = -1 - while rc < 0 and fsize >= 4: # while not enough room - # (re-) try insertion - rc = shape.insert_textbox( - trect, - new_text, - fontname=fname, - fontsize=fsize, - color=color, - align=align, - ) - fsize -= 0.5 # reduce font if unsuccessful - shape.commit() # append new contents object - return True - - -# ------------------------------------------------------------------------------ -# Remove potentially sensitive data from a PDF. Similar to the Adobe -# Acrobat 'sanitize' function -# ------------------------------------------------------------------------------ -def scrub( - doc: pymupdf.Document, - attached_files: bool = True, - clean_pages: bool = True, - embedded_files: bool = True, - hidden_text: bool = True, - javascript: bool = True, - metadata: bool = True, - redactions: bool = True, - redact_images: int = 0, - remove_links: bool = True, - reset_fields: bool = True, - reset_responses: bool = True, - thumbnails: bool = True, - xml_metadata: bool = True, -) -> None: - def remove_hidden(cont_lines): - """Remove hidden text from a PDF page. - - Args: - cont_lines: list of lines with /Contents content. Should have status - from after page.cleanContents(). - - Returns: - List of /Contents lines from which hidden text has been removed. - - Notes: - The input must have been created after the page's /Contents object(s) - have been cleaned with page.cleanContents(). This ensures a standard - formatting: one command per line, single spaces between operators. - This allows for drastic simplification of this code. - """ - out_lines = [] # will return this - in_text = False # indicate if within BT/ET object - suppress = False # indicate text suppression active - make_return = False - for line in cont_lines: - if line == b"BT": # start of text object - in_text = True # switch on - out_lines.append(line) # output it - continue - if line == b"ET": # end of text object - in_text = False # switch off - out_lines.append(line) # output it - continue - if line == b"3 Tr": # text suppression operator - suppress = True # switch on - make_return = True - continue - if line[-2:] == b"Tr" and line[0] != b"3": - suppress = False # text rendering changed - out_lines.append(line) - continue - if line == b"Q": # unstack command also switches off - suppress = False - out_lines.append(line) - continue - if suppress and in_text: # suppress hidden lines - continue - out_lines.append(line) - if make_return: - return out_lines - else: - return None - - if not doc.is_pdf: # only works for PDF - raise ValueError("is no PDF") - if doc.is_encrypted or doc.is_closed: - raise ValueError("closed or encrypted doc") - - if clean_pages is False: - hidden_text = False - redactions = False - - if metadata: - doc.set_metadata({}) # remove standard metadata - - for page in doc: - if reset_fields: - # reset form fields (widgets) - for widget in page.widgets(): - widget.reset() - - if remove_links: - links = page.get_links() # list of all links on page - for link in links: # remove all links - page.delete_link(link) - - found_redacts = False - for annot in page.annots(): - if annot.type[0] == mupdf.PDF_ANNOT_FILE_ATTACHMENT and attached_files: - annot.update_file(buffer=b" ") # set file content to empty - if reset_responses: - annot.delete_responses() - if annot.type[0] == pymupdf.PDF_ANNOT_REDACT: # pylint: disable=no-member - found_redacts = True - - if redactions and found_redacts: - page.apply_redactions(images=redact_images) - - if not (clean_pages or hidden_text): - continue # done with the page - - page.clean_contents() - if not page.get_contents(): - continue - if hidden_text: - xref = page.get_contents()[0] # only one b/o cleaning! - cont = doc.xref_stream(xref) - cont_lines = remove_hidden(cont.splitlines()) # remove hidden text - if cont_lines: # something was actually removed - cont = b"\n".join(cont_lines) - doc.update_stream(xref, cont) # rewrite the page /Contents - - if thumbnails: # remove page thumbnails? - if doc.xref_get_key(page.xref, "Thumb")[0] != "null": - doc.xref_set_key(page.xref, "Thumb", "null") - - # pages are scrubbed, now perform document-wide scrubbing - # remove embedded files - if embedded_files: - for name in doc.embfile_names(): - doc.embfile_del(name) - - if xml_metadata: - doc.del_xml_metadata() - if not (xml_metadata or javascript): - xref_limit = 0 - else: - xref_limit = doc.xref_length() - for xref in range(1, xref_limit): - if not doc.xref_object(xref): - msg = "bad xref %i - clean PDF before scrubbing" % xref - raise ValueError(msg) - if javascript and doc.xref_get_key(xref, "S")[1] == "/JavaScript": - # a /JavaScript action object - obj = "<>" # replace with a null JavaScript - doc.update_object(xref, obj) # update this object - continue # no further handling - - if not xml_metadata: - continue - - if doc.xref_get_key(xref, "Type")[1] == "/Metadata": - # delete any metadata object directly - doc.update_object(xref, "<<>>") - doc.update_stream(xref, b"deleted", new=True) - continue - - if doc.xref_get_key(xref, "Metadata")[0] != "null": - doc.xref_set_key(xref, "Metadata", "null") - - def _show_fz_text( text): #if mupdf_cppyy: # assert isinstance( text, cppyy.gbl.mupdf.Text) @@ -4665,415 +840,6 @@ def _show_fz_text( text): span = span.next return f'num_spans={num_spans} num_chars={num_chars}' -def fill_textbox( - writer: pymupdf.TextWriter, - rect: rect_like, - text: typing.Union[str, list], - pos: point_like = None, - font: typing.Optional[pymupdf.Font] = None, - fontsize: float = 11, - lineheight: OptFloat = None, - align: int = 0, - warn: bool = None, - right_to_left: bool = False, - small_caps: bool = False, -) -> tuple: - """Fill a rectangle with text. - - Args: - writer: pymupdf.TextWriter object (= "self") - rect: rect-like to receive the text. - text: string or list/tuple of strings. - pos: point-like start position of first word. - font: pymupdf.Font object (default pymupdf.Font('helv')). - fontsize: the fontsize. - lineheight: overwrite the font property - align: (int) 0 = left, 1 = center, 2 = right, 3 = justify - warn: (bool) text overflow action: none, warn, or exception - right_to_left: (bool) indicate right-to-left language. - """ - rect = pymupdf.Rect(rect) - if rect.is_empty: - raise ValueError("fill rect must not empty.") - if type(font) is not pymupdf.Font: - font = pymupdf.Font("helv") - - def textlen(x): - """Return length of a string.""" - return font.text_length( - x, fontsize=fontsize, small_caps=small_caps - ) # abbreviation - - def char_lengths(x): - """Return list of single character lengths for a string.""" - return font.char_lengths(x, fontsize=fontsize, small_caps=small_caps) - - def append_this(pos, text): - ret = writer.append( - pos, text, font=font, fontsize=fontsize, small_caps=small_caps - ) - return ret - - tolerance = fontsize * 0.2 # extra distance to left border - space_len = textlen(" ") - std_width = rect.width - tolerance - std_start = rect.x0 + tolerance - - def norm_words(width, words): - """Cut any word in pieces no longer than 'width'.""" - nwords = [] - word_lengths = [] - for w in words: - wl_lst = char_lengths(w) - wl = sum(wl_lst) - if wl <= width: # nothing to do - copy over - nwords.append(w) - word_lengths.append(wl) - continue - - # word longer than rect width - split it in parts - n = len(wl_lst) - while n > 0: - wl = sum(wl_lst[:n]) - if wl <= width: - nwords.append(w[:n]) - word_lengths.append(wl) - w = w[n:] - wl_lst = wl_lst[n:] - n = len(wl_lst) - else: - n -= 1 - return nwords, word_lengths - - def output_justify(start, line): - """Justified output of a line.""" - # ignore leading / trailing / multiple spaces - words = [w for w in line.split(" ") if w != ""] - nwords = len(words) - if nwords == 0: - return - if nwords == 1: # single word cannot be justified - append_this(start, words[0]) - return - tl = sum([textlen(w) for w in words]) # total word lengths - gaps = nwords - 1 # number of word gaps - gapl = (std_width - tl) / gaps # width of each gap - for w in words: - _, lp = append_this(start, w) # output one word - start.x = lp.x + gapl # next start at word end plus gap - return - - asc = font.ascender - dsc = font.descender - if not lineheight: - if asc - dsc <= 1: - lheight = 1.2 - else: - lheight = asc - dsc - else: - lheight = lineheight - - LINEHEIGHT = fontsize * lheight # effective line height - width = std_width # available horizontal space - - # starting point of text - if pos is not None: - pos = pymupdf.Point(pos) - else: # default is just below rect top-left - pos = rect.tl + (tolerance, fontsize * asc) - if pos not in rect: - raise ValueError("Text must start in rectangle.") - - # calculate displacement factor for alignment - if align == pymupdf.TEXT_ALIGN_CENTER: - factor = 0.5 - elif align == pymupdf.TEXT_ALIGN_RIGHT: - factor = 1.0 - else: - factor = 0 - - # split in lines if just a string was given - if type(text) is str: - textlines = text.splitlines() - else: - textlines = [] - for line in text: - textlines.extend(line.splitlines()) - - max_lines = int((rect.y1 - pos.y) / LINEHEIGHT) + 1 - - new_lines = [] # the final list of textbox lines - no_justify = [] # no justify for these line numbers - for i, line in enumerate(textlines): - if line in ("", " "): - new_lines.append((line, space_len)) - width = rect.width - tolerance - no_justify.append((len(new_lines) - 1)) - continue - if i == 0: - width = rect.x1 - pos.x - else: - width = rect.width - tolerance - - if right_to_left: # reverses Arabic / Hebrew text front to back - line = writer.clean_rtl(line) - tl = textlen(line) - if tl <= width: # line short enough - new_lines.append((line, tl)) - no_justify.append((len(new_lines) - 1)) - continue - - # we need to split the line in fitting parts - words = line.split(" ") # the words in the line - - # cut in parts any words that are longer than rect width - words, word_lengths = norm_words(std_width, words) - - n = len(words) - while True: - line0 = " ".join(words[:n]) - wl = sum(word_lengths[:n]) + space_len * (len(word_lengths[:n]) - 1) - if wl <= width: - new_lines.append((line0, wl)) - words = words[n:] - word_lengths = word_lengths[n:] - n = len(words) - line0 = None - else: - n -= 1 - - if len(words) == 0: - break - - # ------------------------------------------------------------------------- - # List of lines created. Each item is (text, tl), where 'tl' is the PDF - # output length (float) and 'text' is the text. Except for justified text, - # this is output-ready. - # ------------------------------------------------------------------------- - nlines = len(new_lines) - if nlines > max_lines: - msg = "Only fitting %i of %i lines." % (max_lines, nlines) - if warn is True: - pymupdf.message("Warning: " + msg) - elif warn is False: - raise ValueError(msg) - - start = pymupdf.Point() - no_justify += [len(new_lines) - 1] # no justifying of last line - for i in range(max_lines): - try: - line, tl = new_lines.pop(0) - except IndexError: - if g_exceptions_verbose >= 2: pymupdf.exception_info() - break - - if right_to_left: # Arabic, Hebrew - line = "".join(reversed(line)) - - if i == 0: # may have different start for first line - start = pos - - if align == pymupdf.TEXT_ALIGN_JUSTIFY and i not in no_justify and tl < std_width: - output_justify(start, line) - start.x = std_start - start.y += LINEHEIGHT - continue - - if i > 0 or pos.x == std_start: # left, center, right alignments - start.x += (width - tl) * factor - - append_this(start, line) - start.x = std_start - start.y += LINEHEIGHT - - return new_lines # return non-written lines - - -# ------------------------------------------------------------------------ -# Optional Content functions -# ------------------------------------------------------------------------ -def get_oc(doc: pymupdf.Document, xref: int) -> int: - """Return optional content object xref for an image or form xobject. - - Args: - xref: (int) xref number of an image or form xobject. - """ - if doc.is_closed or doc.is_encrypted: - raise ValueError("document close or encrypted") - t, name = doc.xref_get_key(xref, "Subtype") - if t != "name" or name not in ("/Image", "/Form"): - raise ValueError("bad object type at xref %i" % xref) - t, oc = doc.xref_get_key(xref, "OC") - if t != "xref": - return 0 - rc = int(oc.replace("0 R", "")) - return rc - - -def set_oc(doc: pymupdf.Document, xref: int, oc: int) -> None: - """Attach optional content object to image or form xobject. - - Args: - xref: (int) xref number of an image or form xobject - oc: (int) xref number of an OCG or OCMD - """ - if doc.is_closed or doc.is_encrypted: - raise ValueError("document close or encrypted") - t, name = doc.xref_get_key(xref, "Subtype") - if t != "name" or name not in ("/Image", "/Form"): - raise ValueError("bad object type at xref %i" % xref) - if oc > 0: - t, name = doc.xref_get_key(oc, "Type") - if t != "name" or name not in ("/OCG", "/OCMD"): - raise ValueError("bad object type at xref %i" % oc) - if oc == 0 and "OC" in doc.xref_get_keys(xref): - doc.xref_set_key(xref, "OC", "null") - return None - doc.xref_set_key(xref, "OC", "%i 0 R" % oc) - return None - - -def set_ocmd( - doc: pymupdf.Document, - xref: int = 0, - ocgs: typing.Union[list, None] = None, - policy: OptStr = None, - ve: typing.Union[list, None] = None, -) -> int: - """Create or update an OCMD object in a PDF document. - - Args: - xref: (int) 0 for creating a new object, otherwise update existing one. - ocgs: (list) OCG xref numbers, which shall be subject to 'policy'. - policy: one of 'AllOn', 'AllOff', 'AnyOn', 'AnyOff' (any casing). - ve: (list) visibility expression. Use instead of 'ocgs' with 'policy'. - - Returns: - Xref of the created or updated OCMD. - """ - - all_ocgs = set(doc.get_ocgs().keys()) - - def ve_maker(ve): - if type(ve) not in (list, tuple) or len(ve) < 2: - raise ValueError("bad 've' format: %s" % ve) - if ve[0].lower() not in ("and", "or", "not"): - raise ValueError("bad operand: %s" % ve[0]) - if ve[0].lower() == "not" and len(ve) != 2: - raise ValueError("bad 've' format: %s" % ve) - item = "[/%s" % ve[0].title() - for x in ve[1:]: - if type(x) is int: - if x not in all_ocgs: - raise ValueError("bad OCG %i" % x) - item += " %i 0 R" % x - else: - item += " %s" % ve_maker(x) - item += "]" - return item - - text = "< dict: - """Return the definition of an OCMD (optional content membership dictionary). - - Recognizes PDF dict keys /OCGs (PDF array of OCGs), /P (policy string) and - /VE (visibility expression, PDF array). Via string manipulation, this - info is converted to a Python dictionary with keys "xref", "ocgs", "policy" - and "ve" - ready to recycle as input for 'set_ocmd()'. - """ - - if xref not in range(doc.xref_length()): - raise ValueError("bad xref") - text = doc.xref_object(xref, compressed=True) - if "/Type/OCMD" not in text: - raise ValueError("bad object type") - textlen = len(text) - - p0 = text.find("/OCGs[") # look for /OCGs key - p1 = text.find("]", p0) - if p0 < 0 or p1 < 0: # no OCGs found - ocgs = None - else: - ocgs = text[p0 + 6 : p1].replace("0 R", " ").split() - ocgs = list(map(int, ocgs)) - - p0 = text.find("/P/") # look for /P policy key - if p0 < 0: - policy = None - else: - p1 = text.find("ff", p0) - if p1 < 0: - p1 = text.find("on", p0) - if p1 < 0: # some irregular syntax - raise ValueError("bad object at xref") - else: - policy = text[p0 + 3 : p1 + 2] - - p0 = text.find("/VE[") # look for /VE visibility expression key - if p0 < 0: # no visibility expression found - ve = None - else: - lp = rp = 0 # find end of /VE by finding last ']'. - p1 = p0 - while lp < 1 or lp != rp: - p1 += 1 - if not p1 < textlen: # some irregular syntax - raise ValueError("bad object at xref") - if text[p1] == "[": - lp += 1 - if text[p1] == "]": - rp += 1 - # p1 now positioned at the last "]" - ve = text[p0 + 3 : p1 + 1] # the PDF /VE array - ve = ( - ve.replace("/And", '"and",') - .replace("/Not", '"not",') - .replace("/Or", '"or",') - ) - ve = ve.replace(" 0 R]", "]").replace(" 0 R", ",").replace("][", "],[") - import json - try: - ve = json.loads(ve) - except Exception: - pymupdf.exception_info() - pymupdf.message(f"bad /VE key: {ve!r}") - raise - return {"xref": xref, "ocgs": ocgs, "policy": policy, "ve": ve} - """ Handle page labels for PDF documents. @@ -5148,50 +914,6 @@ def get_label_pno(pgNo, labels): return construct_label(style, prefix, pagenumber) -def get_label(page): - """Return the label for this PDF page. - - Args: - page: page object. - Returns: - The label (str) of the page. Errors return an empty string. - """ - # Jorj McKie, 2021-01-06 - - labels = page.parent._get_page_labels() - if not labels: - return "" - labels.sort() - return get_label_pno(page.number, labels) - - -def get_page_numbers(doc, label, only_one=False): - """Return a list of page numbers with the given label. - - Args: - doc: PDF document object (resp. 'self'). - label: (str) label. - only_one: (bool) stop searching after first hit. - Returns: - List of page numbers having this label. - """ - # Jorj McKie, 2021-01-06 - - numbers = [] - if not label: - return numbers - labels = doc._get_page_labels() - if labels == []: - return numbers - for i in range(doc.page_count): - plabel = get_label_pno(i, labels) - if plabel == label: - numbers.append(i) - if only_one: - break - return numbers - - def construct_label(style, prefix, pno) -> str: """Construct a label based on style, prefix and page number.""" # William Chapman, 2021-01-06 @@ -5260,94 +982,6 @@ def roman_num(num): return "".join([a for a in roman_num(num)]) -def get_page_labels(doc): - """Return page label definitions in PDF document. - - Args: - doc: PDF document (resp. 'self'). - Returns: - A list of dictionaries with the following format: - {'startpage': int, 'prefix': str, 'style': str, 'firstpagenum': int}. - """ - # Jorj McKie, 2021-01-10 - return [rule_dict(item) for item in doc._get_page_labels()] - - -def set_page_labels(doc, labels): - """Add / replace page label definitions in PDF document. - - Args: - doc: PDF document (resp. 'self'). - labels: list of label dictionaries like: - {'startpage': int, 'prefix': str, 'style': str, 'firstpagenum': int}, - as returned by get_page_labels(). - """ - # William Chapman, 2021-01-06 - - def create_label_str(label): - """Convert Python label dict to corresponding PDF rule string. - - Args: - label: (dict) build rule for the label. - Returns: - PDF label rule string wrapped in "<<", ">>". - """ - s = "%i<<" % label["startpage"] - if label.get("prefix", "") != "": - s += "/P(%s)" % label["prefix"] - if label.get("style", "") != "": - s += "/S/%s" % label["style"] - if label.get("firstpagenum", 1) > 1: - s += "/St %i" % label["firstpagenum"] - s += ">>" - return s - - def create_nums(labels): - """Return concatenated string of all labels rules. - - Args: - labels: (list) dictionaries as created by function 'rule_dict'. - Returns: - PDF compatible string for page label definitions, ready to be - enclosed in PDF array 'Nums[...]'. - """ - labels.sort(key=lambda x: x["startpage"]) - s = "".join([create_label_str(label) for label in labels]) - return s - - doc._set_page_labels(create_nums(labels)) - - -# End of Page Label Code ------------------------------------------------- - - -def has_links(doc: pymupdf.Document) -> bool: - """Check whether there are links on any page.""" - if doc.is_closed: - raise ValueError("document closed") - if not doc.is_pdf: - raise ValueError("is no PDF") - for i in range(doc.page_count): - for item in doc.page_annot_xrefs(i): - if item[1] == pymupdf.PDF_ANNOT_LINK: # pylint: disable=no-member - return True - return False - - -def has_annots(doc: pymupdf.Document) -> bool: - """Check whether there are annotations on any page.""" - if doc.is_closed: - raise ValueError("document closed") - if not doc.is_pdf: - raise ValueError("is no PDF") - for i in range(doc.page_count): - for item in doc.page_annot_xrefs(i): - # pylint: disable=no-member - if not (item[1] == pymupdf.PDF_ANNOT_LINK or item[1] == pymupdf.PDF_ANNOT_WIDGET): - return True - return False - - # ------------------------------------------------------------------- # Functions to recover the quad contained in a text extraction bbox # ------------------------------------------------------------------- @@ -5533,347 +1167,3 @@ def recover_char_quad(line_dir: tuple, span: dict, char: dict) -> pymupdf.Quad: raise ValueError("bad span argument") return recover_bbox_quad(line_dir, span, bbox) - - -# ------------------------------------------------------------------- -# Building font subsets using fontTools -# ------------------------------------------------------------------- -def subset_fonts(doc: pymupdf.Document, verbose: bool = False, fallback: bool = False) -> None: - """Build font subsets of a PDF. Requires package 'fontTools'. - - Eligible fonts are potentially replaced by smaller versions. Page text is - NOT rewritten and thus should retain properties like being hidden or - controlled by optional content. - - This method by default uses MuPDF's own internal feature to create subset - fonts. As this is a new function, errors may still occur. In this case, - please fall back to using the previous version by using "fallback=True". - """ - # Font binaries: - "buffer" -> (names, xrefs, (unicodes, glyphs)) - # An embedded font is uniquely defined by its fontbuffer only. It may have - # multiple names and xrefs. - # Once the sets of used unicodes and glyphs are known, we compute a - # smaller version of the buffer user package fontTools. - - if fallback is False: # by default use MuPDF function - pdf = mupdf.pdf_document_from_fz_document(doc) - mupdf.pdf_subset_fonts2(pdf, list(range(doc.page_count))) - return - - font_buffers = {} - - def get_old_widths(xref): - """Retrieve old font '/W' and '/DW' values.""" - df = doc.xref_get_key(xref, "DescendantFonts") - if df[0] != "array": # only handle xref specifications - return None, None - df_xref = int(df[1][1:-1].replace("0 R", "")) - widths = doc.xref_get_key(df_xref, "W") - if widths[0] != "array": # no widths key found - widths = None - else: - widths = widths[1] - dwidths = doc.xref_get_key(df_xref, "DW") - if dwidths[0] != "int": - dwidths = None - else: - dwidths = dwidths[1] - return widths, dwidths - - def set_old_widths(xref, widths, dwidths): - """Restore the old '/W' and '/DW' in subsetted font. - - If either parameter is None or evaluates to False, the corresponding - dictionary key will be set to null. - """ - df = doc.xref_get_key(xref, "DescendantFonts") - if df[0] != "array": # only handle xref specs - return None - df_xref = int(df[1][1:-1].replace("0 R", "")) - if (type(widths) is not str or not widths) and doc.xref_get_key(df_xref, "W")[ - 0 - ] != "null": - doc.xref_set_key(df_xref, "W", "null") - else: - doc.xref_set_key(df_xref, "W", widths) - if (type(dwidths) is not str or not dwidths) and doc.xref_get_key( - df_xref, "DW" - )[0] != "null": - doc.xref_set_key(df_xref, "DW", "null") - else: - doc.xref_set_key(df_xref, "DW", dwidths) - return None - - def set_subset_fontname(new_xref): - """Generate a name prefix to tag a font as subset. - - We use a random generator to select 6 upper case ASCII characters. - The prefixed name must be put in the font xref as the "/BaseFont" value - and in the FontDescriptor object as the '/FontName' value. - """ - # The following generates a prefix like 'ABCDEF+' - import random - import string - prefix = "".join(random.choices(tuple(string.ascii_uppercase), k=6)) + "+" - font_str = doc.xref_object(new_xref, compressed=True) - font_str = font_str.replace("/BaseFont/", "/BaseFont/" + prefix) - df = doc.xref_get_key(new_xref, "DescendantFonts") - if df[0] == "array": - df_xref = int(df[1][1:-1].replace("0 R", "")) - fd = doc.xref_get_key(df_xref, "FontDescriptor") - if fd[0] == "xref": - fd_xref = int(fd[1].replace("0 R", "")) - fd_str = doc.xref_object(fd_xref, compressed=True) - fd_str = fd_str.replace("/FontName/", "/FontName/" + prefix) - doc.update_object(fd_xref, fd_str) - doc.update_object(new_xref, font_str) - - def build_subset(buffer, unc_set, gid_set): - """Build font subset using fontTools. - - Args: - buffer: (bytes) the font given as a binary buffer. - unc_set: (set) required glyph ids. - Returns: - Either None if subsetting is unsuccessful or the subset font buffer. - """ - try: - import fontTools.subset as fts - except ImportError: - if g_exceptions_verbose: pymupdf.exception_info() - pymupdf.message("This method requires fontTools to be installed.") - raise - import tempfile - with tempfile.TemporaryDirectory() as tmp_dir: - oldfont_path = f"{tmp_dir}/oldfont.ttf" - newfont_path = f"{tmp_dir}/newfont.ttf" - uncfile_path = f"{tmp_dir}/uncfile.txt" - args = [ - oldfont_path, - "--retain-gids", - f"--output-file={newfont_path}", - "--layout-features='*'", - "--passthrough-tables", - "--ignore-missing-glyphs", - "--ignore-missing-unicodes", - "--symbol-cmap", - ] - - # store glyph ids or unicodes as file - with open(f"{tmp_dir}/uncfile.txt", "w", encoding='utf8') as unc_file: - if 0xFFFD in unc_set: # error unicode exists -> use glyphs - args.append(f"--gids-file={uncfile_path}") - gid_set.add(189) - unc_list = list(gid_set) - for unc in unc_list: - unc_file.write("%i\n" % unc) - else: - args.append(f"--unicodes-file={uncfile_path}") - unc_set.add(255) - unc_list = list(unc_set) - for unc in unc_list: - unc_file.write("%04x\n" % unc) - - # store fontbuffer as a file - with open(oldfont_path, "wb") as fontfile: - fontfile.write(buffer) - try: - os.remove(newfont_path) # remove old file - except Exception: - pass - try: # invoke fontTools subsetter - fts.main(args) - font = pymupdf.Font(fontfile=newfont_path) - new_buffer = font.buffer # subset font binary - if font.glyph_count == 0: # intercept empty font - new_buffer = None - except Exception: - pymupdf.exception_info() - new_buffer = None - return new_buffer - - def repl_fontnames(doc): - """Populate 'font_buffers'. - - For each font candidate, store its xref and the list of names - by which PDF text may refer to it (there may be multiple). - """ - - def norm_name(name): - """Recreate font name that contains PDF hex codes. - - E.g. #20 -> space, chr(32) - """ - while "#" in name: - p = name.find("#") - c = int(name[p + 1 : p + 3], 16) - name = name.replace(name[p : p + 3], chr(c)) - return name - - def get_fontnames(doc, item): - """Return a list of fontnames for an item of page.get_fonts(). - - There may be multiple names e.g. for Type0 fonts. - """ - fontname = item[3] - names = [fontname] - fontname = doc.xref_get_key(item[0], "BaseFont")[1][1:] - fontname = norm_name(fontname) - if fontname not in names: - names.append(fontname) - descendents = doc.xref_get_key(item[0], "DescendantFonts") - if descendents[0] != "array": - return names - descendents = descendents[1][1:-1] - if descendents.endswith(" 0 R"): - xref = int(descendents[:-4]) - descendents = doc.xref_object(xref, compressed=True) - p1 = descendents.find("/BaseFont") - if p1 >= 0: - p2 = descendents.find("/", p1 + 1) - p1 = min(descendents.find("/", p2 + 1), descendents.find(">>", p2 + 1)) - fontname = descendents[p2 + 1 : p1] - fontname = norm_name(fontname) - if fontname not in names: - names.append(fontname) - return names - - for i in range(doc.page_count): - for f in doc.get_page_fonts(i, full=True): - font_xref = f[0] # font xref - font_ext = f[1] # font file extension - basename = f[3] # font basename - - if font_ext not in ( # skip if not supported by fontTools - "otf", - "ttf", - "woff", - "woff2", - ): - continue - # skip fonts which already are subsets - if len(basename) > 6 and basename[6] == "+": - continue - - extr = doc.extract_font(font_xref) - fontbuffer = extr[-1] - names = get_fontnames(doc, f) - name_set, xref_set, subsets = font_buffers.get( - fontbuffer, (set(), set(), (set(), set())) - ) - xref_set.add(font_xref) - for name in names: - name_set.add(name) - font = pymupdf.Font(fontbuffer=fontbuffer) - name_set.add(font.name) - del font - font_buffers[fontbuffer] = (name_set, xref_set, subsets) - - def find_buffer_by_name(name): - for buffer, (name_set, _, _) in font_buffers.items(): - if name in name_set: - return buffer - return None - - # ----------------- - # main function - # ----------------- - repl_fontnames(doc) # populate font information - if not font_buffers: # nothing found to do - if verbose: - pymupdf.message(f'No fonts to subset.') - return 0 - - old_fontsize = 0 - new_fontsize = 0 - for fontbuffer in font_buffers.keys(): - old_fontsize += len(fontbuffer) - - # Scan page text for usage of subsettable fonts - for page in doc: - # go through the text and extend set of used glyphs by font - # we use a modified MuPDF trace device, which delivers us glyph ids. - for span in page.get_texttrace(): - if type(span) is not dict: # skip useless information - continue - fontname = span["font"][:33] # fontname for the span - buffer = find_buffer_by_name(fontname) - if buffer is None: - continue - name_set, xref_set, (set_ucs, set_gid) = font_buffers[buffer] - for c in span["chars"]: - set_ucs.add(c[0]) # unicode - set_gid.add(c[1]) # glyph id - font_buffers[buffer] = (name_set, xref_set, (set_ucs, set_gid)) - - # build the font subsets - for old_buffer, (name_set, xref_set, subsets) in font_buffers.items(): - new_buffer = build_subset(old_buffer, subsets[0], subsets[1]) - fontname = list(name_set)[0] - if new_buffer is None or len(new_buffer) >= len(old_buffer): - # subset was not created or did not get smaller - if verbose: - pymupdf.message(f'Cannot subset {fontname!r}.') - continue - if verbose: - pymupdf.message(f"Built subset of font {fontname!r}.") - val = doc._insert_font(fontbuffer=new_buffer) # store subset font in PDF - new_xref = val[0] # get its xref - set_subset_fontname(new_xref) # tag fontname as subset font - font_str = doc.xref_object( # get its object definition - new_xref, - compressed=True, - ) - # walk through the original font xrefs and replace each by the subset def - for font_xref in xref_set: - # we need the original '/W' and '/DW' width values - width_table, def_width = get_old_widths(font_xref) - # ... and replace original font definition at xref with it - doc.update_object(font_xref, font_str) - # now copy over old '/W' and '/DW' values - if width_table or def_width: - set_old_widths(font_xref, width_table, def_width) - # 'new_xref' remains unused in the PDF and must be removed - # by garbage collection. - new_fontsize += len(new_buffer) - - return old_fontsize - new_fontsize - - -# ------------------------------------------------------------------- -# Copy XREF object to another XREF -# ------------------------------------------------------------------- -def xref_copy(doc: pymupdf.Document, source: int, target: int, *, keep: list = None) -> None: - """Copy a PDF dictionary object to another one given their xref numbers. - - Args: - doc: PDF document object - source: source xref number - target: target xref number, the xref must already exist - keep: an optional list of 1st level keys in target that should not be - removed before copying. - Notes: - This works similar to the copy() method of dictionaries in Python. The - source may be a stream object. - """ - if doc.xref_is_stream(source): - # read new xref stream, maintaining compression - stream = doc.xref_stream_raw(source) - doc.update_stream( - target, - stream, - compress=False, # keeps source compression - new=True, # in case target is no stream - ) - - # empty the target completely, observe exceptions - if keep is None: - keep = [] - for key in doc.xref_get_keys(target): - if key in keep: - continue - doc.xref_set_key(target, key, "null") - # copy over all source dict items - for key in doc.xref_get_keys(source): - item = doc.xref_get_key(source, key) - doc.xref_set_key(target, key, item[1]) diff --git a/src_classic/fitz_old.i b/src_classic/fitz_old.i index 2afbe62dd..8abc89558 100644 --- a/src_classic/fitz_old.i +++ b/src_classic/fitz_old.i @@ -321,12 +321,20 @@ point_like = "point_like" rect_like = "rect_like" matrix_like = "matrix_like" quad_like = "quad_like" + +# ByteString is gone from typing in 3.14. +# collections.abc.Buffer available from 3.12 only +try: + ByteString = typing.ByteString +except AttributeError: + ByteString = bytes | bytearray | memoryview + AnyType = typing.Any OptInt = typing.Union[int, None] OptFloat = typing.Optional[float] OptStr = typing.Optional[str] OptDict = typing.Optional[dict] -OptBytes = typing.Optional[typing.ByteString] +OptBytes = typing.Optional[ByteString] OptSeq = typing.Optional[typing.Sequence] try: @@ -1342,7 +1350,7 @@ struct Document self.xref_set_key(xref, "Params/ModDate", get_pdf_str(date)) return xref - def embfile_add(self, name: str, buffer: typing.ByteString, + def embfile_add(self, name: str, buffer: ByteString, filename: OptStr =None, ufilename: OptStr =None, desc: OptStr =None,) -> None: @@ -5964,7 +5972,7 @@ struct Page { def add_file_annot(self, point: point_like, - buffer: typing.ByteString, + buffer: ByteString, filename: str, ufilename: OptStr =None, desc: OptStr =None, diff --git a/src_classic/helper-python.i b/src_classic/helper-python.i index 6ca431e18..9a14a5df6 100644 --- a/src_classic/helper-python.i +++ b/src_classic/helper-python.i @@ -1245,7 +1245,7 @@ def planish_line(p1: point_like, p2: point_like) -> Matrix: return Matrix(util_hor_matrix(p1, p2)) -def image_profile(img: typing.ByteString) -> dict: +def image_profile(img: ByteString) -> dict: """ Return basic properties of an image. Args: diff --git a/src_classic/utils.py b/src_classic/utils.py index 395129708..c1369afbc 100644 --- a/src_classic/utils.py +++ b/src_classic/utils.py @@ -23,12 +23,20 @@ rect_like = "rect_like" matrix_like = "matrix_like" quad_like = "quad_like" + +# ByteString is gone from typing in 3.14. +# collections.abc.Buffer available from 3.12 only +try: + ByteString = typing.ByteString +except AttributeError: + ByteString = bytes | bytearray | memoryview + AnyType = typing.Any OptInt = typing.Union[int, None] OptFloat = typing.Optional[float] OptStr = typing.Optional[str] OptDict = typing.Optional[dict] -OptBytes = typing.Optional[typing.ByteString] +OptBytes = typing.Optional[ByteString] OptSeq = typing.Optional[typing.Sequence] """ diff --git a/tests/README.md b/tests/README.md index 96706f6c0..b793d2489 100644 --- a/tests/README.md +++ b/tests/README.md @@ -71,3 +71,11 @@ having been built with PyMuPDF's customized configuration, ``fitz/_config.h``. One can skip this particular test by adding ``-k 'not test_textbox3'`` to the pytest command line. + + +## Resuming at a particular test. + +To skip tests before a particular test, set PYMUPDF_PYTEST_RESUME to the name +of the function. + +For example PYMUPDF_PYTEST_RESUME=test_haslinks. diff --git a/tests/conftest.py b/tests/conftest.py index e11553859..8b9bd31b8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,12 +1,45 @@ +import copy import os import platform +import subprocess +import sys +import pytest + +# Install required packages. There doesn't seem to be any official way for +# us to programmatically specify required test packages in setup.py, or in +# pytest. Doing it here seems to be the least ugly approach. +# +# However our diagnostics do not show up so this can cause an unfortunate pause +# before tests start to run. +# +def install_required_packages(): + packages = 'pytest fontTools pymupdf-fonts flake8 pylint codespell' + if platform.system() == 'Windows' and int.bit_length(sys.maxsize+1) == 32: + # No pillow wheel available, and doesn't build easily. + pass + else: + packages += ' pillow' + if platform.system().startswith('MSYS_NT-'): + # psutil not available on msys2. + pass + else: + packages += ' psutil' + command = f'pip install --upgrade {packages}' + print(f'{__file__}:install_required_packages)(): Running: {command}', flush=1) + subprocess.run(command, shell=1, check=1) + +install_required_packages() + +# Need to import pymupdf only after we've installed pymupdf-fonts above, +# because pymupdf imports pymupdf_fonts, and copes with import failure. import pymupdf -import pytest + +PYMUPDF_PYTEST_RESUME = os.environ.get('PYMUPDF_PYTEST_RESUME') @pytest.fixture(autouse=True) -def wrap(*args, **kwargs): +def wrap(request): ''' Check that tests return with empty MuPDF warnings buffer. For example this detects failure to call fz_close_output() before fz_drop_output(), which @@ -15,13 +48,31 @@ def wrap(*args, **kwargs): As of 2024-09-12 we also detect whether tests leave fds open; but for now do not fail tests, because many tests need fixing. ''' + global PYMUPDF_PYTEST_RESUME + if PYMUPDF_PYTEST_RESUME: + # Skip all tests until we reach a matching name. + if PYMUPDF_PYTEST_RESUME == request.function.__name__: + print(f'### {PYMUPDF_PYTEST_RESUME=}: resuming at {request.function.__name__=}.') + PYMUPDF_PYTEST_RESUME = None + else: + print(f'### {PYMUPDF_PYTEST_RESUME=}: Skipping {request.function.__name__=}.') + return + wt = pymupdf.TOOLS.mupdf_warnings() assert not wt, f'{wt=}' - assert not pymupdf.TOOLS.set_small_glyph_heights() + if platform.python_implementation() == 'GraalVM': + pymupdf.TOOLS.set_small_glyph_heights() + else: + assert not pymupdf.TOOLS.set_small_glyph_heights() next_fd_before = os.open(__file__, os.O_RDONLY) os.close(next_fd_before) - if platform.system() == 'Linux': + if platform.system() == 'Linux' and platform.python_implementation() != 'GraalVM': + test_fds = True + else: + test_fds = False + + if test_fds: # Gather detailed information about leaked fds. def get_fds(): import subprocess @@ -42,9 +93,38 @@ def get_fds(): pymupdf._log_items_clear() pymupdf._log_items_active(True) + JM_annot_id_stem = pymupdf.JM_annot_id_stem + + def get_members(a): + ret = dict() + for n in dir(a): + if not n.startswith('_'): + v = getattr(a, n) + ret[n] = v + return ret + + # Allow post-test checking that pymupdf._globals has not changed. + _globals_pre = get_members(pymupdf._globals) + + testsfailed_before = request.session.testsfailed + # Run the test. rep = yield + sys.stdout.flush() + + # This seems the only way for us to tell that a test has failed. In + # particular, is always None. We're implicitly relying on tests not + # being run in parallel. + # + failed = request.session.testsfailed - testsfailed_before + assert failed in (0, 1) + + if failed: + # Do not check post-test conditions if the test as failed. This avoids + # additional confusing `ERROR` status for failed tests. + return + # Test has run; check it did not create any MuPDF warnings etc. wt = pymupdf.TOOLS.mupdf_warnings() if not hasattr(pymupdf, 'mupdf'): @@ -54,10 +134,18 @@ def get_fds(): assert not pymupdf.TOOLS.set_small_glyph_heights() + _globals_post = get_members(pymupdf._globals) + if _globals_post != _globals_pre: + print(f'Test has changed pymupdf._globals from {_globals_pre=} to {_globals_post=}') + assert 0 + log_items = pymupdf._log_items() assert not log_items, f'log() was called; {len(log_items)=}.' - if platform.system() == 'Linux': + assert pymupdf.JM_annot_id_stem == JM_annot_id_stem, \ + f'pymupdf.JM_annot_id_stem has changed from {JM_annot_id_stem!r} to {pymupdf.JM_annot_id_stem!r}' + + if test_fds: # Show detailed information about leaked fds. open_fds_after, open_fds_after_l = get_fds() if open_fds_after != open_fds_before: @@ -73,6 +161,26 @@ def get_fds(): next_fd_after = os.open(__file__, os.O_RDONLY) os.close(next_fd_after) - if next_fd_after != next_fd_before: - print(f'Test has leaked fds, {next_fd_before=} {next_fd_after=}. {args=} {kwargs=}.') + + if test_fds and next_fd_after != next_fd_before: + print(f'Test has leaked fds, {next_fd_before=} {next_fd_after=}.') #assert 0, f'Test has leaked fds, {next_fd_before=} {next_fd_after=}. {args=} {kwargs=}.' + + if 0: + # This code can be useful to track down test failures caused by other + # tests modifying global state. + # + # We run a particular test menually after each test returns. + sys.path.insert(0, os.path.dirname(__file__)) + try: + import test_tables + finally: + del sys.path[0] + print(f'### Calling test_tables.test_md_styles().') + try: + test_tables.test_md_styles() + except Exception as e: + print(f'### test_tables.test_md_styles() failed: {e}') + raise + else: + print(f'### test_tables.test_md_styles() passed.') diff --git a/tests/gentle_compare.py b/tests/gentle_compare.py index b94010762..aa155bb7c 100644 --- a/tests/gentle_compare.py +++ b/tests/gentle_compare.py @@ -28,10 +28,26 @@ def gentle_compare(w0, w1): return True +def rms(a, b, verbose=None, out_prefix=''): + ''' + Returns RMS diff of raw bytes of two sequences. + ''' + assert len(a) == len(b) + e = 0 + for i, (aa, bb) in enumerate(zip(a, b)): + if verbose and (i % verbose == 0): + print(f'{out_prefix}rms(): {i=} {e=} {aa=} {aa=}.') + e += (aa - bb) ** 2 + rms = math.sqrt(e / len(a)) + return rms + + def pixmaps_rms(a, b, out_prefix=''): ''' - Returns RMS diff of raw bytes of two pixmaps. We assert that the pixmaps - are the same size. + Returns RMS diff of raw bytes of two pixmaps. + + We assert that the pixmaps/sequences are the same size. + and can each be a pymupdf.Pixmap or path of a bitmap file. ''' if isinstance(a, str): @@ -44,11 +60,37 @@ def pixmaps_rms(a, b, out_prefix=''): a_mv = a.samples_mv b_mv = b.samples_mv assert len(a_mv) == len(b_mv) - e = 0 - for i, (a_byte, b_byte) in enumerate(zip(a_mv, b_mv)): - if i % 100000 == 0: - print(f'{out_prefix}compare_pixmaps(): {i=} {e=} {a_byte=} {b_byte=}.') - e += (a_byte - b_byte) ** 2 - rms = math.sqrt(e / len(a_mv)) - print(f'{out_prefix}compare_pixmaps(): {e=} {rms=}.') - return rms + ret = rms(a_mv, b_mv, out_prefix=out_prefix) + print(f'{out_prefix}pixmaps_rms(): {ret=}.') + return ret + + +def pixmaps_diff(a, b, out_prefix=''): + ''' + Returns a pymupdf.Pixmap that represents the difference between pixmaps + and . + + Each byte in the returned pixmap is `128 + (b_byte - a_byte) // 2`. + ''' + if isinstance(a, str): + print(f'{out_prefix}pixmaps_rms(): reading pixmap from {a=}.') + a = pymupdf.Pixmap(a) + if isinstance(b, str): + print(f'{out_prefix}pixmaps_rms(): reading pixmap from {b=}.') + b = pymupdf.Pixmap(b) + assert a.irect == b.irect, f'Differing rects: {a.irect=} {b.irect=}.' + a_mv = a.samples_mv + b_mv = b.samples_mv + c = pymupdf.Pixmap(a.tobytes()) + c_mv = c.samples_mv + assert len(a_mv) == len(b_mv) == len(c_mv) + if 1: + print(f'{len(a_mv)=}') + for i, (a_byte, b_byte, c_byte) in enumerate(zip(a_mv, b_mv, c_mv)): + assert 0 <= a_byte < 256 + assert 0 <= b_byte < 256 + assert 0 <= c_byte < 256 + # Set byte to 128 plus half the diff so we represent the full + # -255..+255 range. + c_mv[i] = 128 + (b_byte - a_byte) // 2 + return c diff --git a/tests/resources/cms-etc-filled.pdf b/tests/resources/cms-etc-filled.pdf new file mode 100644 index 000000000..73d77fa2d Binary files /dev/null and b/tests/resources/cms-etc-filled.pdf differ diff --git a/tests/resources/img-regular.pdf b/tests/resources/img-regular.pdf new file mode 100644 index 000000000..158f557ff Binary files /dev/null and b/tests/resources/img-regular.pdf differ diff --git a/tests/resources/img-transparent.pdf b/tests/resources/img-transparent.pdf new file mode 100644 index 000000000..5ab875627 Binary files /dev/null and b/tests/resources/img-transparent.pdf differ diff --git a/tests/resources/interfield-calculation.pdf b/tests/resources/interfield-calculation.pdf new file mode 100644 index 000000000..abb3275d7 Binary files /dev/null and b/tests/resources/interfield-calculation.pdf differ diff --git a/tests/resources/merge-form1.pdf b/tests/resources/merge-form1.pdf new file mode 100644 index 000000000..faaba705f Binary files /dev/null and b/tests/resources/merge-form1.pdf differ diff --git a/tests/resources/merge-form2.pdf b/tests/resources/merge-form2.pdf new file mode 100644 index 000000000..f4dc3c95f Binary files /dev/null and b/tests/resources/merge-form2.pdf differ diff --git a/tests/resources/test-4055.pdf b/tests/resources/test-4055.pdf new file mode 100644 index 000000000..693d9f2eb Binary files /dev/null and b/tests/resources/test-4055.pdf differ diff --git a/tests/resources/test-4503.pdf b/tests/resources/test-4503.pdf new file mode 100644 index 000000000..307762ed7 Binary files /dev/null and b/tests/resources/test-4503.pdf differ diff --git a/tests/resources/test-E+A.pdf b/tests/resources/test-E+A.pdf new file mode 100644 index 000000000..84508fa19 Binary files /dev/null and b/tests/resources/test-E+A.pdf differ diff --git a/tests/resources/test-rewrite-images.pdf b/tests/resources/test-rewrite-images.pdf new file mode 100644 index 000000000..d1d742390 Binary files /dev/null and b/tests/resources/test-rewrite-images.pdf differ diff --git a/tests/resources/test-styled-table.pdf b/tests/resources/test-styled-table.pdf new file mode 100644 index 000000000..67f7e8a49 Binary files /dev/null and b/tests/resources/test-styled-table.pdf differ diff --git a/tests/resources/test_1645_expected_1.24.pdf b/tests/resources/test_1645_expected-after-1.27.0.pdf similarity index 74% rename from tests/resources/test_1645_expected_1.24.pdf rename to tests/resources/test_1645_expected-after-1.27.0.pdf index 809e0016b..27d61072d 100644 Binary files a/tests/resources/test_1645_expected_1.24.pdf and b/tests/resources/test_1645_expected-after-1.27.0.pdf differ diff --git a/tests/resources/test_1645_expected_1.25.pdf b/tests/resources/test_1645_expected.pdf similarity index 87% rename from tests/resources/test_1645_expected_1.25.pdf rename to tests/resources/test_1645_expected.pdf index 58b1b9673..ec9ecf2c5 100644 Binary files a/tests/resources/test_1645_expected_1.25.pdf and b/tests/resources/test_1645_expected.pdf differ diff --git a/tests/resources/test_1645_expected_1.22.pdf b/tests/resources/test_1645_expected_1.22.pdf deleted file mode 100644 index b149b109d..000000000 Binary files a/tests/resources/test_1645_expected_1.22.pdf and /dev/null differ diff --git a/tests/resources/test_1645_expected_1.24.2.pdf b/tests/resources/test_1645_expected_1.24.2.pdf deleted file mode 100644 index 2f6a85827..000000000 Binary files a/tests/resources/test_1645_expected_1.24.2.pdf and /dev/null differ diff --git a/tests/resources/test_2608_expected b/tests/resources/test_2608_expected index d550f1237..10cfa6127 100644 --- a/tests/resources/test_2608_expected +++ b/tests/resources/test_2608_expected @@ -1,10 +1,14 @@ No significant gamma-ray excess above the expected background is detected from the direction of FRB 20171019A, with 52 gamma candidate events from the source region and 524 background event. -A second analysis using an independent event calibration and reconstruction (Parsons & Hinton 2014) confirms this result. A search for -variable emission on timescales ranging from milliseconds to several minutes with tools provided in (Brun et al. 2020) does not reveal -any variability above 2.2 𝜎. For the total data set of 1.8 h, 95% confidence level (C. L.) upper limits on the photon flux are derived using +A second analysis using an independent event calibration and recon- +struction (Parsons & Hinton 2014) confirms this result. A search for +variable emission on timescales ranging from milliseconds to sev- +eral minutes with tools provided in (Brun et al. 2020) does not reveal +any variability above 2.2 𝜎. For the total data set of 1.8 h, 95% confi- +dence level (C. L.) upper limits on the photon flux are derived using the method described by Rolke et al. (2005). The energy threshold -of the data is highly dependent on the zenith angle of the observations. For these observations, the zenith angles range from 15 to 25 +of the data is highly dependent on the zenith angle of the observa- +tions. For these observations, the zenith angles range from 15 to 25 deg, which leads to an energy threshold for the stacked data set of 𝐸th = 120 GeV. The upper limit on the Very High Energy (VHE) diff --git a/tests/resources/test_2608_expected_1.26 b/tests/resources/test_2608_expected_1.26 new file mode 100644 index 000000000..d550f1237 --- /dev/null +++ b/tests/resources/test_2608_expected_1.26 @@ -0,0 +1,10 @@ +No significant gamma-ray excess above the expected background +is detected from the direction of FRB 20171019A, with 52 gamma +candidate events from the source region and 524 background event. +A second analysis using an independent event calibration and reconstruction (Parsons & Hinton 2014) confirms this result. A search for +variable emission on timescales ranging from milliseconds to several minutes with tools provided in (Brun et al. 2020) does not reveal +any variability above 2.2 𝜎. For the total data set of 1.8 h, 95% confidence level (C. L.) upper limits on the photon flux are derived using +the method described by Rolke et al. (2005). The energy threshold +of the data is highly dependent on the zenith angle of the observations. For these observations, the zenith angles range from 15 to 25 +deg, which leads to an energy threshold for the stacked data set of +𝐸th = 120 GeV. The upper limit on the Very High Energy (VHE) diff --git a/tests/resources/test_3050_expected.png b/tests/resources/test_3050_expected.png new file mode 100644 index 000000000..4b7edcdee Binary files /dev/null and b/tests/resources/test_3050_expected.png differ diff --git a/tests/resources/test_3448.pdf b/tests/resources/test_3448.pdf new file mode 100644 index 000000000..dae9e9c1a Binary files /dev/null and b/tests/resources/test_3448.pdf differ diff --git a/tests/resources/test_3448.pdf-expected.png b/tests/resources/test_3448.pdf-expected.png new file mode 100644 index 000000000..fbb82b7c4 Binary files /dev/null and b/tests/resources/test_3448.pdf-expected.png differ diff --git a/tests/resources/test_3624_expected.png b/tests/resources/test_3624_expected.png index 2173a0e44..bbfa9bc75 100644 Binary files a/tests/resources/test_3624_expected.png and b/tests/resources/test_3624_expected.png differ diff --git a/tests/resources/test_3725.pdf b/tests/resources/test_3725.pdf new file mode 100644 index 000000000..8f115fca7 Binary files /dev/null and b/tests/resources/test_3725.pdf differ diff --git a/tests/resources/test_3780.pdf b/tests/resources/test_3780.pdf new file mode 100644 index 000000000..2beca3edb Binary files /dev/null and b/tests/resources/test_3780.pdf differ diff --git a/tests/resources/test_3806-expected.png b/tests/resources/test_3806-expected.png new file mode 100644 index 000000000..8c0721522 Binary files /dev/null and b/tests/resources/test_3806-expected.png differ diff --git a/tests/resources/test_3806.pdf b/tests/resources/test_3806.pdf new file mode 100644 index 000000000..9d8ca9dda Binary files /dev/null and b/tests/resources/test_3806.pdf differ diff --git a/tests/resources/test_3842.pdf b/tests/resources/test_3842.pdf new file mode 100644 index 000000000..400db3a7d Binary files /dev/null and b/tests/resources/test_3842.pdf differ diff --git a/tests/resources/test_3848.pdf b/tests/resources/test_3848.pdf new file mode 100644 index 000000000..de121e0bb Binary files /dev/null and b/tests/resources/test_3848.pdf differ diff --git a/tests/resources/test_3854.pdf b/tests/resources/test_3854.pdf new file mode 100644 index 000000000..157402d96 Binary files /dev/null and b/tests/resources/test_3854.pdf differ diff --git a/tests/resources/test_3854_expected.png b/tests/resources/test_3854_expected.png new file mode 100644 index 000000000..aca7a1a7b Binary files /dev/null and b/tests/resources/test_3854_expected.png differ diff --git a/tests/resources/test_3886.pdf b/tests/resources/test_3886.pdf new file mode 100644 index 000000000..9f5743b79 Binary files /dev/null and b/tests/resources/test_3886.pdf differ diff --git a/tests/resources/test_3887.pdf b/tests/resources/test_3887.pdf new file mode 100644 index 000000000..38907d424 Binary files /dev/null and b/tests/resources/test_3887.pdf differ diff --git a/tests/resources/test_3950.pdf b/tests/resources/test_3950.pdf new file mode 100644 index 000000000..69d1b9dcc Binary files /dev/null and b/tests/resources/test_3950.pdf differ diff --git a/tests/resources/test_3994.pdf b/tests/resources/test_3994.pdf new file mode 100644 index 000000000..0af3cb6ca Binary files /dev/null and b/tests/resources/test_3994.pdf differ diff --git a/tests/resources/test_4004.pdf b/tests/resources/test_4004.pdf new file mode 100644 index 000000000..772f5124d Binary files /dev/null and b/tests/resources/test_4004.pdf differ diff --git a/tests/resources/test_4017.pdf b/tests/resources/test_4017.pdf new file mode 100644 index 000000000..a68193278 Binary files /dev/null and b/tests/resources/test_4017.pdf differ diff --git a/tests/resources/test_4026.pdf b/tests/resources/test_4026.pdf new file mode 100644 index 000000000..45a7e6fb1 Binary files /dev/null and b/tests/resources/test_4026.pdf differ diff --git a/tests/resources/test_4034.pdf b/tests/resources/test_4034.pdf new file mode 100644 index 000000000..65e621679 Binary files /dev/null and b/tests/resources/test_4034.pdf differ diff --git a/tests/resources/test_4043.pdf b/tests/resources/test_4043.pdf new file mode 100644 index 000000000..608794b8e Binary files /dev/null and b/tests/resources/test_4043.pdf differ diff --git a/tests/resources/test_4047.pdf b/tests/resources/test_4047.pdf new file mode 100644 index 000000000..b36b753c9 Binary files /dev/null and b/tests/resources/test_4047.pdf differ diff --git a/tests/resources/test_4079.pdf b/tests/resources/test_4079.pdf new file mode 100644 index 000000000..5e79cab3e Binary files /dev/null and b/tests/resources/test_4079.pdf differ diff --git a/tests/resources/test_4079_after.pdf b/tests/resources/test_4079_after.pdf new file mode 100644 index 000000000..7aa560b08 Binary files /dev/null and b/tests/resources/test_4079_after.pdf differ diff --git a/tests/resources/test_4079_after_1.25.pdf b/tests/resources/test_4079_after_1.25.pdf new file mode 100644 index 000000000..13ce571a1 Binary files /dev/null and b/tests/resources/test_4079_after_1.25.pdf differ diff --git a/tests/resources/test_4090.pdf b/tests/resources/test_4090.pdf new file mode 100644 index 000000000..291d5e3a8 Binary files /dev/null and b/tests/resources/test_4090.pdf differ diff --git a/tests/resources/test_4125.pdf b/tests/resources/test_4125.pdf new file mode 100644 index 000000000..8acb2be64 Binary files /dev/null and b/tests/resources/test_4125.pdf differ diff --git a/tests/resources/test_4139.pdf b/tests/resources/test_4139.pdf new file mode 100644 index 000000000..27ed404e0 Binary files /dev/null and b/tests/resources/test_4139.pdf differ diff --git a/tests/resources/test_4141.pdf b/tests/resources/test_4141.pdf new file mode 100644 index 000000000..a8fc73e23 Binary files /dev/null and b/tests/resources/test_4141.pdf differ diff --git a/tests/resources/test_4147.pdf b/tests/resources/test_4147.pdf new file mode 100644 index 000000000..4d2c38606 Binary files /dev/null and b/tests/resources/test_4147.pdf differ diff --git a/tests/resources/test_4179.pdf b/tests/resources/test_4179.pdf new file mode 100644 index 000000000..9bdccb998 Binary files /dev/null and b/tests/resources/test_4179.pdf differ diff --git a/tests/resources/test_4179_expected.png b/tests/resources/test_4179_expected.png new file mode 100644 index 000000000..df053b707 Binary files /dev/null and b/tests/resources/test_4179_expected.png differ diff --git a/tests/resources/test_4180.pdf b/tests/resources/test_4180.pdf new file mode 100644 index 000000000..fcb1d3503 Binary files /dev/null and b/tests/resources/test_4180.pdf differ diff --git a/tests/resources/test_4180_expected.png b/tests/resources/test_4180_expected.png new file mode 100644 index 000000000..3de67e613 Binary files /dev/null and b/tests/resources/test_4180_expected.png differ diff --git a/tests/resources/test_4182.pdf b/tests/resources/test_4182.pdf new file mode 100644 index 000000000..7c239646e Binary files /dev/null and b/tests/resources/test_4182.pdf differ diff --git a/tests/resources/test_4182_expected.png b/tests/resources/test_4182_expected.png new file mode 100644 index 000000000..8d38ecd2c Binary files /dev/null and b/tests/resources/test_4182_expected.png differ diff --git a/tests/resources/test_4224.pdf b/tests/resources/test_4224.pdf new file mode 100644 index 000000000..88c49a3f1 Binary files /dev/null and b/tests/resources/test_4224.pdf differ diff --git a/tests/resources/test_4245.pdf b/tests/resources/test_4245.pdf new file mode 100644 index 000000000..554057475 Binary files /dev/null and b/tests/resources/test_4245.pdf differ diff --git a/tests/resources/test_4245_expected.png b/tests/resources/test_4245_expected.png new file mode 100644 index 000000000..2b7bcb330 Binary files /dev/null and b/tests/resources/test_4245_expected.png differ diff --git a/tests/resources/test_4263.pdf b/tests/resources/test_4263.pdf new file mode 100644 index 000000000..c56700709 Binary files /dev/null and b/tests/resources/test_4263.pdf differ diff --git a/tests/resources/test_4363.pdf b/tests/resources/test_4363.pdf new file mode 100644 index 000000000..d15940e3e Binary files /dev/null and b/tests/resources/test_4363.pdf differ diff --git a/tests/resources/test_4388_BOZ1.pdf b/tests/resources/test_4388_BOZ1.pdf new file mode 100644 index 000000000..6d2b23b68 Binary files /dev/null and b/tests/resources/test_4388_BOZ1.pdf differ diff --git a/tests/resources/test_4388_BUL1.pdf b/tests/resources/test_4388_BUL1.pdf new file mode 100644 index 000000000..b681354e1 Binary files /dev/null and b/tests/resources/test_4388_BUL1.pdf differ diff --git a/tests/resources/test_4412.pdf b/tests/resources/test_4412.pdf new file mode 100644 index 000000000..920df52b1 Binary files /dev/null and b/tests/resources/test_4412.pdf differ diff --git a/tests/resources/test_4415.pdf b/tests/resources/test_4415.pdf new file mode 100644 index 000000000..a8f9585e4 Binary files /dev/null and b/tests/resources/test_4415.pdf differ diff --git a/tests/resources/test_4415_out_expected.png b/tests/resources/test_4415_out_expected.png new file mode 100644 index 000000000..067016d38 Binary files /dev/null and b/tests/resources/test_4415_out_expected.png differ diff --git a/tests/resources/test_4423.pdf b/tests/resources/test_4423.pdf new file mode 100644 index 000000000..55510b8cf Binary files /dev/null and b/tests/resources/test_4423.pdf differ diff --git a/tests/resources/test_4435.pdf b/tests/resources/test_4435.pdf new file mode 100644 index 000000000..c22a87c9a Binary files /dev/null and b/tests/resources/test_4435.pdf differ diff --git a/tests/resources/test_4479.pdf b/tests/resources/test_4479.pdf new file mode 100644 index 000000000..28efe43fe Binary files /dev/null and b/tests/resources/test_4479.pdf differ diff --git a/tests/resources/test_4496.hwpx b/tests/resources/test_4496.hwpx new file mode 100755 index 000000000..f1e0fb1a7 Binary files /dev/null and b/tests/resources/test_4496.hwpx differ diff --git a/tests/resources/test_4503.pdf b/tests/resources/test_4503.pdf new file mode 100644 index 000000000..307762ed7 Binary files /dev/null and b/tests/resources/test_4503.pdf differ diff --git a/tests/resources/test_4505.pdf b/tests/resources/test_4505.pdf new file mode 100644 index 000000000..038b34d8e Binary files /dev/null and b/tests/resources/test_4505.pdf differ diff --git a/tests/resources/test_4546.pdf b/tests/resources/test_4546.pdf new file mode 100644 index 000000000..e5f2ece53 Binary files /dev/null and b/tests/resources/test_4546.pdf differ diff --git a/tests/resources/test_4564.pdf b/tests/resources/test_4564.pdf new file mode 100644 index 000000000..486a100f9 Binary files /dev/null and b/tests/resources/test_4564.pdf differ diff --git a/tests/resources/test_4571.pdf b/tests/resources/test_4571.pdf new file mode 100644 index 000000000..991a0512b Binary files /dev/null and b/tests/resources/test_4571.pdf differ diff --git a/tests/resources/test_4613.png b/tests/resources/test_4613.png new file mode 100644 index 000000000..e02b7328d Binary files /dev/null and b/tests/resources/test_4613.png differ diff --git a/tests/resources/test_4614.pdf b/tests/resources/test_4614.pdf new file mode 100644 index 000000000..a9f71a819 Binary files /dev/null and b/tests/resources/test_4614.pdf differ diff --git a/tests/resources/test_4639.pdf b/tests/resources/test_4639.pdf new file mode 100644 index 000000000..11d0d1ee3 Binary files /dev/null and b/tests/resources/test_4639.pdf differ diff --git a/tests/resources/test_4699.pdf b/tests/resources/test_4699.pdf new file mode 100644 index 000000000..79ad74ced Binary files /dev/null and b/tests/resources/test_4699.pdf differ diff --git a/tests/resources/test_4699.png b/tests/resources/test_4699.png new file mode 100644 index 000000000..e67380d3a Binary files /dev/null and b/tests/resources/test_4699.png differ diff --git a/tests/resources/test_4712_a.pdf b/tests/resources/test_4712_a.pdf new file mode 100644 index 000000000..7a7fd49fc Binary files /dev/null and b/tests/resources/test_4712_a.pdf differ diff --git a/tests/resources/test_4712_b.pdf b/tests/resources/test_4712_b.pdf new file mode 100644 index 000000000..039aa59b7 Binary files /dev/null and b/tests/resources/test_4712_b.pdf differ diff --git a/tests/resources/test_4716.pdf b/tests/resources/test_4716.pdf new file mode 100644 index 000000000..25a9a57f5 Binary files /dev/null and b/tests/resources/test_4716.pdf differ diff --git a/tests/resources/test_open2.cbz b/tests/resources/test_open2.cbz new file mode 100644 index 000000000..322cfde24 Binary files /dev/null and b/tests/resources/test_open2.cbz differ diff --git a/tests/resources/test_open2.doc b/tests/resources/test_open2.doc new file mode 100644 index 000000000..2835739ad Binary files /dev/null and b/tests/resources/test_open2.doc differ diff --git a/tests/resources/test_open2.docx b/tests/resources/test_open2.docx new file mode 100644 index 000000000..fac653d10 Binary files /dev/null and b/tests/resources/test_open2.docx differ diff --git a/tests/resources/test_open2.epub b/tests/resources/test_open2.epub new file mode 100644 index 000000000..0a9ec16f4 Binary files /dev/null and b/tests/resources/test_open2.epub differ diff --git a/tests/resources/test_open2.fb2 b/tests/resources/test_open2.fb2 new file mode 100644 index 000000000..ad5f56d70 --- /dev/null +++ b/tests/resources/test_open2.fb2 @@ -0,0 +1,64 @@ + + + + + computers + + Chris + Clark + + Sample FB2 book + +

Short sample of a FictionBook2 book with simple metadata. Based on test_book.md from https://github.com/clach04/sample_reading_media

+
+ ebook,sample,markdown,fb2,FictionBook2 +
+ + + clach04 + https://github.com/clach04/sample_reading_media + + + vim and scite + https://github.com/clach04/sample_reading_media + 1.0 + +

Initial version, written by hand.

+
+
+
+ + + <p>This is a title</p> + + +
+ + <p>Test Header h1</p> + + +

A test paragraph.

+

Another test paragraph.

+
+ +
+ + <p>Another Test Header h1</p> + + +
+ + <p>A Test Header h2</p> + + +
+ + <p>A Test Header h3</p> + + +

Yet more copy

+
+
+
+ +
diff --git a/tests/resources/test_open2.html b/tests/resources/test_open2.html new file mode 100644 index 000000000..66411721c Binary files /dev/null and b/tests/resources/test_open2.html differ diff --git a/tests/resources/test_open2.jpg b/tests/resources/test_open2.jpg new file mode 100644 index 000000000..a3c18592c Binary files /dev/null and b/tests/resources/test_open2.jpg differ diff --git a/tests/resources/test_open2.mobi b/tests/resources/test_open2.mobi new file mode 100644 index 000000000..fe3d4689a Binary files /dev/null and b/tests/resources/test_open2.mobi differ diff --git a/tests/resources/test_open2.pdf b/tests/resources/test_open2.pdf new file mode 100644 index 000000000..c5da93780 Binary files /dev/null and b/tests/resources/test_open2.pdf differ diff --git a/tests/resources/test_open2.svg b/tests/resources/test_open2.svg new file mode 100644 index 000000000..287f7739a --- /dev/null +++ b/tests/resources/test_open2.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/tests/resources/test_open2.xhtml b/tests/resources/test_open2.xhtml new file mode 100644 index 000000000..5271725ab --- /dev/null +++ b/tests/resources/test_open2.xhtml @@ -0,0 +1,17 @@ + + + + + + + + +
+

Some text

+
+ + diff --git a/tests/resources/test_open2.xml b/tests/resources/test_open2.xml new file mode 100644 index 000000000..1c9953127 --- /dev/null +++ b/tests/resources/test_open2.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/resources/test_open2.xps b/tests/resources/test_open2.xps new file mode 100644 index 000000000..05a2b4a75 Binary files /dev/null and b/tests/resources/test_open2.xps differ diff --git a/tests/resources/test_open2_expected.json b/tests/resources/test_open2_expected.json new file mode 100644 index 000000000..9d9a173a3 --- /dev/null +++ b/tests/resources/test_open2_expected.json @@ -0,0 +1,808 @@ +{ + "tests/resources/test_open2.cbz": { + "": { + "file": "zip", + "stream": "zip" + }, + ".cbz": { + "file": "zip", + "stream": "zip" + }, + ".doc": { + "file": "zip", + "stream": "zip" + }, + ".docx": { + "file": "zip", + "stream": "zip" + }, + ".epub": { + "file": "zip", + "stream": "zip" + }, + ".fb2": { + "file": "zip", + "stream": "zip" + }, + ".html": { + "file": "zip", + "stream": "zip" + }, + ".jpg": { + "file": "zip", + "stream": "zip" + }, + ".mobi": { + "file": "zip", + "stream": "zip" + }, + ".pdf": { + "file": "zip", + "stream": "zip" + }, + ".svg": { + "file": "zip", + "stream": "zip" + }, + ".txt": { + "file": "zip", + "stream": "zip" + }, + ".xhtml": { + "file": "zip", + "stream": "zip" + }, + ".xml": { + "file": "zip", + "stream": "zip" + }, + ".xps": { + "file": "zip", + "stream": "zip" + } + }, + "tests/resources/test_open2.doc": { + "": { + "file": "[error]", + "stream": "[error]" + }, + ".cbz": { + "file": "cfb", + "stream": "cfb" + }, + ".doc": { + "file": "[error]", + "stream": "[error]" + }, + ".docx": { + "file": "[error]", + "stream": "[error]" + }, + ".epub": { + "file": "[error]", + "stream": "[error]" + }, + ".fb2": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".html": { + "file": "HTML5", + "stream": "HTML5" + }, + ".jpg": { + "file": "Image", + "stream": "Image" + }, + ".mobi": { + "file": "[error]", + "stream": "[error]" + }, + ".pdf": { + "file": "[error]", + "stream": "[error]" + }, + ".svg": { + "file": "SVG", + "stream": "SVG" + }, + ".txt": { + "file": "Text", + "stream": "Text" + }, + ".xhtml": { + "file": "XHTML", + "stream": "XHTML" + }, + ".xml": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".xps": { + "file": "[error]", + "stream": "[error]" + } + }, + "tests/resources/test_open2.docx": { + "": { + "file": "Office document", + "stream": "Office document" + }, + ".cbz": { + "file": "Office document", + "stream": "Office document" + }, + ".doc": { + "file": "Office document", + "stream": "Office document" + }, + ".docx": { + "file": "Office document", + "stream": "Office document" + }, + ".epub": { + "file": "Office document", + "stream": "Office document" + }, + ".fb2": { + "file": "Office document", + "stream": "Office document" + }, + ".html": { + "file": "Office document", + "stream": "Office document" + }, + ".jpg": { + "file": "Office document", + "stream": "Office document" + }, + ".mobi": { + "file": "Office document", + "stream": "Office document" + }, + ".pdf": { + "file": "Office document", + "stream": "Office document" + }, + ".svg": { + "file": "Office document", + "stream": "Office document" + }, + ".txt": { + "file": "Office document", + "stream": "Office document" + }, + ".xhtml": { + "file": "Office document", + "stream": "Office document" + }, + ".xml": { + "file": "Office document", + "stream": "Office document" + }, + ".xps": { + "file": "Office document", + "stream": "Office document" + } + }, + "tests/resources/test_open2.epub": { + "": { + "file": "EPUB", + "stream": "EPUB" + }, + ".cbz": { + "file": "zip", + "stream": "zip" + }, + ".doc": { + "file": "EPUB", + "stream": "EPUB" + }, + ".docx": { + "file": "EPUB", + "stream": "EPUB" + }, + ".epub": { + "file": "EPUB", + "stream": "EPUB" + }, + ".fb2": { + "file": "EPUB", + "stream": "EPUB" + }, + ".html": { + "file": "EPUB", + "stream": "EPUB" + }, + ".jpg": { + "file": "EPUB", + "stream": "EPUB" + }, + ".mobi": { + "file": "EPUB", + "stream": "EPUB" + }, + ".pdf": { + "file": "EPUB", + "stream": "EPUB" + }, + ".svg": { + "file": "EPUB", + "stream": "EPUB" + }, + ".txt": { + "file": "EPUB", + "stream": "EPUB" + }, + ".xhtml": { + "file": "EPUB", + "stream": "EPUB" + }, + ".xml": { + "file": "EPUB", + "stream": "EPUB" + }, + ".xps": { + "file": "EPUB", + "stream": "EPUB" + } + }, + "tests/resources/test_open2.fb2": { + "": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".cbz": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".doc": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".docx": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".epub": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".fb2": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".html": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".jpg": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".mobi": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".pdf": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".svg": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".txt": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".xhtml": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".xml": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".xps": { + "file": "FictionBook2", + "stream": "FictionBook2" + } + }, + "tests/resources/test_open2.html": { + "": { + "file": "HTML5", + "stream": "HTML5" + }, + ".cbz": { + "file": "HTML5", + "stream": "HTML5" + }, + ".doc": { + "file": "HTML5", + "stream": "HTML5" + }, + ".docx": { + "file": "HTML5", + "stream": "HTML5" + }, + ".epub": { + "file": "HTML5", + "stream": "HTML5" + }, + ".fb2": { + "file": "HTML5", + "stream": "HTML5" + }, + ".html": { + "file": "HTML5", + "stream": "HTML5" + }, + ".jpg": { + "file": "HTML5", + "stream": "HTML5" + }, + ".mobi": { + "file": "HTML5", + "stream": "HTML5" + }, + ".pdf": { + "file": "HTML5", + "stream": "HTML5" + }, + ".svg": { + "file": "HTML5", + "stream": "HTML5" + }, + ".txt": { + "file": "HTML5", + "stream": "HTML5" + }, + ".xhtml": { + "file": "XHTML", + "stream": "XHTML" + }, + ".xml": { + "file": "HTML5", + "stream": "HTML5" + }, + ".xps": { + "file": "HTML5", + "stream": "HTML5" + } + }, + "tests/resources/test_open2.jpg": { + "": { + "file": "Image", + "stream": "Image" + }, + ".cbz": { + "file": "Image", + "stream": "Image" + }, + ".doc": { + "file": "Image", + "stream": "Image" + }, + ".docx": { + "file": "Image", + "stream": "Image" + }, + ".epub": { + "file": "Image", + "stream": "Image" + }, + ".fb2": { + "file": "Image", + "stream": "Image" + }, + ".html": { + "file": "Image", + "stream": "Image" + }, + ".jpg": { + "file": "Image", + "stream": "Image" + }, + ".mobi": { + "file": "Image", + "stream": "Image" + }, + ".pdf": { + "file": "Image", + "stream": "Image" + }, + ".svg": { + "file": "Image", + "stream": "Image" + }, + ".txt": { + "file": "Image", + "stream": "Image" + }, + ".xhtml": { + "file": "Image", + "stream": "Image" + }, + ".xml": { + "file": "Image", + "stream": "Image" + }, + ".xps": { + "file": "Image", + "stream": "Image" + } + }, + "tests/resources/test_open2.mobi": { + "": { + "file": "MOBI", + "stream": "MOBI" + }, + ".cbz": { + "file": "MOBI", + "stream": "MOBI" + }, + ".doc": { + "file": "MOBI", + "stream": "MOBI" + }, + ".docx": { + "file": "MOBI", + "stream": "MOBI" + }, + ".epub": { + "file": "MOBI", + "stream": "MOBI" + }, + ".fb2": { + "file": "MOBI", + "stream": "MOBI" + }, + ".html": { + "file": "MOBI", + "stream": "MOBI" + }, + ".jpg": { + "file": "MOBI", + "stream": "MOBI" + }, + ".mobi": { + "file": "MOBI", + "stream": "MOBI" + }, + ".pdf": { + "file": "MOBI", + "stream": "MOBI" + }, + ".svg": { + "file": "MOBI", + "stream": "MOBI" + }, + ".txt": { + "file": "MOBI", + "stream": "MOBI" + }, + ".xhtml": { + "file": "MOBI", + "stream": "MOBI" + }, + ".xml": { + "file": "MOBI", + "stream": "MOBI" + }, + ".xps": { + "file": "MOBI", + "stream": "MOBI" + } + }, + "tests/resources/test_open2.pdf": { + "": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".cbz": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".doc": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".docx": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".epub": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".fb2": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".html": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".jpg": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".mobi": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".pdf": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".svg": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".txt": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".xhtml": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".xml": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + }, + ".xps": { + "file": "PDF 1.5", + "stream": "PDF 1.5" + } + }, + "tests/resources/test_open2.svg": { + "": { + "file": "SVG", + "stream": "SVG" + }, + ".cbz": { + "file": "SVG", + "stream": "SVG" + }, + ".doc": { + "file": "SVG", + "stream": "SVG" + }, + ".docx": { + "file": "SVG", + "stream": "SVG" + }, + ".epub": { + "file": "SVG", + "stream": "SVG" + }, + ".fb2": { + "file": "SVG", + "stream": "SVG" + }, + ".html": { + "file": "SVG", + "stream": "SVG" + }, + ".jpg": { + "file": "SVG", + "stream": "SVG" + }, + ".mobi": { + "file": "SVG", + "stream": "SVG" + }, + ".pdf": { + "file": "SVG", + "stream": "SVG" + }, + ".svg": { + "file": "SVG", + "stream": "SVG" + }, + ".txt": { + "file": "SVG", + "stream": "SVG" + }, + ".xhtml": { + "file": "SVG", + "stream": "SVG" + }, + ".xml": { + "file": "SVG", + "stream": "SVG" + }, + ".xps": { + "file": "SVG", + "stream": "SVG" + } + }, + "tests/resources/test_open2.xhtml": { + "": { + "file": "XHTML", + "stream": "XHTML" + }, + ".cbz": { + "file": "XHTML", + "stream": "XHTML" + }, + ".doc": { + "file": "XHTML", + "stream": "XHTML" + }, + ".docx": { + "file": "XHTML", + "stream": "XHTML" + }, + ".epub": { + "file": "XHTML", + "stream": "XHTML" + }, + ".fb2": { + "file": "XHTML", + "stream": "XHTML" + }, + ".html": { + "file": "HTML5", + "stream": "HTML5" + }, + ".jpg": { + "file": "XHTML", + "stream": "XHTML" + }, + ".mobi": { + "file": "XHTML", + "stream": "XHTML" + }, + ".pdf": { + "file": "XHTML", + "stream": "XHTML" + }, + ".svg": { + "file": "XHTML", + "stream": "XHTML" + }, + ".txt": { + "file": "XHTML", + "stream": "XHTML" + }, + ".xhtml": { + "file": "XHTML", + "stream": "XHTML" + }, + ".xml": { + "file": "XHTML", + "stream": "XHTML" + }, + ".xps": { + "file": "XHTML", + "stream": "XHTML" + } + }, + "tests/resources/test_open2.xml": { + "": { + "file": "[error]", + "stream": "[error]" + }, + ".cbz": { + "file": "[error]", + "stream": "[error]" + }, + ".doc": { + "file": "[error]", + "stream": "[error]" + }, + ".docx": { + "file": "[error]", + "stream": "[error]" + }, + ".epub": { + "file": "[error]", + "stream": "[error]" + }, + ".fb2": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".html": { + "file": "HTML5", + "stream": "HTML5" + }, + ".jpg": { + "file": "Image", + "stream": "Image" + }, + ".mobi": { + "file": "[error]", + "stream": "[error]" + }, + ".pdf": { + "file": "[error]", + "stream": "[error]" + }, + ".svg": { + "file": "SVG", + "stream": "SVG" + }, + ".txt": { + "file": "Text", + "stream": "Text" + }, + ".xhtml": { + "file": "XHTML", + "stream": "XHTML" + }, + ".xml": { + "file": "FictionBook2", + "stream": "FictionBook2" + }, + ".xps": { + "file": "[error]", + "stream": "[error]" + } + }, + "tests/resources/test_open2.xps": { + "": { + "file": "XPS", + "stream": "XPS" + }, + ".cbz": { + "file": "zip", + "stream": "zip" + }, + ".doc": { + "file": "XPS", + "stream": "XPS" + }, + ".docx": { + "file": "XPS", + "stream": "XPS" + }, + ".epub": { + "file": "XPS", + "stream": "XPS" + }, + ".fb2": { + "file": "XPS", + "stream": "XPS" + }, + ".html": { + "file": "XPS", + "stream": "XPS" + }, + ".jpg": { + "file": "XPS", + "stream": "XPS" + }, + ".mobi": { + "file": "XPS", + "stream": "XPS" + }, + ".pdf": { + "file": "XPS", + "stream": "XPS" + }, + ".svg": { + "file": "XPS", + "stream": "XPS" + }, + ".txt": { + "file": "XPS", + "stream": "XPS" + }, + ".xhtml": { + "file": "XPS", + "stream": "XPS" + }, + ".xml": { + "file": "XPS", + "stream": "XPS" + }, + ".xps": { + "file": "XPS", + "stream": "XPS" + } + } +} \ No newline at end of file diff --git a/tests/run_compound.py b/tests/run_compound.py index 7598237cd..927b721e3 100755 --- a/tests/run_compound.py +++ b/tests/run_compound.py @@ -82,6 +82,21 @@ def main(): for i in implementations: log(f'run_compound.py: {i=}') + + cpu_bits = int.bit_length(sys.maxsize+1) + log(f'{os.getcwd()=}') + log(f'{platform.machine()=}') + log(f'{platform.platform()=}') + log(f'{platform.python_version()=}') + log(f'{platform.system()=}') + if sys.implementation.name != 'graalpy': + log(f'{platform.uname()=}') + log(f'{sys.executable=}') + log(f'{sys.version=}') + log(f'{sys.version_info=}') + log(f'{list(sys.version_info)=}') + log(f'{cpu_bits=}') + timeout = None if endtime: timeout = max(0, endtime - time.time()) diff --git a/tests/test_2548.py b/tests/test_2548.py index ef29ba209..f3a2b2db5 100644 --- a/tests/test_2548.py +++ b/tests/test_2548.py @@ -10,9 +10,6 @@ def test_2548(): Old MuPDF version did not detect the loop. """ print(f'test_2548(): {pymupdf.mupdf_version_tuple=}') - if pymupdf.mupdf_version_tuple < (1, 23, 4): - print(f'test_2548(): Not testing #2548 because infinite hang before mupdf-1.23.4.') - return pymupdf.TOOLS.mupdf_warnings(reset=True) doc = pymupdf.open(f'{root}/tests/resources/test_2548.pdf') e = False @@ -35,17 +32,11 @@ def test_2548(): # This checks that PyMuPDF 1.23.7 fixes this bug, and also that earlier # versions with updated MuPDF also fix the bug. rebased = hasattr(pymupdf, 'mupdf') - if pymupdf.mupdf_version_tuple >= (1, 23, 7): - if pymupdf.mupdf_version_tuple >= (1, 25): - expected = 'format error: cycle in structure tree\nstructure tree broken, assume tree is missing' - elif pymupdf.mupdf_version_tuple >= (1, 24): - expected = 'Loop found in structure tree. Ignoring structure.' - else: - expected = 'structure tree broken, assume tree is missing: cycle in structure tree' - if rebased: - assert wt == expected, f'expected:\n {expected!r}\nwt:\n {wt!r}\n' - assert not e + if pymupdf.mupdf_version_tuple >= (1, 27): + expected = 'format error: No common ancestor in structure tree\nstructure tree broken, assume tree is missing' + expected = '\n'.join([expected] * 5) else: - assert e - if rebased: - assert not wt + expected = 'format error: cycle in structure tree\nstructure tree broken, assume tree is missing' + if rebased: + assert wt == expected, f'expected:\n {expected!r}\nwt:\n {wt!r}\n' + assert not e diff --git a/tests/test_2791.py b/tests/test_2791.py deleted file mode 100644 index b9995d9ba..000000000 --- a/tests/test_2791.py +++ /dev/null @@ -1,87 +0,0 @@ -import pymupdf - -import gc -import os -import platform -import sys - - -def merge_pdf(content: bytes, coverpage: bytes): - with pymupdf.Document(stream=coverpage, filetype='pdf') as coverpage_pdf: - with pymupdf.Document(stream=content, filetype='pdf') as content_pdf: - coverpage_pdf.insert_pdf(content_pdf) - doc = coverpage_pdf.write() - return doc - -def test_2791(): - ''' - Check for memory leaks. - ''' - if os.environ.get('PYMUPDF_RUNNING_ON_VALGRIND') == '1': - print(f'test_2791(): not running because PYMUPDF_RUNNING_ON_VALGRIND=1.') - return - if platform.system().startswith('MSYS_NT-'): - print(f'test_2791(): not running on msys2 - psutil not available.') - return - #stat_type = 'tracemalloc' - stat_type = 'psutil' - if stat_type == 'tracemalloc': - import tracemalloc - tracemalloc.start(10) - def get_stat(): - current, peak = tracemalloc.get_traced_memory() - return current - elif stat_type == 'psutil': - # We use RSS, as used by mprof. - import psutil - process = psutil.Process() - def get_stat(): - return process.memory_info().rss - else: - def get_stat(): - return 0 - n = 1000 - stats = [1] * n - for i in range(n): - root = os.path.abspath(f'{__file__}/../../tests/resources') - with open(f'{root}/test_2791_content.pdf', 'rb') as content_pdf: - with open(f'{root}/test_2791_coverpage.pdf', 'rb') as coverpage_pdf: - content = content_pdf.read() - coverpage = coverpage_pdf.read() - merge_pdf(content, coverpage) - sys.stdout.flush() - - gc.collect() - stats[i] = get_stat() - - print(f'Memory usage {stat_type=}.') - for i, stat in enumerate(stats): - sys.stdout.write(f' {stat}') - #print(f' {i}: {stat}') - sys.stdout.write('\n') - first = stats[2] - last = stats[-1] - ratio = last / first - print(f'{first=} {last=} {ratio=}') - - if platform.system() != 'Linux': - # Values from psutil indicate larger memory leaks on non-Linux. Don't - # yet know whether this is because rss is measured differently or a - # genuine leak is being exposed. - print(f'test_2791(): not asserting ratio because not running on Linux.') - elif not hasattr(pymupdf, 'mupdf'): - # Classic implementation has unfixed leaks. - print(f'test_2791(): not asserting ratio because using classic implementation.') - elif [int(x) for x in platform.python_version_tuple()[:2]] < [3, 11]: - print(f'test_2791(): not asserting ratio because python version less than 3.11: {platform.python_version()=}.') - elif stat_type == 'tracemalloc': - # With tracemalloc Before fix to src/extra.i's calls to - # PyObject_CallMethodObjArgs, ratio was 4.26; after it was 1.40. - assert ratio > 1 and ratio < 1.6 - elif stat_type == 'psutil': - # Prior to fix, ratio was 1.043. After the fix, improved to 1.005, but - # varies and sometimes as high as 1.010. - # 2024-06-03: have seen 0.99919 on musl linux, and sebras reports .025. - assert ratio >= 0.990 and ratio < 1.027, f'{ratio=}' - else: - pass diff --git a/tests/test_2904.py b/tests/test_2904.py index 5bdf6a579..21b55fb18 100644 --- a/tests/test_2904.py +++ b/tests/test_2904.py @@ -29,10 +29,7 @@ def test_2904(): assert e if hasattr(pymupdf, 'mupdf'): # rebased. - if pymupdf.mupdf_version_tuple >= (1, 24): - assert str(e) == 'code=8: Failed to read JPX header' - else: - assert str(e) == 'code=4: Failed to read JPX header' + assert str(e) == 'code=8: Failed to read JPX header' else: # classic assert str(e) == 'Failed to read JPX header' diff --git a/tests/test_2907.py b/tests/test_2907.py index 2330ffc18..58346be6b 100644 --- a/tests/test_2907.py +++ b/tests/test_2907.py @@ -16,7 +16,3 @@ def test_2907(): pdf_pages = list(fitz_document.pages()) (page,) = pdf_pages page.clean_contents() - if pymupdf.mupdf_version_tuple < (1, 24, 2): - # We expect 'dropping unclosed PDF processor' warnings. - wt = pymupdf.TOOLS.mupdf_warnings() - assert wt diff --git a/tests/test_4141.py b/tests/test_4141.py new file mode 100644 index 000000000..bd13988f6 --- /dev/null +++ b/tests/test_4141.py @@ -0,0 +1,19 @@ +import pymupdf + +import os.path + + +def test_4141(): + """survive missing /Resources object in a number of cases.""" + path = os.path.abspath(f"{__file__}/../../tests/resources/test_4141.pdf") + doc = pymupdf.open(path) + page = doc[0] + # make sure the right test file + assert doc.xref_get_key(page.xref, "Resources") == ("null", "null") + page.insert_htmlbox((100, 100, 200, 200), "Hallo") # will fail without the fix + doc.close() + doc = pymupdf.open(doc.name) + page = doc[0] + tw = pymupdf.TextWriter(page.rect) + tw.append((100, 100), "Hallo") + tw.write_text(page) # will fail without the fix diff --git a/tests/test_4466.pdf b/tests/test_4466.pdf new file mode 100644 index 000000000..782c1bead Binary files /dev/null and b/tests/test_4466.pdf differ diff --git a/tests/test_4503.py b/tests/test_4503.py new file mode 100644 index 000000000..fb1b449d0 --- /dev/null +++ b/tests/test_4503.py @@ -0,0 +1,38 @@ +""" +Test for issue #4503 in pymupdf: +Correct recognition of strikeout and underline styles in text spans. +""" + +import os +import pymupdf +from pymupdf import mupdf + +STRIKEOUT = mupdf.FZ_STEXT_STRIKEOUT +UNDERLINE = mupdf.FZ_STEXT_UNDERLINE + + +def test_4503(): + """ + Check that the text span with the specified text has the correct styling: + strikeout, but no underline. + Previously, the text was broken in multiple spans with span breaks at + every space. and some parts were not detected as strikeout at all. + """ + scriptdir = os.path.dirname(os.path.abspath(__file__)) + text = "the right to request the state to review and, if appropriate," + filename = os.path.join(scriptdir, "resources", "test-4503.pdf") + doc = pymupdf.open(filename) + page = doc[0] + flags = pymupdf.TEXT_ACCURATE_BBOXES | pymupdf.TEXT_COLLECT_STYLES + spans = [ + s + for b in page.get_text("dict", flags=flags)["blocks"] + for l in b["lines"] + for s in l["spans"] + if s["text"] == text + ] + assert spans, "No spans found with the specified text" + span = spans[0] + + assert span["char_flags"] & STRIKEOUT + assert not span["char_flags"] & UNDERLINE diff --git a/tests/test_4505.py b/tests/test_4505.py new file mode 100644 index 000000000..9c1fdc9f2 --- /dev/null +++ b/tests/test_4505.py @@ -0,0 +1,27 @@ +import pymupdf +import os.path + + +def test_4505(): + """Copy field flags to Parent widget and all of its kids.""" + path = os.path.abspath(f"{__file__}/../../tests/resources/test_4505.pdf") + doc = pymupdf.open(path) + page = doc[0] + text1_flags_before = {} + text1_flags_after = {} + # extract all widgets having the same field name + for w in page.widgets(): + if w.field_name != "text_1": + continue + text1_flags_before[w.xref] = w.field_flags + # expected exiting field flags + assert text1_flags_before == {8: 1, 10: 0, 33: 0} + w = page.load_widget(8) # first of these widgets + # give all connected widgets that field flags value + w.update(sync_flags=True) + # confirm that all connected widgets have the same field flags + for w in page.widgets(): + if w.field_name != "text_1": + continue + text1_flags_after[w.xref] = w.field_flags + assert text1_flags_after == {8: 1, 10: 1, 33: 1} diff --git a/tests/test_4520.py b/tests/test_4520.py new file mode 100644 index 000000000..81e7d2559 --- /dev/null +++ b/tests/test_4520.py @@ -0,0 +1,11 @@ +import pymupdf + + +def test_4520(): + """Accept source pages without /Contents object in show_pdf_page.""" + tar = pymupdf.open() + src = pymupdf.open() + src.new_page() + page = tar.new_page() + xref = page.show_pdf_page(page.rect, src, 0) + assert xref diff --git a/tests/test_4614.py b/tests/test_4614.py new file mode 100644 index 000000000..d3b466cb6 --- /dev/null +++ b/tests/test_4614.py @@ -0,0 +1,10 @@ +import pymupdf +import os + + +def test_4614(): + script_dir = os.path.dirname(__file__) + filename = os.path.join(script_dir, "resources", "test_4614.pdf") + src = pymupdf.open(filename) + doc = pymupdf.open() + doc.insert_pdf(src) diff --git a/tests/test_4716.py b/tests/test_4716.py new file mode 100644 index 000000000..09692277a --- /dev/null +++ b/tests/test_4716.py @@ -0,0 +1,15 @@ +import pymupdf +import os + +def test_4716(): + """Confirm that ZERO WIDTH JOINER will never start a word.""" + script_dir = os.path.dirname(__file__) + filename = os.path.join(script_dir, "resources", "test_4716.pdf") + doc = pymupdf.open(filename) + expected = set(["+25.00", "Любимый", "-10.00"]) + word_text = set() + for page in doc: + words = page.get_text("words") + for w in words: + word_text.add(w[4]) + assert word_text == expected diff --git a/tests/test_annots.py b/tests/test_annots.py index ea9aa07bc..834d85cdc 100644 --- a/tests/test_annots.py +++ b/tests/test_annots.py @@ -4,13 +4,12 @@ """ import os +import platform import pymupdf import gentle_compare -pymupdf.TOOLS.set_annot_stem("jorj") - red = (1, 0, 0) blue = (0, 0, 1) gold = (1, 1, 0) @@ -145,8 +144,9 @@ def test_fileattachment(): def test_stamp(): doc = pymupdf.open() page = doc.new_page() - annot = page.add_stamp_annot(r, stamp=10) + annot = page.add_stamp_annot(r, stamp=0) assert annot.type == (13, "Stamp") + assert annot.info["content"] == "Approved" annot_id = annot.info["id"] annot_xref = annot.xref page.load_annot(annot_id) @@ -154,6 +154,14 @@ def test_stamp(): page = doc.reload_page(page) +def test_image_stamp(): + doc = pymupdf.open() + page = doc.new_page() + filename = os.path.join(scriptdir, "resources", "nur-ruhig.jpg") + annot = page.add_stamp_annot(r, stamp=filename) + assert annot.info["content"] == "Image Stamp" + + def test_redact1(): doc = pymupdf.open() page = doc.new_page() @@ -185,10 +193,7 @@ def test_redact2(): page.add_redact_annot(page.rect) page.apply_redactions(text=1) t = page.get_text("words") - if pymupdf.mupdf_version_tuple < (1, 24, 2): - assert t == [] - else: - assert t == all_text0 + assert t == all_text0 assert not page.get_drawings() @@ -225,38 +230,43 @@ def test_1645(): ''' Test fix for #1645. ''' - path_in = os.path.abspath( f'{__file__}/../resources/symbol-list.pdf') - - if pymupdf.mupdf_version_tuple >= (1, 25): - path_expected = os.path.abspath( f'{__file__}/../../tests/resources/test_1645_expected_1.25.pdf') - elif pymupdf.mupdf_version_tuple >= (1, 24, 2): - path_expected = os.path.abspath( f'{__file__}/../../tests/resources/test_1645_expected_1.24.2.pdf') - elif pymupdf.mupdf_version_tuple >= (1, 24): - path_expected = os.path.abspath( f'{__file__}/../../tests/resources/test_1645_expected_1.24.pdf') - else: - path_expected = os.path.abspath( f'{__file__}/../resources/test_1645_expected_1.22.pdf') - path_out = os.path.abspath( f'{__file__}/../test_1645_out.pdf') - doc = pymupdf.open(path_in) - page = doc[0] - page_bounds = page.bound() - annot_loc = pymupdf.Rect(page_bounds.x0, page_bounds.y0, page_bounds.x0 + 75, page_bounds.y0 + 15) - # Check type of page.derotation_matrix - this is #2911. - assert isinstance(page.derotation_matrix, pymupdf.Matrix), \ - f'Bad type for page.derotation_matrix: {type(page.derotation_matrix)=} {page.derotation_matrix=}.' - page.add_freetext_annot( - annot_loc * page.derotation_matrix, - "TEST", - fontsize=18, - fill_color=pymupdf.utils.getColor("FIREBRICK1"), - rotate=page.rotation, - ) - doc.save(path_out, garbage=1, deflate=True, no_new_id=True) - print(f'Have created {path_out}. comparing with {path_expected}.') - with open( path_out, 'rb') as f: - out = f.read() - with open( path_expected, 'rb') as f: - expected = f.read() - assert out == expected, f'Files differ: {path_out} {path_expected}' + # The expected output files assume annot_stem is 'jorj'. We need to always + # restore this before returning (this is checked by conftest.py). + annot_stem = pymupdf.JM_annot_id_stem + pymupdf.TOOLS.set_annot_stem('jorj') + try: + path_in = os.path.abspath( f'{__file__}/../resources/symbol-list.pdf') + if pymupdf.mupdf_version_tuple >= (1, 27): + path_expected = os.path.abspath( f'{__file__}/../../tests/resources/test_1645_expected-after-1.27.0.pdf') + else: + path_expected = os.path.abspath( f'{__file__}/../../tests/resources/test_1645_expected.pdf') + path_out = os.path.abspath( f'{__file__}/../test_1645_out.pdf') + doc = pymupdf.open(path_in) + page = doc[0] + page_bounds = page.bound() + annot_loc = pymupdf.Rect(page_bounds.x0, page_bounds.y0, page_bounds.x0 + 75, page_bounds.y0 + 15) + # Check type of page.derotation_matrix - this is #2911. + assert isinstance(page.derotation_matrix, pymupdf.Matrix), \ + f'Bad type for page.derotation_matrix: {type(page.derotation_matrix)=} {page.derotation_matrix=}.' + page.add_freetext_annot( + annot_loc * page.derotation_matrix, + "TEST", + fontsize=18, + fill_color=pymupdf.utils.getColor("FIREBRICK1"), + rotate=page.rotation, + ) + doc.save(path_out, garbage=1, deflate=True, no_new_id=True) + print(f'Have created {path_out}. comparing with {path_expected}.') + with pymupdf.open(path_expected) as doc_expected, pymupdf.open(path_out) as doc_out: + rms = gentle_compare.pixmaps_rms( + doc_expected[0].get_pixmap(), + doc_out[0].get_pixmap(), + ) + print(f'test_1645: {rms=}') + assert rms < 0.1, f'Pixmaps differ: {path_expected=} {path_out=}' + finally: + # Restore annot_stem. + pymupdf.TOOLS.set_annot_stem(annot_stem) def test_1824(): ''' @@ -277,6 +287,7 @@ def test_2270(): for page_number, page in enumerate(document): for textBox in page.annots(types=(pymupdf.PDF_ANNOT_FREE_TEXT,pymupdf.PDF_ANNOT_TEXT)): print("textBox.type :", textBox.type) + print(f"{textBox.rect=}") print("textBox.get_text('words') : ", textBox.get_text('words')) print("textBox.get_text('text') : ", textBox.get_text('text')) print("textBox.get_textbox(textBox.rect) : ", textBox.get_textbox(textBox.rect)) @@ -287,16 +298,27 @@ def test_2270(): assert textBox.get_textbox(textBox.rect) == 'abc123' assert textBox.info['content'] == 'abc123' - if hasattr(pymupdf, 'mupdf'): - # Additional check that Annot.get_textpage() returns a - # TextPage that works with page.get_text() - prior to - # 2024-01-30 the TextPage had no `.parent` member. - textpage = textBox.get_textpage() - text = page.get_text() - print(f'{text=}') - text = page.get_text(textpage=textpage) - print(f'{text=}') - print(f'{getattr(textpage, "parent")=}') + # Additional check that Annot.get_textpage() returns a + # TextPage that works with page.get_text() - prior to + # 2024-01-30 the TextPage had no `.parent` member. + textpage = textBox.get_textpage() + text = page.get_text() + print(f'{text=}') + text = page.get_text(textpage=textpage) + print(f'{text=}') + print(f'{getattr(textpage, "parent")=}') + + if pymupdf.mupdf_version_tuple >= (1, 26): + # Check Annotation.get_textpage()'s arg. + clip = textBox.rect + clip.x1 = clip.x0 + (clip.x1 - clip.x0) / 3 + textpage2 = textBox.get_textpage(clip=clip) + text = textpage2.extractText() + print(f'With {clip=}: {text=}') + assert text == 'ab\n' + else: + assert not hasattr(pymupdf.mupdf, 'FZ_STEXT_CLIP_RECT') + def test_2934_add_redact_annot(): ''' @@ -343,8 +365,8 @@ def test_file_info(): print(f'{file_info=}') results.append(file_info) assert results == [ - {'filename': 'example.pdf', 'descender': '', 'length': 8416, 'size': 8992}, - {'filename': 'photo1.jpeg', 'descender': '', 'length': 10154, 'size': 8012}, + {'filename': 'example.pdf', 'description': '', 'length': 8416, 'size': 8992}, + {'filename': 'photo1.jpeg', 'description': '', 'length': 10154, 'size': 8012}, ] def test_3131(): @@ -370,10 +392,6 @@ def test_3209(): pdf.save(path) # Check the output PDF that the annotation is correctly drawn def test_3863(): - if pymupdf.mupdf_version_tuple < (1, 24, 10): - print(f'test_3863(): not running because {pymupdf.mupdf_version_tuple=} < 1.24.10.') - return - path_in = os.path.normpath(f'{__file__}/../../tests/resources/test_3863.pdf') path_out = os.path.normpath(f'{__file__}/../../tests/test_3863.pdf.pdf') @@ -419,3 +437,247 @@ def test_3863(): # We get small differences in sysinstall tests, where some # thirdparty libraries can differ. assert rms < 1 + +def test_3758(): + # This test requires input file that is not public, so is usually not + # available. + path = os.path.normpath(f'{__file__}/../../../test_3758.pdf') + if not os.path.exists(path): + print(f'test_3758(): not running because does not exist: {path=}.') + return + import json + with pymupdf.open(path) as document: + for page in document: + info = json.loads(page.get_text('json', flags=pymupdf.TEXTFLAGS_TEXT)) + for block_ind, block in enumerate(info['blocks']): + for line_ind, line in enumerate(block['lines']): + for span_ind, span in enumerate(line['spans']): + # print(span) + page.add_redact_annot(pymupdf.Rect(*span['bbox'])) + page.apply_redactions() + wt = pymupdf.TOOLS.mupdf_warnings() + assert wt + + +def test_parent(): + """Test invalidating parent on page re-assignment.""" + doc = pymupdf.open() + page = doc.new_page() + a = page.add_highlight_annot(page.rect) # insert annotation on page 0 + page = doc.new_page() # make a new page, should orphanate annotation + try: + print(a) # should raise + except Exception as e: + if platform.system() == 'OpenBSD': + assert isinstance(e, pymupdf.mupdf.FzErrorBase), f'Incorrect {type(e)=}.' + else: + assert isinstance(e, pymupdf.mupdf.FzErrorArgument), f'Incorrect {type(e)=}.' + assert str(e) == 'code=4: annotation not bound to any page', f'Incorrect error text {str(e)=}.' + else: + assert 0, f'Failed to get expected exception.' + +def test_4047(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4047.pdf') + with pymupdf.open(path) as document: + page = document[0] + fontname = page.get_fonts()[0][3] + if fontname not in pymupdf.Base14_fontnames: + fontname = "Courier" + hits = page.search_for("|") + for rect in hits: + page.add_redact_annot( + rect, " ", fontname=fontname, align=pymupdf.TEXT_ALIGN_CENTER, fontsize=10 + ) # Segmentation Fault... + page.apply_redactions() + +def test_4079(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4079.pdf') + if pymupdf.mupdf_version_tuple >= (1, 25, 5): + path_after = os.path.normpath(f'{__file__}/../../tests/resources/test_4079_after.pdf') + else: + # 2024-11-27 Expect incorrect behaviour. + path_after = os.path.normpath(f'{__file__}/../../tests/resources/test_4079_after_1.25.pdf') + + path_out = os.path.normpath(f'{__file__}/../../tests/test_4079_out') + with pymupdf.open(path_after) as document_after: + page = document_after[0] + pixmap_after_expected = page.get_pixmap() + with pymupdf.open(path) as document: + page = document[0] + rects = [ + [164,213,282,227], + [282,213,397,233], + [434,209,525,243], + [169,228,231,243], + [377,592,440,607], + [373,611,444,626], + ] + for rect in rects: + page.add_redact_annot(rect, fill=(1,0,0)) + page.draw_rect(rect, color=(0, 1, 0)) + document.save(f'{path_out}_before.pdf') + page.apply_redactions(images=0) + pixmap_after = page.get_pixmap() + document.save(f'{path_out}_after.pdf') + rms = gentle_compare.pixmaps_rms(pixmap_after_expected, pixmap_after) + diff = gentle_compare.pixmaps_diff(pixmap_after_expected, pixmap_after) + path = os.path.normpath(f'{__file__}/../../tests/test_4079_diff.png') + diff.save(path) + print(f'{rms=}') + assert rms == 0 + +def test_4254(): + """Ensure that both annotations are fully created + + We do this by asserting equal top-used colors in respective pixmaps. + """ + doc = pymupdf.open() + page = doc.new_page() + + rect = pymupdf.Rect(100, 100, 200, 150) + annot = page.add_freetext_annot(rect, "Test Annotation from minimal example") + annot.set_border(width=1, dashes=(3, 3)) + annot.set_opacity(0.5) + try: + annot.set_colors(stroke=(1, 0, 0)) + except ValueError as e: + assert 'cannot be used for FreeText annotations' in str(e), f'{e}' + else: + assert 0 + annot.update() + + rect = pymupdf.Rect(200, 200, 400, 400) + annot2 = page.add_freetext_annot(rect, "Test Annotation from minimal example pt 2") + annot2.set_border(width=1, dashes=(3, 3)) + annot2.set_opacity(0.5) + try: + annot2.set_colors(stroke=(1, 0, 0)) + except ValueError as e: + assert 'cannot be used for FreeText annotations' in str(e), f'{e}' + else: + assert 0 + annot.update() + annot2.update() + + # stores top color for each pixmap + top_colors = set() + for annot in page.annots(): + pix = annot.get_pixmap() + top_colors.add(pix.color_topusage()[1]) + + # only one color must exist + assert len(top_colors) == 1 + +def test_richtext(): + """Test creation of rich text FreeText annotations. + + We create the same annotation on different pages in different ways, + with and without using Annotation.update(), and then assert equality + of the respective images. + """ + ds = """font-size: 11pt; font-family: sans-serif;""" + bullet = chr(0x2610) + chr(0x2611) + chr(0x2612) + text = f"""

+ PyMuPDF འདི་ ཡིག་ཆ་བཀྲམ་སྤེལ་གྱི་དོན་ལུ་ པའི་ཐོན་ཐུམ་སྒྲིལ་དྲག་ཤོས་དང་མགྱོགས་ཤོས་ཅིག་ཨིན། + Here is some bold and italic text, followed by bold-italic. Text-based check boxes: {bullet}. +

""" + gold = (1, 1, 0) + doc = pymupdf.open() + + # First page. + page = doc.new_page() + rect = pymupdf.Rect(100, 100, 350, 200) + p2 = rect.tr + (50, 30) + p3 = p2 + (0, 30) + annot = page.add_freetext_annot( + rect, + text, + fill_color=gold, + opacity=0.5, + rotate=90, + border_width=1, + dashes=None, + richtext=True, + callout=(p3, p2, rect.tr), + ) + + pix1 = page.get_pixmap() + + # Second page. + # the annotation is created with minimal parameters, which are supplied + # in a separate call to the .update() method. + page = doc.new_page() + annot = page.add_freetext_annot( + rect, + text, + border_width=1, + dashes=None, + richtext=True, + callout=(p3, p2, rect.tr), + ) + annot.update(fill_color=gold, opacity=0.5, rotate=90) + pix2 = page.get_pixmap() + assert pix1.samples == pix2.samples + + +def test_4447(): + document = pymupdf.open() + + page = document.new_page() + + text_color = (1, 0, 0) + fill_color = (0, 1, 0) + border_color = (0, 0, 1) + + annot_rect = pymupdf.Rect(90.1, 486.73, 139.26, 499.46) + + try: + annot = page.add_freetext_annot( + annot_rect, + "AETERM", + fontname="Arial", + fontsize=10, + text_color=text_color, + fill_color=fill_color, + border_color=border_color, + border_width=1, + ) + except ValueError as e: + assert 'cannot set border_color if rich_text is False' in str(e), str(e) + else: + assert 0 + + try: + annot = page.add_freetext_annot( + (30, 400, 100, 450), + "Two", + fontname="Arial", + fontsize=10, + text_color=text_color, + fill_color=fill_color, + border_color=border_color, + border_width=1, + ) + except ValueError as e: + assert 'cannot set border_color if rich_text is False' in str(e), str(e) + else: + assert 0 + + annot = page.add_freetext_annot( + (30, 500, 100, 550), + "Three", + fontname="Arial", + fontsize=10, + text_color=text_color, + border_width=1, + ) + annot.update(text_color=text_color, fill_color=fill_color) + try: + annot.update(border_color=border_color) + except ValueError as e: + assert 'cannot set border_color if rich_text is False' in str(e), str(e) + else: + assert 0 + + path_out = os.path.normpath(f'{__file__}/../../tests/test_4447.pdf') + document.save(path_out) diff --git a/tests/test_balance_count.py b/tests/test_balance_count.py index 146e523c6..cfa56b82e 100644 --- a/tests/test_balance_count.py +++ b/tests/test_balance_count.py @@ -22,10 +22,7 @@ def test_q_count(): # Although counts of q and Q are equal now, the unshielded 'cm' before # the first 'q' makes the contents unusable for insertions. pymupdf.TOOLS._insert_contents(page, b"1 0 0 -1 0 0 cm q ", False) # prepend - if pymupdf.mupdf_version_tuple >= (1, 24, 2): - assert page.is_wrapped is False - else: - assert page.is_wrapped + assert page.is_wrapped is False if page._count_q_balance() == (0, 0): print("imbalance undetected by q balance count") diff --git a/tests/test_barcode.py b/tests/test_barcode.py new file mode 100644 index 000000000..99682514a --- /dev/null +++ b/tests/test_barcode.py @@ -0,0 +1,63 @@ +import os + +import pymupdf + + +def test_barcode(): + if pymupdf.mupdf_version_tuple < (1, 26): + print(f'Not testing barcode because {pymupdf.mupdf_version=} < 1.26') + return + path = os.path.normpath(f'{__file__}/../../tests/test_barcode_out.pdf') + + url = 'http://artifex.com' + text_in = '012345678901' + text_out = '123456789012' + # Create empty document and add a qrcode image. + with pymupdf.Document() as document: + page = document.new_page() + + pixmap = pymupdf.mupdf.fz_new_barcode_pixmap( + pymupdf.mupdf.FZ_BARCODE_QRCODE, + url, + 512, + 4, # ec_level + 0, # quiet + 1, # hrt + ) + pixmap = pymupdf.Pixmap('raw', pixmap) + page.insert_image( + (0, 0, 100, 100), + pixmap=pixmap, + ) + pixmap = pymupdf.mupdf.fz_new_barcode_pixmap( + pymupdf.mupdf.FZ_BARCODE_EAN13, + text_in, + 512, + 4, # ec_level + 0, # quiet + 1, # hrt + ) + pixmap = pymupdf.Pixmap('raw', pixmap) + page.insert_image( + (0, 200, 100, 300), + pixmap=pixmap, + ) + + document.save(path) + + with pymupdf.open(path) as document: + page = document[0] + for i, ii in enumerate(page.get_images()): + xref = ii[0] + pixmap = pymupdf.Pixmap(document, xref) + hrt, barcode_type = pymupdf.mupdf.fz_decode_barcode_from_pixmap2( + pixmap.this, + 0, # rotate. + ) + print(f'{hrt=}') + if i == 0: + assert hrt == url + elif i == 1: + assert hrt == text_out + else: + assert 0 diff --git a/tests/test_clip_page.py b/tests/test_clip_page.py new file mode 100644 index 000000000..48e4ac597 --- /dev/null +++ b/tests/test_clip_page.py @@ -0,0 +1,37 @@ +""" +Test Page method clip_to_rect. +""" + +import os +import pymupdf + + +def test_clip(): + """ + Clip a Page to a rectangle and confirm that no text has survived + that is completely outside the rectangle.. + """ + scriptdir = os.path.dirname(os.path.abspath(__file__)) + rect = pymupdf.Rect(200, 200, 400, 500) + filename = os.path.join(scriptdir, "resources", "v110-changes.pdf") + doc = pymupdf.open(filename) + page = doc[0] + page.clip_to_rect(rect) # clip the page to the rectangle + # capture font warning message of MuPDF + assert pymupdf.TOOLS.mupdf_warnings() == "bogus font ascent/descent values (0 / 0)" + # extract all text characters and assert that each one + # has a non-empty intersection with the rectangle. + chars = [ + c + for b in page.get_text("rawdict")["blocks"] + for l in b["lines"] + for s in l["spans"] + for c in s["chars"] + ] + for char in chars: + bbox = pymupdf.Rect(char["bbox"]) + if bbox.is_empty: + continue + assert bbox.intersects( + rect + ), f"Character '{char['c']}' at {bbox} is outside of {rect}." diff --git a/tests/test_codespell.py b/tests/test_codespell.py index 32b2ca05e..5edcf61e1 100644 --- a/tests/test_codespell.py +++ b/tests/test_codespell.py @@ -12,6 +12,10 @@ def test_codespell(): ''' Check rebased Python code with codespell. ''' + if os.environ.get('PYODIDE_ROOT'): + print('test_codespell(): not running on Pyodide - cannot run child processes.') + return + if not hasattr(pymupdf, 'mupdf'): print('Not running codespell with classic implementation.') return @@ -27,27 +31,21 @@ def test_codespell(): # is difficult to exclude some text sections. skips = textwrap.dedent(''' *.pdf - changes.txt docs/_static/prism/prism.js docs/_static/prism/prism.js docs/locales/ja/LC_MESSAGES/changes.po docs/locales/ja/LC_MESSAGES/recipes-common-issues-and-their-solutions.po - docs/recipes-common-issues-and-their-solutions.rst - docs/recipes-text.rst - docs/samples/national-capitals.py - locales + docs/locales/ src_classic/* - tests - tests/test_story.py - tests/test_textbox.py - tests/test_textextract.py ''') skips = skips.strip().replace('\n', ',') command = textwrap.dedent(f''' cd {root} && codespell --skip {shlex.quote(skips)} - --ignore-words-list re-use,flate,thirdparty + --ignore-words-list re-use,flate,thirdparty,re-using + --ignore-regex 'https?://[a-z0-9/_.]+' + --ignore-multiline-regex 'codespell:ignore-begin.*codespell:ignore-end' ''') sys.path.append(root) diff --git a/tests/test_embeddedfiles.py b/tests/test_embeddedfiles.py index 95927cce2..f44a5acc9 100644 --- a/tests/test_embeddedfiles.py +++ b/tests/test_embeddedfiles.py @@ -21,4 +21,23 @@ def test_embedded1(): assert doc.embfile_info(0)["filename"] == "new-filename.txt" assert doc.embfile_get(0) == buffer doc.embfile_del(0) - assert doc.embfile_count() == 0 \ No newline at end of file + assert doc.embfile_count() == 0 + +def test_4050(): + with pymupdf.open() as document: + document.embfile_add('test', b'foobar', desc='some text') + d = document.embfile_info('test') + print(f'{d=}') + # Date is non-trivial to test for. + del d['creationDate'] + del d['modDate'] + assert d == { + 'name': 'test', + 'collection': 0, + 'filename': 'test', + 'ufilename': 'test', + 'description': 'some text', + 'size': 6, + 'length': 6, + } + diff --git a/tests/test_flake8.py b/tests/test_flake8.py index ddc55fece..8001cc77a 100644 --- a/tests/test_flake8.py +++ b/tests/test_flake8.py @@ -9,6 +9,10 @@ def test_flake8(): ''' Check rebased Python code with flake8. ''' + if os.environ.get('PYODIDE_ROOT'): + print('test_flake8(): not running on Pyodide - cannot run child processes.') + return + if not hasattr(pymupdf, 'mupdf'): print(f'Not running flake8 with classic implementation.') return diff --git a/tests/test_font.py b/tests/test_font.py index b48e05144..0aa31a8c4 100644 --- a/tests/test_font.py +++ b/tests/test_font.py @@ -1,8 +1,14 @@ """ Tests for the Font class. """ -import pymupdf import os +import platform +import pymupdf +import subprocess +import textwrap + +import util + def test_font1(): text = "PyMuPDF" @@ -54,9 +60,6 @@ def test_fontname(): assert detected def test_2608(): - if pymupdf.mupdf_version_tuple <= (1, 23, 4): - print( f'Not running test_2608 because mupdf too old: {pymupdf.mupdf_version_tuple=}') - return flags = (pymupdf.TEXT_DEHYPHENATE | pymupdf.TEXT_MEDIABOX_CLIP) with pymupdf.open(os.path.abspath(f'{__file__}/../../tests/resources/2201.00069.pdf')) as doc: page = doc[0] @@ -65,7 +68,12 @@ def test_2608(): with open(os.path.abspath(f'{__file__}/../../tests/test_2608_out'), 'wb') as f: f.write(text.encode('utf8')) path_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_2608_expected') - with open(path_expected, 'rb') as f: + path_expected_1_26 = os.path.normpath(f'{__file__}/../../tests/resources/test_2608_expected_1.26') + if pymupdf.mupdf_version_tuple >= (1, 27): + path_expected2 = path_expected + else: + path_expected2 = path_expected_1_26 + with open(path_expected2, 'rb') as f: expected = f.read().decode('utf8') # Github windows x32 seems to insert \r characters; maybe something to # do with the Python installation's line endings settings. @@ -75,6 +83,10 @@ def test_2608(): assert text == expected def test_fontarchive(): + if os.environ.get('PYODIDE_ROOT'): + print('test_fontarchive(): not running on Pyodide - we get ValueError: No font code \'notos\' found in pymupdf-fonts..') + return + import subprocess arch = pymupdf.Archive() css = pymupdf.css_for_pymupdf_font("notos", archive=arch, name="sans-serif") @@ -96,21 +108,18 @@ def test_load_system_font(): if not hasattr(pymupdf, 'mupdf'): print(f'test_load_system_font(): Not running on classic.') return - if pymupdf.mupdf_version_tuple < (1, 24): - print(f'test_load_system_font(): Not running because mupdf version < 1.24.') - return trace = list() def font_f(name, bold, italic, needs_exact_metrics): trace.append((name, bold, italic, needs_exact_metrics)) - print(f'test_load_system_font():font_f(): Looking for font: {name=} {bold=} {italic=} {needs_exact_metrics=}.') + #print(f'test_load_system_font():font_f(): Looking for font: {name=} {bold=} {italic=} {needs_exact_metrics=}.') return None def f_cjk(name, ordering, serif): trace.append((name, ordering, serif)) - print(f'test_load_system_font():f_cjk(): Looking for font: {name=} {ordering=} {serif=}.') + #print(f'test_load_system_font():f_cjk(): Looking for font: {name=} {ordering=} {serif=}.') return None def f_fallback(script, language, serif, bold, italic): trace.append((script, language, serif, bold, italic)) - print(f'test_load_system_font():f_fallback(): looking for font: {script=} {language=} {serif=} {bold=} {italic=}.') + #print(f'test_load_system_font():f_fallback(): looking for font: {script=} {language=} {serif=} {bold=} {italic=}.') return None pymupdf.mupdf.fz_install_load_system_font_funcs(font_f, f_cjk, f_fallback) f = pymupdf.mupdf.fz_load_system_font("some-font-name", 0, 0, 0) @@ -124,9 +133,6 @@ def test_mupdf_subset_fonts2(): if not hasattr(pymupdf, 'mupdf'): print('Not running on rebased.') return - if pymupdf.mupdf_version_tuple < (1, 24): - print('Not running with mupdf < 1.24.') - return path = os.path.abspath(f'{__file__}/../../tests/resources/2.pdf') with pymupdf.open(path) as doc: n = len(doc) @@ -137,25 +143,28 @@ def test_mupdf_subset_fonts2(): def test_3677(): pymupdf.TOOLS.set_subset_fontnames(True) - path = os.path.abspath(f'{__file__}/../../tests/resources/test_3677.pdf') - font_names_expected = [ - 'BCDEEE+Aptos', - 'BCDFEE+Aptos', - 'BCDGEE+Calibri-Light', - 'BCDHEE+Calibri-Light', - ] - font_names = list() - with pymupdf.open(path) as document: - for page in document: - for block in page.get_text('dict')['blocks']: - if block['type'] == 0: - if 'lines' in block.keys(): - for line in block['lines']: - for span in line['spans']: - font_name=span['font'] - print(font_name) - font_names.append(font_name) - assert font_names == font_names_expected, f'{font_names=}' + try: + path = os.path.abspath(f'{__file__}/../../tests/resources/test_3677.pdf') + font_names_expected = [ + 'BCDEEE+Aptos', + 'BCDFEE+Aptos', + 'BCDGEE+Calibri-Light', + 'BCDHEE+Calibri-Light', + ] + font_names = list() + with pymupdf.open(path) as document: + for page in document: + for block in page.get_text('dict')['blocks']: + if block['type'] == 0: + if 'lines' in block.keys(): + for line in block['lines']: + for span in line['spans']: + font_name=span['font'] + print(font_name) + font_names.append(font_name) + assert font_names == font_names_expected, f'{font_names=}' + finally: + pymupdf.TOOLS.set_subset_fontnames(False) def test_3933(): @@ -165,12 +174,12 @@ def test_3933(): print(f'{len(page.get_fonts())=}') expected = { - 'BCDEEE+Calibri': 36, + 'BCDEEE+Calibri': 39, 'BCDFEE+SwissReSan-Regu': 53, 'BCDGEE+SwissReSan-Ital': 20, 'BCDHEE+SwissReSan-Bold': 20, 'BCDIEE+SwissReSan-Regu': 53, - 'BCDJEE+Calibri': 36, + 'BCDJEE+Calibri': 39, } for xref, _, _, name, _, _ in page.get_fonts(): @@ -180,9 +189,152 @@ def test_3933(): font = pymupdf.Font(fontname=name, fontbuffer=content) supported_symbols = font.valid_codepoints() print(f'Font {name}: {len(supported_symbols)=}.', flush=1) - if 1 or pymupdf.mupdf_version_tuple < (1, 25): - assert len(supported_symbols) == 0 - else: - # We have a fix but as of 2024-10-17 it is not yet on MuPDF - # master. - assert len(supported_symbols) == expected.get(name) + assert len(supported_symbols) == expected.get(name) + + +def test_3780(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3780.pdf') + with pymupdf.open(path) as document: + for page_i, page in enumerate(document): + for itm in page.get_fonts(): + buff=document.extract_font(itm[0])[-1] + font=pymupdf.Font(fontbuffer=buff) + print(f'{page_i=}: xref {itm[0]} {font.name=} {font.ascender=} {font.descender=}.') + if page_i == 0: + d = page.get_text('dict') + #for n, v in d.items(): + # print(f' {n}: {v!r}') + for i, block in enumerate(d['blocks']): + print(f'block {i}:') + for j, line in enumerate(block['lines']): + print(f' line {j}:') + for k, span in enumerate(line['spans']): + print(f' span {k}:') + for n, v in span.items(): + print(f' {n}: {v!r}') + + +def test_3887(): + print(f'{pymupdf.version=}') + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3887.pdf') + + path2 = os.path.normpath(f'{__file__}/../../tests/resources/test_3887.pdf.ez.pdf') + with pymupdf.open(path) as document: + document.subset_fonts(fallback=False) + document.ez_save(path2) + + with pymupdf.open(path2) as document: + text = f"\u0391\u3001\u0392\u3001\u0393\u3001\u0394\u3001\u0395\u3001\u0396\u3001\u0397\u3001\u0398\u3001\u0399\u3001\u039a\u3001\u039b\u3001\u039c\u3001\u039d\u3001\u039e\u3001\u039f\u3001\u03a0\u3001\u03a1\u3001\u03a3\u3001\u03a4\u3001\u03a5\u3001\u03a6\u3001\u03a7\u3001\u03a8\u3001\u03a9\u3002\u03b1\u3001\u03b2\u3001\u03b3\u3001\u03b4\u3001\u03b5\u3001\u03b6\u3001\u03b7\u3001\u03b8\u3001\u03b9\u3001\u03ba\u3001\u03bb\u3001\u03bc\u3001\u03bd\u3001\u03be\u3001\u03bf\u3001\u03c0\u3001\u03c1\u3001\u03c2\u3001\u03c4\u3001\u03c5\u3001\u03c6\u3001\u03c7\u3001\u03c8\u3001\u03c9\u3002" + page = document[0] + chars = [c for b in page.get_text("rawdict",flags=0)["blocks"] for l in b["lines"] for s in l["spans"] for c in s["chars"]] + output = [c["c"] for c in chars] + print(f'text:\n {text}') + print(f'output:\n {output}') + pixmap = page.get_pixmap() + path_pixmap = f'{path}.0.png' + pixmap.save(path_pixmap) + print(f'Have saved to: {path_pixmap=}') + assert set(output)==set(text) + + +def test_4457(): + if os.environ.get('PYODIDE_ROOT'): + print('test_4457(): not running on Pyodide - cannot run child processes.') + return + + print() + files = ( + ('https://github.com/user-attachments/files/20862923/test_4457_a.pdf', 'test_4457_a.pdf', None, 4), + ('https://github.com/user-attachments/files/20862922/test_4457_b.pdf', 'test_4457_b.pdf', None, 9), + ) + for url, name, size, rms_old_after_max in files: + path = util.download(url, name, size) + + with pymupdf.open(path) as document: + page = document[0] + + pixmap = document[0].get_pixmap() + path_pixmap = f'{path}.png' + pixmap.save(path_pixmap) + print(f'Have created: {path_pixmap=}') + + text = page.get_text() + path_before = f'{path}.before.pdf' + path_after = f'{path}.after.pdf' + document.ez_save(path_before, garbage=4) + print(f'Have created {path_before=}') + + document.subset_fonts() + document.ez_save(path_after, garbage=4) + print(f'Have created {path_after=}') + + with pymupdf.open(path_before) as document: + text_before = document[0].get_text() + pixmap_before = document[0].get_pixmap() + path_pixmap_before = f'{path_before}.png' + pixmap_before.save(path_pixmap_before) + print(f'Have created: {path_pixmap_before=}') + + with pymupdf.open(path_after) as document: + text_after = document[0].get_text() + pixmap_after = document[0].get_pixmap() + path_pixmap_after = f'{path_after}.png' + pixmap_after.save(path_pixmap_after) + print(f'Have created: {path_pixmap_after=}') + + import gentle_compare + rms_before = gentle_compare.pixmaps_rms(pixmap, pixmap_before) + rms_after = gentle_compare.pixmaps_rms(pixmap, pixmap_after) + print(f'{rms_before=}') + print(f'{rms_after=}') + + # Create .png file showing differences between and . + path_pixmap_after_diff = f'{path_after}.diff.png' + pixmap_after_diff = gentle_compare.pixmaps_diff(pixmap, pixmap_after) + pixmap_after_diff.save(path_pixmap_after_diff) + print(f'Have created: {path_pixmap_after_diff}') + + # Extract text from , and and write to + # files so we can show differences with `diff`. + path_text = os.path.normpath(f'{__file__}/../../tests/test_4457.txt') + path_text_before = f'{path_text}.before.txt' + path_text_after = f'{path_text}.after.txt' + with open(path_text, 'w', encoding='utf8') as f: + f.write(text) + with open(path_text_before, 'w', encoding='utf8') as f: + f.write(text_before) + with open(path_text_after, 'w', encoding='utf8') as f: + f.write(text_after) + + # Can't write text to stdout on Windows because of encoding errors. + if platform.system() != 'Windows': + print(f'text:\n{textwrap.indent(text, " ")}') + print(f'text_before:\n{textwrap.indent(text_before, " ")}') + print(f'text_after:\n{textwrap.indent(text_after, " ")}') + print(f'{path_text=}') + print(f'{path_text_before=}') + print(f'{path_text_after=}') + + command = f'diff -u {path_text} {path_text_before}' + print(f'Running: {command}', flush=1) + subprocess.run(command, shell=1) + + command = f'diff -u {path_text} {path_text_after}' + print(f'Running: {command}', flush=1) + subprocess.run(command, shell=1) + + assert text_before == text + assert rms_before == 0 + + if pymupdf.mupdf_version_tuple >= (1, 26, 6): + assert rms_after == 0 + else: + # As of 2025-05-20 there are some differences in some characters, + # e.g. the non-ascii characters in `Philipp Krahenbuhl`. See + # and . + assert abs(rms_after - rms_old_after_max) < 2 + + # Avoid test failure caused by mupdf warnings. + wt = pymupdf.TOOLS.mupdf_warnings() + print(f'{wt=}') + assert wt == 'bogus font ascent/descent values (0 / 0)\n... repeated 5 times...' diff --git a/tests/test_general.py b/tests/test_general.py index 2ee844560..6db125d98 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -7,15 +7,19 @@ import io import os +import fnmatch +import json import pymupdf import pathlib import pickle import platform import re +import shutil import subprocess import sys import textwrap import time +import util import gentle_compare @@ -58,6 +62,11 @@ def test_iswrapped(): doc = pymupdf.open(filename) page = doc[0] assert page.is_wrapped + wt = pymupdf.TOOLS.mupdf_warnings() + if pymupdf.mupdf_version_tuple >= (1, 26, 0): + assert wt == 'bogus font ascent/descent values (0 / 0)' + else: + assert not wt def test_wrapcontents(): @@ -73,7 +82,10 @@ def test_wrapcontents(): rebased = hasattr(pymupdf, 'mupdf') if rebased: wt = pymupdf.TOOLS.mupdf_warnings() - assert wt == 'PDF stream Length incorrect' + if pymupdf.mupdf_version_tuple >= (1, 26, 0): + assert wt == 'bogus font ascent/descent values (0 / 0)\nPDF stream Length incorrect' + else: + assert wt == 'PDF stream Length incorrect' def test_page_clean_contents(): @@ -114,7 +126,7 @@ def test_config(): def test_glyphnames(): - name = "infinity" + name = "INFINITY" infinity = pymupdf.glyph_name_to_unicode(name) assert pymupdf.unicode_to_glyph_name(infinity) == name @@ -133,25 +145,27 @@ def test_pdfstring(): def test_open_exceptions(): - try: - doc = pymupdf.open(filename, filetype="xps") - except RuntimeError as e: - assert repr(e).startswith("FileDataError") + path = os.path.normpath(f'{__file__}/../../tests/resources/001003ED.pdf') + doc = pymupdf.open(path, filetype="xps") + assert 'PDF' in doc.metadata["format"] - try: - doc = pymupdf.open(filename, filetype="xxx") - except Exception as e: - assert repr(e).startswith("ValueError") + doc = pymupdf.open(path, filetype="xxx") + assert 'PDF' in doc.metadata["format"] try: - doc = pymupdf.open("x.y") + pymupdf.open("x.y") except Exception as e: assert repr(e).startswith("FileNotFoundError") + else: + assert 0 try: - doc = pymupdf.open("pdf", b"") + pymupdf.open(stream=b"", filetype="pdf") except RuntimeError as e: - assert repr(e).startswith("EmptyFileError") + assert repr(e).startswith("EmptyFileError"), f'{repr(e)=}' + else: + print(f'{doc.metadata["format"]=}') + assert 0 def test_bug1945(): @@ -232,6 +246,11 @@ def test_get_text_dict(): blocks=page.get_text("dict")["blocks"] # Check no opaque types in `blocks`. json.dumps( blocks, indent=4) + wt = pymupdf.TOOLS.mupdf_warnings() + if pymupdf.mupdf_version_tuple >= (1, 26, 0): + assert wt == 'bogus font ascent/descent values (0 / 0)' + else: + assert not wt def test_font(): font = pymupdf.Font() @@ -392,13 +411,17 @@ def test_2238(): rebased = hasattr(pymupdf, 'mupdf') if rebased: wt = pymupdf.TOOLS.mupdf_warnings() - assert wt == ( - 'format error: cannot recognize version marker\n' - 'trying to repair broken xref\n' - 'repairing PDF document' - ), f'{wt=}' - first_page = doc.load_page(0).get_text('text', pymupdf.INFINITE_RECT()) - last_page = doc.load_page(-1).get_text('text', pymupdf.INFINITE_RECT()) + wt_expected = '' + if pymupdf.mupdf_version_tuple >= (1, 26): + wt_expected += 'garbage bytes before version marker\n' + wt_expected += 'syntax error: expected \'obj\' keyword (6 0 ?)\n' + else: + wt_expected += 'format error: cannot recognize version marker\n' + wt_expected += 'trying to repair broken xref\n' + wt_expected += 'repairing PDF document' + assert wt == wt_expected, f'{wt=}' + first_page = doc.load_page(0).get_text('text', clip=pymupdf.INFINITE_RECT()) + last_page = doc.load_page(-1).get_text('text', clip=pymupdf.INFINITE_RECT()) print(f'first_page={first_page!r}') print(f'last_page={last_page!r}') @@ -415,6 +438,10 @@ def test_2238(): def test_2093(): + if platform.python_implementation() == 'GraalVM': + print(f'test_2093(): Not running because slow on GraalVM.') + return + doc = pymupdf.open(f'{scriptdir}/resources/test2093.pdf') def average_color(page): @@ -574,6 +601,9 @@ def test_2692(): def test_2596(): """Confirm correctly abandoning cache when reloading a page.""" + if platform.python_implementation() == 'GraalVM': + print(f'test_2596(): not running on Graal.') + return doc = pymupdf.Document(f"{scriptdir}/resources/test_2596.pdf") page = doc[0] pix0 = page.get_pixmap() # render the page @@ -586,7 +616,7 @@ def test_2596(): pix1 = page.get_pixmap() assert pix1.samples == pix0.samples rebased = hasattr(pymupdf, 'mupdf') - if rebased: + if pymupdf.mupdf_version_tuple < (1, 26, 6): wt = pymupdf.TOOLS.mupdf_warnings() assert wt == 'too many indirections (possible indirection cycle involving 24 0 R)' @@ -642,12 +672,8 @@ def show(l): # With mupdf later than 1.23.4, this special page contains no invalid # Unicodes. # - if pymupdf.mupdf_version_tuple > (1, 23, 4): - print(f'Checking no occurrence of 0xFFFD, {pymupdf.mupdf_version_tuple=}.') - assert chr(0xFFFD) not in set1 - else: - print(f'Checking occurrence of 0xFFFD, {pymupdf.mupdf_version_tuple=}.') - assert chr(0xFFFD) in set1 + print(f'Checking no occurrence of 0xFFFD, {pymupdf.mupdf_version_tuple=}.') + assert chr(0xFFFD) not in set1 def test_2553_2(): doc = pymupdf.open(f"{scriptdir}/resources/test_2553-2.pdf") @@ -655,11 +681,7 @@ def test_2553_2(): # extract plain text, ensure that there are no 0xFFFD characters text = page.get_text() - if pymupdf.mupdf_version_tuple >= (1, 23, 7): - assert chr(0xfffd) not in text - else: - # Bug not fixed in MuPDF. - assert chr(0xfffd) in text + assert chr(0xfffd) not in text def test_2635(): """Rendering a page before and after cleaning it should yield the same pixmap.""" @@ -719,15 +741,8 @@ def assert_rects_approx_eq(a, b): assert_rects_approx_eq(page.cropbox, pymupdf.Rect(30.0, 30.0, 565.3200073242188, 811.9199829101562)) assert_rects_approx_eq(page.mediabox, pymupdf.Rect(0.0, 0.0, 595.3200073242188, 841.9199829101562)) print(f'test_2710(): {pymupdf.mupdf_version_tuple=}') - if pymupdf.mupdf_version_tuple < (1, 23, 5): - print(f'test_2710(): Not Checking page.rect and rect.') - elif pymupdf.mupdf_version_tuple < (1, 24.0): - print(f'test_2710(): Checking page.rect and rect.') - assert_rects_approx_eq(page.rect, pymupdf.Rect(0.0, 0.0, 535.3200073242188, 781.9199829101562)) - assert_rects_approx_eq(rect, pymupdf.Rect(0.7872352600097656, 64.7560043334961, 124.85531616210938, 78.1622543334961)) - else: - # 2023-11-05: Currently broken in mupdf master. - print(f'test_2710(): Not Checking page.rect and rect.') + # 2023-11-05: Currently broken in mupdf master. + print(f'test_2710(): Not Checking page.rect and rect.') rebased = hasattr(pymupdf, 'mupdf') if rebased: wt = pymupdf.TOOLS.mupdf_warnings() @@ -770,6 +785,9 @@ def test_2736(): def test_subset_fonts(): + if os.environ.get('PYODIDE_ROOT'): + print('test_subset_fonts(): not running on Pyodide - ValueError: No font code \'ubuntu\' found in pymupdf-fonts.') + return """Confirm subset_fonts is working.""" if not hasattr(pymupdf, "mupdf"): print("Not testing 'test_subset_fonts' in classic.") @@ -888,14 +906,12 @@ def test_bboxlog_2885(): page=doc[0] bbl = page.get_bboxlog() - if pymupdf.mupdf_version_tuple >= (1, 24, 9): - wt = pymupdf.TOOLS.mupdf_warnings() - assert wt == 'invalid marked content and clip nesting' + wt = pymupdf.TOOLS.mupdf_warnings() + assert wt == 'invalid marked content and clip nesting' bbl = page.get_bboxlog(layers=True) - if pymupdf.mupdf_version_tuple >= (1, 24, 9): - wt = pymupdf.TOOLS.mupdf_warnings() - assert wt == 'invalid marked content and clip nesting' + wt = pymupdf.TOOLS.mupdf_warnings() + assert wt == 'invalid marked content and clip nesting' def test_3081(): ''' @@ -1013,6 +1029,10 @@ def next_fd(): os.remove(oldfile) def test_cli(): + if os.environ.get('PYODIDE_ROOT'): + print('test_cli(): not running on Pyodide - cannot run child processes.') + return + if not hasattr(pymupdf, 'mupdf'): print('test_cli(): Not running on classic because of fitz_old.') return @@ -1050,6 +1070,10 @@ def test_cli_out(): Check redirection of messages and log diagnostics with environment variables PYMUPDF_LOG and PYMUPDF_MESSAGE. ''' + if os.environ.get('PYODIDE_ROOT'): + print('test_cli_out(): not running on Pyodide - cannot run child processes.') + return + if not hasattr(pymupdf, 'mupdf'): print('test_cli(): Not running on classic because of fitz_old.') return @@ -1137,10 +1161,20 @@ def test_use_python_logging(): ''' Checks pymupdf.use_python_logging(). ''' + if os.environ.get('PYODIDE_ROOT'): + print('test_cli(): not running on Pyodide - cannot run child processes.') + return + log_prefix = None if os.environ.get('PYMUPDF_USE_EXTRA') == '0': log_prefix = f'.+Using non-default setting from PYMUPDF_USE_EXTRA: \'0\'' + if os.path.basename(__file__).startswith(f'test_fitz_'): + # Do nothing, because command `pymupdf` outputs diagnostics containing + # `pymupdf` which are not renamed to `fitz`, which breaks our checking. + print(f'Not testing with fitz alias.') + return + def check( code, regexes_stdout, @@ -1277,6 +1311,20 @@ def check( ], ) + print(f'## Check messages() with sys.stdout=None.') + check( + ''' + import sys + sys.stdout = None + import pymupdf + + pymupdf.message('this is pymupdf.message()') + pymupdf.log('this is pymupdf.log()') + ''', + [], + [], + ) + def relpath(path, start=None): ''' @@ -1297,10 +1345,6 @@ def test_open(): print('test_open(): not running on classic.') return - if pymupdf.mupdf_version_tuple < (1, 24): - print('test_open(): not running on mupdf < 1.24.') - return - import re import textwrap import traceback @@ -1335,7 +1379,7 @@ def check(filename=None, stream=None, filetype=None, exception=None): assert 0, \ f'Incorrect exception, expected {etype}, received {type(e)=}.' else: - assert 0, f'Did not received exception, expected {etype=}.' + assert 0, f'Did not received exception, expected {etype=}. {filename=} {stream=} {filetype=} {exception=}' else: document = pymupdf.open(filename=filename, stream=stream, filetype=filetype) return document @@ -1380,7 +1424,7 @@ def check(filename=None, stream=None, filetype=None, exception=None): re.escape(f'mupdf.{etype2}: code=7: cannot recognize zip archive'), re.escape(f'pymupdf.FileDataError: Failed to open file {path!r} as type {filetype!r}.'), ) - check(path, filetype=filetype, exception=(etype, eregex)) + check(path, filetype=filetype, exception=None) path = f'{resources}/chinese-tables.pickle' etype = pymupdf.FileDataError @@ -1398,6 +1442,159 @@ def check(filename=None, stream=None, filetype=None, exception=None): check(stream=b'', exception=(pymupdf.EmptyFileError, re.escape('Cannot open empty stream.'))) + +def test_open2(): + ''' + Checks behaviour of fz_open_document() and fz_open_document_with_stream() + with different filenames/magic values. + ''' + if os.environ.get('PYODIDE_ROOT'): + print('test_open2(): not running on Pyodide - cannot run child processes.') + return + + if platform.system() == 'Windows': + print(f'test_open2(): not running on Windows because `git ls-files` known fail on Github Windows runners.') + return + + root = os.path.normpath(f'{__file__}/../..') + root = relpath(root) + + # Find tests/resources/test_open2.* input files/streams. We calculate + # paths relative to the PyMuPDF checkout directory , to allow use + # of tests/resources/test_open2_expected.json regardless of the actual + # checkout directory. + print() + sys.path.append(root) + try: + import pipcl + finally: + del sys.path[0] + paths = pipcl.git_items(f'{root}/tests/resources') + paths = fnmatch.filter(paths, f'test_open2.*') + paths = [f'tests/resources/{i}' for i in paths] + + # Get list of extensions of input files. + extensions = set() + extensions.add('.txt') + extensions.add('') + for path in paths: + _, ext = os.path.splitext(path) + extensions.add(ext) + extensions = sorted(list(extensions)) + + def get_result(e, document): + ''' + Return fz_lookup_metadata(document, 'format') or [ERROR]. + ''' + if e: + return f'[error]' + else: + try: + return pymupdf.mupdf.fz_lookup_metadata2(document, 'format') + except Exception: + return '' + + def dict_set_path(dict_, *items): + for item in items[:-2]: + dict_ = dict_.setdefault(item, dict()) + dict_[items[-2]] = items[-1] + + results = dict() + + # Prevent warnings while we are running. + _g_out_message = pymupdf._g_out_message + pymupdf._g_out_message = None + try: + results = dict() + + for path in paths: + print(path) + for ext in extensions: + path2 = f'{root}/foo{ext}' + path3 = shutil.copy2(f'{root}/{path}', path2) + assert(path3 == path2) + + # Test fz_open_document(). + e = None + document = None + try: + document = pymupdf.mupdf.fz_open_document(path2) + except Exception as ee: + e = ee + wt = pymupdf.TOOLS.mupdf_warnings() + text = get_result(e, document) + print(f' fz_open_document({path2}) => {text}') + dict_set_path(results, path, ext, 'file', text) + + # Test fz_open_document_with_stream(). + e = None + document = None + with open(f'{root}/{path}', 'rb') as f: + data = f.read() + stream = pymupdf.mupdf.fz_open_memory(pymupdf.mupdf.python_buffer_data(data), len(data)) + try: + document = pymupdf.mupdf.fz_open_document_with_stream(ext, stream) + except Exception as ee: + e = ee + wt = pymupdf.TOOLS.mupdf_warnings() + text = get_result(e, document) + print(f' fz_open_document_with_stream(magic={ext!r}) => {text}') + dict_set_path(results, path, ext, 'stream', text) + + finally: + pymupdf._g_out_message = _g_out_message + + # Create html table. + path_html = os.path.normpath(f'{__file__}/../../tests/test_open2.html') + with open(path_html, 'w') as f: + f.write(f'\n') + f.write(f'\n') + f.write(f'

{time.strftime("%F-%T")}\n') + f.write(f'\n') + f.write(f'') + for ext in extensions: + f.write(f'') + f.write('\n') + for path in sorted(results.keys()): + _, ext = os.path.splitext(path) + f.write(f'') + for ext2 in sorted(results[path].keys()): + text_file = results[path][ext2]['file'] + text_stream = results[path][ext2]['stream'] + b1, b2 = ('', '') if ext2==ext else ('', '') + if text_file == text_stream: + if text_file == '[error]': + f.write(f'') + else: + f.write(f'') + else: + f.write(f'') + f.write('\n') + f.write(f'
Extension/magic') + f.write(f'
Data file{ext}
{os.path.basename(path)}
{b1}{text_file}{b2}
{b1}{text_file}{b2}file: {b1}{text_file}{b2}
') + f.write(f'stream: {b1}{text_stream}{b2}
\n') + f.write(f'/\n') + f.write(f'\n') + print(f'Have created: {path_html}') + + path_out = os.path.normpath(f'{__file__}/../../tests/test_open2.json') + with open(path_out, 'w') as f: + json.dump(results, f, indent=4, sort_keys=1) + + if pymupdf.mupdf_version_tuple >= (1, 26): + with open(os.path.normpath(f'{__file__}/../../tests/resources/test_open2_expected.json')) as f: + results_expected = json.load(f) + if results != results_expected: + print(f'results != results_expected:') + def show(r, name): + text = json.dumps(r, indent=4, sort_keys=1) + print(f'{name}:') + print(textwrap.indent(text, ' ')) + show(results_expected, 'results_expected') + show(results, 'results') + assert 0 + + def test_533(): if not hasattr(pymupdf, 'mupdf'): print('test_533(): Not running on classic.') @@ -1428,10 +1625,7 @@ def test_scientific_numbers(): page.insert_text(point, "Test") contents = page.read_contents() print(f'{contents=}') - if pymupdf.mupdf_version_tuple >= (1, 24, 2): - assert b" 1e-" not in contents - else: - assert b" 1e-" in contents + assert b" 1e-" not in contents def test_3615(): print('') @@ -1451,15 +1645,8 @@ def test_3654(): for page in document: content += page.get_text() + '\n\n' content = content.strip() - - # As of 2024-07-04 we get a warning for this input file. - wt = pymupdf.TOOLS.mupdf_warnings() - assert wt == 'dropping unclosed output' def test_3727(): - if pymupdf.mupdf_version_tuple < (1, 24, 9): - print('test_3727(): not running because known to segv: {pymupdf.mupdf_version=}') - return path = os.path.normpath(f'{__file__}/../../tests/resources/test_3727.pdf') doc = pymupdf.open(path) for page in doc: @@ -1471,30 +1658,56 @@ def test_3569(): page = document[0] svg = page.get_svg_image(text_as_path=False) print(f'{svg=}') - assert svg == ( - '\n' - '\n' - '\n' - '\n' - '\n' - '\n' - '\n' - '\n' - '\n' - '\n' - '\n' - '**L1-13\n' - '\n' - '\n' - '\n' - '\n' - '\n' - '\n' - '\n' - '\n' - '\n' - '\n' - ) + if pymupdf.mupdf_version_tuple >= (1, 27): + assert svg == ( + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '**L1-13\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + ) + else: + assert svg == ( + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '**L1-13\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + ) wt = pymupdf.TOOLS.mupdf_warnings() assert wt == 'unknown cid collection: PDFAUTOCAD-Indentity0\nnon-embedded font using identity encoding: ArialMT (mapping via )\ninvalid marked content and clip nesting' @@ -1505,6 +1718,9 @@ def test_3450(): # # On a mac-mini, PyMuPDF-1.24.8 takes 60s, PyMuPDF-1.24.9 takes 4s. # + if os.environ.get('PYMUPDF_RUNNING_ON_VALGRIND') == '1': + print(f'test_3450(): not running on valgrind because very slow.', flush=1) + return path = os.path.normpath(f'{__file__}/../../tests/resources/test_3450.pdf') pdf = pymupdf.open(path) page = pdf[0] @@ -1514,28 +1730,28 @@ def test_3450(): print(f'test_3450(): {t=}') def test_3859(): - if pymupdf.mupdf_version_tuple > (1, 24, 9): - print(f'{pymupdf.mupdf.PDF_NULL=}.') - print(f'{pymupdf.mupdf.PDF_TRUE=}.') - print(f'{pymupdf.mupdf.PDF_FALSE=}.') - for name in ('NULL', 'TRUE', 'FALSE'): - name2 = f'PDF_{name}' - v = getattr(pymupdf.mupdf, name2) - print(f'{name=} {name2=} {v=} {type(v)=}') - assert type(v)==pymupdf.mupdf.PdfObj, f'`v` is not a pymupdf.mupdf.PdfObj.' - else: - assert not hasattr(pymupdf.mupdf, 'PDF_TRUE') + print(f'{pymupdf.mupdf.PDF_NULL=}.') + print(f'{pymupdf.mupdf.PDF_TRUE=}.') + print(f'{pymupdf.mupdf.PDF_FALSE=}.') + for name in ('NULL', 'TRUE', 'FALSE'): + name2 = f'PDF_{name}' + v = getattr(pymupdf.mupdf, name2) + print(f'{name=} {name2=} {v=} {type(v)=}') + assert type(v)==pymupdf.mupdf.PdfObj, f'`v` is not a pymupdf.mupdf.PdfObj.' def test_3905(): data = b'A,B,C,D\r\n1,2,1,2\r\n2,2,1,2\r\n' try: - document = pymupdf.open(stream=data) + document = pymupdf.open(stream=data, filetype='pdf') except pymupdf.FileDataError as e: - pass + print(f'test_3905(): e: {e}') else: assert 0 wt = pymupdf.TOOLS.mupdf_warnings() - assert wt == 'format error: cannot recognize version marker\ntrying to repair broken xref\nrepairing PDF document' + if pymupdf.mupdf_version_tuple >= (1, 26): + assert wt == 'format error: cannot find version marker\ntrying to repair broken xref\nrepairing PDF document' + else: + assert wt == 'format error: cannot recognize version marker\ntrying to repair broken xref\nrepairing PDF document' def test_3624(): path = os.path.normpath(f'{__file__}/../../tests/resources/test_3624.pdf') @@ -1547,9 +1763,425 @@ def test_3624(): print(f'Saving to {path_png=}.') pixmap.save(path_png) rms = gentle_compare.pixmaps_rms(path_png_expected, path_png) - if pymupdf.mupdf_version_tuple < (1, 24, 10): - assert rms > 12 + print(f'{rms=}') + # We get small differences in sysinstall tests, where some thirdparty + # libraries can differ. + if rms > 1: + pixmap_diff = gentle_compare.pixmaps_diff(path_png_expected, path_png) + path_png_diff = os.path.normpath(f'{__file__}/../../tests/test_3624_diff.png') + pixmap_diff.save(path_png_diff) + assert 0, f'{rms=}' + + +def test_4043(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4043.pdf') + doc = pymupdf.open(path) + doc.fullcopy_page(1) + + +def test_4018(): + document = pymupdf.open() + for page in document.pages(-1, -1): + pass + +def test_4034(): + # tests/resources/test_4034.pdf is first two pages of input file in + # https://github.com/pymupdf/PyMuPDF/issues/4034. + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4034.pdf') + path_clean = os.path.normpath(f'{__file__}/../../tests/test_4034_out.pdf') + with pymupdf.open(path) as document: + pixmap1 = document[0].get_pixmap() + document.save(path_clean, clean=1) + with pymupdf.open(path_clean) as document: + page = document[0] + pixmap2 = document[0].get_pixmap() + rms = gentle_compare.pixmaps_rms(pixmap1, pixmap2) + print(f'test_4034(): Comparison of original/cleaned page 0 pixmaps: {rms=}.') + if pymupdf.mupdf_version_tuple < (1, 25, 2): + assert 30 < rms < 50 + else: + assert rms == 0 + +def test_4309(): + document = pymupdf.open() + page = document.new_page() + document.delete_page() + +def test_4263(): + if os.environ.get('PYODIDE_ROOT'): + print('test_4263(): not running on Pyodide - cannot run child processes.') + return + + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4263.pdf') + path_out = f'{path}.linerarized.pdf' + command = f'pymupdf clean -linear {path} {path_out}' + print(f'Running: {command}') + cp = subprocess.run(command, shell=1, check=0) + if pymupdf.mupdf_version_tuple < (1, 26): + assert cp.returncode == 0 + else: + # Support for linerarisation dropped in MuPDF-1.26. + assert cp.returncode + +def test_4224(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4224.pdf') + with pymupdf.open(path) as document: + for page in document.pages(): + pixmap = page.get_pixmap(dpi=150) + path_pixmap = f'{path}.{page.number}.png' + pixmap.save(path_pixmap) + print(f'Have created: {path_pixmap}') + if pymupdf.mupdf_version_tuple < (1, 25, 5): + wt = pymupdf.TOOLS.mupdf_warnings() + assert wt == 'format error: negative code in 1d faxd\npadding truncated image' + +def test_4319(): + # Have not seen this test reproduce issue #4319, but keeping it anyway. + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4319.pdf') + doc = pymupdf.open() + page = doc.new_page() + page.insert_text((10, 100), "some text") + doc.save(path) + doc.close() + doc = pymupdf.open(path) + page = doc[0] + pc = doc.page_count + doc.close() + os.remove(path) + print(f"removed {doc.name=}") + +def test_3886(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3886.pdf') + path_clean0 = os.path.normpath(f'{__file__}/../../tests/resources/test_3886_clean0.pdf') + path_clean1 = os.path.normpath(f'{__file__}/../../tests/resources/test_3886_clean1.pdf') + + with pymupdf.open(path) as document: + pixmap = document[0].get_pixmap() + document.save(path_clean0, clean=0) + + with pymupdf.open(path) as document: + document.save(path_clean1, clean=1) + + with pymupdf.open(path_clean0) as document: + pixmap_clean0 = document[0].get_pixmap() + + with pymupdf.open(path_clean1) as document: + pixmap_clean1 = document[0].get_pixmap() + + rms_0 = gentle_compare.pixmaps_rms(pixmap, pixmap_clean0) + rms_1 = gentle_compare.pixmaps_rms(pixmap, pixmap_clean1) + print(f'test_3886(): {rms_0=} {rms_1=}') + +def test_4415(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4415.pdf') + path_out = os.path.normpath(f'{__file__}/../../tests/resources/test_4415_out.png') + path_out_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_4415_out_expected.png') + with pymupdf.open(path) as document: + page = document[0] + rot = page.rotation + orig = pymupdf.Point(100, 100) # apparent insertion point + text = 'Text at Top-Left' + mrot = page.derotation_matrix # matrix annihilating page rotation + page.insert_text(orig * mrot, text, fontsize=60, rotate=rot) + pixmap = page.get_pixmap() + pixmap.save(path_out) + rms = gentle_compare.pixmaps_rms(path_out_expected, path_out) + assert rms == 0, f'{rms=}' + +def test_4466(): + path = os.path.normpath(f'{__file__}/../../tests/test_4466.pdf') + with pymupdf.Document(path) as document: + for page in document: + print(f'{page=}', flush=1) + pixmap = page.get_pixmap(clip=(0, 0, 10, 10)) + print(f'{pixmap.n=} {pixmap.size=} {pixmap.stride=} {pixmap.width=} {pixmap.height=} {pixmap.x=} {pixmap.y=}', flush=1) + pixmap.is_unicolor # Used to crash. + + +def test_4479(): + # This passes with pymupdf-1.24.14, fails with pymupdf==1.25.*, passes with + # pymupdf-1.26.0. + print() + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4479.pdf') + with pymupdf.open(path) as document: + + def show(items): + for item in items: + print(f' {repr(item)}') + + items = document.layer_ui_configs() + show(items) + assert items == [ + {'depth': 0, 'locked': 0, 'number': 0, 'on': 1, 'text': 'layer_0', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 1, 'on': 1, 'text': 'layer_1', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 2, 'on': 0, 'text': 'layer_2', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 3, 'on': 1, 'text': 'layer_3', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 4, 'on': 1, 'text': 'layer_4', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 5, 'on': 1, 'text': 'layer_5', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 6, 'on': 1, 'text': 'layer_6', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 7, 'on': 1, 'text': 'layer_7', 'type': 'checkbox'}, + ] + + document.set_layer_ui_config(0, pymupdf.PDF_OC_OFF) + items = document.layer_ui_configs() + show(items) + assert items == [ + {'depth': 0, 'locked': 0, 'number': 0, 'on': 0, 'text': 'layer_0', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 1, 'on': 1, 'text': 'layer_1', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 2, 'on': 0, 'text': 'layer_2', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 3, 'on': 1, 'text': 'layer_3', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 4, 'on': 1, 'text': 'layer_4', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 5, 'on': 1, 'text': 'layer_5', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 6, 'on': 1, 'text': 'layer_6', 'type': 'checkbox'}, + {'depth': 0, 'locked': 0, 'number': 7, 'on': 1, 'text': 'layer_7', 'type': 'checkbox'}, + ] + + +def test_4533(): + if os.environ.get('PYODIDE_ROOT'): + print('test_4533(): not running on Pyodide - cannot run child processes.') + return + + print() + path = util.download( + 'https://github.com/user-attachments/files/20497146/NineData_user_manual_V3.0.5.pdf', + 'test_4533.pdf', + size=16864501, + ) + # This bug is a segv so we run the test in a child process. + command = f'{sys.executable} -c "import pymupdf; document = pymupdf.open({path!r}); print(len(document))"' + print(f'Running: {command}') + cp = subprocess.run(command, shell=1, check=0) + e = cp.returncode + print(f'{e=}') + if pymupdf.mupdf_version_tuple >= (1, 26, 6): + assert e == 0 + else: + assert e != 0 + + +def test_4564(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4564.pdf') + print() + with pymupdf.open(path) as document: + for key in sorted(document.metadata.keys()): + value = document.metadata[key] + print(f'{key}: {value!r}') + if pymupdf.mupdf_version_tuple >= (1, 27): + assert document.metadata['producer'] == 'Adobe PSL 1.3e for Canon\x00' + else: + assert document.metadata['producer'] == 'Adobe PSL 1.3e for Canon\udcc0\udc80' + + +def test_4496(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4496.hwpx') + with pymupdf.open(path) as document: + print(document.page_count) + + +def test_gitinfo(): + # This doesn't really test very much, but can be useful to see the current + # values. + print('') + print(f'test_4496():') + print(f'{pymupdf.mupdf_location=}') + print(f'{pymupdf.mupdf_version=}') + print(f'{pymupdf.pymupdf_git_branch=}') + print(f'{pymupdf.pymupdf_git_sha=}') + print(f'{pymupdf.pymupdf_version=}') + print(f'{pymupdf.pymupdf_git_diff=}') + if pymupdf.pymupdf_git_diff: + print(f'pymupdf.pymupdf_git_diff:\n{textwrap.indent(pymupdf.pymupdf_git_diff, " ")}') + + +def test_4392(): + if os.environ.get('PYODIDE_ROOT'): + print('test_4392(): not running on Pyodide - cannot run child processes.') + return + + print() + path = os.path.normpath(f'{__file__}/../../tests/test_4392.py') + with open(path, 'w') as f: + f.write('import pymupdf\n') + + command = f'pytest {path}' + print(f'Running: {command}', flush=1) + e1 = subprocess.run(command, shell=1, check=0).returncode + print(f'{e1=}') + + command = f'pytest -Werror {path}' + print(f'Running: {command}', flush=1) + e2 = subprocess.run(command, shell=1, check=0).returncode + print(f'{e2=}') + + command = f'{sys.executable} -Werror -c "import pymupdf"' + print(f'Running: {command}', flush=1) + e3 = subprocess.run(command, shell=1, check=0).returncode + print(f'{e3=}') + + print(f'{e1=} {e2=} {e3=}') + + print(f'{pymupdf.swig_version=}') + print(f'{pymupdf.swig_version_tuple=}') + + assert e1 == 5 + if pymupdf.swig_version_tuple >= (4, 4): + assert e2 == 5 + assert e3 == 0 + else: + # We get SEGV's etc with older swig. + if platform.system() == 'Windows': + assert (e2, e3) == (0xc0000005, 0xc0000005) else: - # We get small differences in sysinstall tests, where some - # thirdparty libraries can differ. - assert rms < 1 + # On plain linux we get (139, 139). On manylinux we get (-11, + # -11). On MacOS we get (-11, -11). + assert (e2, e3) == (139, 139) or (e2, e3) == (-11, -11) + + +def test_4639(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4639.pdf') + with pymupdf.open(path) as document: + page = document[-1] + page.get_bboxlog(layers=True) + + +def test_4590(): + + # Create test PDF. + path = os.path.normpath(f'{__file__}/../../tests/test_4590.pdf') + with pymupdf.open() as document: + page = document.new_page() + + # Add some text + text = 'This PDF contains a file attachment annotation.' + page.insert_text((72, 72), text, fontsize=12) + + # Create a sample file. + path_sample = os.path.normpath(f'{__file__}/../../tests/test_4590_annotation_sample.txt') + with open(path_sample, 'w') as f: + f.write('This is a sample attachment file.') + + # Read file as bytes + with open(path_sample, 'rb') as f: + sample = f.read() + + # Define annotation position (rect or point) + annot_pos = pymupdf.Rect(72, 100, 92, 120) # PushPin icon rectangle + + # Add the file attachment annotation + page.add_file_annot( + point = annot_pos, + buffer_ = sample, + filename = 'sample.txt', + ufilename = 'sample.txt', + desc = 'A test attachment file.', + icon = 'PushPin', + ) + + # Save the PDF + document.save(path) + + # Check pymupdf.Document.scrub() works. + with pymupdf.open(path) as document: + document.scrub() + + +def test_4702(): + if os.environ.get('PYODIDE_ROOT'): + # util.download() uses subprocess. + print('test_4702(): not running on Pyodide - cannot run child processes.') + return + + path = util.download( + 'https://github.com/user-attachments/files/22403483/01995b6ca7837b52abaa24e38e8c076d.pdf', + 'test_4702.pdf', + ) + with pymupdf.open(path) as document: + for xref in range(1, document.xref_length()): + print(f'{xref=}') + try: + _ = document.xref_object(xref) + except Exception as e1: + print(f'{e1=}') + try: + document.update_object(xref, "<<>>") + except Exception as e2: + print(f'{e2=}') + raise + wt = pymupdf.TOOLS.mupdf_warnings() + assert wt == 'repairing PDF document' + + with pymupdf.open(path) as document: + for xref in range(1, document.xref_length()): + print(f'{xref=}') + _ = document.xref_object(xref) + wt = pymupdf.TOOLS.mupdf_warnings() + assert wt == 'repairing PDF document' + + +def test_4712(): + ''' + Crash with "corrupted double-linked list + ''' + if pymupdf.mupdf_version_tuple < (1, 26, 11): + print(f'test_4712m(): Not running because known to fail on mupdf < 1.26.11: {pymupdf.mupdf_version=}.') + return + path_a = os.path.normpath(f'{__file__}/../../tests/resources/test_4712_a.pdf') + path_b = os.path.normpath(f'{__file__}/../../tests/resources/test_4712_b.pdf') + doc1 = pymupdf.open(path_a) + for i in range(6): + doc1.load_page(i).get_pixmap() + doc2 = pymupdf.open(path_b) + for i in range(6): + doc2.load_page(i).get_pixmap() + + +def test_4712m(): + if pymupdf.mupdf_version_tuple < (1, 26, 11): + print(f'test_4712m(): Not running because known to fail on mupdf < 1.26.11: {pymupdf.mupdf_version=}.') + return + + path_a = os.path.normpath(f'{__file__}/../../tests/resources/test_4712_a.pdf') + path_b = os.path.normpath(f'{__file__}/../../tests/resources/test_4712_b.pdf') + + mupdf = pymupdf.mupdf + def get_pixmap(page): + displaylist = mupdf.fz_new_display_list_from_page(page) + rect = mupdf.fz_bound_display_list(displaylist) + irect = mupdf.fz_round_rect(rect) + pixmap = mupdf.fz_new_pixmap_with_bbox( + mupdf.FzColorspace(mupdf.FzColorspace.Fixed_RGB), + irect, + mupdf.FzSeparations(), + 0, # alpha + ) + mupdf.fz_clear_pixmap_with_value(pixmap, 0xFF) + matrix = mupdf.FzMatrix() + device = mupdf.fz_new_draw_device(matrix, pixmap) + mupdf.fz_run_display_list( + displaylist, + device, + mupdf.FzMatrix(), + mupdf.FzRect(mupdf.FzRect.Fixed_INFINITE), + mupdf.FzCookie(), + ) + mupdf.fz_close_device(device) + + def process_document(document): + for i in range(6): + print(f' {i=}', flush=1) + page = mupdf.fz_load_page(document, i) + get_pixmap(page) + + print(f'Processing {path_a=}', flush=1) + document_a = mupdf.fz_open_document(path_a) + process_document(document_a) + + print(f'Processing {path_b=}', flush=1) + document_b = mupdf.fz_open_document(path_b) + process_document(document_b) + + +def test_4746(): + archive = pymupdf.Archive('.') + archive.add(__file__, 'foo') diff --git a/tests/test_imagemasks.py b/tests/test_imagemasks.py new file mode 100644 index 000000000..f4881ab3e --- /dev/null +++ b/tests/test_imagemasks.py @@ -0,0 +1,31 @@ +""" +Confirm image mask detection in TextPage extractions. +""" + +import os + +import pymupdf + +scriptdir = os.path.abspath(os.path.dirname(__file__)) +filename1 = os.path.join(scriptdir, "resources", "img-regular.pdf") +filename2 = os.path.join(scriptdir, "resources", "img-transparent.pdf") + + +def test_imagemask1(): + doc = pymupdf.open(filename1) + page = doc[0] + blocks = page.get_text("dict")["blocks"] + img = blocks[0] + assert img["mask"] is None + img = page.get_image_info()[0] + assert img["has-mask"] is False + + +def test_imagemask2(): + doc = pymupdf.open(filename2) + page = doc[0] + blocks = page.get_text("dict")["blocks"] + img = blocks[0] + assert type(img["mask"]) is bytes + img = page.get_image_info()[0] + assert img["has-mask"] is True diff --git a/tests/test_import.py b/tests/test_import.py index a8a8192c1..abc60865a 100644 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -5,6 +5,10 @@ def test_import(): + if os.environ.get('PYODIDE_ROOT'): + print('test_import(): not running on Pyodide - cannot run child processes.') + return + root = os.path.abspath(f'{__file__}/../../') p = f'{root}/tests/resources_test_import.py' with open(p, 'w') as f: diff --git a/tests/test_insertpdf.py b/tests/test_insertpdf.py index e29aea47a..9689beb8c 100644 --- a/tests/test_insertpdf.py +++ b/tests/test_insertpdf.py @@ -10,6 +10,7 @@ import os import re import pymupdf +from pymupdf import mupdf scriptdir = os.path.abspath(os.path.dirname(__file__)) resources = os.path.join(scriptdir, "resources") @@ -54,7 +55,7 @@ def approx_compare( a, b, max_delta): if ret: print( f'Differ:\n a={a!r}\n b={b!r}') return ret - + def test_insert(): all_text_original = [] # text on input pages @@ -132,7 +133,7 @@ def _2861_2871_merge_pdf(content: bytes, coverpage: bytes): with pymupdf.Document(stream=content, filetype="pdf") as content_pdf: coverpage_pdf.insert_pdf(content_pdf) doc = coverpage_pdf.write() - return doc + return doc def test_2861(): path = os.path.abspath(f'{__file__}/../../tests/resources/test_2861.pdf') @@ -152,16 +153,16 @@ def test_2871(): def test_3789(): - + file_path = os.path.abspath(f'{__file__}/../../tests/resources/test_3789.pdf') result_path = os.path.abspath(f'{__file__}/../../tests/test_3789_out') pages_per_split = 5 - + # Clean pdf doc = pymupdf.open(file_path) tmp = io.BytesIO() tmp.write(doc.write(garbage=4, deflate=True)) - + source_doc = pymupdf.Document('pdf', tmp.getvalue()) tmp.close() @@ -186,3 +187,149 @@ def test_3789(): # If this is the last split file, exit the loop if to_page == -1: break + + +def test_widget_insert(): + """Confirm copy of form fields / widgets.""" + tar = pymupdf.open(os.path.join(resources, "merge-form1.pdf")) + pc0 = tar.page_count # for later assertion + src = pymupdf.open(os.path.join(resources, "interfield-calculation.pdf")) + pc1 = src.page_count # for later assertion + + tarpdf = pymupdf._as_pdf_document(tar) + tar_field_count = mupdf.pdf_array_len( + mupdf.pdf_dict_getp(mupdf.pdf_trailer(tarpdf), "Root/AcroForm/Fields") + ) + tar_co_count = mupdf.pdf_array_len( + mupdf.pdf_dict_getp(mupdf.pdf_trailer(tarpdf), "Root/AcroForm/CO") + ) + srcpdf = pymupdf._as_pdf_document(src) + src_field_count = mupdf.pdf_array_len( + mupdf.pdf_dict_getp(mupdf.pdf_trailer(srcpdf), "Root/AcroForm/Fields") + ) + src_co_count = mupdf.pdf_array_len( + mupdf.pdf_dict_getp(mupdf.pdf_trailer(srcpdf), "Root/AcroForm/CO") + ) + + tar.insert_pdf(src) + new_field_count = mupdf.pdf_array_len( + mupdf.pdf_dict_getp(mupdf.pdf_trailer(tarpdf), "Root/AcroForm/Fields") + ) + new_co_count = mupdf.pdf_array_len( + mupdf.pdf_dict_getp(mupdf.pdf_trailer(tarpdf), "Root/AcroForm/CO") + ) + assert tar.page_count == pc0 + pc1 + assert new_field_count == tar_field_count + src_field_count + assert new_co_count == tar_co_count + src_co_count + + +def names_and_kids(doc): + """Return a list of dictionaries with keys "name" and "kids". + + "name" is the name of a root field in "Root/AcroForm/Fields", and + "kids" is the count of its immediate children. + """ + rc = [] + pdf = pymupdf._as_pdf_document(doc) + fields = mupdf.pdf_dict_getl( + mupdf.pdf_trailer(pdf), + pymupdf.PDF_NAME("Root"), + pymupdf.PDF_NAME("AcroForm"), + pymupdf.PDF_NAME("Fields"), + ) + if not fields.pdf_is_array(): + return rc + root_count = fields.pdf_array_len() + if not root_count: + return rc + for i in range(root_count): + field = fields.pdf_array_get(i) + kids = field.pdf_dict_get(pymupdf.PDF_NAME("Kids")) + kid_count = kids.pdf_array_len() + T = field.pdf_dict_get_text_string(pymupdf.PDF_NAME("T")) + field_dict = {"name": T, "kids": kid_count} + rc.append(field_dict) + return rc + + +def test_merge_checks1(): + """Merge Form PDFs making any duplicate names unique.""" + merge_file1 = os.path.join(resources, "merge-form1.pdf") + merge_file2 = os.path.join(resources, "merge-form2.pdf") + tar = pymupdf.open(merge_file1) + rc0 = names_and_kids(tar) + src = pymupdf.open(merge_file2) + rc1 = names_and_kids(src) + tar.insert_pdf(src, join_duplicates=False) + rc2 = names_and_kids(tar) + assert len(rc2) == len(rc0) + len(rc1) + + +def test_merge_checks2(): + # Join / merge Form PDFs joining any duplicate names in the src PDF. + merge_file1 = os.path.join(resources, "merge-form1.pdf") + merge_file2 = os.path.join(resources, "merge-form2.pdf") + tar = pymupdf.open(merge_file1) + rc0 = names_and_kids(tar) # list of root names and kid counts + names0 = [itm["name"] for itm in rc0] # root names in target + kids0 = sum([itm["kids"] for itm in rc0]) # number of kids in target + + src = pymupdf.open(merge_file2) + rc1 = names_and_kids(src) # list of root namesand kids in source PDF + dup_count = 0 # counts duplicate names in source PDF + dup_kids = 0 # counts the expected kids after merge + + for itm in rc1: # walk root fields of source pdf + if itm["name"] not in names0: # not a duplicate name + continue + # if target field has kids, add their count, else add 1 + dup_kids0 = sum([i["kids"] for i in rc0 if i["name"] == itm["name"]]) + dup_kids += dup_kids0 if dup_kids0 else 1 + # if source field has kids add their count, else add 1 + dup_kids += itm["kids"] if itm["kids"] else 1 + + names1 = [itm["name"] for itm in rc1] # names in source + + tar.insert_pdf(src, join_duplicates=True) # join merging any duplicate names + + rc2 = names_and_kids(tar) # get names and kid counts in resulting PDF + names2 = [itm["name"] for itm in rc2] # resulting names in target + kids2 = sum([itm["kids"] for itm in rc2]) # total resulting kid count + + assert len(set(names0 + names1)) == len(names2) + assert kids2 == dup_kids + + +test_4412_path = os.path.normpath(f'{__file__}/../../tests/resources/test_4412.pdf') + +def test_4412(): + # This tests whether a page from a PDF containing widgets found in the wild + # can be inserted into a new document with default options (widget=True) + # and widget=False. + print() + for widget in True, False: + print(f'{widget=}', flush=1) + with pymupdf.open(test_4412_path) as doc, pymupdf.open() as new_doc: + buf = io.BytesIO() + new_doc.insert_pdf(doc, from_page=1, to_page=1) + new_doc.save(buf) + assert len(new_doc)==1 + + +def test_4571(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4571.pdf') + path_out = os.path.normpath(f'{__file__}/../../tests/resources/test_4571_out.pdf') + with pymupdf.open() as newdocument: + with pymupdf.open(path) as document: + newdocument.insert_pdf(document) + newdocument.save(path_out, garbage=4, clean=False) + print(f'Have saved to: {path_out=}') + with open(path_out, 'rb') as f: + content = f.read() + if pymupdf.mupdf_version_tuple >= (1, 26, 6): + # Correct. + assert b'<>' in content + else: + # Incorrect. + assert b'<>' in content + diff --git a/tests/test_memory.py b/tests/test_memory.py new file mode 100644 index 000000000..cfaccbd92 --- /dev/null +++ b/tests/test_memory.py @@ -0,0 +1,240 @@ +import pymupdf + +import gc +import os +import platform +import sys + + +def merge_pdf(content: bytes, coverpage: bytes): + with pymupdf.Document(stream=coverpage, filetype='pdf') as coverpage_pdf: + with pymupdf.Document(stream=content, filetype='pdf') as content_pdf: + coverpage_pdf.insert_pdf(content_pdf) + doc = coverpage_pdf.write() + return doc + +def test_2791(): + ''' + Check for memory leaks. + ''' + if os.environ.get('PYODIDE_ROOT'): + print('test_2791(): not running on Pyodide - No module named \'psutil\'.') + return + + if os.environ.get('PYMUPDF_RUNNING_ON_VALGRIND') == '1': + print(f'test_2791(): not running because PYMUPDF_RUNNING_ON_VALGRIND=1.') + return + if platform.system().startswith('MSYS_NT-'): + print(f'test_2791(): not running on msys2 - psutil not available.') + return + #stat_type = 'tracemalloc' + stat_type = 'psutil' + if stat_type == 'tracemalloc': + import tracemalloc + tracemalloc.start(10) + def get_stat(): + current, peak = tracemalloc.get_traced_memory() + return current + elif stat_type == 'psutil': + # We use RSS, as used by mprof. + import psutil + process = psutil.Process() + def get_stat(): + return process.memory_info().rss + else: + def get_stat(): + return 0 + n = 1000 + verbose = False + if platform.python_implementation() == 'GraalVM': + n = 10 + verbose = True + stats = [1] * n + for i in range(n): + if verbose: + print(f'{i+1}/{n}.', flush=1) + root = os.path.abspath(f'{__file__}/../../tests/resources') + with open(f'{root}/test_2791_content.pdf', 'rb') as content_pdf: + with open(f'{root}/test_2791_coverpage.pdf', 'rb') as coverpage_pdf: + content = content_pdf.read() + coverpage = coverpage_pdf.read() + merge_pdf(content, coverpage) + sys.stdout.flush() + + gc.collect() + stats[i] = get_stat() + + print(f'Memory usage {stat_type=}.') + for i, stat in enumerate(stats): + sys.stdout.write(f' {stat}') + #print(f' {i}: {stat}') + sys.stdout.write('\n') + first = stats[2] + last = stats[-1] + ratio = last / first + print(f'{first=} {last=} {ratio=}') + + if platform.system() != 'Linux': + # Values from psutil indicate larger memory leaks on non-Linux. Don't + # yet know whether this is because rss is measured differently or a + # genuine leak is being exposed. + print(f'test_2791(): not asserting ratio because not running on Linux.') + elif not hasattr(pymupdf, 'mupdf'): + # Classic implementation has unfixed leaks. + print(f'test_2791(): not asserting ratio because using classic implementation.') + elif [int(x) for x in platform.python_version_tuple()[:2]] < [3, 11]: + print(f'test_2791(): not asserting ratio because python version less than 3.11: {platform.python_version()=}.') + elif stat_type == 'tracemalloc': + # With tracemalloc Before fix to src/extra.i's calls to + # PyObject_CallMethodObjArgs, ratio was 4.26; after it was 1.40. + assert ratio > 1 and ratio < 1.6 + elif stat_type == 'psutil': + # Prior to fix, ratio was 1.043. After the fix, improved to 1.005, but + # varies and sometimes as high as 1.010. + # 2024-06-03: have seen 0.99919 on musl linux, and sebras reports .025. + assert ratio >= 0.990 and ratio < 1.027, f'{ratio=}' + else: + pass + + +def test_4090(): + if os.environ.get('PYODIDE_ROOT'): + print('test_4090(): not running on Pyodide - No module named \'psutil\'.') + return + + print(f'test_4090(): {os.environ.get("PYTHONMALLOC")=}.') + import psutil + process = psutil.Process() + rsss = list() + def rss(): + ret = process.memory_info().rss + rsss.append(ret) + return ret + + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4090.pdf') + for i in range(100): + d = dict() + d[i] = dict() + with pymupdf.open(path) as document: + for j, page in enumerate(document): + d[i][j] = page.get_text('rawdict') + print(f'test_4090(): {i}: {rss()=}') + print(f'test_4090(): {rss()=}') + gc.collect() + print(f'test_4090(): {rss()=}') + r1 = rsss[2] + r2 = rsss[-1] + r = r2 / r1 + if platform.system() == 'Windows': + assert 0.93 <= r < 1.05, f'{r1=} {r2=} {r=}.' + else: + assert 0.95 <= r < 1.05, f'{r1=} {r2=} {r=}.' + + +def show_tracemalloc_diff(snapshot1, snapshot2): + top_stats = snapshot2.compare_to(snapshot1, 'lineno') + n = 0 + mem = 0 + for i in top_stats: + n += i.count + mem += i.size + print(f'{n=}') + print(f'{mem=}') + print("Top 10:") + for stat in top_stats[:10]: + print(f' {stat}') + snapshot_diff = snapshot2.compare_to(snapshot1, key_type='lineno') + print(f'snapshot_diff:') + count_diff = 0 + size_diff = 0 + for i, s in enumerate(snapshot_diff): + print(f' {i}: {s.count=} {s.count_diff=} {s.size=} {s.size_diff=} {s.traceback=}') + count_diff += s.count_diff + size_diff += s.size_diff + print(f'{count_diff=} {size_diff=}') + + + +def test_4125(): + if os.environ.get('PYODIDE_ROOT'): + print('test_4125(): not running on Pyodide - No module named \'psutil\'.') + return + + if os.environ.get('PYMUPDF_RUNNING_ON_VALGRIND') == '1': + print(f'test_4125(): not running because PYMUPDF_RUNNING_ON_VALGRIND=1.') + return + if platform.system().startswith('MSYS_NT-'): + print(f'test_4125(): not running on msys2 - psutil not available.') + return + + print('') + print(f'test_4125(): {platform.python_version()=}.') + + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4125.pdf') + import gc + import psutil + + root = os.path.normpath(f'{__file__}/../..') + sys.path.insert(0, root) + try: + import pipcl + finally: + del sys.path[0] + + process = psutil.Process() + + class State: pass + state = State() + state.rsss = list() + state.prev = None + + def get_stat(): + rss = process.memory_info().rss + if not state.rsss: + state.prev = rss + state.rsss.append(rss) + drss = rss - state.prev + state.prev = rss + print(f'test_4125():' + f' {rss=:,}' + f' rss-rss0={rss-state.rsss[0]:,}' + f' drss={drss:,}' + f'.' + ) + + for i in range(10): + with pymupdf.open(path) as document: + for page in document: + for image_info in page.get_images(full=True): + xref, smask, width, height, bpc, colorspace, alt_colorspace, name, filter_, referencer = image_info + pixmap = pymupdf.Pixmap(document, xref) + if pixmap.colorspace != pymupdf.csRGB: + pixmap2 = pymupdf.Pixmap(pymupdf.csRGB, pixmap) + del pixmap2 + del pixmap + pymupdf.TOOLS.store_shrink(100) + pymupdf.TOOLS.glyph_cache_empty() + gc.collect() + get_stat() + + if platform.system() == 'Linux': + rss_delta = state.rsss[-1] - state.rsss[3] + print(f'{rss_delta=}') + pv = platform.python_version_tuple() + pv = (int(pv[0]), int(pv[1])) + if pv < (3, 11): + # Python < 3.11 has less reliable memory usage so we exclude. + print(f'test_4125(): Not checking on {platform.python_version()=} because < 3.11.') + elif pymupdf.mupdf_version_tuple < (1, 25, 2): + rss_delta_expected = 4915200 * (len(state.rsss) - 3) + assert abs(1 - rss_delta / rss_delta_expected) < 0.15, f'{rss_delta_expected=}' + else: + # Before the fix, each iteration would leak 4.9MB. + rss_delta_max = 100*1000 * (len(state.rsss) - 3) + assert rss_delta < rss_delta_max + else: + # Unfortunately on non-Linux Github test machines the RSS values seem + # to vary a lot, which causes spurious test failures. So for at least + # we don't actually check. + # + print(f'Not checking results because non-Linux behaviour is too variable.') diff --git a/tests/test_mupdf_regressions.py b/tests/test_mupdf_regressions.py index 9f1954a6f..8816260f7 100644 --- a/tests/test_mupdf_regressions.py +++ b/tests/test_mupdf_regressions.py @@ -1,6 +1,6 @@ import pymupdf import os -from gentle_compare import gentle_compare +import gentle_compare scriptdir = os.path.abspath(os.path.dirname(__file__)) @@ -13,7 +13,7 @@ def test_707448(): words0 = page.get_text("words") page.clean_contents(sanitize=True) words1 = page.get_text("words") - assert gentle_compare(words0, words1) + assert gentle_compare.gentle_compare(words0, words1) def test_707673(): @@ -30,11 +30,8 @@ def test_707673(): words0 = page.get_text("words") page.clean_contents(sanitize=True) words1 = page.get_text("words") - ok = gentle_compare(words0, words1) - if pymupdf.mupdf_version_tuple >= (1, 24, 1): - assert ok - else: - assert not ok + ok = gentle_compare.gentle_compare(words0, words1) + assert ok def test_707727(): @@ -49,16 +46,15 @@ def test_707727(): page.clean_contents(sanitize=True) page = doc.reload_page(page) # required to prevent re-use pix1 = page.get_pixmap() - ok = pix0.samples == pix1.samples - if pymupdf.mupdf_version_tuple > (1, 24, 1): - assert ok + rms = gentle_compare.pixmaps_rms(pix0, pix1) + print(f'{rms=}', flush=1) + pix0.save(os.path.normpath(f'{__file__}/../../tests/test_707727_pix0.png')) + pix1.save(os.path.normpath(f'{__file__}/../../tests/test_707727_pix1.png')) + if pymupdf.mupdf_version_tuple >= (1, 25, 2): + # New sanitising gives small fp rounding errors. + assert rms < 0.05 else: - assert not ok - if pymupdf.mupdf_version_tuple <= (1, 24, 1): - # We expect warnings. - wt = pymupdf.TOOLS.mupdf_warnings() - print(f"{wt=}") - assert wt + assert rms == 0 def test_707721(): @@ -66,11 +62,6 @@ def test_707721(): PyMuPDF issue https://github.com/pymupdf/PyMuPDF/issues/3357 MuPDF issue: https://bugs.ghostscript.com/show_bug.cgi?id=707721 """ - if pymupdf.mupdf_version_tuple < (1, 24, 2): - print( - "test_707721(): not running because MuPDF-{pymupdf.mupdf_version} known to hang." - ) - return filename = os.path.join(scriptdir, "resources", "test_3357.pdf") doc = pymupdf.open(filename) page = doc[0] @@ -103,8 +94,5 @@ def test_3376(): words1 = page.get_text("words", sort=True) - ok = gentle_compare(words0_e, words1) - if pymupdf.mupdf_version_tuple >= (1, 24, 2): - assert ok - else: - assert not ok + ok = gentle_compare.gentle_compare(words0_e, words1) + assert ok diff --git a/tests/test_pagedelete.py b/tests/test_pagedelete.py index 73593fa29..65f42e4b6 100644 --- a/tests/test_pagedelete.py +++ b/tests/test_pagedelete.py @@ -91,3 +91,25 @@ def test_3150(): doc = pymupdf.open(filename) doc.select(pages) assert doc.page_count == len(pages) + + +def test_4462(): + path0 = os.path.normpath(f'{__file__}/../../tests/resources/test_4462_0.pdf') + path1 = os.path.normpath(f'{__file__}/../../tests/resources/test_4462_1.pdf') + path2 = os.path.normpath(f'{__file__}/../../tests/resources/test_4462_2.pdf') + with pymupdf.open() as document: + document.new_page() + document.new_page() + document.new_page() + document.new_page() + document.save(path0) + with pymupdf.open(path0) as document: + assert len(document) == 4 + document.delete_page(-1) + document.save(path1) + with pymupdf.open(path1) as document: + assert len(document) == 3 + document.delete_pages(-1) + document.save(path2) + with pymupdf.open(path2) as document: + assert len(document) == 2 diff --git a/tests/test_pixmap.py b/tests/test_pixmap.py index 56866b364..602658ac2 100644 --- a/tests/test_pixmap.py +++ b/tests/test_pixmap.py @@ -6,13 +6,17 @@ """ import pymupdf +import gentle_compare import os import platform +import subprocess import sys import tempfile import pytest import textwrap +import time + scriptdir = os.path.abspath(os.path.dirname(__file__)) epub = os.path.join(scriptdir, "resources", "Bezier.epub") @@ -66,7 +70,7 @@ def test_pilsave(): pix2 = pymupdf.Pixmap(stream) assert repr(pix1) == repr(pix2) except ModuleNotFoundError: - assert platform.system() == 'Windows' and sys.maxsize == 2**31 - 1 + assert platform.system() in ('Windows', 'Emscripten') and sys.maxsize == 2**31 - 1 def test_save(tmpdir): @@ -163,13 +167,16 @@ def test_3050(): This is known to fail if MuPDF is built without it's default third-party libraries, e.g. in Linux system installs. ''' - pdf_file = pymupdf.open(pdf) - for page_no, page in enumerate(pdf_file): + path = os.path.normpath(f'{__file__}/../../tests/resources/001003ED.pdf') + with pymupdf.open(path) as pdf_file: + page_no = 0 + page = pdf_file[page_no] zoom_x = 4.0 zoom_y = 4.0 matrix = pymupdf.Matrix(zoom_x, zoom_y) pix = page.get_pixmap(matrix=matrix) - digest0 = pix.digest + path_out = os.path.normpath(f'{__file__}/../../tests/test_3050_out.png') + pix.save(path_out) print(f'{pix.width=} {pix.height=}') def product(x, y): for yy in y: @@ -182,15 +189,20 @@ def product(x, y): if sum(pix.pixel(pos[0], pos[1])) >= 600: n += 1 pix.set_pixel(pos[0], pos[1], (255, 255, 255)) - digest1 = pix.digest - print(f'{page_no=} {n=} {digest0=} {digest1=}') - digest_expected = b'\xd7x\x94_\x98\xa1<-/\xf3\xf9\x04\xec#\xaa\xee' - pix.save(os.path.abspath(f'{__file__}/../../tests/test_3050_out.png')) - assert digest1 != digest0 - assert digest1 == digest_expected - rebased = hasattr(pymupdf, 'mupdf') - if rebased: - wt = pymupdf.TOOLS.mupdf_warnings() + path_out2 = os.path.normpath(f'{__file__}/../../tests/test_3050_out2.png') + pix.save(path_out2) + path_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_3050_expected.png') + rms = gentle_compare.pixmaps_rms(path_expected, path_out2) + print(f'{rms=}') + if pymupdf.mupdf_version_tuple < (1, 26): + # Slight differences in rendering from fix for mupdf bug 708274. + assert rms < 0.2 + else: + assert rms == 0 + wt = pymupdf.TOOLS.mupdf_warnings() + if pymupdf.mupdf_version_tuple >= (1, 26, 0): + assert wt == 'bogus font ascent/descent values (0 / 0)\nPDF stream Length incorrect' + else: assert wt == 'PDF stream Length incorrect' def test_3058(): @@ -214,10 +226,6 @@ def test_3058(): assert 1800000 < s < 2600000, f'Unexpected size of {path}: {s}' def test_3072(): - if pymupdf.mupdf_version_tuple < (1, 23, 10): - print(f'test_3072(): Not running because known to hang on MuPDF < 1.23.10.') - return - path = os.path.abspath(f'{__file__}/../../tests/resources/test_3072.pdf') out = os.path.abspath(f'{__file__}/../../tests') @@ -358,8 +366,287 @@ def do(gi): out1 = do(1) out2 = do(2) print(f'{len(out0)=} {len(out1)=} {len(out2)=}.') - if pymupdf.mupdf_version_tuple >= (1, 24, 3): - assert out1 == out0 - else: - assert out1 != out0 + assert out1 == out0 assert out2 == out0 + + +def test_3848(): + if os.environ.get('PYMUPDF_RUNNING_ON_VALGRIND') == '1': + # Takes 40m on Github. + print(f'test_3848(): not running on valgrind because very slow.', flush=1) + return + if platform.python_implementation() == 'GraalVM': + print(f'test_3848(): Not running because slow on GraalVM.') + return + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3848.pdf') + with pymupdf.open(path) as document: + for i in range(len(document)): + page = document.load_page(i) + print(f'{page=}.') + for annot in page.get_drawings(): + if page.get_textbox(annot['rect']): + rect = annot['rect'] + pixmap = page.get_pixmap(clip=rect) + color_bytes = pixmap.color_topusage() + + +def test_3994(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3994.pdf') + with pymupdf.open(path) as document: + page = document[0] + txt_blocks = [blk for blk in page.get_text('dict')['blocks'] if blk['type']==0] + for blk in txt_blocks: + pix = page.get_pixmap(clip=pymupdf.Rect([int(v) for v in blk['bbox']]), colorspace=pymupdf.csRGB, alpha=False) + percent, color = pix.color_topusage() + wt = pymupdf.TOOLS.mupdf_warnings() + assert wt == 'premature end of data in flate filter\n... repeated 2 times...' + + +def test_3448(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3448.pdf') + with pymupdf.open(path) as document: + page = document[0] + pixmap = page.get_pixmap(alpha=False, dpi=150) + path_out = f'{path}.png' + pixmap.save(path_out) + print(f'Have written to: {path_out}') + path_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_3448.pdf-expected.png') + pixmap_expected = pymupdf.Pixmap(path_expected) + rms = gentle_compare.pixmaps_rms(pixmap, pixmap_expected) + diff = gentle_compare.pixmaps_diff(pixmap_expected, pixmap) + path_diff = os.path.normpath(f'{__file__}/../../tests/test_3448-diff.png') + diff.save(path_diff) + print(f'{rms=}') + if pymupdf.mupdf_version_tuple < (1, 25, 5): + # Prior to fix for mupdf bug 708274. + assert 1 < rms < 2 + else: + assert rms == 0 + + +def test_3854(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3854.pdf') + with pymupdf.open(path) as document: + page = document[0] + pixmap = page.get_pixmap() + pixmap.save(os.path.normpath(f'{__file__}/../../tests/test_3854_out.png')) + + # 2024-11-29: this is the incorrect expected output. + path_expected_png = os.path.normpath(f'{__file__}/../../tests/resources/test_3854_expected.png') + pixmap_expected = pymupdf.Pixmap(path_expected_png) + pixmap_diff = gentle_compare.pixmaps_diff(pixmap_expected, pixmap) + path_diff = os.path.normpath(f'{__file__}/../../tests/resources/test_3854_diff.png') + pixmap_diff.save(path_diff) + rms = gentle_compare.pixmaps_rms(pixmap, pixmap_expected) + print(f'{rms=}.') + if os.environ.get('PYMUPDF_SYSINSTALL_TEST') == '1': + # MuPDF using external third-party libs gives slightly different + # behaviour. + assert rms < 2 + elif pymupdf.mupdf_version_tuple < (1, 25, 5): + # # Prior to fix for mupdf bug 708274. + assert 0.5 < rms < 2 + else: + assert rms == 0 + + +def test_4155(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3854.pdf') + with pymupdf.open(path) as document: + page = document[0] + pixmap = page.get_pixmap() + mv = pixmap.samples_mv + mvb1 = mv.tobytes() + del page + del pixmap + try: + mvb2 = mv.tobytes() + except ValueError as e: + print(f'Received exception: {e}') + assert 'operation forbidden on released memoryview object' in str(e) + else: + assert 0, f'Did not receive expected exception when using defunct memoryview.' + + +def test_4336(): + if 0: + # Compare with last classic release. + import pickle + path_out = os.path.normpath(f'{__file__}/../../tests/resources/test_4336_cc') + code = textwrap.dedent(f''' + import fitz + import os + import time + import pickle + + path = os.path.normpath(f'{__file__}/../../tests/resources/nur-ruhig.jpg') + pixmap = fitz.Pixmap(path) + t = time.time() + for i in range(10): + cc = pixmap.color_count() + t = time.time() - t + print(f'test_4336(): {{t=}}') + with open({path_out!r}, 'wb') as f: + pickle.dump(cc, f) + ''') + path_code = os.path.normpath(f'{__file__}/../../tests/resources/test_4336.py') + with open(path_code, 'w') as f: + f.write(code) + venv = os.path.normpath(f'{__file__}/../../tests/resources/test_4336_venv') + command = f'{sys.executable} -m venv {venv}' + command += f' && . {venv}/bin/activate' + command += f' && pip install --force-reinstall pymupdf==1.23.8' + command += f' && python {path_code}' + print(f'Running: {command}', flush=1) + subprocess.run(command, shell=1, check=1) + with open(path_out, 'rb') as f: + cc_old = pickle.load(f) + else: + cc_old = None + path = os.path.normpath(f'{__file__}/../../tests/resources/nur-ruhig.jpg') + pixmap = pymupdf.Pixmap(path) + t = time.time() + for i in range(10): + cc = pixmap.color_count() + t = time.time() - t + print(f'test_4336(): {t=}') + + if cc_old: + assert cc == cc_old + + +def test_4435(): + print(f'{pymupdf.version=}') + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4435.pdf') + with pymupdf.open(path) as document: + page = document[2] + print(f'Calling page.get_pixmap().', flush=1) + pixmap = page.get_pixmap(alpha=False, dpi=120) + print(f'Called page.get_pixmap().', flush=1) + wt = pymupdf.TOOLS.mupdf_warnings() + assert wt == 'bogus font ascent/descent values (0 / 0)\n... repeated 9 times...' + + +def test_4423(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4423.pdf') + with pymupdf.open(path) as document: + path2 = f'{path}.pdf' + ee = None + try: + document.save( + path2, + garbage=4, + expand=1, + deflate=True, + pretty=True, + no_new_id=True, + ) + except Exception as e: + print(f'Exception: {e}') + ee = e + + if (1, 25, 5) <= pymupdf.mupdf_version_tuple < (1, 26): + assert ee, f'Did not receive the expected exception.' + wt = pymupdf.TOOLS.mupdf_warnings() + assert wt == 'dropping unclosed output' + else: + assert not ee, f'Received unexpected exception: {e}' + wt = pymupdf.TOOLS.mupdf_warnings() + assert wt == 'format error: cannot find object in xref (56 0 R)\nformat error: cannot find object in xref (68 0 R)' + + +def test_4445(): + if os.environ.get('PYODIDE_ROOT'): + print('test_4445(): not running on Pyodide - cannot run child processes.') + return + print() + # Test case is large so we download it instead of having it in PyMuPDF + # git. We put it in `cache/` directory do it is not removed by `git clean` + # (unless `-d` is specified). + import util + path = util.download( + 'https://github.com/user-attachments/files/19738242/ss.pdf', + 'test_4445.pdf', + size=2671185, + ) + with pymupdf.open(path) as document: + page = document[0] + pixmap = page.get_pixmap() + print(f'{pixmap.width=}') + print(f'{pixmap.height=}') + if pymupdf.mupdf_version_tuple >= (1, 26): + assert (pixmap.width, pixmap.height) == (792, 612) + else: + assert (pixmap.width, pixmap.height) == (612, 792) + if 0: + path_pixmap = f'{path}.png' + pixmap.save(path_pixmap) + print(f'Have created {path_pixmap=}') + wt = pymupdf.TOOLS.mupdf_warnings() + print(f'{wt=}') + assert wt == 'broken xref subsection, proceeding anyway.\nTrailer Size is off-by-one. Ignoring.' + + +def test_3806(): + print() + print(f'{pymupdf.mupdf_version=}') + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3806.pdf') + path_png_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_3806-expected.png') + path_png = os.path.normpath(f'{__file__}/../../tests/test_3806.png') + + with pymupdf.open(path) as document: + pixmap = document[0].get_pixmap() + pixmap.save(path_png) + rms = gentle_compare.pixmaps_rms(path_png_expected, pixmap) + print(f'{rms=}') + if pymupdf.mupdf_version_tuple >= (1, 26, 6): + assert rms < 0.1 + else: + assert rms > 50 + + +def test_4388(): + print() + path_BOZ1 = os.path.normpath(f'{__file__}/../../tests/resources/test_4388_BOZ1.pdf') + path_BUL1 = os.path.normpath(f'{__file__}/../../tests/resources/test_4388_BUL1.pdf') + path_correct = os.path.normpath(f'{__file__}/../../tests/resources/test_4388_BUL1.pdf.correct.png') + path_test = os.path.normpath(f'{__file__}/../../tests/resources/test_4388_BUL1.pdf.test.png') + + with pymupdf.open(path_BUL1) as bul: + pixmap_correct = bul.load_page(0).get_pixmap() + pixmap_correct.save(path_correct) + + pymupdf.TOOLS.store_shrink(100) + + with pymupdf.open(path_BOZ1) as boz: + boz.load_page(0).get_pixmap() + + with pymupdf.open(path_BUL1) as bul: + pixmap_test = bul.load_page(0).get_pixmap() + pixmap_test.save(path_test) + + rms = gentle_compare.pixmaps_rms(pixmap_correct, pixmap_test) + print(f'{rms=}') + if pymupdf.mupdf_version_tuple >= (1, 26, 6): + assert rms == 0 + else: + assert rms >= 10 + + +def test_4699(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4699.pdf') + path_png_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_4699.png') + path_png_actual = os.path.normpath(f'{__file__}/../../tests/test_4699.png') + with pymupdf.open(path) as document: + page = document[0] + pixmap = page.get_pixmap() + pixmap.save(path_png_actual) + print(f'Have saved to {path_png_actual=}.') + rms = gentle_compare.pixmaps_rms(path_png_expected, pixmap) + print(f'test_4699(): {rms=}') + if pymupdf.mupdf_version_tuple >= (1, 26, 11): + assert rms == 0 + else: + wt = pymupdf.TOOLS.mupdf_warnings() + assert 'syntax error: cannot find ExtGState resource' in wt + assert rms > 20 diff --git a/tests/test_pylint.py b/tests/test_pylint.py index ffed9944b..38c6d017f 100644 --- a/tests/test_pylint.py +++ b/tests/test_pylint.py @@ -7,6 +7,10 @@ def test_pylint(): + if os.environ.get('PYODIDE_ROOT'): + print('test_pylint(): not running on Pyodide - cannot run child processes.') + return + if not hasattr(pymupdf, 'mupdf'): print(f'test_pylint(): Not running with classic implementation.') return @@ -36,6 +40,8 @@ def test_pylint(): W0622: Redefining built-in 'open' (redefined-builtin) W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) R1734: Consider using [] instead of list() (use-list-literal) + R1727: Boolean condition '0 and g_exceptions_verbose' will always evaluate to '0' (condition-evals-to-constant) + R1726: (simplifiable-condition) ''' ) @@ -114,6 +120,7 @@ def test_pylint(): '__init__.py', '__main__.py', '_apply_pages.py', + '_wxcolors.py', 'fitz___init__.py', 'fitz_table.py', 'fitz_utils.py', diff --git a/tests/test_release.py b/tests/test_release.py new file mode 100644 index 000000000..9639ffa98 --- /dev/null +++ b/tests/test_release.py @@ -0,0 +1,85 @@ +import pymupdf + +import os +import re +import sys + + +g_root_abs = os.path.normpath(f'{__file__}/../../') + +sys.path.insert(0, g_root_abs) +try: + import pipcl + import setup +finally: + del sys.path[0] + +g_root = pipcl.relpath(g_root_abs) + + +def _file_line(path, text, re_match, offset=+2): + ''' + Returns : for location of regex match. + + path: + filename. + text: + Contents of . + re_match: + A re.Match. + offset: + Added to line number of start of . Default offset=2 is + because callers usually grep for leading newline, and line numbers are + generally 1-based. + ''' + text_before = text[:re_match.start()] + line = text_before.count('\n') + offset + return f'{path}:{line}' + + +def test_release_versions(): + ''' + PyMuPDF and default MuPDF must have same major.minor version. + ''' + version_p_tuple = [int(i) for i in setup.version_p.split('.')] + version_mupdf_tuple = [int(i) for i in setup.version_mupdf.split('.')] + assert version_p_tuple[:2] == version_mupdf_tuple[:2], \ + f'PyMuPDF and MuPDF major.minor versions do not match. {setup.version_p=} {setup.version_mupdf=}.' + + +def test_release_bug_template(): + ''' + Bug report template must list current PyMuPDF version. + ''' + p = f'{g_root}/.github/ISSUE_TEMPLATE/bug_report.yml' + expected = f'\n - {setup.version_p}\n' + with open(p) as f: + text = f.read() + assert expected in text, f'{p}:1: Failed to find line for {setup.version_p=}, {expected!r}.' + + +def test_release_changelog_version(): + ''' + In changes.txt, first item must match setup.version_p. + ''' + p = f'{g_root}/changes.txt' + with open(p) as f: + text = f.read() + # We match `**Changes in version a.b.c**' optionally followed by ` (YYYY-MM-DD)`. + m = re.search(f'\n[*][*]Changes in version ([0-9.]+)[*][*]( [([0-9-]+[)])?\n', text) + assert m, f'Cannot parse {p}.' + assert m[1] == setup.version_p, \ + f'{_file_line(p, text, m)}: Cannot find {setup.version_p=} in first changelog item: {m[0].strip()!r}.' + + +def test_release_changelog_mupdf_version(): + ''' + In changes.txt, first mentioned of MuPDF must match setup.version_mupdf. + ''' + p = f'{g_root}/changes.txt' + with open(p) as f: + text = f.read() + m = re.search(f'\n[*] Use MuPDF-([0-9.]+)[.]\n', text) + assert m, f'Cannot parse {p}.' + assert m[1] == setup.version_mupdf, \ + f'{_file_line(p, text, m)}: First mentioned MuPDF version does not match {setup.version_mupdf=}: {m[0].strip()!r}.' diff --git a/tests/test_rewrite_images.py b/tests/test_rewrite_images.py new file mode 100644 index 000000000..b3cb290cd --- /dev/null +++ b/tests/test_rewrite_images.py @@ -0,0 +1,15 @@ +import pymupdf +import os + +scriptdir = os.path.dirname(__file__) + + +def test_rewrite_images(): + """Example for decreasing file size by more than 30%.""" + filename = os.path.join(scriptdir, "resources", "test-rewrite-images.pdf") + doc = pymupdf.open(filename) + size0 = os.path.getsize(doc.name) + doc.rewrite_images(dpi_threshold=100, dpi_target=72, quality=33) + data = doc.tobytes(garbage=3, deflate=True) + size1 = len(data) + assert (1 - (size1 / size0)) > 0.3 diff --git a/tests/test_rtl.py b/tests/test_rtl.py new file mode 100644 index 000000000..cd80185e6 --- /dev/null +++ b/tests/test_rtl.py @@ -0,0 +1,18 @@ +import pymupdf + +import os + + +def test_rtl(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test-E+A.pdf') + doc = pymupdf.open(path) + page = doc[0] + # set of all RTL characters + rtl_chars = set([chr(i) for i in range(0x590, 0x901)]) + + for w in page.get_text("words"): + # every word string must either ONLY contain RTL chars + cond1 = rtl_chars.issuperset(w[4]) + # ... or NONE. + cond2 = rtl_chars.intersection(w[4]) == set() + assert cond1 or cond2 diff --git a/tests/test_spikes.py b/tests/test_spikes.py new file mode 100644 index 000000000..54dd91807 --- /dev/null +++ b/tests/test_spikes.py @@ -0,0 +1,42 @@ +import pymupdf +import pathlib +import os + + +def test_spikes(): + """Check suppression of text spikes caused by long miters.""" + root = os.path.abspath(f"{__file__}/../..") + spikes_yes = pathlib.Path(f"{root}/docs/images/spikes-yes.png") + spikes_no = pathlib.Path(f"{root}/docs/images/spikes-no.png") + doc = pymupdf.open() + text = "NATO MEMBERS" # some text provoking spikes ("N", "M") + point = (10, 35) # insert point + + # make text provoking spikes + page = doc.new_page(width=200, height=50) # small page + page.insert_text( + point, + text, + fontsize=20, + render_mode=1, # stroke text only + border_width=0.3, # causes thick border lines + miter_limit=None, # do not care about miter spikes + ) + # write same text in white over the previous for better demo purpose + page.insert_text(point, text, fontsize=20, color=(1, 1, 1)) + pix1 = page.get_pixmap() + assert pix1.tobytes() == spikes_yes.read_bytes() + + # make text suppressing spikes + page = doc.new_page(width=200, height=50) + page.insert_text( + point, + text, + fontsize=20, + render_mode=1, + border_width=0.3, + miter_limit=1, # suppress each and every miter spike + ) + page.insert_text(point, text, fontsize=20, color=(1, 1, 1)) + pix2 = page.get_pixmap() + assert pix2.tobytes() == spikes_no.read_bytes() diff --git a/tests/test_story.py b/tests/test_story.py index 48643be25..d895e9b58 100644 --- a/tests/test_story.py +++ b/tests/test_story.py @@ -38,7 +38,7 @@ def test_story(): def test_2753(): def rectfn(rect_num, filled): - return pymupdf.Rect(0, 0, 200, 200), pymupdf.Rect(50, 50, 100, 100), None + return pymupdf.Rect(0, 0, 200, 200), pymupdf.Rect(50, 50, 100, 150), None def make_pdf(html, path_out): story = pymupdf.Story(html=html) @@ -65,10 +65,13 @@ def make_pdf(html, path_out): os.path.abspath(f'{__file__}/../../tests/test_2753-out-after.pdf'), ) + path = os.path.normpath(f'{__file__}/../../tests/test_2753_out') + doc_before.save(f'{path}_before.pdf') + doc_after.save(f'{path}_after.pdf') assert len(doc_before) == 2 assert len(doc_after) == 2 - +# codespell:ignore-begin springer_html = '''

''' +#codespell:ignore-end + def test_fit_springer(): if not hasattr(pymupdf, 'mupdf'): @@ -227,3 +232,64 @@ def contentfn(positions): def test_archive_creation(): s = pymupdf.Story(archive=pymupdf.Archive('.')) s = pymupdf.Story(archive='.') + + +def test_3813(): + import pymupdf + + HTML = """ +

Count is fine:

+
    +
  1. Lorem +
      +
    1. Sub Lorem
    2. +
    3. Sub Lorem
    4. +
    +
  2. +
  3. Lorem
  4. +
  5. Lorem
  6. +
+ +

Broken count:

+
    +
  1. Lorem +
      +
    • Sub Lorem
    • +
    • Sub Lorem
    • +
    +
  2. +
  3. Lorem
  4. +
  5. Lorem
  6. +
+ """ + MEDIABOX = pymupdf.paper_rect("A4") + WHERE = MEDIABOX + (36, 36, -36, -36) + + story = pymupdf.Story(html=HTML) + path = os.path.normpath(f'{__file__}/../../tests/test_3813_out.pdf') + writer = pymupdf.DocumentWriter(path) + + more = 1 + + while more: + device = writer.begin_page(MEDIABOX) + more, _ = story.place(WHERE) + story.draw(device) + writer.end_page() + + writer.close() + + with pymupdf.open(path) as document: + page = document[0] + text = page.get_text() + text_utf8 = text.encode() + + text_expected_utf8 = b'Count is \xef\xac\x81ne:\n1. Lorem\n1. Sub Lorem\n2. Sub Lorem\n2. Lorem\n3. Lorem\nBroken count:\n1. Lorem\n\xe2\x80\xa2 Sub Lorem\n\xe2\x80\xa2 Sub Lorem\n2. Lorem\n3. Lorem\n' + text_expected = text_expected_utf8.decode() + + print(f'text_utf8:\n {text_utf8!r}') + print(f'text_expected_utf8:\n {text_expected_utf8!r}') + print(f'text:\n {textwrap.indent(text, " ")}') + print(f'text_expected:\n {textwrap.indent(text_expected, " ")}') + + assert text == text_expected diff --git a/tests/test_tables.py b/tests/test_tables.py index 9b3f7a309..d2f4c0967 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -1,8 +1,11 @@ import os import io from pprint import pprint -import pymupdf +import textwrap import pickle +import platform + +import pymupdf scriptdir = os.path.abspath(os.path.dirname(__file__)) filename = os.path.join(scriptdir, "resources", "chinese-tables.pdf") @@ -180,11 +183,29 @@ def test_2979(): pymupdf.TOOLS.set_small_glyph_heights() is False ), f"{pymupdf.TOOLS.set_small_glyph_heights()=}" + wt = pymupdf.TOOLS.mupdf_warnings() + if pymupdf.mupdf_version_tuple >= (1, 26, 8): + assert ( + wt + == "bogus font ascent/descent values (3117 / -2463)\n... repeated 2 times...\nActualtext with no position. Text may be lost or mispositioned.\n... repeated 96 times..." + ) + elif pymupdf.mupdf_version_tuple >= (1, 26, 0): + assert ( + wt + == "bogus font ascent/descent values (3117 / -2463)\n... repeated 2 times..." + ) + else: + assert not wt + def test_3062(): """Tests the fix for #3062. After table extraction, a rotated page should behave and look like as before.""" + if platform.python_implementation() == 'GraalVM': + print(f'test_3062(): Not running because slow on GraalVM.') + return + filename = os.path.join(scriptdir, "resources", "test_3062.pdf") doc = pymupdf.open(filename) page = doc[0] @@ -212,6 +233,10 @@ def test_strict_lines(): def test_add_lines(): """Test new parameter add_lines for table recognition.""" + if platform.python_implementation() == 'GraalVM': + print(f'test_add_lines(): Not running because breaks later tests on GraalVM.') + return + filename = os.path.join(scriptdir, "resources", "small-table.pdf") doc = pymupdf.open(filename) page = doc[0] @@ -285,15 +310,70 @@ def test_markdown(): doc = pymupdf.open(filename) page = doc[0] tab = page.find_tables(strategy="lines_strict")[0] - text = ( - "|Header1|Header2|Header3|\n" - "|---|---|---|\n" - "|Col11 Col12|Col21 Col22|Col31 Col32 Col33|\n" - "|Col13|Col23|Col34 Col35|\n" - "|Col14|Col24|Col36|\n" - "|Col15|Col25 Col26||\n\n" - ) - assert tab.to_markdown() == text + if pymupdf.mupdf_version_tuple < (1, 26, 3): + md_expected = textwrap.dedent(''' + |Header1|Header2|Header3| + |---|---|---| + |Col11
Col12|~~Col21~~
~~Col22~~|Col31
Col32
Col33| + |Col13|~~Col23~~|Col34
Col35| + |Col14|~~Col24~~|Col36| + |Col15|~~Col25~~
~~Col26~~|| + + ''').lstrip() + else: + md_expected = ( + "|Header1|Header2|Header3|\n" + "|---|---|---|\n" + "|Col11
Col12|Col21
Col22|Col31
Col32
Col33|\n" + "|Col13|Col23|Col34
Col35|\n" + "|Col14|Col24|Col36|\n" + "|Col15|Col25
Col26||\n\n" + ) + + + md = tab.to_markdown() + assert md == md_expected, f'Incorrect md:\n{textwrap.indent(md, " ")}' + + +def test_paths_param(): + """Confirm acceptance of supplied vector graphics list.""" + filename = os.path.join(scriptdir, "resources", "strict-yes-no.pdf") + doc = pymupdf.open(filename) + page = doc[0] + tabs = page.find_tables(paths=[]) # will cause all tables are missed + assert tabs.tables == [] + + +def test_boxes_param(): + """Confirm acceptance of supplied boxes list.""" + filename = os.path.join(scriptdir, "resources", "small-table.pdf") + doc = pymupdf.open(filename) + page = doc[0] + paths = page.get_drawings() + box0 = page.cluster_drawings(drawings=paths)[0] + boxes = [box0] + words = page.get_text("words") + x_vals = [w[0] - 5 for w in words if w[4] in ("min", "max", "avg")] + for x in x_vals: + r = +box0 + r.x1 = x + boxes.append(r) + + y_vals = sorted(set([round(w[3]) for w in words])) + for y in y_vals[:-1]: # skip last one to avoid empty row + r = +box0 + r.y1 = y + boxes.append(r) + + tabs = page.find_tables(paths=[], add_boxes=boxes) + tab = tabs.tables[0] + assert tab.extract() == [ + ["Boiling Points °C", "min", "max", "avg"], + ["Noble gases", "-269", "-62", "-170.5"], + ["Nonmetals", "-253", "4827", "414.1"], + ["Metalloids", "335", "3900", "741.5"], + ["Metals", "357", ">5000", "2755.9"], + ] def test_dotted_grid(): @@ -308,3 +388,78 @@ def test_dotted_grid(): assert t0.row_count, t0.col_count == (11, 12) assert t1.row_count, t1.col_count == (25, 11) assert t2.row_count, t2.col_count == (1, 10) + + +def test_4017(): + path = os.path.normpath(f"{__file__}/../../tests/resources/test_4017.pdf") + with pymupdf.open(path) as document: + page = document[0] + + tables = page.find_tables(add_lines=None) + print(f"{len(tables.tables)=}.") + tables_text = list() + for i, table in enumerate(tables): + print(f"## {i=}.") + t = table.extract() + for tt in t: + print(f" {tt}") + + # 2024-11-29: expect current incorrect output for last two tables. + + expected_a = [ + ["Class A/B Overcollateralization", "131.44%", ">=", "122.60%", "", "PASS"], + [None, None, None, None, None, "PASS"], + ["Class D Overcollateralization", "112.24%", ">=", "106.40%", "", "PASS"], + [None, None, None, None, None, "PASS"], + ["Event of Default", "156.08%", ">=", "102.50%", "", "PASS"], + [None, None, None, None, None, "PASS"], + ["Class A/B Interest Coverage", "N/A", ">=", "120.00%", "", "N/A"], + [None, None, None, None, None, "N/A"], + ["Class D Interest Coverage", "N/A", ">=", "105.00%", "", "N/A"], + ] + assert tables[-2].extract() == expected_a + + expected_b = [ + [ + "Moody's Maximum Rating Factor Test", + "2,577", + "<=", + "3,250", + "", + "PASS", + "2,581", + ], + [None, None, None, None, None, "PASS", None], + [ + "Minimum Floating Spread", + "3.5006%", + ">=", + "2.0000%", + "", + "PASS", + "3.4871%", + ], + [None, None, None, None, None, "PASS", None], + [ + "Minimum Weighted Average S&P Recovery\nRate Test", + "40.50%", + ">=", + "40.00%", + "", + "PASS", + "40.40%", + ], + [None, None, None, None, None, "PASS", None], + ["Weighted Average Life", "4.83", "<=", "9.00", "", "PASS", "4.92"], + ] + assert tables[-1].extract() == expected_b + + +def test_md_styles(): + """Test output of table with MD-styled cells.""" + filename = os.path.join(scriptdir, "resources", "test-styled-table.pdf") + doc = pymupdf.open(filename) + page = doc[0] + tabs = page.find_tables()[0] + text = """|Column 1|Column 2|Column 3|\n|---|---|---|\n|Zelle (0,0)|**Bold (0,1)**|Zelle (0,2)|\n|~~Strikeout (1,0), Zeile 1~~
~~Hier kommt Zeile 2.~~|Zelle (1,1)|~~Strikeout (1,2)~~|\n|**`Bold-monospaced`**
**`(2,0)`**|_Italic (2,1)_|**_Bold-italic_**
**_(2,2)_**|\n|Zelle (3,0)|~~**Bold-strikeout**~~
~~**(3,1)**~~|Zelle (3,2)|\n\n""" + assert tabs.to_markdown() == text diff --git a/tests/test_tesseract.py b/tests/test_tesseract.py index 92212b98f..7650e8381 100644 --- a/tests/test_tesseract.py +++ b/tests/test_tesseract.py @@ -1,5 +1,6 @@ import os import platform +import textwrap import pymupdf @@ -19,8 +20,15 @@ def test_tesseract(): page = doc[5] if hasattr(pymupdf, 'mupdf'): # rebased. - if pymupdf.mupdf_version_tuple >= (1, 24): - e_expected = 'code=3: OCR initialisation failed' + if pymupdf.mupdf_version_tuple < (1, 25, 4): + tail = 'OCR initialisation failed' + else: + tail = 'Tesseract language initialisation failed' + if os.environ.get('PYODIDE_ROOT'): + e_expected = 'code=6: No OCR support in this build' + e_expected_type = pymupdf.mupdf.FzErrorUnsupported + else: + e_expected = f'code=3: {tail}' if platform.system() == 'OpenBSD': # 2023-12-12: For some reason the SWIG catch code only catches # the exception as FzErrorBase. @@ -28,9 +36,6 @@ def test_tesseract(): print(f'OpenBSD workaround - expecting FzErrorBase, not FzErrorLibrary.') else: e_expected_type = pymupdf.mupdf.FzErrorLibrary - else: - e_expected = 'code=2: OCR initialisation failed' - e_expected_type = None else: # classic. e_expected = 'OCR initialisation failed' @@ -56,13 +61,104 @@ def test_tesseract(): rebased = hasattr(pymupdf, 'mupdf') if rebased: wt = pymupdf.TOOLS.mupdf_warnings() - if pymupdf.mupdf_version_tuple < (1, 25): - assert wt - else: + if pymupdf.mupdf_version_tuple < (1, 25, 4): assert wt == ( 'UNHANDLED EXCEPTION!\n' - 'library error: Tesseract initialisation failed\n' - 'dropping unclosed output' + 'library error: Tesseract initialisation failed' ) + else: + assert not wt + + +def test_3842b(): + # Check Tesseract failure when given a bogus languages. + # + # Note that Tesseract seems to output its own diagnostics. + # + if os.environ.get('PYODIDE_ROOT'): + print('test_3842b(): not running on Pyodide - cannot run child processes.') + return + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3842.pdf') + with pymupdf.open(path) as document: + page = document[6] + try: + partial_tp = page.get_textpage_ocr(flags=0, full=False, language='qwerty') + except Exception as e: + print(f'test_3842b(): received exception: {e}') + if 'No tessdata specified and Tesseract is not installed' in str(e): + pass + else: + if pymupdf.mupdf_version_tuple < (1, 25, 4): + assert 'OCR initialisation failed' in str(e) + wt = pymupdf.TOOLS.mupdf_warnings() + assert wt == 'UNHANDLED EXCEPTION!\nlibrary error: Tesseract initialisation failed\nUNHANDLED EXCEPTION!\nlibrary error: Tesseract initialisation failed', \ + f'Unexpected {wt=}' + else: + assert 'Tesseract language initialisation failed' in str(e) + +def test_3842(): + if os.environ.get('PYODIDE_ROOT'): + print('test_3842(): not running on Pyodide - cannot run child processes.') + return + + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3842.pdf') + with pymupdf.open(path) as document: + page = document[6] + try: + partial_tp = page.get_textpage_ocr(flags=0, full=False) + except Exception as e: + print(f'test_3842(): received exception: {e}', flush=1) + if 'No tessdata specified and Tesseract is not installed' in str(e): + pass + elif 'Tesseract language initialisation failed' in str(e): + pass + else: + assert 0, f'Unexpected exception text: {str(e)=}' + else: + text = page.get_text(textpage=partial_tp) + print() + print(text) + print(f'text:\n{text!r}') + + # 2024-11-29: This is the current incorrect output. We use + # underscores for lines containing entirely whitespace (which + # textwrap.dedent() unfortunately replaces with empty lines). + text_expected = textwrap.dedent(''' + NIST SP 800-223 + _ + High-Performance Computing Security + February 2024 + _ + __ + iii + Table of Contents + 1. Introduction ...................................................................................................................................1 + 2. HPC System Reference Architecture and Main Components ............................................................2 + 2.1.1. Components of the High-Performance Computing Zone ............................................................. 3 + 2.1.2. Components of the Data Storage Zone ........................................................................................ 4 + 2.1.3. Parallel File System ....................................................................................................................... 4 + 2.1.4. Archival and Campaign Storage .................................................................................................... 5 + 2.1.5. Burst Buffer .................................................................................................................................. 5 + 2.1.6. Components of the Access Zone .................................................................................................. 6 + 2.1.7. Components of the Management Zone ....................................................................................... 6 + 2.1.8. General Architecture and Characteristics .................................................................................... 6 + 2.1.9. Basic Services ................................................................................................................................ 7 + 2.1.10. Configuration Management ....................................................................................................... 7 + 2.1.11. HPC Scheduler and Workflow Management .............................................................................. 7 + 2.1.12. HPC Software .............................................................................................................................. 8 + 2.1.13. User Software ............................................................................................................................. 8 + 2.1.14. Site-Provided Software and Vendor Software ........................................................................... 8 + 2.1.15. Containerized Software in HPC .................................................................................................. 9 + 3. HPC Threat Analysis...................................................................................................................... 10 + 3.2.1. Access Zone Threats ................................................................................................................... 11 + 3.2.2. Management Zone Threats ........................................................................................................ 11 + 3.2.3. High-Performance Computing Zone Threats .............................................................................. 12 + 3.2.4. Data Storage Zone Threats ......................................................................................................... 12 + 4. HPC Security Posture, Challenges, and Recommendations ............................................................. 14 + 5. Conclusions .................................................................................................................................. 19 + ''', + )[1:].replace('_', ' ') + print(f'text_expected:\n{text_expected!r}') + assert text == text_expected diff --git a/tests/test_textbox.py b/tests/test_textbox.py index 37f1e5ec9..21b253cf0 100644 --- a/tests/test_textbox.py +++ b/tests/test_textbox.py @@ -7,6 +7,12 @@ """ import pymupdf +import gentle_compare + +import os +import textwrap + +# codespell:ignore-begin text = """Der Kleine Schwertwal (Pseudorca crassidens), auch bekannt als Unechter oder Schwarzer Schwertwal, ist eine Art der Delfine (Delphinidae) und der einzige rezente Vertreter der Gattung Pseudorca. Er ähnelt dem Orca in Form und Proportionen, ist aber einfarbig schwarz und mit einer Maximallänge von etwa sechs Metern deutlich kleiner. @@ -14,7 +20,7 @@ Kleine Schwertwale bilden Schulen von durchschnittlich zehn bis fünfzig Tieren, wobei sie sich auch mit anderen Delfinen vergesellschaften und sich meistens abseits der Küsten aufhalten. Sie sind in allen Ozeanen gemäßigter, subtropischer und tropischer Breiten beheimatet, sind jedoch vor allem in wärmeren Jahreszeiten auch bis in die gemäßigte bis subpolare Zone südlich der Südspitze Südamerikas, vor Nordeuropa und bis vor Kanada anzutreffen.""" - +# codespell:ignore-end def test_textbox1(): """Use TextWriter for text insertion.""" @@ -181,7 +187,9 @@ def test_htmlbox1(): assert spare_height < 0 assert scale == 1 spare_height, scale = page.insert_htmlbox(rect, text, rotate=rot, scale_low=0) - assert spare_height == 0 + page.draw_rect(rect, (1, 0, 0)) + doc.save(os.path.normpath(f'{__file__}/../../tests/test_htmlbox1.pdf')) + assert abs(spare_height - 3.8507) < 0.001 assert 0 < scale < 1 page = doc.reload_page(page) link = page.get_links()[0] # extracts the links on the page @@ -263,9 +271,6 @@ def test_htmlbox3(): def test_3559(): - if pymupdf.mupdf_version_tuple < (1, 24, 4): - print(f'test_3559(): Not running because mupdf known to SEGV.') - return doc = pymupdf.Document() page = doc.new_page() text_insert="""

""" @@ -279,3 +284,86 @@ def test_3916(): page = doc.new_page() spare_height, scale = page.insert_htmlbox(rect, "Hello, World!", scale_low=0.5) assert spare_height == -1 + + +def test_4400(): + with pymupdf.open() as document: + page = document.new_page() + writer = pymupdf.TextWriter(page.rect) + text = '111111111' + print(f'Calling writer.fill_textbox().', flush=1) + writer.fill_textbox(rect=pymupdf.Rect(0, 0, 100, 20), pos=(80, 0), text=text, fontsize=8) + + +def test_4613(): + print() + text = 3 * 'abcdefghijklmnopqrstuvwxyz\nABCDEFGHIJKLMNOPQRSTUVWXYZ\n' + story = pymupdf.Story(text) + rect = pymupdf.Rect(10, 10, 100, 100) + + # Test default operation where we get additional scaling down because of + # the long words in our text. + print(f'test_4613(): ### Testing default operation.') + with pymupdf.open() as doc: + page = doc.new_page() + spare_height, scale = page.insert_htmlbox(rect, story) + print(f'test_4613(): {spare_height=} {scale=}') + # The additional down-scaling from the long word widths results in + # spare vertical space. + page.draw_rect(rect, (1, 0, 0)) + path = os.path.normpath(f'{__file__}/../../tests/test_4613.pdf') + doc.save(path) + + path_pixmap = os.path.normpath(f'{__file__}/../../tests/test_4613.png') + path_pixmap_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_4613.png') + pixmap = page.get_pixmap(dpi=300) + pixmap.save(path_pixmap) + + pixmap_diff = gentle_compare.pixmaps_diff(path_pixmap_expected, pixmap) + pixmap_diff.save(os.path.normpath(f'{__file__}/../../tests/test_4613-diff.png')) + + rms = gentle_compare.pixmaps_rms(pixmap, path_pixmap_expected) + print(f'{rms=}') + assert rms == 0, f'{rms=}' + + assert abs(spare_height - 45.7536) < 0.1 + assert abs(scale - 0.4009) < 0.01 + + new_text = page.get_text('text', clip=rect) + print(f'test_4613(): new_text:') + print(textwrap.indent(new_text, ' ')) + assert new_text == text + + # Check with _scale_word_width=False - ignore too-wide words. + print(f'test_4613(): ### Testing with _scale_word_width=False.') + with pymupdf.open() as doc: + page = doc.new_page() + spare_height, scale = page.insert_htmlbox(rect, story, _scale_word_width=False) + print(f'test_4613(): _scale_word_width=False: {spare_height=} {scale=}') + # With _scale_word_width=False we allow long words to extend beyond the + # rect, so we should have spare_height == 0 and only a small amount of + # down-scaling. + assert spare_height == 0 + assert abs(scale - 0.914) < 0.01 + new_text = page.get_text('text', clip=rect) + print(f'test_4613(): new_text:') + print(textwrap.indent(new_text, ' ')) + assert new_text == textwrap.dedent(''' + abcdefghijklmno + ABCDEFGHIJKLM + abcdefghijklmno + ABCDEFGHIJKLM + abcdefghijklmno + ABCDEFGHIJKLM + ''')[1:] + + + # Check that we get no fit if scale_low is not low enough. + print(f'test_4613(): ### Testing with scale_low too high to allow a fit.') + with pymupdf.open() as doc: + page = doc.new_page() + scale_low=0.6 + spare_height, scale = page.insert_htmlbox(rect, story, scale_low=scale_low) + print(f'test_4613(): {scale_low=}: {spare_height=} {scale=}') + assert spare_height == -1 + assert scale == scale_low diff --git a/tests/test_textextract.py b/tests/test_textextract.py index 534d1fbf9..ddb118681 100644 --- a/tests/test_textextract.py +++ b/tests/test_textextract.py @@ -3,10 +3,15 @@ No checks performed - just contribute to code coverage. """ import os +import platform import sys +import textwrap import pymupdf +import gentle_compare + + pymupdfdir = os.path.abspath(f'{__file__}/../..') scriptdir = f'{pymupdfdir}/tests' filename = os.path.join(scriptdir, "resources", "symbol-list.pdf") @@ -101,33 +106,32 @@ def test_extract4(): pymupdf.mupdf.fz_close_document_writer(writer) print(f'Have written to: {out}') - if pymupdf.mupdf_version_tuple >= (1, 23, 4): - def get_text(page, space_guess): - buffer_ = pymupdf.mupdf.FzBuffer( 10) - out = pymupdf.mupdf.FzOutput( buffer_) - writer = pymupdf.mupdf.FzDocumentWriter( - out, - 'text,space-guess={space_guess}', - pymupdf.mupdf.FzDocumentWriter.OutputType_DOCX, - ) - device = pymupdf.mupdf.fz_begin_page(writer, pymupdf.mupdf.fz_bound_page(page)) - pymupdf.mupdf.fz_run_page(page, device, pymupdf.mupdf.FzMatrix(), pymupdf.mupdf.FzCookie()) - pymupdf.mupdf.fz_end_page(writer) - pymupdf.mupdf.fz_close_document_writer(writer) - text = buffer_.fz_buffer_extract() - text = text.decode('utf8') - n = text.count(' ') - print(f'{space_guess=}: {n=}') - return text, n - page = document[4] - text0, n0 = get_text(page, 0) - text1, n1 = get_text(page, 0.5) - text2, n2 = get_text(page, 0.001) - text2, n2 = get_text(page, 0.1) - text2, n2 = get_text(page, 0.3) - text2, n2 = get_text(page, 0.9) - text2, n2 = get_text(page, 5.9) - assert text1 == text0 + def get_text(page, space_guess): + buffer_ = pymupdf.mupdf.FzBuffer( 10) + out = pymupdf.mupdf.FzOutput( buffer_) + writer = pymupdf.mupdf.FzDocumentWriter( + out, + 'text,space-guess={space_guess}', + pymupdf.mupdf.FzDocumentWriter.OutputType_DOCX, + ) + device = pymupdf.mupdf.fz_begin_page(writer, pymupdf.mupdf.fz_bound_page(page)) + pymupdf.mupdf.fz_run_page(page, device, pymupdf.mupdf.FzMatrix(), pymupdf.mupdf.FzCookie()) + pymupdf.mupdf.fz_end_page(writer) + pymupdf.mupdf.fz_close_document_writer(writer) + text = buffer_.fz_buffer_extract() + text = text.decode('utf8') + n = text.count(' ') + print(f'{space_guess=}: {n=}') + return text, n + page = document[4] + text0, n0 = get_text(page, 0) + text1, n1 = get_text(page, 0.5) + text2, n2 = get_text(page, 0.001) + text2, n2 = get_text(page, 0.1) + text2, n2 = get_text(page, 0.3) + text2, n2 = get_text(page, 0.9) + text2, n2 = get_text(page, 5.9) + assert text1 == text0 def test_2954(): ''' @@ -193,22 +197,15 @@ def get(flags=None): text_none, n_fffd_none = get() text_0, n_fffd_0 = get(flags0) - if pymupdf.mupdf_version_tuple >= (1, 23, 9): - text_1, n_fffd_1 = get(flags0 | pymupdf.TEXT_CID_FOR_UNKNOWN_UNICODE) - - assert n_fffd_none == n_fffd_good - assert n_fffd_0 == n_fffd_bad - assert n_fffd_1 == n_fffd_good - - assert check_good(text_none) - assert not check_good(text_0) - assert check_good(text_1) - else: - assert n_fffd_none == n_fffd_bad - assert n_fffd_0 == n_fffd_bad - - assert not check_good(text_none) - assert not check_good(text_0) + text_1, n_fffd_1 = get(flags0 | pymupdf.TEXT_USE_CID_FOR_UNKNOWN_UNICODE) + + assert n_fffd_none == n_fffd_good + assert n_fffd_0 == n_fffd_bad + assert n_fffd_1 == n_fffd_good + + assert check_good(text_none) + assert not check_good(text_0) + assert check_good(text_1) def test_3027(): @@ -221,6 +218,7 @@ def test_3027(): def test_3186(): + # codespell:ignore-begin texts_expected = [ "Assicurazione sulla vita di tipo Unit Linked\nDocumento informativo precontrattuale aggiuntivo\nper i prodotti d\x00investimento assicurativi\n(DIP aggiuntivo IBIP)\nImpresa: AXA MPS Financial DAC \nProdotto: Progetto Protetto New - Global Dividends\nContratto Unit linked (Ramo III)\nData di realizzazione: Aprile 2023\nIl presente documento contiene informazioni aggiuntive e complementari rispetto a quelle presenti nel documento \ncontenente le informazioni chiave per i prodotti di investimento assicurativi (KID) per aiutare il potenziale \ncontraente a capire più nel dettaglio le caratteristiche del prodotto, gli obblighi contrattuali e la situazione \npatrimoniale dell\x00impresa.\nIl Contraente deve prendere visione delle condizioni d\x00assicurazione prima della sottoscrizione del Contratto.\nAXA MPS Financial DAC, Wolfe Tone House, Wolfe Tone Street, Dublin, DO1 HP90, Irlanda; Tel: 00353-1-6439100; \nsito internet: www.axa-mpsfinancial.ie; e-mail: supporto@axa-mpsfinancial.ie;\nAXA MPS Financial DAC, società del Gruppo Assicurativo AXA Italia, iscritta nell\x00Albo delle Imprese di assicurazione \ncon il numero II.00234. \nLa Compagnia mette a disposizione dei clienti i seguenti recapiti per richiedere eventuali informazioni sia in merito alla \nCompagnia sia in relazione al contratto proposto: Tel: 00353-1-6439100; sito internet: www.axa-mpsfinancial.ie; \ne-mail: supporto@axa-mpsfinancial.ie;\nAXA MPS Financial DAC è un\x00impresa di assicurazione di diritto Irlandese, Sede legale 33 Sir John Rogerson's Quay, \nDublino D02 XK09 Irlanda. L\x00Impresa di Assicurazione è stata autorizzata all\x00esercizio dell\x00attività assicurativa con \nprovvedimento n. C33602 emesso dalla Central Bank of Ireland (l\x00Autorità di vigilanza irlandese) in data 14/05/1999 \ned è iscritta in Irlanda presso il Companies Registration Office (registered nr. 293822). \nLa Compagnia opera in Italia esclusivamente in regime di libera prestazione di servizi ai sensi dell\x00art. 24 del D. Lgs. \n07/09/2005, n. 209 e può investire in attivi non consentiti dalla normativa italiana in materia di assicurazione sulla \nvita, ma in conformità con la normativa irlandese di riferimento in quanto soggetta al controllo della Central Bank of \nIreland.\nCon riferimento all\x00ultimo bilancio d\x00esercizio (esercizio 2021) redatto ai sensi dei principi contabili vigenti, il patrimonio \nnetto di AXA MPS Financial DAC ammonta a 139,6 milioni di euro di cui 635 mila euro di capitale sociale interamente \nversato e 138,9 milioni di euro di riserve patrimoniali compreso il risultato di esercizio.\nAl 31 dicembre 2021 il Requisito patrimoniale di solvibilità è pari a 90 milioni di euro (Solvency Capital Requirement, \nSCR). Sulla base delle valutazioni effettuate della Compagnia coerentemente con gli esistenti dettami regolamentari, il \nRequisito patrimoniale minimo al 31 dicembre 2021 ammonta a 40 milioni di euro (Minimum Capital Requirement, \nMCR).\nL'indice di solvibilità di AXA MPS Financial DAC, ovvero l'indice che rappresenta il rapporto tra l'ammontare del margine \ndi solvibilità disponibile e l'ammontare del margine di solvibilità richiesto dalla normativa vigente, e relativo all'ultimo \nbilancio approvato, è pari al 304% (solvency ratio). L'importo dei fondi propri ammissibili a copertura dei requisiti \npatrimoniali è pari a 276 milioni di euro (Eligible Own Funds, EOF).\nPer informazioni patrimoniali sulla società è possibile consultare il sito: www.axa-mpsfinancial.ie/chi-siamo\nSi rinvia alla relazione sulla solvibilità e sulla condizione finanziaria dell\x00impresa (SFCR) disponibile sul sito internet \ndella Compagnia al seguente link www.axa-mpsfinancial.ie/comunicazioni \nAl contratto si applica la legge italiana\nDIP aggiuntivo IBIP - Progetto Protetto New - Global Dividends - Pag. 1 di 9\n", "Quali sono le prestazioni?\nIl contratto prevede le seguenti prestazioni:\na)Prestazioni in caso di vita dell'assicurato\nPrestazione in caso di Riscatto Totale e parziale\nA condizione che siano trascorsi almeno 30 giorni dalla Data di Decorrenza (conclusione del Contratto) e fino all\x00ultimo \nGiorno Lavorativo della terzultima settimana precedente la data di scadenza, il Contraente può riscuotere, interamente \no parzialmente, il Valore di Riscatto. In caso di Riscatto totale, la liquidazione del Valore di Riscatto pone fine al \nContratto con effetto dalla data di ricezione della richiesta.\nIl Contraente ha inoltre la facoltà di esercitare parzialmente il diritto di Riscatto, nella misura minima di 500,00 euro, \nda esercitarsi con le stesse modalità previste per il Riscatto totale. In questo caso, il Contratto rimane in vigore per \nl\x00ammontare residuo, a condizione che il Controvalore delle Quote residue del Contratto non sia inferiore a 1.000,00 \neuro.\nb) Prestazione a Scadenza\nAlla data di scadenza, sempre che l\x00Assicurato sia in vita, l\x00Impresa di Assicurazione corrisponderà agli aventi diritto un \nammontare risultante dal Controvalore delle Quote collegate al Contratto alla scadenza, calcolato come prodotto tra il \nValore Unitario della Quota (rilevato in corrispondenza della data di scadenza) e il numero delle Quote attribuite al \nContratto alla medesima data.\nc) Prestazione in corso di Contratto\nPurché l\x00assicurato sia in vita, nel corso della durata del Contratto, il Fondo Interno mira alla corresponsione di due \nPrestazioni Periodiche. Le prestazioni saranno pari all\x00ammontare risultante dalla moltiplicazione tra il numero di Quote \nassegnate al Contratto il primo giorno Lavorativo della settimana successiva alla Data di Riferimento e 2,50% del \nValore Unitario della Quota registrato alla Data di istituzione del Fondo Interno.\nLe prestazioni verranno liquidate entro trenta giorni dalle Date di Riferimento.\nData di Riferimento\n 1° Prestazione Periodica\n24/04/2024\n 2° Prestazione Periodica\n23/04/2025\nLa corresponsione delle Prestazioni Periodiche non è collegata alla performance positiva o ai ricavi incassati dal Fondo \nInterno, pertanto, la corresponsione potrebbe comportare una riduzione del Controvalore delle Quote senza comportare \nalcuna riduzione del numero di Quote assegnate al Contratto.\nd) Prestazione assicurativa principale in caso di decesso dell'Assicurato\nIn caso di decesso dell\x00Assicurato nel corso della durata contrattuale, è previsto il pagamento ai Beneficiari di un \nimporto pari al Controvalore delle Quote attribuite al Contratto, calcolato come prodotto tra il Valore Unitario della \nQuota rilevato alla Data di Valorizzazione della settimana successiva alla data in cui la notifica di decesso \ndell\x00Assicurato perviene all\x00Impresa di Assicurazione e il numero delle Quote attribuite al Contratto alla medesima data, \nmaggiorato di una percentuale pari allo 0,1%.\nQualora il capitale così determinato fosse inferiore al Premio pagato, sarà liquidato un ulteriore importo pari alla \ndifferenza tra il Premio pagato, al netto della parte di Premio riferita a eventuali Riscatti parziali e l\x00importo caso morte \ncome sopra determinato. Tale importo non potrà essere in ogni caso superiore al 5% del Premio pagato.\nOpzioni contrattuali\nIl Contratto non prevede opzioni contrattuali.\nFondi Assicurativi\nLe prestazioni di cui sopra sono collegate, in base all\x00allocazione del premio come descritto alla sezione \x01Quando e \ncome devo pagare?\x02, al valore delle quote del Fondo Interno denominato PP27 Global Dividends.\nil Fondo interno mira al raggiungimento di un Obiettivo di Protezione del Valore Unitario di Quota, tramite il \nconseguimento di un Valore Unitario di Quota a scadenza almeno pari al 100% del valore di quota registrato alla Data \ndi istituzione dal Fondo Interno.\nIl regolamento di gestione del Fondo Interno è disponibile sul sito dell\x00Impresa di Assicurazione \nwww.axa-mpsfinancial.ie dove puo essere acquisito su supporto duraturo.\nDIP aggiuntivo IBIP - Progetto Protetto New - Global Dividends - Pag. 2 di 9\n", @@ -232,6 +230,7 @@ def test_3186(): "inoltrato all'impresa ed il relativo riscontro anche utilizzando il modello presente nel sito dell'IVASS \nalla sezione per il Consumatore - come presentare un reclamo.\nEventuali reclami potranno inoltre essere indirizzati all'Autorità Irlandese competente al seguente \nindirizzo:\nFinancial Services Ombudsman\n3rd Floor, Lincoln House,\nLincoln Place, Dublin 2, D02 VH29 Ireland\nIl reclamante può ricorrere ai sistemi alternativi per la risoluzione delle controversie previsti a livello \nnormativo o convenzionale, quali:\n\x04 Mediazione: (Decreto Legislativo n.28/2010 e ss.mm.) puo' essere avviata presentando istanza \nad un Organismo di Mediazione tra quelle presenti nell'elenco del Ministero della Giustizia, \nconsultabile sul sito www.giustizia.it. La legge ne prevede l'obbligatorieta' nel caso in cui si intenda \nesercitare in giudizio i propri diritti in materia di contratti assicurativi o finanziari e di risarcimento \nda responsabilita' medica e sanitaria, costituendo condizione di procedibilita' della domanda.\n\x04 Negoziazione Assistita: (Legge n.162/2014) tramite richiesta del proprio Avvocato all'Impresa. E' \nun accordo mediante il quale le parti convengono di cooperare in buona fede e con lealta' per \nrisolvere in via amichevole la controversia tramite l'assistenza di avvocati. Fine del procedimento e' \nla composizione bonaria della lite, con la sottoscrizione delle parti - assistite dai rispettivi difensori - \ndi un accordo detto convenzione di negoziazione. Viene prevista la sua obbligatorieta' nel caso in \ncui si intenda esercitare in giudizio i propri diritti per ogni controversia in materia di risarcimento del \ndanno da circolazione di veicoli e natanti, ovverosia e' condizione di procedibilita' per l'eventuale \ngiudizio civile. Invece e' facoltativa per ogni altra controversia in materia di risarcimenti o di contratti \nassicurativi o finanziari.\nIn caso di controversia relativa alla determinazione dei danni si puo' ricorrere alla perizia \ncontrattuale prevista dalle Condizioni di Assicurazione per la risoluzione di tale tipologia di \ncontroversie. L'istanza di attivazione della perizia contrattuale dovra' essere indirizzata alla \nCompagnia all' indirizzo\nAXA MPS Financial DAC \nWolfe Tone House, Wolfe Tone Street\nDublin DO1 HP90 - Ireland\nPer maggiori informazioni si rimanda a quanto presente nell'area Reclami del sito \nwww.axa-mpsfinancial.ie. \nPer la risoluzione delle liti transfrontaliere è possibile presentare reclamo all'IVASS o direttamente \nal sistema estero http://ec.europa.eu/internal_market/fin-net/members_en.htm competente \nchiedendo l'attivazione della procedura FIN-NET.\nEventuali reclami relativi la mancata osservanza da parte della Compagnia, degli intermediari e dei \nperiti assicurativi, delle disposizioni del Codice delle assicurazioni, delle relative norme di \nattuazione nonché delle norme sulla commercializzazione a distanza dei prodotti assicurativi \npossono essere presentati direttamente all'IVASS, secondo le modalità sopra indicate.\nSi ricorda che resta salva la facoltà di adire l'autorità giudiziaria.\nREGIME FISCALE\nTrattamento \nfiscale applicabile \nal contratto\nLe seguenti informazioni sintetizzano alcuni aspetti del regime fiscale applicabile al Contratto, ai \nsensi della legislazione tributaria italiana e della prassi vigente alla data di pubblicazione del \npresente documento, fermo restando che le stesse rimangono soggette a possibili cambiamenti che \npotrebbero avere altresì effetti retroattivi. Quanto segue non intende rappresentare un\x00analisi \nesauriente di tutte le conseguenze fiscali del Contratto. I Contraenti sono tenuti a consultare i loro \nconsulenti in merito al regime fiscale proprio del Contratto.\nTasse e imposte\nLe imposte e tasse presenti e future applicabili per legge al Contratto sono a carico del Contraente \no dei Beneficiari e aventi diritto e non è prevista la corresponsione al Contraente di alcuna somma \naggiuntiva volta a compensare eventuali riduzioni dei pagamenti relativi al Contratto.\nTassazione delle somme corrisposte a soggetti non esercenti attività d\x00impresa\n1. In caso di decesso dell\x00Assicurato\nLe somme corrisposte dall\x00Impresa di Assicurazione in caso di decesso dell\x00Assicurato non sono \nsoggette a tassazione IRPEF in capo al percettore e sono esenti dall\x00imposta sulle successioni. Si \nricorda tuttavia che, per effetto della legge 23 dicembre 2014 n. 190 (c.d.\x02Legge di Stabilità\x02), i \nDIP aggiuntivo IBIP - Progetto Protetto New - Global Dividends - Pag. 8 di 9\n", 'capitali percepiti in caso di morte, a decorrere dal 1 gennaio 2015, in dipendenza di contratti di \nassicurazione sulla vita, a copertura del rischio demografico, sono esenti dall\x00imposta sul reddito \ndelle persone fisiche.\n2. In caso di Riscatto totale o di Riscatto parziale.\nLe somme corrisposte dall\x05Impresa di Assicurazione in caso di Riscatto totale sono soggette ad \nun\x00imposta sostitutiva dell\x00imposta sui redditi nella misura prevista di volta in volta dalla legge. Tale \nimposta, al momento della redazione del presente documento, è pari al 26% sulla differenza \n(plusvalenza) tra il capitale maturato e l\x00ammontare dei premi versati (al netto di eventuali riscatti \nparziali), con l\x00eccezione dei proventi riferibili ai titoli di stato italiani ed equiparati (Paesi facenti \nparte della white list), per i quali l\x00imposta è pari al 12,5%.\nIn caso di Riscatto parziale, ai fini del computo del reddito di capitale da assoggettare alla predetta \nimposta sostitutiva, l\x00ammontare dei premi va rettificato in funzione del rapporto tra il capitale \nerogato ed il valore economico della polizza alla data del Riscatto parziale.\n3. In caso di Recesso\nLe somme corrisposte in caso di Recesso sono soggette all\x00imposta sostitutiva delle imposte sui \nredditi nella misura e con gli stessi criteri indicati per il Riscatto totale del Contratto.\nTassazione delle somme corrisposte a soggetti esercenti attività d\x00impresa\nLe somme corrisposte a soggetti che esercitano l\x00attività d\x00impresa non costituiscono redditi di \ncapitale, bensì redditi d\x00impresa. Su tali somme l\x00Impresa non applica l\x00imposta sostitutiva di cui \nall\x00art. 26-ter del D.P.R. 29 settembre 1973, n. 600.\nSe le somme sono corrisposte a persone fisiche o enti non commerciali in relazione a contratti \nstipulati nell\x00ambito dell\x00attività commerciale, l\x00Impresa non applica l\x00imposta sostitutiva, qualora gli \ninteressati presentino una dichiarazione in merito alla sussistenza di tale requisito.\nL\x00IMPRESA HA L\x00OBBLIGO DI TRASMETTERTI, ENTRO IL 31 MAGGIO DI OGNI ANNO, IL DOCUMENTO \nUNICO DI RENDICONTAZIONE ANNUALE DELLA TUA POSIZIONE ASSICURATIVA\nPER QUESTO CONTRATTO L\x00IMPRESA NON DISPONE DI UN\x00AREA INTERNET DISPOSITIVA RISERVATA \nAL CONTRAENTE (c.d. HOME INSURANCE), PERTANTO DOPO LA SOTTOSCRIZIONE NON POTRAI \nGESTIRE TELEMATICAMENTE IL CONTRATTO MEDESIMO.\nDIP aggiuntivo IBIP - Progetto Protetto New - Global Dividends - Pag. 9 di 9\n', ] + # codespell:ignore-end path = os.path.abspath(f'{__file__}/../../tests/resources/test_3186.pdf') fitz_doc = pymupdf.open(path) @@ -246,9 +245,6 @@ def test_3197(): ''' MuPDF's ActualText support fixes handling of test_3197.pdf. ''' - if pymupdf.mupdf_version_tuple < (1, 24): - print(f'Not running on {pymupdf.mupdf_version_tuple=}.') - return path = os.path.abspath(f'{__file__}/../../tests/resources/test_3197.pdf') text_utf8_expected = [ @@ -263,13 +259,14 @@ def test_3197(): text_utf8 = text.encode('utf8') #print(f' {text_utf8=}') #print(f' {text_utf8_expected[i]=}') - if pymupdf.mupdf_version_tuple >= (1, 24): - assert text_utf8 == text_utf8_expected[i] - else: - assert text_utf8 != text_utf8_expected[i] + assert text_utf8 == text_utf8_expected[i] def test_document_text(): + if os.environ.get('PYODIDE_ROOT'): + print('test_document_text(): not running on Pyodide - multiprocessing not available.') + return + import platform import time @@ -316,6 +313,20 @@ def llen(texts): pymupdf._log_items_clear() +def test_4524(): + if os.environ.get('PYODIDE_ROOT'): + print('test_4524(): not running on Pyodide - multiprocessing not available.') + return + path = os.path.abspath(f'{__file__}/../../tests/resources/mupdf_explored.pdf') + print('') + document = pymupdf.Document(path) + texts_single = pymupdf.get_text(path, method='single', pages=[1, 3, 5]) + texts_mp = pymupdf.get_text(path, method='mp', pages=[1, 3, 5]) + print(f'{len(texts_single)=}') + print(f'{len(texts_mp)=}') + assert texts_mp == texts_single + + def test_3594(): verbose = 0 print() @@ -327,10 +338,11 @@ def test_3594(): for line in text.split('\n'): print(f' {line!r}') print('='*40) - if pymupdf.mupdf_version_tuple < (1, 24, 3): - # We expect MuPDF warnings. - wt = pymupdf.TOOLS.mupdf_warnings() - assert wt + wt = pymupdf.TOOLS.mupdf_warnings() + if pymupdf.mupdf_version_tuple < (1, 26, 8): + assert not wt + else: + assert wt == 'Actualtext with no position. Text may be lost or mispositioned.\n... repeated 2 times...' def test_3687(): @@ -375,7 +387,14 @@ def get_all_page_from_pdf(document, last_page=None): assert texts1 == texts0 wt = pymupdf.TOOLS.mupdf_warnings() - assert wt == 'Actualtext with no position. Text may be lost or mispositioned.\n... repeated 434 times...' + if pymupdf.mupdf_version_tuple >= (1, 27): + expected = 'format error: No common ancestor in structure tree\nstructure tree broken, assume tree is missing' + expected = '\n'.join([expected] * 56) + assert wt == expected + elif pymupdf.mupdf_version_tuple >= (1, 26, 8): + assert wt == 'Actualtext with no position. Text may be lost or mispositioned.\n... repeated 7684 times...' + else: + assert wt == 'Actualtext with no position. Text may be lost or mispositioned.\n... repeated 434 times...' def test_3650(): path = os.path.normpath(f'{__file__}/../../tests/resources/test_3650.pdf') @@ -387,3 +406,566 @@ def test_3650(): 'RECUEIL DES ACTES ADMINISTRATIFS\n', 'n° 78 du 28 avril 2023\n', ] + +def test_4026(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4026.pdf') + with pymupdf.open(path) as document: + page = document[4] + blocks = page.get_text('blocks') + for i, block in enumerate(blocks): + print(f'block {i}: {block}') + assert len(blocks) == 5 + +def test_3725(): + # This currently just shows the extracted text. We don't check it is as expected. + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3725.pdf') + with pymupdf.open(path) as document: + page = document[0] + text = page.get_text() + if 0: + print(textwrap.indent(text, ' ')) + +def test_4147(): + print() + items = list() + for expect_visible, path in ( + (False, os.path.normpath(f'{__file__}/../../tests/resources/test_4147.pdf')), + (True, os.path.normpath(f'{__file__}/../../tests/resources/symbol-list.pdf')), + ): + print(f'{expect_visible=} {path=}') + with pymupdf.open(path) as document: + page = document[0] + text = page.get_text('rawdict') + for block in text['blocks']: + if block['type'] == 0: + #print(f' block') + for line in block['lines']: + #print(f' line') + for span in line['spans']: + #print(f' span') + if pymupdf.mupdf_version_tuple >= (1, 25, 2): + #print(f' span: {span["flags"]=:#x} {span["char_flags"]=:#x}') + if expect_visible: + assert span['char_flags'] & pymupdf.mupdf.FZ_STEXT_FILLED + else: + assert not (span['char_flags'] & pymupdf.mupdf.FZ_STEXT_FILLED) + assert not (span['char_flags'] & pymupdf.mupdf.FZ_STEXT_STROKED) + else: + #print(f' span: {span["flags"]=:#x}') + assert 'char_flags' not in span + # Check commit `add 'bidi' to span dict, add 'synthetic' to char dict.` + assert span['bidi'] == 0 + for ch in span['chars']: + assert isinstance(ch['synthetic'], bool) + + +def test_4139(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4139.pdf') + flags = (0 + | pymupdf.TEXT_PRESERVE_IMAGES + | pymupdf.TEXT_PRESERVE_WHITESPACE + | pymupdf.TEXT_USE_CID_FOR_UNKNOWN_UNICODE + ) + with pymupdf.open(path) as document: + page = document[0] + dicts = page.get_text('dict', flags=flags, sort=True) + seen = set() + for b_ctr, b in enumerate(dicts['blocks']): + for l_ctr, l in enumerate(b.get('lines', [])): + for s_ctr, s in enumerate(l['spans']): + color = s.get('color') + if color is not None and color not in seen: + seen.add(color) + print(f"B{b_ctr}.L{l_ctr}.S{s_ctr}: {color=} {hex(color)=} {s=}") + assert color == 0, f'{s=}' + assert s['alpha'] == 255 + + +def test_4245(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4245.pdf') + with pymupdf.open(path) as document: + page = document[0] + regions = page.search_for('Bart Simpson') + print(f'{regions=}') + page.add_highlight_annot(regions) + with pymupdf.open(path) as document: + page = document[0] + regions = page.search_for('Bart Simpson') + for region in regions: + highlight = page.add_highlight_annot(region) + highlight.update() + pixmap = page.get_pixmap() + path_out = os.path.normpath(f'{__file__}/../../tests/resources/test_4245_out.png') + pixmap.save(path_out) + + path_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_4245_expected.png') + rms = gentle_compare.pixmaps_rms(path_expected, pixmap) + pixmap_diff = gentle_compare.pixmaps_diff(path_expected, pixmap) + path_diff = os.path.normpath(f'{__file__}/../../tests/resources/test_4245_diff.png') + pixmap_diff.save(path_diff) + print(f'{rms=}') + if pymupdf.mupdf_version_tuple < (1, 25, 5): + # Prior to fix for mupdf bug 708274. + assert 0.1 < rms < 0.2 + else: + assert rms < 0.01 + + +def test_4180(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4180.pdf') + with pymupdf.open(path) as document: + page = document[0] + regions = page.search_for('Reference is made') + for region in regions: + page.add_redact_annot(region, fill=(0, 0, 0)) + page.apply_redactions() + pixmap = page.get_pixmap() + path_out = os.path.normpath(f'{__file__}/../../tests/resources/test_4180_out.png') + pixmap.save(path_out) + + path_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_4180_expected.png') + rms = gentle_compare.pixmaps_rms(path_expected, pixmap) + pixmap_diff = gentle_compare.pixmaps_diff(path_expected, pixmap) + path_diff = os.path.normpath(f'{__file__}/../../tests/resources/test_4180_diff.png') + pixmap_diff.save(path_diff) + print(f'{rms=}') + if pymupdf.mupdf_version_tuple < (1, 25, 5): + # Prior to fix for mupdf bug 708274. + assert 0.2 < rms < 0.3 + else: + assert rms < 0.01 + + +def test_4182(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4182.pdf') + with pymupdf.open(path) as document: + page = document[0] + dict_ = page.get_text('dict') + linelist = [] + for block in dict_['blocks']: + if block['type'] == 0: + paranum = block['number'] + if 'lines' in block: + for line in block.get('lines', ()): + for span in line['spans']: + if span['text'].strip(): + page.draw_rect(span['bbox'], color=(1, 0, 0)) + linelist.append([paranum, span['bbox'], repr(span['text'])]) + pixmap = page.get_pixmap() + path_out = os.path.normpath(f'{__file__}/../../tests/resources/test_4182_out.png') + pixmap.save(path_out) + if platform.system() != 'Windows': # Output on Windows can fail due to non-utf8 stdout. + for l in linelist: + print(l) + path_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_4182_expected.png') + pixmap_diff = gentle_compare.pixmaps_diff(path_expected, pixmap) + path_diff = os.path.normpath(f'{__file__}/../../tests/resources/test_4182_diff.png') + pixmap_diff.save(path_diff) + rms = gentle_compare.pixmaps_rms(path_expected, pixmap) + print(f'{rms=}') + if pymupdf.mupdf_version_tuple < (1, 25, 5): + # Prior to fix for mupdf bug 708274. + assert 3 < rms < 3.5 + else: + assert rms < 0.01 + + +def test_4179(): + if os.environ.get('PYMUPDF_USE_EXTRA') == '0': + # Looks like Python code doesn't behave same as C++, probably because + # of the code not being correct for Python's native unicode strings. + # + print(f'test_4179(): Not running with PYMUPDF_USE_EXTRA=0 because known to fail.') + return + # We check that using TEXT_ACCURATE_BBOXES gives the correct boxes. But + # this also requires that we disable PyMuPDF quad corrections. + # + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4179.pdf') + + # Disable anti-aliasing to avoid our drawing of multiple identical bboxes + # (from normal/accurate bboxes) giving slightly different results. + aa = pymupdf.mupdf.fz_aa_level() + uqc = pymupdf._globals.skip_quad_corrections + pymupdf.TOOLS.set_aa_level(0) + pymupdf.TOOLS.unset_quad_corrections(True) + assert pymupdf._globals.skip_quad_corrections + try: + with pymupdf.open(path) as document: + page = document[0] + + char_sqrt = b'\xe2\x88\x9a'.decode() + + # Search with defaults. + bboxes_search = page.search_for(char_sqrt) + assert len(bboxes_search) == 1 + print(f'bboxes_search[0]:\n {bboxes_search[0]!r}') + page.draw_rect(bboxes_search[0], color=(1, 0, 0)) + rms = gentle_compare.rms(bboxes_search[0], (250.0489959716797, 91.93604278564453, 258.34783935546875, 101.34073638916016)) + assert rms < 0.01 + + # Search with TEXT_ACCURATE_BBOXES. + bboxes_search_accurate = page.search_for( + char_sqrt, + flags = (0 + | pymupdf.TEXT_DEHYPHENATE + | pymupdf.TEXT_PRESERVE_WHITESPACE + | pymupdf.TEXT_PRESERVE_LIGATURES + | pymupdf.TEXT_MEDIABOX_CLIP + | pymupdf.TEXT_ACCURATE_BBOXES + ), + ) + assert len(bboxes_search_accurate) == 1 + print(f'bboxes_search_accurate[0]\n {bboxes_search_accurate[0]!r}') + page.draw_rect(bboxes_search_accurate[0], color=(0, 1, 0)) + rms = gentle_compare.rms(bboxes_search_accurate[0], (250.0489959716797, 99.00948333740234, 258.34783935546875, 108.97208404541016)) + assert rms < 0.01 + + # Iterate with TEXT_ACCURATE_BBOXES. + bboxes_iterate_accurate = list() + dict_ = page.get_text( + 'rawdict', + flags = pymupdf.TEXT_ACCURATE_BBOXES, + ) + linelist = [] + for block in dict_['blocks']: + if block['type'] == 0: + if 'lines' in block: + for line in block.get('lines', ()): + for span in line['spans']: + for ch in span['chars']: + if ch['c'] == char_sqrt: + bbox_iterate_accurate = ch['bbox'] + bboxes_iterate_accurate.append(bbox_iterate_accurate) + print(f'bbox_iterate_accurate:\n {bbox_iterate_accurate!r}') + page.draw_rect(bbox_iterate_accurate, color=(0, 0, 1)) + + assert bboxes_search_accurate != bboxes_search + assert bboxes_iterate_accurate == bboxes_search_accurate + pixmap = page.get_pixmap() + + path_out = os.path.normpath(f'{__file__}/../../tests/resources/test_4179_out.png') + pixmap.save(path_out) + path_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_4179_expected.png') + rms = gentle_compare.pixmaps_rms(path_expected, pixmap) + pixmap_diff = gentle_compare.pixmaps_diff(path_expected, pixmap) + path_out_diff = os.path.normpath(f'{__file__}/../../tests/resources/test_4179_diff.png') + pixmap_diff.save(path_out_diff) + print(f'Have saved to: {path_out_diff=}') + print(f'{rms=}') + if pymupdf.mupdf_version_tuple < (1, 25, 5): + # Prior to fix for mupdf bug 708274, our rects are rendered slightly incorrectly. + assert 3.5 < rms < 4.5 + else: + assert rms < 0.01 + + finally: + pymupdf.TOOLS.set_aa_level(aa) + pymupdf.TOOLS.unset_quad_corrections(uqc) + + +def test_extendable_textpage(): + + # 2025-01-28: + # + # We can create a pdf with two pages whose text is adjacent when stitched + # together vertically: + # + # Page 1: + # + # aaaa + # + # bbbb + # cccc + # + # dddd + # + # Page 2: + # + # eeee + # + # ffff + # gggg + # + # hhhh + # + # + # Create a textpage for both of these pages. Then when extracting text, + # we need to get (specifically the `dddd` and `eeee` sequences need to be + # treated as the same block): + # + # aaaa + # + # bbbb + # cccc + # + # dddd + # eeee + # + # ffff + # gggg + # + # hhhh + # + print() + + path = os.path.normpath(f'{__file__}/../../tests/test_extendable_textpage.pdf') + with pymupdf.open(filetype='pdf') as document: + document.new_page() + document.new_page() + page0 = document[0] + page1 = document[1] + y = 100 + line_height = 9.6 + for i in range(4): + page0.insert_text((100, y+line_height), 'abcd'[i] * 16) + page1.insert_text((100, y+line_height), 'efgh'[i] * 16) + y += line_height + if i%2 == 0: + y += line_height + rect = pymupdf.mupdf.FzRect(100, 100, 200, y) + document[0].draw_rect(rect, (1, 0, 0)) + document[1].draw_rect(rect, (1, 0, 0)) + document.save(path) + + # Create a stext page for the text regions in both pages of our document, + # using direct calls to MuPDF. + # + + with pymupdf.Document(path) as document: + + # Notes: + # + # We need to reuse the stext device for second page. Otherwise if we + # create a new device, the first text in second page will always be in + # a new block, because pen position for new device is (0, 0) and this + # will usually be treated as a paragraph gap to the first text. + # + # At the moment we use infinite mediabox when creating the + # fz_stext_page. I don't know what a non-infinite mediabox would be + # useful for. + # + # FZ_STEXT_CLIP_RECT isn't useful at the moment, because we would need + # to modify it to be in stext pagae coordinates (i.e. adding ctm.f + # to y0 and y1) when we append the second page. But it's internal + # data and there's no api to modify it. So for now we don't specify + # FZ_STEXT_CLIP_RECT when creating the stext device, so we always + # include each page's entire contents. + # + + # We use our knowledge of the text rect in each page to manipulate ctm + # so that the stext contains text starting at (0, 0) and extending + # downwards. + # + y = 0 + cookie = pymupdf.mupdf.FzCookie() + + stext_page = pymupdf.mupdf.FzStextPage( + pymupdf.mupdf.FzRect(pymupdf.mupdf.FzRect.Fixed_INFINITE), # mediabox + ) + stext_options = pymupdf.mupdf.FzStextOptions() + #stext_options.flags |= pymupdf.mupdf.FZ_STEXT_CLIP_RECT + #stext_options.clip = rect.internal() + device = pymupdf.mupdf.fz_new_stext_device(stext_page, stext_options) + + # Add first page to stext_page at (0, y), and update for the next + # page. + page = document[0] + ctm = pymupdf.mupdf.FzMatrix(1, 0, 0, 1, -rect.x0, -rect.y0 + y) + pymupdf.mupdf.fz_run_page(page.this, device, ctm, cookie) + y += rect.y1 - rect.y0 + + # Add second page to stext_page at (0, y), and update for the next + # page. + page = document[1] + ctm = pymupdf.mupdf.FzMatrix(1, 0, 0, 1, -rect.x0, -rect.y0 + y) + pymupdf.mupdf.fz_run_page(page.this, device, ctm, cookie) + y += rect.y1 - rect.y0 + + # We've finished adding text to stext_page. + pymupdf.mupdf.fz_close_device(device) + + # Create a pymupdf.TextPage() for so we can use + # text_page.extractDICT() etc. + text_page = pymupdf.TextPage(stext_page) + + # Read text from stext_page using text_page.extractDICT(). + print(f'Using text_page.extractDICT().') + print(f'{text_page.this.m_internal.mediabox=}') + d = text_page.extractDICT(sort=True) + y0_prev = None + pno = 0 + ydelta = 0 + for block in d['blocks']: + print(f'block {block["bbox"]=}') + for line in block['lines']: + print(f' line {line["bbox"]=}') + for span in line['spans']: + print(f' span {span["bbox"]=}') + bbox = span['bbox'] + x0, y0, x1, y1 = bbox + dy = y0 - y0_prev if y0_prev else 0 + y0_prev = y0 + print(f' {dy=: 5.2f} height={y1-y0:.02f} {x0:.02f} {y0:.02f} {x1:.02f} {y1:.02f} {span["text"]=}') + if 'eee' in span['text']: + pno = 1 + ydelta = rect.y1 - rect.y0 + y0 -= ydelta + y1 -= ydelta + # Debugging - add green lines on original document + # translating final blocks info into original coors. + document[pno].draw_rect((x0, y0, x1, y1), (0, 1, 0)) + + print('\n\n') + + print(f'Using text_page.extractText()') + text = text_page.extractText(True) + print(f'{text}') + + print('\n\n') + print(f'Using extractBLOCKS') + text = list() + for x0, y0, x1, y1, line, no, type_ in text_page.extractBLOCKS(): + print(f'block:') + print(f' bbox={x0, y0, x1, y1} {no=}') + print(f' {line=}') + text.append(line) + + print("\n\n") + print(f'extractBLOCKS joined by newlines:') + print('\n'.join(text)) + + # This checks that lines before/after pages break are treated as a + # single paragraph. + assert text == [ + 'aaaaaaaaaaaaaaaa\n', + 'bbbbbbbbbbbbbbbb\ncccccccccccccccc\n', + 'dddddddddddddddd\neeeeeeeeeeeeeeee\n', + 'ffffffffffffffff\ngggggggggggggggg\n', + 'hhhhhhhhhhhhhhhh\n', + ] + + path3 = os.path.normpath(f'{__file__}/../../tests/test_extendable_textpage3.pdf') + document.save(path3) + + +def test_4363(): + print() + print(f'{pymupdf.version=}') + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4363.pdf') + n = 0 + texts = list() + with pymupdf.open(path) as document: + assert len(document) == 1 + page = document[0] + t = page.search_for('tour') + print(f'{t=}') + n += len(t) + text = page.get_text() + texts.append(text) + print(f'{n=}') + print(f'{len(texts)=}') + text = texts[0] + print('text:') + print(f'{text=}') + text_expected = ( + 'Deal Roadshow SiteTour\n' + 'We know your process. We know your standard.\n' + 'Professional Site Tour Video Productions for the Capital Markets.\n' + '1\n' + ) + if text != text_expected: + print(f'Expected:\n {text_expected!r}') + print(f'Found:\n {text!r}') + assert 0 + + +def test_4546(): + # This issue will not be fixed (in mupdf) because the test input is faulty. + # + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4546.pdf') + with pymupdf.open(path) as document: + page = document[0] + text = page.get_text()[:200] + + # We can't actually test with 1.23.5 because it uses `fitz.` not `pymupdf.`. + expected_1_23_5 = b'JOB No.: \nShipper (complete name and address) \xe5\x8f\x91\xe8\xb4\xa7\xe4\xba\xba(\xe5\x90\x8d\xe7\xa7\xb0\xe5\x8f\x8a\xe5\x9c\xb0\n\xe5\x9d\x80) \nSINORICH TRANSPORT LIMITED\nADD:7C,WEST BLDG.,ZHONGQU\nMANSION,211 ZHONGSHAN\nRD. SHANTOU,515041 CN\nTEL:0754-88570001 FAX:0754-88572709\nS/O No. '.decode() + + # This output is different from expected_1_23_5. + expected_mupdf_1_26_1 = b'JOB No.: Shipper (complete name and address) \xe5\x8f\x91\xe8\xb4\xa7\xe4\xba\xba(\xe5\x90\x8d\xe7\xa7\xb0\xe5\x8f\x8a\xe5\x9c\xb0\xe5\x9d\x80) Tel: Fax: \n \nS/O No. \xe6\x89\x98\xe8\xbf\x90\xe5\x8d\x95\xe5\x8f\xb7\xe7\xa0\x81 \nSINORICH TRANSPORT LIMITED \nSHIPPING ORDER \n\xe6\x89\x98\xe8\xbf\x90\xe5\x8d\x95 \n \xe5\xb8\x82\xe5\x9c\xba\xe9\x83\xa8: \n88570009 \n88577019 \n88'.decode() + + # This output is different from either of the two expected strings. + expected_mupdf_1_27_0 = b'JOB No.: \n \nS/O No. \xe6\x89\x98\xe8\xbf\x90\xe5\x8d\x95\xe5\x8f\xb7\xe7\xa0\x81 \nSINORICH TRANSPORT LIMITED \nSHIPPING ORDER \n\xe6\x89\x98\xe8\xbf\x90\xe5\x8d\x95 \n \xe5\xb8\x82\xe5\x9c\xba\xe9\x83\xa8: \n88570009 \n88577019 \n88572702 \n \xe6\x93\x8d\xe4\xbd\x9c\xe9\x83\xa8: \n88570008 \n88570004 \n \xe6\x96\x87\xe4\xbb\xb6\xe9\x83\xa8: \n88570003\n \nNotify Party(complete name and address, '.decode() + + print(f'expected_1_23_5\n{textwrap.indent(expected_1_23_5, " ")}') + print(f'expected_mupdf_1_26_1\n{textwrap.indent(expected_mupdf_1_26_1, " ")}') + + print(f'{pymupdf.version=}') + print(f'text is:\n{textwrap.indent(text, " ")}') + print(f'{text=}') + print(f'{text.encode()=}') + + wt = pymupdf.TOOLS.mupdf_warnings() + if pymupdf.mupdf_version_tuple >= (1, 26, 8): + assert text == expected_mupdf_1_27_0 + assert wt == 'Actualtext with no position. Text may be lost or mispositioned.\n... repeated 120 times...' + elif pymupdf.mupdf_version_tuple >= (1, 26, 1): + assert text == expected_mupdf_1_26_1 + assert not wt + else: + print(f'No expected output for {pymupdf.mupdf_version_tuple=}') + assert not wt + + +def test_4503(): + # Check detection of strikeout text. Behaviour is improved with + # mupdf>=1.26.2, and fixed with mupdf>=1.26.3. + # + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4503.pdf') + span_0 = None + text_0 = None + print() + print(f'{pymupdf.mupdf_version_tuple=}') + with pymupdf.open(path) as document: + page = document[0] + # Specify TEXT_COLLECT_STYLES so we collect char_flags, which contains + # FZ_STEXT_STRIKEOUT etc. + # + text = page.get_text('rawdict', flags=pymupdf.TEXTFLAGS_RAWDICT | pymupdf.TEXT_COLLECT_STYLES) + for i, block in enumerate(text['blocks']): + print(f'block {i}:') + for j, line in enumerate(block['lines']): + print(f' line {j}:') + for k, span in enumerate(line['spans']): + text = '' + for char in span['chars']: + text += char['c'] + print(f' span {k}: {span["flags"]=:#x} {span["char_flags"]=:#x}: {text!r}') + if 'the right to request the state to review' in text: + span_0 = span + text_0 = text + assert span_0 + #print(f'{span_0=}') + print(f'{span_0["flags"]=:#x}') + print(f'{span_0["char_flags"]=:#x}') + print(f'{text_0=}') + strikeout = span_0['char_flags'] & pymupdf.mupdf.FZ_STEXT_STRIKEOUT + print(f'{strikeout=}') + + if pymupdf.mupdf_version_tuple >= (1, 26, 3): + assert strikeout, f'Expected bit 0 (FZ_STEXT_STRIKEOUT) to be set in {span_0["char_flags"]=:#x}.' + assert text_0 == 'the right to request the state to review and, if appropriate,' + elif pymupdf.mupdf_version_tuple >= (1, 26, 2): + # 2025-06-09: This is still incorrect - the span should include the + # following text 'and, if appropriate,'. It looks like following spans + # are: + # strikeout=0: 'and, ' + # strikeout=1: 'if ' + # strikeout=0: 'appropri' + # strikeout=1: 'ate,' + # + assert strikeout, f'Expected bit 0 (FZ_STEXT_STRIKEOUT) to be set in {span_0["char_flags"]=:#x}.' + assert text_0 == 'the right to request the state to review ' + else: + # Expecting the bug. + assert not strikeout, f'Expected bit 0 (FZ_STEXT_STRIKEOUT) to be unset in {span_0["char_flags"]=:#x}.' + assert text_0 == 'notice the right to request the state to review and, if appropriate,' diff --git a/tests/test_toc.py b/tests/test_toc.py index 198fe62ee..92ab81894 100644 --- a/tests/test_toc.py +++ b/tests/test_toc.py @@ -76,8 +76,8 @@ def test_circular(): """The test file contains circular bookmarks.""" doc = pymupdf.open(circular) toc = doc.get_toc(False) # this must not loop - rebased = hasattr(pymupdf, 'mupdf') - if rebased: + if pymupdf.mupdf_version_tuple < (1, 27): + # Expect warning. wt = pymupdf.TOOLS.mupdf_warnings() assert wt == 'Bad or missing prev pointer in outline tree, repairing', \ f'{wt=}' @@ -187,10 +187,10 @@ def test_3347(): }) links_expected = [ - (0, {'kind': 1, 'xref': 11, 'from': pymupdf.Rect(10.0, 20.0, 50.0, 40.0), 'page': 0, 'to': pymupdf.Point(300.0, 350.0), 'zoom': 0.0, 'id': 'jorj-L0'}), - (0, {'kind': 1, 'xref': 12, 'from': pymupdf.Rect(300.0, 350.0, 400.0, 450.0), 'page': 1, 'to': pymupdf.Point(20.0, 30.0), 'zoom': 0.0, 'id': 'jorj-L1'}), - (1, {'kind': 1, 'xref': 13, 'from': pymupdf.Rect(20.0, 30.0, 40.0, 50.0), 'page': 1, 'to': pymupdf.Point(350.0, 300.0), 'zoom': 0.0, 'id': 'jorj-L0'}), - (1, {'kind': 1, 'xref': 14, 'from': pymupdf.Rect(350.0, 300.0, 450.0, 400.0), 'page': 0, 'to': pymupdf.Point(10.0, 20.0), 'zoom': 0.0, 'id': 'jorj-L1'}), + (0, {'kind': 1, 'xref': 11, 'from': pymupdf.Rect(10.0, 20.0, 50.0, 40.0), 'page': 0, 'to': pymupdf.Point(300.0, 350.0), 'zoom': 0.0, 'id': 'fitz-L0'}), + (0, {'kind': 1, 'xref': 12, 'from': pymupdf.Rect(300.0, 350.0, 400.0, 450.0), 'page': 1, 'to': pymupdf.Point(20.0, 30.0), 'zoom': 0.0, 'id': 'fitz-L1'}), + (1, {'kind': 1, 'xref': 13, 'from': pymupdf.Rect(20.0, 30.0, 40.0, 50.0), 'page': 1, 'to': pymupdf.Point(350.0, 300.0), 'zoom': 0.0, 'id': 'fitz-L0'}), + (1, {'kind': 1, 'xref': 14, 'from': pymupdf.Rect(350.0, 300.0, 450.0, 400.0), 'page': 0, 'to': pymupdf.Point(10.0, 20.0), 'zoom': 0.0, 'id': 'fitz-L1'}), ] path = os.path.normpath(f'{__file__}/../../tests/test_3347_out.pdf') @@ -264,7 +264,7 @@ def test_3400(): print(f'Saved to {path=}.') links_expected = [ - (1, {'kind': 1, 'xref': 1120, 'from': pymupdf.Rect(10.0, 10.0, 100.0, 50.0), 'page': 0, 'to': pymupdf.Point(187.5, 472.5), 'zoom': 0.0, 'id': 'jorj-L0'}) + (1, {'kind': 1, 'xref': 1120, 'from': pymupdf.Rect(10.0, 10.0, 100.0, 50.0), 'page': 0, 'to': pymupdf.Point(187.5, 472.5), 'zoom': 0.0, 'id': 'fitz-L0'}) ] links_actual = list() diff --git a/tests/test_widgets.py b/tests/test_widgets.py index 91594f8fd..9eafd0246 100644 --- a/tests/test_widgets.py +++ b/tests/test_widgets.py @@ -8,6 +8,7 @@ scriptdir = os.path.abspath(os.path.dirname(__file__)) filename = os.path.join(scriptdir, "resources", "widgettest.pdf") file_2333 = os.path.join(scriptdir, "resources", "test-2333.pdf") +file_4055 = os.path.join(scriptdir, "resources", "test-4055.pdf") doc = pymupdf.open() @@ -317,3 +318,115 @@ def test_interfield_calculation(): pymupdf.mupdf.pdf_to_num(pymupdf.mupdf.pdf_array_get(CO, i)) == list(page.widgets())[-1].xref ) + + +def test_3950(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_3950.pdf') + items = list() + with pymupdf.open(path) as document: + for page in document: + for widget in page.widgets(): + items.append(widget.field_label) + print(f'test_3950(): {widget.field_label=}.') + assert items == [ + '{{ named_insured }}', + '{{ policy_period_start_date }}', + '{{ policy_period_end_date }}', + '{{ insurance_line }}', + ] + + +def test_4004(): + import collections + + def get_widgets_by_name(doc): + """ + Extracts and returns a dictionary of widgets indexed by their names. + """ + widgets_by_name = collections.defaultdict(list) + for page_num in range(len(doc)): + page = doc.load_page(page_num) + for field in page.widgets(): + widgets_by_name[field.field_name].append({ + "page_num": page_num, + "widget": field + }) + return widgets_by_name + + # Open document and get widgets + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4004.pdf') + doc = pymupdf.open(path) + widgets_by_name = get_widgets_by_name(doc) + + # Print widget information + for name, widgets in widgets_by_name.items(): + print(f"Widget Name: {name}") + for entry in widgets: + widget = entry["widget"] + page_num = entry["page_num"] + print(f" Page: {page_num + 1}, Type: {widget.field_type}, Value: {widget.field_value}, Rect: {widget.rect}") + + # Attempt to update field value + w = widgets_by_name["Text1"][0] + field = w['widget'] + field.value = "1234567890" + try: + field.update() + except Exception as e: + assert str(e) == 'Annot is not bound to a page' + + doc.close() + + +def test_4055(): + """Check correct setting of CheckBox "Yes" values. + + Test scope: + * setting on with any of 'True' / 'Yes' / built-in values works + * setting off with any of 'False' or 'Off' works + """ + + # this PDF has digits as "Yes" values. + doc = pymupdf.open(file_4055) + page = doc[0] + + # Round 1: confirm all check boxes are off + for w in page.widgets(types=[2]): + # check that this file doesn't use the "Yes" standard + assert w.on_state() != "Yes" + assert w.field_value == "Off" # all check boxes are off + w.field_value = w.on_state() + w.update() + + page = doc.reload_page(page) # reload page to make sure we start fresh + + # Round 2: confirm that fields contain the PDF's own on values + for w in page.widgets(types=[2]): + # confirm each value coincides with the "Yes" value + assert w.field_value == w.on_state() + w.field_value = False # switch to "Off" using False + w.update() + + page = doc.reload_page(page) + + # Round 3: confirm that 'False' achieved "Off" values + for w in page.widgets(types=[2]): + assert w.field_value == "Off" + w.field_value = True # use True for the next round + w.update() + + page = doc.reload_page(page) + + # Round 4: confirm that setting to True also worked + for w in page.widgets(types=[2]): + assert w.field_value == w.on_state() + w.field_value = "Off" # set off again + w.update() + w.field_value = "Yes" + w.update() + + page = doc.reload_page(page) + + # Round 5: final check: setting to "Yes" also does work + for w in page.widgets(types=[2]): + assert w.field_value == w.on_state() diff --git a/tests/util.py b/tests/util.py new file mode 100644 index 000000000..dbb246581 --- /dev/null +++ b/tests/util.py @@ -0,0 +1,28 @@ +import os +import subprocess + + +def download(url, name, size=None): + ''' + Downloads from to a local file and returns its path. + + If file already exists and matches we do not re-download it. + + We put local files within a `cache/` directory so that it is not deleted by + `git clean` (unless `-d` is specified). + ''' + path = os.path.normpath(f'{__file__}/../../tests/cache/{name}') + if os.path.isfile(path) and (not size or os.stat(path).st_size == size): + print(f'Using existing file {path=}.') + else: + print(f'Downloading from {url=}.') + subprocess.run(f'pip install -U requests', check=1, shell=1) + import requests + r = requests.get(url, path, timeout=10) + r.raise_for_status() + if size is not None: + assert len(r.content) == size + os.makedirs(os.path.dirname(path), exist_ok=1) + with open(path, 'wb') as f: + f.write(r.content) + return path diff --git a/wdev.py b/wdev.py index d2d1c86ac..33c348459 100644 --- a/wdev.py +++ b/wdev.py @@ -13,6 +13,7 @@ import pipcl + class WindowsVS: r''' Windows only. Finds locations of Visual Studio command-line tools. Assumes @@ -33,7 +34,16 @@ class WindowsVS: `.csc` is C# compiler; will be None if not found. ''' - def __init__( self, year=None, grade=None, version=None, cpu=None, verbose=False): + def __init__( + self, + *, + year=None, + grade=None, + version=None, + cpu=None, + directory=None, + verbose=False, + ): ''' Args: year: @@ -52,7 +62,15 @@ def __init__( self, year=None, grade=None, version=None, cpu=None, verbose=False variable WDEV_VS_VERSION if set. cpu: None or a `WindowsCpu` instance. + directory: + Ignore year, grade, version and cpu and use this directory + directly. + verbose: + . + ''' + if year is not None: + year = str(year) # Allow specification as a number. def default(value, name): if value is None: name2 = f'WDEV_VS_{name.upper()}' @@ -68,16 +86,17 @@ def default(value, name): if not cpu: cpu = WindowsCpu() - # Find `directory`. - # - pattern = f'C:\\Program Files*\\Microsoft Visual Studio\\{year if year else "2*"}\\{grade if grade else "*"}' - directories = glob.glob( pattern) - if verbose: - _log( f'Matches for: {pattern=}') - _log( f'{directories=}') - assert directories, f'No match found for: {pattern}' - directories.sort() - directory = directories[-1] + if not directory: + # Find `directory`. + # + pattern = _vs_pattern(year, grade) + directories = glob.glob( pattern) + if verbose: + _log( f'Matches for: {pattern=}') + _log( f'{directories=}') + assert directories, f'No match found for {pattern=}.' + directories.sort() + directory = directories[-1] # Find `devenv`. # @@ -167,7 +186,7 @@ def default(value, name): self.year = year self.cpu = cpu except Exception as e: - raise Exception( f'Unable to find Visual Studio') from e + raise Exception( f'Unable to find Visual Studio {year=} {grade=} {version=} {cpu=} {directory=}') from e def description_ml( self, indent=''): ''' @@ -189,7 +208,40 @@ def description_ml( self, indent=''): return textwrap.indent( ret, indent) def __repr__( self): - return ' '.join( self._description()) + items = list() + for name in ( + 'year', + 'grade', + 'version', + 'directory', + 'vcvars', + 'cl', + 'link', + 'csc', + 'msbuild', + 'devenv', + 'cpu', + ): + items.append(f'{name}={getattr(self, name)!r}') + return ' '.join(items) + + +def _vs_pattern(year=None, grade=None): + return f'C:\\Program Files*\\Microsoft Visual Studio\\{year if year else "2*"}\\{grade if grade else "*"}' + + +def windows_vs_multiple(year=None, grade=None, verbose=0): + ''' + Returns list of WindowsVS instances. + ''' + ret = list() + directories = glob.glob(_vs_pattern(year, grade)) + for directory in directories: + vs = WindowsVS(directory=directory) + if verbose: + _log(vs.description_ml()) + ret.append(vs) + return ret class WindowsCpu: