Experience with TRichViewPDF ?
Posted: Tue Dec 05, 2006 5:05 pm
Hi,
i would like to produce a pdf-File from the content of RichViewEdit.
I use the TRichViewPDF - component for it of www.roledata.com.
Unfortunately, one cannot export RichViewEdit after PDF. Well, i load the content of the TRichViewEdit in the TRichView (see Code).
Here the result:
The contents of TRichViewEdit and TRichView are ok!
The content of PDF-File is not ok!
...the "paragraph background color" is wrong...
I suppose that the old "paragraph background color" is placed with the tabs.
Why? If TRichViewEdit and TRichView it correct shows!
Help ...
Crowbar
i would like to produce a pdf-File from the content of RichViewEdit.
I use the TRichViewPDF - component for it of www.roledata.com.
Unfortunately, one cannot export RichViewEdit after PDF. Well, i load the content of the TRichViewEdit in the TRichView (see Code).
Code: Select all
...
RichViewPDF:=TRichViewPDF.Create(nil);
try
ms:=TMemoryStream.Create;
try
RechnungRichViewEdit.SaveRTFToStream(ms,false);
ms.Position:=0;
RichView1.Clear;
RichView1.LoadRTFFromStream(ms);
RichView1.Format;
RichView1.SaveRTFToStream(ms,false);
ms.Position:=0;
RichViewPDF.RichView.LoadRTFFromStream(ms);
finally
ms.Free;
end;
RichViewPDF.SaveToPDFFile('C:\test.pdf');
finally
RichViewPDF.Free;
end;
...
The contents of TRichViewEdit and TRichView are ok!
The content of PDF-File is not ok!
...the "paragraph background color" is wrong...
I suppose that the old "paragraph background color" is placed with the tabs.
Why? If TRichViewEdit and TRichView it correct shows!
Help ...
Crowbar