From b7aacbfb6abd7af2079101abec64587da25a4282 Mon Sep 17 00:00:00 2001 From: Sengian Date: Fri, 16 Jul 2010 23:00:32 +0200 Subject: [PATCH] RTF input plugin text align problem. --- resources/templates/rtf.xsl | 13 ++++++++++++- src/calibre/ebooks/rtf/input.py | 5 +++++ 2 files changed, 17 insertions(+), 1 deletion(-) 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 = {}