Hi,
I am trying to use the #include directive to include a separate docx file in my main docx report. Every time I attempt to do this I get an error.
If I set the "working directory" via FreemarkerTemplateEngine.getFreemarkerConfiguration().setDirectoryForTemplateLoading(File):
freemarker.template.TemplateException: Error reading included file word/<included filename>
at freemarker.core.Include.accept(Include.java:167)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.process(Environment.java:199)
If I reference the full path with the filename in the #include directive:
freemarker.template.TemplateException: Error parsing included template <included filename with full path>
Token manager error: freemarker.core.TokenMgrError: Lexical error at line 114, column 17. Encountered: "\ufffd" (65533), after : "" in <included filename with full path>
at freemarker.core.Include.accept(Include.java:162)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.process(Environment.java:199)
at fr.opensagres.xdocreport.template.freemarker.FreemarkerTemplateEngine.process(FreemarkerTemplateEngine.java:149)
I could of course just use word to include the file (ie without the using the template engine) but it appears that you need to refresh the field in parent docx each time you make a change to the included docx.
Any advise would greatly be appreciated.
Regards,
Mark
--
You received this message because you are subscribed to the Google Groups "xdocreport" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xdocreport+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.