Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

## Changes in version 0.0.24

### Fixes:

* [270](https://github.com/pymupdf/RAG/issues/270) - Fix UnboundLocalError for table_strategy in pymupdf_rag.py

### Other Changes:



## Changes in version 0.0.23

### Fixes:
Expand Down
4 changes: 2 additions & 2 deletions pdf4llm/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"Programming Language :: Python :: 3",
"Topic :: Utilities",
]
requires = ["pymupdf4llm==0.0.23"]
requires = ["pymupdf4llm==0.0.24"]

setuptools.setup(
name="pdf4llm",
version="0.0.23",
version="0.0.24",
author="Artifex",
author_email="support@artifex.com",
description="PyMuPDF Utilities for LLM/RAG",
Expand Down
2 changes: 1 addition & 1 deletion pymupdf4llm/pymupdf4llm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .helpers.pymupdf_rag import IdentifyHeaders, to_markdown

__version__ = "0.0.23"
__version__ = "0.0.24"
version = __version__
version_tuple = tuple(map(int, version.split(".")))

Expand Down
6 changes: 3 additions & 3 deletions pymupdf4llm/pymupdf4llm/helpers/pymupdf_rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,12 +988,12 @@ def get_page_output(
graphics_count = len([b for b in page.get_bboxlog() if "path" in b[0]])
if GRAPHICS_LIMIT and graphics_count > GRAPHICS_LIMIT:
IGNORE_GRAPHICS = True
table_strategy = None

# Locate all tables on page
parms.written_tables = [] # stores already written tables
omitted_table_rects = []
if table_strategy is None:
if IGNORE_GRAPHICS or not table_strategy:
# do not try to extract tables
parms.tabs = None
else:
parms.tabs = page.find_tables(clip=parms.clip, strategy=table_strategy)
Expand Down Expand Up @@ -1147,7 +1147,7 @@ def get_page_output(
toc = doc.get_toc()

# Text extraction flags:
# omit invisible text, collect styles, use accurate bounding boxes
# omit clipped text, collect styles, use accurate bounding boxes
textflags = (
0
| mupdf.FZ_STEXT_CLIP
Expand Down
2 changes: 1 addition & 1 deletion pymupdf4llm/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setuptools.setup(
name="pymupdf4llm",
version="0.0.23",
version="0.0.24",
author="Artifex",
author_email="support@artifex.com",
description="PyMuPDF Utilities for LLM/RAG",
Expand Down