diff --git a/resources/templates/rtf.xsl b/resources/templates/rtf.xsl
index 74696f0857..c3162b0c15 100644
--- a/resources/templates/rtf.xsl
+++ b/resources/templates/rtf.xsl
@@ -265,9 +265,20 @@
pt;
+
+ text-align: justify;
+
+
+ text-align: center;
+
+
+ text-align: left;
+
+
+ text-align: right;
+
-
diff --git a/src/calibre/ebooks/rtf/input.py b/src/calibre/ebooks/rtf/input.py
index 7d25f4cb86..50f5571d58 100644
--- a/src/calibre/ebooks/rtf/input.py
+++ b/src/calibre/ebooks/rtf/input.py
@@ -199,6 +199,11 @@ class RTFInput(InputFormatPlugin):
except RtfInvalidCodeException, e:
raise ValueError(_('This RTF file has a feature calibre does not '
'support. Convert it to HTML first and then try it.\n%s')%e)
+
+ '''dataxml = open('dataxml.xml', 'w')
+ dataxml.write(xml)
+ dataxml.close'''
+
d = glob.glob(os.path.join('*_rtf_pict_dir', 'picts.rtf'))
if d:
imap = {}