diff --git a/src/libprs500/ebooks/lrf/html/convert_from.py b/src/libprs500/ebooks/lrf/html/convert_from.py
index e0fa5aa0b7..d019275b16 100644
--- a/src/libprs500/ebooks/lrf/html/convert_from.py
+++ b/src/libprs500/ebooks/lrf/html/convert_from.py
@@ -740,6 +740,9 @@ class HTMLConverter(object):
im = PILImage.open(path)
if width == None or height == None:
width, height = im.size
+ if width > height:
+ im = im.rotate(-90)
+ width, height = im.size
if height > self.profile.page_height:
corrf = self.profile.page_height/(1.*height)
width, height = floor(corrf*width), self.profile.page_height-1