StimVinsh / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

Exception when converting from ODT to PDF #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,
when I try to generate a PDF from odt template i got the following exception:

fr.opensagres.xdocreport.converter.XDocConverterException: Cannot find 
converters for from=ODT
    at fr.opensagres.xdocreport.converter.ConverterRegistry.internalFindConverter(ConverterRegistry.java:84)
    at fr.opensagres.xdocreport.converter.ConverterRegistry.findConverter(ConverterRegistry.java:52)
    at fr.opensagres.xdocreport.document.AbstractXDocReport.getConverter(AbstractXDocReport.java:504)
    at fr.opensagres.xdocreport.document.AbstractXDocReport.convert(AbstractXDocReport.java:520)

Regards.

Original issue reported on code.google.com by berchane...@gmail.com on 19 Jul 2011 at 2:27

GoogleCodeExporter commented 8 years ago
Hi, 

This error means that you have not setted the well JAR in your classpath. You 
must add following JARs. If you go at 
http://code.google.com/p/xdocreport/wiki/ODFConverters you will see that you 
need JARs : 
* fr.opensagres.xdocreport.converter.odt.odfdom
* org.odftoolkit.odfdom.converter
* odfdom

Regards Angelo

Original comment by angelo.z...@gmail.com on 19 Jul 2011 at 2:41

GoogleCodeExporter commented 8 years ago
Hi,
after adding the  needed JARs I'm gotting another exception : 

The method convert(OdfDocument, OutputStream, Options) from the type 
IODFConverter<PDFViaITextOptions> refers to the missing type OdfDocument.

But OdfDocument type  exist!!!

Original comment by berchane...@gmail.com on 19 Jul 2011 at 4:17

GoogleCodeExporter commented 8 years ago
At first I suggest you to use directly org.odftoolkit.odfdom.converter to 
convert directly ODT to PDF 
http://code.google.com/p/xdocreport/wiki/ODFDOMConverter

I will add a sample with ODT converter soon.

Do you use source from SVN? If no please wait, because we plan to build a 
release soon.

Regards Angelo

Original comment by angelo.z...@gmail.com on 19 Jul 2011 at 4:25

GoogleCodeExporter commented 8 years ago
Hi,
Thank you for reply.
Yes i'm using a source code to build JARs but i got always a compilation 
problem for ODFDocument Type.
Regards.

Original comment by berchane...@gmail.com on 19 Jul 2011 at 4:33

GoogleCodeExporter commented 8 years ago
Ok your problem comes from with build JARs and not with execution. XDocRepoirt 
is built with Maven. We are using M2Eclipse for that. Please read 
http://code.google.com/p/xdocreport/wiki/HowBuildXDocReport

I have commited a sample with ODT+Velocity with PDF+XHTML converter at 
http://xdocreport.googlecode.com/svn/trunk/samples/fr.opensagres.xdocreport.samp
les.odtandvelocity.converters

Original comment by angelo.z...@gmail.com on 19 Jul 2011 at 4:51

GoogleCodeExporter commented 8 years ago
Hi,
thank you very much for help.
I want to ask another question about the possibility to verify that the 
template contains all  variables passed in context java model?

Original comment by berchane...@gmail.com on 20 Jul 2011 at 9:58

GoogleCodeExporter commented 8 years ago
Hi, 

Could you create an another issue please and describes more your need.

Thank a lot.

Original comment by angelo.z...@gmail.com on 20 Jul 2011 at 10:10

GoogleCodeExporter commented 8 years ago

Original comment by angelo.z...@gmail.com on 20 Jul 2011 at 11:33