BabelDOC 0.4.16__tar.gz → 0.4.18__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.18}/.github/ISSUE_TEMPLATE/bug_report.yaml +7 -1
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/ISSUE_TEMPLATE/feature_request.yaml +10 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/workflows/docs.yml +1 -1
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/workflows/publish-to-pypi.yml +1 -1
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/workflows/test.yml +1 -1
- {babeldoc-0.4.16 → babeldoc-0.4.18}/PKG-INFO +1 -1
- babeldoc-0.4.18/babeldoc/__init__.py +1 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/const.py +1 -1
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/docvision/rpc_doclayout3.py +2 -2
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/frontend/il_creater.py +22 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/high_level.py +26 -9
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/pdfinterp.py +4 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/main.py +1 -1
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/pdfpage.py +4 -1
- {babeldoc-0.4.16 → babeldoc-0.4.18}/pyproject.toml +2 -2
- babeldoc-0.4.16/babeldoc/__init__.py +0 -1
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.cursorignore +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/PULL_REQUEST_TEMPLATE/pr_form.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/dependabot.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/labels.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/release-drafter.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/workflows/codeql.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/workflows/labeler.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/workflows/lint.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.github/workflows/pr-lint.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.gitignore +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/.pre-commit-config.yaml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/LICENSE +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/README.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/assets/assets.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/assets/embedding_assets_metadata.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/asynchronize/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/babeldoc_exception/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/docvision/base_doclayout.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/docvision/doclayout.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/docvision/rpc_doclayout.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/docvision/rpc_doclayout2.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/docvision/rpc_doclayout4.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/docvision/table_detection/rapidocr.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/babelpdf/base14.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/babelpdf/encoding.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/converter.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/backend/pdf_creater.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/il_version_1.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/il_version_1.rnc +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/il_version_1.rng +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/il_version_1.xsd +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/add_debug_information.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/automatic_term_extractor.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/il_translator.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/layout_parser.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/remove_descent.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/table_parser.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/typesetting.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/utils/formular_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/utils/layout_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/utils/paragraph_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/utils/style_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/utils/zstd_helper.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/xml_converter.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/result_merger.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/split_manager.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/translation_config.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/glossary.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/LICENSE +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/_saslprep.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/arcfour.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/ascii85.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/casting.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/ccitt.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/78-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/78-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/78-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/78-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/78-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/78-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/78ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/78ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/83pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/83pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/90ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/90ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/90msp-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/90msp-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/90pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/90pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Add-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Add-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Add-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Add-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/B5pc-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/B5pc-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/CNS-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/CNS-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/CNS1-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/CNS1-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/CNS2-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/CNS2-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/ETHK-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/ETHK-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/ETen-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/ETen-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/ETenms-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/ETenms-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Ext-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Ext-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Ext-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Ext-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GB-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GB-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GB-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GB-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBK-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBK-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBK2K-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBK2K-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBKp-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBKp-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBT-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBT-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBT-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBT-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBTpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBTpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/GBpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKdla-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKdla-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKdlb-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKdlb-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKgccs-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKgccs-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKm314-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKm314-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKm471-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKm471-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKscs-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/HKscs-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Hankaku-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Hankaku-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Hiragana-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Hiragana-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSC-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSC-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSC-Johab-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSC-Johab-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSCms-UHC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSCms-UHC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSCpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/KSCpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Katakana-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Katakana-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/NWP-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/NWP-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/README.txt +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Roman-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/Roman-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniCNS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniCNS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniCNS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniCNS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniCNS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniCNS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniCNS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniCNS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniGB-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniGB-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniGB-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniGB-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniGB-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniGB-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniGB-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniGB-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniKS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniKS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniKS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniKS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniKS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniKS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniKS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/UniKS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/WP-Symbol-H.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/WP-Symbol-V.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/to-unicode-Adobe-CNS1.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/to-unicode-Adobe-GB1.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Japan1.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Korea1.pickle.gz +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/cmapdb.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/converter.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/data_structures.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/encodingdb.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/fontmetrics.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/glyphlist.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/high_level.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/image.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/jbig2.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/latin_enc.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/layout.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/lzw.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/pdfcolor.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/pdfdevice.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/pdfdocument.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/pdfexceptions.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/pdffont.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/pdfinterp.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/pdfparser.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/pdftypes.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/psexceptions.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/psparser.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/py.typed +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/runlength.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/settings.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/pdfminer/utils.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/progress_monitor.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/tools/generate_font_metadata.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/tools/italic_assistance.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/tools/italic_recognize_tool.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/translator/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/translator/cache.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/translator/translator.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/utils/__init__.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/utils/atomic_integer.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/utils/priority_thread_pool_executor.py +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/CODE_OF_CONDUCT.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/CONTRIBUTING.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/CONTRIBUTOR_REWARD.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/ImplementationDetails/README.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/README.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/deploy.sh +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/example/demo_glossary.csv +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/images/babeldoc-banner.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/images/babeldoc-big-logo.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/images/babeldoc-contributor_reward_example.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/images/babeldoc-preview.gif +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/images/babeldoc-small-logo.png +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/index.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/intro-to-pdf-object.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/requirements.txt +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/docs/supported_languages.md +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/mkdocs.yml +0 -0
- {babeldoc-0.4.16 → babeldoc-0.4.18}/tests/test_translation_config.py +0 -0
|
@@ -17,6 +17,12 @@ 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
|
|
24
|
+
- label: I confirm that the latest version of BabelDOC is being used.
|
|
25
|
+
required: true
|
|
20
26
|
|
|
21
27
|
- type: markdown
|
|
22
28
|
attributes:
|
|
@@ -77,7 +83,7 @@ body:
|
|
|
77
83
|
id: pdf
|
|
78
84
|
attributes:
|
|
79
85
|
label: Original PDF File
|
|
80
|
-
description: Upload the input PDF if applicable.
|
|
86
|
+
description: Upload the input PDF if applicable. (Issues related to specific PDFs but without uploaded files will be closed directly.)
|
|
81
87
|
validations:
|
|
82
88
|
required: false
|
|
83
89
|
|
|
@@ -7,6 +7,16 @@ body:
|
|
|
7
7
|
value: |
|
|
8
8
|
Thank you for helping improve **BabelDOC**! Please fill out the form below to suggest a feature.
|
|
9
9
|
|
|
10
|
+
- type: checkboxes
|
|
11
|
+
id: checks
|
|
12
|
+
attributes:
|
|
13
|
+
label: Before you submit
|
|
14
|
+
options:
|
|
15
|
+
- label: I have searched existing issues
|
|
16
|
+
required: true
|
|
17
|
+
- label: I have fully read and understood the [README](https://github.com/funstory-ai/BabelDOC/blob/main/README.md)
|
|
18
|
+
required: true
|
|
19
|
+
|
|
10
20
|
- type: textarea
|
|
11
21
|
id: describe
|
|
12
22
|
attributes:
|
|
@@ -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@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
|
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@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
|
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@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
|
32
32
|
with:
|
|
33
33
|
python-version: ${{ matrix.python-version }}
|
|
34
34
|
enable-cache: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.18"
|
|
@@ -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
|
|
@@ -88,6 +88,15 @@ resfont_map = {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
|
|
91
|
+
def safe_save(doc, *args, **kwargs):
|
|
92
|
+
try:
|
|
93
|
+
# first try, saving without options
|
|
94
|
+
doc.save(*args, **kwargs)
|
|
95
|
+
except Exception:
|
|
96
|
+
# second try, saving with 'garbage=3' for object missing
|
|
97
|
+
doc.ez_save(*args, **kwargs)
|
|
98
|
+
|
|
99
|
+
|
|
91
100
|
def fix_cmap(translate_result: TranslateResult, translate_config: TranslationConfig):
|
|
92
101
|
processed = []
|
|
93
102
|
for attr in (
|
|
@@ -104,7 +113,7 @@ def fix_cmap(translate_result: TranslateResult, translate_config: TranslationCon
|
|
|
104
113
|
temp_path = translate_config.get_working_file_path(f"{path.stem}.cmap.pdf")
|
|
105
114
|
pdf = pymupdf.open(path)
|
|
106
115
|
reproduce_cmap(pdf)
|
|
107
|
-
pdf
|
|
116
|
+
safe_save(pdf, temp_path)
|
|
108
117
|
shutil.move(temp_path, path)
|
|
109
118
|
|
|
110
119
|
|
|
@@ -563,7 +572,7 @@ def do_translate(
|
|
|
563
572
|
from_page=split_point.start_page,
|
|
564
573
|
to_page=split_point.end_page,
|
|
565
574
|
)
|
|
566
|
-
temp_doc
|
|
575
|
+
safe_save(temp_doc, part_temp_input_path)
|
|
567
576
|
assert (
|
|
568
577
|
temp_doc.page_count
|
|
569
578
|
== split_point.end_page - split_point.start_page + 1
|
|
@@ -695,6 +704,7 @@ def migrate_toc(
|
|
|
695
704
|
)
|
|
696
705
|
|
|
697
706
|
|
|
707
|
+
# mediabox -> '[0 nul 792]'
|
|
698
708
|
def fix_media_box(doc: Document) -> None:
|
|
699
709
|
mediabox_data = {}
|
|
700
710
|
for x in range(1, doc.xref_length()):
|
|
@@ -703,9 +713,16 @@ def fix_media_box(doc: Document) -> None:
|
|
|
703
713
|
if t[1] in ["/Pages", "/Page"]:
|
|
704
714
|
mediabox = doc.xref_get_key(x, "MediaBox")
|
|
705
715
|
if mediabox[0] == "array":
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
716
|
+
try:
|
|
717
|
+
_, _, x1, y1 = (
|
|
718
|
+
mediabox[1].replace("[", "").replace("]", "").split(" ")
|
|
719
|
+
)
|
|
720
|
+
doc.xref_set_key(x, "MediaBox", f"[0 0 {x1} {y1}]")
|
|
721
|
+
box_set["MediaBox"] = mediabox[1]
|
|
722
|
+
except Exception:
|
|
723
|
+
logger.warning(
|
|
724
|
+
"Attempt to fix media box failed; some pages may not have been processed correctly."
|
|
725
|
+
)
|
|
709
726
|
for k in ["CropBox", "BleedBox", "TrimBox", "ArtBox"]:
|
|
710
727
|
box = doc.xref_get_key(x, k)
|
|
711
728
|
if box[0] != "null":
|
|
@@ -754,13 +771,13 @@ def _do_translate_single(
|
|
|
754
771
|
fix_null_xref(doc_input)
|
|
755
772
|
except Exception:
|
|
756
773
|
logger.exception("auto fix failed, please check the pdf file")
|
|
757
|
-
doc_input
|
|
774
|
+
safe_save(doc_input, output_path, expand=True, pretty=True)
|
|
758
775
|
del doc_input
|
|
759
776
|
|
|
760
777
|
# Continue with original processing
|
|
761
778
|
temp_pdf_path = translation_config.get_working_file_path("input.pdf")
|
|
762
779
|
doc_pdf2zh = Document(original_pdf_path)
|
|
763
|
-
|
|
780
|
+
safe_save(doc_pdf2zh, temp_pdf_path)
|
|
764
781
|
|
|
765
782
|
# Fix null xref in PDF file
|
|
766
783
|
invalid_pages = []
|
|
@@ -777,7 +794,7 @@ def _do_translate_single(
|
|
|
777
794
|
# page.insert_font(resfont, None)
|
|
778
795
|
|
|
779
796
|
resfont = None
|
|
780
|
-
doc_pdf2zh
|
|
797
|
+
safe_save(doc_pdf2zh, temp_pdf_path)
|
|
781
798
|
|
|
782
799
|
# if not translation_config.skip_scanned_detection and DetectScannedFile(
|
|
783
800
|
# translation_config
|
|
@@ -978,7 +995,7 @@ def generate_first_page_with_watermark(
|
|
|
978
995
|
watermarked_temp_pdf_path = watermarked_config.get_working_file_path(
|
|
979
996
|
"watermarked_temp_input.pdf"
|
|
980
997
|
)
|
|
981
|
-
first_page_doc
|
|
998
|
+
safe_save(first_page_doc, watermarked_temp_pdf_path)
|
|
982
999
|
|
|
983
1000
|
Typesetting(watermarked_config).typsetting_document(il_only_first_page_doc)
|
|
984
1001
|
pdf_creater = PDFCreater(
|
|
@@ -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.18"
|
|
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.18"
|
|
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
|
{babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/add_debug_information.py
RENAMED
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py
RENAMED
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.18}/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.18}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py
RENAMED
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.18}/babeldoc/format/pdf/document_il/midend/remove_descent.py
RENAMED
|
File without changes
|
{babeldoc-0.4.16 → babeldoc-0.4.18}/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.18}/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.18}/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
|