Page 1 of 1
[Demo] Making PDF using Synopse PDF Engine
Posted: Thu Apr 28, 2016 5:38 pm
by Sergey Tkachenko
Update 2017-Dec-4] TRichView setup now includes better version of this demo in <TRichViewDir>\ThirdParty\Export\SynPDF\Demos\RV2PDF\ folder. This better version reads all page properties from source RTF (or RVF) files and applies them to PDF, supports headers, footers, footnotes and endnotes, displays preview before exporting.
See http://www.trichview.com/forums/viewtop ... 951#p34100
This demo shows how to convert RTF and RVF files to PDF files using TRichView and
SynPDF (Synopse PDF Engine)
Source code:
http://www.trichview.com/support/files/rvsynpdf.zip
Source code + exe file
http://www.trichview.com/support/files/rvsynpdfexe.zip
Re: [Demo] Making PDF using Synopse PDF Engine
Posted: Sat Apr 30, 2016 4:25 pm
by UweM
Serge,
thanks a lot for that demo! Very interesting. Unfortuantely, it doesn't seem to work when I try to convert an RTF that contains a table with both text and images in the cells to PDF. The text shows up, but the images are not there.
Thanks
-Uwe
Posted: Mon May 02, 2016 7:58 am
by Sergey Tkachenko
Please send this RTF to richviewgmailcom
Posted: Mon May 02, 2016 4:32 pm
by LS_M
Hi all,
can't compile the demo with Delphi 5. I know Delphi 5 is rather old but serves my purpose.
The error, the only error, occurs in
TPageInfo = record
PageFormat: TPDFPaperSize;
PageSize: TSize;
DocRect: TRect;
end;
can't find TPDFPapersize
I can not find where TPDFPapersize is declared. Any pointer to a missing uses entry is appreciated.
Thank's in advance
Posted: Tue May 03, 2016 8:26 am
by Sergey Tkachenko
TPDFPapersize is defined in Synopse PDF Engine units, in SynPdf.pas
Posted: Tue May 03, 2016 8:58 am
by LS_M
Thank's Sergey for your fast reply. Unfortunately I was not clear in my question. The error is "undefined Height" which is in FPageInfo.PageSize.Height. So it says that it cant't find Height.
Thank's for your patience.
Posted: Tue May 03, 2016 1:30 pm
by Sergey Tkachenko
For compatibility with older versions of Delphi, all occurrences of "PageSize.Height" must be changed to "PageSize.cy".
I fixed the source code.
Posted: Tue May 03, 2016 4:16 pm
by LS_M
Hi Sergey,
again many thank's for quick support.
At the end I figured the replacement with FPageInfo.PageSize.cy out myself but thank you anyway.
To make it really work with Delphi 5 you need to change the uses of RVSynPDF.dpr as follows
uses
//Vcl.Forms,
Forms,
Windows,
at the bottom of RVSynPDF.dpr it needs to look like that
begin
Application.Initialize;
//Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
The hole demo works now like expected, thank you.
-Greetings
Re: [Demo] Making PDF using Synopse PDF Engine
Posted: Mon Dec 04, 2017 10:33 am
by Sergey Tkachenko
TRichView setup now includes better version of this demo in <TRichViewDir>\ThirdParty\Export\LLPDFLib\Demos\RV2PDF\ folder. This better version reads all page properties from source RTF (or RVF) files and applies them to PDF, supports headers, footers, footnotes and endnotes, displays preview before exporting.
See
http://www.trichview.com/forums/viewtop ... 951#p34100