I noticed a bug : when we remove a space character in an Aspose text Run, and then save the Aspose document, the doc file is correct, but the Jpg file is not correct : the space character is still displayed.
I tried with 9.1 and the new 9.2, it is the same problem.
In attachment, here is an example. And below, the C# code to reproduce the problem :
Document doc = new Document("test.doc");
var runlist = doc.GetChildNodes(NodeType.Run, true);
string text = ((Run)runlist[0]).Text; // = "It is the same as saying "
((Run)runlist[0]).Text = text.Substring(0, text.Length - 1); // Remove last space character
// => "It is the same as saying"
doc.Save("out_auto.doc", SaveFormat.Doc); // "It is the same as sayingthat."
doc.Save("out_auto.jpg", SaveFormat.Jpeg); // It is the same as saying that."
Hi
Thanks for your request. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed. As a workaround please try using the following code:
Document doc = new Document("test.doc");
Node[] runlist = doc.GetChildNodes(NodeType.Run, true).ToArray();
foreach (Run run in runlist)
{
run.Font.ClearFormatting();
}
string text = ((Run)runlist[0]).Text;
((Run)runlist[0]).Text = text.Substring(0, text.Length - 1);
doc.JoinRunsWithSameFormatting();
doc.Save("out_auto.doc");
doc.Save("out_auto.jpg", SaveFormat.Jpeg);
Hi,
This is an unlucky combination of font, size, particular characters in a particular combination where GDI+ renders text narrower than corresponding width reported to AW by the True Type font.
If I make font bigger in your document, say 20pt, the problem is far less noticeable.
At this stage I am inclined to mark this issue as “won’t fix” until we get more reports of affected customers because the fix is not going to be trivial.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.