You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to generate a PDF using ODT, Freemarker and HTML with the example below, I encounter an error because the intermediate ODT file generated has a <text:p> tag that is not properly closed.
<h2>Lorem ipsum dolor sit <em>amet, consectetur adipiscing</em> elit </h2><p>laborum.
</p><p></p><p></p><h2>Cláusula de (<em>livre preenchimento</em>)</h2>
The attached project reproduces this behavior.
The incorrect tag can be seen highlighted in the attached image.
Fatal Error] :1:5465: The element type "text:p" must be terminated by the matching end-tag "</text:p>".
jul. 26, 2024 4:38:38 PM org.odftoolkit.odfdom.pkg.OdfFileDom initialize
SEVERE: null
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 5465; The element type "text:p" must be terminated by the matching end-tag "</text:p>".
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.odftoolkit.odfdom.pkg.OdfFileDom.initialize(OdfFileDom.java:142)
at org.odftoolkit.odfdom.dom.OdfContentDom.initialize(OdfContentDom.java:55)
at org.odftoolkit.odfdom.pkg.OdfFileDom.<init>(OdfFileDom.java:87)
at org.odftoolkit.odfdom.dom.OdfContentDom.<init>(OdfContentDom.java:45)
at org.odftoolkit.odfdom.pkg.OdfFileDom.newFileDom(OdfFileDom.java:110)
at org.odftoolkit.odfdom.pkg.OdfPackageDocument.getFileDom(OdfPackageDocument.java:281)
at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getFileDom(OdfSchemaDocument.java:312)
at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getContentDom(OdfSchemaDocument.java:190)
at fr.opensagres.odfdom.converter.pdf.PdfConverter.processStyles(PdfConverter.java:104)
at fr.opensagres.odfdom.converter.pdf.PdfConverter.doConvert(PdfConverter.java:62)
at fr.opensagres.odfdom.converter.pdf.PdfConverter.doConvert(PdfConverter.java:44)
at fr.opensagres.odfdom.converter.core.AbstractODFConverter.convert(AbstractODFConverter.java:42)
at fr.opensagres.xdocreport.converter.odt.odfdom.itext.ODF2PDFViaITextConverter.convert(ODF2PDFViaITextConverter.java:62)
at fr.opensagres.xdocreport.document.AbstractXDocReport.convert(AbstractXDocReport.java:710)
at my.example.ODTHTMLFreemarker.main(ODTHTMLFreemarker.java:43)
fr.opensagres.xdocreport.converter.XDocConverterException: fr.opensagres.odfdom.converter.core.ODFConverterException: java.lang.ClassCastException: Insertion of illegal Element: 12
at fr.opensagres.xdocreport.converter.odt.odfdom.itext.ODF2PDFViaITextConverter.convert(ODF2PDFViaITextConverter.java:66)
at fr.opensagres.xdocreport.document.AbstractXDocReport.convert(AbstractXDocReport.java:710)
at my.example.ODTHTMLFreemarker.main(ODTHTMLFreemarker.java:43)
Caused by: fr.opensagres.odfdom.converter.core.ODFConverterException: java.lang.ClassCastException: Insertion of illegal Element: 12
at fr.opensagres.odfdom.converter.pdf.PdfConverter.doConvert(PdfConverter.java:94)
at fr.opensagres.odfdom.converter.pdf.PdfConverter.doConvert(PdfConverter.java:44)
at fr.opensagres.odfdom.converter.core.AbstractODFConverter.convert(AbstractODFConverter.java:42)
at fr.opensagres.xdocreport.converter.odt.odfdom.itext.ODF2PDFViaITextConverter.convert(ODF2PDFViaITextConverter.java:62)
... 2 more
Caused by: java.lang.ClassCastException: Insertion of illegal Element: 12
at com.lowagie.text.Phrase.add(Unknown Source)
at fr.opensagres.xdocreport.itext.extension.ExtendedParagraph.addElement(ExtendedParagraph.java:63)
at fr.opensagres.odfdom.converter.pdf.internal.ElementVisitorForIText.addITextContainer(ElementVisitorForIText.java:848)
at fr.opensagres.odfdom.converter.pdf.internal.ElementVisitorForIText.addITextContainer(ElementVisitorForIText.java:836)
at fr.opensagres.odfdom.converter.pdf.internal.ElementVisitorForIText.processParagraphOrHeading(ElementVisitorForIText.java:392)
at fr.opensagres.odfdom.converter.pdf.internal.ElementVisitorForIText.visit(ElementVisitorForIText.java:330)
at org.odftoolkit.odfdom.dom.element.text.TextPElement.accept(TextPElement.java:1681)
at fr.opensagres.odfdom.converter.core.ElementVisitorConverter.visit(ElementVisitorConverter.java:83)
at fr.opensagres.odfdom.converter.pdf.internal.ElementVisitorForIText.addITextContainer(ElementVisitorForIText.java:845)
at fr.opensagres.odfdom.converter.pdf.internal.ElementVisitorForIText.addITextContainer(ElementVisitorForIText.java:836)
at fr.opensagres.odfdom.converter.pdf.internal.ElementVisitorForIText.processParagraphOrHeading(ElementVisitorForIText.java:392)
at fr.opensagres.odfdom.converter.pdf.internal.ElementVisitorForIText.visit(ElementVisitorForIText.java:322)
at org.odftoolkit.odfdom.dom.element.text.TextHElement.accept(TextHElement.java:1794)
at fr.opensagres.odfdom.converter.core.ElementVisitorConverter.visit(ElementVisitorConverter.java:83)
at org.odftoolkit.odfdom.dom.DefaultElementVisitor.visit(DefaultElementVisitor.java:2605)
at fr.opensagres.odfdom.converter.pdf.internal.ElementVisitorForIText.visit(ElementVisitorForIText.java:258)
at org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.accept(OfficeTextElement.java:805)
at fr.opensagres.odfdom.converter.pdf.PdfConverter.processBody(PdfConverter.java:138)
at fr.opensagres.odfdom.converter.pdf.PdfConverter.doConvert(PdfConverter.java:66)
... 5 more
The text was updated successfully, but these errors were encountered:
xdocreport version is 2.1.0
When attempting to generate a PDF using ODT, Freemarker and HTML with the example below, I encounter an error because the intermediate ODT file generated has a
<text:p>
tag that is not properly closed.The attached project reproduces this behavior.
The incorrect tag can be seen highlighted in the attached image.
bug_report.zip
the stack error is:
The text was updated successfully, but these errors were encountered: