Full Code of ocrmypdf/OCRmyPDF for AI

main ef76625abb80 cached
236 files
1.6 MB
408.9k tokens
1474 symbols
1 requests
Download .txt
Showing preview only (1,701K chars total). Download the full file or copy to clipboard to get everything.
Repository: ocrmypdf/OCRmyPDF
Branch: main
Commit: ef76625abb80
Files: 236
Total size: 1.6 MB

Directory structure:
gitextract_k_dq053s/

├── .docker/
│   ├── Dockerfile
│   └── Dockerfile.alpine
├── .dockerignore
├── .git_archival.txt
├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── 1-bug-report-general.yml
│   │   ├── 2-problem-with-specific-file.yml
│   │   ├── 3-app.yml
│   │   └── 4-feature-request.yml
│   ├── dependabot.yml
│   └── workflows/
│       ├── build.yml
│       ├── release.yml
│       └── triage.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .readthedocs.yaml
├── LICENSE
├── LICENSES/
│   ├── AGPL-3.0-or-later.txt
│   ├── Apache-2.0.txt
│   ├── CC-BY-SA-1.0.txt
│   ├── CC-BY-SA-2.0.txt
│   ├── CC-BY-SA-2.5.txt
│   ├── CC-BY-SA-3.0.txt
│   ├── CC-BY-SA-4.0.txt
│   ├── GFDL-1.2-or-later.txt
│   ├── MIT.txt
│   ├── MPL-2.0.txt
│   └── Zlib.txt
├── README.md
├── README_ZH.md
├── REUSE.toml
├── bin/
│   └── bump_version.py
├── docs/
│   ├── advanced.md
│   ├── api.md
│   ├── apiref.md
│   ├── batch.md
│   ├── cloud.md
│   ├── conf.py
│   ├── contributing.md
│   ├── cookbook.md
│   ├── design_notes.md
│   ├── docker.md
│   ├── errors.md
│   ├── index.md
│   ├── installation.md
│   ├── introduction.md
│   ├── jbig2.md
│   ├── languages.md
│   ├── maintainers.md
│   ├── optimizer.md
│   ├── pdfsecurity.md
│   ├── performance.md
│   ├── plugins.md
│   └── releasenotes/
│       ├── index.md
│       ├── version02.md
│       ├── version03.md
│       ├── version04.md
│       ├── version05.md
│       ├── version06.md
│       ├── version07.md
│       ├── version08.md
│       ├── version09.md
│       ├── version10.md
│       ├── version11.md
│       ├── version12.md
│       ├── version13.md
│       ├── version14.md
│       ├── version15.md
│       ├── version16.md
│       └── version17.md
├── misc/
│   ├── _webservice.py
│   ├── batch.py
│   ├── bisect_pdf.py
│   ├── completion/
│   │   ├── ocrmypdf.bash
│   │   └── ocrmypdf.fish
│   ├── docker-compose.example.yml
│   ├── example_plugin.py
│   ├── flatpak/
│   │   └── io.ocrmypdf.ocrmypdf.metainfo.xml
│   ├── ocrmypdf_compare.py
│   ├── pdf_compare.py
│   ├── pdf_text_diff.py
│   ├── screencast/
│   │   ├── README.md
│   │   └── demo.cast
│   ├── synology.py
│   ├── watcher.py
│   └── webservice.py
├── pyproject.toml
├── scripts/
│   └── generate_glyphless_font.py
├── snapcraft.yaml
├── src/
│   └── ocrmypdf/
│       ├── RELEASE.md
│       ├── __init__.py
│       ├── __main__.py
│       ├── _annots.py
│       ├── _concurrent.py
│       ├── _defaults.py
│       ├── _exec/
│       │   ├── __init__.py
│       │   ├── ghostscript.py
│       │   ├── jbig2enc.py
│       │   ├── pngquant.py
│       │   ├── tesseract.py
│       │   ├── unpaper.py
│       │   └── verapdf.py
│       ├── _graft.py
│       ├── _jobcontext.py
│       ├── _logging.py
│       ├── _metadata.py
│       ├── _options.py
│       ├── _pipeline.py
│       ├── _pipelines/
│       │   ├── __init__.py
│       │   ├── _common.py
│       │   ├── hocr_to_ocr_pdf.py
│       │   ├── ocr.py
│       │   └── pdf_to_hocr.py
│       ├── _plugin_manager.py
│       ├── _plugin_registry.py
│       ├── _progressbar.py
│       ├── _validation.py
│       ├── _validation_coordinator.py
│       ├── _version.py
│       ├── api.py
│       ├── builtin_plugins/
│       │   ├── __init__.py
│       │   ├── concurrency.py
│       │   ├── default_filters.py
│       │   ├── ghostscript.py
│       │   ├── null_ocr.py
│       │   ├── optimize.py
│       │   ├── pypdfium.py
│       │   └── tesseract_ocr.py
│       ├── cli.py
│       ├── data/
│       │   ├── __init__.py
│       │   └── sRGB.icc
│       ├── exceptions.py
│       ├── extra_plugins/
│       │   ├── __init__.py
│       │   └── semfree.py
│       ├── font/
│       │   ├── __init__.py
│       │   ├── font_manager.py
│       │   ├── font_provider.py
│       │   ├── multi_font_manager.py
│       │   └── system_font_provider.py
│       ├── fpdf_renderer/
│       │   ├── __init__.py
│       │   └── renderer.py
│       ├── helpers.py
│       ├── hocrtransform/
│       │   ├── __init__.py
│       │   ├── __main__.py
│       │   └── hocr_parser.py
│       ├── imageops.py
│       ├── languages.py
│       ├── models/
│       │   ├── __init__.py
│       │   └── ocr_element.py
│       ├── optimize.py
│       ├── pdfa.py
│       ├── pdfinfo/
│       │   ├── __init__.py
│       │   ├── _contentstream.py
│       │   ├── _image.py
│       │   ├── _types.py
│       │   ├── _worker.py
│       │   ├── info.py
│       │   └── layout.py
│       ├── pluginspec.py
│       ├── py.typed
│       ├── quality.py
│       └── subprocess/
│           ├── __init__.py
│           └── _windows.py
└── tests/
    ├── __init__.py
    ├── cache/
    │   └── manifest.jsonl
    ├── conftest.py
    ├── plugins/
    │   ├── gs_feature_elision.py
    │   ├── gs_pdfa_failure.py
    │   ├── gs_raster_failure.py
    │   ├── gs_raster_soft_error.py
    │   ├── gs_render_failure.py
    │   ├── gs_render_soft_error.py
    │   ├── tesseract_badutf8.py
    │   ├── tesseract_big_image_error.py
    │   ├── tesseract_cache.py
    │   ├── tesseract_crash.py
    │   ├── tesseract_debug_rotate.py
    │   ├── tesseract_noop.py
    │   └── tesseract_simulate_oom_killer.py
    ├── resources/
    │   ├── README.rst
    │   ├── arabic.hocr
    │   ├── cjk.hocr
    │   ├── devanagari.hocr
    │   ├── hello_world_scripts.hocr
    │   ├── latin.hocr
    │   ├── linn.txt
    │   ├── multilingual.hocr
    │   └── tagged.odt
    ├── test_acroform.py
    ├── test_annots.py
    ├── test_api.py
    ├── test_check_pdf.py
    ├── test_completion.py
    ├── test_concurrency.py
    ├── test_fpdf_renderer.py
    ├── test_ghostscript.py
    ├── test_graft.py
    ├── test_helpers.py
    ├── test_hocr_parser.py
    ├── test_hocrtransform.py
    ├── test_image_input.py
    ├── test_imageops.py
    ├── test_json_serialization.py
    ├── test_logging.py
    ├── test_main.py
    ├── test_metadata.py
    ├── test_multi_font_manager.py
    ├── test_multilingual_direct.py
    ├── test_null_ocr_engine.py
    ├── test_ocr_element.py
    ├── test_ocr_engine_interface.py
    ├── test_ocr_engine_selection.py
    ├── test_optimize.py
    ├── test_page_boxes.py
    ├── test_page_numbers.py
    ├── test_pdf_renderer.py
    ├── test_pdfa.py
    ├── test_pdfinfo.py
    ├── test_pipeline.py
    ├── test_pipeline_generate_ocr.py
    ├── test_preprocessing.py
    ├── test_quality.py
    ├── test_rasterizer.py
    ├── test_rotation.py
    ├── test_semfree.py
    ├── test_soft_error.py
    ├── test_stdio.py
    ├── test_system_font_provider.py
    ├── test_tagged.py
    ├── test_tesseract.py
    ├── test_unpaper.py
    ├── test_userunit.py
    ├── test_validation.py
    ├── test_verapdf.py
    └── test_watcher.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .docker/Dockerfile
================================================
# SPDX-FileCopyrightText: 2024 James R. Barlow
# SPDX-License-Identifier: MPL-2.0

FROM ubuntu:25.04 AS base

ENV LANG=C.UTF-8
ENV TZ=UTC
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

RUN apt-get update && apt-get install -y --no-install-recommends \
  python3 \
  python-is-python3

FROM base AS builder

# Note we need leptonica here to build jbig2
RUN apt-get update && apt-get install -y --no-install-recommends \
  build-essential autoconf automake libtool \
  libleptonica-dev \
  zlib1g-dev \
  libffi-dev \
  ca-certificates \
  curl \
  git \
  libcairo2-dev \
  pkg-config

# Compile and install jbig2
# Needs libleptonica-dev, zlib1g-dev
RUN \
  mkdir jbig2 \
  && curl -L https://github.com/agl/jbig2enc/archive/c0141bf.tar.gz | \
  tar xz -C jbig2 --strip-components=1 \
  && cd jbig2 \
  && ./autogen.sh && ./configure && make && make install \
  && cd .. \
  && rm -rf jbig2


WORKDIR /app

# Copy uv from ghcr
COPY --from=ghcr.io/astral-sh/uv:0.9.8 /uv /uvx /bin/

ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy

# Install the project's dependencies using the lockfile and settings
RUN --mount=type=cache,target=/root/.cache/uv \
    --mount=type=bind,source=uv.lock,target=uv.lock \
    --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
    uv sync --frozen --no-install-project --no-dev

# Then, add the rest of the project source code and install it
# Installing separately from its dependencies allows optimal layer caching
COPY . /app
RUN --mount=type=cache,target=/root/.cache/uv \
    uv sync --frozen \
        --extra webservice --extra watcher --no-dev \
        --no-install-package pyarrow

FROM base

RUN apt-get update && apt-get install -y software-properties-common

RUN add-apt-repository -y ppa:alex-p/tesseract-ocr5

RUN apt-get update && apt-get install -y --no-install-recommends \
  ghostscript \
  fonts-droid-fallback \
  fonts-noto-core \
  fonts-noto-cjk \
  jbig2dec \
  pngquant \
  tesseract-ocr \
  tesseract-ocr-chi-sim \
  tesseract-ocr-deu \
  tesseract-ocr-eng \
  tesseract-ocr-fra \
  tesseract-ocr-por \
  tesseract-ocr-spa \
  unpaper \
  && rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/local/bin/ /usr/local/bin/

COPY --from=builder --chown=app:app /app /app

RUN rm -rf /app/.git && \
ln -s /app/misc/webservice.py /app/webservice.py && \
ln -s /app/misc/watcher.py /app/watcher.py

ENV PATH="/app/.venv/bin:${PATH}"

ENTRYPOINT ["/app/.venv/bin/ocrmypdf"]



================================================
FILE: .docker/Dockerfile.alpine
================================================
# SPDX-FileCopyrightText: 2023 James R. Barlow
# SPDX-License-Identifier: MPL-2.0

FROM alpine:3.23 AS base

ENV LANG=C.UTF-8
ENV TZ=UTC

RUN apk add --no-cache \
    python3 \
    zlib

FROM base AS builder

# Yes it really is python3-dev, and py3-package
RUN apk add --no-cache \
    ca-certificates \
    git \
    python3-dev \
    py3-pyarrow \
    curl

WORKDIR /app

COPY --from=ghcr.io/astral-sh/uv:0.9.8 /uv /uvx /bin/

ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy

RUN uv venv --system-site-packages .venv

# Install the project's dependencies using the lockfile and settings
RUN --mount=type=cache,target=/root/.cache/uv \
    --mount=type=bind,source=uv.lock,target=uv.lock \
    --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
    uv sync --frozen --no-install-project --no-dev

# Then, add the rest of the project source code and install it
# Installing separately from its dependencies allows optimal layer caching
COPY . /app
RUN --mount=type=cache,target=/root/.cache/uv \
    uv sync --frozen \
        --extra webservice --extra watcher --no-dev \
        --no-install-package pyarrow

FROM base

RUN apk add --no-cache \
    ghostscript \
    jbig2dec \
    jbig2enc \
    pngquant \
    tesseract-ocr \
    tesseract-ocr-data-chi_sim \
    tesseract-ocr-data-deu \
    tesseract-ocr-data-eng \
    tesseract-ocr-data-fra \
    tesseract-ocr-data-osd \
    tesseract-ocr-data-por \
    tesseract-ocr-data-spa \
    font-noto \
    ttf-droid \
    unpaper \
    && rm -rf /var/cache/apk/*

WORKDIR /app

COPY --from=builder --chown=app:app /app /app

RUN rm -rf /app/.git && \
    ln -s /app/misc/webservice.py /app/webservice.py && \
    ln -s /app/misc/watcher.py /app/watcher.py

ENV PATH="/app/.venv/bin:${PATH}"

ENTRYPOINT ["/app/.venv/bin/ocrmypdf"]


================================================
FILE: .dockerignore
================================================
# SPDX-FileCopyrightText: 2022 James R. Barlow
# SPDX-License-Identifier: MPL-2.0

# dotfiles
.*
!.coveragerc
!.dockerignore
!.git_archival.txt
!.gitattributes
!.gitignore
!.pre-commit-config.yaml
!.readthedocs.yml

# Dev scratch
*.ipynb
**/*.pyc
/*.pdf
/*.qdf
/*.png
/scratch.py
IDEAS
log/
tests/resources/private/
tmp/
venv*/
/debug_tests.py
*.traineddata
/private

# Package building
*.egg-info/
build/
dist/
wheelhouse/
pip-wheel-metadata/

# Code coverage
htmlcov/

# Docker specific
bin/
docs/
include/
lib/

# Docker include .git/
!.git/


================================================
FILE: .git_archival.txt
================================================
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true)$
ref-names: $Format:%D$


================================================
FILE: .gitattributes
================================================
# SPDX-FileCopyrightText: 2022 James R. Barlow
# SPDX-License-Identifier: MPL-2.0

# Always use Unix convention for new lines
* text eol=lf

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.jar	binary
*.pdf	binary
*.PDF	binary
*.png	binary
*.jpg	binary
*.bin   binary
*.afdesign  binary
*.ttf   binary

.git_archival.txt  export-subst


================================================
FILE: .github/FUNDING.yml
================================================
# SPDX-FileCopyrightText: 2022 James R. Barlow
# SPDX-License-Identifier: MPL-2.0

# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: james-barlow
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/ISSUE_TEMPLATE/1-bug-report-general.yml
================================================
name: Installation, packaging, dependencies
description: Installation, packages, dependencies, "nothing works", test suite failures...
title: "[Bug]: "
labels: ["triage"]
assignees:
  - jbarlow83
body:
  - type: markdown
    attributes:
      value: |
        Thanks for taking the time to fill out this bug report!

        If your issue involves using OCRmyPDF on specific file(s) and not getting
        good results, this is the *wrong* issue template. Please use the recommended
        template to ensure we have enough information to help.
  - type: textarea
    id: what-happened
    attributes:
      label: What were you trying to do?
      description: Also tell us, what did you expect to happen?
      placeholder: Tell us what you see!
    validations:
      required: true
  - type: dropdown
    id: packaging-system
    attributes:
      label: Where are you installing/running from?
      multiple: true
      options:
        - PyPI (pip, poetry, pipx, etc.)
        - Linux package manager (apt, dnf, etc.)
        - Wndows package manager (chocolatey, etc.)
        - Homebrew
        - Docker container
        - Ubuntu snap
        - Conda
        - source build
    validations:
      required: true
  - type: input
    id: version
    attributes:
      label: OCRmyPDF version
      description: Paste "ocrmypdf --version" here
  - type: dropdown
    id: operating-system
    attributes:
      label: What operating system are you working on?
      multiple: true
      options:
        - Linux
        - Windows
        - macOS
        - BSD
  - type: input
    id: os_version
    attributes:
      label: Operating system details and version
  - type: checkboxes
    attributes:
      label: Simple sanity checks
      description: Select all that apply
      options:
        - label: Operating system is currently supported by its vendor (not end of life)
        - label: Python version is compatible with OCRmyPDF
        - label: This issue is not about a specific input file
  - type: textarea
    id: logs
    attributes:
      label: Relevant log output
      description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
      render: plain text


================================================
FILE: .github/ISSUE_TEMPLATE/2-problem-with-specific-file.yml
================================================
name: Problem with specific file
description: Something went wrong while trying to OCR a specific file
title: "[Bug]: "
labels: ["triage"]
assignees:
  - jbarlow83
body:
  - type: markdown
    attributes:
      value: |
        Thanks for taking the time to describe this issue with a particular file.
  - type: textarea
    id: what-happened
    attributes:
      label: Describe the bug
      description: A clear and concise description of what the bug is.
      placeholder: Tell us what you see!
    validations:
      required: true
  - type: textarea
    id: reproduce
    attributes:
      label: Steps to reproduce
      description: Please include steps to reproduce.
      value: |
        1. Run ocrmypdf -v1 ...arguments... input.pdf output.pdf
        2. Open output.pdf
        3. ...
      render: plain text
  - type: textarea
    id: files
    attributes:
      label: Files
      description: |
        Please attach the input and output files, or any screenshots that may be helpful.

        If you cannot provide a test file, we probably won't be able to help with the issue.
        PDF is a complex file format, and there may be technical details in the PDF that are
        causing the issue. There's really no substitute for a test file.

        We understand files may contain personal or sensitive information. Here are some options:
        - Try reproducing the issue with a file from the OCRmyPDF test suite. (See tests/resources)
        - Try to create another file in the same way as your private file.
        - Encrypt the file to OCRmyPDF's private GPG key, and then zip the GPG file.
        - Use ``qpdf --json yourfile.pdf`` to produce a JSON representation of your file that
          omits personal information.
      placeholder: |
        Drag and drop files here.
  - type: dropdown
    id: packaging-system
    attributes:
      label: How did you download and install the software?
      multiple: true
      options:
        - PyPI (pip, poetry, pipx, etc.)
        - Linux package manager (apt, dnf, etc.)
        - Windows package manager (chocolatey, etc.)
        - Homebrew
        - Docker container
        - Ubuntu snap
        - Conda
        - source build
  - type: input
    id: version
    attributes:
      label: OCRmyPDF version
      description: Paste "ocrmypdf --version" here
      placeholder: ocrmypdf --version
  - type: textarea
    id: logs
    attributes:
      label: Relevant log output
      description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
      placeholder: Run OCRmyPDF with verbosity `-v1` to get more detailed logging output.
      render: plain text


================================================
FILE: .github/ISSUE_TEMPLATE/3-app.yml
================================================
name: Problem with third party app that uses OCRmyPDF
description: |
  For PDF generation issues with third party software such as Paperless-ngx that
  uses OCRmyPDF to perform OCR or generate PDFs.
title: "[3rdparty]: "
labels: ["triage"]
assignees:
  - jbarlow83
body:
  - type: markdown
    attributes:
      value: |
        Thanks for taking the time to describe this issue with a particular file
        and third party app.

        If you are comfortable using OCRmyPDF, please trying to install OCRmyPDF,
        run it on your file, and see if it works. It's easier for everyone
        if you can confirm that the issue occurs with OCRmyPDF and not with
        the third party app.
  - type: checkboxes
    attributes:
      label: Simple sanity checks
      description: Select all that apply
      options:
        - label: This is an issue with an app that uses OCRmyPDF for OCR
        - label: I am using a recent version of the third party app
        - label: I will include a file that reproduces the issuse
  - type: input
    id: thirdparty-app-name-version
    attributes:
      label: Third party app name and version
      description: e.g. Paperless-ngx 2.9.0
  - type: textarea
    id: what-happened
    attributes:
      label: Describe the bug
      description: A clear and concise description of what the bug is.
      placeholder: Tell us what you see!
    validations:
      required: true
  - type: textarea
    id: reproduce
    attributes:
      label: Steps to reproduce
      description: Please include steps to reproduce.
      value: |
        1. Import attached file into Paperless-ngx
        2. Trigger OCR
        3. Check log file
        4. ...
      render: plain text
  - type: textarea
    id: files
    attributes:
      label: Files
      description: |
        Please attach the input and output files, or any screenshots that may be helpful.

        If you cannot provide a test file, we probably won't be able to help with the issue.
        PDF is a complex file format, and there may be technical details in the PDF that are
        causing the issue. There's really no substitute for a test file.

        We understand files may contain personal or sensitive information. Here are some options:
        - Try reproducing the issue with a file from the test suite. (See tests/resources)
        - Try to create another file in the same way as your private file.
        - Encrypt the file to OCRmyPDF's private GPG key, and then zip the GPG file.
        - Use ``qpdf --json yourfile.pdf`` to produce a JSON representation of your file that
          omits personal information.
      placeholder: |
        Drag and drop files here.
  - type: input
    id: version
    attributes:
      label: OCRmyPDF version
      description: Paste "ocrmypdf --version" here
      placeholder: ocrmypdf --version
  - type: textarea
    id: logs
    attributes:
      label: Relevant log output
      description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
      placeholder: Run OCRmyPDF with verbosity `-v1` to get more detailed logging output.
      render: plain text


================================================
FILE: .github/ISSUE_TEMPLATE/4-feature-request.yml
================================================
name: Feature request
description: Suggest an idea for this project
title: "[Feature]: "
labels: ["enhancement", "triage"]
assignees:
  - jbarlow83
body:
  - type: textarea
    id: feature
    attributes:
      label: Describe the proposed feature
      description: A clear and concise description of what the desired is.


================================================
FILE: .github/dependabot.yml
================================================
# SPDX-FileCopyrightText: 2022 James R. Barlow
# SPDX-License-Identifier: MPL-2.0

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
  - package-ecosystem: "github-actions" # See documentation for possible values
    directory: "/" # Location of package manifests
    schedule:
      interval: "weekly"


================================================
FILE: .github/workflows/build.yml
================================================
# SPDX-FileCopyrightText: 2022 James R. Barlow
# SPDX-License-Identifier: MPL-2.0
name: Test and deploy

on:
  push:
    branches:
      - main
      - ci
      - release/*
      - feature/*
    paths-ignore:
      - README*
  pull_request:

jobs:
  test_linux:
    name: Test ${{ matrix.os }} with Python ${{ matrix.python }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-22.04, ubuntu-24.04]
        python: ["3.11", "3.12", "3.13", "3.14"]
        include:
          - os: ubuntu-22.04
            tesseract_ppa: "ppa"
            python: "3.11"

    env:
      OS: ${{ matrix.os }}
      PYTHON: ${{ matrix.python }}

    steps:
      - uses: actions/checkout@v6

      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          version: "0.9.x"

      - name: "Set up Python"
        uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python }}

      - name: Install Tesseract from PPA
        if: matrix.tesseract_ppa == 'ppa'
        run: |
          sudo add-apt-repository -y ppa:alex-p/tesseract-ocr5

      - name: Install common packages
        run: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends \
            curl \
            fonts-noto-core \
            fonts-noto-cjk \
            ghostscript \
            jbig2dec \
            img2pdf \
            libexempi8 \
            libffi-dev \
            libsm6 libxext6 libxrender-dev \
            pngquant \
            poppler-utils \
            tesseract-ocr \
            tesseract-ocr-deu \
            tesseract-ocr-eng \
            tesseract-ocr-osd \
            unpaper \
            zlib1g

      - name: Install Python packages
        run: |
          uv sync --group test

      - name: Report versions
        run: |
          tesseract --version
          gs --version
          pngquant --version
          unpaper --version
          uv run --no-dev img2pdf --version

      - name: Test
        run: |
          uv run --no-dev pytest --cov-report xml --cov=ocrmypdf --cov=tests/ -n0 tests/

      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v5
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
        with:
          files: ./coverage.xml
          env_vars: OS,PYTHON

  test_macos:
    name: Test macOS
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest]
        python: ["3.11", "3.12", "3.13", "3.14"]

    env:
      OS: ${{ matrix.os }}
      PYTHON: ${{ matrix.python }}

    steps:
      - uses: actions/checkout@v6

      - name: Install Homebrew deps
        continue-on-error: true
        run: |
          brew update
          brew install \
            exempi \
            ghostscript \
            jbig2enc \
            openjpeg \
            pngquant \
            poppler \
            tesseract \
            verapdf

      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          version: "0.9.x"

      - name: "Set up Python"
        uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python }}

      - name: Install Python packages
        run: |
          uv sync --group test

      - name: Report versions
        run: |
          tesseract --version
          gs --version
          pngquant --version
          uv run --no-dev img2pdf --version

      - name: Test
        run: |
          uv run --no-dev pytest --cov-report xml --cov=ocrmypdf --cov=tests/ -n0 tests/

      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v5
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
        with:
          files: ./coverage.xml
          env_vars: OS,PYTHON

  test_windows:
    name: Test Windows
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [windows-latest]
        python: ["3.11", "3.12", "3.13", "3.14"]

    env:
      OS: ${{ matrix.os }}
      PYTHON: ${{ matrix.python }}

    steps:
      - uses: actions/checkout@v6

      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          version: "0.9.x"

      - name: "Set up Python"
        uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python }}

      - name: Install system packages
        run: |
          choco install --yes --no-progress tesseract
          choco install --yes --no-progress --ignore-checksums ghostscript --version 9.56.1
          choco install --yes --no-progress poppler --version=25.11.0

      - name: Install Python packages
        run: |
          uv sync --group test

      - name: Test
        run: |
          uv run --no-dev pytest --cov-report xml --cov=ocrmypdf --cov=tests/ -n0 tests/

      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v5
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
        with:
          files: ./coverage.xml
          env_vars: OS,PYTHON

  wheel_sdist_linux:
    name: Build sdist and wheels
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          version: "0.9.x"

      - name: Make wheels and sdist
        run: |
          uv build --sdist --wheel

      - uses: actions/upload-artifact@v6
        with:
          name: artifact
          path: |
            ./dist/*.whl
            ./dist/*.tar.gz

  stage_release:
    name: Stage release artifacts
    needs: [wheel_sdist_linux, test_linux, test_macos, test_windows]
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main'
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v6

      - uses: actions/download-artifact@v7
        with:
          name: artifact
          path: dist

      - name: Read version from source
        id: version
        run: |
          VERSION=$(python3 -c "exec(open('src/ocrmypdf/_version.py').read()); print(__version__)")
          echo "version=$VERSION" >> $GITHUB_OUTPUT

      - name: Create or update draft release
        env:
          GITHUB_TOKEN: ${{ github.token }}
        run: |
          TAG="v${{ steps.version.outputs.version }}"

          # Delete existing draft release if it exists (ignore errors)
          gh release delete "$TAG" --yes 2>/dev/null || true

          # Create new draft release with all artifacts
          gh release create "$TAG" \
            --draft \
            --title "$TAG" \
            --notes "Draft release - will be updated when tag is pushed" \
            dist/*

  docker_ubuntu:
    name: Build Ubuntu-based Docker image
    needs: [wheel_sdist_linux, test_linux, test_macos, test_windows]
    runs-on: ubuntu-latest
    if: github.event_name != 'pull_request'
    steps:
      - name: Set image tag to release or branch
        run: echo "DOCKER_IMAGE_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV

      - name: If main, set to latest
        run: echo 'DOCKER_IMAGE_TAG=latest' >> $GITHUB_ENV
        if: env.DOCKER_IMAGE_TAG == 'main'

      - name: Set Docker Hub repository to username
        run: echo "DOCKER_REPOSITORY=jbarlow83" >> $GITHUB_ENV

      - name: Set image name
        run: echo "DOCKER_IMAGE_NAME=ocrmypdf" >> $GITHUB_ENV

      - uses: actions/checkout@v6

      - name: Login to Docker Hub
        uses: docker/login-action@v3
        with:
          username: jbarlow83
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3

      - name: Set up Docker Buildx
        id: buildx
        uses: docker/setup-buildx-action@v3

      - name: Print image tag
        run: echo "Building image ${DOCKER_REPOSITORY}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}"

      - name: Build
        run: |
          docker buildx build \
            --push \
            --platform linux/arm64/v8,linux/amd64  \
            --tag "${DOCKER_REPOSITORY}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}" \
            --tag "${DOCKER_REPOSITORY}/${DOCKER_IMAGE_NAME}-ubuntu:${DOCKER_IMAGE_TAG}" \
            --file .docker/Dockerfile .

  docker_alpine:
    name: Build Alpine-based Docker images
    needs: [wheel_sdist_linux, test_linux, test_macos, test_windows]
    runs-on: ubuntu-latest
    if: github.event_name != 'pull_request'
    steps:
      - name: Set image tag to release or branch
        run: echo "DOCKER_IMAGE_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV

      - name: If main, set to latest
        run: echo 'DOCKER_IMAGE_TAG=latest' >> $GITHUB_ENV
        if: env.DOCKER_IMAGE_TAG == 'main'

      - name: Set Docker Hub repository to username
        run: echo "DOCKER_REPOSITORY=jbarlow83" >> $GITHUB_ENV

      - name: Set image name
        run: echo "DOCKER_IMAGE_NAME=ocrmypdf-alpine" >> $GITHUB_ENV

      - uses: actions/checkout@v6

      - name: Login to Docker Hub
        uses: docker/login-action@v3
        with:
          username: jbarlow83
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: Set up Docker Buildx
        id: buildx
        uses: docker/setup-buildx-action@v3

      - name: Print image tag
        run: echo "Building image ${DOCKER_REPOSITORY}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}"

      - name: Build
        run: |
          docker buildx build \
            --push \
            --platform linux/amd64,linux/arm64  \
            --tag "${DOCKER_REPOSITORY}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}" \
            --file .docker/Dockerfile.alpine .


================================================
FILE: .github/workflows/release.yml
================================================
# SPDX-FileCopyrightText: 2022 James R. Barlow
# SPDX-License-Identifier: MPL-2.0

name: Publish Release

on:
  push:
    tags:
      - "v*"

jobs:
  publish:
    name: Publish release
    runs-on: ubuntu-latest
    environment:
      name: release
      url: https://pypi.org/p/ocrmypdf
    permissions:
      contents: write
      id-token: write
    steps:
      - uses: actions/checkout@v6

      - name: Download artifacts from draft release
        env:
          GITHUB_TOKEN: ${{ github.token }}
        run: |
          mkdir -p dist
          gh release download "$GITHUB_REF_NAME" --dir dist --pattern '*.whl'
          gh release download "$GITHUB_REF_NAME" --dir dist --pattern '*.tar.gz'

      - name: Publish to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1

      # PyPI doesn't support sigstore publishing, so generate after publishing to PyPI
      - name: Sign the dists with Sigstore
        uses: sigstore/gh-action-sigstore-python@v3.2.0
        with:
          inputs: |
            ./dist/*.tar.gz
            ./dist/*.whl

      - name: Extract release notes
        run: |
          VERSION="${GITHUB_REF_NAME#v}"
          MAJOR="${VERSION%%.*}"
          MAJOR_PADDED=$(printf "%02d" "$MAJOR")
          RELEASE_FILE="docs/releasenotes/version${MAJOR_PADDED}.md"

          python3 << EOF
          import re

          version = "${VERSION}"
          release_file = "${RELEASE_FILE}"

          try:
              with open(release_file) as f:
                  content = f.read()

              # Find the section for this version
              # Match from "## vX.Y.Z" until the next "## v" or end of file
              pattern = rf"## v{re.escape(version)}\n(.*?)(?=\n## v|\Z)"
              match = re.search(pattern, content, re.DOTALL)
              notes = match.group(1).strip() if match else ""
          except FileNotFoundError:
              notes = ""

          with open("release_notes.md", "w") as f:
              f.write(notes)
          EOF

      - name: Publish release (convert draft to published)
        env:
          GITHUB_TOKEN: ${{ github.token }}
        run: |
          # Update release: remove draft status, add release notes
          gh release edit "$GITHUB_REF_NAME" \
            --draft=false \
            --notes-file release_notes.md

          # Upload signatures to the release
          gh release upload "$GITHUB_REF_NAME" dist/*.sigstore.json --clobber

  docker_tag:
    name: Tag Docker images with release version
    needs: [publish]
    runs-on: ubuntu-latest
    steps:
      - name: Login to Docker Hub
        uses: docker/login-action@v3
        with:
          username: jbarlow83
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Tag ocrmypdf (Ubuntu) image
        run: |
          docker buildx imagetools create \
            --tag "jbarlow83/ocrmypdf:$GITHUB_REF_NAME" \
            "jbarlow83/ocrmypdf:latest"

      - name: Tag ocrmypdf-ubuntu image
        run: |
          docker buildx imagetools create \
            --tag "jbarlow83/ocrmypdf-ubuntu:$GITHUB_REF_NAME" \
            "jbarlow83/ocrmypdf-ubuntu:latest"

      - name: Tag ocrmypdf-alpine image
        run: |
          docker buildx imagetools create \
            --tag "jbarlow83/ocrmypdf-alpine:$GITHUB_REF_NAME" \
            "jbarlow83/ocrmypdf-alpine:latest"


================================================
FILE: .github/workflows/triage.yml
================================================
# SPDX-FileCopyrightText: 2024 James R. Barlow
# SPDX-License-Identifier: MPL-2.0

name: Remove Triage Label on Reply

on:
  issue_comment:
    types:
      - created

jobs:
  remove-triage-label:
    runs-on: ubuntu-latest

    steps:
      - name: Check if comment is by the repository owner
        id: check_comment
        run: |
          echo "::set-output name=is_owner::$(
            if [[ '${{ github.event.comment.user.login }}' == 'jbarlow83' ]]; then
              echo 'true';
            else
              echo 'false';
            fi
          )"

      - name: Remove 'triage' label
        if: ${{ steps.check_comment.outputs.is_owner == 'true' }}
        uses: actions-ecosystem/action-remove-labels@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          labels: triage


================================================
FILE: .gitignore
================================================
# SPDX-FileCopyrightText: 2022 James R. Barlow
# SPDX-License-Identifier: CC-BY-SA-4.0

# dotfiles
.coverage
.venv*/
.tox/
.vscode/
.hypothesis/
.ipynb_checkpoints/
.mypy_cache/
.pytest_cache/

# Dev scratch
*.ipynb
**/*.pyc
/*.pdf
/*.qdf
/*.png
/scratch.py
IDEAS
log/
tests/resources/private/
tmp/
venv*/
/debug_tests.py
*.traineddata
/private
/coverage.xml
/issuepdf

# Package building
*.egg-info/
build/
dist/
wheelhouse/
pip-wheel-metadata/

# Code coverage
htmlcov/

# Automatically generated files
docs/_build/
docs/_static/
docs/_templates/
docs/Makefile

.idea/
.aider*
CLAUDE.md
.claude/

================================================
FILE: .pre-commit-config.yaml
================================================
# SPDX-FileCopyrightText: 2022 James R. Barlow
# SPDX-License-Identifier: MPL-2.0

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.4.0
    hooks:
      - id: check-case-conflict
      - id: check-merge-conflict
      - id: check-toml
      - id: check-yaml
      - id: debug-statements
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: "v0.14.11"
    hooks:
      - id: ruff-check
        args: [--fix]
      - id: ruff-format
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.2.0
    hooks:
      - id: mypy
        additional_dependencies:
          - types-toml
          - types-setuptools
          - types-requests
          - types-Pillow


================================================
FILE: .readthedocs.yaml
================================================
# SPDX-FileCopyrightText: 2022 James R. Barlow
# SPDX-License-Identifier: MPL-2.0

# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
  configuration: docs/conf.py

# Optionally set the version of Python and requirements required to build your docs
build:
  os: ubuntu-22.04
  tools:
    python: "3.13"
  jobs:
    pre_create_environment:
      - asdf plugin add uv
      - asdf install uv latest
      - asdf global uv latest
    create_environment:
      - uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
    install:
      - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --group docs

================================================
FILE: LICENSE
================================================
Mozilla Public License Version 2.0
==================================

1. Definitions
--------------

1.1. "Contributor"
    means each individual or legal entity that creates, contributes to
    the creation of, or owns Covered Software.

1.2. "Contributor Version"
    means the combination of the Contributions of others (if any) used
    by a Contributor and that particular Contributor's Contribution.

1.3. "Contribution"
    means Covered Software of a particular Contributor.

1.4. "Covered Software"
    means Source Code Form to which the initial Contributor has attached
    the notice in Exhibit A, the Executable Form of such Source Code
    Form, and Modifications of such Source Code Form, in each case
    including portions thereof.

1.5. "Incompatible With Secondary Licenses"
    means

    (a) that the initial Contributor has attached the notice described
        in Exhibit B to the Covered Software; or

    (b) that the Covered Software was made available under the terms of
        version 1.1 or earlier of the License, but not also under the
        terms of a Secondary License.

1.6. "Executable Form"
    means any form of the work other than Source Code Form.

1.7. "Larger Work"
    means a work that combines Covered Software with other material, in
    a separate file or files, that is not Covered Software.

1.8. "License"
    means this document.

1.9. "Licensable"
    means having the right to grant, to the maximum extent possible,
    whether at the time of the initial grant or subsequently, any and
    all of the rights conveyed by this License.

1.10. "Modifications"
    means any of the following:

    (a) any file in Source Code Form that results from an addition to,
        deletion from, or modification of the contents of Covered
        Software; or

    (b) any new file in Source Code Form that contains any Covered
        Software.

1.11. "Patent Claims" of a Contributor
    means any patent claim(s), including without limitation, method,
    process, and apparatus claims, in any patent Licensable by such
    Contributor that would be infringed, but for the grant of the
    License, by the making, using, selling, offering for sale, having
    made, import, or transfer of either its Contributions or its
    Contributor Version.

1.12. "Secondary License"
    means either the GNU General Public License, Version 2.0, the GNU
    Lesser General Public License, Version 2.1, the GNU Affero General
    Public License, Version 3.0, or any later versions of those
    licenses.

1.13. "Source Code Form"
    means the form of the work preferred for making modifications.

1.14. "You" (or "Your")
    means an individual or a legal entity exercising rights under this
    License. For legal entities, "You" includes any entity that
    controls, is controlled by, or is under common control with You. For
    purposes of this definition, "control" means (a) the power, direct
    or indirect, to cause the direction or management of such entity,
    whether by contract or otherwise, or (b) ownership of more than
    fifty percent (50%) of the outstanding shares or beneficial
    ownership of such entity.

2. License Grants and Conditions
--------------------------------

2.1. Grants

Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:

(a) under intellectual property rights (other than patent or trademark)
    Licensable by such Contributor to use, reproduce, make available,
    modify, display, perform, distribute, and otherwise exploit its
    Contributions, either on an unmodified basis, with Modifications, or
    as part of a Larger Work; and

(b) under Patent Claims of such Contributor to make, use, sell, offer
    for sale, have made, import, and otherwise transfer either its
    Contributions or its Contributor Version.

2.2. Effective Date

The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.

2.3. Limitations on Grant Scope

The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:

(a) for any code that a Contributor has removed from Covered Software;
    or

(b) for infringements caused by: (i) Your and any other third party's
    modifications of Covered Software, or (ii) the combination of its
    Contributions with other software (except as part of its Contributor
    Version); or

(c) under Patent Claims infringed by Covered Software in the absence of
    its Contributions.

This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).

2.4. Subsequent Licenses

No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).

2.5. Representation

Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.

2.6. Fair Use

This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.

2.7. Conditions

Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.

3. Responsibilities
-------------------

3.1. Distribution of Source Form

All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.

3.2. Distribution of Executable Form

If You distribute Covered Software in Executable Form then:

(a) such Covered Software must also be made available in Source Code
    Form, as described in Section 3.1, and You must inform recipients of
    the Executable Form how they can obtain a copy of such Source Code
    Form by reasonable means in a timely manner, at a charge no more
    than the cost of distribution to the recipient; and

(b) You may distribute such Executable Form under the terms of this
    License, or sublicense it under different terms, provided that the
    license for the Executable Form does not attempt to limit or alter
    the recipients' rights in the Source Code Form under this License.

3.3. Distribution of a Larger Work

You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).

3.4. Notices

You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.

3.5. Application of Additional Terms

You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.

4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------

If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.

5. Termination
--------------

5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.

5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.

5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.

************************************************************************
*                                                                      *
*  6. Disclaimer of Warranty                                           *
*  -------------------------                                           *
*                                                                      *
*  Covered Software is provided under this License on an "as is"       *
*  basis, without warranty of any kind, either expressed, implied, or  *
*  statutory, including, without limitation, warranties that the       *
*  Covered Software is free of defects, merchantable, fit for a        *
*  particular purpose or non-infringing. The entire risk as to the     *
*  quality and performance of the Covered Software is with You.        *
*  Should any Covered Software prove defective in any respect, You     *
*  (not any Contributor) assume the cost of any necessary servicing,   *
*  repair, or correction. This disclaimer of warranty constitutes an   *
*  essential part of this License. No use of any Covered Software is   *
*  authorized under this License except under this disclaimer.         *
*                                                                      *
************************************************************************

************************************************************************
*                                                                      *
*  7. Limitation of Liability                                          *
*  --------------------------                                          *
*                                                                      *
*  Under no circumstances and under no legal theory, whether tort      *
*  (including negligence), contract, or otherwise, shall any           *
*  Contributor, or anyone who distributes Covered Software as          *
*  permitted above, be liable to You for any direct, indirect,         *
*  special, incidental, or consequential damages of any character      *
*  including, without limitation, damages for lost profits, loss of    *
*  goodwill, work stoppage, computer failure or malfunction, or any    *
*  and all other commercial damages or losses, even if such party      *
*  shall have been informed of the possibility of such damages. This   *
*  limitation of liability shall not apply to liability for death or   *
*  personal injury resulting from such party's negligence to the       *
*  extent applicable law prohibits such limitation. Some               *
*  jurisdictions do not allow the exclusion or limitation of           *
*  incidental or consequential damages, so this exclusion and          *
*  limitation may not apply to You.                                    *
*                                                                      *
************************************************************************

8. Litigation
-------------

Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.

9. Miscellaneous
----------------

This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.

10. Versions of the License
---------------------------

10.1. New Versions

Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.

10.2. Effect of New Versions

You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.

10.3. Modified Versions

If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).

10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses

If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.

Exhibit A - Source Code Form License Notice
-------------------------------------------

  This Source Code Form is subject to the terms of the Mozilla Public
  License, v. 2.0. If a copy of the MPL was not distributed with this
  file, You can obtain one at http://mozilla.org/MPL/2.0/.

If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.

You may add additional accurate notices of copyright ownership.

Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------

  This Source Code Form is "Incompatible With Secondary Licenses", as
  defined by the Mozilla Public License, v. 2.0.


================================================
FILE: LICENSES/AGPL-3.0-or-later.txt
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

                            Preamble

The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.

The licenses for most software and other practical works are designed to take away your freedom to share and change the works.  By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.

When we speak of free software, we are referring to freedom, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software.

A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate.  Many developers of free software are heartened and encouraged by the resulting cooperation.  However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.

The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community.  It requires the operator of a network server to provide the source code of the modified version running there to the users of that server.  Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.

An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals.  This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license.

The precise terms and conditions for copying, distribution and modification follow.

                       TERMS AND CONDITIONS

0. Definitions.

"This License" refers to version 3 of the GNU Affero General Public License.

"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

"The Program" refers to any copyrightable work licensed under this License.  Each licensee is addressed as "you".  "Licensees" and "recipients" may be individuals or organizations.

To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy.  The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.

A "covered work" means either the unmodified Program or a work based on the Program.

To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy.  Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.

To "convey" a work means any kind of propagation that enables other parties to make or receive copies.  Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.

An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License.  If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.

1. Source Code.
The "source code" for a work means the preferred form of the work for making modifications to it.  "Object code" means any non-source form of a work.

A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.

The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form.  A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities.  However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work.  For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those
subprograms and other parts of the work.

The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.

The Corresponding Source for a work in source code form is that same work.

2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met.  This License explicitly affirms your unlimited permission to run the unmodified Program.  The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work.  This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force.  You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright.  Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under the conditions stated below.  Sublicensing is not allowed; section 10 makes it unnecessary.

3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.

When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7.  This requirement modifies the requirement in section 4 to "keep intact all notices".

    c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy.  This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged.  This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.

A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit.  Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:

    a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source.  This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.

    d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge.  You need not require recipients to copy the Corresponding Source along with the object code.  If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source.  Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.

A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.

A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling.  In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage.  For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product.  A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.

"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source.  The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.

If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information.  But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).

The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed.  Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.

Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.

7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law.  If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.

When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it.  (Additional permissions may be written to require their own removal in certain cases when you modify the work.)  You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.

Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or authors of the material; or

    e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.

All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10.  If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term.  If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.

8. Termination.

You may not propagate or modify a covered work except as expressly provided under this License.  Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).

However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License.  If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.

9. Acceptance Not Required for Having Copies.

You are not required to accept this License in order to receive or run a copy of the Program.  Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance.  However, nothing other than this License grants you permission to propagate or modify any covered work.  These actions infringe copyright if you do not accept this License.  Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.

Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License.  You are not responsible for enforcing compliance by third parties with this License.

An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations.  If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License.  For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.

11. Patents.

A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based.  The work thus licensed is called the contributor's "contributor version".

A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version.  For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement).  To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.

If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.

A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License.  You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.

Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

12. No Surrender of Others' Freedom.

If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.

13. Remote Network Interaction; Use with the GNU General Public License.

Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software.  This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.

Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work.  The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License.

14. Revised Versions of this License.

The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time.  Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number.  If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation.  If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation.

If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

Later license versions may give you additional or different permissions.  However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

15. Disclaimer of Warranty.

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. Limitation of Liability.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

17. Interpretation of Sections 15 and 16.

If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program.  It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

     <one line to give the program's name and a brief idea of what it does.>
     Copyright (C) <year>  <name of author>

     This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

     This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.

     You should have received a copy of the GNU Affero General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source.  For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code.  There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements.

You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>.


================================================
FILE: LICENSES/Apache-2.0.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.

"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:

     (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and

     (b) You must cause any modified files to carry prominent notices stating that You changed the files; and

     (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and

     (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

     You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!)  The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


================================================
FILE: LICENSES/CC-BY-SA-1.0.txt
================================================
Creative Commons Attribution-ShareAlike 1.0

 CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DRAFT LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.

License

THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

     a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.

     b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License.

     c. "Licensor" means the individual or entity that offers the Work under the terms of this License.

     d. "Original Author" means the individual or entity who created the Work.

     e. "Work" means the copyrightable work of authorship offered under the terms of this License.

     f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.

2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

     a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;

     b. to create and reproduce Derivative Works;

     c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;

     d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works;

The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

     a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested.

     b. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License.

     c. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.

5. Representations, Warranties and Disclaimer

     a. By offering the Work for public release under this License, Licensor represents and warrants that, to the best of Licensor's knowledge after reasonable inquiry:

           i. Licensor has secured all rights in the Work necessary to grant the license rights hereunder and to permit the lawful exercise of the rights granted hereunder without You having any obligation to pay any royalties, compulsory license fees, residuals or any other payments;

          ii. The Work does not infringe the copyright, trademark, publicity rights, common law rights or any other right of any third party or constitute defamation, invasion of privacy or other tortious injury to any third party.

     b. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK.

6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

     a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.

     b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

     a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.

     b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.

     c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

     d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.

     e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.

Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.

Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time.

Creative Commons may be contacted at http://creativecommons.org/.


================================================
FILE: LICENSES/CC-BY-SA-2.0.txt
================================================
Creative Commons Attribution-ShareAlike 2.0

 CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.

License

THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

     a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.

     b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.

     c. "Licensor" means the individual or entity that offers the Work under the terms of this License.

     d. "Original Author" means the individual or entity who created the Work.

     e. "Work" means the copyrightable work of authorship offered under the terms of this License.

     f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.

     g. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.

2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

     a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;

     b. to create and reproduce Derivative Works;

     c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;

     d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.

     e. For the avoidance of doubt, where the work is a musical composition:

          i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.

          ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).

     f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).

The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

     a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested.

     b. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.0 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License.

     c. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

     a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.

     b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

     a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.

     b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.

     c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

     d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.

     e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.

Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.

Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time.

Creative Commons may be contacted at http://creativecommons.org/.


================================================
FILE: LICENSES/CC-BY-SA-2.5.txt
================================================
Creative Commons Attribution-ShareAlike 2.5

 CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.

License

THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

     a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.

     b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.

     c. "Licensor" means the individual or entity that offers the Work under the terms of this License.

     d. "Original Author" means the individual or entity who created the Work.

     e. "Work" means the copyrightable work of authorship offered under the terms of this License.

     f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.

     g. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.

2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

     a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;

     b. to create and reproduce Derivative Works;

     c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;

     d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.

     e. For the avoidance of doubt, where the work is a musical composition:

          i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.

          ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).

     f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).

The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

     a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested.

     b. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License.

     c. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

     a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.

     b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

     a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.

     b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.

     c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

     d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.

     e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.

Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.

Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time.

Creative Commons may be contacted at http://creativecommons.org/.


================================================
FILE: LICENSES/CC-BY-SA-3.0.txt
================================================
Creative Commons Attribution-ShareAlike 3.0 Unported

 CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.

License

THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

     a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.

     b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License.

     c. "Creative Commons Compatible License" means a license that is listed at http://creativecommons.org/compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License, including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License.

     d. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.

     e. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.

     f. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.

     g. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.

     h. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.

     i. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.

     j. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.

     k. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.

2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.

3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

     a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;

     b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";

     c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,

     d. to Distribute and Publicly Perform Adaptations.

     e. For the avoidance of doubt:

          i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;

          ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,

          iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.

The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.

4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

     a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested.

     b. You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License.

     c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.

     d. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

     a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.

     b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

     a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.

     b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.

     c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

     d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.

     e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.

     f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.

Creative Commons Notice

Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.

Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of the License.

Creative Commons may be contacted at http://creativecommons.org/.


================================================
FILE: LICENSES/CC-BY-SA-4.0.txt
================================================
Creative Commons Attribution-ShareAlike 4.0 International

 Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.

Using Creative Commons Public Licenses

Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.

Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.

Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described.

Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.

Creative Commons Attribution-ShareAlike 4.0 International Public License

By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.

Section 1 – Definitions.

     a.	Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.

     b.	Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.

     c.	BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.

     d.	Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.

     e.	Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.

     f.	Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.

     g.	License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.

     h.	Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.

     i.	Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.

     j.	Licensor means the individual(s) or entity(ies) granting rights under this Public License.

     k.	Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.

     l.	Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.

     m.	You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.

Section 2 – Scope.

     a.	License grant.

          1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:

               A. reproduce and Share the Licensed Material, in whole or in part; and

               B. produce, reproduce, and Share Adapted Material.

          2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.

          3. Term. The term of this Public License is specified in Section 6(a).

          4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.

          5. Downstream recipients.

               A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.

               B. Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.

               C. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.

          6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).

     b.	Other rights.

          1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.

          2. Patent and trademark rights are not licensed under this Public License.

          3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.

Section 3 – License Conditions.

Your exercise of the Licensed Rights is expressly made subject to the following conditions.

     a.	Attribution.

          1. If You Share the Licensed Material (including in modified form), You must:

               A. retain the following if it is supplied by the Licensor with the Licensed Material:

                    i.	identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);

                    ii.	a copyright notice;

                    iii. a notice that refers to this Public License;

                    iv.	a notice that refers to the disclaimer of warranties;

                    v.	a URI or hyperlink to the Licensed Material to the extent reasonably practicable;

               B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and

               C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.

          2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.

          3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.

     b.	ShareAlike.In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.

          1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.

          2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.

          3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.

Section 4 – Sui Generis Database Rights.

Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:

     a.	for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;

     b.	if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and

     c.	You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.

Section 5 – Disclaimer of Warranties and Limitation of Liability.

     a.	Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.

     b.	To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.

     c.	The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.

Section 6 – Term and Termination.

     a.	This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.

     b.	Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:

          1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or

          2. upon express reinstatement by the Licensor.

     c.	For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.

     d.	For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.

     e.	Sections 1, 5, 6, 7, and 8 survive termination of this Public License.

Section 7 – Other Terms and Conditions.

     a.	The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.

     b.	Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.

Section 8 – Interpretation.

     a.	For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.

     b.	To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.

     c.	No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.

     d.	Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.

Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.

Creative Commons may be contacted at creativecommons.org.


================================================
FILE: LICENSES/GFDL-1.2-or-later.txt
================================================
GNU Free Documentation License
Version 1.2, November 2002

Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

0. PREAMBLE

The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.

We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

1. APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.

A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.

The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque".

Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.

The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.

A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition.

The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

2. VERBATIM COPYING

You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and you may publicly display copies.

3. COPYING IN QUANTITY

If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.

If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.

It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

4. MODIFICATIONS

You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:

     A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
     B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.
     C. State on the Title page the name of the publisher of the Modified Version, as the publisher.
     D. Preserve all the copyright notices of the Document.
     E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
     F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
     G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice.
     H. Include an unaltered copy of this License.
     I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
     J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
     K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
     L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
     M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version.
     N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section.
     O. Preserve any Warranty Disclaimers.

If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.

You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.

You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.

The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

5. COMBINING DOCUMENTS

You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.

The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.

In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements".

6. COLLECTIONS OF DOCUMENTS

You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.

You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

7. AGGREGATION WITH INDEPENDENT WORKS

A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.

8. TRANSLATION

Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.

If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

9. TERMINATION

You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

10. FUTURE REVISIONS OF THIS LICENSE

The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.

Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation.

ADDENDUM: How to use this License for your documents

To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:

 Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this:

 with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.

If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.

If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.


================================================
FILE: LICENSES/MIT.txt
================================================
MIT License

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: LICENSES/MPL-2.0.txt
================================================
Mozilla Public License Version 2.0
==================================

1. Definitions
--------------

1.1. "Contributor"
    means each individual or legal entity that creates, contributes to
    the creation of, or owns Covered Software.

1.2. "Contributor Version"
    means the combination of the Contributions of others (if any) used
    by a Contributor and that particular Contributor's Contribution.

1.3. "Contribution"
    means Covered Software of a particular Contributor.

1.4. "Covered Software"
    means Source Code Form to which the initial Contributor has attached
    the notice in Exhibit A, the Executable Form of such Source Code
    Form, and Modifications of such Source Code Form, in each case
    including portions thereof.

1.5. "Incompatible With Secondary Licenses"
    means

    (a) that the initial Contributor has attached the notice described
        in Exhibit B to the Covered Software; or

    (b) that the Covered Software was made available under the terms of
        version 1.1 or earlier of the License, but not also under the
        terms of a Secondary License.

1.6. "Executable Form"
    means any form of the work other than Source Code Form.

1.7. "Larger Work"
    means a work that combines Covered Software with other material, in 
    a separate file or files, that is not Covered Software.

1.8. "License"
    means this document.

1.9. "Licensable"
    means having the right to grant, to the maximum extent possible,
    whether at the time of the initial grant or subsequently, any and
    all of the rights conveyed by this License.

1.10. "Modifications"
    means any of the following:

    (a) any file in Source Code Form that results from an addition to,
        deletion from, or modification of the contents of Covered
        Software; or

    (b) any new file in Source Code Form that contains any Covered
        Software.

1.11. "Patent Claims" of a Contributor
    means any patent claim(s), including without limitation, method,
    process, and apparatus claims, in any patent Licensable by such
    Contributor that would be infringed, but for the grant of the
    License, by the making, using, selling, offering for sale, having
    made, import, or transfer of either its Contributions or its
    Con
Download .txt
gitextract_k_dq053s/

├── .docker/
│   ├── Dockerfile
│   └── Dockerfile.alpine
├── .dockerignore
├── .git_archival.txt
├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── 1-bug-report-general.yml
│   │   ├── 2-problem-with-specific-file.yml
│   │   ├── 3-app.yml
│   │   └── 4-feature-request.yml
│   ├── dependabot.yml
│   └── workflows/
│       ├── build.yml
│       ├── release.yml
│       └── triage.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .readthedocs.yaml
├── LICENSE
├── LICENSES/
│   ├── AGPL-3.0-or-later.txt
│   ├── Apache-2.0.txt
│   ├── CC-BY-SA-1.0.txt
│   ├── CC-BY-SA-2.0.txt
│   ├── CC-BY-SA-2.5.txt
│   ├── CC-BY-SA-3.0.txt
│   ├── CC-BY-SA-4.0.txt
│   ├── GFDL-1.2-or-later.txt
│   ├── MIT.txt
│   ├── MPL-2.0.txt
│   └── Zlib.txt
├── README.md
├── README_ZH.md
├── REUSE.toml
├── bin/
│   └── bump_version.py
├── docs/
│   ├── advanced.md
│   ├── api.md
│   ├── apiref.md
│   ├── batch.md
│   ├── cloud.md
│   ├── conf.py
│   ├── contributing.md
│   ├── cookbook.md
│   ├── design_notes.md
│   ├── docker.md
│   ├── errors.md
│   ├── index.md
│   ├── installation.md
│   ├── introduction.md
│   ├── jbig2.md
│   ├── languages.md
│   ├── maintainers.md
│   ├── optimizer.md
│   ├── pdfsecurity.md
│   ├── performance.md
│   ├── plugins.md
│   └── releasenotes/
│       ├── index.md
│       ├── version02.md
│       ├── version03.md
│       ├── version04.md
│       ├── version05.md
│       ├── version06.md
│       ├── version07.md
│       ├── version08.md
│       ├── version09.md
│       ├── version10.md
│       ├── version11.md
│       ├── version12.md
│       ├── version13.md
│       ├── version14.md
│       ├── version15.md
│       ├── version16.md
│       └── version17.md
├── misc/
│   ├── _webservice.py
│   ├── batch.py
│   ├── bisect_pdf.py
│   ├── completion/
│   │   ├── ocrmypdf.bash
│   │   └── ocrmypdf.fish
│   ├── docker-compose.example.yml
│   ├── example_plugin.py
│   ├── flatpak/
│   │   └── io.ocrmypdf.ocrmypdf.metainfo.xml
│   ├── ocrmypdf_compare.py
│   ├── pdf_compare.py
│   ├── pdf_text_diff.py
│   ├── screencast/
│   │   ├── README.md
│   │   └── demo.cast
│   ├── synology.py
│   ├── watcher.py
│   └── webservice.py
├── pyproject.toml
├── scripts/
│   └── generate_glyphless_font.py
├── snapcraft.yaml
├── src/
│   └── ocrmypdf/
│       ├── RELEASE.md
│       ├── __init__.py
│       ├── __main__.py
│       ├── _annots.py
│       ├── _concurrent.py
│       ├── _defaults.py
│       ├── _exec/
│       │   ├── __init__.py
│       │   ├── ghostscript.py
│       │   ├── jbig2enc.py
│       │   ├── pngquant.py
│       │   ├── tesseract.py
│       │   ├── unpaper.py
│       │   └── verapdf.py
│       ├── _graft.py
│       ├── _jobcontext.py
│       ├── _logging.py
│       ├── _metadata.py
│       ├── _options.py
│       ├── _pipeline.py
│       ├── _pipelines/
│       │   ├── __init__.py
│       │   ├── _common.py
│       │   ├── hocr_to_ocr_pdf.py
│       │   ├── ocr.py
│       │   └── pdf_to_hocr.py
│       ├── _plugin_manager.py
│       ├── _plugin_registry.py
│       ├── _progressbar.py
│       ├── _validation.py
│       ├── _validation_coordinator.py
│       ├── _version.py
│       ├── api.py
│       ├── builtin_plugins/
│       │   ├── __init__.py
│       │   ├── concurrency.py
│       │   ├── default_filters.py
│       │   ├── ghostscript.py
│       │   ├── null_ocr.py
│       │   ├── optimize.py
│       │   ├── pypdfium.py
│       │   └── tesseract_ocr.py
│       ├── cli.py
│       ├── data/
│       │   ├── __init__.py
│       │   └── sRGB.icc
│       ├── exceptions.py
│       ├── extra_plugins/
│       │   ├── __init__.py
│       │   └── semfree.py
│       ├── font/
│       │   ├── __init__.py
│       │   ├── font_manager.py
│       │   ├── font_provider.py
│       │   ├── multi_font_manager.py
│       │   └── system_font_provider.py
│       ├── fpdf_renderer/
│       │   ├── __init__.py
│       │   └── renderer.py
│       ├── helpers.py
│       ├── hocrtransform/
│       │   ├── __init__.py
│       │   ├── __main__.py
│       │   └── hocr_parser.py
│       ├── imageops.py
│       ├── languages.py
│       ├── models/
│       │   ├── __init__.py
│       │   └── ocr_element.py
│       ├── optimize.py
│       ├── pdfa.py
│       ├── pdfinfo/
│       │   ├── __init__.py
│       │   ├── _contentstream.py
│       │   ├── _image.py
│       │   ├── _types.py
│       │   ├── _worker.py
│       │   ├── info.py
│       │   └── layout.py
│       ├── pluginspec.py
│       ├── py.typed
│       ├── quality.py
│       └── subprocess/
│           ├── __init__.py
│           └── _windows.py
└── tests/
    ├── __init__.py
    ├── cache/
    │   └── manifest.jsonl
    ├── conftest.py
    ├── plugins/
    │   ├── gs_feature_elision.py
    │   ├── gs_pdfa_failure.py
    │   ├── gs_raster_failure.py
    │   ├── gs_raster_soft_error.py
    │   ├── gs_render_failure.py
    │   ├── gs_render_soft_error.py
    │   ├── tesseract_badutf8.py
    │   ├── tesseract_big_image_error.py
    │   ├── tesseract_cache.py
    │   ├── tesseract_crash.py
    │   ├── tesseract_debug_rotate.py
    │   ├── tesseract_noop.py
    │   └── tesseract_simulate_oom_killer.py
    ├── resources/
    │   ├── README.rst
    │   ├── arabic.hocr
    │   ├── cjk.hocr
    │   ├── devanagari.hocr
    │   ├── hello_world_scripts.hocr
    │   ├── latin.hocr
    │   ├── linn.txt
    │   ├── multilingual.hocr
    │   └── tagged.odt
    ├── test_acroform.py
    ├── test_annots.py
    ├── test_api.py
    ├── test_check_pdf.py
    ├── test_completion.py
    ├── test_concurrency.py
    ├── test_fpdf_renderer.py
    ├── test_ghostscript.py
    ├── test_graft.py
    ├── test_helpers.py
    ├── test_hocr_parser.py
    ├── test_hocrtransform.py
    ├── test_image_input.py
    ├── test_imageops.py
    ├── test_json_serialization.py
    ├── test_logging.py
    ├── test_main.py
    ├── test_metadata.py
    ├── test_multi_font_manager.py
    ├── test_multilingual_direct.py
    ├── test_null_ocr_engine.py
    ├── test_ocr_element.py
    ├── test_ocr_engine_interface.py
    ├── test_ocr_engine_selection.py
    ├── test_optimize.py
    ├── test_page_boxes.py
    ├── test_page_numbers.py
    ├── test_pdf_renderer.py
    ├── test_pdfa.py
    ├── test_pdfinfo.py
    ├── test_pipeline.py
    ├── test_pipeline_generate_ocr.py
    ├── test_preprocessing.py
    ├── test_quality.py
    ├── test_rasterizer.py
    ├── test_rotation.py
    ├── test_semfree.py
    ├── test_soft_error.py
    ├── test_stdio.py
    ├── test_system_font_provider.py
    ├── test_tagged.py
    ├── test_tesseract.py
    ├── test_unpaper.py
    ├── test_userunit.py
    ├── test_validation.py
    ├── test_verapdf.py
    └── test_watcher.py
Download .txt
SYMBOL INDEX (1474 symbols across 128 files)

FILE: bin/bump_version.py
  function validate_release_notes (line 42) | def validate_release_notes(new_version: str) -> bool:
  function get_github_client (line 69) | def get_github_client():
  function wait_for_ci_completion (line 101) | def wait_for_ci_completion(commit_sha: str, timeout_minutes: int = 30) -...
  function push_and_wait_for_ci (line 178) | def push_and_wait_for_ci(branch: str) -> bool:
  function push_tag (line 206) | def push_tag(tag: str) -> bool:
  function bump_version (line 224) | def bump_version() -> None:

FILE: docs/conf.py
  class Mock (line 94) | class Mock(MagicMock):
    method __getattr__ (line 96) | def __getattr__(cls, name):

FILE: misc/_webservice.py
  function get_host_url_with_port (line 29) | def get_host_url_with_port(port: int) -> str:

FILE: misc/batch.py
  function filecompare (line 31) | def filecompare(a, b):

FILE: misc/example_plugin.py
  function add_options (line 34) | def add_options(parser):
  function prepare (line 40) | def prepare(options):
  function validate (line 45) | def validate(pdfinfo, options):
  function filter_ocr_image (line 50) | def filter_ocr_image(page, image):
  function filter_page_image (line 58) | def filter_page_image(page, image_filename):

FILE: misc/ocrmypdf_compare.py
  function do_column (line 22) | def do_column(label, suffix, d):
  function main (line 50) | def main():

FILE: misc/pdf_compare.py
  function do_metadata (line 20) | def do_metadata(pdf):
  function main (line 34) | def main():

FILE: misc/pdf_text_diff.py
  function main (line 19) | def main(

FILE: misc/watcher.py
  class LoggingLevelEnum (line 38) | class LoggingLevelEnum(str, Enum):
  function get_output_path (line 48) | def get_output_path(root: Path, basename: str, output_dir_year_month: bo...
  function wait_for_file_ready (line 63) | def wait_for_file_ready(
  function execute_ocrmypdf (line 91) | def execute_ocrmypdf(
  class HandleObserverEvent (line 136) | class HandleObserverEvent(PatternMatchingEventHandler):
    method __init__ (line 137) | def __init__(  # noqa: D107
    method on_any_event (line 153) | def on_any_event(self, event):
  function main (line 159) | def main(

FILE: scripts/generate_glyphless_font.py
  function classify_codepoint (line 78) | def classify_codepoint(codepoint: int) -> str:
  function build_cmap (line 117) | def build_cmap() -> dict[int, str]:
  function create_font (line 126) | def create_font() -> TTFont:
  function main (line 198) | def main() -> None:

FILE: src/ocrmypdf/__main__.py
  function sigbus (line 31) | def sigbus(*args):
  function run (line 40) | def run(args=None):

FILE: src/ocrmypdf/_annots.py
  function remove_broken_goto_annotations (line 15) | def remove_broken_goto_annotations(pdf: Pdf) -> bool:

FILE: src/ocrmypdf/_concurrent.py
  function _task_noop (line 18) | def _task_noop(*_args, **_kwargs) -> None:
  function _task_finished_noop (line 22) | def _task_finished_noop(_result: Any, pbar: ProgressBar):
  class Executor (line 26) | class Executor(ABC):
    method __init__ (line 32) | def __init__(self, *, pbar_class=None):
    method __call__ (line 36) | def __call__(
    method _execute (line 89) | def _execute(
  function setup_executor (line 103) | def setup_executor(plugin_manager) -> Executor:
  class SerialExecutor (line 108) | class SerialExecutor(Executor):
    method _execute (line 115) | def _execute(

FILE: src/ocrmypdf/_exec/ghostscript.py
  class DuplicateFilter (line 44) | class DuplicateFilter(logging.Filter):
    method __init__ (line 51) | def __init__(self, logger: logging.Logger, context_window=5):
    method filter (line 57) | def filter(self, record):
  function version (line 75) | def version() -> Version:
  function _gs_error_reported (line 79) | def _gs_error_reported(stream) -> bool:
  function _gs_devicen_reported (line 84) | def _gs_devicen_reported(stream) -> bool:
  function rasterize_pdf (line 98) | def rasterize_pdf(
  class GhostscriptFollower (line 226) | class GhostscriptFollower:
    method __init__ (line 232) | def __init__(self, progressbar_class):
    method __enter__ (line 237) | def __enter__(self):
    method __exit__ (line 243) | def __exit__(self, exc_type, exc_value, traceback):
    method __call__ (line 248) | def __call__(self, line):
  function generate_pdfa (line 265) | def generate_pdfa(

FILE: src/ocrmypdf/_exec/jbig2enc.py
  function version (line 16) | def version() -> Version:
  function available (line 26) | def available():
  function convert_single (line 34) | def convert_single(cwd, infile, outfile, threshold):

FILE: src/ocrmypdf/_exec/pngquant.py
  function version (line 17) | def version() -> Version:
  function available (line 21) | def available():
  function quantize (line 29) | def quantize(input_file: Path, output_file: Path, quality_min: int, qual...

FILE: src/ocrmypdf/_exec/tesseract.py
  function _tesseract_env (line 31) | def _tesseract_env(omp_thread_limit: int | None) -> dict[str, str] | None:
  class ThresholdingMethod (line 40) | class ThresholdingMethod(IntEnum):
  class TesseractLoggerAdapter (line 58) | class TesseractLoggerAdapter(logging.LoggerAdapter):
    method process (line 61) | def process(self, msg, kwargs):
  class TesseractVersion (line 110) | class TesseractVersion(Version):
  function version (line 118) | def version() -> Version:
  function has_thresholding (line 122) | def has_thresholding() -> bool:
  function get_languages (line 127) | def get_languages() -> set[str]:
  function tess_base_args (line 158) | def tess_base_args(langs: list[str], engine_mode: int | None) -> list[str]:
  function _parse_tesseract_output (line 167) | def _parse_tesseract_output(binary_output: bytes) -> dict[str, str]:
  function get_orientation (line 178) | def get_orientation(
  function _is_empty_page_error (line 222) | def _is_empty_page_error(exc):
  function get_deskew (line 234) | def get_deskew(
  function tesseract_log_output (line 275) | def tesseract_log_output(stream: bytes) -> None:
  function page_timedout (line 316) | def page_timedout(timeout: float) -> None:
  function _generate_null_hocr (line 322) | def _generate_null_hocr(output_hocr: Path, output_text: Path, image: Pat...
  function generate_hocr (line 331) | def generate_hocr(
  function use_skip_page (line 398) | def use_skip_page(output_pdf: Path, output_text: Path) -> None:
  function generate_pdf (line 405) | def generate_pdf(

FILE: src/ocrmypdf/_exec/unpaper.py
  class UnpaperImageTooLargeError (line 34) | class UnpaperImageTooLargeError(Exception):
    method __init__ (line 37) | def __init__(
  function version (line 49) | def version() -> Version:
  function _setup_unpaper_io (line 54) | def _setup_unpaper_io(input_file: Path) -> Iterator[tuple[Path, Path, Pa...
  function run_unpaper (line 69) | def run_unpaper(
  function clean (line 103) | def clean(

FILE: src/ocrmypdf/_exec/verapdf.py
  class ValidationResult (line 22) | class ValidationResult(NamedTuple):
  function version (line 30) | def version() -> Version:
  function available (line 35) | def available() -> bool:
  function output_type_to_flavour (line 44) | def output_type_to_flavour(output_type: str) -> str:
  function validate (line 62) | def validate(input_file: Path, flavour: str) -> ValidationResult:

FILE: src/ocrmypdf/_graft.py
  class RenderMode (line 34) | class RenderMode(Enum):
  class Fpdf2PageInfo (line 46) | class Fpdf2PageInfo:
  class Fpdf2ParsedPage (line 57) | class Fpdf2ParsedPage:
  function _compute_text_misalignment (line 71) | def _compute_text_misalignment(
  function _compute_page_rotation (line 91) | def _compute_page_rotation(
  function _build_text_layer_ctm (line 109) | def _build_text_layer_ctm(
  function _ensure_dictionary (line 171) | def _ensure_dictionary(obj: Dictionary | Stream, name: Name):
  function strip_invisible_text (line 177) | def strip_invisible_text(pdf: Pdf, page: Page):
  class OcrGrafter (line 214) | class OcrGrafter:
    method __init__ (line 217) | def __init__(self, context: PdfContext):
    method graft_page (line 237) | def graft_page(
    method finalize (line 320) | def finalize(self):
    method _parse_hocr_pages (line 338) | def _parse_hocr_pages(self):
    method _render_and_graft_fpdf2_pages (line 372) | def _render_and_graft_fpdf2_pages(self):
    method _graft_fpdf2_text_layer (line 421) | def _graft_fpdf2_text_layer(self, pageno: int, text_page: Page, text_r...
    method _graft_sandwich_text_layer (line 512) | def _graft_sandwich_text_layer(

FILE: src/ocrmypdf/_jobcontext.py
  class PdfContext (line 20) | class PdfContext:
    method __init__ (line 30) | def __init__(
    method get_path (line 44) | def get_path(self, name: str) -> Path:
    method get_page_contexts (line 52) | def get_page_contexts(self) -> Iterator[PageContext]:
    method get_page_context_args (line 58) | def get_page_context_args(self) -> Iterator[tuple[PageContext]]:
  class PageContext (line 65) | class PageContext:
    method __init__ (line 81) | def __init__(self, pdf_context: PdfContext, pageno):
    method get_path (line 92) | def get_path(self, name: str) -> Path:
    method __getstate__ (line 100) | def __getstate__(self):
    method __setstate__ (line 112) | def __setstate__(self, state):

FILE: src/ocrmypdf/_logging.py
  class PageNumberFilter (line 14) | class PageNumberFilter(logging.Filter):
    method filter (line 17) | def filter(self, record):
  class RichLoggingHandler (line 26) | class RichLoggingHandler(RichHandler):
    method __init__ (line 27) | def __init__(self, console: Console, **kwargs):

FILE: src/ocrmypdf/_metadata.py
  function get_docinfo (line 26) | def get_docinfo(base_pdf: Pdf, context: PdfContext) -> dict[str, str]:
  function report_on_metadata (line 60) | def report_on_metadata(options, missing):
  function repair_docinfo_nuls (line 78) | def repair_docinfo_nuls(pdf):
  function should_linearize (line 97) | def should_linearize(working_file: Path, context: PdfContext) -> bool:
  function _fix_metadata (line 106) | def _fix_metadata(meta_original: PdfMetadata, meta_pdf: PdfMetadata):
  function _unset_empty_metadata (line 118) | def _unset_empty_metadata(meta: PdfMetadata, options):
  function _set_language (line 142) | def _set_language(pdf: Pdf, languages: list[str]):
  class MetadataProgress (line 155) | class MetadataProgress:
    method __init__ (line 156) | def __init__(self, progressbar_class, enable: bool = True):
    method __enter__ (line 162) | def __enter__(self):
    method __exit__ (line 166) | def __exit__(self, exc_type, exc_value, traceback):
    method __call__ (line 169) | def __call__(self, percent: int):
  function metadata_fixup (line 175) | def metadata_fixup(

FILE: src/ocrmypdf/_options.py
  class ProcessingMode (line 37) | class ProcessingMode(StrEnum):
  class TaggedPdfMode (line 54) | class TaggedPdfMode(StrEnum):
  function _pages_from_ranges (line 68) | def _pages_from_ranges(ranges: str) -> set[int]:
  class OcrOptions (line 108) | class OcrOptions(BaseModel):
    method force_ocr (line 129) | def force_ocr(self) -> bool:
    method skip_text (line 134) | def skip_text(self) -> bool:
    method redo_ocr (line 139) | def redo_ocr(self) -> bool:
    method jpeg_quality (line 182) | def jpeg_quality(self):
    method jpeg_quality (line 187) | def jpeg_quality(self, value):
    method validate_languages (line 232) | def validate_languages(cls, v):
    method validate_output_type (line 240) | def validate_output_type(cls, v):
    method validate_pdf_renderer (line 249) | def validate_pdf_renderer(cls, v):
    method validate_rasterizer (line 261) | def validate_rasterizer(cls, v):
    method validate_clean_final (line 270) | def validate_clean_final(cls, v, info):
    method validate_jobs (line 278) | def validate_jobs(cls, v):
    method validate_verbose (line 286) | def validate_verbose(cls, v):
    method validate_oversample (line 294) | def validate_oversample(cls, v):
    method validate_max_image_mpixels (line 302) | def validate_max_image_mpixels(cls, v):
    method validate_rotate_pages_threshold (line 310) | def validate_rotate_pages_threshold(cls, v):
    method validate_metadata_unicode (line 318) | def validate_metadata_unicode(cls, v):
    method validate_pages_format (line 334) | def validate_pages_format(cls, v):
    method validate_unpaper_args (line 346) | def validate_unpaper_args(cls, v):
    method handle_special_cases (line 360) | def handle_special_cases(cls, data):
    method validate_redo_ocr_options (line 406) | def validate_redo_ocr_options(self):
    method validate_output_type_compatibility (line 418) | def validate_output_type_compatibility(self):
    method lossless_reconstruction (line 432) | def lossless_reconstruction(self):
    method model_dump_json_safe (line 444) | def model_dump_json_safe(self) -> str:
    method model_validate_json_safe (line 493) | def model_validate_json_safe(cls, json_str: str) -> OcrOptions:
    method register_plugin_models (line 537) | def register_plugin_models(cls, models: dict[str, type]) -> None:
    method _get_plugin_options (line 546) | def _get_plugin_options(self, namespace: str) -> Any:
    method __getattr__ (line 609) | def __getattr__(self, name: str) -> Any:

FILE: src/ocrmypdf/_pipeline.py
  function register_heif_opener (line 54) | def register_heif_opener():
  function triage_image_file (line 67) | def triage_image_file(input_file: Path, output_file: Path, options: OcrO...
  function _pdf_guess_version (line 150) | def _pdf_guess_version(input_file: Path, search_window=1024) -> str:
  function triage (line 165) | def triage(
  function get_pdfinfo (line 193) | def get_pdfinfo(
  function validate_pdfinfo_options (line 220) | def validate_pdfinfo_options(context: PdfContext) -> None:
  function _vector_page_dpi (line 269) | def _vector_page_dpi(pageinfo: PageInfo) -> int:
  function get_page_square_dpi (line 274) | def get_page_square_dpi(
  function get_canvas_square_dpi (line 299) | def get_canvas_square_dpi(
  function is_ocr_required (line 323) | def is_ocr_required(page_context: PageContext) -> bool:
  function rasterize_preview (line 399) | def rasterize_preview(input_file: Path, page_context: PageContext) -> Path:
  function describe_rotation (line 422) | def describe_rotation(
  function get_orientation_correction (line 448) | def get_orientation_correction(preview: Path, page_context: PageContext)...
  function calculate_image_dpi (line 479) | def calculate_image_dpi(page_context: PageContext) -> Resolution:
  function calculate_raster_dpi (line 490) | def calculate_raster_dpi(page_context: PageContext):
  function rasterize (line 511) | def rasterize(
  function preprocess_remove_background (line 588) | def preprocess_remove_background(input_file: Path, page_context: PageCon...
  function preprocess_deskew (line 599) | def preprocess_deskew(input_file: Path, page_context: PageContext) -> Path:
  function preprocess_clean (line 630) | def preprocess_clean(input_file: Path, page_context: PageContext) -> Path:
  function create_ocr_image (line 642) | def create_ocr_image(image: Path, page_context: PageContext) -> Path:
  function ocr_engine_hocr (line 691) | def ocr_engine_hocr(input_file: Path, page_context: PageContext) -> tupl...
  function ocr_engine_direct (line 707) | def ocr_engine_direct(
  function should_visible_page_image_use_jpg (line 738) | def should_visible_page_image_use_jpg(pageinfo: PageInfo) -> bool:
  function create_visible_page_jpg (line 755) | def create_visible_page_jpg(image: Path, page_context: PageContext) -> P...
  function create_pdf_page_from_image (line 778) | def create_pdf_page_from_image(
  function ocr_engine_textonly_pdf (line 822) | def ocr_engine_textonly_pdf(
  function _offset_rect (line 840) | def _offset_rect(rect: tuple[float, float, float, float], offset: tuple[...
  function _adjust_pagebox (line 850) | def _adjust_pagebox(
  function fix_pagepdf_boxes (line 867) | def fix_pagepdf_boxes(
  function generate_postscript_stub (line 914) | def generate_postscript_stub(context: PdfContext) -> Path:
  function convert_to_pdfa (line 928) | def convert_to_pdfa(input_pdf: Path, input_ps_stub: Path, context: PdfCo...
  function try_speculative_pdfa (line 982) | def try_speculative_pdfa(input_pdf: Path, context: PdfContext) -> Path |...
  function try_auto_pdfa (line 1041) | def try_auto_pdfa(input_pdf: Path, context: PdfContext) -> tuple[Path, s...
  function _is_safe_pdfa (line 1082) | def _is_safe_pdfa(input_pdf: Path, options) -> bool:
  function should_linearize (line 1105) | def should_linearize(working_file: Path, context: PdfContext) -> bool:
  function get_pdf_save_settings (line 1114) | def get_pdf_save_settings(output_type: str) -> dict[str, Any]:
  function _file_size_ratio (line 1137) | def _file_size_ratio(
  function optimize_pdf (line 1160) | def optimize_pdf(
  function enumerate_compress_ranges (line 1182) | def enumerate_compress_ranges(
  function merge_sidecars (line 1211) | def merge_sidecars(txt_files: Iterable[Path | None], context: PdfContext...
  function copy_final (line 1234) | def copy_final(

FILE: src/ocrmypdf/_pipelines/_common.py
  function _set_logging_tls (line 74) | def _set_logging_tls(tls):
  function set_thread_pageno (line 90) | def set_thread_pageno(pageno: int | None):
  class PageResult (line 95) | class PageResult(NamedTuple):
  class HOCRResultEncoder (line 117) | class HOCRResultEncoder(json.JSONEncoder):
    method default (line 118) | def default(self, obj):
  class HOCRResultDecoder (line 124) | class HOCRResultDecoder(json.JSONDecoder):
    method __init__ (line 125) | def __init__(self, *args, **kwargs):
    method dict_to_object (line 129) | def dict_to_object(self, d):
  class HOCRResult (line 136) | class HOCRResult:
    method from_json (line 158) | def from_json(cls, json_str: str) -> HOCRResult:
    method to_json (line 162) | def to_json(self) -> str:
  function configure_debug_logging (line 167) | def configure_debug_logging(
  function worker_init (line 197) | def worker_init(max_pixels: int | None) -> None:
  function manage_debug_log_handler (line 207) | def manage_debug_log_handler(
  function _print_temp_folder_location (line 229) | def _print_temp_folder_location(work_folder: Path):
  function manage_work_folder (line 246) | def manage_work_folder(*, work_folder: Path, retain: bool, print_locatio...
  function cli_exception_handler (line 257) | def cli_exception_handler(
  function setup_pipeline (line 322) | def setup_pipeline(
  function do_get_pdfinfo (line 342) | def do_get_pdfinfo(pdf_path: Path, executor: Executor, options) -> PdfInfo:
  function preprocess (line 361) | def preprocess(
  function make_intermediate_images (line 378) | def make_intermediate_images(
  function process_page (line 438) | def process_page(page_context: PageContext) -> tuple[Path, Path | None, ...
  function postprocess (line 471) | def postprocess(
  function report_output_pdf (line 506) | def report_output_pdf(options, start_input_file, optimize_messages) -> E...

FILE: src/ocrmypdf/_pipelines/hocr_to_ocr_pdf.py
  function _exec_hocrtransform_sync (line 39) | def _exec_hocrtransform_sync(page_context: PageContext) -> HOCRResult:
  function exec_hocr_to_ocr_pdf (line 51) | def exec_hocr_to_ocr_pdf(context: PdfContext, executor: Executor) -> Seq...
  function run_hocr_to_ocr_pdf_pipeline (line 106) | def run_hocr_to_ocr_pdf_pipeline(

FILE: src/ocrmypdf/_pipelines/ocr.py
  function _image_to_ocr_text (line 58) | def _image_to_ocr_text(
  function _exec_page_sync (line 80) | def _exec_page_sync(page_context: PageContext) -> PageResult:
  function exec_concurrent (line 101) | def exec_concurrent(context: PdfContext, executor: Executor) -> Sequence...
  function _run_pipeline (line 164) | def _run_pipeline(
  function run_pipeline_cli (line 199) | def run_pipeline_cli(
  function run_pipeline (line 214) | def run_pipeline(

FILE: src/ocrmypdf/_pipelines/pdf_to_hocr.py
  function _exec_page_hocr_sync (line 39) | def _exec_page_hocr_sync(page_context: PageContext) -> HOCRResult:
  function exec_pdf_to_hocr (line 61) | def exec_pdf_to_hocr(context: PdfContext, executor: Executor) -> None:
  function run_hocr_pipeline (line 86) | def run_hocr_pipeline(

FILE: src/ocrmypdf/_plugin_manager.py
  class OcrmypdfPluginManager (line 35) | class OcrmypdfPluginManager:
    method __init__ (line 44) | def __init__(
    method pluggy (line 59) | def pluggy(self) -> pluggy.PluginManager:
    method __getstate__ (line 67) | def __getstate__(self):
    method __setstate__ (line 76) | def __setstate__(self, state):
    method _setup_plugins (line 84) | def _setup_plugins(self):
    method get_logging_console (line 119) | def get_logging_console(self) -> Handler | None:
    method get_executor (line 123) | def get_executor(self, *, progressbar_class: type[ProgressBar]) -> Exe...
    method get_progressbar_class (line 127) | def get_progressbar_class(self) -> type[ProgressBar] | None:
    method rasterize_pdf_page (line 131) | def rasterize_pdf_page(
    method filter_ocr_image (line 161) | def filter_ocr_image(
    method filter_page_image (line 167) | def filter_page_image(
    method filter_pdf_page (line 173) | def filter_pdf_page(
    method get_ocr_engine (line 186) | def get_ocr_engine(self, *, options: OcrOptions | None = None) -> OcrE...
    method generate_pdfa (line 197) | def generate_pdfa(
    method optimize_pdf (line 221) | def optimize_pdf(
    method is_optimization_enabled (line 242) | def is_optimization_enabled(self, *, context: PdfContext) -> bool | None:
    method initialize (line 248) | def initialize(self, *, plugin_manager: pluggy.PluginManager) -> list[...
    method add_options (line 257) | def add_options(self, *, parser: ArgumentParser) -> list[None]:
    method register_options (line 261) | def register_options(self) -> list[dict[str, type[BaseModel]]]:
    method check_options (line 265) | def check_options(self, *, options: OcrOptions) -> list[None]:
    method validate (line 269) | def validate(self, *, pdfinfo: PdfInfo, options: OcrOptions) -> list[N...
  function get_plugin_manager (line 274) | def get_plugin_manager(

FILE: src/ocrmypdf/_plugin_registry.py
  class PluginOptionRegistry (line 15) | class PluginOptionRegistry:
    method __init__ (line 24) | def __init__(self):
    method register_option_model (line 27) | def register_option_model(
    method get_registered_models (line 48) | def get_registered_models(self) -> dict[str, type[BaseModel]]:

FILE: src/ocrmypdf/_progressbar.py
  class ProgressBar (line 22) | class ProgressBar(Protocol):
    method __init__ (line 115) | def __init__(
    method __enter__ (line 144) | def __enter__(self):
    method __exit__ (line 147) | def __exit__(self, *args):
    method update (line 150) | def update(self, n: float = 1, *, completed: float | None = None):
  class NullProgressBar (line 179) | class NullProgressBar:
    method __init__ (line 182) | def __init__(self, **kwargs):
    method __enter__ (line 185) | def __enter__(self):
    method __exit__ (line 188) | def __exit__(self, exc_type, exc_value, traceback):
    method update (line 191) | def update(self, _arg=None, *, completed=None):
  class RichProgressBar (line 195) | class RichProgressBar:
    method __init__ (line 198) | def __init__(
    method __enter__ (line 235) | def __enter__(self):
    method __exit__ (line 240) | def __exit__(self, exc_type, exc_value, traceback):
    method update (line 245) | def update(self, n=1, *, completed=None):

FILE: src/ocrmypdf/_validation.py
  function check_platform (line 39) | def check_platform() -> None:
  function check_options_languages (line 49) | def check_options_languages(
  function check_options_sidecar (line 86) | def check_options_sidecar(options: OcrOptions) -> None:
  function check_options_preprocessing (line 101) | def check_options_preprocessing(options: OcrOptions) -> None:
  function _check_plugin_invariant_options (line 121) | def _check_plugin_invariant_options(options: OcrOptions) -> None:
  function _check_plugin_options (line 127) | def _check_plugin_options(
  function check_options (line 146) | def check_options(options: OcrOptions, plugin_manager: OcrmypdfPluginMan...
  function create_input_file (line 159) | def create_input_file(options: OcrOptions, work_folder: Path) -> tuple[P...
  function check_requested_output_file (line 204) | def check_requested_output_file(options: OcrOptions) -> None:
  function report_output_file_size (line 232) | def report_output_file_size(

FILE: src/ocrmypdf/_validation_coordinator.py
  class ValidationCoordinator (line 20) | class ValidationCoordinator:
    method __init__ (line 23) | def __init__(self, plugin_manager: pluggy.PluginManager):
    method validate_all_options (line 27) | def validate_all_options(self, options: OcrOptions) -> None:
    method _validate_plugin_contexts (line 44) | def _validate_plugin_contexts(self, options: OcrOptions) -> None:
    method _validate_tesseract_options (line 56) | def _validate_tesseract_options(self, options: OcrOptions) -> None:
    method _validate_optimize_options (line 79) | def _validate_optimize_options(self, options: OcrOptions) -> None:
    method _validate_cross_cutting_concerns (line 93) | def _validate_cross_cutting_concerns(self, options: OcrOptions) -> None:
    method _handle_deprecated_pdf_renderer (line 134) | def _handle_deprecated_pdf_renderer(self, options: OcrOptions) -> None:

FILE: src/ocrmypdf/api.py
  function setup_plugin_infrastructure (line 72) | def setup_plugin_infrastructure(
  class Verbosity (line 133) | class Verbosity(IntEnum):
  function configure_logging (line 143) | def configure_logging(
  function _check_no_conflicting_ocr_params (line 236) | def _check_no_conflicting_ocr_params(
  function _remap_language_to_languages (line 286) | def _remap_language_to_languages(options_kwargs: dict) -> None:
  function create_options (line 314) | def create_options(
  function ocr (line 379) | def ocr(
  function ocr (line 389) | def ocr(
  function ocr (line 452) | def ocr(  # noqa: D417
  function _pdf_to_hocr (line 706) | def _pdf_to_hocr(  # noqa: D417
  function _hocr_to_ocr_pdf (line 845) | def _hocr_to_ocr_pdf(  # noqa: D417

FILE: src/ocrmypdf/builtin_plugins/concurrency.py
  function log_listener (line 39) | def log_listener(q: Queue):
  function process_sigbus (line 63) | def process_sigbus(*args):
  function process_init (line 68) | def process_init(q: Queue, user_init: UserInit, loglevel) -> None:
  function thread_init (line 90) | def thread_init(q: Queue, user_init: UserInit, loglevel) -> None:
  function setup_executor (line 102) | def setup_executor(use_threads: bool) -> tuple[Queue, Executor, WorkerIn...
  class StandardExecutor (line 127) | class StandardExecutor(Executor):
    method _execute (line 130) | def _execute(
  function get_executor (line 190) | def get_executor(progressbar_class):
  function get_progressbar_class (line 199) | def get_progressbar_class():
  function get_logging_console (line 209) | def get_logging_console():

FILE: src/ocrmypdf/builtin_plugins/default_filters.py
  function filter_pdf_page (line 11) | def filter_pdf_page(page, image_filename, output_pdf):  # pylint: disabl...

FILE: src/ocrmypdf/builtin_plugins/ghostscript.py
  class ColorConversionStrategy (line 29) | class ColorConversionStrategy(StrEnum):
  class PdfaImageCompression (line 39) | class PdfaImageCompression(StrEnum):
  class GhostscriptOptions (line 47) | class GhostscriptOptions(BaseModel):
    method add_arguments_to_parser (line 59) | def add_arguments_to_parser(cls, parser, namespace: str = 'ghostscript'):
  function register_options (line 92) | def register_options():
  function add_options (line 98) | def add_options(parser):
  function check_options (line 104) | def check_options(options):
  function rasterize_pdf_page (line 161) | def rasterize_pdf_page(
  function _collect_dctdecode_images (line 195) | def _collect_dctdecode_images(pdf: Pdf) -> dict[tuple, list[tuple[Stream...
  function _repair_gs106_jpeg_corruption (line 260) | def _repair_gs106_jpeg_corruption(
  function generate_pdfa (line 334) | def generate_pdfa(

FILE: src/ocrmypdf/builtin_plugins/null_ocr.py
  class NullOcrEngine (line 29) | class NullOcrEngine(OcrEngine):
    method version (line 37) | def version() -> str:
    method creator_tag (line 42) | def creator_tag(options: OcrOptions) -> str:
    method __str__ (line 46) | def __str__(self) -> str:
    method languages (line 51) | def languages(options: OcrOptions) -> set[str]:
    method get_orientation (line 56) | def get_orientation(input_file: Path, options: OcrOptions) -> Orientat...
    method get_deskew (line 61) | def get_deskew(input_file: Path, options: OcrOptions) -> float:
    method supports_generate_ocr (line 66) | def supports_generate_ocr() -> bool:
    method generate_ocr (line 71) | def generate_ocr(
    method generate_hocr (line 103) | def generate_hocr(
    method generate_pdf (line 136) | def generate_pdf(
  function get_ocr_engine (line 153) | def get_ocr_engine(options):

FILE: src/ocrmypdf/builtin_plugins/optimize.py
  class OptimizeOptions (line 25) | class OptimizeOptions(BaseModel):
    method add_arguments_to_parser (line 48) | def add_arguments_to_parser(cls, parser, namespace: str = 'optimize'):
    method validate_optimization_consistency (line 129) | def validate_optimization_consistency(self):
    method validate_with_context (line 138) | def validate_with_context(
  function register_options (line 158) | def register_options():
  function add_options (line 164) | def add_options(parser):
  function check_options (line 170) | def check_options(options):
  function optimize_pdf (line 207) | def optimize_pdf(
  function is_optimization_enabled (line 237) | def is_optimization_enabled(context: PdfContext) -> bool:

FILE: src/ocrmypdf/builtin_plugins/pypdfium.py
  function check_options (line 36) | def check_options(options):
  function _open_pdf_document (line 45) | def _open_pdf_document(input_file: Path):
  function _calculate_mediabox_crop (line 51) | def _calculate_mediabox_crop(page) -> tuple[float, float, float, float]:
  function _render_page_to_bitmap (line 74) | def _render_page_to_bitmap(
  function _process_image_for_output (line 127) | def _process_image_for_output(
  function _save_image (line 215) | def _save_image(pil_image: Image.Image, output_file: Path, format_name: ...
  function rasterize_pdf_page (line 230) | def rasterize_pdf_page(

FILE: src/ocrmypdf/builtin_plugins/tesseract_ocr.py
  function _thresholding_method_converter (line 29) | def _thresholding_method_converter(value: str) -> ThresholdingMethod:
  class TesseractOptions (line 57) | class TesseractOptions(BaseModel):
    method add_arguments_to_parser (line 106) | def add_arguments_to_parser(cls, parser, namespace: str = 'tesseract'):
    method validate_timeout_reasonable (line 250) | def validate_timeout_reasonable(cls, v):
    method validate_pagesegmode_warning (line 258) | def validate_pagesegmode_warning(cls, v):
    method validate_downsample_consistency (line 268) | def validate_downsample_consistency(self):
    method validate_with_context (line 277) | def validate_with_context(self, languages: list[str]) -> None:
  function register_options (line 295) | def register_options():
  function add_options (line 301) | def add_options(parser):
  function check_options (line 307) | def check_options(options):
  function validate (line 336) | def validate(pdfinfo, options):
  function filter_ocr_image (line 365) | def filter_ocr_image(page: PageContext, image: Image.Image) -> Image.Image:
  class TesseractOcrEngine (line 385) | class TesseractOcrEngine(OcrEngine):
    method version (line 389) | def version():
    method _determine_renderer (line 393) | def _determine_renderer(options):
    method creator_tag (line 400) | def creator_tag(options):
    method __str__ (line 412) | def __str__(self):
    method languages (line 416) | def languages(options):
    method get_orientation (line 420) | def get_orientation(input_file, options):
    method get_deskew (line 429) | def get_deskew(input_file, options) -> float:
    method generate_hocr (line 439) | def generate_hocr(input_file, output_hocr, output_text, options):
    method generate_pdf (line 456) | def generate_pdf(input_file, output_pdf, output_text, options):
  function get_ocr_engine (line 474) | def get_ocr_engine(options):

FILE: src/ocrmypdf/cli.py
  function numeric (line 22) | def numeric(basetype: Callable[[Any], T], min_: T | None = None, max_: T...
  function str_to_int (line 43) | def str_to_int(mapping: Mapping[str, int]):
  class LanguageSetAction (line 57) | class LanguageSetAction(argparse.Action):
    method __init__ (line 60) | def __init__(self, option_strings, dest, default=None, **kwargs):
    method __call__ (line 66) | def __call__(self, parser, namespace, values, option_string=None):
  function get_parser (line 75) | def get_parser():
  function namespace_to_options (line 494) | def namespace_to_options(ns) -> OcrOptions:
  function get_options_and_plugins (line 529) | def get_options_and_plugins(

FILE: src/ocrmypdf/exceptions.py
  class ExitCode (line 12) | class ExitCode(IntEnum):
  class ExitCodeException (line 31) | class ExitCodeException(Exception):
    method __str__ (line 37) | def __str__(self):
  class BadArgsError (line 45) | class BadArgsError(ExitCodeException):
  class MissingDependencyError (line 51) | class MissingDependencyError(ExitCodeException):
  class UnsupportedImageFormatError (line 57) | class UnsupportedImageFormatError(ExitCodeException):
  class DpiError (line 63) | class DpiError(ExitCodeException):
  class OutputFileAccessError (line 69) | class OutputFileAccessError(ExitCodeException):
  class PriorOcrFoundError (line 75) | class PriorOcrFoundError(ExitCodeException):
  class InputFileError (line 81) | class InputFileError(ExitCodeException):
  class SubprocessOutputError (line 87) | class SubprocessOutputError(ExitCodeException):
  class EncryptedPdfError (line 93) | class EncryptedPdfError(ExitCodeException):
  class TesseractConfigError (line 111) | class TesseractConfigError(ExitCodeException):
  class DigitalSignatureError (line 118) | class DigitalSignatureError(InputFileError):
  class TaggedPDFError (line 129) | class TaggedPDFError(InputFileError):
  class ColorConversionNeededError (line 142) | class ColorConversionNeededError(BadArgsError):

FILE: src/ocrmypdf/extra_plugins/semfree.py
  class MessageType (line 45) | class MessageType(Enum):
  function split_every (line 53) | def split_every(n: int, iterable: Iterable) -> Iterator:
  function process_sigbus (line 65) | def process_sigbus(*args):
  class ConnectionLogHandler (line 70) | class ConnectionLogHandler(logging.handlers.QueueHandler):
    method __init__ (line 73) | def __init__(self, conn: Connection) -> None:
    method enqueue (line 80) | def enqueue(self, record):
  function process_loop (line 85) | def process_loop(
  class LambdaExecutor (line 117) | class LambdaExecutor(Executor):
    method _execute (line 120) | def _execute(
  function get_executor (line 197) | def get_executor(progressbar_class):
  function get_logging_console (line 203) | def get_logging_console():
  function get_progressbar_class (line 209) | def get_progressbar_class():

FILE: src/ocrmypdf/font/font_manager.py
  class FontManager (line 17) | class FontManager:
    method __init__ (line 32) | def __init__(self, font_path: Path, font_index: int = 0):
    method get_hb_font (line 51) | def get_hb_font(self) -> hb.Font:
    method has_glyph (line 59) | def has_glyph(self, codepoint: int) -> bool:
    method get_font_metrics (line 71) | def get_font_metrics(self) -> tuple[float, float, float]:
    method get_left_side_bearing (line 83) | def get_left_side_bearing(self, char: str, font_size: float) -> float:

FILE: src/ocrmypdf/font/font_provider.py
  class FontProvider (line 17) | class FontProvider(Protocol):
    method get_font (line 25) | def get_font(self, font_name: str) -> FontManager | None:
    method get_available_fonts (line 36) | def get_available_fonts(self) -> list[str]:
    method get_fallback_font (line 44) | def get_fallback_font(self) -> FontManager:
  class BuiltinFontProvider (line 55) | class BuiltinFontProvider:
    method __init__ (line 67) | def __init__(self, font_dir: Path | None = None):
    method _load_fonts (line 80) | def _load_fonts(self) -> None:
    method get_font (line 110) | def get_font(self, font_name: str) -> FontManager | None:
    method get_available_fonts (line 114) | def get_available_fonts(self) -> list[str]:
    method get_fallback_font (line 118) | def get_fallback_font(self) -> FontManager:
  class ChainedFontProvider (line 123) | class ChainedFontProvider:
    method __init__ (line 131) | def __init__(self, providers: list[FontProvider]):
    method get_font (line 142) | def get_font(self, font_name: str) -> FontManager | None:
    method get_available_fonts (line 158) | def get_available_fonts(self) -> list[str]:
    method get_fallback_font (line 173) | def get_fallback_font(self) -> FontManager:

FILE: src/ocrmypdf/font/multi_font_manager.py
  class MultiFontManager (line 26) | class MultiFontManager:
    method __init__ (line 137) | def __init__(
    method fonts (line 169) | def fonts(self) -> dict[str, FontManager]:
    method _try_font (line 173) | def _try_font(
    method select_font_for_word (line 194) | def select_font_for_word(
    method _warn_missing_font (line 240) | def _warn_missing_font(self, word_text: str, line_language: str | None...
    method _has_all_glyphs (line 274) | def _has_all_glyphs(self, font: FontManager, text: str) -> bool:
    method has_font (line 297) | def has_font(self, font_name: str) -> bool:
    method has_all_glyphs (line 308) | def has_all_glyphs(self, font_name: str, text: str) -> bool:
    method get_all_fonts (line 323) | def get_all_fonts(self) -> dict[str, FontManager]:

FILE: src/ocrmypdf/font/system_font_provider.py
  class SystemFontProvider (line 22) | class SystemFontProvider:
    method __init__ (line 152) | def __init__(self) -> None:
    method _get_platform (line 161) | def _get_platform(self) -> str:
    method _get_font_dirs (line 176) | def _get_font_dirs(self) -> list[Path]:
    method _find_font_file (line 202) | def _find_font_file(self, font_name: str) -> Path | None:
    method get_font (line 235) | def get_font(self, font_name: str) -> FontManager | None:
    method get_available_fonts (line 275) | def get_available_fonts(self) -> list[str]:
    method get_fallback_font (line 287) | def get_fallback_font(self) -> FontManager:

FILE: src/ocrmypdf/fpdf_renderer/renderer.py
  function transform_point (line 27) | def transform_point(matrix: Matrix, x: float, y: float) -> tuple[float, ...
  function transform_box (line 44) | def transform_box(
  class DebugRenderOptions (line 70) | class DebugRenderOptions:
  class CoordinateTransform (line 81) | class CoordinateTransform:
    method __init__ (line 88) | def __init__(self, dpi: float, page_width_px: float, page_height_px: f...
    method page_width_pt (line 95) | def page_width_pt(self) -> float:
    method page_height_pt (line 100) | def page_height_pt(self) -> float:
    method px_to_pt (line 104) | def px_to_pt(self, value: float) -> float:
    method bbox_to_pt (line 108) | def bbox_to_pt(self, bbox) -> tuple[float, float, float, float]:
  class Fpdf2PdfRenderer (line 118) | class Fpdf2PdfRenderer:
    method __init__ (line 125) | def __init__(
    method render (line 172) | def render(self, output_path: Path) -> None:
    method render_to_pdf (line 207) | def render_to_pdf(self, pdf: FPDF) -> None:
    method _register_font (line 243) | def _register_font(self, pdf: FPDF, font_manager: FontManager) -> str:
    method _render_paragraph (line 263) | def _render_paragraph(self, pdf: FPDF, para: OcrElement) -> None:
    method _render_line (line 274) | def _render_line(self, pdf: FPDF, line: OcrElement) -> None:
    method _check_aspect_ratio_plausible (line 487) | def _check_aspect_ratio_plausible(
    method _emit_line_bt_block (line 564) | def _emit_line_bt_block(
    method _encode_shaped_text (line 720) | def _encode_shaped_text(self, pdf: FPDF, text: str) -> str:
    method _is_cjk_only (line 741) | def _is_cjk_only(self, text: str) -> bool:
    method _render_debug_line_bbox (line 779) | def _render_debug_line_bbox(
    method _render_debug_baseline (line 792) | def _render_debug_baseline(
    method _render_debug_word_bbox (line 810) | def _render_debug_word_bbox(
  class Fpdf2MultiPageRenderer (line 824) | class Fpdf2MultiPageRenderer:
    method __init__ (line 831) | def __init__(
    method render (line 851) | def render(self, output_path: Path) -> None:

FILE: src/ocrmypdf/helpers.py
  class Resolution (line 37) | class Resolution(Generic[T]):
    method __init__ (line 49) | def __init__(self, x: T, y: T):
    method round (line 58) | def round(self, ndigits: int) -> Resolution:
    method to_int (line 62) | def to_int(self) -> Resolution[int]:
    method _isclose (line 67) | def _isclose(cls, a, b):
    method is_square (line 71) | def is_square(self) -> bool:
    method is_finite (line 76) | def is_finite(self) -> bool:
    method to_scalar (line 80) | def to_scalar(self) -> float:
    method _take_minmax (line 89) | def _take_minmax(
    method take_max (line 101) | def take_max(
    method take_min (line 107) | def take_min(
    method flip_axis (line 113) | def flip_axis(self) -> Resolution[T]:
    method __getitem__ (line 117) | def __getitem__(self, idx: int | slice) -> T:
    method __str__ (line 121) | def __str__(self):
    method __repr__ (line 125) | def __repr__(self):  # pragma: no cover
    method __eq__ (line 129) | def __eq__(self, other):
  function safe_symlink (line 138) | def safe_symlink(input_file: os.PathLike, soft_link_name: os.PathLike) -...
  function samefile (line 179) | def samefile(file1: os.PathLike, file2: os.PathLike) -> bool:
  function is_iterable_notstr (line 190) | def is_iterable_notstr(thing: Any) -> bool:
  function monotonic (line 195) | def monotonic(seq: Sequence) -> bool:
  function page_number (line 200) | def page_number(input_file: os.PathLike) -> int:
  function available_cpu_count (line 205) | def available_cpu_count() -> int:
  function is_file_writable (line 217) | def is_file_writable(test_file: os.PathLike) -> bool:
  function check_pdf (line 252) | def check_pdf(input_file: Path) -> bool:
  function clamp (line 298) | def clamp(n: T, smallest: T, largest: T) -> T:
  function remove_all_log_handlers (line 303) | def remove_all_log_handlers(logger: logging.Logger) -> None:
  function pikepdf_enable_mmap (line 316) | def pikepdf_enable_mmap() -> None:
  function running_in_docker (line 332) | def running_in_docker() -> bool:
  function running_in_snap (line 337) | def running_in_snap() -> bool:

FILE: src/ocrmypdf/hocrtransform/hocr_parser.py
  class HocrParseError (line 40) | class HocrParseError(Exception):
  class HocrParser (line 44) | class HocrParser:
    method __init__ (line 124) | def __init__(self, hocr_file: str | Path):
    method parse (line 144) | def parse(self) -> OcrElement:
    method _xpath (line 160) | def _xpath(self, html_tag: str, html_class: str | None = None) -> str:
    method _parse_page (line 175) | def _parse_page(self, page_elem: Element) -> OcrElement:
    method _parse_paragraph (line 217) | def _parse_paragraph(self, par_elem: Element) -> OcrElement | None:
    method _parse_line (line 265) | def _parse_line(
    method _parse_word (line 322) | def _parse_word(self, word_elem: Element) -> OcrElement | None:
    method _get_element_text (line 357) | def _get_element_text(self, element: Element) -> str:
    method _normalize_text (line 373) | def _normalize_text(text: str) -> str:
    method _parse_bbox (line 386) | def _parse_bbox(self, title: str) -> BoundingBox | None:
    method _parse_baseline (line 409) | def _parse_baseline(self, title: str) -> Baseline | None:
    method _parse_textangle (line 430) | def _parse_textangle(self, title: str) -> float | None:
    method _parse_x_wconf (line 448) | def _parse_x_wconf(self, title: str) -> float | None:
    method _parse_ppageno (line 466) | def _parse_ppageno(self, title: str) -> int | None:
    method _parse_scan_res (line 484) | def _parse_scan_res(self, title: str) -> float | None:
    method _parse_font_info (line 503) | def _parse_font_info(self, title: str) -> FontInfo | None:

FILE: src/ocrmypdf/imageops.py
  function bytes_per_pixel (line 16) | def bytes_per_pixel(mode: str) -> int:
  function _calculate_downsample (line 29) | def _calculate_downsample(
  function calculate_downsample (line 89) | def calculate_downsample(
  function downsample_image (line 117) | def downsample_image(

FILE: src/ocrmypdf/languages.py
  class ISOCodeData (line 14) | class ISOCodeData(NamedTuple):
  function iso_639_2_from_3 (line 847) | def iso_639_2_from_3(iso3: str) -> str:

FILE: src/ocrmypdf/models/ocr_element.py
  class BoundingBox (line 18) | class BoundingBox:
    method width (line 36) | def width(self) -> float:
    method height (line 41) | def height(self) -> float:
    method __post_init__ (line 45) | def __post_init__(self):
  class Baseline (line 58) | class Baseline:
  class FontInfo (line 79) | class FontInfo:
  class OcrElement (line 104) | class OcrElement:
    method iter_by_class (line 176) | def iter_by_class(self, *ocr_classes: str) -> list[OcrElement]:
    method find_by_class (line 192) | def find_by_class(self, *ocr_classes: str) -> OcrElement | None:
    method get_text_recursive (line 209) | def get_text_recursive(self) -> str:
    method words (line 221) | def words(self) -> list[OcrElement]:
    method lines (line 226) | def lines(self) -> list[OcrElement]:
    method paragraphs (line 233) | def paragraphs(self) -> list[OcrElement]:
  class OcrClass (line 243) | class OcrClass:

FILE: src/ocrmypdf/optimize.py
  class XrefExt (line 52) | class XrefExt(NamedTuple):
  function img_name (line 59) | def img_name(root: Path, xref: Xref, ext: str) -> Path:
  function png_name (line 64) | def png_name(root: Path, xref: Xref) -> Path:
  function jpg_name (line 69) | def jpg_name(root: Path, xref: Xref) -> Path:
  function extract_image_filter (line 74) | def extract_image_filter(
  function extract_image_jbig2 (line 142) | def extract_image_jbig2(
  function _should_optimize_jpeg (line 194) | def _should_optimize_jpeg(options, filtdp):
  function extract_image_generic (line 202) | def extract_image_generic(
  function _find_image_xrefs_container (line 255) | def _find_image_xrefs_container(
  function _find_image_xrefs (line 302) | def _find_image_xrefs(pdf: Pdf):
  function extract_images (line 316) | def extract_images(
  function extract_images_generic (line 355) | def extract_images_generic(
  function extract_images_jbig2 (line 371) | def extract_images_jbig2(pdf: Pdf, root: Path, options) -> list[XrefExt]:
  function _produce_jbig2_images (line 381) | def _produce_jbig2_images(
  function convert_to_jbig2 (line 410) | def convert_to_jbig2(
  function _optimize_jpeg (line 432) | def _optimize_jpeg(
  function transcode_jpegs (line 448) | def transcode_jpegs(
  function _already_flate_encoded (line 482) | def _already_flate_encoded(image: Stream) -> bool:
  function _find_deflatable_jpeg (line 492) | def _find_deflatable_jpeg(
  function _deflate_jpeg (line 522) | def _deflate_jpeg(
  function deflate_jpegs (line 537) | def deflate_jpegs(pdf: Pdf, root: Path, options, executor: Executor) -> ...
  function _transcode_png (line 582) | def _transcode_png(pdf: Pdf, filename: Path, xref: Xref) -> bool:
  function transcode_pngs (line 623) | def transcode_pngs(
  function optimize (line 671) | def optimize(
  function main (line 732) | def main(infile, outfile, level, jobs=1):

FILE: src/ocrmypdf/pdfa.py
  function _postscript_objdef (line 22) | def _postscript_objdef(
  function _make_postscript (line 51) | def _make_postscript(icc_name: str, icc_data: bytes, colors: int) -> Ite...
  function generate_pdfa_ps (line 75) | def generate_pdfa_ps(target_filename: Path, icc: str = 'sRGB'):
  function file_claims_pdfa (line 113) | def file_claims_pdfa(filename: Path):
  function _load_srgb_icc_profile (line 140) | def _load_srgb_icc_profile() -> bytes:
  function _pdfa_part_conformance (line 145) | def _pdfa_part_conformance(output_type: str) -> tuple[str, str]:
  function add_pdfa_metadata (line 163) | def add_pdfa_metadata(pdf: Pdf, part: str, conformance: str) -> None:
  function add_srgb_output_intent (line 176) | def add_srgb_output_intent(pdf: Pdf) -> None:
  function speculative_pdfa_conversion (line 214) | def speculative_pdfa_conversion(

FILE: src/ocrmypdf/pdfinfo/_contentstream.py
  class XobjectSettings (line 21) | class XobjectSettings(NamedTuple):
  class InlineSettings (line 29) | class InlineSettings(NamedTuple):
  class ContentsInfo (line 37) | class ContentsInfo(NamedTuple):
  class TextboxInfo (line 47) | class TextboxInfo(NamedTuple):
  class VectorMarker (line 55) | class VectorMarker:
  class TextMarker (line 59) | class TextMarker:
  function _is_unit_square (line 63) | def _is_unit_square(shorthand):
  function _normalize_stack (line 70) | def _normalize_stack(graphobjs):
  function _interpret_contents (line 81) | def _interpret_contents(contentstream: Object, initial_shorthand=UNIT_SQ...
  function _get_dpi (line 173) | def _get_dpi(ctm_shorthand, image_size) -> Resolution:

FILE: src/ocrmypdf/pdfinfo/_image.py
  class ImageInfo (line 44) | class ImageInfo:
    method __init__ (line 57) | def __init__(
    method _init_icc (line 142) | def _init_icc(self, pim: PdfImage):
    method name (line 169) | def name(self):
    method type_ (line 174) | def type_(self):
    method width (line 179) | def width(self) -> int:
    method height (line 184) | def height(self) -> int:
    method bpc (line 189) | def bpc(self):
    method color (line 194) | def color(self):
    method comp (line 199) | def comp(self):
    method enc (line 204) | def enc(self):
    method renderable (line 209) | def renderable(self) -> bool:
    method dpi (line 226) | def dpi(self) -> Resolution:
    method printed_area (line 234) | def printed_area(self) -> float:
    method __repr__ (line 240) | def __repr__(self):
  function _find_inline_images (line 248) | def _find_inline_images(contentsinfo: ContentsInfo) -> Iterator[ImageInfo]:
  function _image_xobjects (line 256) | def _image_xobjects(container) -> Iterator[tuple[Object, str]]:
  function _find_regular_images (line 281) | def _find_regular_images(
  function _find_form_xobject_images (line 306) | def _find_form_xobject_images(pdf: Pdf, container: Object, contentsinfo:...
  function _process_content_streams (line 338) | def _process_content_streams(

FILE: src/ocrmypdf/pdfinfo/_types.py
  class Colorspace (line 10) | class Colorspace(Enum):
  class Encoding (line 26) | class Encoding(Enum):

FILE: src/ocrmypdf/pdfinfo/_worker.py
  function _pdf_pageinfo_sync_init (line 31) | def _pdf_pageinfo_sync_init(pdf: Pdf, infile: Path, pdfminer_loglevel):
  function _pdf_pageinfo_sync_pdf (line 49) | def _pdf_pageinfo_sync_pdf(thread_pdf: Pdf | None, infile: Path):
  function _pdf_pageinfo_sync (line 59) | def _pdf_pageinfo_sync(
  function _pdf_pageinfo_concurrent (line 77) | def _pdf_pageinfo_concurrent(

FILE: src/ocrmypdf/pdfinfo/info.py
  function _page_has_text (line 37) | def _page_has_text(text_blocks: Iterable[FloatRect], page_width, page_he...
  function simplify_textboxes (line 66) | def simplify_textboxes(
  class PageResolutionProfile (line 83) | class PageResolutionProfile(NamedTuple):
  class PageInfo (line 109) | class PageInfo:
    method __init__ (line 116) | def __init__(
    method _gather_pageinfo (line 133) | def _gather_pageinfo(
    method pageno (line 210) | def pageno(self) -> int:
    method has_text (line 215) | def has_text(self) -> bool:
    method has_corrupt_text (line 220) | def has_corrupt_text(self) -> bool:
    method has_vector (line 227) | def has_vector(self) -> bool:
    method width_inches (line 236) | def width_inches(self) -> Decimal:
    method height_inches (line 241) | def height_inches(self) -> Decimal:
    method width_pixels (line 246) | def width_pixels(self) -> int:
    method height_pixels (line 251) | def height_pixels(self) -> int:
    method rotation (line 256) | def rotation(self) -> int:
    method rotation (line 264) | def rotation(self, value):
    method cropbox (line 271) | def cropbox(self) -> FloatRect:
    method mediabox (line 276) | def mediabox(self) -> FloatRect:
    method trimbox (line 281) | def trimbox(self) -> FloatRect:
    method artbox (line 286) | def artbox(self) -> FloatRect:
    method bleedbox (line 291) | def bleedbox(self) -> FloatRect:
    method images (line 296) | def images(self) -> list[ImageInfo]:
    method get_textareas (line 300) | def get_textareas(self, visible: bool | None = None, corrupt: bool | N...
    method dpi (line 321) | def dpi(self) -> Resolution:
    method userunit (line 328) | def userunit(self) -> Decimal:
    method min_version (line 333) | def min_version(self) -> str:
    method page_dpi_profile (line 340) | def page_dpi_profile(self) -> PageResolutionProfile | None:
    method __repr__ (line 379) | def __repr__(self):
  class PdfInfo (line 391) | class PdfInfo:
    method __init__ (line 402) | def __init__(
    method pages (line 454) | def pages(self) -> list[PageInfo | None]:
    method min_version (line 459) | def min_version(self) -> str:
    method has_userunit (line 465) | def has_userunit(self) -> bool:
    method has_acroform (line 470) | def has_acroform(self) -> bool:
    method has_signature (line 475) | def has_signature(self) -> bool:
    method is_tagged (line 480) | def is_tagged(self) -> bool:
    method filename (line 485) | def filename(self) -> str | Path:
    method needs_rendering (line 492) | def needs_rendering(self) -> bool:
    method __getitem__ (line 500) | def __getitem__(self, item) -> PageInfo:
    method __len__ (line 504) | def __len__(self):
    method __repr__ (line 508) | def __repr__(self):
  function main (line 513) | def main():  # pragma: no cover

FILE: src/ocrmypdf/pdfinfo/layout.py
  function pdfsimplefont__init__ (line 40) | def pdfsimplefont__init__(
  function pdftype3font__pscript5_get_height (line 69) | def pdftype3font__pscript5_get_height(self):
  function pdftype3font__pscript5_get_descent (line 83) | def pdftype3font__pscript5_get_descent(self):
  function pdftype3font__pscript5_get_ascent (line 93) | def pdftype3font__pscript5_get_ascent(self):
  function _is_undefined_char (line 103) | def _is_undefined_char(s: str) -> bool:
  class LTStateAwareChar (line 108) | class LTStateAwareChar(LTChar):
    method __init__ (line 128) | def __init__(
    method is_compatible (line 157) | def is_compatible(self, obj: object) -> bool:
    method get_text (line 174) | def get_text(self) -> str:
    method __repr__ (line 180) | def __repr__(self) -> str:
  class TextPositionTracker (line 193) | class TextPositionTracker(PDFLayoutAnalyzer):
    method __init__ (line 198) | def __init__(
    method begin_page (line 208) | def begin_page(self, page: PDFPage, ctm: Matrix) -> None:
    method end_page (line 213) | def end_page(self, page: PDFPage) -> None:
    method render_string (line 222) | def render_string(
    method render_char (line 233) | def render_char(
    method receive_layout (line 268) | def receive_layout(self, ltpage: LTPage) -> None:
    method get_result (line 272) | def get_result(self) -> LTPage | None:
  function patch_pdfminer (line 278) | def patch_pdfminer(pscript5_mode: bool):
  function get_page_analysis (line 294) | def get_page_analysis(
  class PdfMinerState (line 324) | class PdfMinerState:
    method __init__ (line 331) | def __init__(self, infile: Path, pscript5_mode: bool) -> None:
    method __enter__ (line 346) | def __enter__(self):
    method __exit__ (line 352) | def __exit__(self, exc_type, exc_value, traceback):
    method get_page_analysis (line 358) | def get_page_analysis(self, pageno: int):
  function get_text_boxes (line 386) | def get_text_boxes(obj) -> Iterator[LTTextBox]:

FILE: src/ocrmypdf/pluginspec.py
  class GhostscriptRasterDevice (line 35) | class GhostscriptRasterDevice(StrEnum):
  function get_logging_console (line 53) | def get_logging_console() -> Handler:  # type: ignore[return-value]
  function initialize (line 65) | def initialize(plugin_manager: pluggy.PluginManager) -> None:
  function add_options (line 92) | def add_options(parser: ArgumentParser) -> None:
  function register_options (line 106) | def register_options() -> dict[str, type[BaseModel]]:
  function check_options (line 128) | def check_options(options: OcrOptions) -> None:
  function get_executor (line 151) | def get_executor(progressbar_class: type[ProgressBar]) -> Executor:  # t...
  function get_progressbar_class (line 179) | def get_progressbar_class() -> type[ProgressBar]:  # type: ignore[return...
  function validate (line 199) | def validate(pdfinfo: PdfInfo, options: OcrOptions) -> None:
  function rasterize_pdf_page (line 220) | def rasterize_pdf_page(
  function filter_ocr_image (line 275) | def filter_ocr_image(page: PageContext, image: Image.Image) -> Image.Ima...
  function filter_page_image (line 310) | def filter_page_image(page: PageContext, image_filename: Path) -> Path: ...
  function filter_pdf_page (line 347) | def filter_pdf_page(page: PageContext, image_filename: Path, output_pdf:...
  class OrientationConfidence (line 389) | class OrientationConfidence(NamedTuple):
  class OcrEngine (line 403) | class OcrEngine(ABC):
    method version (line 412) | def version() -> str:
    method creator_tag (line 417) | def creator_tag(options: OcrOptions) -> str:
    method __str__ (line 429) | def __str__(self) -> str:
    method languages (line 438) | def languages(options: OcrOptions) -> Set[str]:
    method get_orientation (line 447) | def get_orientation(input_file: Path, options: OcrOptions) -> Orientat...
    method get_deskew (line 451) | def get_deskew(input_file: Path, options: OcrOptions) -> float:
    method generate_hocr (line 457) | def generate_hocr(
    method generate_pdf (line 480) | def generate_pdf(
    method supports_generate_ocr (line 502) | def supports_generate_ocr() -> bool:
    method generate_ocr (line 515) | def generate_ocr(
  function get_ocr_engine (line 547) | def get_ocr_engine(options: OcrOptions | None) -> OcrEngine:  # type: ig...
  function generate_pdfa (line 568) | def generate_pdfa(
  function optimize_pdf (line 618) | def optimize_pdf(
  function is_optimization_enabled (line 661) | def is_optimization_enabled(context: PdfContext) -> bool:  # type: ignor...

FILE: src/ocrmypdf/quality.py
  class OcrQualityDictionary (line 12) | class OcrQualityDictionary:
    method __init__ (line 15) | def __init__(self, *, wordlist: Iterable[str]):
    method measure_words_matched (line 23) | def measure_words_matched(self, ocr_text: str) -> float:

FILE: src/ocrmypdf/subprocess/__init__.py
  function run (line 29) | def run(
  function run_polling_stderr (line 79) | def run_polling_stderr(
  function _fix_process_args (line 118) | def _fix_process_args(
  function get_version (line 140) | def get_version(
  function _get_platform (line 247) | def _get_platform() -> str:
  function _error_trailer (line 257) | def _error_trailer(program: str, package: str | Mapping[str, str], **kwa...
  function _error_missing_program (line 270) | def _error_missing_program(
  function _error_old_version (line 283) | def _error_old_version(
  function check_external_program (line 298) | def check_external_program(

FILE: src/ocrmypdf/subprocess/_windows.py
  function ghostscript_version_key (line 40) | def ghostscript_version_key(s: str) -> tuple[int, int, int]:
  function registry_enum (line 51) | def registry_enum(key: HKEYType, enum_fn: Callable[[HKEYType, int], T]) ...
  function registry_subkeys (line 64) | def registry_subkeys(key: HKEYType) -> Iterator[str]:
  function registry_values (line 68) | def registry_values(key: HKEYType) -> Iterator[tuple[str, Any, int]]:
  function registry_path_ghostscript (line 72) | def registry_path_ghostscript(env=None) -> Iterator[Path]:
  function registry_path_tesseract (line 90) | def registry_path_tesseract(env=None) -> Iterator[Path]:
  function _gs_version_in_path_key (line 102) | def _gs_version_in_path_key(path: Path) -> tuple[str, Version | None]:
  function program_files_paths (line 126) | def program_files_paths(env=None) -> Iterator[Path]:
  function paths_from_env (line 149) | def paths_from_env(env=None) -> Iterator[Path]:
  function shim_path (line 153) | def shim_path(new_paths: Callable[[Any], Iterator[Path]], env=None) -> str:
  function fix_windows_args (line 167) | def fix_windows_args(program: str, args, env):
  function unique_everseen (line 185) | def unique_everseen(iterable: Iterable[T], key: Callable[[T], Tkey]) -> ...
  function _casefold_path (line 198) | def _casefold_path(path: Path) -> str:
  function shim_env_path (line 202) | def shim_env_path(env=None):

FILE: tests/conftest.py
  class Gs106WarningFilter (line 21) | class Gs106WarningFilter(logging.Filter):
    method filter (line 24) | def filter(self, record: logging.LogRecord) -> bool:
  function suppress_gs106_warning (line 33) | def suppress_gs106_warning():
  function is_linux (line 43) | def is_linux():
  function is_macos (line 47) | def is_macos():
  function have_unpaper (line 51) | def have_unpaper():
  function resources (line 64) | def resources() -> Path:
  function ocrmypdf_exec (line 69) | def ocrmypdf_exec() -> list[str]:
  function outdir (line 74) | def outdir(tmp_path) -> Path:
  function outpdf (line 79) | def outpdf(tmp_path) -> Path:
  function outtxt (line 84) | def outtxt(tmp_path) -> Path:
  function no_outpdf (line 89) | def no_outpdf(tmp_path) -> Path:
  function multipage (line 101) | def multipage(resources):
  function check_ocrmypdf (line 105) | def check_ocrmypdf(input_file: Path, output_file: Path, *args) -> Path:
  function run_ocrmypdf_api (line 122) | def run_ocrmypdf_api(input_file: Path, output_file: Path, *args) -> Exit...
  function run_ocrmypdf (line 141) | def run_ocrmypdf(
  function first_page_dimensions (line 165) | def first_page_dimensions(pdf: Path):
  function pytest_addoption (line 171) | def pytest_addoption(parser):
  function pytest_collection_modifyitems (line 183) | def pytest_collection_modifyitems(config, items):
  function get_test_plugin_manager (line 193) | def get_test_plugin_manager(plugins=None):

FILE: tests/plugins/gs_feature_elision.py
  function run_append_stderr (line 16) | def run_append_stderr(*args, **kwargs):
  function generate_pdfa (line 23) | def generate_pdfa(pdf_pages, pdfmark, output_file, context, pdf_version,...

FILE: tests/plugins/gs_pdfa_failure.py
  function run_rig_args (line 13) | def run_rig_args(args, **kwargs):
  function generate_pdfa (line 25) | def generate_pdfa(pdf_pages, pdfmark, output_file, context, pdf_version,...

FILE: tests/plugins/gs_raster_failure.py
  function raise_gs_fail (line 14) | def raise_gs_fail(*args, **kwargs):
  function rasterize_pdf_page (line 21) | def rasterize_pdf_page(

FILE: tests/plugins/gs_raster_soft_error.py
  function fail_if_stoponerror (line 15) | def fail_if_stoponerror(args, **kwargs):
  function rasterize_pdf_page (line 22) | def rasterize_pdf_page(

FILE: tests/plugins/gs_render_failure.py
  function raise_gs_fail (line 13) | def raise_gs_fail(*args, **kwargs):
  function generate_pdfa (line 20) | def generate_pdfa(pdf_pages, pdfmark, output_file, context, pdf_version,...

FILE: tests/plugins/gs_render_soft_error.py
  function fail_if_stoponerror (line 14) | def fail_if_stoponerror(args, **kwargs):
  function generate_pdfa (line 21) | def generate_pdfa(

FILE: tests/plugins/tesseract_badutf8.py
  function bad_utf8 (line 21) | def bad_utf8(*args, **kwargs):
  function patch_tesseract_run (line 31) | def patch_tesseract_run():
  class BadUtf8OcrEngine (line 38) | class BadUtf8OcrEngine(TesseractOcrEngine):
    method generate_hocr (line 40) | def generate_hocr(input_file, output_hocr, output_text, options):
    method generate_pdf (line 47) | def generate_pdf(input_file, output_pdf, output_text, options):
  function get_ocr_engine (line 55) | def get_ocr_engine():

FILE: tests/plugins/tesseract_big_image_error.py
  function raise_size_exception (line 13) | def raise_size_exception(*args, **kwargs):
  function patch_tesseract_run (line 23) | def patch_tesseract_run():
  class BigImageErrorOcrEngine (line 30) | class BigImageErrorOcrEngine(TesseractOcrEngine):
    method get_orientation (line 32) | def get_orientation(input_file, options):
    method generate_hocr (line 37) | def generate_hocr(input_file, output_hocr, output_text, options):
    method generate_pdf (line 44) | def generate_pdf(input_file, output_pdf, output_text, options):
  function get_ocr_engine (line 52) | def get_ocr_engine():

FILE: tests/plugins/tesseract_cache.py
  function get_cache_folder (line 66) | def get_cache_folder(source_pdf, run_args, parsed_args):
  function cached_run (line 85) | def cached_run(options, run_args, **run_kwargs):
  class CacheOcrEngine (line 178) | class CacheOcrEngine(TesseractOcrEngine):
    method get_orientation (line 186) | def get_orientation(input_file, options):
    method get_deskew (line 194) | def get_deskew(input_file, options) -> float:
    method generate_hocr (line 202) | def generate_hocr(input_file, output_hocr, output_text, options):
    method generate_pdf (line 212) | def generate_pdf(input_file, output_pdf, output_text, options):
  function get_ocr_engine (line 223) | def get_ocr_engine():

FILE: tests/plugins/tesseract_crash.py
  function raise_crash (line 14) | def raise_crash(*args, **kwargs):
  function patch_tesseract_run (line 25) | def patch_tesseract_run():
  class CrashOcrEngine (line 32) | class CrashOcrEngine(TesseractOcrEngine):
    method get_orientation (line 34) | def get_orientation(input_file, options):
    method generate_hocr (line 39) | def generate_hocr(input_file, output_hocr, output_text, options):
    method generate_pdf (line 46) | def generate_pdf(input_file, output_pdf, output_text, options):
  function get_ocr_engine (line 54) | def get_ocr_engine():

FILE: tests/plugins/tesseract_debug_rotate.py
  class FixedRotateNoopOcrEngine (line 48) | class FixedRotateNoopOcrEngine(OcrEngine):
    method version (line 50) | def version():
    method creator_tag (line 54) | def creator_tag(options):
    method __str__ (line 58) | def __str__(self):
    method languages (line 62) | def languages(options):
    method get_orientation (line 66) | def get_orientation(input_file, options):
    method generate_hocr (line 74) | def generate_hocr(input_file, output_hocr, output_text, options):
    method generate_pdf (line 85) | def generate_pdf(input_file, output_pdf, output_text, options):
  function get_ocr_engine (line 97) | def get_ocr_engine():

FILE: tests/plugins/tesseract_noop.py
  class NoopOcrEngine (line 46) | class NoopOcrEngine(OcrEngine):
    method version (line 48) | def version():
    method creator_tag (line 52) | def creator_tag(options):
    method __str__ (line 56) | def __str__(self):
    method languages (line 60) | def languages(options):
    method get_orientation (line 64) | def get_orientation(input_file, options):
    method get_deskew (line 68) | def get_deskew(input_file, options):
    method generate_hocr (line 72) | def generate_hocr(input_file, output_hocr, output_text, options):
    method generate_pdf (line 83) | def generate_pdf(input_file, output_pdf, output_text, options):
  function get_ocr_engine (line 95) | def get_ocr_engine():

FILE: tests/plugins/tesseract_simulate_oom_killer.py
  class Page4Engine (line 34) | class Page4Engine(NoopOcrEngine):  # type: ignore
    method __str__ (line 35) | def __str__(self):
    method generate_hocr (line 39) | def generate_hocr(input_file: Path, output_hocr, output_text, options):
    method generate_pdf (line 49) | def generate_pdf(input_file, output_pdf, output_text, options):
  function check_options (line 60) | def check_options(options):
  function get_ocr_engine (line 66) | def get_ocr_engine():

FILE: tests/test_acroform.py
  function acroform (line 19) | def acroform(resources):
  function test_acroform_and_redo (line 23) | def test_acroform_and_redo(acroform, no_outpdf):
  function test_acroform_message (line 31) | def test_acroform_message(acroform, caplog, outpdf):
  function digitally_signed (line 39) | def digitally_signed(acroform, outdir):
  function test_digital_signature (line 47) | def test_digital_signature(digitally_signed, no_outpdf):
  function test_digital_signature_invalidate (line 52) | def test_digital_signature_invalidate(digitally_signed, no_outpdf):

FILE: tests/test_annots.py
  function test_remove_broken_goto_annotations (line 11) | def test_remove_broken_goto_annotations(resources):

FILE: tests/test_api.py
  function test_language_list (line 18) | def test_language_list():
  function test_language_parameter_mapped_to_languages (line 25) | def test_language_parameter_mapped_to_languages():
  function test_stream_api (line 83) | def test_stream_api(resources: Path):
  function test_sidecar_stringio (line 92) | def test_sidecar_stringio(resources: Path, outdir: Path, outpdf: Path):
  function test_hocr_api_multipage (line 104) | def test_hocr_api_multipage(resources: Path, outdir: Path, outpdf: Path):
  function test_hocr_to_pdf_api (line 120) | def test_hocr_to_pdf_api(resources: Path, outdir: Path, outpdf: Path):
  function test_hocr_result_json (line 139) | def test_hocr_result_json():
  function test_hocr_result_pickle (line 155) | def test_hocr_result_pickle():
  function test_nested_plugin_option_access (line 166) | def test_nested_plugin_option_access():
  function test_default_tesseract_timeout (line 203) | def test_default_tesseract_timeout():

FILE: tests/test_check_pdf.py
  function test_pdf_error (line 9) | def test_pdf_error(resources):

FILE: tests/test_completion.py
  function test_fish (line 19) | def test_fish():
  function test_bash (line 35) | def test_bash():

FILE: tests/test_concurrency.py
  function test_simulate_oom_killer (line 20) | def test_simulate_oom_killer(multipage, no_outpdf):

FILE: tests/test_fpdf_renderer.py
  function font_dir (line 23) | def font_dir():
  function multi_font_manager (line 29) | def multi_font_manager(font_dir):
  function resources (line 35) | def resources():
  class TestFpdf2RendererImports (line 40) | class TestFpdf2RendererImports:
    method test_imports (line 43) | def test_imports(self):
  class TestDebugRenderOptions (line 56) | class TestDebugRenderOptions:
    method test_defaults (line 59) | def test_defaults(self):
    method test_custom_values (line 66) | def test_custom_values(self):
  class TestFpdf2PdfRenderer (line 78) | class TestFpdf2PdfRenderer:
    method test_requires_page_element (line 81) | def test_requires_page_element(self, multi_font_manager):
    method test_requires_bbox (line 99) | def test_requires_bbox(self, multi_font_manager):
    method test_render_simple_page (line 112) | def test_render_simple_page(self, multi_font_manager, tmp_path):
    method test_render_invisible_text (line 146) | def test_render_invisible_text(self, multi_font_manager, tmp_path):
  class TestFpdf2MultiPageRenderer (line 180) | class TestFpdf2MultiPageRenderer:
    method test_requires_pages (line 183) | def test_requires_pages(self, multi_font_manager):
    method test_render_multiple_pages (line 192) | def test_render_multiple_pages(self, multi_font_manager, tmp_path):
  class TestFpdf2RendererWithHocr (line 228) | class TestFpdf2RendererWithHocr:
    method test_render_latin_hocr (line 231) | def test_render_latin_hocr(self, resources, multi_font_manager, tmp_pa...
    method test_render_cjk_hocr (line 257) | def test_render_cjk_hocr(self, resources, multi_font_manager, tmp_path):
    method test_render_arabic_hocr (line 279) | def test_render_arabic_hocr(self, resources, multi_font_manager, tmp_p...
    method test_render_hello_world_scripts_hocr (line 301) | def test_render_hello_world_scripts_hocr(
    method test_render_hello_world_scripts_multipage (line 345) | def test_render_hello_world_scripts_multipage(
  class TestWordSegmentation (line 376) | class TestWordSegmentation:
    method test_word_segmentation_with_pdfminer (line 379) | def test_word_segmentation_with_pdfminer(self, multi_font_manager, tmp...
    method test_cjk_no_spurious_spaces (line 446) | def test_cjk_no_spurious_spaces(self, multi_font_manager, tmp_path):
    method test_latin_hocr_word_segmentation (line 504) | def test_latin_hocr_word_segmentation(

FILE: tests/test_ghostscript.py
  function francais (line 31) | def francais(resources):
  function test_rasterize_size (line 36) | def test_rasterize_size(francais, outdir):
  function test_rasterize_rotated (line 59) | def test_rasterize_rotated(francais, outdir, caplog):
  function test_rasterize_low_dpi (line 84) | def test_rasterize_low_dpi(francais, outdir):
  function test_rasterize_low_dpi_one_axis (line 114) | def test_rasterize_low_dpi_one_axis(francais, outdir):
  function test_gs_render_failure (line 140) | def test_gs_render_failure(resources, outpdf, caplog):
  function test_gs_raster_failure (line 155) | def test_gs_raster_failure(resources, outpdf, caplog):
  function test_ghostscript_pdfa_failure (line 168) | def test_ghostscript_pdfa_failure(resources, outpdf, caplog):
  function test_ghostscript_feature_elision (line 184) | def test_ghostscript_feature_elision(resources, outpdf):
  function test_ghostscript_mandatory_color_conversion (line 195) | def test_ghostscript_mandatory_color_conversion(resources, outpdf):
  function test_rasterize_pdf_errors (line 207) | def test_rasterize_pdf_errors(resources, no_outpdf, caplog):
  class TestDuplicateFilter (line 224) | class TestDuplicateFilter:
    method duplicate_filter_logger (line 226) | def duplicate_filter_logger(self):
    method test_filter_duplicate_messages (line 237) | def test_filter_duplicate_messages(self, duplicate_filter_logger, capl...
    method test_filter_does_not_affect_unique_messages (line 253) | def test_filter_does_not_affect_unique_messages(
    method test_filter_alt_messages (line 270) | def test_filter_alt_messages(self, duplicate_filter_logger, caplog):
  function pdf_with_invalid_image (line 289) | def pdf_with_invalid_image(outdir):
  function test_recoverable_image_error (line 321) | def test_recoverable_image_error(pdf_with_invalid_image, outdir, caplog):
  function test_recoverable_image_error_with_stop (line 338) | def test_recoverable_image_error_with_stop(pdf_with_invalid_image, outdi...
  class TestGs106JpegCorruptionRepair (line 356) | class TestGs106JpegCorruptionRepair:
    method create_damaged_pdf (line 360) | def create_damaged_pdf(self, resources, outdir):
    method test_repair_truncated_jpeg (line 394) | def test_repair_truncated_jpeg(self, create_damaged_pdf, caplog):
    method test_no_repair_when_not_truncated (line 448) | def test_no_repair_when_not_truncated(self, resources, outdir, caplog):
    method test_no_repair_when_truncation_too_large (line 463) | def test_no_repair_when_truncation_too_large(self, create_damaged_pdf,...

FILE: tests/test_graft.py
  function test_no_glyphless_graft (line 13) | def test_no_glyphless_graft(resources, outdir):
  function test_links (line 34) | def test_links(resources, outpdf):
  function test_redo_ocr_with_offset_mediabox (line 45) | def test_redo_ocr_with_offset_mediabox(resources, outdir):
  function test_strip_invisble_text (line 93) | def test_strip_invisble_text():

FILE: tests/test_helpers.py
  class TestSafeSymlink (line 22) | class TestSafeSymlink:
    method test_safe_symlink_link_self (line 23) | def test_safe_symlink_link_self(self, tmp_path, caplog):
    method test_safe_symlink_overwrite (line 27) | def test_safe_symlink_overwrite(self, tmp_path):
    method test_safe_symlink_relink (line 33) | def test_safe_symlink_relink(self, tmp_path):
  function test_no_cpu_count (line 43) | def test_no_cpu_count(monkeypatch):
  class TestFileIsWritable (line 60) | class TestFileIsWritable:
    method non_existent (line 62) | def non_existent(self, tmp_path):
    method basic_file (line 66) | def basic_file(self, tmp_path):
    method test_plain (line 71) | def test_plain(self, non_existent):
    method test_symlink_loop (line 75) | def test_symlink_loop(self, tmp_path):
    method test_chmod (line 81) | def test_chmod(self, basic_file):
    method test_permission_error (line 88) | def test_permission_error(self, basic_file):
  function test_gs_install_locations (line 97) | def test_gs_install_locations():
  function test_shim_paths (line 108) | def test_shim_paths(tmp_path):
  function test_resolution (line 128) | def test_resolution():

FILE: tests/test_hocr_parser.py
  function simple_hocr (line 21) | def simple_hocr(tmp_path) -> Path:
  function multiline_hocr (line 49) | def multiline_hocr(tmp_path) -> Path:
  function rtl_hocr (line 82) | def rtl_hocr(tmp_path) -> Path:
  function rotated_hocr (line 104) | def rotated_hocr(tmp_path) -> Path:
  function header_hocr (line 126) | def header_hocr(tmp_path) -> Path:
  function font_info_hocr (line 157) | def font_info_hocr(tmp_path) -> Path:
  class TestHocrParserBasic (line 178) | class TestHocrParserBasic:
    method test_parse_simple_hocr (line 181) | def test_parse_simple_hocr(self, simple_hocr):
    method test_parse_page_number (line 190) | def test_parse_page_number(self, simple_hocr):
    method test_parse_paragraphs (line 196) | def test_parse_paragraphs(self, simple_hocr):
    method test_parse_lines (line 206) | def test_parse_lines(self, simple_hocr):
    method test_parse_words (line 219) | def test_parse_words(self, simple_hocr):
    method test_parse_word_confidence (line 228) | def test_parse_word_confidence(self, simple_hocr):
    method test_parse_word_bbox (line 236) | def test_parse_word_bbox(self, simple_hocr):
  class TestHocrParserMultiline (line 248) | class TestHocrParserMultiline:
    method test_multiple_lines (line 251) | def test_multiple_lines(self, multiline_hocr):
    method test_multiple_paragraphs_languages (line 258) | def test_multiple_paragraphs_languages(self, multiline_hocr):
    method test_word_count (line 266) | def test_word_count(self, multiline_hocr):
  class TestHocrParserRTL (line 273) | class TestHocrParserRTL:
    method test_rtl_direction (line 276) | def test_rtl_direction(self, rtl_hocr):
    method test_rtl_line_inherits_direction (line 284) | def test_rtl_line_inherits_direction(self, rtl_hocr):
  class TestHocrParserRotation (line 292) | class TestHocrParserRotation:
    method test_textangle (line 295) | def test_textangle(self, rotated_hocr):
  class TestHocrParserLineTypes (line 303) | class TestHocrParserLineTypes:
    method test_header_line (line 306) | def test_header_line(self, header_hocr):
    method test_all_line_types_have_words (line 319) | def test_all_line_types_have_words(self, header_hocr):
  class TestHocrParserFontInfo (line 327) | class TestHocrParserFontInfo:
    method test_font_name_and_size (line 330) | def test_font_name_and_size(self, font_info_hocr):
  class TestHocrParserErrors (line 340) | class TestHocrParserErrors:
    method test_missing_file (line 343) | def test_missing_file(self, tmp_path):
    method test_invalid_xml (line 347) | def test_invalid_xml(self, tmp_path):
    method test_missing_ocr_page (line 354) | def test_missing_ocr_page(self, tmp_path):
    method test_missing_page_bbox (line 364) | def test_missing_page_bbox(self, tmp_path):
  class TestHocrParserEdgeCases (line 376) | class TestHocrParserEdgeCases:
    method test_empty_word_text (line 379) | def test_empty_word_text(self, tmp_path):
    method test_whitespace_only_word (line 406) | def test_whitespace_only_word(self, tmp_path):
    method test_line_without_bbox (line 432) | def test_line_without_bbox(self, tmp_path):
    method test_unicode_normalization (line 461) | def test_unicode_normalization(self, tmp_path):
    method test_words_directly_under_page (line 487) | def test_words_directly_under_page(self, tmp_path):
    method test_no_namespace (line 511) | def test_no_namespace(self, tmp_path):

FILE: tests/test_hocrtransform.py
  function text_from_pdf (line 28) | def text_from_pdf(filename):
  function font_dir (line 45) | def font_dir():
  function multi_font_manager (line 51) | def multi_font_manager(font_dir):
  function blank_hocr (line 57) | def blank_hocr(tmp_path):
  function test_mono_image (line 76) | def test_mono_image(blank_hocr, outdir, multi_font_manager):
  function test_fpdf2_matches_sandwich (line 102) | def test_fpdf2_matches_sandwich(resources, outdir):

FILE: tests/test_image_input.py
  function baiona (line 21) | def baiona(resources):
  function test_image_to_pdf (line 25) | def test_image_to_pdf(resources, outpdf):
  function test_no_dpi_info (line 36) | def test_no_dpi_info(caplog, baiona, outdir, no_outpdf):
  function test_dpi_not_credible (line 47) | def test_dpi_not_credible(caplog, baiona, outdir, no_outpdf):
  function test_cmyk_no_icc (line 58) | def test_cmyk_no_icc(caplog, resources, no_outpdf):
  function test_img2pdf_fails (line 64) | def test_img2pdf_fails(resources, no_outpdf):
  function test_jpeg_in_jpeg_out (line 76) | def test_jpeg_in_jpeg_out(resources, outpdf):

FILE: tests/test_imageops.py
  function test_bytes_per_pixel (line 18) | def test_bytes_per_pixel():
  function test_calculate_downsample (line 25) | def test_calculate_downsample():
  function test_calculate_downsample_hypothesis (line 41) | def test_calculate_downsample_hypothesis(mode, im_w, im_h, max_x, max_y,...
  function test_downsample_image (line 53) | def test_downsample_image():

FILE: tests/test_json_serialization.py
  function register_plugin_models (line 15) | def register_plugin_models():
  function worker_function (line 22) | def worker_function(options_json: str) -> str:
  function test_json_serialization_multiprocessing (line 54) | def test_json_serialization_multiprocessing():
  function test_json_serialization_with_streams (line 111) | def test_json_serialization_with_streams():
  function test_json_serialization_with_none_values (line 136) | def test_json_serialization_with_none_values():

FILE: tests/test_logging.py
  function test_debug_logging (line 11) | def test_debug_logging(tmp_path):

FILE: tests/test_main.py
  function test_quick (line 41) | def test_quick(resources, outpdf):
  function test_oversample (line 48) | def test_oversample(renderer, resources, outpdf):
  function test_repeat_ocr (line 67) | def test_repeat_ocr(resources, no_outpdf):
  function test_force_ocr (line 72) | def test_force_ocr(resources, outpdf):
  function test_skip_ocr (line 84) | def test_skip_ocr(resources, outpdf):
  function test_redo_ocr (line 96) | def test_redo_ocr(resources, outpdf):
  function test_argsfile (line 108) | def test_argsfile(resources, outdir):
  function test_ocr_timeout (line 128) | def test_ocr_timeout(renderer, resources, outpdf):
  function test_skip_big (line 141) | def test_skip_big(resources, outpdf):
  function test_maximum_options (line 156) | def test_maximum_options(renderer, output_type, multipage, outpdf):
  function test_tesseract_missing_tessdata (line 185) | def test_tesseract_missing_tessdata(monkeypatch, resources, no_outpdf, t...
  function test_invalid_input_pdf (line 191) | def test_invalid_input_pdf(resources, no_outpdf):
  function test_blank_input_pdf (line 196) | def test_blank_input_pdf(resources, outpdf):
  function test_force_ocr_on_pdf_with_no_images (line 201) | def test_force_ocr_on_pdf_with_no_images(resources, no_outpdf):
  function test_german (line 220) | def test_german(resources, outdir):
  function test_klingon (line 242) | def test_klingon(resources, outpdf):
  function test_missing_docinfo (line 247) | def test_missing_docinfo(resources, outpdf):
  function test_uppercase_extension (line 260) | def test_uppercase_extension(resources, outdir):
  function test_input_file_not_found (line 271) | def test_input_file_not_found(caplog, no_outpdf):
  function test_input_file_not_readable (line 279) | def test_input_file_not_readable(caplog, resources, outdir, no_outpdf):
  function test_input_file_not_a_pdf (line 288) | def test_input_file_not_a_pdf(caplog, no_outpdf):
  function test_pagesegmode (line 297) | def test_pagesegmode(renderer, resources, outpdf):
  function test_tesseract_oem (line 312) | def test_tesseract_oem(resources, outpdf):
  function test_tesseract_thresholding (line 324) | def test_tesseract_thresholding(value, resources, outpdf):
  function test_tesseract_thresholding_invalid (line 336) | def test_tesseract_thresholding_invalid(value, resources, no_outpdf):
  function test_tesseract_crash (line 349) | def test_tesseract_crash(renderer, resources, no_outpdf, caplog):
  function test_tesseract_crash_autorotate (line 365) | def test_tesseract_crash_autorotate(resources, no_outpdf, caplog):
  function test_tesseract_image_too_big (line 380) | def test_tesseract_image_too_big(renderer, resources, outpdf):
  function test_encrypted (line 395) | def test_encrypted(resources, outpdf, encryption_level, caplog):
  function test_jbig2_passthrough (line 431) | def test_jbig2_passthrough(resources, outpdf):
  function test_masks (line 446) | def test_masks(resources, outpdf):
  function test_linearized_pdf_and_indirect_object (line 455) | def test_linearized_pdf_and_indirect_object(resources, outpdf):
  function test_very_high_dpi (line 461) | def test_very_high_dpi(resources, outpdf):
  function test_overlay (line 476) | def test_overlay(resources, outpdf):
  function protected_file (line 487) | def protected_file(outdir):
  function test_destination_not_writable (line 497) | def test_destination_not_writable(resources, protected_file):
  function valid_tess_config (line 508) | def valid_tess_config(outdir):
  function test_tesseract_config_valid (line 521) | def test_tesseract_config_valid(resources, valid_tess_config, outpdf):
  function invalid_tess_config (line 533) | def invalid_tess_config(outdir):
  function test_tesseract_config_invalid (line 546) | def test_tesseract_config_invalid(renderer, resources, invalid_tess_conf...
  function test_user_words_ocr (line 562) | def test_user_words_ocr(resources, outdir):
  function test_form_xobject (line 582) | def test_form_xobject(resources, outpdf):
  function test_pagesize_consistency (line 593) | def test_pagesize_consistency(renderer, resources, outpdf):
  function test_skip_big_with_no_images (line 618) | def test_skip_big_with_no_images(resources, outpdf):
  function test_no_contents (line 630) | def test_no_contents(resources, outpdf):
  function test_compression_preserved (line 643) | def test_compression_preserved(ocrmypdf_exec, resources, image, outpdf):
  function test_compression_changed (line 700) | def test_compression_changed(ocrmypdf_exec, resources, image, compressio...
  function test_sidecar_pagecount (line 751) | def test_sidecar_pagecount(resources, outpdf):
  function test_sidecar_nonempty (line 776) | def test_sidecar_nonempty(resources, outpdf):
  function test_pdfa_n (line 793) | def test_pdfa_n(pdfa_level, resources, outpdf):
  function test_decompression_bomb_error (line 807) | def test_decompression_bomb_error(resources, outpdf, caplog):
  function test_decompression_bomb_succeeds (line 814) | def test_decompression_bomb_succeeds(resources, outpdf):
  function test_text_curves (line 821) | def test_text_curves(resources, outpdf):
  function test_text_curves_force (line 834) | def test_text_curves_force(resources, outpdf):
  function test_output_is_dir (line 848) | def test_output_is_dir(resources, outdir, caplog):
  function test_output_is_symlink (line 861) | def test_output_is_symlink(resources, outdir):
  function test_livecycle (line 875) | def test_livecycle(resources, no_outpdf, caplog):
  function test_version_check (line 881) | def test_version_check():
  function test_fast_web_view (line 905) | def test_fast_web_view(resources, outpdf, threshold, optimize, output_ty...
  function test_image_dpi_not_image (line 922) | def test_image_dpi_not_image(caplog, resources, outpdf):
  function test_outputtype_none_bad_setup (line 934) | def test_outputtype_none_bad_setup(resources, outpdf):
  function test_outputtype_none (line 946) | def test_outputtype_none(resources, outtxt):
  function graph_bad_icc (line 961) | def graph_bad_icc(resources, outdir):
  function test_corrupt_icc (line 974) | def test_corrupt_icc(graph_bad_icc, outpdf, caplog):

FILE: tests/test_metadata.py
  function test_preserve_docinfo (line 27) | def test_preserve_docinfo(output_type, resources, outpdf):
  function test_override_metadata (line 47) | def test_override_metadata(output_type, resources, outpdf, caplog):
  function test_unset_metadata (line 82) | def test_unset_metadata(output_type, field, resources, outpdf, caplog):
  function test_high_unicode (line 125) | def test_high_unicode(resources, no_outpdf):
  function test_bookmarks_preserved (line 147) | def test_bookmarks_preserved(output_type, ocr_option, resources, outpdf):
  function seconds_between_dates (line 168) | def seconds_between_dates(date1, date2):
  function test_creation_date_preserved (line 174) | def test_creation_date_preserved(output_type, resources, infile, outpdf):
  function libxmp_file_to_dict (line 204) | def libxmp_file_to_dict():
  function test_xml_metadata_preserved (line 230) | def test_xml_metadata_preserved(
  function test_kodak_toc (line 307) | def test_kodak_toc(resources, outpdf):
  function test_metadata_fixup_warning (line 322) | def test_metadata_fixup_warning(resources, outdir, caplog):
  function test_prevent_gs_invalid_xml (line 356) | def test_prevent_gs_invalid_xml(resources, outdir):

FILE: tests/test_multi_font_manager.py
  function font_dir (line 17) | def font_dir():
  function multi_font_manager (line 23) | def multi_font_manager(font_dir):
  function has_cjk_font (line 28) | def has_cjk_font(manager: MultiFontManager) -> bool:
  function has_arabic_font (line 33) | def has_arabic_font(manager: MultiFontManager) -> bool:
  function has_devanagari_font (line 38) | def has_devanagari_font(manager: MultiFontManager) -> bool:
  function test_init_loads_builtin_fonts (line 53) | def test_init_loads_builtin_fonts(multi_font_manager):
  function test_missing_font_directory (line 65) | def test_missing_font_directory():
  function test_select_font_for_arabic_language (line 75) | def test_select_font_for_arabic_language(multi_font_manager):
  function test_select_font_for_persian_language (line 83) | def test_select_font_for_persian_language(multi_font_manager):
  function test_select_font_for_urdu_language (line 91) | def test_select_font_for_urdu_language(multi_font_manager):
  function test_farsi_language_code (line 99) | def test_farsi_language_code(multi_font_manager):
  function test_select_font_for_hindi_language (line 111) | def test_select_font_for_hindi_language(multi_font_manager):
  function test_select_font_for_sanskrit_language (line 119) | def test_select_font_for_sanskrit_language(multi_font_manager):
  function test_select_font_for_marathi_language (line 127) | def test_select_font_for_marathi_language(multi_font_manager):
  function test_select_font_for_nepali_language (line 135) | def test_select_font_for_nepali_language(multi_font_manager):
  function test_select_font_for_chinese_language (line 147) | def test_select_font_for_chinese_language(multi_font_manager):
  function test_select_font_for_chinese_generic (line 155) | def test_select_font_for_chinese_generic(multi_font_manager):
  function test_select_font_for_chinese_simplified (line 163) | def test_select_font_for_chinese_simplified(multi_font_manager):
  function test_select_font_for_chinese_traditional (line 171) | def test_select_font_for_chinese_traditional(multi_font_manager):
  function test_select_font_for_japanese_language (line 179) | def test_select_font_for_japanese_language(multi_font_manager):
  function test_select_font_for_korean_language (line 187) | def test_select_font_for_korean_language(multi_font_manager):
  function test_select_font_for_english_text (line 198) | def test_select_font_for_english_text(multi_font_manager):
  function test_select_font_without_language_hint (line 204) | def test_select_font_without_language_hint(multi_font_manager):
  function test_select_font_arabic_text_without_language_hint (line 213) | def test_select_font_arabic_text_without_language_hint(multi_font_manager):
  function test_devanagari_text_without_language_hint (line 222) | def test_devanagari_text_without_language_hint(multi_font_manager):
  function test_cjk_text_without_language_hint (line 230) | def test_cjk_text_without_language_hint(multi_font_manager):
  function test_fallback_to_occulta_font (line 238) | def test_fallback_to_occulta_font(multi_font_manager):
  function test_fallback_fonts_constant (line 246) | def test_fallback_fonts_constant(multi_font_manager):
  function test_has_all_glyphs_for_english (line 261) | def test_has_all_glyphs_for_english(multi_font_manager):
  function test_has_all_glyphs_for_arabic (line 267) | def test_has_all_glyphs_for_arabic(multi_font_manager):
  function test_has_all_glyphs_for_devanagari (line 274) | def test_has_all_glyphs_for_devanagari(multi_font_manager):
  function test_has_all_glyphs_for_cjk (line 281) | def test_has_all_glyphs_for_cjk(multi_font_manager):
  function test_empty_text_has_all_glyphs (line 288) | def test_empty_text_has_all_glyphs(multi_font_manager):
  function test_has_all_glyphs_missing_font (line 293) | def test_has_all_glyphs_missing_font(multi_font_manager):
  function test_font_selection_caching (line 301) | def test_font_selection_caching(multi_font_manager):
  function test_language_font_map_coverage (line 315) | def test_language_font_map_coverage():
  function test_get_all_fonts (line 328) | def test_get_all_fonts(multi_font_manager):
  class MockFontProvider (line 342) | class MockFontProvider:
    method __init__ (line 345) | def __init__(
    method get_font (line 352) | def get_font(self, font_name: str) -> FontManager | None:
    method get_available_fonts (line 355) | def get_available_fonts(self) -> list[str]:
    method get_fallback_font (line 358) | def get_fallback_font(self) -> FontManager:
  function test_custom_font_provider (line 362) | def test_custom_font_provider(font_dir):
  function test_missing_font_uses_fallback (line 378) | def test_missing_font_uses_fallback(font_dir):
  function test_builtin_font_provider_loads_expected_fonts (line 393) | def test_builtin_font_provider_loads_expected_fonts(font_dir):
  function test_builtin_font_provider_get_font (line 406) | def test_builtin_font_provider_get_font(font_dir):
  function test_builtin_font_provider_get_fallback (line 418) | def test_builtin_font_provider_get_fallback(font_dir):
  function test_builtin_font_provider_missing_font_logs_warning (line 427) | def test_builtin_font_provider_missing_font_logs_warning(tmp_path, font_...
  function test_builtin_font_provider_missing_occulta_raises (line 443) | def test_builtin_font_provider_missing_occulta_raises(tmp_path):

FILE: tests/test_multilingual_direct.py
  function pdftotext (line 29) | def pdftotext():
  function font_dir (line 49) | def font_dir():
  function multi_font_manager (line 55) | def multi_font_manager(font_dir):
  function multi_font_manager_arabic (line 61) | def multi_font_manager_arabic(font_dir):
  class TestLatinScript (line 74) | class TestLatinScript:
    method latin_hocr (line 78) | def latin_hocr(self):
    method test_render_latin_basic (line 82) | def test_render_latin_basic(
    method test_latin_font_selection (line 123) | def test_latin_font_selection(self, latin_hocr, multi_font_manager):
  class TestArabicScript (line 146) | class TestArabicScript:
    method arabic_hocr (line 150) | def arabic_hocr(self):
    method test_render_arabic_basic (line 154) | def test_render_arabic_basic(
    method test_arabic_font_selection (line 186) | def test_arabic_font_selection(self, arabic_hocr, multi_font_manager_a...
    method test_arabic_rtl_handling (line 203) | def test_arabic_rtl_handling(self, arabic_hocr):
  function _latin_font_works (line 221) | def _latin_font_works(multi_font_manager) -> bool:
  function _arabic_font_works (line 226) | def _arabic_font_works(multi_font_manager) -> bool:
  function _devanagari_font_works (line 231) | def _devanagari_font_works(multi_font_manager) -> bool:
  function _cjk_font_works (line 236) | def _cjk_font_works(multi_font_manager) -> bool:
  class TestCJKScript (line 241) | class TestCJKScript:
    method cjk_hocr (line 245) | def cjk_hocr(self):
    method test_render_cjk_basic (line 249) | def test_render_cjk_basic(self, cjk_hocr, multi_font_manager, tmp_path...
    method test_cjk_font_selection (line 291) | def test_cjk_font_selection(self, cjk_hocr, multi_font_manager):
  class TestDevanagariScript (line 319) | class TestDevanagariScript:
    method devanagari_hocr (line 323) | def devanagari_hocr(self):
    method test_render_devanagari_basic (line 327) | def test_render_devanagari_basic(
    method test_devanagari_font_selection (line 359) | def test_devanagari_font_selection(self, devanagari_hocr, multi_font_m...
  class TestMultilingual (line 386) | class TestMultilingual:
    method multilingual_hocr (line 390) | def multilingual_hocr(self):
    method test_render_multilingual_hocr_basic (line 394) | def test_render_multilingual_hocr_basic(
    method test_render_multilingual_with_debug_options (line 430) | def test_render_multilingual_with_debug_options(
    method test_multilingual_invisible_text (line 456) | def test_multilingual_invisible_text(
    method test_multilingual_font_selection (line 479) | def test_multilingual_font_selection(
  class TestBaselineHandling (line 516) | class TestBaselineHandling:
    method multilingual_hocr (line 520) | def multilingual_hocr(self):
    method test_multilingual_baseline_handling (line 524) | def test_multilingual_baseline_handling(self, multilingual_hocr):
  class TestFontCoverage (line 542) | class TestFontCoverage:
    method test_noto_sans_latin_coverage (line 545) | def test_noto_sans_latin_coverage(self, multi_font_manager):
    method test_noto_sans_arabic_coverage (line 563) | def test_noto_sans_arabic_coverage(self, multi_font_manager_arabic):
    method test_noto_sans_devanagari_coverage (line 576) | def test_noto_sans_devanagari_coverage(self, multi_font_manager):
    method test_noto_sans_cjk_coverage (line 592) | def test_noto_sans_cjk_coverage(self, multi_font_manager):

FILE: tests/test_null_ocr_engine.py
  class TestNullOcrEngineExists (line 18) | class TestNullOcrEngineExists:
    method test_null_ocr_module_importable (line 21) | def test_null_ocr_module_importable(self):
    method test_null_ocr_engine_class_exists (line 27) | def test_null_ocr_engine_class_exists(self):
  class TestNullOcrEngineInterface (line 34) | class TestNullOcrEngineInterface:
    method test_version_returns_none (line 37) | def test_version_returns_none(self):
    method test_creator_tag (line 43) | def test_creator_tag(self):
    method test_languages_returns_empty_set (line 51) | def test_languages_returns_empty_set(self):
    method test_supports_generate_ocr_returns_true (line 58) | def test_supports_generate_ocr_returns_true(self):
    method test_get_orientation_returns_zero (line 64) | def test_get_orientation_returns_zero(self):
    method test_get_deskew_returns_zero (line 71) | def test_get_deskew_returns_zero(self):
  class TestNullOcrEngineGenerateOcr (line 79) | class TestNullOcrEngineGenerateOcr:
    method sample_image (line 83) | def sample_image(self, tmp_path):
    method test_generate_ocr_returns_tuple (line 92) | def test_generate_ocr_returns_tuple(self, sample_image):
    method test_generate_ocr_returns_empty_text (line 104) | def test_generate_ocr_returns_empty_text(self, sample_image):
    method test_generate_ocr_returns_page_element (line 112) | def test_generate_ocr_returns_page_element(self, sample_image):
    method test_generate_ocr_page_has_correct_dimensions (line 121) | def test_generate_ocr_page_has_correct_dimensions(self, sample_image):
  class TestOcrEngineOption (line 132) | class TestOcrEngineOption:
    method test_ocr_engine_option_accepted (line 135) | def test_ocr_engine_option_accepted(self):
    method test_ocr_engine_choices_include_none (line 145) | def test_ocr_engine_choices_include_none(self):
    method test_ocr_engine_choices_include_auto (line 159) | def test_ocr_engine_choices_include_auto(self):

FILE: tests/test_ocr_element.py
  class TestBoundingBox (line 19) | class TestBoundingBox:
    method test_basic_creation (line 22) | def test_basic_creation(self):
    method test_width_height (line 29) | def test_width_height(self):
    method test_zero_size_box (line 34) | def test_zero_size_box(self):
    method test_invalid_left_right (line 39) | def test_invalid_left_right(self):
    method test_invalid_top_bottom (line 43) | def test_invalid_top_bottom(self):
  class TestBaseline (line 48) | class TestBaseline:
    method test_defaults (line 51) | def test_defaults(self):
    method test_with_values (line 56) | def test_with_values(self):
  class TestFontInfo (line 62) | class TestFontInfo:
    method test_defaults (line 65) | def test_defaults(self):
    method test_with_values (line 72) | def test_with_values(self):
  class TestOcrElement (line 80) | class TestOcrElement:
    method test_minimal_element (line 83) | def test_minimal_element(self):
    method test_element_with_bbox (line 90) | def test_element_with_bbox(self):
    method test_element_hierarchy (line 96) | def test_element_hierarchy(self):
    method test_iter_by_class_single (line 107) | def test_iter_by_class_single(self):
    method test_iter_by_class_multiple (line 116) | def test_iter_by_class_multiple(self):
    method test_iter_by_class_multiple_types (line 129) | def test_iter_by_class_multiple_types(self):
    method test_find_by_class (line 138) | def test_find_by_class(self):
    method test_find_by_class_not_found (line 147) | def test_find_by_class_not_found(self):
    method test_get_text_recursive_leaf (line 154) | def test_get_text_recursive_leaf(self):
    method test_get_text_recursive_nested (line 158) | def test_get_text_recursive_nested(self):
    method test_words_property (line 165) | def test_words_property(self):
    method test_lines_property (line 176) | def test_lines_property(self):
    method test_paragraphs_property (line 184) | def test_paragraphs_property(self):
    method test_direction_ltr (line 191) | def test_direction_ltr(self):
    method test_direction_rtl (line 195) | def test_direction_rtl(self):
    method test_language (line 199) | def test_language(self):
    method test_baseline (line 203) | def test_baseline(self):
    method test_textangle (line 209) | def test_textangle(self):
    method test_confidence (line 213) | def test_confidence(self):
    method test_page_properties (line 217) | def test_page_properties(self):
  class TestOcrClass (line 229) | class TestOcrClass:
    method test_class_values (line 232) | def test_class_values(self):
    method test_line_types_frozenset (line 240) | def test_line_types_frozenset(self):

FILE: tests/test_ocr_engine_interface.py
  class TestOcrEngineInterface (line 20) | class TestOcrEngineInterface:
    method test_generate_ocr_method_exists (line 23) | def test_generate_ocr_method_exists(self):
    method test_supports_generate_ocr_method_exists (line 27) | def test_supports_generate_ocr_method_exists(self):
    method test_supports_generate_ocr_default_false (line 31) | def test_supports_generate_ocr_default_false(self):
    method test_generate_ocr_raises_not_implemented_by_default (line 71) | def test_generate_ocr_raises_not_implemented_by_default(self):
  class TestOcrElementExport (line 112) | class TestOcrElementExport:
    method test_ocrelement_importable_from_ocrmypdf (line 115) | def test_ocrelement_importable_from_ocrmypdf(self):
    method test_ocrclass_importable_from_ocrmypdf (line 121) | def test_ocrclass_importable_from_ocrmypdf(self):
    method test_boundingbox_importable_from_ocrmypdf (line 127) | def test_boundingbox_importable_from_ocrmypdf(self):

FILE: tests/test_ocr_engine_selection.py
  class TestOcrEngineCliOption (line 15) | class TestOcrEngineCliOption:
    method test_ocr_engine_option_exists (line 18) | def test_ocr_engine_option_exists(self):
    method test_ocr_engine_accepts_tesseract (line 30) | def test_ocr_engine_accepts_tesseract(self):
    method test_ocr_engine_accepts_auto (line 39) | def test_ocr_engine_accepts_auto(self):
    method test_ocr_engine_accepts_none (line 48) | def test_ocr_engine_accepts_none(self):
    method test_ocr_engine_default_is_auto (line 57) | def test_ocr_engine_default_is_auto(self):
    method test_ocr_engine_rejects_invalid (line 66) | def test_ocr_engine_rejects_invalid(self):
  class TestOcrEngineOptionsModel (line 76) | class TestOcrEngineOptionsModel:
    method test_ocr_options_has_ocr_engine_field (line 79) | def test_ocr_options_has_ocr_engine_field(self):
  class TestOcrEnginePluginSelection (line 87) | class TestOcrEnginePluginSelection:
    method test_tesseract_selected_when_auto (line 90) | def test_tesseract_selected_when_auto(self):
    method test_tesseract_selected_when_tesseract (line 103) | def test_tesseract_selected_when_tesseract(self):
    method test_null_selected_when_none (line 116) | def test_null_selected_when_none(self):
    method test_null_returns_none_when_auto (line 129) | def test_null_returns_none_when_auto(self):

FILE: tests/test_optimize.py
  function palette (line 37) | def palette(resources):
  function test_basic (line 43) | def test_basic(multipage, palette, pdf, outpdf):
  function test_mono_not_inverted (line 51) | def test_mono_not_inverted(resources, outdir):
  function test_jpg_png_params (line 67) | def test_jpg_png_params(resources, outpdf):
  function test_jbig2_lossless (line 85) | def test_jbig2_lossless(resources, outpdf):
  function test_flate_to_jbig2 (line 115) | def test_flate_to_jbig2(resources, outdir):
  function test_multiple_pngs (line 143) | def test_multiple_pngs(resources, outdir):
  function test_optimize_off (line 185) | def test_optimize_off(resources, outpdf):
  function test_group3 (line 197) | def test_group3(resources):
  function test_find_formx (line 210) | def test_find_formx(resources):
  function test_extract_image_filter_with_pdf_image (line 218) | def test_extract_image_filter_with_pdf_image():
  function test_extract_image_filter_with_non_image (line 233) | def test_extract_image_filter_with_non_image():
  function test_extract_image_filter_with_small_stream_size (line 239) | def test_extract_image_filter_with_small_stream_size():
  function test_extract_image_filter_with_small_dimensions (line 246) | def test_extract_image_filter_with_small_dimensions():
  function test_extract_image_filter_with_multiple_compression_filters (line 255) | def test_extract_image_filter_with_multiple_compression_filters():
  function test_extract_image_filter_with_wide_gamut_image (line 266) | def test_extract_image_filter_with_wide_gamut_image():
  function test_extract_image_filter_with_jpeg2000_image (line 277) | def test_extract_image_filter_with_jpeg2000_image():
  function test_extract_image_filter_with_ccitt_group_3_image (line 294) | def test_extract_image_filter_with_ccitt_group_3_image():
  function test_extract_image_filter_with_rgb_smask_matte (line 320) | def test_extract_image_filter_with_rgb_smask_matte():

FILE: tests/test_page_boxes.py
  function test_media_box (line 53) | def test_media_box(
  function test_crop_box (line 105) | def test_crop_box(

FILE: tests/test_page_numbers.py
  function test_pages (line 37) | def test_pages(pages, result):
  function test_nonmonotonic_warning (line 45) | def test_nonmonotonic_warning(caplog):
  function test_limited_pages (line 51) | def test_limited_pages(multipage, outpdf):

FILE: tests/test_pdf_renderer.py
  function text_from_pdf (line 30) | def text_from_pdf(filename: Path) -> str:
  function font_dir (line 45) | def font_dir():
  function multi_font_manager (line 51) | def multi_font_manager(font_dir):
  function create_simple_page (line 56) | def create_simple_page(
  class TestFpdf2PdfRendererBasic (line 107) | class TestFpdf2PdfRendererBasic:
    method test_render_simple_page (line 110) | def test_render_simple_page(self, tmp_path, multi_font_manager):
    method test_rendered_text_extractable (line 123) | def test_rendered_text_extractable(self, tmp_path, multi_font_manager):
    method test_invisible_text_mode (line 137) | def test_invisible_text_mode(self, tmp_path, multi_font_manager):
    method test_visible_text_mode (line 154) | def test_visible_text_mode(self, tmp_path, multi_font_manager):
  class TestFpdf2PdfRendererPageSize (line 172) | class TestFpdf2PdfRendererPageSize:
    method test_page_dimensions (line 175) | def test_page_dimensions(self, tmp_path, multi_font_manager):
    method test_high_dpi_page (line 189) | def test_high_dpi_page(self, tmp_path, multi_font_manager):
  class TestFpdf2PdfRendererMultiLine (line 205) | class TestFpdf2PdfRendererMultiLine:
    method test_multiple_lines (line 208) | def test_multiple_lines(self, tmp_path, multi_font_manager):
  class TestFpdf2PdfRendererTextDirection (line 274) | class TestFpdf2PdfRendererTextDirection:
    method test_ltr_text (line 277) | def test_ltr_text(self, tmp_path, multi_font_manager):
    method test_rtl_text (line 289) | def test_rtl_text(self, tmp_path, multi_font_manager):
  class TestFpdf2PdfRendererBaseline (line 325) | class TestFpdf2PdfRendererBaseline:
    method test_sloped_baseline (line 328) | def test_sloped_baseline(self, tmp_path, multi_font_manager):
  class TestFpdf2PdfRendererTextangle (line 365) | class TestFpdf2PdfRendererTextangle:
    method test_rotated_text (line 368) | def test_rotated_text(self, tmp_path, multi_font_manager):
  class TestFpdf2PdfRendererWordBreaks (line 406) | class TestFpdf2PdfRendererWordBreaks:
    method test_word_breaks_english (line 409) | def test_word_breaks_english(self, tmp_path, multi_font_manager):
    method test_cjk_text (line 424) | def test_cjk_text(self, tmp_path, multi_font_manager):
  class TestFpdf2PdfRendererDebugOptions (line 466) | class TestFpdf2PdfRendererDebugOptions:
    method test_debug_render_options_default (line 469) | def test_debug_render_options_default(self, multi_font_manager):
    method test_debug_render_options_enabled (line 480) | def test_debug_render_options_enabled(self, tmp_path, multi_font_manag...
  class TestFpdf2PdfRendererErrors (line 506) | class TestFpdf2PdfRendererErrors:
    method test_invalid_ocr_class (line 509) | def test_invalid_ocr_class(self, multi_font_manager):
    method test_page_without_bbox (line 518) | def test_page_without_bbox(self, multi_font_manager):
  class TestFpdf2PdfRendererLineTypes (line 526) | class TestFpdf2PdfRendererLineTypes:
    method test_header_line (line 529) | def test_header_line(self, tmp_path, multi_font_manager):
    method test_caption_line (line 565) | def test_caption_line(self, tmp_path, multi_font_manager):

FILE: tests/test_pdfa.py
  function test_pdfa (line 18) | def test_pdfa(resources, outpdf, optimize, pdfa_level):

FILE: tests/test_pdfinfo.py
  function single_page_text (line 33) | def single_page_text(outdir):
  function test_single_page_text (line 48) | def test_single_page_text(single_page_text):
  function eight_by_eight (line 59) | def eight_by_eight():
  function eight_by_eight_regular_image (line 67) | def eight_by_eight_regular_image(eight_by_eight, outpdf):
  function test_single_page_image (line 87) | def test_single_page_image(eight_by_eight_regular_image):
  function eight_by_eight_inline_image (line 106) | def eight_by_eight_inline_image(eight_by_eight, outpdf):
  function test_single_page_inline_image (line 115) | def test_single_page_inline_image(eight_by_eight_inline_image):
  function test_jpeg (line 124) | def test_jpeg(resources):
  function flate_jpeg_pdf (line 135) | def flate_jpeg_pdf(outpdf):
  function test_flate_jpeg (line 175) | def test_flate_jpeg(flate_jpeg_pdf):
  function test_form_xobject (line 183) | def test_form_xobject(resources):
  function test_no_contents (line 191) | def test_no_contents(resources):
  function test_oversized_page (line 199) | def test_oversized_page(resources):
  function test_pickle (line 205) | def test_pickle(resources):
  function test_vector (line 214) | def test_vector(resources):
  function test_ocr_detection (line 221) | def test_ocr_detection(resources):
  function test_corrupt_font_detection (line 231) | def test_corrupt_font_detection(resources, testfile):
  function test_stack_abuse (line 237) | def test_stack_abuse():
  function test_pages_issue700 (line 253) | def test_pages_issue700(monkeypatch, resources):
  function image_scale0 (line 270) | def image_scale0(resources, outpdf):
  function test_image_scale0 (line 287) | def test_image_scale0(image_scale0):

FILE: tests/test_pipeline.py
  function rgb_image (line 25) | def rgb_image():
  function test_dpi_needed (line 50) | def test_dpi_needed(image, text, vector, result, rgb_image, outdir):
  function test_enumerate_compress_ranges (line 152) | def test_enumerate_compress_ranges(name, input, output):
  function test_should_visible_page_image_use_jpg (line 174) | def test_should_visible_page_image_use_jpg(encodings, expected):

FILE: tests/test_pipeline_generate_ocr.py
  class TestOcrEngineDirect (line 19) | class TestOcrEngineDirect:
    method test_ocr_engine_direct_function_exists (line 22) | def test_ocr_engine_direct_function_exists(self):
    method test_ocr_engine_direct_returns_tuple (line 28) | def test_ocr_engine_direct_returns_tuple(self, tmp_path):
  class TestPageResultExtension (line 51) | class TestPageResultExtension:
    method test_page_result_has_ocr_tree_field (line 54) | def test_page_result_has_ocr_tree_field(self):
    method test_page_result_ocr_tree_default_none (line 61) | def test_page_result_ocr_tree_default_none(self):
  class TestFpdf2DirectPage (line 69) | class TestFpdf2DirectPage:
    method test_fpdf2_direct_page_exists (line 72) | def test_fpdf2_direct_page_exists(self):
    method test_fpdf2_direct_page_has_ocr_tree (line 78) | def test_fpdf2_direct_page_has_ocr_tree(self):
  class TestHOCRResultExtension (line 86) | class TestHOCRResultExtension:
    method test_hocr_result_has_ocr_tree_field (line 89) | def test_hocr_result_has_ocr_tree_field(self):
    method test_hocr_result_ocr_tree_default_none (line 96) | def test_hocr_result_ocr_tree_default_none(self):

FILE: tests/test_preprocessing.py
  function test_deskew (line 22) | def test_deskew(resources, outdir):
  function test_deskew_blank_page (line 43) | def test_deskew_blank_page(resources, outpdf):
  function test_remove_background (line 49) | def test_remove_background(resources, outdir):
  function test_exotic_image (line 85) | def test_exotic_image(pdf, renderer, output_type, resources, outdir):
  function test_non_square_resolution (line 107) | def test_non_square_resolution(renderer, resources, outpdf):
  function test_convert_to_square_resolution (line 132) | def test_convert_to_square_resolution(renderer, resources, outpdf):

FILE: tests/test_quality.py
  function test_quality_measurement (line 9) | def test_quality_measurement():

FILE: tests/test_rasterizer.py
  class TestRasterizerOption (line 30) | class TestRasterizerOption:
    method test_rasterizer_auto_default (line 33) | def test_rasterizer_auto_default(self, resources, outpdf):
    method test_rasterizer_ghostscript (line 44) | def test_rasterizer_ghostscript(self, resources, outpdf):
    method test_rasterizer_pypdfium (line 56) | def test_rasterizer_pypdfium(self, resources, outpdf):
    method test_rasterizer_invalid (line 67) | def test_rasterizer_invalid(self):
  class TestRasterizerWithRotation (line 75) | class TestRasterizerWithRotation:
    method test_ghostscript_with_rotation (line 78) | def test_ghostscript_with_rotation(self, resources, outpdf):
    method test_pypdfium_with_rotation (line 93) | def test_pypdfium_with_rotation(self, resources, outpdf):
    method test_auto_with_rotation (line 107) | def test_auto_with_rotation(self, resources, outpdf):
  class TestRasterizerHookDirect (line 122) | class TestRasterizerHookDirect:
    method test_ghostscript_hook_respects_option (line 125) | def test_ghostscript_hook_respects_option(self, resources, tmp_path):
    method test_pypdfium_hook_respects_option (line 160) | def test_pypdfium_hook_respects_option(self, resources, tmp_path):
    method test_auto_uses_pypdfium_when_available (line 189) | def test_auto_uses_pypdfium_when_available(self, resources, tmp_path):
  function _create_gradient_image (line 217) | def _create_gradient_image(width: int, height: int) -> Image.Image:
  function pdf_with_nonstandard_boxes (line 250) | def pdf_with_nonstandard_boxes(tmp_path):
  function pdf_with_negative_mediabox (line 284) | def pdf_with_negative_mediabox(tmp_path):
  class TestRasterizerWithNonStandardBoxes (line 311) | class TestRasterizerWithNonStandardBoxes:
    method test_ghostscript_nonstandard_boxes (line 314) | def test_ghostscript_nonstandard_boxes(self, pdf_with_nonstandard_boxe...
    method test_pypdfium_nonstandard_boxes (line 326) | def test_pypdfium_nonstandard_boxes(self, pdf_with_nonstandard_boxes, ...
    method test_ghostscript_negative_mediabox (line 337) | def test_ghostscript_negative_mediabox(self, pdf_with_negative_mediabo...
    method test_pypdfium_negative_mediabox (line 349) | def test_pypdfium_negative_mediabox(self, pdf_with_negative_mediabox, ...
    method test_compare_rasterizers_nonstandard_boxes (line 360) | def test_compare_rasterizers_nonstandard_boxes(
  class TestRasterizerWithRotationAndBoxes (line 421) | class TestRasterizerWithRotationAndBoxes:
    method _get_expected_size (line 433) | def _get_expected_size(self, rotation: int) -> tuple[int, int]:
    method test_ghostscript_rotation_dimensions (line 442) | def test_ghostscript_rotation_dimensions(
    method test_pypdfium_rotation_dimensions (line 484) | def test_pypdfium_rotation_dimensions(self, pdf_with_nonstandard_boxes...
    method test_rasterizers_produce_same_dimensions (line 524) | def test_rasterizers_produce_same_dimensions(

FILE: tests/test_rotation.py
  function compare_images_monochrome (line 31) | def compare_images_monochrome(
  function test_monochrome_comparison (line 71) | def test_monochrome_comparison(resources, outdir):
  function test_autorotate (line 94) | def test_autorotate(renderer, resources, outdir):
  function test_autorotate_threshold (line 126) | def test_autorotate_threshold(threshold, op, comparison_threshold, resou...
  function test_rotated_skew_timeout (line 151) | def test_rotated_skew_timeout(resources, outpdf, rasterizer):
  function test_rotate_deskew_ocr_timeout (line 193) | def test_rotate_deskew_ocr_timeout(resources, outdir, rasterizer):
  function make_rotate_test (line 223) | def make_rotate_test(imagefile, outdir, prefix, image_angle, page_angle,...
  function test_rotate_page_level (line 251) | def test_rotate_page_level(image_angle, page_angle, resources, outdir, c...
  function test_page_rotate_tag (line 273) | def test_page_rotate_tag(page_rotate_angle, resources, outdir, caplog):
  function test_rotate_and_crop (line 301) | def test_rotate_and_crop(
  function test_rasterize_rotates (line 337) | def test_rasterize_rotates(resources, tmp_path, rasterizer):
  function test_simulated_scan (line 382) | def test_simulated_scan(outdir):

FILE: tests/test_semfree.py
  function test_semfree (line 20) | def test_semfree(resources, outpdf):

FILE: tests/test_soft_error.py
  function test_raster_continue_on_soft_error (line 15) | def test_raster_continue_on_soft_error(resources, outpdf):
  function test_raster_stop_on_soft_error (line 28) | def test_raster_stop_on_soft_error(resources, outpdf):
  function test_render_continue_on_soft_error (line 40) | def test_render_continue_on_soft_error(resources, outpdf):
  function test_render_stop_on_soft_error (line 56) | def test_render_stop_on_soft_error(resources, outpdf):

FILE: tests/test_stdio.py
  function test_stdin (line 16) | def test_stdin(ocrmypdf_exec, resources, outpdf):
  function test_stdout (line 31) | def test_stdout(ocrmypdf_exec, resources, outpdf):
  function test_dev_null (line 52) | def test_dev_null(resources):

FILE: tests/test_system_font_provider.py
  class TestSystemFontProviderPlatform (line 23) | class TestSystemFontProviderPlatform:
    method test_get_platform_linux (line 26) | def test_get_platform_linux(self):
    method test_get_platform_darwin (line 32) | def test_get_platform_darwin(self):
    method test_get_platform_windows (line 38) | def test_get_platform_windows(self):
    method test_get_platform_freebsd (line 44) | def test_get_platform_freebsd(self):
  class TestSystemFontProviderDirectories (line 51) | class TestSystemFontProviderDirectories:
    method test_linux_font_dirs (line 54) | def test_linux_font_dirs(self):
    method test_darwin_font_dirs (line 63) | def test_darwin_font_dirs(self):
    method test_windows_font_dirs_with_windir (line 72) | def test_windows_font_dirs_with_windir(self):
    method test_windows_font_dirs_default (line 86) | def test_windows_font_dirs_default(self):
    method test_windows_font_dirs_with_localappdata (line 99) | def test_windows_font_dirs_with_localappdata(self):
    method test_font_dirs_cached (line 120) | def test_font_dirs_cached(self):
  class TestSystemFontProviderLazyLoading (line 128) | class TestSystemFontProviderLazyLoading:
    method test_no_scanning_on_init (line 131) | def test_no_scanning_on_init(self):
    method test_get_font_unknown_name_returns_none (line 138) | def test_get_font_unknown_name_returns_none(self):
    method test_negative_cache (line 146) | def test_negative_cache(self):
    method test_positive_cache (line 161) | def test_positive_cache(self):
  class TestSystemFontProviderAvailableFonts (line 182) | class TestSystemFontProviderAvailableFonts:
    method test_returns_all_patterns (line 185) | def test_returns_all_patterns(self):
    method test_fallback_font_raises (line 194) | def test_fallback_font_raises(self):
  class TestChainedFontProvider (line 204) | class TestChainedFontProvider:
    method test_requires_at_least_one_provider (line 207) | def test_requires_at_least_one_provider(self):
    method test_get_font_tries_providers_in_order (line 212) | def test_get_font_tries_providers_in_order(self):
    method test_get_font_stops_on_first_match (line 228) | def test_get_font_stops_on_first_match(self):
    method test_get_font_returns_none_if_all_fail (line 243) | def test_get_font_returns_none_if_all_fail(self):
    method test_get_available_fonts_combines_providers (line 256) | def test_get_available_fonts_combines_providers(self):
    method test_get_fallback_font_from_first_provider (line 269) | def test_get_fallback_font_from_first_provider(self):
    method test_get_fallback_font_skips_not_implemented (line 283) | def test_get_fallback_font_skips_not_implemented(self):
    method test_get_fallback_font_raises_if_none_available (line 297) | def test_get_fallback_font_raises_if_none_available(self):
  class TestChainedFontProviderIntegration (line 310) | class TestChainedFontProviderIntegration:
    method font_dir (line 314) | def font_dir(self):
    method test_builtin_then_system_chain (line 318) | def test_builtin_then_system_chain(self, font_dir):
    method test_system_fonts_extend_builtin (line 333) | def test_system_fonts_extend_builtin(self, font_dir):

FILE: tests/test_tagged.py
  function test_block_tagged (line 11) | def test_block_tagged(resources):
  function test_force_tagged_warns (line 16) | def test_force_tagged_warns(resources, outpdf, caplog):
  function test_tagged_pdf_mode_ignore_with_skip_text (line 27) | def test_tagged_pdf_mode_ignore_with_skip_text(resources, outpdf, caplog):
  function test_tagged_pdf_mode_ignore_with_force (line 40) | def test_tagged_pdf_mode_ignore_with_force(resources, outpdf, caplog):

FILE: tests/test_tesseract.py
  function test_skip_pages_does_not_replicate (line 24) | def test_skip_pages_does_not_replicate(resources, basename, outdir):
  function test_content_preservation (line 49) | def test_content_preservation(resources, outpdf):
  function test_no_languages (line 64) | def test_no_languages(tmp_path, monkeypatch):
  function test_image_too_large_hocr (line 71) | def test_image_too_large_hocr(monkeypatch, resources, outdir):
  function test_image_too_large_pdf (line 92) | def test_image_too_large_pdf(monkeypatch, resources, outdir):
  function test_timeout (line 115) | def test_timeout(caplog):
  function test_tesseract_log_output (line 136) | def test_tesseract_log_output(caplog, in_, logged):
  function test_tesseract_log_output_raises (line 145) | def test_tesseract_log_output_raises(caplog):
  function test_blocked_language (line 151) | def test_blocked_language(resources, no_outpdf):

FILE: tests/test_unpaper.py
  function test_no_unpaper (line 26) | def test_no_unpaper(resources, no_outpdf):
  function test_old_unpaper (line 39) | def test_old_unpaper(resources, no_outpdf):
  function test_unpaper_version_chatter (line 52) | def test_unpaper_version_chatter(resources, no_outpdf):
  function test_clean (line 66) | def test_clean(resources, outpdf):
  function test_unpaper_args_valid (line 77) | def test_unpaper_args_valid(resources, outpdf):
  function test_unpaper_args_invalid_filename (line 90) | def test_unpaper_args_invalid_filename(resources, outpdf, caplog):
  function test_unpaper_args_invalid (line 104) | def test_unpaper_args_invalid(resources, outpdf):
  function test_unpaper_image_too_big (line 120) | def test_unpaper_image_too_big(resources, outdir, caplog):
  function test_palette_image (line 133) | def test_palette_image(resources, outpdf):

FILE: tests/test_userunit.py
  function poster (line 18) | def poster(resources):
  function test_userunit_pdf_passes (line 23) | def test_userunit_pdf_passes(mode, poster, outpdf):
  function test_rotate_interaction (line 37) | def test_rotate_interaction(poster, outpdf):

FILE: tests/test_validation.py
  function make_opts_pm (line 25) | def make_opts_pm(input_file='a.pdf', output_file='b.pdf', language='eng'...
  function make_opts (line 39) | def make_opts(*args, **kwargs):
  function make_ocr_opts (line 44) | def make_ocr_opts(input_file='a.pdf', output_file='b.pdf', **kwargs):
  function test_old_tesseract_error (line 49) | def test_old_tesseract_error():
  function test_tesseract_not_installed (line 57) | def test_tesseract_not_installed(caplog):
  function test_lossless_redo (line 69) | def test_lossless_redo():
  function test_mutex_options (line 74) | def test_mutex_options():
  function test_optimizing (line 89) | def test_optimizing(caplog):
  function test_pillow_options (line 96) | def test_pillow_options():
  function test_output_tty (line 106) | def test_output_tty():
  function test_report_file_size (line 111) | def test_report_file_size(tmp_path, caplog):
  function test_false_action_store_true (line 144) | def test_false_action_store_true():
  function test_no_progress_bar (line 152) | def test_no_progress_bar(progress_bar, resources):
  function make_version (line 173) | def make_version(version):
  function test_version_comparison (line 180) | def test_version_comparison():
  function test_optional_program_recommended (line 245) | def test_optional_program_recommended(caplog):
  function test_pagesegmode_warning (line 266) | def test_pagesegmode_warning(caplog):
  function test_two_languages (line 273) | def test_two_languages():
  function test_sidecar_equals_output (line 285) | def test_sidecar_equals_output(resources, no_outpdf):
  function test_devnull_sidecar (line 291) | def test_devnull_sidecar(resources):

FILE: tests/test_verapdf.py
  class TestVerapdfModule (line 21) | class TestVerapdfModule:
    method test_output_type_to_flavour (line 24) | def test_output_type_to_flavour(self):
    method test_version (line 33) | def test_version(self):
    method test_validate_non_pdfa (line 38) | def test_validate_non_pdfa(self, tmp_path):
  class TestPdfaPartConformance (line 50) | class TestPdfaPartConformance:
    method test_pdfa_part_conformance (line 53) | def test_pdfa_part_conformance(self):
  class TestAddPdfaMetadata (line 62) | class TestAddPdfaMetadata:
    method test_add_pdfa_metadata (line 65) | def test_add_pdfa_metadata(self, tmp_path):
  class TestAddSrgbOutputIntent (line 83) | class TestAddSrgbOutputIntent:
    method test_add_srgb_output_intent (line 86) | def test_add_srgb_output_intent(self, tmp_path):
    method test_add_srgb_output_intent_idempotent (line 101) | def test_add_srgb_output_intent_idempotent(self, tmp_path):
  class TestSpeculativePdfaConversion (line 115) | class TestSpeculativePdfaConversion:
    method test_speculative_conversion_creates_pdfa_structures (line 118) | def test_speculative_conversion_creates_pdfa_structures(self, tmp_path...
    method test_speculative_conversion_different_parts (line 131) | def test_speculative_conversion_different_parts(self, tmp_path, resour...
  class TestVerapdfIntegration (line 148) | class TestVerapdfIntegration:
    method test_speculative_conversion_validation (line 151) | def test_speculative_conversion_validation(self, tmp_path, resources):

FILE: tests/test_watcher.py
  function test_watcher (line 17) | def test_watcher(tmp_path, resources, year_month):
Condensed preview — 236 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,737K chars).
[
  {
    "path": ".docker/Dockerfile",
    "chars": 2539,
    "preview": "# SPDX-FileCopyrightText: 2024 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nFROM ubuntu:25.04 AS base\n\nENV LANG=C"
  },
  {
    "path": ".docker/Dockerfile.alpine",
    "chars": 1791,
    "preview": "# SPDX-FileCopyrightText: 2023 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nFROM alpine:3.23 AS base\n\nENV LANG=C."
  },
  {
    "path": ".dockerignore",
    "chars": 545,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n# dotfiles\n.*\n!.coveragerc\n!.dockerig"
  },
  {
    "path": ".git_archival.txt",
    "chars": 111,
    "preview": "node: $Format:%H$\nnode-date: $Format:%cI$\ndescribe-name: $Format:%(describe:tags=true)$\nref-names: $Format:%D$\n"
  },
  {
    "path": ".gitattributes",
    "chars": 380,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n# Always use Unix convention for new "
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 758,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n# These are supported funding model p"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/1-bug-report-general.yml",
    "chars": 2253,
    "preview": "name: Installation, packaging, dependencies\ndescription: Installation, packages, dependencies, \"nothing works\", test sui"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/2-problem-with-specific-file.yml",
    "chars": 2719,
    "preview": "name: Problem with specific file\ndescription: Something went wrong while trying to OCR a specific file\ntitle: \"[Bug]: \"\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/3-app.yml",
    "chars": 3196,
    "preview": "name: Problem with third party app that uses OCRmyPDF\ndescription: |\n  For PDF generation issues with third party softwa"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/4-feature-request.yml",
    "chars": 323,
    "preview": "name: Feature request\ndescription: Suggest an idea for this project\ntitle: \"[Feature]: \"\nlabels: [\"enhancement\", \"triage"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 596,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n# To get started with Dependabot vers"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 9537,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\nname: Test and deploy\n\non:\n  push:\n   "
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 3436,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nname: Publish Release\n\non:\n  push:\n  "
  },
  {
    "path": ".github/workflows/triage.yml",
    "chars": 815,
    "preview": "# SPDX-FileCopyrightText: 2024 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nname: Remove Triage Label on Reply\n\no"
  },
  {
    "path": ".gitignore",
    "chars": 597,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: CC-BY-SA-4.0\n\n# dotfiles\n.coverage\n.venv*/\n.to"
  },
  {
    "path": ".pre-commit-config.yaml",
    "chars": 703,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nrepos:\n  - repo: https://github.com/p"
  },
  {
    "path": ".readthedocs.yaml",
    "chars": 755,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n# Read the Docs configuration file\n# "
  },
  {
    "path": "LICENSE",
    "chars": 16725,
    "preview": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\""
  },
  {
    "path": "LICENSES/AGPL-3.0-or-later.txt",
    "chars": 34020,
    "preview": "GNU AFFERO GENERAL PUBLIC LICENSE\nVersion 3, 19 November 2007\n\nCopyright (C) 2007 Free Software Foundation, Inc. <http:/"
  },
  {
    "path": "LICENSES/Apache-2.0.txt",
    "chars": 10280,
    "preview": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AN"
  },
  {
    "path": "LICENSES/CC-BY-SA-1.0.txt",
    "chars": 12523,
    "preview": "Creative Commons Attribution-ShareAlike 1.0\n\n CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL "
  },
  {
    "path": "LICENSES/CC-BY-SA-2.0.txt",
    "chars": 14122,
    "preview": "Creative Commons Attribution-ShareAlike 2.0\n\n CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL "
  },
  {
    "path": "LICENSES/CC-BY-SA-2.5.txt",
    "chars": 14331,
    "preview": "Creative Commons Attribution-ShareAlike 2.5\n\n CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL "
  },
  {
    "path": "LICENSES/CC-BY-SA-3.0.txt",
    "chars": 21305,
    "preview": "Creative Commons Attribution-ShareAlike 3.0 Unported\n\n CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVI"
  },
  {
    "path": "LICENSES/CC-BY-SA-4.0.txt",
    "chars": 18329,
    "preview": "Creative Commons Attribution-ShareAlike 4.0 International\n\n Creative Commons Corporation (“Creative Commons”) is not a l"
  },
  {
    "path": "LICENSES/GFDL-1.2-or-later.txt",
    "chars": 20272,
    "preview": "GNU Free Documentation License\nVersion 1.2, November 2002\n\nCopyright (C) 2000,2001,2002 Free Software Foundation, Inc. 5"
  },
  {
    "path": "LICENSES/MIT.txt",
    "chars": 1078,
    "preview": "MIT License\n\nCopyright (c) <year> <copyright holders>\n\nPermission is hereby granted, free of charge, to any person obtai"
  },
  {
    "path": "LICENSES/MPL-2.0.txt",
    "chars": 16727,
    "preview": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\""
  },
  {
    "path": "LICENSES/Zlib.txt",
    "chars": 838,
    "preview": "zlib License\n\nThis software is provided 'as-is', without any express or implied warranty.  In no event will the authors "
  },
  {
    "path": "README.md",
    "chars": 9893,
    "preview": "<!-- SPDX-FileCopyrightText: 2014 Julien Pfefferkorn -->\n<!-- SPDX-FileCopyrightText: 2015 James R. Barlow -->\n<!-- SPDX"
  },
  {
    "path": "README_ZH.md",
    "chars": 5850,
    "preview": "# OCRmyPDF 中文说明\n\n我将为您创建一个中文版的 README.md 文件。以下是基于原始英文版本的中文翻译:\n\n```markdown:/Users/huapai/PycharmProjects/OCRmyPDF/README."
  },
  {
    "path": "REUSE.toml",
    "chars": 5959,
    "preview": "version = 1\nSPDX-PackageName = \"OCRmyPDF\"\nSPDX-PackageSupplier = \"James R. Barlow <james@purplerock.ca>\"\nSPDX-PackageDow"
  },
  {
    "path": "bin/bump_version.py",
    "chars": 11687,
    "preview": "#!/usr/bin/env python3\n# SPDX-FileCopyrightText: 2017-2019 Joe Rickerby and contributors\n# SPDX-License-Identifier: BSD-"
  },
  {
    "path": "docs/advanced.md",
    "chars": 23489,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# Advanced features\n\n## Control "
  },
  {
    "path": "docs/api.md",
    "chars": 6240,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# Using the OCRmyPDF API\n\nOCRmyP"
  },
  {
    "path": "docs/apiref.md",
    "chars": 968,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# API reference\n\nThis page summa"
  },
  {
    "path": "docs/batch.md",
    "chars": 8691,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\nBatch processing\n==============="
  },
  {
    "path": "docs/cloud.md",
    "chars": 3697,
    "preview": "% SPDX-FileCopyrightText: 2025 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n(ocr-service)=\n\n# Online deploym"
  },
  {
    "path": "docs/conf.py",
    "chars": 11220,
    "preview": "#!/usr/bin/env python3\n# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: CC-BY-SA-4.0\n\n# ruff: n"
  },
  {
    "path": "docs/contributing.md",
    "chars": 2710,
    "preview": "% SPDX-FileCopyrightText: 2025 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# Contributing guidelines\n\nContr"
  },
  {
    "path": "docs/cookbook.md",
    "chars": 13764,
    "preview": "% SPDX-FileCopyrightText: 2025 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# Cookbook\n\n## Basic examples\n\n#"
  },
  {
    "path": "docs/design_notes.md",
    "chars": 1159,
    "preview": "% SPDX-FileCopyrightText: 2023 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# Design notes\n\n## Why doesn\\'t "
  },
  {
    "path": "docs/docker.md",
    "chars": 8977,
    "preview": "# OCRmyPDF Docker image {#docker}\n\nOCRmyPDF is also available in Docker images that packages recent\nversions of all depe"
  },
  {
    "path": "docs/errors.md",
    "chars": 1876,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# Common error messages\n\n## Page"
  },
  {
    "path": "docs/index.md",
    "chars": 890,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# OCRmyPDF documentation\n\n:::{fi"
  },
  {
    "path": "docs/installation.md",
    "chars": 25639,
    "preview": "---\nmyst:\n  substitutions:\n    deb_12: |-\n      :::{image} https://repology.org/badge/version-for-repo/debian_12/ocrmypd"
  },
  {
    "path": "docs/introduction.md",
    "chars": 10979,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# Introduction\n\nOCRmyPDF is a Py"
  },
  {
    "path": "docs/jbig2.md",
    "chars": 2359,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n{#jbig2}\n\n# Installing the JBIG2"
  },
  {
    "path": "docs/languages.md",
    "chars": 4867,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n(lang-packs)=\n\n# Installing addi"
  },
  {
    "path": "docs/maintainers.md",
    "chars": 6159,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# Maintainer notes\n\nThis is for "
  },
  {
    "path": "docs/optimizer.md",
    "chars": 3964,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# PDF optimization\n\nOCRmyPDF inc"
  },
  {
    "path": "docs/pdfsecurity.md",
    "chars": 5002,
    "preview": "(security)=\n\n# PDF security issues\n\n> OCRmyPDF should only be used on PDFs you trust. It is not designed to\n> protect yo"
  },
  {
    "path": "docs/performance.md",
    "chars": 738,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# Performance\n\nSome users have n"
  },
  {
    "path": "docs/plugins.md",
    "chars": 11754,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# Plugins\n\n> The key words \"MUST"
  },
  {
    "path": "docs/releasenotes/index.md",
    "chars": 1114,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# Release notes\n\nOCRmyPDF uses ["
  },
  {
    "path": "docs/releasenotes/version02.md",
    "chars": 532,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v2\n\n## v2.2-stable (2014-09-29"
  },
  {
    "path": "docs/releasenotes/version03.md",
    "chars": 6720,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v3\n\n## v3.2.1\n\nChanges\n\n- Fixe"
  },
  {
    "path": "docs/releasenotes/version04.md",
    "chars": 13316,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v4\n\n## v4.5.6\n\n- Fixed {issue}"
  },
  {
    "path": "docs/releasenotes/version05.md",
    "chars": 7541,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v5\n\n## v5.7.0\n\n- Fixed an issu"
  },
  {
    "path": "docs/releasenotes/version06.md",
    "chars": 6696,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v6\n\n## v6.2.5\n\n- Disable a fai"
  },
  {
    "path": "docs/releasenotes/version07.md",
    "chars": 12004,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v7\n\n## v7.4.0\n\n- `--force-ocr`"
  },
  {
    "path": "docs/releasenotes/version08.md",
    "chars": 6180,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v8\n\n## v8.3.2\n\n- Dropped worka"
  },
  {
    "path": "docs/releasenotes/version09.md",
    "chars": 10855,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v9\n\n## v9.8.2\n\n- Fixed an issu"
  },
  {
    "path": "docs/releasenotes/version10.md",
    "chars": 5141,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v10\n\n## v10.3.3\n\n- Fixed a \"Ke"
  },
  {
    "path": "docs/releasenotes/version11.md",
    "chars": 10059,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v11\n\n## v11.7.3\n\n- Exclude CCI"
  },
  {
    "path": "docs/releasenotes/version12.md",
    "chars": 7813,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v12\n\n## v12.7.2\n\n- Fixed \"inva"
  },
  {
    "path": "docs/releasenotes/version13.md",
    "chars": 7537,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v13\n\n## v13.7.0\n\n- Fixed an ex"
  },
  {
    "path": "docs/releasenotes/version14.md",
    "chars": 3969,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v14\n\n## v14.4.0\n\n- Digitally s"
  },
  {
    "path": "docs/releasenotes/version15.md",
    "chars": 6052,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v15\n\n## v15.4.4\n\n- Fixed docum"
  },
  {
    "path": "docs/releasenotes/version16.md",
    "chars": 12855,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v16\n\n## v16.13.0\n\n- Added dete"
  },
  {
    "path": "docs/releasenotes/version17.md",
    "chars": 7979,
    "preview": "% SPDX-FileCopyrightText: 2022 James R. Barlow\n% SPDX-License-Identifier: CC-BY-SA-4.0\n\n# v17\n\n## v17.3.0\n\n- Fixed Pytho"
  },
  {
    "path": "misc/_webservice.py",
    "chars": 8541,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: AGPL-3.0-or-later\n\n\"\"\"This is a simple web ser"
  },
  {
    "path": "misc/batch.py",
    "chars": 2951,
    "preview": "#!/usr/bin/env python3\n# SPDX-FileCopyrightText: 2016 findingorder <https://github.com/findingorder>\n# SPDX-FileCopyrigh"
  },
  {
    "path": "misc/bisect_pdf.py",
    "chars": 1434,
    "preview": "#!/usr/bin/env python3\n# SPDX-FileCopyrightText: 2024 James R. Barlow\n# SPDX-License-Identifier: MIT\n\n\"\"\"Helper script f"
  },
  {
    "path": "misc/completion/ocrmypdf.bash",
    "chars": 12962,
    "preview": "# SPDX-FileCopyrightText: 2021 Frank Pille\n# SPDX-FileCopyrightText: 2020 Alex Willner\n# SPDX-License-Identifier: MIT\n\ns"
  },
  {
    "path": "misc/completion/ocrmypdf.fish",
    "chars": 10003,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\ncomplete -c ocrmypdf -x -n __fish_is_firs"
  },
  {
    "path": "misc/docker-compose.example.yml",
    "chars": 432,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n---\nversion: \"3.3\"\nservices:\n  ocrmypdf:\n "
  },
  {
    "path": "misc/example_plugin.py",
    "chars": 1732,
    "preview": "# SPDX-FileCopyrightText: 2022 James R Barlow: https://github.com/jbarlow83\n# SPDX-License-Identifier: MIT\n\n\"\"\"An exampl"
  },
  {
    "path": "misc/flatpak/io.ocrmypdf.ocrmypdf.metainfo.xml",
    "chars": 2200,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<component type=\"console-application\">\n  <id>io.ocrmypdf.ocrmypdf</id>\n\n  <name>O"
  },
  {
    "path": "misc/ocrmypdf_compare.py",
    "chars": 4127,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MIT\n\n\"\"\"Run OCRmyPDF on the same PDF with diff"
  },
  {
    "path": "misc/pdf_compare.py",
    "chars": 2548,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MIT\n\n\"\"\"Compare two PDFs.\"\"\"\n\nfrom __future__ "
  },
  {
    "path": "misc/pdf_text_diff.py",
    "chars": 1405,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Compare text in PDFs.\"\"\"\n\nfrom __f"
  },
  {
    "path": "misc/screencast/README.md",
    "chars": 577,
    "preview": "<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->\n\nTo regenerate\n=============\n\nUsing asciinema and svg-term (`npm install "
  },
  {
    "path": "misc/screencast/demo.cast",
    "chars": 8929,
    "preview": "{\"version\": 2, \"width\": 131, \"height\": 24, \"timestamp\": 1687247006, \"env\": {\"SHELL\": \"/usr/bin/fish\", \"TERM\": \"xterm-256"
  },
  {
    "path": "misc/synology.py",
    "chars": 2265,
    "preview": "#!/bin/env python3\n# SPDX-FileCopyrightText: 2017 Enantiomerie\n# SPDX-License-Identifier: MIT\n\n\"\"\"Example OCRmyPDF for S"
  },
  {
    "path": "misc/watcher.py",
    "chars": 9836,
    "preview": "#!/usr/bin/env python3\n# SPDX-FileCopyrightText: 2019 Ian Alexander <https://github.com/ianalexander>\n# SPDX-FileCopyrig"
  },
  {
    "path": "misc/webservice.py",
    "chars": 658,
    "preview": "#!/usr/bin/env python\n# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: AGPL-3.0-or-later\n\n\"\"\"Ru"
  },
  {
    "path": "pyproject.toml",
    "chars": 5033,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n[build-system]\nrequires = [\"hatchling\""
  },
  {
    "path": "scripts/generate_glyphless_font.py",
    "chars": 6631,
    "preview": "#!/usr/bin/env python3\n# SPDX-FileCopyrightText: 2024 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Generate th"
  },
  {
    "path": "snapcraft.yaml",
    "chars": 1986,
    "preview": "# SPDX-FileCopyrightText: 2022 Alexander Langanke\n# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-FileCopyrightTex"
  },
  {
    "path": "src/ocrmypdf/RELEASE.md",
    "chars": 753,
    "preview": "<!-- SPDX-FileCopyrightText: 2022 James R. Barlow -->\n<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->\n\n# Release checklis"
  },
  {
    "path": "src/ocrmypdf/__init__.py",
    "chars": 1931,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Adds OCR layer to PDFs.\"\"\"\n\nfrom _"
  },
  {
    "path": "src/ocrmypdf/__main__.py",
    "chars": 2251,
    "preview": "#!/usr/bin/env python3\n# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"ocrmypdf co"
  },
  {
    "path": "src/ocrmypdf/_annots.py",
    "chars": 2141,
    "preview": "# SPDX-FileCopyrightText: 2024 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"OCRmyPDF PDF annotation cleanup.\"\""
  },
  {
    "path": "src/ocrmypdf/_concurrent.py",
    "chars": 4306,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"OCRmyPDF concurrency abstractions."
  },
  {
    "path": "src/ocrmypdf/_defaults.py",
    "chars": 266,
    "preview": "# SPDX-FileCopyrightText: 2024 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n# Enforce English hegemony\nfrom __fut"
  },
  {
    "path": "src/ocrmypdf/_exec/__init__.py",
    "chars": 157,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Manage third party executables.\"\"\""
  },
  {
    "path": "src/ocrmypdf/_exec/ghostscript.py",
    "chars": 12770,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Interface to Ghostscript executabl"
  },
  {
    "path": "src/ocrmypdf/_exec/jbig2enc.py",
    "chars": 1063,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Interface to jbig2 executable.\"\"\"\n"
  },
  {
    "path": "src/ocrmypdf/_exec/pngquant.py",
    "chars": 1464,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Interface to pngquant executable.\""
  },
  {
    "path": "src/ocrmypdf/_exec/tesseract.py",
    "chars": 14203,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Interface to Tesseract executable."
  },
  {
    "path": "src/ocrmypdf/_exec/unpaper.py",
    "chars": 4256,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Interface to unpaper executable.\"\""
  },
  {
    "path": "src/ocrmypdf/_exec/verapdf.py",
    "chars": 2970,
    "preview": "# SPDX-FileCopyrightText: 2024 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Interface to verapdf executable.\"\""
  },
  {
    "path": "src/ocrmypdf/_graft.py",
    "chars": 22579,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"For grafting text-only PDF pages o"
  },
  {
    "path": "src/ocrmypdf/_jobcontext.py",
    "chars": 4200,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Defines context objects that are p"
  },
  {
    "path": "src/ocrmypdf/_logging.py",
    "chars": 808,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Logging support classes.\"\"\"\n\nfrom "
  },
  {
    "path": "src/ocrmypdf/_metadata.py",
    "chars": 7523,
    "preview": "# SPDX-FileCopyrightText: 2023 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"OCRmyPDF page processing pipeline "
  },
  {
    "path": "src/ocrmypdf/_options.py",
    "chars": 23406,
    "preview": "# SPDX-FileCopyrightText: 2024 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Internal options model for OCRmyPD"
  },
  {
    "path": "src/ocrmypdf/_pipeline.py",
    "chars": 46620,
    "preview": "# SPDX-FileCopyrightText: 2018-2022 James R. Barlow\n# SPDX-FileCopyrightText: 2019 Martin Wind\n# SPDX-License-Identifier"
  },
  {
    "path": "src/ocrmypdf/_pipelines/__init__.py",
    "chars": 119,
    "preview": "# SPDX-FileCopyrightText: 2023 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\nfrom __future__ import annotations\n"
  },
  {
    "path": "src/ocrmypdf/_pipelines/_common.py",
    "chars": 18666,
    "preview": "# SPDX-FileCopyrightText: 2023 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\ni"
  },
  {
    "path": "src/ocrmypdf/_pipelines/hocr_to_ocr_pdf.py",
    "chars": 4271,
    "preview": "# SPDX-FileCopyrightText: 2019-2023 James R. Barlow\n# SPDX-FileCopyrightText: 2019 Martin Wind\n# SPDX-License-Identifier"
  },
  {
    "path": "src/ocrmypdf/_pipelines/ocr.py",
    "chars": 7463,
    "preview": "# SPDX-FileCopyrightText: 2019-2023 James R. Barlow\n# SPDX-FileCopyrightText: 2019 Martin Wind\n# SPDX-License-Identifier"
  },
  {
    "path": "src/ocrmypdf/_pipelines/pdf_to_hocr.py",
    "chars": 3439,
    "preview": "# SPDX-FileCopyrightText: 2019-2023 James R. Barlow\n# SPDX-FileCopyrightText: 2019 Martin Wind\n# SPDX-License-Identifier"
  },
  {
    "path": "src/ocrmypdf/_plugin_manager.py",
    "chars": 9567,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Plugin manager using pluggy with t"
  },
  {
    "path": "src/ocrmypdf/_plugin_registry.py",
    "chars": 1571,
    "preview": "# SPDX-FileCopyrightText: 2024 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Plugin option registry for dynamic"
  },
  {
    "path": "src/ocrmypdf/_progressbar.py",
    "chars": 9129,
    "preview": "# SPDX-FileCopyrightText: 2023 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Defines progress bar API.\"\"\"\n\nfrom"
  },
  {
    "path": "src/ocrmypdf/_validation.py",
    "chars": 10613,
    "preview": "#!/usr/bin/env python3\n# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Validate a "
  },
  {
    "path": "src/ocrmypdf/_validation_coordinator.py",
    "chars": 5601,
    "preview": "# SPDX-FileCopyrightText: 2024 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Validation coordinator for plugin "
  },
  {
    "path": "src/ocrmypdf/_version.py",
    "chars": 105,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n__version__ = \"17.3.0\"\n"
  },
  {
    "path": "src/ocrmypdf/api.py",
    "chars": 36534,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Python API for OCRmyPDF.\n\nThis mod"
  },
  {
    "path": "src/ocrmypdf/builtin_plugins/__init__.py",
    "chars": 187,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Plugins in this package are automa"
  },
  {
    "path": "src/ocrmypdf/builtin_plugins/concurrency.py",
    "chars": 7559,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"OCRmyPDF's multiprocessing/multithr"
  },
  {
    "path": "src/ocrmypdf/builtin_plugins/default_filters.py",
    "chars": 337,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"OCRmyPDF automatically installs the"
  },
  {
    "path": "src/ocrmypdf/builtin_plugins/ghostscript.py",
    "chars": 13399,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"Built-in plugin to implement PDF pa"
  },
  {
    "path": "src/ocrmypdf/builtin_plugins/null_ocr.py",
    "chars": 4865,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Built-in plugin implementing a nul"
  },
  {
    "path": "src/ocrmypdf/builtin_plugins/optimize.py",
    "chars": 7954,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"Built-in plugin to implement PDF pa"
  },
  {
    "path": "src/ocrmypdf/builtin_plugins/pypdfium.py",
    "chars": 10285,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"Built-in plugin to implement PDF pa"
  },
  {
    "path": "src/ocrmypdf/builtin_plugins/tesseract_ocr.py",
    "chars": 17999,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"Built-in plugin to implement OCR us"
  },
  {
    "path": "src/ocrmypdf/cli.py",
    "chars": 21242,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Command line interface customizati"
  },
  {
    "path": "src/ocrmypdf/data/__init__.py",
    "chars": 166,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"Data files used to generate certain"
  },
  {
    "path": "src/ocrmypdf/exceptions.py",
    "chars": 3763,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"OCRmyPDF's exceptions.\"\"\"\n\nfrom __"
  },
  {
    "path": "src/ocrmypdf/extra_plugins/__init__.py",
    "chars": 165,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n#\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Extra plugins. These are not aut"
  },
  {
    "path": "src/ocrmypdf/extra_plugins/semfree.py",
    "chars": 7047,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"Semaphore-free alternate executor.\n"
  },
  {
    "path": "src/ocrmypdf/font/__init__.py",
    "chars": 945,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Font management for OCRmyPDF PDF r"
  },
  {
    "path": "src/ocrmypdf/font/font_manager.py",
    "chars": 3837,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Base font management for PDF rende"
  },
  {
    "path": "src/ocrmypdf/font/font_provider.py",
    "chars": 6227,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Font provider protocol and impleme"
  },
  {
    "path": "src/ocrmypdf/font/multi_font_manager.py",
    "chars": 12265,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Multi-font management for PDF rend"
  },
  {
    "path": "src/ocrmypdf/font/system_font_provider.py",
    "chars": 9958,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"System font discovery for PDF rend"
  },
  {
    "path": "src/ocrmypdf/fpdf_renderer/__init__.py",
    "chars": 481,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"fpdf2-based PDF renderer for OCR t"
  },
  {
    "path": "src/ocrmypdf/fpdf_renderer/renderer.py",
    "chars": 33274,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"fpdf2-based PDF renderer for OCR t"
  },
  {
    "path": "src/ocrmypdf/helpers.py",
    "chars": 11227,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Support functions.\"\"\"\n\nfrom __futu"
  },
  {
    "path": "src/ocrmypdf/hocrtransform/__init__.py",
    "chars": 1306,
    "preview": "# SPDX-FileCopyrightText: 2023-2025 James R. Barlow\n# SPDX-License-Identifier: MIT\n\n\"\"\"Transform OCR output to text-only"
  },
  {
    "path": "src/ocrmypdf/hocrtransform/__main__.py",
    "chars": 2223,
    "preview": "# SPDX-FileCopyrightText: 2023-2025 James R. Barlow\n# SPDX-License-Identifier: MIT\n\n\"\"\"Simple CLI for testing HOCR to PD"
  },
  {
    "path": "src/ocrmypdf/hocrtransform/hocr_parser.py",
    "chars": 14598,
    "preview": "# SPDX-FileCopyrightText: 2010 Jonathan Brinley\n# SPDX-FileCopyrightText: 2013-2014 Julien Pfefferkorn\n# SPDX-FileCopyri"
  },
  {
    "path": "src/ocrmypdf/imageops.py",
    "chars": 5120,
    "preview": "# SPDX-FileCopyrightText: 2023 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"OCR-related image manipulation.\"\"\""
  },
  {
    "path": "src/ocrmypdf/languages.py",
    "chars": 34263,
    "preview": "# SPDX-FileCopyrightText: 2023 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Language codes and names from ISO "
  },
  {
    "path": "src/ocrmypdf/models/__init__.py",
    "chars": 188,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"OCRmyPDF models for plugin options"
  },
  {
    "path": "src/ocrmypdf/models/ocr_element.py",
    "chars": 8319,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"OCR element dataclasses for repres"
  },
  {
    "path": "src/ocrmypdf/optimize.py",
    "chars": 25623,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Post-processing image optimization"
  },
  {
    "path": "src/ocrmypdf/pdfa.py",
    "chars": 8095,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Utilities for PDF/A production and"
  },
  {
    "path": "src/ocrmypdf/pdfinfo/__init__.py",
    "chars": 395,
    "preview": "#!/usr/bin/env python3\n\n# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"For extract"
  },
  {
    "path": "src/ocrmypdf/pdfinfo/_contentstream.py",
    "chars": 8993,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"PDF content stream interpretation.\""
  },
  {
    "path": "src/ocrmypdf/pdfinfo/_image.py",
    "chars": 13290,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"PDF image analysis.\"\"\"\n\nfrom __futu"
  },
  {
    "path": "src/ocrmypdf/pdfinfo/_types.py",
    "chars": 2085,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"PDF type definitions and constants."
  },
  {
    "path": "src/ocrmypdf/pdfinfo/_worker.py",
    "chars": 4237,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"PDF page info worker process handli"
  },
  {
    "path": "src/ocrmypdf/pdfinfo/info.py",
    "chars": 17846,
    "preview": "#!/usr/bin/env python3\n\n# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"Extract inf"
  },
  {
    "path": "src/ocrmypdf/pdfinfo/layout.py",
    "chars": 12511,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"Detailed text position and layout a"
  },
  {
    "path": "src/ocrmypdf/pluginspec.py",
    "chars": 25801,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"OCRmyPDF pluggy plugin specificati"
  },
  {
    "path": "src/ocrmypdf/py.typed",
    "chars": 102,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n# ocrmypdf is typed\n"
  },
  {
    "path": "src/ocrmypdf/quality.py",
    "chars": 1460,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Utilities to measure OCR quality.\""
  },
  {
    "path": "src/ocrmypdf/subprocess/__init__.py",
    "chars": 11636,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"Wrappers to manage subprocess calls"
  },
  {
    "path": "src/ocrmypdf/subprocess/_windows.py",
    "chars": 6227,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\"\"\"Find Tesseract and Ghostscript bina"
  },
  {
    "path": "tests/__init__.py",
    "chars": 132,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Tests.\"\"\"\n\nfrom __future__ import "
  },
  {
    "path": "tests/cache/manifest.jsonl",
    "chars": 22698,
    "preview": "{\"tesseract_version\": \"5.5.1\", \"system\": \"Linux\", \"python\": \"3.11.14\", \"argv_slug\": \"__-l__eng__000001_ocr.png__000001_o"
  },
  {
    "path": "tests/conftest.py",
    "chars": 5650,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\ni"
  },
  {
    "path": "tests/plugins/gs_feature_elision.py",
    "chars": 1144,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\nfrom __future__ import annotations\n\nfrom "
  },
  {
    "path": "tests/plugins/gs_pdfa_failure.py",
    "chars": 1251,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\nfrom __future__ import annotations\n\nfrom "
  },
  {
    "path": "tests/plugins/gs_raster_failure.py",
    "chars": 1268,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\nfrom __future__ import annotations\n\nfrom "
  },
  {
    "path": "tests/plugins/gs_raster_soft_error.py",
    "chars": 1356,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\nfrom __future__ import annotations\n\nfrom "
  },
  {
    "path": "tests/plugins/gs_render_failure.py",
    "chars": 998,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\nfrom __future__ import annotations\n\nfrom "
  },
  {
    "path": "tests/plugins/gs_render_soft_error.py",
    "chars": 1181,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\nfrom __future__ import annotations\n\nfrom "
  },
  {
    "path": "tests/plugins/tesseract_badutf8.py",
    "chars": 1527,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\n\"\"\"Tesseract bad utf8.\n\nIn some cases, so"
  },
  {
    "path": "tests/plugins/tesseract_big_image_error.py",
    "chars": 1516,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\nfrom __future__ import annotations\n\nfrom c"
  },
  {
    "path": "tests/plugins/tesseract_cache.py",
    "chars": 7869,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\"\"\"Cache output of tesseract to speed up t"
  },
  {
    "path": "tests/plugins/tesseract_crash.py",
    "chars": 1563,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\nfrom __future__ import annotations\n\nimport"
  },
  {
    "path": "tests/plugins/tesseract_debug_rotate.py",
    "chars": 3101,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\"\"\"Tesseract no-op/fixed rotate plugin.\n\nT"
  },
  {
    "path": "tests/plugins/tesseract_noop.py",
    "chars": 2941,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\"\"\"Tesseract no-op plugin.\n\nTo quickly run"
  },
  {
    "path": "tests/plugins/tesseract_simulate_oom_killer.py",
    "chars": 1943,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MIT\n\"\"\"Tesseract no-op plugin that simulates t"
  },
  {
    "path": "tests/resources/README.rst",
    "chars": 5624,
    "preview": ".. SPDX-FileCopyrightText: 2022 James R. Barlow\n.. SPDX-License-Identifier: CC-BY-SA-4.0\n\nThese test files are used in O"
  },
  {
    "path": "tests/resources/arabic.hocr",
    "chars": 2017,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n    \"http://www.w3"
  },
  {
    "path": "tests/resources/cjk.hocr",
    "chars": 2297,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n    \"http://www.w3"
  },
  {
    "path": "tests/resources/devanagari.hocr",
    "chars": 2081,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n    \"http://www.w3"
  },
  {
    "path": "tests/resources/hello_world_scripts.hocr",
    "chars": 9606,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n    \"http://www.w3"
  },
  {
    "path": "tests/resources/latin.hocr",
    "chars": 2367,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n    \"http://www.w3"
  },
  {
    "path": "tests/resources/linn.txt",
    "chars": 4519,
    "preview": "The LinnSequencer\n32 Track MIDI Sequence Recorder\n\nThe LinnSequencer is a state—of—the-art composition and performance t"
  },
  {
    "path": "tests/resources/multilingual.hocr",
    "chars": 1572,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n    \"http://www.w3"
  },
  {
    "path": "tests/test_acroform.py",
    "chars": 1414,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\ni"
  },
  {
    "path": "tests/test_annots.py",
    "chars": 1089,
    "preview": "# SPDX-FileCopyrightText: 2024 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\nf"
  },
  {
    "path": "tests/test_api.py",
    "chars": 6659,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\ni"
  },
  {
    "path": "tests/test_check_pdf.py",
    "chars": 272,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\nf"
  },
  {
    "path": "tests/test_completion.py",
    "chars": 1078,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\ni"
  },
  {
    "path": "tests/test_concurrency.py",
    "chars": 728,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\ni"
  },
  {
    "path": "tests/test_fpdf_renderer.py",
    "chars": 17747,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Tests for fpdf2-based PDF renderer"
  },
  {
    "path": "tests/test_ghostscript.py",
    "chars": 17706,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\ni"
  },
  {
    "path": "tests/test_graft.py",
    "chars": 5682,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\nf"
  },
  {
    "path": "tests/test_helpers.py",
    "chars": 4489,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\ni"
  },
  {
    "path": "tests/test_hocr_parser.py",
    "chars": 18236,
    "preview": "# SPDX-FileCopyrightText: 2025 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\n\"\"\"Unit tests for HocrParser class.\"\""
  },
  {
    "path": "tests/test_hocrtransform.py",
    "chars": 3566,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\ni"
  },
  {
    "path": "tests/test_image_input.py",
    "chars": 2415,
    "preview": "# SPDX-FileCopyrightText: 2022 James R. Barlow\n# SPDX-License-Identifier: MPL-2.0\n\nfrom __future__ import annotations\n\nf"
  }
]

// ... and 36 more files (download for full content)

About this extraction

This page contains the full source code of the ocrmypdf/OCRmyPDF GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 236 files (1.6 MB), approximately 408.9k tokens, and a symbol index with 1474 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!