Problem with HTML fragments and images

Hello,


Currently we are evaluating Aspose Pdf for generating PDF documents in our product. For us it’s an important feature to be able to use/put html formatted text in the PDF documents. Right now we are having problems with documents, or more specifically pages in the document that contain both HtmlFragment and Image components. In some cases the image is not rendered in the PDF and when opening the document in Adobe Reader a warning is displayed that the document contains an error. Also on pages with HtmlFragment the evaluation header is broken and most characters are not displayed. Perhaps the problems are related.

The problem can be reproduced with the following code:
Document document = new Document();
Aspose.Pdf.Page page = document.Pages.Add();
page.Paragraphs.Add( new TextFragment( “this is text” ) );
HtmlFragment fragment = new HtmlFragment( “this is html text” );
page.Paragraphs.Add( fragment );
Image logo = new Image();
logo.File = “”;
page.Paragraphs.Add( logo );
using( MemoryStream stream = new MemoryStream() )
{
document.Save( stream );
// etc.
}

Perhaps we are simply doing something wrong. Is there anything we can do to fix the problem?

Thanks!

Gido

Hi Gido,

Thanks for your inquiry. I have tested your scenario using Aspose.Pdf for .NET 11.0.0 and managed to observe the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-39749 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;line-height:115%;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-39749) have been fixed in Aspose.Pdf for .NET 11.1.0.


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