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

Free Support Forum - aspose.com

RTF > DOCX makes word joiner characters wide

Hello,

I sometimes need to insert a word joiner character (Unicode 0x2060) between two words or characters to ensure they stay on the same line. However, there seems to be a bug in Aspose (I think) whereby the word joiner will look like a space in the final document. In fact, I’m not sure if this is a bug in Aspose or an oddity of Word, because the character still seems to be a word joiner in Word. Here’s how to test it, though:

  1. Download and unzip the attached file to extract word-joiner-bug.rtf. Open the file in an RTF editor. You will see that it starts with the following text:

Abstract
This is the Abstract

After this is a superscript “1”. Between “Abstract” and the superscript “1” is a word-joiner character. You can see this by moving the cursor using the arrow keys through the text - you’ll see it gets stuck a character before the “1”, where the invisible word-joiner is.

  1. Open word-joiner-bug.rtf in Word (I’m using Office 365 for Mac, Word 16.10). Note that everything looks as expected - the word-joiner is invisible.

  2. Use File > Save As and save the document as a .docx file. Then close and reopen the file. You’ll see the word-joiner is still invisible.

  3. Now use Aspose.Words to convert word-joiner-bug.rtf file to .docx, and open the converted .docx file in Word.

At this point you will see that it looks as though there is a space between “Aspose” and the “1”. The word-joiner character is as wide as a space for some reason.

Strangely, if I Save As from Word to save the converted .docx file back to RTF, then close and reopen the file, the space is gone. So I’m not sure if this is Word or Aspose’s problem, but saving the .docx file from Word doesn’t have the problem - the problem only occurs when converting using Aspose.

I hope that makes sense.

Thanks,
Keith

word-joiner-bug.rtf.zip (1.2 KB)

@kayembi,

Thanks for your inquiry. After an initial test with latest version of Aspose.Words for .NET 18.2, we were unable to reproduce this issue on our end. Please see attached output DOCX file (18.2.zip (6.8 KB)).

In case the problem still remains, please share piece of code and output DOCX file showing the undesired behavior here for further testing.

Hi,

Thanks for looking into this. I should have clarified that I am using the Java version, but it seems that makes no difference anyway. I tried downloading the .docx file you attached to your reply (18.2.docx), but opening it in Word, and I see the gap that I reported before the number (Word for Mac 16.10). Also, in an older version of Word (15.11.2) on another machine, the word-joiner comes out as a square. As I say, this only happens when converting using Aspose - if I open an RTF file in Word and save as .docx from there, the gap does not appear.

I have attached a zip file containing a screenshot of how the file you attached looks in the latest version of Word for Mac, as well as the Word version number (please ensure you are testing with Word for Mac).

Thanks,
Keith

WordGap.zip (127.9 KB)

@kayembi,

Thanks for the additional information. We will check this scenario on a MAC OS and will update you soon.

@kayembi,

Thanks for being patent. We logged this problem in our issue tracking system. The ID of your issue is WORDSNET-16586. Your thread has been linked to this issue and you will be notified as soon as this is resolved. We apologize for your inconvenience.

@kayembi,

During investigating WORDSNET-16586, we have found that the issue is reproducible on Word for MAC and WordPad. Word for Windows is able to show Aspose.Words output correctly.

We have checked such strange behavior on Word for MAC version 14.6.4, where word joiner character is displayed as an empty square. In order to speed up the investigation, we need further assistance from you for the following two things:

  1. Create and share a *.docx output of word-joiner-bug.rtf by Word for MAC ver.16.10.
  2. Verify, if the issue still persists on an attached file (18.2_verify.zip (6.8 KB)). (We have made an assumption about possible reasons, and need you to please check it on your end).

Thanks for your cooperation.

Many thanks for investigating.

(When considering the below, please note that I have recently updated my copy of Word for Mac from 16.10 to 16.11, but the results are the same.)

  1. Here is word-joiner-bug.rtf converted to word-joiner-bug.docx using Aspose: word-joiner-bug.docx.zip (7.3 KB). I am still seeing the same issue - there is a space where the word-joiner should be. And here is word-joiner-bug.rtf converted to word-joiner-bug-by-word.docx by opening it in Word and saving it as a .docx: word-joiner-bug-by-word.zip (10.3 KB) There is no problem with the .docx file when it is converted using Word 16.11 - there is no unexpected space.

  2. I have tried opening the 18.2_verify.docx in Word for Mac 16.11 and the bug is still present - I see the unexpected space in 18.2_verify.docx too.

Thanks and all the best,
Keith

@kayembi,

Thanks for the additional information. We will investigate the issue further on our end and will keep you posted on any further updates.

The issues you have found earlier (filed as WORDSNET-16586) have been fixed in this Aspose.Words for .NET 18.5 update and this Aspose.Words for Java 18.5 update.