Issue with ActionTest Tabs wiht LoadFromStream
Posted: Tue Apr 08, 2014 2:45 pm
Hello
I am using your demo ActionTest tabs as a editor. I store the documents in a database. I have noticed a problem since I have updated my components to XE 5 and to the latest versiĆ³n of RichView. The problema is the following. I have a blank document, I write something, or include a table, perfect. Then I save the document in the database. When I load the stored document, the layout is the same, but if you try to indent a paragraph, then the text is move to the right a lot of positions. If I try to insert a table then this table have 1500 pt as cell padding and cell spacing. So I think that when I upload the document something is missing or wrong and measurements are not the same anymore.
This is the code I use to save and load documents :
1) Saving
SRichViewEdit1.RichViewEdit.Modified := False;
FDataStream.Clear;
FDataStream.Position := 0;
if FSaveRVF_RTF = 0 then
SRichViewEdit1.RichViewEdit.SaveRVFToStream( FDataStream,False )
else
if FSaveRVF_RTF = 1 then
SRichViewEdit1.RichViewEdit.SaveRTFToStream( FDataStream,False );
2) Loading
WasSaved := False;
FDataStream.Position := 0;
SRichViewEdit1.RichViewEdit.LoadFromStream(FDataStream,rvynaAuto);
FDataStream.clear;
SRichViewEdit1.RVHeader.Format;
SRichViewEdit1.RVFooter.Format;
SRichViewEdit1.SetRVMargins(True);
SRichViewEdit1.Format;
Can you help me ?
Regards
Jesus Mendez
I am using your demo ActionTest tabs as a editor. I store the documents in a database. I have noticed a problem since I have updated my components to XE 5 and to the latest versiĆ³n of RichView. The problema is the following. I have a blank document, I write something, or include a table, perfect. Then I save the document in the database. When I load the stored document, the layout is the same, but if you try to indent a paragraph, then the text is move to the right a lot of positions. If I try to insert a table then this table have 1500 pt as cell padding and cell spacing. So I think that when I upload the document something is missing or wrong and measurements are not the same anymore.
This is the code I use to save and load documents :
1) Saving
SRichViewEdit1.RichViewEdit.Modified := False;
FDataStream.Clear;
FDataStream.Position := 0;
if FSaveRVF_RTF = 0 then
SRichViewEdit1.RichViewEdit.SaveRVFToStream( FDataStream,False )
else
if FSaveRVF_RTF = 1 then
SRichViewEdit1.RichViewEdit.SaveRTFToStream( FDataStream,False );
2) Loading
WasSaved := False;
FDataStream.Position := 0;
SRichViewEdit1.RichViewEdit.LoadFromStream(FDataStream,rvynaAuto);
FDataStream.clear;
SRichViewEdit1.RVHeader.Format;
SRichViewEdit1.RVFooter.Format;
SRichViewEdit1.SetRVMargins(True);
SRichViewEdit1.Format;
Can you help me ?
Regards
Jesus Mendez