BabelDOC 0.6.3__tar.gz → 0.6.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {babeldoc-0.6.3 → babeldoc-0.6.4}/PKG-INFO +1 -1
- babeldoc-0.6.4/babeldoc/__init__.py +1 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/const.py +1 -1
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/doclayout.py +25 -10
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/rpc_doclayout.py +28 -10
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/rpc_doclayout6.py +135 -103
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/rpc_doclayout8.py +32 -28
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py +10 -12
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/typesetting.py +11 -1
- babeldoc-0.6.4/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +77 -0
- babeldoc-0.6.4/babeldoc/format/pdf/document_il/utils/raster_geometry.py +256 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/_cmap_manifest_data.py +2 -1
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/cmap_secure_loader.py +1 -1
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/main.py +10 -1
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/image.py +1 -1
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/translator/translator.py +6 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/release-notes/v0.6.3.md +11 -7
- babeldoc-0.6.4/docs/release-notes/v0.6.4.md +34 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/pyproject.toml +3 -2
- babeldoc-0.6.3/babeldoc/__init__.py +0 -1
- babeldoc-0.6.3/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -42
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/PULL_REQUEST_TEMPLATE/pr_form.yml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/dependabot.yml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/labels.yml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/release-drafter.yml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/workflows/checks.yml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/workflows/codeql.yml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/workflows/docs.yml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/workflows/labeler.yml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/workflows/lint.yml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/workflows/pr-lint.yml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.github/workflows/publish-to-pypi.yml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.gitignore +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/.pre-commit-config.yaml +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/LICENSE +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/README.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/assets/assets.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/assets/embedding_assets_metadata.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/asynchronize/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/babeldoc_exception/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/base_doclayout.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/rpc_doclayout2.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/rpc_doclayout3.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/rpc_doclayout4.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/rpc_doclayout5.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/rpc_doclayout7.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/docvision/table_detection/rapidocr.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/awlt_char.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/babelpdf/base14.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/babelpdf/cidfont.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/babelpdf/cmap.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/babelpdf/encoding.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/babelpdf/type3.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/babelpdf/utils.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/babelpdf/win_core.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/converter.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/backend/pdf_creater.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/frontend/il_creater.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/frontend/il_creater_active.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/frontend/il_creater_active_support.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/frontend/inline_image_params.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/il_version_1.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/il_version_1.rnc +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/il_version_1.rng +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/il_version_1.xsd +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/add_debug_information.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/automatic_term_extractor.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/il_translator.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/layout_parser.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/remove_descent.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/midend/table_parser.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/utils/extract_char.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/utils/formular_helper.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/utils/layout_helper.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/utils/matrix_helper.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/utils/paragraph_helper.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/utils/spatial_analyzer.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/utils/style_helper.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/utils/type3_font_metrics.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/utils/zstd_helper.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/document_il/xml_converter.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/high_level.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/legacy_parse.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/active_direct_font_backend.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/active_font_backend.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/active_font_resource_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/active_font_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/active_object_backend.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/active_object_projection.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/active_parse_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/active_value_access.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/base_operations.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/bridge_types.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/compat/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/font_spec_primitives.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/font_types.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/glyphs.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/interpreter.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/native_page_execution_session.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/native_page_interpreter.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/native_parse.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/object_model.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/object_parser.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/page_api.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/page_content_access.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/page_content_execution.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/page_execution_session.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/page_interpreter.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/pdf_token_serializer.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/prepared_page.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/prepared_page_access.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/prepared_page_debug_access.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/prepared_page_execution.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/prepared_resource_builder.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/pymupdf_candidate_parse.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/pymupdf_object_access.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/pymupdf_page_execution_session.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/pymupdf_page_view_access.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/pymupdf_prepared_page_access.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/raw_page_view.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/resolved_object_access.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/resource_runtime_types.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/resources.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/cid_cmap_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/cmap_types_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/cmapdb_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/78-EUC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/78-EUC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/78-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/78-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/78-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/78-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/78ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/78ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/83pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/83pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/90ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/90ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/90msp-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/90msp-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/90pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/90pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Add-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Add-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Add-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Add-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/B5-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/B5-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/B5pc-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/B5pc-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/CNS-EUC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/CNS-EUC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/CNS1-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/CNS1-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/CNS2-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/CNS2-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/ETHK-B5-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/ETHK-B5-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/ETen-B5-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/ETen-B5-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/ETenms-B5-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/ETenms-B5-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/EUC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/EUC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Ext-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Ext-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Ext-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Ext-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GB-EUC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GB-EUC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GB-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GB-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBK-EUC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBK-EUC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBK2K-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBK2K-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBKp-EUC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBKp-EUC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBT-EUC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBT-EUC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBT-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBT-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBTpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBTpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/GBpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKdla-B5-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKdla-B5-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKdlb-B5-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKdlb-B5-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKgccs-B5-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKgccs-B5-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKm314-B5-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKm314-B5-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKm471-B5-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKm471-B5-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKscs-B5-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/HKscs-B5-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Hankaku-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Hankaku-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Hiragana-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Hiragana-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSC-EUC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSC-EUC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSC-Johab-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSC-Johab-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSCms-UHC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSCms-UHC-HW-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSCms-UHC-HW-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSCms-UHC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSCpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/KSCpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Katakana-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Katakana-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/NWP-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/NWP-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/README.txt +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Roman-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/Roman-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniCNS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniCNS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniCNS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniCNS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniCNS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniCNS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniCNS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniCNS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniGB-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniGB-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniGB-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniGB-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniGB-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniGB-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniGB-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniGB-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS-UCS2-HW-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS-UCS2-HW-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS2004-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS2004-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS2004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS2004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS2004-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJIS2004-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJISX0213-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJISX0213-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJISX02132004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniJISX02132004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniKS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniKS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniKS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniKS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniKS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniKS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniKS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/UniKS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/WP-Symbol-H.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/WP-Symbol-V.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/to-unicode-Adobe-CNS1.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/to-unicode-Adobe-GB1.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/to-unicode-Adobe-Japan1.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/cmap/to-unicode-Adobe-Korea1.pickle.gz +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/fontmetrics.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/glyphlist.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/data/latin_enc.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/exceptions_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/font_data_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/font_encoding_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/font_unicode_maps.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/font_widths.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/object_primitives_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/object_stream_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/ps_primitives_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/runtime_settings.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/runtime/to_unicode_parser_runtime.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/sinks/legacy_ir.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/sinks/native_text.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/state.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/text_positioning.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/tokenizer.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/new_parser/xobject_content_execution.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/parse_only.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/parse_shared.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/pdfinterp.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/result_merger.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/split_manager.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/format/pdf/translation_config.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/glossary.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/LICENSE +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/_saslprep.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/arcfour.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/ascii85.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/casting.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/ccitt.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/cmapdb.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/converter.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/data_structures.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/encodingdb.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/fontmetrics.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/glyphlist.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/high_level.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/jbig2.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/latin_enc.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/layout.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/lzw.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/pdfcolor.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/pdfdevice.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/pdfdocument.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/pdfexceptions.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/pdffont.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/pdfinterp.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/pdfpage.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/pdfparser.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/pdftypes.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/psexceptions.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/psparser.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/py.typed +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/runlength.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/settings.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/pdfminer/utils.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/progress_monitor.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/executor/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/executor/__main__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/executor/babeldoc_adapter.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/executor/protocol.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/executor/runner.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/executor/server.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/executor/state.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/executor/translator.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/executor/watermark_transform.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/executor/workroot.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/generate_cmap_metadata.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/generate_font_metadata.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/italic_assistance.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/tools/italic_recognize_tool.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/translator/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/translator/cache.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/utils/__init__.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/utils/atomic_integer.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/utils/memory.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/babeldoc/utils/priority_thread_pool_executor.py +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/CODE_OF_CONDUCT.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/CONTRIBUTING.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/CONTRIBUTOR_REWARD.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/ImplementationDetails/README.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/README.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/deploy.sh +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/example/demo_glossary.csv +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/images/babeldoc-banner.png +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/images/babeldoc-big-logo.png +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/images/babeldoc-contributor_reward_example.png +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/images/babeldoc-preview.gif +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/images/babeldoc-small-logo.png +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/index.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/intro-to-pdf-object.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/release-notes/v0.6.0.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/release-notes/v0.6.1.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/release-notes/v0.6.2.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/requirements.txt +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/docs/supported_languages.md +0 -0
- {babeldoc-0.6.3 → babeldoc-0.6.4}/mkdocs.yml +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.4"
|
|
@@ -10,7 +10,8 @@ import numpy as np
|
|
|
10
10
|
|
|
11
11
|
from babeldoc.docvision.base_doclayout import DocLayoutModel
|
|
12
12
|
from babeldoc.docvision.base_doclayout import YoloResult
|
|
13
|
-
from babeldoc.format.pdf.document_il.utils.
|
|
13
|
+
from babeldoc.format.pdf.document_il.utils.raster_geometry import RasterGeometry
|
|
14
|
+
from babeldoc.format.pdf.document_il.utils.raster_geometry import with_target_long_edge
|
|
14
15
|
|
|
15
16
|
try:
|
|
16
17
|
import onnx
|
|
@@ -178,7 +179,14 @@ class OnnxModel(DocLayoutModel):
|
|
|
178
179
|
boxes[..., :4] = (boxes[..., :4] - [pad_x, pad_y, pad_x, pad_y]) / gain
|
|
179
180
|
return boxes
|
|
180
181
|
|
|
181
|
-
def predict(
|
|
182
|
+
def predict(
|
|
183
|
+
self,
|
|
184
|
+
image,
|
|
185
|
+
imgsz=800,
|
|
186
|
+
batch_size=16,
|
|
187
|
+
geometry: RasterGeometry | None = None,
|
|
188
|
+
**kwargs,
|
|
189
|
+
):
|
|
182
190
|
"""
|
|
183
191
|
Predict the layout of document pages.
|
|
184
192
|
|
|
@@ -237,6 +245,13 @@ class OnnxModel(DocLayoutModel):
|
|
|
237
245
|
preds[..., :4],
|
|
238
246
|
orig_shapes[j],
|
|
239
247
|
)
|
|
248
|
+
if geometry is not None:
|
|
249
|
+
preds[..., [0, 2]] = geometry.px_len_to_pt(
|
|
250
|
+
preds[..., [0, 2]], "x"
|
|
251
|
+
)
|
|
252
|
+
preds[..., [1, 3]] = geometry.px_len_to_pt(
|
|
253
|
+
preds[..., [1, 3]], "y"
|
|
254
|
+
)
|
|
240
255
|
results.append(YoloResult(boxes_data=preds, names=self._names))
|
|
241
256
|
|
|
242
257
|
return results
|
|
@@ -253,14 +268,14 @@ class OnnxModel(DocLayoutModel):
|
|
|
253
268
|
for page in pages:
|
|
254
269
|
translate_config.raise_if_cancelled()
|
|
255
270
|
with self.lock:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
predict_result = self.predict(image)[0]
|
|
271
|
+
geometry = with_target_long_edge(
|
|
272
|
+
mupdf_doc[page.page_number],
|
|
273
|
+
72,
|
|
274
|
+
self._FIXED_IMGSZ,
|
|
275
|
+
normalize_rotation=True,
|
|
276
|
+
)
|
|
277
|
+
image = geometry.image[:, :, ::-1]
|
|
278
|
+
predict_result = self.predict(image, geometry=geometry)[0]
|
|
264
279
|
save_debug_image(
|
|
265
280
|
image,
|
|
266
281
|
predict_result,
|
|
@@ -17,7 +17,8 @@ import babeldoc
|
|
|
17
17
|
from babeldoc.docvision.base_doclayout import DocLayoutModel
|
|
18
18
|
from babeldoc.docvision.base_doclayout import YoloBox
|
|
19
19
|
from babeldoc.docvision.base_doclayout import YoloResult
|
|
20
|
-
from babeldoc.format.pdf.document_il.utils.
|
|
20
|
+
from babeldoc.format.pdf.document_il.utils.raster_geometry import RasterGeometry
|
|
21
|
+
from babeldoc.format.pdf.document_il.utils.raster_geometry import with_target_long_edge
|
|
21
22
|
|
|
22
23
|
logger = logging.getLogger(__name__)
|
|
23
24
|
|
|
@@ -209,6 +210,7 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
209
210
|
host: str = None,
|
|
210
211
|
result_container: ResultContainer | None = None,
|
|
211
212
|
imgsz: int = 1024,
|
|
213
|
+
geometry: RasterGeometry | None = None,
|
|
212
214
|
) -> ResultContainer:
|
|
213
215
|
"""Predict the layout of document pages using RPC service."""
|
|
214
216
|
if result_container is None:
|
|
@@ -232,6 +234,10 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
232
234
|
)
|
|
233
235
|
for x in pred["boxes"]
|
|
234
236
|
]
|
|
237
|
+
if geometry is not None:
|
|
238
|
+
for box in boxes:
|
|
239
|
+
box.xyxy[[0, 2]] = geometry.px_len_to_pt(box.xyxy[[0, 2]], "x")
|
|
240
|
+
box.xyxy[[1, 3]] = geometry.px_len_to_pt(box.xyxy[[1, 3]], "y")
|
|
235
241
|
result_container.result = YoloResult(
|
|
236
242
|
boxes=boxes,
|
|
237
243
|
names={int(k): v for k, v in pred["names"].items()},
|
|
@@ -244,11 +250,17 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
244
250
|
if isinstance(image, np.ndarray) and len(image.shape) == 3:
|
|
245
251
|
image = [image]
|
|
246
252
|
|
|
253
|
+
geometry = kwargs.get("geometry")
|
|
247
254
|
result_containers = [ResultContainer() for _ in image]
|
|
248
255
|
predict_thread = ThreadPoolExecutor(max_workers=len(image))
|
|
249
256
|
for img, result_container in zip(image, result_containers, strict=True):
|
|
250
257
|
predict_thread.submit(
|
|
251
|
-
self.predict_image,
|
|
258
|
+
self.predict_image,
|
|
259
|
+
img,
|
|
260
|
+
self.host,
|
|
261
|
+
result_container,
|
|
262
|
+
800,
|
|
263
|
+
geometry,
|
|
252
264
|
)
|
|
253
265
|
predict_thread.shutdown(wait=True)
|
|
254
266
|
result = [result_container.result for result_container in result_containers]
|
|
@@ -259,14 +271,20 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
259
271
|
):
|
|
260
272
|
translate_config.raise_if_cancelled()
|
|
261
273
|
with self.lock:
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
predict_result = self.predict_image(
|
|
274
|
+
geometry = with_target_long_edge(
|
|
275
|
+
mupdf_doc[page.page_number],
|
|
276
|
+
72,
|
|
277
|
+
800,
|
|
278
|
+
normalize_rotation=True,
|
|
279
|
+
)
|
|
280
|
+
image = geometry.image[:, :, ::-1]
|
|
281
|
+
predict_result = self.predict_image(
|
|
282
|
+
image,
|
|
283
|
+
self.host,
|
|
284
|
+
None,
|
|
285
|
+
800,
|
|
286
|
+
geometry,
|
|
287
|
+
)
|
|
270
288
|
save_debug_image(image, predict_result, page.page_number + 1)
|
|
271
289
|
return page, predict_result
|
|
272
290
|
|
|
@@ -4,7 +4,9 @@ import logging
|
|
|
4
4
|
import threading
|
|
5
5
|
import unicodedata
|
|
6
6
|
from concurrent.futures import ThreadPoolExecutor
|
|
7
|
+
from dataclasses import dataclass
|
|
7
8
|
from pathlib import Path
|
|
9
|
+
from typing import Any
|
|
8
10
|
|
|
9
11
|
import cv2
|
|
10
12
|
import httpx
|
|
@@ -29,8 +31,10 @@ from babeldoc.format.pdf.document_il.utils.extract_char import (
|
|
|
29
31
|
from babeldoc.format.pdf.document_il.utils.fontmap import FontMapper
|
|
30
32
|
from babeldoc.format.pdf.document_il.utils.layout_helper import SPACE_REGEX
|
|
31
33
|
from babeldoc.format.pdf.document_il.utils.mupdf_helper import (
|
|
32
|
-
|
|
34
|
+
get_no_rotation_raster_geometry_multiprocess,
|
|
33
35
|
)
|
|
36
|
+
from babeldoc.format.pdf.document_il.utils.raster_geometry import DEFAULT_MAX_PIXELS
|
|
37
|
+
from babeldoc.format.pdf.document_il.utils.raster_geometry import RasterGeometry
|
|
34
38
|
|
|
35
39
|
logger = logging.getLogger(__name__)
|
|
36
40
|
DPI = 150
|
|
@@ -84,12 +88,18 @@ def predict_layout(
|
|
|
84
88
|
_imgsz: int = 1024,
|
|
85
89
|
lines=None,
|
|
86
90
|
font_mapper: FontMapper | None = None,
|
|
91
|
+
*,
|
|
92
|
+
geometry: RasterGeometry | None = None,
|
|
87
93
|
):
|
|
88
94
|
"""Predict document layout using OCR line information (RPC service)."""
|
|
89
95
|
|
|
90
96
|
if lines is None:
|
|
91
97
|
lines = []
|
|
92
98
|
|
|
99
|
+
if lines and geometry is None:
|
|
100
|
+
raise ValueError("geometry is required when service1 OCR lines are supplied")
|
|
101
|
+
if geometry is not None:
|
|
102
|
+
image = geometry.image
|
|
93
103
|
image_data = encode_image(image)
|
|
94
104
|
|
|
95
105
|
def convert_line(line):
|
|
@@ -101,13 +111,18 @@ def predict_layout(
|
|
|
101
111
|
min_y = min(b.y for b in boxes)
|
|
102
112
|
max_y = max(b.y2 for b in boxes)
|
|
103
113
|
|
|
104
|
-
|
|
114
|
+
if geometry is None:
|
|
115
|
+
raise ValueError(
|
|
116
|
+
"geometry is required when service1 OCR lines are supplied"
|
|
117
|
+
)
|
|
118
|
+
image_width = geometry.pixel_width
|
|
119
|
+
image_height = geometry.pixel_height
|
|
105
120
|
|
|
106
121
|
# Transform to image pixel coordinates
|
|
107
|
-
min_x = min_x
|
|
108
|
-
max_x = max_x
|
|
109
|
-
min_y = min_y
|
|
110
|
-
max_y = max_y
|
|
122
|
+
min_x = geometry.pt_len_to_px(min_x, "x")
|
|
123
|
+
max_x = geometry.pt_len_to_px(max_x, "x")
|
|
124
|
+
min_y = geometry.pt_len_to_px(min_y, "y")
|
|
125
|
+
max_y = geometry.pt_len_to_px(max_y, "y")
|
|
111
126
|
|
|
112
127
|
min_y, max_y = image_height - max_y, image_height - min_y
|
|
113
128
|
|
|
@@ -136,7 +151,9 @@ def predict_layout(
|
|
|
136
151
|
request_data = {
|
|
137
152
|
"image": image_b64,
|
|
138
153
|
"ocr_results": formatted_results,
|
|
139
|
-
"image_size":
|
|
154
|
+
"image_size": [geometry.pixel_width, geometry.pixel_height]
|
|
155
|
+
if geometry is not None
|
|
156
|
+
else [image.shape[1], image.shape[0]],
|
|
140
157
|
}
|
|
141
158
|
|
|
142
159
|
response = httpx.post(
|
|
@@ -200,6 +217,8 @@ def predict_layout2(
|
|
|
200
217
|
image,
|
|
201
218
|
host: str = "http://localhost:8000",
|
|
202
219
|
_imgsz: int = 1024,
|
|
220
|
+
*,
|
|
221
|
+
geometry: RasterGeometry | None = None,
|
|
203
222
|
):
|
|
204
223
|
"""
|
|
205
224
|
Predict document layout using the MOSEC service
|
|
@@ -214,7 +233,9 @@ def predict_layout2(
|
|
|
214
233
|
"""
|
|
215
234
|
# Prepare request data
|
|
216
235
|
|
|
217
|
-
if not
|
|
236
|
+
if geometry is not None:
|
|
237
|
+
image = [geometry.image]
|
|
238
|
+
elif not isinstance(image, list):
|
|
218
239
|
image = [image]
|
|
219
240
|
image_data = [encode_image(image) for image in image]
|
|
220
241
|
data = {
|
|
@@ -286,6 +307,76 @@ class ResultContainer:
|
|
|
286
307
|
self.result = YoloResult(boxes_data=np.array([]), names=[])
|
|
287
308
|
|
|
288
309
|
|
|
310
|
+
@dataclass(frozen=True)
|
|
311
|
+
class _PageInput:
|
|
312
|
+
page: Any
|
|
313
|
+
geometry: RasterGeometry
|
|
314
|
+
lines: list[Any]
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
def _legacy_synthetic_geometry(image: np.ndarray) -> RasterGeometry:
|
|
318
|
+
"""Build the legacy image-only coordinate mapping without PDF rendering."""
|
|
319
|
+
|
|
320
|
+
height, width = image.shape[:2]
|
|
321
|
+
return RasterGeometry(
|
|
322
|
+
image=image,
|
|
323
|
+
requested_dpi=DPI,
|
|
324
|
+
render_dpi=DPI,
|
|
325
|
+
pixel_width=width,
|
|
326
|
+
pixel_height=height,
|
|
327
|
+
page_width_pt=width * 72 / DPI,
|
|
328
|
+
page_height_pt=height * 72 / DPI,
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
def _raster_box_to_page_points(
|
|
333
|
+
box: list[float] | np.ndarray,
|
|
334
|
+
geometry: RasterGeometry,
|
|
335
|
+
) -> np.ndarray:
|
|
336
|
+
"""Convert an uploaded-raster xyxy box to PDF point/top-left coordinates."""
|
|
337
|
+
|
|
338
|
+
return np.array(
|
|
339
|
+
[
|
|
340
|
+
geometry.px_len_to_pt(float(box[0]), "x"),
|
|
341
|
+
geometry.px_len_to_pt(float(box[1]), "y"),
|
|
342
|
+
geometry.px_len_to_pt(float(box[2]), "x"),
|
|
343
|
+
geometry.px_len_to_pt(float(box[3]), "y"),
|
|
344
|
+
]
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
def _project_result_to_raster(
|
|
349
|
+
result: YoloResult,
|
|
350
|
+
geometry: RasterGeometry,
|
|
351
|
+
) -> YoloResult:
|
|
352
|
+
"""Copy point-space boxes into pixel space for the debug callback only."""
|
|
353
|
+
|
|
354
|
+
boxes = [
|
|
355
|
+
YoloBox(
|
|
356
|
+
None,
|
|
357
|
+
_raster_box_from_page_points(box.xyxy, geometry),
|
|
358
|
+
box.conf,
|
|
359
|
+
box.cls,
|
|
360
|
+
)
|
|
361
|
+
for box in result.boxes
|
|
362
|
+
]
|
|
363
|
+
return YoloResult(boxes=boxes, names=result.names)
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
def _raster_box_from_page_points(
|
|
367
|
+
box: list[float] | np.ndarray,
|
|
368
|
+
geometry: RasterGeometry,
|
|
369
|
+
) -> np.ndarray:
|
|
370
|
+
return np.array(
|
|
371
|
+
[
|
|
372
|
+
geometry.pt_len_to_px(float(box[0]), "x"),
|
|
373
|
+
geometry.pt_len_to_px(float(box[1]), "y"),
|
|
374
|
+
geometry.pt_len_to_px(float(box[2]), "x"),
|
|
375
|
+
geometry.pt_len_to_px(float(box[3]), "y"),
|
|
376
|
+
]
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
|
|
289
380
|
def filter_text(txt: str, font_mapper: FontMapper):
|
|
290
381
|
normalize = unicodedata.normalize("NFKC", txt)
|
|
291
382
|
unicodes = []
|
|
@@ -329,73 +420,6 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
329
420
|
"""Stride of the model input."""
|
|
330
421
|
return self._stride
|
|
331
422
|
|
|
332
|
-
def resize_and_pad_image(self, image, new_shape):
|
|
333
|
-
"""
|
|
334
|
-
Resize and pad the image to the specified size,
|
|
335
|
-
ensuring dimensions are multiples of stride.
|
|
336
|
-
|
|
337
|
-
Parameters:
|
|
338
|
-
- image: Input image
|
|
339
|
-
- new_shape: Target size (integer or (height, width) tuple)
|
|
340
|
-
- stride: Padding alignment stride, default 32
|
|
341
|
-
|
|
342
|
-
Returns:
|
|
343
|
-
- Processed image
|
|
344
|
-
"""
|
|
345
|
-
if isinstance(new_shape, int):
|
|
346
|
-
new_shape = (new_shape, new_shape)
|
|
347
|
-
|
|
348
|
-
h, w = image.shape[:2]
|
|
349
|
-
new_h, new_w = new_shape
|
|
350
|
-
|
|
351
|
-
# Calculate scaling ratio
|
|
352
|
-
r = min(new_h / h, new_w / w)
|
|
353
|
-
resized_h, resized_w = int(round(h * r)), int(round(w * r))
|
|
354
|
-
|
|
355
|
-
# Resize image
|
|
356
|
-
image = cv2.resize(
|
|
357
|
-
image, (resized_w, resized_h), interpolation=cv2.INTER_LINEAR
|
|
358
|
-
)
|
|
359
|
-
|
|
360
|
-
# Calculate padding size
|
|
361
|
-
pad_h = new_h - resized_h
|
|
362
|
-
pad_w = new_w - resized_w
|
|
363
|
-
top, bottom = pad_h // 2, pad_h - pad_h // 2
|
|
364
|
-
left, right = pad_w // 2, pad_w - pad_w // 2
|
|
365
|
-
|
|
366
|
-
# Add padding
|
|
367
|
-
image = cv2.copyMakeBorder(
|
|
368
|
-
image, top, bottom, left, right, cv2.BORDER_CONSTANT, value=(114, 114, 114)
|
|
369
|
-
)
|
|
370
|
-
|
|
371
|
-
return image
|
|
372
|
-
|
|
373
|
-
def scale_boxes(self, img1_shape, boxes, img0_shape):
|
|
374
|
-
"""
|
|
375
|
-
Rescales bounding boxes (in the format of xyxy by default) from the shape of the image they were originally
|
|
376
|
-
specified in (img1_shape) to the shape of a different image (img0_shape).
|
|
377
|
-
|
|
378
|
-
Args:
|
|
379
|
-
img1_shape (tuple): The shape of the image that the bounding boxes are for,
|
|
380
|
-
in the format of (height, width).
|
|
381
|
-
boxes (torch.Tensor): the bounding boxes of the objects in the image, in the format of (x1, y1, x2, y2)
|
|
382
|
-
img0_shape (tuple): the shape of the target image, in the format of (height, width).
|
|
383
|
-
|
|
384
|
-
Returns:
|
|
385
|
-
boxes (torch.Tensor): The scaled bounding boxes, in the format of (x1, y1, x2, y2)
|
|
386
|
-
"""
|
|
387
|
-
|
|
388
|
-
# Calculate scaling ratio
|
|
389
|
-
gain = min(img1_shape[0] / img0_shape[0], img1_shape[1] / img0_shape[1])
|
|
390
|
-
|
|
391
|
-
# Calculate padding size
|
|
392
|
-
pad_x = round((img1_shape[1] - img0_shape[1] * gain) / 2 - 0.1)
|
|
393
|
-
pad_y = round((img1_shape[0] - img0_shape[0] * gain) / 2 - 0.1)
|
|
394
|
-
|
|
395
|
-
# Remove padding and scale boxes
|
|
396
|
-
boxes = (boxes - [pad_x, pad_y, pad_x, pad_y]) / gain
|
|
397
|
-
return boxes
|
|
398
|
-
|
|
399
423
|
def calculate_iou(self, box1, box2):
|
|
400
424
|
"""Calculate IoU between two boxes in xyxy format."""
|
|
401
425
|
x1_1, y1_1, x2_1, y2_1 = box1
|
|
@@ -479,16 +503,14 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
479
503
|
image,
|
|
480
504
|
imgsz: int = 1024,
|
|
481
505
|
lines=None,
|
|
506
|
+
*,
|
|
507
|
+
geometry: RasterGeometry | None = None,
|
|
482
508
|
) -> YoloResult:
|
|
483
509
|
"""Predict the layout of a single page and fuse results from two RPC services."""
|
|
484
510
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
if image.shape[0] != target_imgsz[0] or image.shape[1] != target_imgsz[1]:
|
|
489
|
-
image_proc = self.resize_and_pad_image(image, new_shape=target_imgsz)
|
|
490
|
-
else:
|
|
491
|
-
image_proc = image
|
|
511
|
+
if geometry is None:
|
|
512
|
+
geometry = _legacy_synthetic_geometry(image)
|
|
513
|
+
image_proc = geometry.image
|
|
492
514
|
|
|
493
515
|
# Parallel calls to both services; exceptions propagate if either fails
|
|
494
516
|
with ThreadPoolExecutor(max_workers=2) as ex:
|
|
@@ -500,8 +522,15 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
500
522
|
imgsz,
|
|
501
523
|
lines,
|
|
502
524
|
self.font_mapper,
|
|
525
|
+
geometry=geometry,
|
|
503
526
|
)
|
|
504
|
-
future2 = ex.submit(
|
|
527
|
+
future2 = ex.submit(
|
|
528
|
+
predict_layout2,
|
|
529
|
+
image_proc,
|
|
530
|
+
self.host2,
|
|
531
|
+
imgsz,
|
|
532
|
+
geometry=geometry,
|
|
533
|
+
)
|
|
505
534
|
|
|
506
535
|
# .result() will re-raise any exception occurred in worker thread.
|
|
507
536
|
if lines:
|
|
@@ -510,19 +539,13 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
510
539
|
preds1 = None
|
|
511
540
|
preds2 = future2.result()
|
|
512
541
|
|
|
513
|
-
# Convert DPI to PDF points (72 dpi)
|
|
514
|
-
pdf_h, pdf_w = orig_h / DPI * 72, orig_w / DPI * 72
|
|
515
|
-
|
|
516
542
|
merged_boxes: list[YoloBox] = []
|
|
517
543
|
names: dict[int, str] = {}
|
|
518
544
|
|
|
519
545
|
def _process_preds(preds, id_offset: int, label_suffix: str | None):
|
|
520
546
|
for pred in preds or []:
|
|
521
547
|
for box in pred["boxes"]:
|
|
522
|
-
|
|
523
|
-
scaled_xyxy = self.scale_boxes(
|
|
524
|
-
target_imgsz, np.array(box["xyxy"]), (pdf_h, pdf_w)
|
|
525
|
-
)
|
|
548
|
+
scaled_xyxy = _raster_box_to_page_points(box["xyxy"], geometry)
|
|
526
549
|
|
|
527
550
|
new_cls_id = box["cls"] + id_offset
|
|
528
551
|
|
|
@@ -558,7 +581,11 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
558
581
|
return YoloResult(boxes=merged_boxes, names=names)
|
|
559
582
|
|
|
560
583
|
def predict(self, image, imgsz=1024, **kwargs) -> list[YoloResult]: # type: ignore[override]
|
|
561
|
-
"""Predict
|
|
584
|
+
"""Predict images using a legacy synthetic geometry.
|
|
585
|
+
|
|
586
|
+
This image-only path does not render a PDF page and is therefore not
|
|
587
|
+
protected by the PDF page pixel budget.
|
|
588
|
+
"""
|
|
562
589
|
|
|
563
590
|
# Normalize to list
|
|
564
591
|
if isinstance(image, np.ndarray) and len(image.shape) == 3:
|
|
@@ -573,21 +600,26 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
573
600
|
|
|
574
601
|
def predict_page(self, page, pdf_bytes: Path, translate_config, save_debug_image):
|
|
575
602
|
translate_config.raise_if_cancelled()
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
603
|
+
geometry = get_no_rotation_raster_geometry_multiprocess(
|
|
604
|
+
pdf_bytes.as_posix(),
|
|
605
|
+
page.page_number,
|
|
606
|
+
requested_dpi=DPI,
|
|
607
|
+
max_pixels=DEFAULT_MAX_PIXELS,
|
|
581
608
|
)
|
|
582
|
-
# image = np.frombuffer(pix.samples, np.uint8).reshape(
|
|
583
|
-
# pix.height,
|
|
584
|
-
# pix.width,
|
|
585
|
-
# 3,
|
|
586
|
-
# )[:, :, ::-1]
|
|
587
609
|
char_boxes = convert_page_to_char_boxes(page)
|
|
588
610
|
lines = process_page_chars_to_lines(char_boxes)
|
|
589
|
-
|
|
590
|
-
|
|
611
|
+
page_input = _PageInput(page, geometry, lines)
|
|
612
|
+
predict_result = self.predict_image(
|
|
613
|
+
page_input.geometry.image,
|
|
614
|
+
800,
|
|
615
|
+
page_input.lines,
|
|
616
|
+
geometry=page_input.geometry,
|
|
617
|
+
)
|
|
618
|
+
save_debug_image(
|
|
619
|
+
page_input.geometry.image,
|
|
620
|
+
_project_result_to_raster(predict_result, page_input.geometry),
|
|
621
|
+
page.page_number + 1,
|
|
622
|
+
)
|
|
591
623
|
return page, predict_result
|
|
592
624
|
|
|
593
625
|
def handle_document( # type: ignore[override]
|
|
@@ -26,7 +26,8 @@ from babeldoc.format.pdf.document_il.utils.extract_char import (
|
|
|
26
26
|
)
|
|
27
27
|
from babeldoc.format.pdf.document_il.utils.fontmap import FontMapper
|
|
28
28
|
from babeldoc.format.pdf.document_il.utils.layout_helper import SPACE_REGEX
|
|
29
|
-
from babeldoc.format.pdf.document_il.utils.
|
|
29
|
+
from babeldoc.format.pdf.document_il.utils.raster_geometry import RasterGeometry
|
|
30
|
+
from babeldoc.format.pdf.document_il.utils.raster_geometry import with_pixel_budget
|
|
30
31
|
|
|
31
32
|
DPI = 150
|
|
32
33
|
LAYOUT_ERROR = "layout 解析失败"
|
|
@@ -87,6 +88,7 @@ class _PageInput:
|
|
|
87
88
|
page: il_version_1.Page
|
|
88
89
|
image: np.ndarray
|
|
89
90
|
image_data: bytes
|
|
91
|
+
geometry: RasterGeometry
|
|
90
92
|
line_results: list[dict[str, Any]] | None
|
|
91
93
|
|
|
92
94
|
|
|
@@ -199,23 +201,22 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
199
201
|
if self.requires_line_extraction
|
|
200
202
|
else None
|
|
201
203
|
)
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
3,
|
|
204
|
+
geometry = with_pixel_budget(
|
|
205
|
+
mupdf_doc[page.page_number],
|
|
206
|
+
DPI,
|
|
207
|
+
normalize_rotation=True,
|
|
207
208
|
)
|
|
209
|
+
image = geometry.image
|
|
208
210
|
image_data = _encode_image(image)
|
|
209
211
|
line_results = (
|
|
210
212
|
self._convert_line_results(
|
|
211
213
|
line_future.result(),
|
|
212
|
-
|
|
213
|
-
image.shape[0],
|
|
214
|
+
geometry,
|
|
214
215
|
)
|
|
215
216
|
if line_future is not None
|
|
216
217
|
else None
|
|
217
218
|
)
|
|
218
|
-
return _PageInput(index, page, image, image_data, line_results)
|
|
219
|
+
return _PageInput(index, page, image, image_data, geometry, line_results)
|
|
219
220
|
|
|
220
221
|
def _extract_raw_lines(self, page: il_version_1.Page):
|
|
221
222
|
if self.font_mapper is None:
|
|
@@ -227,12 +228,11 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
227
228
|
def _convert_line_results(
|
|
228
229
|
self,
|
|
229
230
|
lines,
|
|
230
|
-
|
|
231
|
-
image_height: int,
|
|
231
|
+
geometry: RasterGeometry,
|
|
232
232
|
) -> list[dict[str, Any]]:
|
|
233
233
|
results = []
|
|
234
234
|
for line in lines:
|
|
235
|
-
converted = self._convert_line(line,
|
|
235
|
+
converted = self._convert_line(line, geometry)
|
|
236
236
|
if converted is not None:
|
|
237
237
|
results.append(converted)
|
|
238
238
|
return results
|
|
@@ -240,8 +240,7 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
240
240
|
def _convert_line(
|
|
241
241
|
self,
|
|
242
242
|
line,
|
|
243
|
-
|
|
244
|
-
image_height: int,
|
|
243
|
+
geometry: RasterGeometry,
|
|
245
244
|
) -> dict[str, Any] | None:
|
|
246
245
|
if not line.text or self.font_mapper is None:
|
|
247
246
|
return None
|
|
@@ -251,10 +250,12 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
251
250
|
min_y = min(box.y for box in boxes)
|
|
252
251
|
max_y = max(box.y2 for box in boxes)
|
|
253
252
|
|
|
254
|
-
min_x = min_x
|
|
255
|
-
max_x = max_x
|
|
256
|
-
min_y = min_y
|
|
257
|
-
max_y = max_y
|
|
253
|
+
min_x = geometry.pt_len_to_px(min_x, "x")
|
|
254
|
+
max_x = geometry.pt_len_to_px(max_x, "x")
|
|
255
|
+
min_y = geometry.pt_len_to_px(min_y, "y")
|
|
256
|
+
max_y = geometry.pt_len_to_px(max_y, "y")
|
|
257
|
+
image_width = geometry.pixel_width
|
|
258
|
+
image_height = geometry.pixel_height
|
|
258
259
|
min_y, max_y = image_height - max_y, image_height - min_y
|
|
259
260
|
|
|
260
261
|
box_volume = (max_x - min_x) * (max_y - min_y)
|
|
@@ -284,7 +285,7 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
284
285
|
request_body: dict[str, Any] = {
|
|
285
286
|
"schema_version": 1,
|
|
286
287
|
"page_number": page_input.page.page_number,
|
|
287
|
-
"dpi":
|
|
288
|
+
"dpi": page_input.geometry.render_dpi,
|
|
288
289
|
"image": base64.b64encode(page_input.image_data).decode("utf-8"),
|
|
289
290
|
"image_size": [page_input.image.shape[1], page_input.image.shape[0]],
|
|
290
291
|
}
|
|
@@ -305,11 +306,7 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
305
306
|
if response.status_code < 200 or response.status_code >= 300:
|
|
306
307
|
raise RuntimeError(LAYOUT_ERROR)
|
|
307
308
|
payload = response.json()
|
|
308
|
-
yolo_result = self._parse_response(
|
|
309
|
-
payload,
|
|
310
|
-
page_input.image.shape[1],
|
|
311
|
-
page_input.image.shape[0],
|
|
312
|
-
)
|
|
309
|
+
yolo_result = self._parse_response(payload, page_input.geometry)
|
|
313
310
|
return page_input.page, yolo_result
|
|
314
311
|
except Exception as exc:
|
|
315
312
|
raise RuntimeError(LAYOUT_ERROR) from exc
|
|
@@ -317,8 +314,8 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
317
314
|
def _parse_response(
|
|
318
315
|
self,
|
|
319
316
|
payload: Any,
|
|
320
|
-
|
|
321
|
-
_image_height: int,
|
|
317
|
+
geometry: RasterGeometry | int,
|
|
318
|
+
_image_height: int | None = None,
|
|
322
319
|
) -> YoloResult:
|
|
323
320
|
if not isinstance(payload, dict) or payload.get("schema_version") != 1:
|
|
324
321
|
raise RuntimeError(LAYOUT_ERROR)
|
|
@@ -328,7 +325,6 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
328
325
|
|
|
329
326
|
names: dict[int, str] = {}
|
|
330
327
|
boxes: list[YoloBox] = []
|
|
331
|
-
scale = 72 / DPI
|
|
332
328
|
for item in boxes_payload:
|
|
333
329
|
if not isinstance(item, dict):
|
|
334
330
|
raise RuntimeError(LAYOUT_ERROR)
|
|
@@ -344,7 +340,15 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
344
340
|
or len(box) != 4
|
|
345
341
|
):
|
|
346
342
|
raise RuntimeError(LAYOUT_ERROR)
|
|
347
|
-
|
|
343
|
+
if isinstance(geometry, RasterGeometry):
|
|
344
|
+
coords = [
|
|
345
|
+
geometry.px_len_to_pt(float(value), "x" if index % 2 == 0 else "y")
|
|
346
|
+
for index, value in enumerate(box)
|
|
347
|
+
]
|
|
348
|
+
else:
|
|
349
|
+
# Keep the narrow legacy direct-call compatibility used by
|
|
350
|
+
# old callers/tests; all request-path calls pass RasterGeometry.
|
|
351
|
+
coords = [float(value) * 72 / DPI for value in box]
|
|
348
352
|
names[class_id] = label
|
|
349
353
|
boxes.append(
|
|
350
354
|
YoloBox(
|