diff --git a/src/calibre/ebooks/pdf/pdftohtml.py b/src/calibre/ebooks/pdf/pdftohtml.py
index ca950b84b2..47bd64c2d0 100644
--- a/src/calibre/ebooks/pdf/pdftohtml.py
+++ b/src/calibre/ebooks/pdf/pdftohtml.py
@@ -118,7 +118,7 @@ def flip_image(img, flip):
im.save(img)
def flip_images(raw):
- for match in re.finditer(b'
]+/?>', raw):
+ for match in re.finditer(b'
]+/?>', raw, flags=re.I):
img = match.group()
m = re.search(br'class="(x|y|xy)flip"', img)
if m is None: continue
@@ -127,7 +127,6 @@ def flip_images(raw):
if src is None: continue
img = src.group(1)
if not os.path.exists(img): continue
- print ('Flipping image %s: %s'%(img, flip))
flip_image(img, flip)
raw = re.sub(br'\s*', b'', raw, flags=re.I|re.DOTALL)
return raw