Page 1 of 1

dotx files 2013 to 2010

PostPosted: Wed Oct 29, 2014 2:29 am
by meknownothing
Hi,

Is it possible to use docx4j to convert a 2013 dotx template to 2010 format?

Or when this is not possible does anybody know the difference between the 2?

Re: dotx files 2013 to 2010

PostPosted: Thu Oct 30, 2014 11:07 pm
by jason
docx4j gracefully degrades the docx by dropping certain 2013 things.

This happens in 2 ways:

1. https://github.com/plutext/docx4j/blob/ ... essor.xslt makes certain selections from mc:AlternateContent

2. any elements in the w15 namespace which aren't in https://github.com/plutext/docx4j/tree/ ... docx4j/w15 would be dropped

Now, if your template included elements in the w15 namespace which are in the package org/docx4j/w15, docx4j would keep them, so you'd have to remove them to get a pure 2010 format document

Re: dotx files 2013 to 2010

PostPosted: Thu Oct 30, 2014 11:16 pm
by meknownothing
Thank you Jason.

But, if I am correct, your answer is about adding a 2013 template to a 2010 document.

But what I really need is 'converting' the 2013 template to a 2010 template.

Or should I create an empty 2010 document, add the 2013 template and save the new document as 2010 template?
(Is that at all possible because I have not used docx4j yet, just looking for a solution to this problem).

Re: dotx files 2013 to 2010

PostPosted: Fri Oct 31, 2014 7:11 am
by jason
What is the actual practical problem here?

Perhaps you could attach your 2013 template and I'll take a quick look at it to identify any 2013 specific content.

Re: dotx files 2013 to 2010

PostPosted: Mon Nov 10, 2014 11:51 pm
by meknownothing
Hi Jason,

I completely missed your post.

The issue has nothing to do with docx4j but with my app but I hope that docx4j will come to a rescue :)

The attached templates are from Word 2010 and 2013.

When using the 2010 template the new document comes out fine.
When using the 2013 template the new document comes out without any text from the template..