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