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.
Unfortunately, activation email could not send to your email. Please try again.

Missing HTML Hyperlinks when using AppendHTML...

Thread ID:

Created:

Updated:

Platform:

Replies:

94381 May 10,2010 04:02 PM May 11,2010 12:29 AM ASP.NET Web Forms (Classic) 2
loading
Tags: DocIO
Administrator [Syncfusion]
Asked On May 10, 2010 04:02 PM

Hello,

We're using Syncfusion Essentials 2010 Volume 2 and ASP.NET to create a Word document from a previously written HTML report.

We're having a problem with the rendering of our HTML when using the AppendHTML() method.

Our exact HTML we're passing to the method is:

"The Link will take you to a sample news page."

When the report is rendered it only prints the first word of the code "The" and leaves all of the rest off.

Below is the code for actually adding the HTML to the report.

// Pass the htmlToParse through the XHTML Compliance filter (TidyHTML)
string filteredHTML = TidyHTML(htmlToParse);

section.Body.IsValidXHTML(filteredHTML, XHTMLValidationType.None, out errorMessage);

if (errorMessage == "")
{
try
{
IWParagraphStyle HTMLStyle = document.AddParagraphStyle("HTMLStyle");
HTMLStyle.CharacterFormat.FontName = "Arial";
HTMLStyle.CharacterFormat.FontSize = 11;
HTMLStyle.ParagraphFormat.LeftIndent = indent;

paragraph.AppendHTML(filteredHTML);
paragraph.ApplyStyle(HTMLStyle.Name);
}
catch (Exception ex)
{
AppendHTMLError(paragraph, errorStyle, defaultStyle, ex.Message);
paragraph.AppendBreak(BreakType.LineBreak);
IWTextRange text = paragraph.AppendText(UiUtils.StripHTML(filteredHTML));
text.ApplyCharacterFormat(defaultStyle);
retVal = false;
}
}

Any ideas as to what could be going wrong? I was thinking maybe the escape "\" character was causing the problem.

Thanks! Let me know if you need anything else.

- Daniel

Administrator [Syncfusion]
Replied On May 10, 2010 04:03 PM

Please remove this duplicate post.

Rajendran [Syncfusion]
Replied On May 11, 2010 12:29 AM

Hi Daniel,

Thank you for the update.

Please do follow up this post with below forum link:
http://www.syncfusion.com/support/forums/general/94382

Please let us know if you have any other questions.

Regards
Rajendran

CONFIRMATION

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.

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.

;