We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose-words 19.6

I have updated my application to use the latest version and am finding that the docx that I create is different.
I create a docx and then post process it with a docx4j java class to replace all styles and Fonts.
This was working fine but now the WordprocessingMLPackage(docx4j) process fails to open the newly created file.
Attached are the new and old version of the same file created with 19.6 and 16.0 of Aspose Words
NewOld-Prospectus _ Fund Name.zip (70.7 KB)
Not sure how relevant but the exception reported with the new docx is
org.docx4j.openpackaging.exceptions.Docx4JException: No relationship of type officeDocument


Thanks for your inquiry. Have you also tried the latest version of Aspose.Words for Java i.e. 19.11 on your end? In case the problem still remains, please provide complete steps that we can follow on our end along with a simplified Java application to be able to observe the exact same behavior.

I downloaded the latest and it results in the same issue.
I have dug into this issue and have discovered that the new builds name the main part differently.
The new builds reveal:
The old ones:

I believe this is wrong as the docx4J expects the old one?



Thanks for the additional information. By using the documents ‘Old-Prospectus _ Fund Name.docx’ and ‘New-Prospectus _ Fund Name.docx’ that you shared in your first post, please tell, how can we verify on our end the following findings?

Please list the complete steps that we can perform on these .docx files on our end to be able to observe the same problem with reference links. Thanks for your cooperation.

If you open the docx files (unzip) yoy will see a _rels resource. The .rels is not the same as what used to be produced which is causing a problem when docx4j processes the docx files that Apose creates.
Is this something I can set as part of the docx construction?



It looks like Aspose.Words for Java 19.11 will not remove existing http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument if it is already present in source document.

We have tested the scenario with the following MS Word 2019 generated DOCX file:

The “awjava-19.11.docx” was produced by using the following simple code:

Document doc = new Document("E:\\temp\\input.docx");

The issue is not present in this “awjava-19.11.docx”.

Can you please also provide your source Word document along with a simplified Java application to be able to observe the exact same behavior on our end? Thanks for your cooperation.

Sorry for the delay but I have been trying to figure this out.
My core document which is used for all docx file I create indeed does have the http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument in its rels but the older versions of Aspose Words changes/modifies it to http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument so the docx4j library is happy.
The latest version of Aspose Words does not do that so does behave differently.
I have created a new core document with the correct/expected rels and now it is working again.
For now I can proceed testing the new build
Thanks for your efforts


Thanks for the additional information Please let us know anytime if you may have any troubles and we will be glad to look into this further for you.