From d684b09cd0da924e4fc23edabad073905e372d11 Mon Sep 17 00:00:00 2001 From: Justin Phan Date: Sun, 9 Aug 2026 19:05:55 +1000 Subject: [PATCH] Fixed horizontal orientation detection --- supernotelib/fileformat.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/supernotelib/fileformat.py b/supernotelib/fileformat.py index 3ecc39f..f9c7954 100644 --- a/supernotelib/fileformat.py +++ b/supernotelib/fileformat.py @@ -326,6 +326,7 @@ class Page: ORIENTATION_VERTICAL = "1000" ORIENTATION_HORIZONTAL = "1090" + ORIENTATION_HORIZONTAL_ALT = "1270" def __init__(self, page_info): self.metadata = page_info @@ -418,7 +419,10 @@ def get_recogn_text(self): return self.recogn_text def get_orientation(self): - return self.metadata.get('ORIENTATION', self.ORIENTATION_VERTICAL) + orientation = self.metadata.get('ORIENTATION', self.ORIENTATION_VERTICAL) + if orientation == self.ORIENTATION_HORIZONTAL_ALT: + return self.ORIENTATION_HORIZONTAL + return orientation class Layer: def __init__(self, layer_info):