merging 2 rtf files into 1 single rtf & converting to pd
Posted: Thu Jun 15, 2006 8:21 am
Hi !
I've got a strange problem.
I have 2 rtf files. I want to merge them into 1 single rtf file.
Then, I want to create a pdf file with this rtf file.
So I use TRichViewPDF.
My problem : my final single rtf file sounds good...but when converting it to pdf file, it's not good.
sample_1.rtf is a bigger rtf file than sample_2.rtf...so in my final pdf file, it's just like as if sample_1.rtf overwrites sample2.rtf
So I don't have my whole sample2.rtf visible in the final pdf...
I hope you understand what I mean (forgive my french accent )
Here is my code :
=====================================
begin
RichViewEdit1.Clear ;
RichViewEdit1.LoadRTF('C:\Temp\sample_1.rtf') ;
RichViewEdit1.Format ;
RichViewEdit1.LoadRTF('C:\Temp\sample_2.rtf') ;
RichViewEdit1.Format ;
RichViewEdit1.SaveRTF('C:\Temp\result.rtf', False) ;
with TRichViewPDF.Create(nil) do
try
AutoLaunch := true ;
CreateOutlines := true ;
RichView.LoadRTF('C:\Temp\result.rtf') ;
SaveToPDFFile('C:\Temp\result.pdf') ;
finally
free ;
end ;
end ;
======================================
Another "easy question" : how can I change page when I load new rtf ?
I mean, in my final rtf file, I want :
sample_1.rtf
<then starting on a new page :>
sample_2.rtf
Thanks very very much in advance for your support,
Laurent.
I've got a strange problem.
I have 2 rtf files. I want to merge them into 1 single rtf file.
Then, I want to create a pdf file with this rtf file.
So I use TRichViewPDF.
My problem : my final single rtf file sounds good...but when converting it to pdf file, it's not good.
sample_1.rtf is a bigger rtf file than sample_2.rtf...so in my final pdf file, it's just like as if sample_1.rtf overwrites sample2.rtf
So I don't have my whole sample2.rtf visible in the final pdf...
I hope you understand what I mean (forgive my french accent )
Here is my code :
=====================================
begin
RichViewEdit1.Clear ;
RichViewEdit1.LoadRTF('C:\Temp\sample_1.rtf') ;
RichViewEdit1.Format ;
RichViewEdit1.LoadRTF('C:\Temp\sample_2.rtf') ;
RichViewEdit1.Format ;
RichViewEdit1.SaveRTF('C:\Temp\result.rtf', False) ;
with TRichViewPDF.Create(nil) do
try
AutoLaunch := true ;
CreateOutlines := true ;
RichView.LoadRTF('C:\Temp\result.rtf') ;
SaveToPDFFile('C:\Temp\result.pdf') ;
finally
free ;
end ;
end ;
======================================
Another "easy question" : how can I change page when I load new rtf ?
I mean, in my final rtf file, I want :
sample_1.rtf
<then starting on a new page :>
sample_2.rtf
Thanks very very much in advance for your support,
Laurent.