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

Converting HTML to Word Doc - Css support?

Thread ID:

Created:

Updated:

Platform:

Replies:

116191 Apr 22,2014 01:36 PM UTC Sep 22,2016 06:01 AM UTC ASP.NET Web Forms (Classic) 6
loading
Tags: DocIO
Andy Siantonas
Asked On April 22, 2014 01:36 PM UTC

Hi

We are attempting to insert html into a word document using paragraph.AppendHTML(html).

This works fine except that <style> tags don't seem to work. Inline styles work, but normal style selectors and classes do not:

This works (the text is red):
<div style="color:red;">this text should be red</div>

This does not (the text is not red):
<style>
            .mydiv {
                color: red;
            }
</style>
<div class="mydiv">this text should be red</div>

Does DocIO support any style tag conversion at all when it imports html? If not, what is my best approach for creating universal styles for an html based word document?

Sathish K [Syncfusion]
Replied On April 23, 2014 03:44 PM UTC

Hi Andy,

 

Thank you for your interest in Syncfusion products.

 

Currently DocIO doesn’t have support to preserve CSS in HTML to Word document conversion. We have logged this as a feature request in our database. We will implement this feature in any of our upcoming releases. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We will update you when this feature has been implemented.

 

As a workaround kindly define all the styles inline to preserve desired styles during the conversion process.

 

Please let us know if you have any other questions.

 

Regards,

Sathish


Chris Crowhurst
Replied On September 11, 2014 11:41 AM UTC

Hi,

I am experiencing the same issues as Andy.

Does the latest version support CSS in HTML, or is this still to be implemented ? I am currently using Essential Studio 12.1.0.43?

Regards

Chris

Jan
Replied On February 12, 2016 04:03 PM UTC

Hi,

any updates or still not supported?

Regards,
Jan

Sarathkumar V [Syncfusion]
Replied On February 15, 2016 09:22 AM UTC

Hi Jan,

Thank you for using Syncfusion products.

DocIO still doesn’t have support to preserve CSS in HTML to Word document conversion. We have logged this as a feature request in our database. We will implement this feature in any of our upcoming releases. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We will update you when this feature has been implemented.

As a workaround kindly define all the styles inline to preserve desired styles during the conversion process.

Regards,
Sarath


Peruri Srinivasulu
Replied On September 22, 2016 12:54 AM UTC

Hi,

Is it implemented now? Any update on this?

Thank you.

Priyanga Elangovan [Syncfusion]
Replied On September 22, 2016 06:01 AM UTC

Hi Andy,

Thank you for contacting Syncfusion support.

DocIO still doesn’t have support to preserve CSS in HTML to Word document conversion. We have a plan to implement this feature in any of our upcoming releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. At the moment we are unable to provide concrete timeline for adding this support. We will let you know once this feature has been implemented.

As a workaround kindly define all the CSS styles as inline to preserve desired styles during the conversion process.

Regards,
Priyanga.E
 


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.

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

;