Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Sat Jan 28, 2012 1:03 pm

Hi

I need to set the following values because the HTML to DOC conversion is ignoring CSS styles.

Spire.Doc.CssStyleSheetType.Internal
Spire.Doc.CssStyleSheetType.External

I can't find a way of doing this and there does not seem to be a manual of methods and properties explicitly published anywhere.

Many thanks

Todd
Last edited by poseidonCore on Sun Jan 29, 2012 7:34 am, edited 1 time in total.

poseidonCore
 
Posts: 3
Joined: Sat Jan 28, 2012 10:40 am

Sun Jan 29, 2012 4:01 am

Hi Todd,

The enum values Spire.Doc.CssStyleSheetType.Internal and Spire.Doc.CssStyleSheetType.External are not supported during HTML to doc.
Would you please tell us on which html you have the convertion problem?

Thanks and Regards,
Harry
Technical Support / Developer,
e-iceblue Support Team
User avatar

harry.support
 
Posts: 180
Joined: Mon Nov 08, 2010 3:11 pm

Sun Jan 29, 2012 7:33 am

Hi Harry

I am trying to get it to convert HTML code that has an internal CSS section like this:

Code: Select all
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title></title>
<style type="text/css">
@page {
 #####CODE#####
}
styleName {
 #####CODE#####
}
</style>
</head>
<body>
 #####CODE#####
</body>
</html>


In combination with this type of Spire process:
Code: Select all
Document document = new Document();
document.LoadFromFile(sourceFileAddress, FileFormat.Html, XHTMLValidationType.None);
document.SaveToFile(targetFileAddress, FileFormat.PDF);


The HTML -> PHP/RTF/DOC conversion seems to just ignore the code in the internal style definitions.

However, the process works fine if I embed the styles in the tags in the body itself.

I really love your product so far in testing. If I can get through some of these initial issues I have, I would be happy to place an order for your suite.

Thanks so much for the speedy reply, Harry.

Todd

poseidonCore
 
Posts: 3
Joined: Sat Jan 28, 2012 10:40 am

Sun Jan 29, 2012 9:32 am

Hi Todd,

Thanks for your details.
But at present, the internal style definition is not supported during HTML to DOC, we are sorry for that.
Harry
Technical Support / Developer,
e-iceblue Support Team
User avatar

harry.support
 
Posts: 180
Joined: Mon Nov 08, 2010 3:11 pm

Sun Jan 29, 2012 9:39 am

Hi Harry

I will reformat accordingly.

I'll continue with the testing and let you know any other issues I have in separate entries.

Thanks for letting me know.

Todd

poseidonCore
 
Posts: 3
Joined: Sat Jan 28, 2012 10:40 am

Return to Spire.Doc