migrating application --> html / RTF (stored in db)
Posted: Tue Jan 06, 2009 1:42 pm
Hi everybody, and happy new year.
I need to transform internal application to use Trichview as editor.
The editor store into database, in RTF format (it's working)
My problem is that I need at the end to combine all field into new and single file (RTF and HTML), I want to do that without use visual component, I think it's possible, but I don't see how.
For HTML export, I try this :
But error occurs (no parent...), is it possible to convert in html without TRichView component (rvdata ???)
My second point is to combine rtf fields to make one big rtf file.
a kind of function like rvdata.insertRawRTF('{\rtf1\ansi\ansicpg0\uc1\deff0\deflang0\deflangfe0{\fonttbl ...........'); exists ?
Thank you for your help
I need to transform internal application to use Trichview as editor.
The editor store into database, in RTF format (it's working)
My problem is that I need at the end to combine all field into new and single file (RTF and HTML), I want to do that without use visual component, I think it's possible, but I don't see how.
For HTML export, I try this :
Code: Select all
function RTFToHtml(rtf:string): string;
var Stream: TStringStream;
rv:TCustomRichView;
st:TRVStyle;
begin
st:=TRVStyle.Create(nil);
rv:=TCustomRichView.Create(nil);
rv.Style:=st;
RTFStringToRv(rv,rtf);
Stream := TStringStream.Create('');
rv.SaveHTMLToStreamEx(Stream, '', '', '', '', '', '',[rvsoUseCheckpointsNames, rvsoUTF8]);
result:= Stream.DataString;
stream.free;
rv.Free;
st.Free;
end;
My second point is to combine rtf fields to make one big rtf file.
a kind of function like rvdata.insertRawRTF('{\rtf1\ansi\ansicpg0\uc1\deff0\deflang0\deflangfe0{\fonttbl ...........'); exists ?
Thank you for your help