Custom numbered list format

Hi,

We have a custom numbered format defined in a normal.dotm file. So we can use that custom number in every word document. When we try to open existing document with aspose.words .net (15.10 version) and save without any changes to a different file, that target documents numbered list format is resetted to a default number format. Actually it overrides our custom number format. Is there a way to preserve custom number format while saving document.

My existing document has a list in it like:

aa. Foo
bb. Bar
cc. Baz

That number format comes from normal.dotm file. I open this document with aspose words and save it without any changes to another file. It becomes like :
1. Foo
2. Bar
3. Baz

Hi Ibrahim,


Thanks for your inquiry. Could you please attach your input Word document here for testing? We will investigate the issue on our side and provide you more information.

Here my sample docx file. Our code is very simple like :

var doc = new Document(“sample.docx”);
doc.Save(“test.docx”,SaveFormat.Docx);
Office version is 2010. We have extracted contents of original docx file and numbering.xml contains our custom numbering format below
<w:nsid w:val="386B1090" />
<w:multiLevelType w:val="hybridMultilevel" />
<w:tmpl w:val="5A562B58" />
- <w:lvl w:ilvl="0" w:tplc="214CB284">
<w:start w:val="1" />
- <mc:AlternateContent>
- <mc:Choice Requires="w14">
<w:numFmt w:val="custom" w:format="a, ç, ĝ, ..." />
</mc:Choice>
- <mc:Fallback>
<w:numFmt w:val="decimal" />
</mc:Fallback>
</mc:AlternateContent>
<w:lvlText w:val="%1." />
<w:lvlJc w:val="left" />
- <w:pPr>
<w:ind w:left="720" w:hanging="360" />
</w:pPr>
- <w:rPr>
<w:rFonts w:hint="default" />
</w:rPr>
</w:lvl>
- ....

But target document doesnt have these values.

Hi Ibrahim,


Thanks for sharing the document. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-12785. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi,

Is there an ETA (next version or later) for this issue handled or implemented. We have limited time before our production phase. We need a workaround for this. If we know when its gonna be fixed so we can decide what to do berfore production.

Hi Ibrahim,


Thanks for your inquiry. It is to inform you that issues/feature are addressed and resolved based on first come first serve basis. Currently, your issue is pending for analysis and is in the queue. Once our product team completes the analysis of your issue, we will then be able to provide you an estimate.

Thank you for your patience and understanding.

Hi, is there any news about this issue?

We have applied a workaround for this and i would like to share it. It may help others having same issue.
As we know it is caused by aspose modifying original numbering.xml :
  • we open docx file as a zip file
  • read numbering.xml into temp
  • use aspose to modify document and save
  • reopen file as a zip
  • replace numbering.xml with temp
But this solution only applies when you are saving document as docx file. If you are trying to save as a pdf same issue continues so we had to use word iterop apis to save as a pdf.

Hi Ibrahim,


Thanks for your inquiry. It is nice to hear from you that you have found the workaround of your issue in Docx.

We regret to share with you that your issue has been postponed. We will inform you via this forum thread as soon as there are any further developments.

We apologize for your inconvenience.

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


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

Hi,


Thank you for your attention, This feater helped us alot. (Atleast saved billions of CPU ticks :slight_smile: ). Now we have a relevant situation which is when we try to convert similar kid of word documents to PDF we got a System.ArgumentOutOfRangeException about enum Aspose.Words.NumberStyle

Hi,


We have discovered that problem was solved with WORDSNET-14571. We were using older version of Aspose.Words
Hi Ibrahim,

It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.