Handling of Unicode Supplemental Characters for Image preview

Hi folks!


com.aspose.words.Document.renderToSize() seems to have troubles rendering Unicode characters within the supplemental range. Instead of the Unicode characters, boxes are displayed (see the attached png image).

Attached to this message, three samples (doc, docx, odt) files which are working fine when extracting HTML (com.aspose.words.Document.save() with HtmlSaveOptions(SaveFormat.HTML)), but not when using com.aspose.words.Document.renderToSize()

This is a small issue, but if it could be handled in a future version of Aspose Words, this would be great!

Code snippet:

final BufferedImage image = new BufferedImage(renderWidth, renderHeight, BufferedImage.TYPE_INT_ARGB);
final Graphics2D gr = image.createGraphics();
gr.setColor(Color.WHITE);
gr.fillRect(0, 0, image.getWidth(), image.getHeight());
gr.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

doc.renderToSize(page, gr, 0, 0, renderWidth, renderHeight);

final ByteArrayOutputStream out = new ByteArrayOutputStream();
ImageIO.write(image, “png”, out);


Hi Laurent,

Thanks for your inquiry. I tested the scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-9839. Our development 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,

Hi Laurent,


Thanks for being patient. Can you please open this document ‘unicode_supplementary_character_sample.doc’ with MS Word, take a screen shot of the content and attach it here for our reference.

Best regards,

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


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

Hello,

I retried with Aspose.Words 15.1 and even 15.11 which are supposed to contain the fix and in both cases, I still see a list of squares when rendering to image (see attachment)

Sebastien

Hi Sebastien,


Thanks for your inquiry. You’re right. We notified our product team of your concern and have logged another issue to address this problem. The ID of this issue is WORDSNET-12884. We will inform you as soon as this issue is resolved. We apologize for your inconvenience.

Best regards,

In addition to the previous problem, for rtf files only, these characters do not work for html extraction as well. I have attached the sample file.

Hi Sebastien,

Thanks for your inquiry.
Sebastien:
In addition to the previous problem, for rtf files only, these characters do not work for html extraction as well. I have attached the sample file.
While using the latest version of Aspose.Words i.e. 16.1.0, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-13090. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,