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

Free Support Forum - aspose.com

Aspose changes text content in Word document

Hello

When the attached .doc file is opened using Aspose.Words for Java (16.12.0) to render to png, the text element “Monsieur le maire le maire” is displayed instead of “Monsieur le maire”.

How do I get the same behaviour as MS Word ?

Regards

Hi Jean,

Thanks for your inquiry. After an initial test with Aspose.Words for Java 16.12.0, we were unable to reproduce this issue on our end on Windows 10. Could you please share your source code here for testing? We will investigate the issue further on our end and provide you more information.

Best regards,

Here is my source code:

Document document = new Document(“aspose-err2.doc”);
if (document.getPageCount()>=1) {
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.PNG);
options.setPageCount(1);
options.setPageIndex(0);
options.setResolution(100);
document.save(out, options);
}

With out = HttpServletResponse.getOutputStream()

I’m on:
  • Windows 10 Pro
  • jdk1.8.0_25_x64

Hi Jean,


I am afraid, we are still unable to reproduce this issue on our end over Windows 10 Java 8 (English regional settings). Please see attached output. Please provide some more details which will help us to reproduce your scenario on our end. Thanks for your cooperation.

Best regards,

When I start a new minimalist java project with only one dependency (aspose), I don’t have this issue.

I think this issue comes from a conflict between aspose and at least another jar of our main project.

I joined the dependency tree of our project. Do you know if one of those lib is used by aspose (and with wich version for aspose ?) ?


Hi Jean,

Thanks for the additional information. We are in coordination with product team to get answer pertaining to your queries. Soon you will be updated with the required information.

Best regards,

I found the origin of the issue:

When you open a doc file with aspose and save it to png =>the png is ok
When you open a doc file with aspose, check page count, and save it to png => the rendered png is wrong

Document document = new Document(“aspose1.doc”);
document.save(“aspose1-right.png”, options);
document.getPageCount(); // document internal data may be corrupted after this
document.save(“aspose1-wrong.png”, options);

I joined a minimalist example to reproduce the issue.

Hi Jean,


Thanks for the additional information.

While using the latest version of Aspose.Words i.e. 16.12.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-14732. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

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


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

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan