Page 1 of 1

Export using synpdf (synopse) - No ScaleRichView

Posted: Sun Apr 03, 2016 6:48 pm
by PioPio
Hello,

Is it possible to export the content of TRichview to PDF without having TScaleRichView ?
I have found this example http://www.trichview.com/forums/viewtopic.php?t=6010 but this works only with TScaleRichView.

Many thanks
Alberto

Posted: Tue Apr 05, 2016 11:21 am
by Sergey Tkachenko
The demo from that topic creates a metafile and draws this metafile onto PDF library canvas.
A similar procedure can be used. The example of creating a metafile is in Demos\DelphiUnicode\Assorted\Graphics\ToImage

Although, a metafile is not necessary, you can draw directly on this canvas. I'll try to make an example later in this week.

Posted: Fri Apr 08, 2016 8:10 am
by jonjon
Hello Sergey,

SynPDF is becoming more and more popular as a great free and open source way to generate high quality PDF files in Delphi.

Perhaps you should provide official demos and help the developer better handle TRV: from my tests there are still problems with bullet lists for example. In that case I believe all fonts need to be included in the PDF while this is not necessary on other PDF engines. http://synopse.info/forum/viewtopic.php?id=2365

Your input could help existing and prospective customers of TRV.

Thanks.

Posted: Sat Apr 16, 2016 7:49 pm
by UweM
[quote="Sergey Tkachenko"]I'll try to make an example later in this week.[/quote]

Sergey, did you have time to create an example yet? Thanks!

Posted: Sun Apr 17, 2016 12:16 pm
by Sergey Tkachenko
I'll create in the next couple of days, sorry for the delay

Posted: Thu Apr 21, 2016 10:22 am
by Sergey Tkachenko
The work is in progress, there are some coordinate problems with checkpoints and hyperlinks, I hope we will be able to solve them.

The demo will load RTF or RVF file, including page size and margins settings, and make PDF. Internal links (to checkpoints) will be supported.

Unfortunately, this demo will not support headers/footers, footnotes, endnotes and text boxes. It uses TRVReportHelper which is intended to draw a single document, and subdocuments must be positioned manually.
I can add support for headers and footers, but notes and text boxes are too difficult.

PS: Well, I realize that this is a problem.
Initially we developed TRVPrint to draw on printer canvas using page layout, and TRVReportHelper to draw on screen/printer using the custom layout. Otherwise, they were almost identical components.
But later, we implemented in TRVPrint additional features: footnotes and endnotes, text boxes, different headers/footers for different pages. These features were not added to TRVReportHelper, because they use the page layout.

I think the best solution would be adding a "virtual printer" mode to TRVPrint, were you can specify a custom page size and resolution instead of getting them from the printer (currently, you can make PDF using page previews from TRVPrint, but TRVPrint must be formatted according to some existing printer settings).
I'll implement a virtual printer feature for TRVPrint after the release of ReportWorkshop.

Posted: Thu Apr 21, 2016 10:03 pm
by PioPio
Sergey Tkachenko wrote:The work is in progress, .....
I'll implement a virtual printer feature for TRVPrint after the release of ReportWorkshop.
So, if I understand correctly, in the meantime we can use the example you pointed out at Demos\DelphiUnicode\Assorted\Graphics\ToImage even if there are some limitations.
Am I correct ?

Alberto

Posted: Thu Apr 21, 2016 10:08 pm
by Sergey Tkachenko
"ToImage" uses TRVReportHelper, so it has the same limitation: no footnotes, endnotes, text boxes, headers and footers.

Actually, there is only one unsolved issue with SynPDF - when I try to add a link to checkpoint, its Y coordinate is incorrect.
If I will not be able to solve this problem tomorrow, I'll upload SynPDF demo without links.

Posted: Thu Apr 21, 2016 10:39 pm
by PioPio
Sergey Tkachenko wrote:.,... I'll upload SynPDF demo without links.
Thank you very much for your help, Sergey :D

Posted: Wed Apr 27, 2016 11:03 pm
by PioPio
PioPio wrote:
Sergey Tkachenko wrote:.,... I'll upload SynPDF demo without links.
Thank you very much for your help, Sergey :D
Hi Sergey, Did you have the chance to look into this ? Is the demo ready ?

Many thanks
Alberto

Posted: Thu Apr 28, 2016 11:19 am
by Sergey Tkachenko
The issue with link and bookmark is solved.
It appeared their coordinates are defined in points (72 dpi) and the origin is in the bottom left corner.
I'll clean up the demo and upload it later today.

PS: SynPDF supports defining only local links. Unfortunately, links to URLs are not supported. Adobe Reader autodetects links in text, but if the link target is not equal to its visible text, it will be lost.

Posted: Thu Apr 28, 2016 6:35 pm
by Sergey Tkachenko

Posted: Thu Apr 28, 2016 9:14 pm
by PioPio
really appreciated. Thank you !

Posted: Sat Apr 30, 2016 4:29 pm
by UweM
There seems to be an issue with RTF files that contain a table with images and text in separate cells. When you convert to PDF, only the text is there but the images are missing.

-Uwe

Posted: Mon May 02, 2016 7:59 am
by Sergey Tkachenko
Please send RTF file to richviewgmailcom