Free Support Forum - aspose.com

Since aspose.words 11.6 we can't represent non-breaking hyphen on pdf

Hello,
We recently changed our Aspose.Words version from 11.0 to 11.6.
Now we encounter the following problem : a nonbreaking hyphen (Unicode number: U+2011) is (improperly) rendered on the pdf, we see a square instead.
Rtf rendering for the same document is good.
We do not have any missing font warning.

We tried unsuccessfully the following :
- To save the rtf in pdf.
- To embed the fonts (PdfSaveOptions setEmbedFullFonts…)
- To replace the html character by a non-breaking hyphen char (com.aspose.words.ControlChar.NON_BREAKING_HYPHEN_CHAR) in the html before rtf conversion.

Regarding Aspose Words versions:
- 11.0, 11.3, 11.4, 11.5 : OK
- 11.6, 11.11, 13.1 : malfunction

Also, before the 11.6 we had the warning :
“Arial Unicode MS font is used in the document. Line spacing could be rendered differently” (this warning disappearance occurs at the same time we have this problem, could this fix compromise pdf rendering?)

In attachment a sample document in rtf and pdf (problem located on the rendering of the hyphen in “[…] <span style=“font-size:12.0pt;font-family:“Times New Roman”,“serif”;
mso-fareast-font-family:“Times New Roman”;mso-ansi-language:FR;mso-fareast-language:
FR;mso-bidi-language:AR-SA”>L’article L. 1111<span style=“font-size:12.0pt;font-family:“MS Mincho”;mso-bidi-font-family:“MS Mincho”;
mso-ansi-language:FR;mso-fareast-language:FR;mso-bidi-language:AR-SA”>‑<span style=“font-size:12.0pt;font-family:“Times New Roman”,“serif”;mso-fareast-font-family:
“Times New Roman”;mso-ansi-language:FR;mso-fareast-language:FR;mso-bidi-language:
AR-SA”>5 <!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:DoNotShowRevisions/>
<w:DoNotPrintRevisions/>
<w:DoNotShowMarkup/>
<w:DoNotShowComments/>
<w:DoNotShowInsertionsAndDeletions/>
<w:DoNotShowPropertyChanges/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>FR</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val=”–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tableau Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Times New Roman","serif";}

<![endif]–><span style=“font-size:12.0pt;font-family:“Times New Roman”,“serif”;mso-fareast-font-family:
“Times New Roman”;mso-ansi-language:FR;mso-fareast-language:FR;mso-bidi-language:
AR-SA”>[…]")<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:DoNotShowRevisions/>
<w:DoNotPrintRevisions/>
<w:DoNotShowMarkup/>
<w:DoNotShowComments/>
<w:DoNotShowInsertionsAndDeletions/>
<w:DoNotShowPropertyChanges/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>FR</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tableau Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Times New Roman","serif";}

<![endif]–>.

Thanks in advance for your help.

Gilles Pajany

Hi Gilles,


Thanks for your inquiry. I have tested the scenario and have not found any issue with output PDF file while using latest version of Aspose.Words for Java. Please use the latest version of Aspose.Words for Java v13.1.0. I have attached the output PDF file with this post for your kind reference.

If you still face problem, please share following details:
What environment are you running on?
  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • Java version

Hi Tahir,
we try the RTF we give you also and it works for us too! In fact we put the RTF after open it and save it in word and this operation change everything. I attach a file essai_v11.5.rtf with the bug.

Our investigation show that the bug is not in the RTF generation (no differents beetween 11.5 and 11.6) but only in the pdf conversion.

For information we try with Aspose 11.6, 11.11 and 13.1 both on Windows XP and linux/Oracle 5.8.

Under Linux with 13.1 we have an other error:
Caused by: java.lang.StackOverflowError
at asposewobfuscated.ëE0.(Unknown Source)
at asposewobfuscated.ëF6.ëYO(Unknown Source)
at asposewobfuscated.ëGZ.ëZ(Unknown Source)
at asposewobfuscated.ëGZ.ëZ(Unknown Source)
at asposewobfuscated.ëH5.ëZ(Unknown Source)
at asposewobfuscated.ëH5.ëZ(Unknown Source)
at asposewobfuscated.ëH5.ëZ(Unknown Source)


Best regards.

Hi Gilles,

Thanks for sharing the details. I have managed to reproduce the hyphen issue at my side. I have logged this issue as WORDSNET-7858 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

Regarding exception issue, I will check this issue at Linux and will update you asap.

We apologize for your inconvenience.

OK Tahir, THX for your answer.
Regarding the issue number (WORDSNET-7858) please note that we have the issue on a Java platform (Shouldn’t it be WORDSJAVA-…?).

Hi Gilles,


Thanks for your inquiry. Please note that the latest version of Aspose.Words for Java is completely auto-ported from .NET, i.e. we do not write code for Aspose.Words for Java; it is generated out automatically from C# code of Aspose.Words for .NET.

I reproduced the hyphen rendering issue while using Aspose.Words for .NET that is the reason I logged this issue as WORDSNET-7858. If the issue only appears in Aspose.Words for Java then the issue ID should be like WORDSJAVA-xx.

Regarding Exception issue at Linux Operating System, I have managed to reproduce the same issue at my side while using Aspose.Words for Java. I have logged this issue as WORDSJAVA-693 in our issue tracking system. 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.

Hello Tahir.
Additionaly, we are eager to have a new version soon as we just discovered the following bug, bug only present after version 11.1 : with pdf the line spacing after a paragraph containing a non breakable hyphen is bigger than the line spacing after a paragraph without. Rtf version is OK.

This is a major issue as we have to produce strictly identical documents whatever format the user choose.

This problem “seems” to be absent on the 13.1, but this is to be confirmed as long as with the 13.1 we still have the problem reported in the current tread.

So we stay stucked on the 11.1 :frowning:

Hi Gilles,


Thanks for your inquiry. I have verified the status of both issues WORDSNET-7858 and WORDSJAVA-693 from our issue tracking system and like to share with you that both issues have been resolved.

Our development team has recently fixed a bug (asian font substitution) which solve the hyphen rendering issue as well. Our development team has not reproduced your issue while using latest version of Aspose.Words (v13.2.0).

The fix of these issues will be included in the next version of Aspose.Words (v13.2.0) which is planned to be released in a couple of days. We will inform you via this forum thread as soon as the new release is published.

We appreciate your patience.

The issues you have found earlier (filed as WORDSJAVA-693) have been fixed in this .NET update and this Java update.


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

The issues you have found earlier (filed as WORDSNET-7858) have been fixed in this .NET update and this Java update.


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

Hello Tahir,

It’s excellent! We installed this new version and everything seems to work fine!
Also, this version is noticeably faster!

Thanks a lot!
Kind regards,

Gilles Pajany