From 01a7bd6f00177d8e841f5d5e9e8877f3b5f678e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 1 Nov 2016 17:24:20 +0100 Subject: [PATCH] =?UTF-8?q?add=20support=20for=20new=20"texte=20adopt?= =?UTF-8?q?=C3=A9"=20document=20(#10328)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- legi2pdf/xsl/section.xsl | 23 ++++++++++++++++++++++- odf2legi/odf2legi.py | 2 ++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/legi2pdf/xsl/section.xsl b/legi2pdf/xsl/section.xsl index ebd106c..65b381a 100644 --- a/legi2pdf/xsl/section.xsl +++ b/legi2pdf/xsl/section.xsl @@ -253,10 +253,31 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - \end{multicols} + + + + + + + \end{multicols} + + + + + + \end{multicols} + \end{multicols} + \end{multicols} + + diff --git a/odf2legi/odf2legi.py b/odf2legi/odf2legi.py index 8d704f1..ceca26a 100644 --- a/odf2legi/odf2legi.py +++ b/odf2legi/odf2legi.py @@ -1140,6 +1140,8 @@ def convert_to_legi_xml(content, metadata=None, styles=None): # clear it. offstructure.remove(offstructure.getchildren()[0]) + legi.append(ET.ProcessingInstruction('end-of-document')) + # get content as an XML tree out = StringIO() ET.ElementTree(legi).write(out)