Page 1 of 1

Export to HTML with external CSS

Posted: Thu May 13, 2010 11:50 pm
by Marsianin
Is there a way to export RVE into HTML but with external CSS file?

Posted: Tue May 25, 2010 5:17 pm
by Sergey Tkachenko
I am sorry, I overlooked this question.
If you want to save CSS outside HTML, then:
1) Save it using RVStyle.SaveCSS
2) When calling SaveHTMLEx, specify this file in ExternalCSS parameter.

Posted: Sun May 29, 2011 8:17 am
by Marsianin
Ok, but if I have several different files can I aggregate all styles from these files into one RVStyle and then use one CSS file for all these files?

Posted: Sun May 29, 2011 6:45 pm
by Sergey Tkachenko
First, call DeleteUnusedStyles(True, True, True).
Then load document one by one, but not using LoadRVF/LoadRVFFromStream, but by

Code: Select all

Clear;
InsertRVFFromStream(Stream, 0).
Unlike the loading methods, InsertRVFFromStream merges styles.
After loading, you can save HTML.
Finally, after saving the last document, you can save CSS in a file, because TRVStyle accumulated all necessary styles.