Closed GoogleCodeExporter closed 9 years ago
XDocReport should do that. Could you attach please your docx + java code which
causes the problem please.
Many thank's
Regards Angelo
Original comment by angelo.z...@gmail.com
on 22 Apr 2013 at 7:13
Hi Angelo,
Sorry for the delayed response. Attached is a word doc, and below is the code
used to generate the error. I'm using xdoc reports v.1.0.0 & freemarker 2.3.19
import fr.opensagres.xdocreport.document.IXDocReport;
import fr.opensagres.xdocreport.document.registry.XDocReportRegistry;
import fr.opensagres.xdocreport.template.freemarker.FreemarkerTemplateEngine;
import
fr.opensagres.xdocreport.template.freemarker.internal.XDocFreemarkerContext;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.URL;
import org.testng.annotations.Test;
public class WordXMLEscTest {
@Test
public void testEsc() throws Exception {
FreemarkerTemplateEngine engine = new FreemarkerTemplateEngine();
URL templateURL = this.getClass().getResource("/templates/XMLEscapeTest.docx");
InputStream in = templateURL.openStream();
IXDocReport report = XDocReportRegistry.getRegistry().loadReport(in, engine);
XDocFreemarkerContext context = new XDocFreemarkerContext();
context.put("account", "Mark & Co");
report.process(context, new FileOutputStream("/tmp/output.docx"));
}
}
Regards,
Mark
Original comment by markcdes...@gmail.com
on 24 Apr 2013 at 4:42
Attachments:
Hi,
Could you attach please you docx. Many thank's.
Just one question , do you use megefield?
Regards Angelo
Original comment by angelo.z...@gmail.com
on 24 Apr 2013 at 12:57
Opps sorry looks like I attached the source as opposed to the template file.
Attached is the word doc and yes I am using a merge field.
Original comment by markcdes...@gmail.com
on 24 Apr 2013 at 1:00
Attachments:
Ok thank's.
Your problem is very strange because we use XML escape feature with FM
(http://freemarker.sourceforge.net/docs/xgui_imperative_learn.html)
I have tried quicly tested your docx with our online demo
http://xdocreport.opensagres.cloudbees.net/processReport.jsp and it works?
I will try it with a simple Java main.
Have you tried with XDocReport v.1.0.1?
Regards Angelo
Original comment by angelo.z...@gmail.com
on 24 Apr 2013 at 1:57
Now this is strange. I ran the report on
http://xdocreport.opensagres.cloudbees.net/processReport.jsp and yes it did
work fine.
My questions are:
1) Is the cloudbees application running 1.0.1 or 1.0.0? I am testing on 1.0.0
as 1.0.1 does not seem to be released yet.
2) Is the source for the cloudbees application available. It would be
interesting to see how it differs from my code, which I thought would have been
reasonably boiler plate.
Regards,
Mark
Original comment by markcdes...@gmail.com
on 25 Apr 2013 at 12:08
Below are the maven dependancies that I am using.
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.19</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.document.docx</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.template.freemarker</artifactId>
<version>1.0.0</version>
</dependency>
Original comment by markcdes...@gmail.com
on 25 Apr 2013 at 12:10
Hi Mark,
Have you tried your problem with last version of XDocReport (1.0.2 released and
1.0.3 not released).
I would like to close this issue.
Thank's for your test.
Regards Angelo
Original comment by angelo.z...@gmail.com
on 17 Sep 2013 at 4:06
Hi Angelo,
You can close the ticket.
Cheers,
Mark
Original comment by markcdes...@gmail.com
on 18 Sep 2013 at 1:01
Ok Thank's Mark. I close this issue.
Original comment by angelo.z...@gmail.com
on 18 Sep 2013 at 7:21
Original issue reported on code.google.com by
markcdes...@gmail.com
on 22 Apr 2013 at 2:38