[Demo] Making PDF using Synopse PDF Engine

Demos, code samples. Only questions related to the existing topics are allowed here.
Post Reply
Sergey Tkachenko
Site Admin
Posts: 13149
Joined: Sat Aug 27, 2005 10:28 am
Contact:

[Demo] Making PDF using Synopse PDF Engine

Post by Sergey Tkachenko » Thu Apr 28, 2016 5:38 pm

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


Image

UweM
Posts: 18
Joined: Wed Oct 04, 2006 5:30 pm
Location: USA

Re: [Demo] Making PDF using Synopse PDF Engine

Post by UweM » Sat Apr 30, 2016 4:25 pm

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

Sergey Tkachenko
Site Admin
Posts: 13149
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Mon May 02, 2016 7:58 am

Please send this RTF to richviewgmailcom

LS_M
Posts: 47
Joined: Thu Sep 15, 2005 5:17 pm

Post by LS_M » Mon May 02, 2016 4:32 pm

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

Sergey Tkachenko
Site Admin
Posts: 13149
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Tue May 03, 2016 8:26 am

TPDFPapersize is defined in Synopse PDF Engine units, in SynPdf.pas

LS_M
Posts: 47
Joined: Thu Sep 15, 2005 5:17 pm

Post by LS_M » Tue May 03, 2016 8:58 am

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.

Sergey Tkachenko
Site Admin
Posts: 13149
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Tue May 03, 2016 1:30 pm

For compatibility with older versions of Delphi, all occurrences of "PageSize.Height" must be changed to "PageSize.cy".
I fixed the source code.

LS_M
Posts: 47
Joined: Thu Sep 15, 2005 5:17 pm

Post by LS_M » Tue May 03, 2016 4:16 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest