BabelDOC 0.4.16__tar.gz → 0.4.17__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.4.16 → babeldoc-0.4.17}/.github/ISSUE_TEMPLATE/bug_report.yaml +5 -1
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/workflows/docs.yml +1 -1
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/workflows/publish-to-pypi.yml +1 -1
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/workflows/test.yml +1 -1
- {babeldoc-0.4.16 → babeldoc-0.4.17}/PKG-INFO +1 -1
- babeldoc-0.4.17/babeldoc/__init__.py +1 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/const.py +1 -1
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/docvision/rpc_doclayout3.py +2 -2
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/frontend/il_creater.py +22 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/high_level.py +17 -4
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/pdfinterp.py +4 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/main.py +1 -1
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/pdfpage.py +4 -1
- {babeldoc-0.4.16 → babeldoc-0.4.17}/pyproject.toml +2 -2
- babeldoc-0.4.16/babeldoc/__init__.py +0 -1
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.cursorignore +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/PULL_REQUEST_TEMPLATE/pr_form.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/dependabot.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/labels.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/release-drafter.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/workflows/codeql.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/workflows/labeler.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/workflows/lint.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.github/workflows/pr-lint.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.gitignore +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/.pre-commit-config.yaml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/LICENSE +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/README.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/assets/assets.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/assets/embedding_assets_metadata.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/asynchronize/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/babeldoc_exception/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/docvision/base_doclayout.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/docvision/doclayout.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/docvision/rpc_doclayout.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/docvision/rpc_doclayout2.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/docvision/rpc_doclayout4.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/docvision/table_detection/rapidocr.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/babelpdf/base14.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/babelpdf/encoding.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/converter.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/backend/pdf_creater.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/il_version_1.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/il_version_1.rnc +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/il_version_1.rng +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/il_version_1.xsd +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/add_debug_information.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/automatic_term_extractor.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/il_translator.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/layout_parser.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/remove_descent.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/table_parser.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/typesetting.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/utils/formular_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/utils/layout_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/utils/paragraph_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/utils/style_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/utils/zstd_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/xml_converter.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/result_merger.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/split_manager.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/translation_config.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/glossary.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/LICENSE +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/_saslprep.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/arcfour.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/ascii85.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/casting.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/ccitt.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/78-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/78-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/78-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/78-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/78-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/78-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/78ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/78ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/83pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/83pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/90ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/90ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/90msp-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/90msp-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/90pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/90pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Add-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Add-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Add-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Add-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/B5pc-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/B5pc-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/CNS-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/CNS-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/CNS1-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/CNS1-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/CNS2-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/CNS2-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/ETHK-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/ETHK-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/ETen-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/ETen-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/ETenms-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/ETenms-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Ext-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Ext-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Ext-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Ext-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GB-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GB-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GB-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GB-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBK-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBK-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBK2K-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBK2K-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBKp-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBKp-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBT-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBT-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBT-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBT-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBTpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBTpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/GBpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKdla-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKdla-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKdlb-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKdlb-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKgccs-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKgccs-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKm314-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKm314-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKm471-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKm471-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKscs-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/HKscs-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Hankaku-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Hankaku-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Hiragana-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Hiragana-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSC-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSC-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSC-Johab-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSC-Johab-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSCms-UHC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSCms-UHC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSCpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/KSCpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Katakana-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Katakana-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/NWP-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/NWP-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/README.txt +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Roman-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/Roman-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniCNS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniCNS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniCNS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniCNS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniCNS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniCNS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniCNS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniCNS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniGB-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniGB-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniGB-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniGB-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniGB-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniGB-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniGB-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniGB-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniKS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniKS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniKS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniKS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniKS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniKS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniKS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/UniKS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/WP-Symbol-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/WP-Symbol-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/to-unicode-Adobe-CNS1.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/to-unicode-Adobe-GB1.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Japan1.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Korea1.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/cmapdb.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/converter.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/data_structures.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/encodingdb.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/fontmetrics.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/glyphlist.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/high_level.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/image.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/jbig2.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/latin_enc.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/layout.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/lzw.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/pdfcolor.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/pdfdevice.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/pdfdocument.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/pdfexceptions.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/pdffont.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/pdfinterp.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/pdfparser.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/pdftypes.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/psexceptions.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/psparser.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/py.typed +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/runlength.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/settings.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/pdfminer/utils.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/progress_monitor.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/tools/generate_font_metadata.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/tools/italic_assistance.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/tools/italic_recognize_tool.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/translator/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/translator/cache.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/translator/translator.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/utils/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/utils/atomic_integer.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/utils/priority_thread_pool_executor.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/CODE_OF_CONDUCT.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/CONTRIBUTING.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/CONTRIBUTOR_REWARD.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/ImplementationDetails/README.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/README.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/deploy.sh +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/example/demo_glossary.csv +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/images/babeldoc-banner.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/images/babeldoc-big-logo.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/images/babeldoc-contributor_reward_example.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/images/babeldoc-preview.gif +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/images/babeldoc-small-logo.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/index.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/intro-to-pdf-object.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/requirements.txt +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/docs/supported_languages.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/mkdocs.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.17}/tests/test_translation_config.py +0 -0
|
@@ -17,6 +17,10 @@ body:
|
|
|
17
17
|
required: true
|
|
18
18
|
- label: I am certain that this issue is with BabelDOC itself and can be reproduced through the BabelDOC cli
|
|
19
19
|
required: true
|
|
20
|
+
- label: I have uploaded the original file, or confirmed that this issue is unrelated to the original file
|
|
21
|
+
required: true
|
|
22
|
+
- label: I have uploaded the log.
|
|
23
|
+
required: true
|
|
20
24
|
|
|
21
25
|
- type: markdown
|
|
22
26
|
attributes:
|
|
@@ -77,7 +81,7 @@ body:
|
|
|
77
81
|
id: pdf
|
|
78
82
|
attributes:
|
|
79
83
|
label: Original PDF File
|
|
80
|
-
description: Upload the input PDF if applicable.
|
|
84
|
+
description: Upload the input PDF if applicable. (Issues related to specific PDFs but without uploaded files will be closed directly.)
|
|
81
85
|
validations:
|
|
82
86
|
required: false
|
|
83
87
|
|
|
@@ -17,7 +17,7 @@ jobs:
|
|
|
17
17
|
git config user.name github-actions[bot]
|
|
18
18
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
19
19
|
- name: Setup uv with Python 3.12
|
|
20
|
-
uses: astral-sh/setup-uv@
|
|
20
|
+
uses: astral-sh/setup-uv@7edac99f961f18b581bbd960d59d049f04c0002f # v6.4.1
|
|
21
21
|
with:
|
|
22
22
|
python-version: "3.12"
|
|
23
23
|
enable-cache: true
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
36
36
|
|
|
37
37
|
- name: Setup uv with Python 3.12
|
|
38
|
-
uses: astral-sh/setup-uv@
|
|
38
|
+
uses: astral-sh/setup-uv@7edac99f961f18b581bbd960d59d049f04c0002f # v6.4.1
|
|
39
39
|
with:
|
|
40
40
|
python-version: "3.12"
|
|
41
41
|
enable-cache: true
|
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
path: ~/.cache/babeldoc
|
|
29
29
|
key: babeldoc-assets-${{ hashFiles('babeldoc/assets/embedding_assets_metadata.py') }}
|
|
30
30
|
- name: Setup uv with Python ${{ matrix.python-version }}
|
|
31
|
-
uses: astral-sh/setup-uv@
|
|
31
|
+
uses: astral-sh/setup-uv@7edac99f961f18b581bbd960d59d049f04c0002f # v6.4.1
|
|
32
32
|
with:
|
|
33
33
|
python-version: ${{ matrix.python-version }}
|
|
34
34
|
enable-cache: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.17"
|
|
@@ -82,12 +82,12 @@ def predict_layout(
|
|
|
82
82
|
# Send request
|
|
83
83
|
# logger.debug(f"Sending request to {host}/inference")
|
|
84
84
|
response = httpx.post(
|
|
85
|
-
f"{host}/analyze?min_sim=0.7&early_stop=0.99&timeout=
|
|
85
|
+
f"{host}/analyze?min_sim=0.7&early_stop=0.99&timeout=1800",
|
|
86
86
|
files={"file": ("image.jpg", image_data, "image/jpeg")},
|
|
87
87
|
headers={
|
|
88
88
|
"Accept": "application/json",
|
|
89
89
|
},
|
|
90
|
-
timeout=
|
|
90
|
+
timeout=1800,
|
|
91
91
|
follow_redirects=True,
|
|
92
92
|
)
|
|
93
93
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import base64
|
|
2
2
|
import functools
|
|
3
3
|
import logging
|
|
4
|
+
import math
|
|
4
5
|
import re
|
|
5
6
|
from io import BytesIO
|
|
6
7
|
from itertools import islice
|
|
@@ -221,6 +222,18 @@ pattern = "^[" + "".join(unicode_spaces) + "]+$"
|
|
|
221
222
|
space_regex = re.compile(pattern)
|
|
222
223
|
|
|
223
224
|
|
|
225
|
+
def get_rotation_angle(matrix):
|
|
226
|
+
"""
|
|
227
|
+
根据PDF的字符矩阵计算旋转角度(单位:度)
|
|
228
|
+
matrix: tuple/list, 格式 (a, b, c, d, e, f)
|
|
229
|
+
"""
|
|
230
|
+
a, b, c, d, e, f = matrix
|
|
231
|
+
# 旋转角度:arctan2(b, a)
|
|
232
|
+
angle_rad = math.atan2(b, a)
|
|
233
|
+
angle_deg = math.degrees(angle_rad)
|
|
234
|
+
return angle_deg
|
|
235
|
+
|
|
236
|
+
|
|
224
237
|
class ILCreater:
|
|
225
238
|
stage_name = "Parse PDF and Create Intermediate Representation"
|
|
226
239
|
|
|
@@ -582,6 +595,15 @@ class ILCreater:
|
|
|
582
595
|
def on_lt_char(self, char: LTChar):
|
|
583
596
|
if char.aw_font_id is None:
|
|
584
597
|
return
|
|
598
|
+
try:
|
|
599
|
+
rotation_angle = get_rotation_angle(char.matrix)
|
|
600
|
+
if not (-0.1 <= rotation_angle <= 0.1 or 89.9 <= rotation_angle <= 90.1):
|
|
601
|
+
return
|
|
602
|
+
except Exception:
|
|
603
|
+
logger.warning(
|
|
604
|
+
"Failed to get rotation angle for char %s",
|
|
605
|
+
char.get_text(),
|
|
606
|
+
)
|
|
585
607
|
gs = self.create_graphic_state(char.graphicstate)
|
|
586
608
|
# Get font from current page or xobject
|
|
587
609
|
font = None
|
|
@@ -695,6 +695,7 @@ def migrate_toc(
|
|
|
695
695
|
)
|
|
696
696
|
|
|
697
697
|
|
|
698
|
+
# mediabox -> '[0 nul 792]'
|
|
698
699
|
def fix_media_box(doc: Document) -> None:
|
|
699
700
|
mediabox_data = {}
|
|
700
701
|
for x in range(1, doc.xref_length()):
|
|
@@ -703,9 +704,16 @@ def fix_media_box(doc: Document) -> None:
|
|
|
703
704
|
if t[1] in ["/Pages", "/Page"]:
|
|
704
705
|
mediabox = doc.xref_get_key(x, "MediaBox")
|
|
705
706
|
if mediabox[0] == "array":
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
707
|
+
try:
|
|
708
|
+
_, _, x1, y1 = (
|
|
709
|
+
mediabox[1].replace("[", "").replace("]", "").split(" ")
|
|
710
|
+
)
|
|
711
|
+
doc.xref_set_key(x, "MediaBox", f"[0 0 {x1} {y1}]")
|
|
712
|
+
box_set["MediaBox"] = mediabox[1]
|
|
713
|
+
except Exception:
|
|
714
|
+
logger.warning(
|
|
715
|
+
"Attempt to fix media box failed; some pages may not have been processed correctly."
|
|
716
|
+
)
|
|
709
717
|
for k in ["CropBox", "BleedBox", "TrimBox", "ArtBox"]:
|
|
710
718
|
box = doc.xref_get_key(x, k)
|
|
711
719
|
if box[0] != "null":
|
|
@@ -760,7 +768,12 @@ def _do_translate_single(
|
|
|
760
768
|
# Continue with original processing
|
|
761
769
|
temp_pdf_path = translation_config.get_working_file_path("input.pdf")
|
|
762
770
|
doc_pdf2zh = Document(original_pdf_path)
|
|
763
|
-
|
|
771
|
+
try:
|
|
772
|
+
# first try, saving without options
|
|
773
|
+
doc_pdf2zh.save(temp_pdf_path)
|
|
774
|
+
except Exception:
|
|
775
|
+
# second try, saving with 'garbage=3' for object missing
|
|
776
|
+
doc_pdf2zh.ez_save(temp_pdf_path)
|
|
764
777
|
|
|
765
778
|
# Fix null xref in PDF file
|
|
766
779
|
invalid_pages = []
|
|
@@ -283,6 +283,8 @@ class PDFPageInterpreterEx(PDFPageInterpreter):
|
|
|
283
283
|
self.il_creater.on_passthrough_per_char("sc", args)
|
|
284
284
|
return args
|
|
285
285
|
|
|
286
|
+
# Ensure bbox has four numbers, otherwise determine it as an illegal image
|
|
287
|
+
# For example, some Form's bbox is '[ null -.00487 1.00412 .99393 ]'
|
|
286
288
|
def do_Do(self, xobjid_arg: PDFStackT) -> None:
|
|
287
289
|
# 重载设置 xobj 的 obj_patch
|
|
288
290
|
"""Invoke named XObject"""
|
|
@@ -303,6 +305,8 @@ class PDFPageInterpreterEx(PDFPageInterpreter):
|
|
|
303
305
|
bbox = list(
|
|
304
306
|
filter(lambda x: x is not None, cast(Rect, list_value(xobj["BBox"])))
|
|
305
307
|
)
|
|
308
|
+
if len(bbox) < 4:
|
|
309
|
+
return
|
|
306
310
|
|
|
307
311
|
matrix = cast(Matrix, list_value(xobj.get("Matrix", MATRIX_IDENTITY)))
|
|
308
312
|
# According to PDF reference 1.7 section 4.9.1, XObjects in
|
|
@@ -80,7 +80,10 @@ class PDFPage:
|
|
|
80
80
|
log.exception(f"try to fix mediabox failed: {attrs}")
|
|
81
81
|
|
|
82
82
|
self.mediabox = self._parse_mediabox(self.attrs.get("MediaBox"))
|
|
83
|
-
|
|
83
|
+
try:
|
|
84
|
+
self.cropbox = self._parse_cropbox(self.attrs.get("CropBox"), self.mediabox)
|
|
85
|
+
except Exception:
|
|
86
|
+
self.cropbox = self.mediabox
|
|
84
87
|
self.contents = self._parse_contents(self.attrs.get("Contents"))
|
|
85
88
|
|
|
86
89
|
self.rotate = (int_value(self.attrs.get("Rotate", 0)) + 360) % 360
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "BabelDOC"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.17"
|
|
4
4
|
description = "Yet Another Document Translator"
|
|
5
5
|
license = "AGPL-3.0"
|
|
6
6
|
readme = "README.md"
|
|
@@ -161,7 +161,7 @@ pythonpath = [".", "src"]
|
|
|
161
161
|
testpaths = ["tests"]
|
|
162
162
|
|
|
163
163
|
[bumpver]
|
|
164
|
-
current_version = "0.4.
|
|
164
|
+
current_version = "0.4.17"
|
|
165
165
|
version_pattern = "MAJOR.MINOR.PATCH[.PYTAGNUM]"
|
|
166
166
|
|
|
167
167
|
[bumpver.file_patterns]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.4.16"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/add_debug_information.py
RENAMED
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py
RENAMED
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py
RENAMED
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py
RENAMED
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/remove_descent.py
RENAMED
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/utils/formular_helper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.17}/babeldoc/format/pdf/document_il/utils/paragraph_helper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|