diff --git a/pyproject.toml b/pyproject.toml index 2882e36..1b67cfc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pdf-document-layout-analysis" -version = "2024.12.17.4" +version = "2024.12.17.5" description = "This tool is for PDF document layout analysis" license = { file = "LICENSE" } authors = [{ name = "HURIDOCS" }] diff --git a/src/pdf_features/Rectangle.py b/src/pdf_features/Rectangle.py index a42cdc2..cf1cdc1 100644 --- a/src/pdf_features/Rectangle.py +++ b/src/pdf_features/Rectangle.py @@ -73,7 +73,7 @@ def get_horizontal_distance(self, rectangle: "Rectangle") -> float: left = max(self.left, rectangle.left) right = min(self.right, rectangle.right) - return right - left + return left - right def area(self): return self.width * self.height