Open Dimitriio opened 4 years ago
I searched some more and i found out that the first page footer correspond to this tag
Convert method in fr.opensagres.xdocreport.converter.odt.odfdom.itext.ODF2PDFViaITextConverter :
public void convert( InputStream in, OutputStream out, Options options )
throws XDocConverterException
{
try
{
OdfTextDocument odfDocument = OdfTextDocument.loadDocument( in );
PdfConverter.getInstance().convert( odfDocument, out, toPdfOptions( options ) );
}
catch ( ODFConverterException e )
{
throw new XDocConverterException( e );
}
catch ( IOException e )
{
throw new XDocConverterException( e );
}
catch ( Exception e )
{
throw new XDocConverterException( e );
}
}
PS : sorry wrongly closed
I found a way around to solve my problem. In this Apache OO writer pdf page 14-15, it explains how to deal with different header/footer content using different page style and page break.
Hello, An exception is thrown if an ODT document's footer (i guess its the same for header) is selected to be different on the first page.
I am using OpenJDK 11.0.5, xdocreport : 2.0.2 and LibreOffice 6.2.3.2 (x64). I convert to PDF using this method i made :
I wanted put sample files, but its not supported on github. So to reproduce it, you can use a simple blank ODT with 2 pages and specific footer on first page and different one on second.
In fr.opensagres.odfdom.converter.pdf.internal.ElementVisitorForIText : this method seems be the problem as oldContainer is null (and throwing the exception when calling addElement)
Thanks in advance