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

Free Support Forum - aspose.com

Textboxes not correclty positionned in html export for rtf documents

Hello

We discovered that html export for rtf documents containing textboxes is not correct in terms of positionning (screenshot bad.png)

The same textboxes saved as std .doc are correctly rendered (screenshot good.png)

Is this a known issue ?

Sebastien

with attachments

Hi Sebastien,


This is expected behavior of Aspoe.Words and MS Word 2016. Please use the following code instead:

Document doc = new Document(filePath);

doc.Save(MyDir + @"16.7.0.html", SaveFormat.HtmlFixed);


Best regards,

I confirm that with HtmlFixed mode I get a much better display

However I have two issues with that:

_ The output is very big because each word is surrounded by a span with exact positionning

_ I do not manage anymore to do highlight of phrases because words are split by these spans

Is there a mode where aspose produces a per line rather than per word ?

It would diminish the total size while conserving the formatting and would help to do phrases matching

Hi Sebastien,


You can try calling doc.JoinRunsWithSameFormatting(); method before the Save method. I am afraid, there does not seem to be a way to reduce number of spans in generated Html. You may also want to check various HtmlFixedSaveOptions class members. If we can help you with anything else, please feel free to ask.

Best regards,

Even with doc.JoinRunsWithSameFormatting(), we still have one span per word and per space

I didnt see any options in HtmlFixedSaveOptions class which reduces this number of spans

We would be very happy with a feature that can gather more words in a single span (per line for ex)

Hi,

Thanks for your inquiry. For the sake of any correction, we have logged this problem as WORDSNET-14160 in our issue tracking system. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

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


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

Thanks for the improvement
However, it seems that you are still generating one span per word when the text is justified rather than one span per line
It could also be handled with one span per line + some css trick like text-justify, no ?

Hi,

I am in coordination with product team to get answer pertaining to your queries. Soon you will be updated with the required information.

Best regards,
Hi Sebastien,

exalead_rd:
Thanks for the improvement
However, it seems that you are still generating one span per word when the text is justified rather than one span per line
It could also be handled with one span per line + some css trick like text-justify, no ?

We have logged your requirement n our issue tracking system as WORDSNET-14527. Our product team will further look into the details of this problem and we will keep you updated on the status of this issue. We apologize for your inconvenience.

Best regards,

Do you know if there is already a target date for the fix on the justified text ?
We have a customer who is waiting for it
Thanks

Hi Sebastien,


Thanks for your inquiry. We regret to share with you that implementation of this issue (WORDSNET-14527) has been postponed for now (no ETA available). However, the fix of this problem may definitely come onto the product roadmap in the future. Unfortunately, we cannot currently promise a resolution date. We apologize for your inconvenience and thank you for your understanding.

We cannot rely on CSS text justification, because ‘text-align: justify’ doesn’t work with ‘white-space: pre’ we use. The only browser in which we managed to get text justified as in MS Word is Chrome. In that browser the style combination ‘text-align-last: justify; white-space: pre-wrap’ does the trick. However, in most browsers ‘text-align: justify’ works only with ‘white-space: normal’, which also turns on collapsing of adjacent whitespace characters. As a result, justified text in browsers look different from that seen in MS Word, because in Word adjacent spaces never collapse. Moreover, ‘white-space: normal’ is known to cause issues with spaces in bidi text, because spaces are collapsed before the text is reordered.

We cannot make the requested change now, since most browsers don’t implement the text justification method we need. The situation may change in the future, so we’ll return to this task later. Until then we have to rely on Aspose.Word’s layout mechanism to justify text and position each word in HTML individually.

Best regards,