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

Free Support Forum - aspose.com

InsertHTML() method was failing

Hi there,

I am using latest Aspose.Words dlls, but when i pass following HTML to InsertHTML() method, is was failing, please provide the solution ASAP.




 
























Revision  Changed By  Date  Description of Change 

 A


 sri


 06Apr10

 Original document

 B


 dsr


 15Apr10

 Changes as per teleconference on 09Apr10.
       
 



The Error was:
Error was occured while replacing the bookmark TextItemText at ؖ.ࠅ.࠮(String ԃ,
String ࠧ)
at Aspose.Words.Font.set_Name(String value)
at ፰.㖯.㖱(ጜ ૎, Font
ੲ, Boolean 㖲)
at 㳊.㳉.㳷(Ꮺ Ԗ, Boolean 㜩)
at 㳊.㳉.㳢(Ꮺ Ԗ, Boolean 㜩)
at
㳊.㳉.㳡(Ꮺ Ԗ, Boolean 㜩)
at 㳊.㳉.㳟(Ꮺ Ԗ)
at 㳊.㳉.㳟(Ꮺ Ԗ)
at 㳊.㳉.㳟(Ꮺ Ԗ)
at
㳊.㳉.㳟(Ꮺ Ԗ)
at 㳊.㳉.࣮(String Ꮎ, DocumentBuilder ⎀)
at
CLSServerAPI.clsDocGenerator.replaceBookmark(Document docReplace, String
oBookmarkName, String oHTML, ReplaceType RepType, String oObjID)

The Code i was using is:
Bookmark bkHTML = docReplace.Range.Bookmarks[oBkName];
if (bkHTML != null)
{
bkHTML.Text = “”;
builderDocReplace.MoveToBookmark(oBkName);
builderDocReplace.InsertHtml(oHTML);
builderDocReplace.EndBookmark(oBkName);
}

Thanks,
srinu dhulipalla

Hello

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Could you please be more specific regarding your problem and I will try to help you.

Best regards,

Hello,

you can easily reproduce my problem by using this sample code:

string strpath = File.ReadAllText(@“D:\itemtext.txt”);
Document oDoc = new Document();
DocumentBuilder obuil = new DocumentBuilder(oDoc);
obuil.InsertHtml(strpath); // i was getting an error here
oDoc.Save(@“D:\itemtext.doc”);

“itemtext.txt” file having an HTML content posted in my previous post.

Thanks,
srinu dhulipalla

Hello

Thank you for additional information. But I cannot see the file or HTML you have attached. Could you please reattach it here in the forum?

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Best regards,

Hello,

please find an attachment for HTML content, what i passed to InsertHTML() method.

Thanks,

srinu dhulipalla

Hello

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. 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 removing empty Font-Family from your html.

Best regards,

The issues you have found earlier (filed as 16047) have been fixed in this update.


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