Document based on a template loses normal style after saving with Aspose

Hi,


In order to reproduce follow these steps:

* Create a new template (T.dotx) and change the font of the normal (and any other style)
* Create a new document (Doc.docx) from this template and add some text using these new styles

Now run the following code;

var doc = new Document(@“Doc.docx”);
doc.Save(@“Out.docx”);

If you open Out.docx everything is fine.
But if you first rename or delete the original template (T.dotx) and then open Out.docx the file is missing all the style changed.
The original document (Doc.docx) still keeps the original style changes despite the template no longer being there because the latest styles were saved with the document by Word; this is the expected behaviour.

The issue does not exist if the code above is run after renaming/deleting the template.

Cheers,
Hi John,

Thanks for your inquiry.

Could you please attach your Word documents (T.dotx, Doc.docx and Out.docx) here for testing? What version of MS Word did you use on your end? Have you tried new Aspose.Words for .NET 16.11.0?

We will then investigate the issue on our end and provide you more information.

Best regards,

Hi,


Attaching the documents will not work because documents based on templates will point to a hardcoded path which will not exist on your machine.

Are you having trouble replicating the steps I gave above?
Hi John,

Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the- sake of correction, we have logged this problem in our issue tracking system as WORDSNET-14429. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

Hi,


Is there any update on this?

I would like to file a related issue:

A document that is linked to a template and has automatic update set up does not apply the style when saved to PDF or HTML.
Steps to reproduce:

* Create a template with some custom fonts/formatting applied to the normal styles (Normal, heading etc.)
* Create a new document from that template
* Go to Options -> Add-ins -> Manage Templates -> Check “Automatically update document styles”
* Save the document as Doc.docx

Run the following code and you will see the fonts are wrong in the output:

var doc = new Document(@“Doc.docx”);
doc.Save(@“Out.pdf”);
doc.Save(@“Out.html”);


I would expect Aspose to apply the fonts from the template created in step 1 before saving.

Cheers,

Hi John,


Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 16.11.0, we managed to reproduce this new issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-14467. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Regarding the previous issue (WORDSNET-14429), this issue is currently pending for analysis and is in the queue. We will inform you via this thread as soon as this issue is resolved. We apologize for any inconvenience.

Best regards,

Hi,


Is there any update on this?

Thanks,
Hi John,

Thanks for your inquiry.

Regarding WORDSNET-14429, our product team has completed the analysis of this issue and the root cause has been identified. They're currently working on finding the best possible solution to implement the fix.

Regarding WORDSNET-14467, this issue is currently in development stage.

We will inform you via this thread as soon as these issues are resolved. We apologize for any inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-14429) have been fixed in this Aspose.Words for .NET 17.1.0 update and this Aspose.Words for Java 17.1.0 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-14467) have been fixed in this Aspose.Words for .NET 17.1.0 update and this Aspose.Words for Java 17.1.0 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.