We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Wrong Line Spacing with AWDocxExporter Version 22.3.0

Aspose19.7to22.3.pdf (53.8 KB)

Hello,

Line spacings generated by AWDocxExporter in version 22.3.0 are miscalculated.

In version 19.7 the line spacing is like what JRDocxExporter is generating.
In version 22.3.0 the line spacing is not like designed. (See attachment)

Suppose we have a text field with single line spacing in the jrxml file:

<textElement verticalAlignment="Top" markup="styled">
  <font fontName="Verdana" size="9" isBold="true"/>
  <paragraph lineSpacing="Single"/>
</textElement>

We get the following results:

  • JRDocxExporter
    Paragraph setting -> Line spacing: Single

  • AWDocxExporter 19.7
    Paragraph setting -> Line spacing: Exactly 10.95Pt for Verdana 9
    (Paragraph setting -> Line spacing: Exactly 8.5Pt for Verdana 7)
    Approx. 122% or factor 1.22 of font size.

  • AWDocxExporter 22.3.0
    Paragraph setting -> Line spacing: Multiple 1.25 for all fonts

The resulting line space is too big. Also, I could not find any workaround since the exporter parameters USE_EXACT_SPACINGS, SPACING_FACTOR and USE_EXACT_ROW_HEIGHTS don’t seem to influence the line spacing setting in my case.

The library should IMHO either stick to the old calculation with exact line spacings or change the setting to single line spacing.

Best regards,
Boris

Hi @borelli

I will return line spacing settings to normal behavier in WORDSJR-325 in 22.4 release and I will add new exporter parameter for new behavier to other users who ask about line spacing 1.5 and 2.0

Hello @asidorenko,
This sounds like the perfect solution. Thanks for your efforts and the quick reply!
Best regards,
Boris

1 Like