Skip to content

Commit

Permalink
Merge pull request Byaidu#313 from 7shi/fix-font-error
Browse files Browse the repository at this point in the history
Fix Font Processing Error
  • Loading branch information
Byaidu authored Dec 21, 2024
2 parents 9dc7928 + ae573e2 commit 71632d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pdf2zh/high_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ def translate_stream(
font_list.append(("china-ss", None))

doc_en = Document(stream=stream)
stream = io.BytesIO()
doc_en.save(stream)
doc_zh = Document(stream=stream)
page_count = doc_zh.page_count
# font_list = [("china-ss", None), ("tiro", None)]
Expand Down

0 comments on commit 71632d7

Please sign in to comment.