Export using synpdf (synopse) - No ScaleRichView

General TRichView support forum. Please post your questions here
Post Reply
PioPio
Posts: 41
Joined: Mon Feb 18, 2013 4:21 pm

Export using synpdf (synopse) - No ScaleRichView

Post 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
Sergey Tkachenko
Site Admin
Posts: 17254
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
jonjon
Posts: 435
Joined: Sat Aug 27, 2005 4:19 pm

Post 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.
UweM
Posts: 18
Joined: Wed Oct 04, 2006 5:30 pm
Location: USA

Post 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!
Sergey Tkachenko
Site Admin
Posts: 17254
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I'll create in the next couple of days, sorry for the delay
Sergey Tkachenko
Site Admin
Posts: 17254
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
PioPio
Posts: 41
Joined: Mon Feb 18, 2013 4:21 pm

Post 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
Sergey Tkachenko
Site Admin
Posts: 17254
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
PioPio
Posts: 41
Joined: Mon Feb 18, 2013 4:21 pm

Post by PioPio »

Sergey Tkachenko wrote:.,... I'll upload SynPDF demo without links.
Thank you very much for your help, Sergey :D
PioPio
Posts: 41
Joined: Mon Feb 18, 2013 4:21 pm

Post 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
Sergey Tkachenko
Site Admin
Posts: 17254
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
PioPio
Posts: 41
Joined: Mon Feb 18, 2013 4:21 pm

Post by PioPio »

really appreciated. Thank you !
UweM
Posts: 18
Joined: Wed Oct 04, 2006 5:30 pm
Location: USA

Post 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
Sergey Tkachenko
Site Admin
Posts: 17254
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please send RTF file to richviewgmailcom
Post Reply