BabelDOC 0.6.3__tar.gz → 0.6.4__tar.gz

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