Skip to content

Commit f656c7a

Browse files
committed
Respond to boolean flag
1 parent a1993f5 commit f656c7a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pymupdf4llm/pymupdf4llm/helpers/pymupdf_rag.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,8 @@ def get_page_output(doc, pno, margins, textflags):
765765
toc = doc.get_toc()
766766
textflags = fitz.TEXT_MEDIABOX_CLIP | fitz.TEXT_CID_FOR_UNKNOWN_UNICODE
767767
for pno in pages:
768-
print(f"Processing page {pno} of {len(pages)}...", end=" ", flush=True)
768+
if show_progress:
769+
print(f"Processing page {pno} of {len(pages)}...", end=" ", flush=True)
769770

770771
page_output, images, tables, graphics = get_page_output(
771772
doc, pno, margins, textflags
@@ -788,7 +789,8 @@ def get_page_output(doc, pno, margins, textflags):
788789
}
789790
)
790791

791-
print("Processed!")
792+
if show_progress:
793+
print("Processed!")
792794

793795
return document_output
794796

0 commit comments

Comments
 (0)