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

Free Support Forum - aspose.com

HtmlFragment breaks the text in PDF file

I am using Aspose.PDF for .Net v10.7.0.0

it used to work in Aspose.PDF for .Net v 10.5.0.0

I have one HtmlFragment between two TextFragments, when the two TextFragments are using different fonts, the one after HtmlFragment will be broken.
Sample here:

private static void Breaks()
{
var doc = new Document();
var page = doc.Pages.Add();
var textSegment1 = new TextSegment(“text fragment test1”)
{
TextState =
{
Font = FontRepository.FindFont(“Meta Serif Offc Book”)
}
};

var text1 = new TextFragment();

text1.Segments.Add(textSegment1);
page.Paragraphs.Add(text1);

var htmlFragment = new HtmlFragment(“

Welcome to Aspose

”);
page.Paragraphs.Add(htmlFragment);

var textSegment2 = new TextSegment(“text fragment test2”)
{
TextState =
{
Font = FontRepository.FindFont(“Proxima Nova Regular”)
}
};

var text2 = new TextFragment();

text2.TextState.Font = FontRepository.FindFont(“Trade Gothic LT Com Bold”);

text2.Segments.Add(textSegment2);

page.Paragraphs.Add(text2);

doc.Save(@“c:\temp\fontbreak.pdf”);

}

Hi Patrick,

Thanks for your inquiry. I have tested the scenario using Aspose.Pdf for .NET 10.7.0 and 10.5.0. I have managed to notice the regression issue., so I have logged an issue in our issue tracking system as PDFNEWNET-39292 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

We are sorry for the inconvenience caused.

<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;mso-fareast-font-family:
Calibri;color:#333333;mso-ansi-language:EN-US;mso-fareast-language:EN-US;
mso-bidi-language:AR-SA”>Best Regards

The issues you have found earlier (filed as PDFNEWNET-39292) have been fixed in Aspose.Pdf for .NET 11.1.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.