BabelDOC 0.4.18__tar.gz → 0.4.20__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.
Files changed (305) hide show
  1. {babeldoc-0.4.18 → babeldoc-0.4.20}/PKG-INFO +1 -1
  2. babeldoc-0.4.20/babeldoc/__init__.py +1 -0
  3. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/const.py +1 -1
  4. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/babelpdf/encoding.py +260 -0
  5. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/backend/pdf_creater.py +3 -1
  6. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/frontend/il_creater.py +38 -5
  7. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/il_version_1.py +22 -22
  8. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/automatic_term_extractor.py +6 -2
  9. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/il_translator.py +58 -22
  10. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py +302 -3
  11. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/layout_parser.py +4 -1
  12. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py +58 -14
  13. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py +6 -8
  14. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/layout_helper.py +14 -20
  15. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/main.py +1 -1
  16. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdffont.py +5 -1
  17. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/translator/cache.py +65 -12
  18. {babeldoc-0.4.18 → babeldoc-0.4.20}/pyproject.toml +2 -2
  19. babeldoc-0.4.20/tests/test_translation_cache_cleanup.py +68 -0
  20. babeldoc-0.4.18/babeldoc/__init__.py +0 -1
  21. babeldoc-0.4.18/tests/test_translation_config.py +0 -23
  22. {babeldoc-0.4.18 → babeldoc-0.4.20}/.cursorignore +0 -0
  23. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
  24. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
  25. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/PULL_REQUEST_TEMPLATE/pr_form.yml +0 -0
  26. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  27. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/dependabot.yml +0 -0
  28. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/labels.yml +0 -0
  29. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/release-drafter.yml +0 -0
  30. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/codeql.yml +0 -0
  31. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/docs.yml +0 -0
  32. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/labeler.yml +0 -0
  33. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/lint.yml +0 -0
  34. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/pr-lint.yml +0 -0
  35. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/publish-to-pypi.yml +0 -0
  36. {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/test.yml +0 -0
  37. {babeldoc-0.4.18 → babeldoc-0.4.20}/.gitignore +0 -0
  38. {babeldoc-0.4.18 → babeldoc-0.4.20}/.pre-commit-config.yaml +0 -0
  39. {babeldoc-0.4.18 → babeldoc-0.4.20}/LICENSE +0 -0
  40. {babeldoc-0.4.18 → babeldoc-0.4.20}/README.md +0 -0
  41. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/assets/assets.py +0 -0
  42. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/assets/embedding_assets_metadata.py +0 -0
  43. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/asynchronize/__init__.py +0 -0
  44. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
  45. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/babeldoc_exception/__init__.py +0 -0
  46. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/README.md +0 -0
  47. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/__init__.py +0 -0
  48. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/base_doclayout.py +0 -0
  49. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/doclayout.py +0 -0
  50. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/rpc_doclayout.py +0 -0
  51. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/rpc_doclayout2.py +0 -0
  52. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/rpc_doclayout3.py +0 -0
  53. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/rpc_doclayout4.py +0 -0
  54. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/table_detection/rapidocr.py +0 -0
  55. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/__init__.py +0 -0
  56. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/__init__.py +0 -0
  57. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/babelpdf/base14.py +0 -0
  58. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/converter.py +0 -0
  59. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/__init__.py +0 -0
  60. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
  61. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
  62. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/il_version_1.rnc +0 -0
  63. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/il_version_1.rng +0 -0
  64. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/il_version_1.xsd +0 -0
  65. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
  66. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/add_debug_information.py +0 -0
  67. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py +0 -0
  68. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/remove_descent.py +0 -0
  69. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/table_parser.py +0 -0
  70. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/typesetting.py +0 -0
  71. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
  72. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
  73. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/formular_helper.py +0 -0
  74. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -0
  75. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/paragraph_helper.py +0 -0
  76. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/style_helper.py +0 -0
  77. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/zstd_helper.py +0 -0
  78. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/xml_converter.py +0 -0
  79. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/high_level.py +0 -0
  80. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/pdfinterp.py +0 -0
  81. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/result_merger.py +0 -0
  82. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/split_manager.py +0 -0
  83. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/translation_config.py +0 -0
  84. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/glossary.py +0 -0
  85. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/LICENSE +0 -0
  86. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/__init__.py +0 -0
  87. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/_saslprep.py +0 -0
  88. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/arcfour.py +0 -0
  89. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/ascii85.py +0 -0
  90. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/casting.py +0 -0
  91. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/ccitt.py +0 -0
  92. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-EUC-H.pickle.gz +0 -0
  93. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-EUC-V.pickle.gz +0 -0
  94. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-H.pickle.gz +0 -0
  95. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-RKSJ-H.pickle.gz +0 -0
  96. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-RKSJ-V.pickle.gz +0 -0
  97. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-V.pickle.gz +0 -0
  98. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78ms-RKSJ-H.pickle.gz +0 -0
  99. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78ms-RKSJ-V.pickle.gz +0 -0
  100. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/83pv-RKSJ-H.pickle.gz +0 -0
  101. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/83pv-RKSJ-V.pickle.gz +0 -0
  102. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90ms-RKSJ-H.pickle.gz +0 -0
  103. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90ms-RKSJ-V.pickle.gz +0 -0
  104. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90msp-RKSJ-H.pickle.gz +0 -0
  105. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90msp-RKSJ-V.pickle.gz +0 -0
  106. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90pv-RKSJ-H.pickle.gz +0 -0
  107. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90pv-RKSJ-V.pickle.gz +0 -0
  108. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Add-H.pickle.gz +0 -0
  109. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Add-RKSJ-H.pickle.gz +0 -0
  110. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Add-RKSJ-V.pickle.gz +0 -0
  111. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Add-V.pickle.gz +0 -0
  112. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/B5-H.pickle.gz +0 -0
  113. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/B5-V.pickle.gz +0 -0
  114. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/B5pc-H.pickle.gz +0 -0
  115. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/B5pc-V.pickle.gz +0 -0
  116. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS-EUC-H.pickle.gz +0 -0
  117. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS-EUC-V.pickle.gz +0 -0
  118. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS1-H.pickle.gz +0 -0
  119. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS1-V.pickle.gz +0 -0
  120. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS2-H.pickle.gz +0 -0
  121. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS2-V.pickle.gz +0 -0
  122. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETHK-B5-H.pickle.gz +0 -0
  123. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETHK-B5-V.pickle.gz +0 -0
  124. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETen-B5-H.pickle.gz +0 -0
  125. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETen-B5-V.pickle.gz +0 -0
  126. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETenms-B5-H.pickle.gz +0 -0
  127. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETenms-B5-V.pickle.gz +0 -0
  128. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/EUC-H.pickle.gz +0 -0
  129. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/EUC-V.pickle.gz +0 -0
  130. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Ext-H.pickle.gz +0 -0
  131. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Ext-RKSJ-H.pickle.gz +0 -0
  132. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Ext-RKSJ-V.pickle.gz +0 -0
  133. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Ext-V.pickle.gz +0 -0
  134. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GB-EUC-H.pickle.gz +0 -0
  135. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GB-EUC-V.pickle.gz +0 -0
  136. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GB-H.pickle.gz +0 -0
  137. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GB-V.pickle.gz +0 -0
  138. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBK-EUC-H.pickle.gz +0 -0
  139. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBK-EUC-V.pickle.gz +0 -0
  140. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBK2K-H.pickle.gz +0 -0
  141. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBK2K-V.pickle.gz +0 -0
  142. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBKp-EUC-H.pickle.gz +0 -0
  143. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBKp-EUC-V.pickle.gz +0 -0
  144. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBT-EUC-H.pickle.gz +0 -0
  145. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBT-EUC-V.pickle.gz +0 -0
  146. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBT-H.pickle.gz +0 -0
  147. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBT-V.pickle.gz +0 -0
  148. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBTpc-EUC-H.pickle.gz +0 -0
  149. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBTpc-EUC-V.pickle.gz +0 -0
  150. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBpc-EUC-H.pickle.gz +0 -0
  151. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBpc-EUC-V.pickle.gz +0 -0
  152. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/H.pickle.gz +0 -0
  153. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKdla-B5-H.pickle.gz +0 -0
  154. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKdla-B5-V.pickle.gz +0 -0
  155. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKdlb-B5-H.pickle.gz +0 -0
  156. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKdlb-B5-V.pickle.gz +0 -0
  157. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKgccs-B5-H.pickle.gz +0 -0
  158. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKgccs-B5-V.pickle.gz +0 -0
  159. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKm314-B5-H.pickle.gz +0 -0
  160. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKm314-B5-V.pickle.gz +0 -0
  161. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKm471-B5-H.pickle.gz +0 -0
  162. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKm471-B5-V.pickle.gz +0 -0
  163. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKscs-B5-H.pickle.gz +0 -0
  164. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKscs-B5-V.pickle.gz +0 -0
  165. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Hankaku-H.pickle.gz +0 -0
  166. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Hankaku-V.pickle.gz +0 -0
  167. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Hiragana-H.pickle.gz +0 -0
  168. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Hiragana-V.pickle.gz +0 -0
  169. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-EUC-H.pickle.gz +0 -0
  170. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-EUC-V.pickle.gz +0 -0
  171. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-H.pickle.gz +0 -0
  172. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-Johab-H.pickle.gz +0 -0
  173. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-Johab-V.pickle.gz +0 -0
  174. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-V.pickle.gz +0 -0
  175. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCms-UHC-H.pickle.gz +0 -0
  176. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-H.pickle.gz +0 -0
  177. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-V.pickle.gz +0 -0
  178. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCms-UHC-V.pickle.gz +0 -0
  179. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCpc-EUC-H.pickle.gz +0 -0
  180. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCpc-EUC-V.pickle.gz +0 -0
  181. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Katakana-H.pickle.gz +0 -0
  182. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Katakana-V.pickle.gz +0 -0
  183. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/NWP-H.pickle.gz +0 -0
  184. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/NWP-V.pickle.gz +0 -0
  185. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/README.txt +0 -0
  186. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/RKSJ-H.pickle.gz +0 -0
  187. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/RKSJ-V.pickle.gz +0 -0
  188. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Roman-H.pickle.gz +0 -0
  189. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Roman-V.pickle.gz +0 -0
  190. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UCS2-H.pickle.gz +0 -0
  191. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UCS2-V.pickle.gz +0 -0
  192. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF16-H.pickle.gz +0 -0
  193. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF16-V.pickle.gz +0 -0
  194. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF32-H.pickle.gz +0 -0
  195. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF32-V.pickle.gz +0 -0
  196. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF8-H.pickle.gz +0 -0
  197. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF8-V.pickle.gz +0 -0
  198. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UCS2-H.pickle.gz +0 -0
  199. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UCS2-V.pickle.gz +0 -0
  200. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF16-H.pickle.gz +0 -0
  201. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF16-V.pickle.gz +0 -0
  202. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF32-H.pickle.gz +0 -0
  203. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF32-V.pickle.gz +0 -0
  204. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF8-H.pickle.gz +0 -0
  205. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF8-V.pickle.gz +0 -0
  206. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UCS2-H.pickle.gz +0 -0
  207. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-H.pickle.gz +0 -0
  208. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-V.pickle.gz +0 -0
  209. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UCS2-V.pickle.gz +0 -0
  210. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF16-H.pickle.gz +0 -0
  211. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF16-V.pickle.gz +0 -0
  212. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF32-H.pickle.gz +0 -0
  213. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF32-V.pickle.gz +0 -0
  214. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF8-H.pickle.gz +0 -0
  215. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF8-V.pickle.gz +0 -0
  216. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-H.pickle.gz +0 -0
  217. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-V.pickle.gz +0 -0
  218. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-H.pickle.gz +0 -0
  219. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-V.pickle.gz +0 -0
  220. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-H.pickle.gz +0 -0
  221. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-V.pickle.gz +0 -0
  222. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-H.pickle.gz +0 -0
  223. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-V.pickle.gz +0 -0
  224. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-H.pickle.gz +0 -0
  225. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-V.pickle.gz +0 -0
  226. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UCS2-H.pickle.gz +0 -0
  227. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UCS2-V.pickle.gz +0 -0
  228. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF16-H.pickle.gz +0 -0
  229. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF16-V.pickle.gz +0 -0
  230. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF32-H.pickle.gz +0 -0
  231. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF32-V.pickle.gz +0 -0
  232. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF8-H.pickle.gz +0 -0
  233. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF8-V.pickle.gz +0 -0
  234. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/V.pickle.gz +0 -0
  235. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/WP-Symbol-H.pickle.gz +0 -0
  236. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/WP-Symbol-V.pickle.gz +0 -0
  237. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/to-unicode-Adobe-CNS1.pickle.gz +0 -0
  238. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/to-unicode-Adobe-GB1.pickle.gz +0 -0
  239. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Japan1.pickle.gz +0 -0
  240. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Korea1.pickle.gz +0 -0
  241. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmapdb.py +0 -0
  242. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/converter.py +0 -0
  243. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/data_structures.py +0 -0
  244. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/encodingdb.py +0 -0
  245. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/fontmetrics.py +0 -0
  246. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/glyphlist.py +0 -0
  247. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/high_level.py +0 -0
  248. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/image.py +0 -0
  249. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/jbig2.py +0 -0
  250. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/latin_enc.py +0 -0
  251. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/layout.py +0 -0
  252. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/lzw.py +0 -0
  253. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfcolor.py +0 -0
  254. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfdevice.py +0 -0
  255. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfdocument.py +0 -0
  256. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfexceptions.py +0 -0
  257. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfinterp.py +0 -0
  258. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfpage.py +0 -0
  259. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfparser.py +0 -0
  260. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdftypes.py +0 -0
  261. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/psexceptions.py +0 -0
  262. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/psparser.py +0 -0
  263. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/py.typed +0 -0
  264. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/runlength.py +0 -0
  265. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/settings.py +0 -0
  266. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/utils.py +0 -0
  267. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/progress_monitor.py +0 -0
  268. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/tools/generate_font_metadata.py +0 -0
  269. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/tools/italic_assistance.py +0 -0
  270. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/tools/italic_recognize_tool.py +0 -0
  271. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/translator/__init__.py +0 -0
  272. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/translator/translator.py +0 -0
  273. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/utils/__init__.py +0 -0
  274. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/utils/atomic_integer.py +0 -0
  275. {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/utils/priority_thread_pool_executor.py +0 -0
  276. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/CODE_OF_CONDUCT.md +0 -0
  277. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/CONTRIBUTING.md +0 -0
  278. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/CONTRIBUTOR_REWARD.md +0 -0
  279. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
  280. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
  281. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
  282. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
  283. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
  284. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/README.md +0 -0
  285. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
  286. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
  287. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/README.md +0 -0
  288. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/deploy.sh +0 -0
  289. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/example/demo_glossary.csv +0 -0
  290. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-banner.png +0 -0
  291. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
  292. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
  293. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
  294. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
  295. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-big-logo.png +0 -0
  296. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-contributor_reward_example.png +0 -0
  297. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-preview.gif +0 -0
  298. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
  299. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
  300. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-small-logo.png +0 -0
  301. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/index.md +0 -0
  302. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/intro-to-pdf-object.md +0 -0
  303. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/requirements.txt +0 -0
  304. {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/supported_languages.md +0 -0
  305. {babeldoc-0.4.18 → babeldoc-0.4.20}/mkdocs.yml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BabelDOC
3
- Version: 0.4.18
3
+ Version: 0.4.20
4
4
  Summary: Yet Another Document Translator
5
5
  Project-URL: Homepage, https://github.com/funstory-ai/BabelDOC
6
6
  Project-URL: Issues, https://github.com/funstory-ai/BabelDOC/issues
@@ -0,0 +1 @@
1
+ __version__ = "0.4.20"
@@ -3,7 +3,7 @@ import shutil
3
3
  import subprocess
4
4
  from pathlib import Path
5
5
 
6
- __version__ = "0.4.18"
6
+ __version__ = "0.4.20"
7
7
 
8
8
  CACHE_FOLDER = Path.home() / ".cache" / "babeldoc"
9
9
 
@@ -1045,3 +1045,263 @@ def get_type1_encoding(name):
1045
1045
  return win_ansi
1046
1046
  case "MacExpertEncoding":
1047
1047
  return mac_expert
1048
+
1049
+
1050
+ WinAnsiEncoding = [
1051
+ 0,
1052
+ 1,
1053
+ 2,
1054
+ 3,
1055
+ 4,
1056
+ 5,
1057
+ 6,
1058
+ 7,
1059
+ 8,
1060
+ 9,
1061
+ 10,
1062
+ 11,
1063
+ 12,
1064
+ 13,
1065
+ 14,
1066
+ 15,
1067
+ 16,
1068
+ 17,
1069
+ 18,
1070
+ 19,
1071
+ 20,
1072
+ 21,
1073
+ 22,
1074
+ 23,
1075
+ 24,
1076
+ 25,
1077
+ 26,
1078
+ 27,
1079
+ 28,
1080
+ 29,
1081
+ 30,
1082
+ 31,
1083
+ 32,
1084
+ 33,
1085
+ 34,
1086
+ 35,
1087
+ 36,
1088
+ 37,
1089
+ 38,
1090
+ 39,
1091
+ 40,
1092
+ 41,
1093
+ 42,
1094
+ 43,
1095
+ 44,
1096
+ 45,
1097
+ 46,
1098
+ 47,
1099
+ 48,
1100
+ 49,
1101
+ 50,
1102
+ 51,
1103
+ 52,
1104
+ 53,
1105
+ 54,
1106
+ 55,
1107
+ 56,
1108
+ 57,
1109
+ 58,
1110
+ 59,
1111
+ 60,
1112
+ 61,
1113
+ 62,
1114
+ 63,
1115
+ 64,
1116
+ 65,
1117
+ 66,
1118
+ 67,
1119
+ 68,
1120
+ 69,
1121
+ 70,
1122
+ 71,
1123
+ 72,
1124
+ 73,
1125
+ 74,
1126
+ 75,
1127
+ 76,
1128
+ 77,
1129
+ 78,
1130
+ 79,
1131
+ 80,
1132
+ 81,
1133
+ 82,
1134
+ 83,
1135
+ 84,
1136
+ 85,
1137
+ 86,
1138
+ 87,
1139
+ 88,
1140
+ 89,
1141
+ 90,
1142
+ 91,
1143
+ 92,
1144
+ 93,
1145
+ 94,
1146
+ 95,
1147
+ 96,
1148
+ 97,
1149
+ 98,
1150
+ 99,
1151
+ 100,
1152
+ 101,
1153
+ 102,
1154
+ 103,
1155
+ 104,
1156
+ 105,
1157
+ 106,
1158
+ 107,
1159
+ 108,
1160
+ 109,
1161
+ 110,
1162
+ 111,
1163
+ 112,
1164
+ 113,
1165
+ 114,
1166
+ 115,
1167
+ 116,
1168
+ 117,
1169
+ 118,
1170
+ 119,
1171
+ 120,
1172
+ 121,
1173
+ 122,
1174
+ 123,
1175
+ 124,
1176
+ 125,
1177
+ 126,
1178
+ 127,
1179
+ 8364,
1180
+ 0,
1181
+ 8218,
1182
+ 402,
1183
+ 8222,
1184
+ 8230,
1185
+ 8224,
1186
+ 8225,
1187
+ 710,
1188
+ 8240,
1189
+ 352,
1190
+ 8249,
1191
+ 338,
1192
+ 0,
1193
+ 381,
1194
+ 0,
1195
+ 0,
1196
+ 8216,
1197
+ 8217,
1198
+ 8220,
1199
+ 8221,
1200
+ 8226,
1201
+ 8211,
1202
+ 8212,
1203
+ 732,
1204
+ 8482,
1205
+ 353,
1206
+ 8250,
1207
+ 339,
1208
+ 0,
1209
+ 382,
1210
+ 376,
1211
+ 160,
1212
+ 161,
1213
+ 162,
1214
+ 163,
1215
+ 164,
1216
+ 165,
1217
+ 166,
1218
+ 167,
1219
+ 168,
1220
+ 169,
1221
+ 170,
1222
+ 171,
1223
+ 172,
1224
+ 173,
1225
+ 174,
1226
+ 175,
1227
+ 176,
1228
+ 177,
1229
+ 178,
1230
+ 179,
1231
+ 180,
1232
+ 181,
1233
+ 182,
1234
+ 183,
1235
+ 184,
1236
+ 185,
1237
+ 186,
1238
+ 187,
1239
+ 188,
1240
+ 189,
1241
+ 190,
1242
+ 191,
1243
+ 192,
1244
+ 193,
1245
+ 194,
1246
+ 195,
1247
+ 196,
1248
+ 197,
1249
+ 198,
1250
+ 199,
1251
+ 200,
1252
+ 201,
1253
+ 202,
1254
+ 203,
1255
+ 204,
1256
+ 205,
1257
+ 206,
1258
+ 207,
1259
+ 208,
1260
+ 209,
1261
+ 210,
1262
+ 211,
1263
+ 212,
1264
+ 213,
1265
+ 214,
1266
+ 215,
1267
+ 216,
1268
+ 217,
1269
+ 218,
1270
+ 219,
1271
+ 220,
1272
+ 221,
1273
+ 222,
1274
+ 223,
1275
+ 224,
1276
+ 225,
1277
+ 226,
1278
+ 227,
1279
+ 228,
1280
+ 229,
1281
+ 230,
1282
+ 231,
1283
+ 232,
1284
+ 233,
1285
+ 234,
1286
+ 235,
1287
+ 236,
1288
+ 237,
1289
+ 238,
1290
+ 239,
1291
+ 240,
1292
+ 241,
1293
+ 242,
1294
+ 243,
1295
+ 244,
1296
+ 245,
1297
+ 246,
1298
+ 247,
1299
+ 248,
1300
+ 249,
1301
+ 250,
1302
+ 251,
1303
+ 252,
1304
+ 253,
1305
+ 254,
1306
+ 255,
1307
+ ]
@@ -795,7 +795,9 @@ class PDFCreater:
795
795
  logger.debug(f"Error restoring media box {name} from PDF")
796
796
 
797
797
  def write(
798
- self, translation_config: TranslationConfig, check_font_exists: bool = False
798
+ self,
799
+ translation_config: TranslationConfig,
800
+ check_font_exists: bool = False,
799
801
  ) -> TranslateResult:
800
802
  try:
801
803
  basename = Path(translation_config.input_file).stem
@@ -10,6 +10,7 @@ import freetype
10
10
  import pymupdf
11
11
 
12
12
  import babeldoc.pdfminer.pdfinterp
13
+ from babeldoc.format.pdf.babelpdf.encoding import WinAnsiEncoding
13
14
  from babeldoc.format.pdf.babelpdf.encoding import get_type1_encoding
14
15
  from babeldoc.format.pdf.document_il import il_version_1
15
16
  from babeldoc.format.pdf.document_il.utils import zstd_helper
@@ -75,15 +76,22 @@ def get_glyph_cbox(face, g):
75
76
  return cbox.xMin, cbox.yMin, cbox.xMax, cbox.yMax
76
77
 
77
78
 
79
+ def get_char_cbox(face, idx):
80
+ g = face.get_char_index(idx)
81
+ return get_glyph_cbox(face, g)
82
+
83
+
78
84
  def get_name_cbox(face, name):
79
85
  if name:
86
+ if isinstance(name, str):
87
+ name = name.encode("utf-8")
80
88
  g = face.get_name_index(name)
81
89
  return get_glyph_cbox(face, g)
82
90
  return (0, 0, 0, 0)
83
91
 
84
92
 
85
93
  def font_encoding_lookup(doc, idx, key):
86
- obj = doc.xref_get_key(doc, idx, key)
94
+ obj = doc.xref_get_key(idx, key)
87
95
  if obj[0] == "name":
88
96
  enc_name = obj[1][1:]
89
97
  if enc_vector := get_type1_encoding(enc_name):
@@ -98,7 +106,7 @@ def parse_font_encoding(doc, idx):
98
106
  return ("Custom", get_type1_encoding("StandardEncoding"))
99
107
 
100
108
 
101
- def parse_font_file(doc, idx, encoding, differences):
109
+ def parse_font_file(doc, idx, encoding, differences, legacy_encoding):
102
110
  bbox_list = []
103
111
  data = doc.xref_stream(idx)
104
112
  face = freetype.Face(BytesIO(data))
@@ -111,6 +119,11 @@ def parse_font_file(doc, idx, encoding, differences):
111
119
  face.select_charmap(charmap.encoding)
112
120
  break
113
121
  bbox_list = [get_name_cbox(face, x) for x in enc_vector]
122
+ _, legacy_vector = legacy_encoding
123
+ legacy_bbox_list = [get_char_cbox(face, x) for x in legacy_vector]
124
+ for i, bbox in enumerate(bbox_list):
125
+ if sum(bbox) == 0:
126
+ bbox_list[i] = legacy_bbox_list[i]
114
127
  if differences:
115
128
  for code, name in differences:
116
129
  bbox_list[code] = get_name_cbox(face, name.encode("U8"))
@@ -525,14 +538,28 @@ class ILCreater:
525
538
  self.current_page_font_char_bounding_box_map[font_id] = (
526
539
  font_char_bounding_box_map
527
540
  )
528
- except Exception:
529
- pass
541
+ except Exception as e:
542
+ logger.error("failed to parse font xobj id %d: %s", xref_id, e)
530
543
  self.current_page_font_name_id_map[xref_id] = font_id
531
544
  if self.xobj_id in self.xobj_map:
532
545
  self.xobj_map[self.xobj_id].pdf_font.append(il_font_metadata)
533
546
  else:
534
547
  self.current_page.pdf_font.append(il_font_metadata)
535
548
 
549
+ def get_legacy_encoding(self, xobj_id):
550
+ try:
551
+ encoding = ("Custom", list(range(256)))
552
+ font_encoding = self.mupdf.xref_get_key(xobj_id, "Encoding")
553
+ if font_encoding[1] == "/WinAnsiEncoding":
554
+ encoding = ("WinAnsi", WinAnsiEncoding)
555
+ base_encoding = self.mupdf.xref_get_key(xobj_id, "Encoding/BaseEncoding")
556
+ if base_encoding[1] == "/WinAnsiEncoding":
557
+ encoding = ("WinAnsi", WinAnsiEncoding)
558
+
559
+ return encoding
560
+ except Exception:
561
+ return ("Custom", list(range(256)))
562
+
536
563
  def parse_font_xobj_id(self, xobj_id: int):
537
564
  bbox_list = []
538
565
  encoding = parse_font_encoding(self.mupdf, xobj_id)
@@ -543,7 +570,13 @@ class ILCreater:
543
570
  for file_key in ["FontFile", "FontFile2", "FontFile3"]:
544
571
  font_file = self.mupdf.xref_get_key(xobj_id, f"FontDescriptor/{file_key}")
545
572
  if file_idx := indirect(font_file):
546
- bbox_list = parse_font_file(self.mupdf, file_idx, encoding, differences)
573
+ bbox_list = parse_font_file(
574
+ self.mupdf,
575
+ file_idx,
576
+ encoding,
577
+ differences,
578
+ self.get_legacy_encoding(xobj_id),
579
+ )
547
580
  cmap = {}
548
581
  to_unicode = self.mupdf.xref_get_key(xobj_id, "ToUnicode")
549
582
  if to_unicode_idx := indirect(to_unicode):
@@ -2,7 +2,7 @@ from dataclasses import dataclass
2
2
  from dataclasses import field
3
3
 
4
4
 
5
- @dataclass
5
+ @dataclass(slots=True)
6
6
  class BaseOperations:
7
7
  class Meta:
8
8
  name = "baseOperations"
@@ -15,7 +15,7 @@ class BaseOperations:
15
15
  )
16
16
 
17
17
 
18
- @dataclass
18
+ @dataclass(slots=True)
19
19
  class Box:
20
20
  class Meta:
21
21
  name = "box"
@@ -50,7 +50,7 @@ class Box:
50
50
  )
51
51
 
52
52
 
53
- @dataclass
53
+ @dataclass(slots=True)
54
54
  class GraphicState:
55
55
  class Meta:
56
56
  name = "graphicState"
@@ -138,7 +138,7 @@ class GraphicState:
138
138
  )
139
139
 
140
140
 
141
- @dataclass
141
+ @dataclass(slots=True)
142
142
  class PdfFontCharBoundingBox:
143
143
  class Meta:
144
144
  name = "pdfFontCharBoundingBox"
@@ -180,7 +180,7 @@ class PdfFontCharBoundingBox:
180
180
  )
181
181
 
182
182
 
183
- @dataclass
183
+ @dataclass(slots=True)
184
184
  class Cropbox:
185
185
  class Meta:
186
186
  name = "cropbox"
@@ -194,7 +194,7 @@ class Cropbox:
194
194
  )
195
195
 
196
196
 
197
- @dataclass
197
+ @dataclass(slots=True)
198
198
  class Mediabox:
199
199
  class Meta:
200
200
  name = "mediabox"
@@ -208,7 +208,7 @@ class Mediabox:
208
208
  )
209
209
 
210
210
 
211
- @dataclass
211
+ @dataclass(slots=True)
212
212
  class PageLayout:
213
213
  class Meta:
214
214
  name = "pageLayout"
@@ -243,7 +243,7 @@ class PageLayout:
243
243
  )
244
244
 
245
245
 
246
- @dataclass
246
+ @dataclass(slots=True)
247
247
  class PdfFigure:
248
248
  class Meta:
249
249
  name = "pdfFigure"
@@ -257,7 +257,7 @@ class PdfFigure:
257
257
  )
258
258
 
259
259
 
260
- @dataclass
260
+ @dataclass(slots=True)
261
261
  class PdfFont:
262
262
  class Meta:
263
263
  name = "pdfFont"
@@ -338,7 +338,7 @@ class PdfFont:
338
338
  )
339
339
 
340
340
 
341
- @dataclass
341
+ @dataclass(slots=True)
342
342
  class PdfRectangle:
343
343
  class Meta:
344
344
  name = "pdfRectangle"
@@ -386,7 +386,7 @@ class PdfRectangle:
386
386
  )
387
387
 
388
388
 
389
- @dataclass
389
+ @dataclass(slots=True)
390
390
  class PdfStyle:
391
391
  class Meta:
392
392
  name = "pdfStyle"
@@ -415,7 +415,7 @@ class PdfStyle:
415
415
  )
416
416
 
417
417
 
418
- @dataclass
418
+ @dataclass(slots=True)
419
419
  class VisualBbox:
420
420
  class Meta:
421
421
  name = "visual_bbox"
@@ -429,7 +429,7 @@ class VisualBbox:
429
429
  )
430
430
 
431
431
 
432
- @dataclass
432
+ @dataclass(slots=True)
433
433
  class PdfCharacter:
434
434
  class Meta:
435
435
  name = "pdfCharacter"
@@ -508,7 +508,7 @@ class PdfCharacter:
508
508
  )
509
509
 
510
510
 
511
- @dataclass
511
+ @dataclass(slots=True)
512
512
  class PdfSameStyleUnicodeCharacters:
513
513
  class Meta:
514
514
  name = "pdfSameStyleUnicodeCharacters"
@@ -535,7 +535,7 @@ class PdfSameStyleUnicodeCharacters:
535
535
  )
536
536
 
537
537
 
538
- @dataclass
538
+ @dataclass(slots=True)
539
539
  class PdfXobject:
540
540
  class Meta:
541
541
  name = "pdfXobject"
@@ -580,7 +580,7 @@ class PdfXobject:
580
580
  )
581
581
 
582
582
 
583
- @dataclass
583
+ @dataclass(slots=True)
584
584
  class PdfFormula:
585
585
  class Meta:
586
586
  name = "pdfFormula"
@@ -622,7 +622,7 @@ class PdfFormula:
622
622
  )
623
623
 
624
624
 
625
- @dataclass
625
+ @dataclass(slots=True)
626
626
  class PdfLine:
627
627
  class Meta:
628
628
  name = "pdfLine"
@@ -644,7 +644,7 @@ class PdfLine:
644
644
  )
645
645
 
646
646
 
647
- @dataclass
647
+ @dataclass(slots=True)
648
648
  class PdfSameStyleCharacters:
649
649
  class Meta:
650
650
  name = "pdfSameStyleCharacters"
@@ -674,7 +674,7 @@ class PdfSameStyleCharacters:
674
674
  )
675
675
 
676
676
 
677
- @dataclass
677
+ @dataclass(slots=True)
678
678
  class PdfParagraphComposition:
679
679
  class Meta:
680
680
  name = "pdfParagraphComposition"
@@ -716,7 +716,7 @@ class PdfParagraphComposition:
716
716
  )
717
717
 
718
718
 
719
- @dataclass
719
+ @dataclass(slots=True)
720
720
  class PdfParagraph:
721
721
  class Meta:
722
722
  name = "pdfParagraph"
@@ -802,7 +802,7 @@ class PdfParagraph:
802
802
  )
803
803
 
804
804
 
805
- @dataclass
805
+ @dataclass(slots=True)
806
806
  class Page:
807
807
  class Meta:
808
808
  name = "page"
@@ -896,7 +896,7 @@ class Page:
896
896
  )
897
897
 
898
898
 
899
- @dataclass
899
+ @dataclass(slots=True)
900
900
  class Document:
901
901
  class Meta:
902
902
  name = "document"
@@ -46,7 +46,9 @@ Result:
46
46
 
47
47
  class BatchParagraph:
48
48
  def __init__(
49
- self, paragraphs: list[PdfParagraph], page_tracker: PageTermExtractTracker
49
+ self,
50
+ paragraphs: list[PdfParagraph],
51
+ page_tracker: PageTermExtractTracker,
50
52
  ):
51
53
  self.paragraphs = paragraphs
52
54
  self.tracker = page_tracker.new_paragraph()
@@ -105,7 +107,9 @@ class AutomaticTermExtractor:
105
107
  stage_name = "Automatic Term Extraction"
106
108
 
107
109
  def __init__(
108
- self, translate_engine: BaseTranslator, translation_config: TranslationConfig
110
+ self,
111
+ translate_engine: BaseTranslator,
112
+ translation_config: TranslationConfig,
109
113
  ):
110
114
  self.translate_engine = translate_engine
111
115
  self.translation_config = translation_config
@@ -81,36 +81,67 @@ class PbarContext:
81
81
  class DocumentTranslateTracker:
82
82
  def __init__(self):
83
83
  self.page = []
84
+ self.cross_page = []
85
+ # Track paragraphs that are combined due to cross-column detection within the same page
86
+ self.cross_column = []
84
87
 
85
88
  def new_page(self):
86
89
  page = PageTranslateTracker()
87
90
  self.page.append(page)
88
91
  return page
89
92
 
93
+ def new_cross_page(self):
94
+ page = PageTranslateTracker()
95
+ self.cross_page.append(page)
96
+ return page
97
+
98
+ def new_cross_column(self):
99
+ """Create and return a new PageTranslateTracker dedicated to cross-column merging."""
100
+ page = PageTranslateTracker()
101
+ self.cross_column.append(page)
102
+ return page
103
+
90
104
  def to_json(self):
91
105
  pages = []
92
106
  for page in self.page:
93
- paragraphs = []
94
- for para in page.paragraph:
95
- i_str = getattr(para, "input", None)
96
- o_str = getattr(para, "output", None)
97
- pdf_unicode = getattr(para, "pdf_unicode", None)
98
- llm_translate_trackers = getattr(para, "llm_translate_trackers", None)
99
- llm_translate_trackers_json = []
100
- for tracker in llm_translate_trackers:
101
- llm_translate_trackers_json.append(tracker.to_dict())
102
- if pdf_unicode is None or i_str is None:
103
- continue
104
- paragraphs.append(
105
- {
106
- "input": i_str,
107
- "output": o_str,
108
- "pdf_unicode": pdf_unicode,
109
- "llm_translate_trackers": llm_translate_trackers_json,
110
- },
111
- )
107
+ paragraphs = self.convert_paragraph(page)
112
108
  pages.append({"paragraph": paragraphs})
113
- return json.dumps({"page": pages}, ensure_ascii=False, indent=2)
109
+ cross_page = []
110
+ for page in self.cross_page:
111
+ paragraphs = self.convert_paragraph(page)
112
+ cross_page.append({"paragraph": paragraphs})
113
+ cross_column = []
114
+ for page in self.cross_column:
115
+ paragraphs = self.convert_paragraph(page)
116
+ cross_column.append({"paragraph": paragraphs})
117
+ return json.dumps(
118
+ {"cross_page": cross_page, "cross_column": cross_column, "page": pages},
119
+ ensure_ascii=False,
120
+ indent=2,
121
+ )
122
+
123
+ def convert_paragraph(self, page):
124
+ paragraphs = []
125
+ for para in page.paragraph:
126
+ i_str = getattr(para, "input", None)
127
+ o_str = getattr(para, "output", None)
128
+ pdf_unicode = getattr(para, "pdf_unicode", None)
129
+ llm_translate_trackers = getattr(para, "llm_translate_trackers", None)
130
+ llm_translate_trackers_json = []
131
+ for tracker in llm_translate_trackers:
132
+ llm_translate_trackers_json.append(tracker.to_dict())
133
+ if pdf_unicode is None or i_str is None:
134
+ continue
135
+ paragraph_json = {
136
+ "input": i_str,
137
+ "output": o_str,
138
+ "pdf_unicode": pdf_unicode,
139
+ "llm_translate_trackers": llm_translate_trackers_json,
140
+ }
141
+ paragraphs.append(
142
+ paragraph_json,
143
+ )
144
+ return paragraphs
114
145
 
115
146
 
116
147
  class PageTranslateTracker:
@@ -752,7 +783,9 @@ class ILTranslator:
752
783
  return False
753
784
  paragraph.unicode = translated_text
754
785
  paragraph.pdf_paragraph_composition = self.parse_translate_output(
755
- translate_input, translated_text, tracker.last_llm_translate_tracker()
786
+ translate_input,
787
+ translated_text,
788
+ tracker.last_llm_translate_tracker(),
756
789
  )
757
790
  for composition in paragraph.pdf_paragraph_composition:
758
791
  if (
@@ -910,7 +943,10 @@ Now, please carefully read the following text to be translated and directly outp
910
943
  # Perform translation
911
944
  if self.support_llm_translate:
912
945
  llm_prompt = self.generate_prompt_for_llm(
913
- text, title_paragraph, local_title_paragraph, translate_input
946
+ text,
947
+ title_paragraph,
948
+ local_title_paragraph,
949
+ translate_input,
914
950
  )
915
951
  llm_translate_tracker.set_input(llm_prompt)
916
952
  translated_text = self.translate_engine.llm_translate(