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.

<DIV>
    <TABLE style="MARGIN-LEFT: 0pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0>
        <TBODY></TBODY>
    </TABLE>
    <P style="MARGIN: 0pt">&nbsp;</P>
    <P style="MARGIN: 0pt">
        <SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: ''">
            <TABLE style="WIDTH: 600px" cellSpacing=0 cellPadding=0 border=1>
                <TBODY>
                    <TR>
                        <TD style="WIDTH: 80px" vAlign=center align=middle bgColor=#c0c0c0>Revision&nbsp;</TD>
                        <TD style="WIDTH: 120px" vAlign=center align=middle bgColor=#c0c0c0>Changed By&nbsp;</TD>
                        <TD style="WIDTH: 100px" vAlign=center align=middle bgColor=#c0c0c0>Date&nbsp;</TD>
                        <TD style="WIDTH: 300px" vAlign=center align=middle bgColor=#c0c0c0>Description of Change&nbsp;</TD>
                    </TR>
                    <TR>
                        <TD>
                            <P align=center>&nbsp;A</P>
                        </TD>
                        <TD>
                            <P align=center>&nbsp;sri</P>
                        </TD>
                        <TD>
                            <P align=center>&nbsp;06Apr10</P>
                        </TD>
                        <TD>&nbsp;Original document</TD>
                    </TR>
                    <TR>
                        <TD>
                            <P align=center>&nbsp;B</P>
                        </TD>
                        <TD>
                            <P align=center>&nbsp;dsr</P>
                        </TD>
                        <TD>
                            <P align=center>&nbsp;15Apr10</P>
                        </TD>
                        <TD>&nbsp;Changes as per teleconference on 09Apr10.</TD>
                    </TR>
                    <TR>
                        <TD>&nbsp;</TD>
                        <TD>&nbsp;</TD>
                        <TD>&nbsp;</TD>
                        <TD>&nbsp;</TD>
                    </TR>
                </TBODY>
            </TABLE>
        </SPAN>&nbsp;
    </P>
</DIV>

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

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?

Best regards,

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

Hello

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.