Issue with rendering of bulleted and numbered lists

Hello,

We use the library aspose.words.java to transform a .docx document obtained by running a Jasper Report and using the AWDocxExporter exporter from aspose.words.jasperreports_2.3.0.

This processing worked fine with aspose.words.java_15.2.0 and delivers wrong rendering for word lists with all newer versions (15.3.0 – 15.6.0).

The issue can be reproduced using the attached files:

  1. Copy the files AsposeListIssueInputOk.docx and AsposeListIssueInputNotOk.docx to c:\temp
  2. Run the java class AsposeListIssueTest.java
  3. Check the obtained files C:\temp\AsposeListIssueOutputOk.docx and C:\temp\AsposeListIssueOutputNotOk.docx. These files should be identical.

The file “AsposeListIssueInputOk.docx” was created by editing a new Word document; the obtained result is correct.

The file “AsposeListIssueInputNotOk.docx” has the same content, but was generated by running a Jasper Report; the obtained result is not correct (wrong indentation in word lists).


Many thanks for your help.
Dan

Hi Dan,


Thanks for your inquiry. We are working over your query and will get back to you soon.

Best regards,

Hi Dan,


Thanks for your patience. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-12147. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Dan,


Thanks
for your patience. It is to update you that our development team has completed the
analysis of this issue and has come to a conclusion that they won’t be
able to implement the fix to this issue. Most likely, your issue will be
closed with ‘‘Won’t Fix’’ resolution.

Please note that Aspose.Words mimics the same behavior as MS Word does. Please execute the following VBA code to check the MS Word’s behavior. I am quoting developer’s comments here for your reference.

The problem is in direct left indent of paragraphs. In ‘good’ customer’s file it is missed and in ‘bad’ file it exists. In ListFormat.ListId setter we have special logic that updates non-zero left indent from the applied list. This logic comes from the VBA. However, if list is applied in Word GUI it simply removes direct paragraph’s left indent.

Sub TestLists()

ChangeFileOpenDirectory ("C:\Notok")

Documents.Open ("AsposeListIssueInputNotOk.docx")

ActiveDocument.Paragraphs(3).Range.ListFormat.ApplyNumberDefault

ActiveDocument.Paragraphs(4).Range.ListFormat.ApplyBulletDefault

MsgBox ActiveDocument.Name & vbCrLf & _

"Numbered para leftIndent = " & ActiveDocument.Paragraphs(3).LeftIndent & vbCrLf & _

"Bulleted para leftIndent = " & ActiveDocument.Paragraphs(4).LeftIndent

ActiveDocument.Close (wdDoNotSaveChanges)

Documents.Open ("Out v15.6.0.docx")

MsgBox ActiveDocument.Name & vbCrLf & _

"Numbered para leftIndent = " & ActiveDocument.Paragraphs(4).LeftIndent & vbCrLf & _

"Bulleted para leftIndent = " & ActiveDocument.Paragraphs(5).LeftIndent

ActiveDocument.Close (wdDoNotSaveChanges)

End Sub


Moreover, could you please share your .jrprint file which you used to generate the AsposeListIssueInputNotOk.docx? We will check if this issue is with Aspose.Words for JasperReports.

Hi Tahir,

Please find attached a zip containing 3 files:
1.AsposeListIssueInputNotOk.jrprint: file used to generate the file AsposeListIssueInputNotOk.docx
2.AsposeListIssueInputNotOk.docx: file generated using aspose.words.jasperreports_2.3.0
3.AsposeListIssueOutputNotOk.docx: file obtained by running AsposeListIssueTest.java from previous post (17 july 2015).

As mentioned, this issue can be reproduced only with aspose.words.java starting with 15.3.0 (15.2.0 is working correctly).
Please let me know if you need something else.
I hope the development team will review his decision.
Many thanks in advance for your support.

Dan

Hi Dan,


Thanks
for your inquiry. Please note that
Aspose.Words mimics the same behavior as MS Word does. Aspose.Words and VBA code generate the same output. So, this is not a bug in Aspose.Words.

As per analysis of WORDSNET-12147, the problem is in direct left indent of paragraphs. This is not present in document generated by MS Word and exists in document generated by Aspose.Words for JasperReports (e.g AsposeListIssueInputNotOk.docx). I have logged this issue as WORDSJSP-166 in our issue tracking system. We will inform you via this forum thread about the analysis of this issue.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSJSP-166) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.