Numbering wrong

Hello

Numbering of headings in Word doc are wrongly rendered. Please have a look in the attached original Word doc and the generated Pdf.

Thanks,

Roger

Hello Roger,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have tested the issue using Aspose.Words 5.3.0.0 and Aspose.Pdf 3.9.0.0 and I am able to notice the problem. The issue is occurring at Aspose.Words team, as the information in the intermediate XML is not appropriate. I've made little changes in the XML and now the Pdf is being generated fine. The file is in attachment.

The issue has been communicated to Aspose.Words team. As soon as we have made some progress over this matter, we will update you with the status. We apologize for your inconvenience.

Hello Roger!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your inquiry.

I’m Viktor, the developer on Aspose.Words Team responsible for integration with Aspose.Pdf. My colleagues asked me to take a look on your case.

Issue with incorrect numbering is induced by a known problem that was logged as WORDSNET-5949. It was addressed a month or two ago but turned out to be quite complex and wasn’t fixed.

I’ll explain the technical reason of this defect. Logical structure of the document is not the same as we see and what we’d like to get from it. Visually there are two lists. But the second item of the second list really belongs to the first list and label should be overridden. You can watch this by selecting its label in MS Word. When you select it, all labels of the first list will be highlighted. According to WORDSNET-5949 Aspose.Words is not keen on such numbering overrides.

There is a simple workaround. See my attachment. I copied the first item of the second list, moved the content of incorrect item to correct one and deleted unneeded item. Now logical structure is what we expect from it and all converts fine. Please try this workaround and let me know whether this helps.

Regards,

Hi Klepus and codewarior

Thanks for your support.

The attached Word doc is the "minimized" output of using Aspose.Words as a templating engine. Meaning the ListItems have been imported from different Word docs into a base template. So, it is not an easy thing to make all changes Klepus has described programmatically on the whole document after compiling the document from different sources. And adapting all source documents is cumbersome and error-prone too.

If the solution of codewarior works, I would prefer this one. Will this "bugfix" be included in all future releases of Aspose.Pdf?

Thanks,

Roger

Oh, I just realized that XML has to be adapted! :-(

Or is Aspose.Pdf taking care of that? I think the internal ID of lists is changing inbetween, so this should be feasible.

Cheers,

Roger

Hi Roger,

The XML is generated by Aspose.Words and we can't fix it on Aspose.Pdf side. This issue will be fixed in Aspose.Words.

Hello

Alright, I could adapt the generated XML by looping through corresponding nodes and set IDs to get continuous lists. But before investing too much time in it, I would like to know if there is a chance that this issue gets fixed very soon in Aspose.Words.

Cheers,

Roger

Hello Roger,

As Viktor have already mentioned, that incorrect numbering is induced by a known problem that was logged as WORDSNET-5949. It was addressed a month or two ago but turned out to be quite complex and wasn’t fixed.

Meanwhile, I've also asked the team to share the ETA for the resolution of this problem.

Hi again!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I cannot promise any ETA for this fix. If it was so simple then we would have already done it. If you can describe how you import parts of this document we would try to suggest a workaround.

Regards,

Hi all

I found an easy solution for all my numbering issues.

Each section which needs continuous numbering is using an own heading style. By this way Aspose.Word is generating correct numbering labels in xml.

Thanks for your help,

Roger

I too have the problem where a roman numeral starting the heading is generated after the heading text in pdf, I tried to use a new different style in word to see if that helps, but it didn’t. The only way it started working was if I removed the automatic heading numbering in Word for these headings and manually used tab stops with plain text. Waiting on final solution to be fixed in aspose as we have 400+ document templates that will run through Aspose word for the merge fields and then generated to pdf for the customers. Tweaking 400 documents is not going to be an option.

Thanks

Jim

Hi!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have good news. Yesterday #5949 has been fixed. We are planning to issue a new release in a few days. Maybe even tomorrow. We’ll notify you when it is available.

We are sorry but PDF export module has some restrictions and we cannot promise 100% conversion fidelity for any arbitrary source documents. Inspecting particular cases we usually can figure out what features or techniques are better to avoid. So please feel free in asking our team for any help.

I have tested on Roger’s document. Now it is converted without problems.

Jim, would you please attach any documents showing up this issue? I’ll test on them and ensure our fix is reliable. If they are large you can cut minimal samples from them and/or point me where the problem is. Thank you in advance.

Regards,

Thanks! Looking forward to the release. Attached is the simplified file I run through the word merge field processor and then feed it to generate as a pdf. This way we maintain the documents in Word and send PDF to the customers. I reduced it to nothing but headings so it should be easy to examine. I tried setting a new style and retyping the headings but it only seemed to work on the first heading.

Jim

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional materials.

I have tried converting this document to PDF. Numbering is okay. The only issue I see with this document is that label “III.” has different font size (Arial, 11 and others are Arial, 14) but Aspose.Words ignores this. Please clarify what’s wrong with it.

Regards,

When using version 3.8.0 it formats the roman numerals II, III, IV, V to the right of the heading text in PDF output like this:

I. INSURING AGREEMENTS
a. w
DEFINITIONS II.
w
LIMITS OF INSURANCE III.
w.
DEDUCTIBLE IV.
A. w
CONDITIONS V.
w

If it works in the latest release candidate then that’s cool with me. As far as a font difference on III, that’s not an issue, it is just a typo in the word doc.

Thanks

Jim

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for clarification. If you mean that some list labels disappear then I probably know how to help you. A very similar issue was fixed in Aspose.Pdf 3.9.0.0. Just upgrade to the latest versions of the components:

Aspose.Words 5.3.0:

http://www.aspose.com/community/files/51/file-format-components/aspose.words/entry148443.aspx

Aspose.Pdf 3.9.0.0:

http://www.aspose.com/community/files/51/file-format-components/aspose.pdf/entry151891.aspx

Regards,

We are happy to tell you that we released new version of Aspose.Words. This version includes fix of issues you found earlier (issue # 5949, 6617). You can download new version from here:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

http://www.aspose.com/community/files/51/file-format-components/aspose.words/entry154627.aspx

Best regards.