We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

AppenHTML method on DocIO

Thread ID:





81441 May 20,2009 07:17 AM UTC Jan 18,2010 01:38 PM UTC ASP.NET Web Forms (Classic) 9
Tags: DocIO
Administrator [Syncfusion]
Asked On May 20, 2009 07:17 AM UTC


I am checking Sync fusion Essential studio V7.2.0.20 DocIO with C# ASP.NET.

When I try to insert HTML using AppendHTML method, its showing issues with double quotes.

When we try to pass the sample HTML code


from C# environment, the HTML string will be converted to


and the Syncfusion DLL is throwing error. If we avoid the align completly and pass the HTML string as


, its working fine.

Is there any alternative or other methods so that we can pass HTML content (having double quotes) as string from C# environment.

Thanks in advance,

Bhuvaneswari P [Syncfusion]
Replied On May 22, 2009 07:37 AM UTC


Thank you for your interest in Syncfusion products.

I am afraid that I am unable to reproduce the issue. Its working when we insert the p tag with align attribute. Could you please provide your Essential Studio version and html file to reproduce the issue in our end. This would be helpful for us to investigate the issue further.

Please let me know if you have any other questions.

Best Regards,

Administrator [Syncfusion]
Replied On May 27, 2009 01:38 PM UTC

Hi Bhuvana,

Thank you for the reply.

I am not inserting HTML file to the document. Rather I am creating the HTML content within C# environment and passing that content to the document. Please see the code below.

Versions : ASP.NET 2.0 (C#)
Sync fusion Version=


dataPath = "C:\\Projects\\SyncFusion\\OleTemplate.doc";
//Open an existing word document
WordDocument oleSource;
string str1 = Path.Combine(dataPath, "OleTemplate.doc").ToString();
//oleSource = new WordDocument(Path.Combine(dataPath, "OleTemplate.doc"));
oleSource = new WordDocument(dataPath);
WordDocument dest = new WordDocument();
// Get OLE object from source document
WOleObject oleObject = oleSource.LastParagraph.Items[0] as WOleObject;

dest.LastParagraph.AppendText("Test Data");

str1 = "

str1 = str1 + "left";
str1 = str1 + @"""";
str1 = str1 + ">Test123



And this throws an error.

If we keep the string as below, and it works perfectly.

str1 = "



Bhuvaneswari P [Syncfusion]
Replied On May 28, 2009 11:46 AM UTC

Hi Anujith,

Thanks for the code snippet.

I am able to reproduce the issue when using your code snippet. DocIO supports only formatted HTML file. You can validate the given HTML files using XHTML parser by using the below web page. This validator parse only the formatted HTML files, if not it reports the error.


If you want to avoid the parser issue in HTML, set the XHTMLValidateOption as None.

document.XHTMLValidateOption = XHTMLValidationType.None;

Also please refer the below modified code snippet to run in None validation type.
dest.XHTMLValidateOption = XHTMLValidationType.None;
string str1 = "

str1 = str1 + "left";
str1 = str1 + @"""";
str1 = str1 + ">Test123";
str1 = str1 + "

"; //Please close the p tag

Please let me know if you have any other questions.

Best Regards,

Replied On January 11, 2010 09:54 AM UTC

http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

The table below summarizes your responses to questions that have been categorized as "Quality Questions", that is testing elements that go towards assessing the overall quality of the engagement.

NumberQuestion TitleAnswer givenScore
13.1.1.Team CompositionYes0
14.2.19.Team Members' AccreditationNo100
14.2.21.Work in Foreign JurisdictionsN/A - team members did not work in foreign jurisdictions0
14.4.1.Determining the Scope of the OpportunityYes0
14.5.2.Engagement PlanYes0
15.1.2.Use of Approved Methodologies2 - Satisfactory with Comments20
15.1.3.Information Gathering and Analysis2 - Satisfactory with Comments10
15.1.4.Communication of Progress to Client2 - Satisfactory with Comments10
15.1.5.Technical - Technical and Professional elements2 - Satisfactory with Comments10
15.1.6.Project Management - Use of Appropriate Techniques2 - Satisfactory with Comments10
15.1.1.Use of the Work of an External Third Party/ExpertN/A0
15.2.8.Revision of Engagement PlanYes0
15.4.1.Project Management - Managing the EngagementYes0
15.4.2.Project Management - Managing Financial PerformanceYes0
15.4.3.Project Management - Overall Financial PerformanceYes0
15.4.4.Project Management - Client billingYes0
15.4.5.Project Management - Collection EffortsN/A0
15.4.6.Project Management - Collection of Final BillN/A - engagement is ongoing/final invoice still current0
15.5.6.Content of Representation Letter - Best Practice1 - Satisfactory0
15.5.15.Involvement of Engagement Leader2 - Satisfactory with Comments10
15.5.16.Involvement of Engagement Manager2 - Satisfactory with Comments5
15.5.17.Involvement of EQCR2 - Satisfactory with Comments10
15.5.18.Responsiveness to the Client2 - Satisfactory with Comments10
15.5.19.Value Added by Our Services2 - Satisfactory with Comments5
16.1.1.Documentation (Including Supplementary Information)2 - Satisfactory with Comments20
16.1.2.Extent of Supplementary Information Required2 - Satisfactory with Comments - only minimal additional information or explanations required or provided10
16.2.2.Client Satisfaction - Nature of Feedback Obtained2 - Satisfactory with Comments5
16.2.3.Client Satisfaction - Action TakenYes0
Quality Questions Subtotal235

Except as already addressed in your answers to the questions above, are there other factors relating to engagement quality (either positive or negative) that you consider should be taken into account in assessing the overall engagement performance?

the above html is xhtml-strict according to the W3C check site. Yet if i parse it through the paragraph. AppendHTML.

Please help.

Replied On January 11, 2010 12:00 PM UTC

forgot to say what happens at parsing:

DocIO support only welformatted xhtml \nDetails:\nUnexpected DTD declaration. Line 1, position 46.

why is this?

Can anyone help me?

Poornima R [Syncfusion]
Replied On January 13, 2010 12:11 PM UTC

Hi Steltenpool,

Thank you for the code snippet.

Currently we are supporting only XHTML 1.0 version.Only objects as defined in XHTML 1.0 version will be supported by us. In future we will enhance it to support latest versions.

Please let us know if you have any queries.


Replied On January 14, 2010 01:34 PM UTC

the above mentioned html-code parses completely in xhtml 1.0 strict. After first stripping out the doctype statement the paragraph.appendhtml() complains about html being there.. etc so i stripped it down to paragraphs and tables. When i am done with that it still gives strange errors. "html contains not welformatted table" - p has incorrect "child elements"- I see i am using syncfusion version 0.671 has it been improved since?


Replied On January 14, 2010 03:18 PM UTC

still facing one problem; the width of the table and columns is not showing in word. How can i change this?

Poornima R [Syncfusion]
Replied On January 18, 2010 01:38 PM UTC

Hi Steltenpool ,

Thank you for your update.

We are sorry for the delay in responding. We were able to reproduce both the mentioned issues.We suspect these could be a defect. We have forwarded these issues to our development team for further analysis.

Could you please report these issues through Direct Trac Developer Support Systemhttps://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

Please let me know if you have any queries.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon