[Java] Bullet and text position in SVG output

When text is in placed inside a block and formatted using text block margins or paragraph indents, there are some text positioning issues:

  1. Text is vertically too high, so it overlaps the block boundary
  2. There is too much spacing between the bullet character and the associated text
  3. When paragraph indenting is used, it bleeds into the bullet list, which is different from how Visio deals with the indentation

Attached is a zip containing:

  1. indents-and-margins.vsdx - source Visio
  2. indents-and-margins.svg - SVG saved from Visio
  3. indents-and-margins.svg - SVG created with Diagram 18.3

The diagram contains 3 blocks, one with no margins/indent, one with text block margins and one with paragraph indent.

All three blocks show the incorrect vertical spacing of text and spacing between bullet point and text.

The block with paragraph indents shows the bullets in the wrong position.

Looking at the output SVG, Visio creates the bullet elements within a single <text> block, as a series of <tspans> broken up by <newlineChar> elements. Aspose is currently creating all the parts of the bullet list as individual <text> elements. Visio also outputs the bullet point as unicode ‘MIDDLE DOT’ (U+00B7) while Aspose is outputting U+F06C which works for Wingdings, but isn’t portable. It would be preferable to use the Unicode character for portability.

bullets-and-indents.zip (13.4 KB)

Thanks
Vittal

@vittala,

We managed to replicate the said problem in our environment. It has been logged under the ticket ID DIAGRAMNET-51446 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.

Thanks @imran.rafique

One of the things to also consider is, when creating an SVG text block containing a list, it might be nice to add a css class attribute to the text block so that it’s identified as a list. Then the SVG list text can be styled more easily. At the moment, it’s not possible to identify list text.

Regards
Vittal

@vittala,

We have logged an enhancement ticket ID DIAGRAMNET-51447 in our issue tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.

The issues you have found earlier (filed as DIAGRAMNET-51446) have been fixed in Aspose.Diagram for .NET 19.6.

Hi
Will this also be fixed for Java?

Thanks
Vittal

@vittala

Yes, the fix against this issue has also been ported into Java API. In case you face any issue, please feel free to let us know.

The issues you have found earlier (filed as DIAGRAMNET-51447) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou