Skip to content

Commit f461528

Browse files
committed
[Fix] Fixed import
1 parent 3a34b40 commit f461528

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pymupdf4llm/pymupdf4llm/helpers/pymupdf_rag.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@
4343
except ImportError:
4444
import fitz
4545

46-
from get_text_lines import get_raw_lines, is_white
47-
from multi_column import column_boxes
46+
from pymupdf4llm.pymupdf4llm.helpers.get_text_lines import (
47+
get_raw_lines,
48+
is_white,
49+
)
50+
from pymupdf4llm.pymupdf4llm.helpers.multi_column import column_boxes
4851

4952
if fitz.pymupdf_version_tuple < (1, 24, 2):
5053
raise NotImplementedError("PyMuPDF version 1.24.2 or later is needed.")
@@ -197,7 +200,6 @@ def write_text(
197200
prev_hdr_string = None
198201

199202
for lrect, spans in nlines:
200-
201203
# there may tables or images inside the text block: skip them
202204
if intersects_rects(lrect, tab_rects0) or intersects_rects(
203205
lrect, img_rects0
@@ -456,9 +458,9 @@ def get_page_output(doc, pno, textflags):
456458

457459

458460
if __name__ == "__main__":
461+
import pathlib
459462
import sys
460463
import time
461-
import pathlib
462464

463465
try:
464466
filename = sys.argv[1]

0 commit comments

Comments
 (0)