Will TRichViewEdit.TableOfContents links work when converted to a PDF?

General TRichView support forum. Please post your questions here
Post Reply
jimmaguire
Posts: 206
Joined: Thu Sep 15, 2005 1:41 am
Location: California

Will TRichViewEdit.TableOfContents links work when converted to a PDF?

Post by jimmaguire »

I use IIPDFLib to create PDF's and wonder if internal links (bookmarks?) will work in a PDF?
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Will TRichViewEdit.TableOfContents links work when converted to a PDF?

Post by Sergey Tkachenko »

Yes, they work.

The demo in <TRichView Dir>\ThirdParty\Export\LLPDFLib\Demos\RV2PDF\ includes code to export external links.

The process is the following.
RVPrint1DrawCheckpoint is called when a checkpointed item is drawn. In this event, we store coordinates of a checkpoint.
RVPrint1DrawHyperlink is called when a hyperlink is drawn. In this event, if this is a link to a checkpoint, we store coordinates of a link.
At the end of PDF generation, the method SaveLinksToCheckpoints is called. It uses stored coordinates of internal links and checkpoints to add these links to PDF.

Besides, there is an advanced demo: https://www.trichview.com/forums/viewtopic.php?t=11002
It adds a table of contents to PDF (not inside a document, but as PDF outline tree (that can be displayed at the left side).
jimmaguire
Posts: 206
Joined: Thu Sep 15, 2005 1:41 am
Location: California

Re: Will TRichViewEdit.TableOfContents links work when converted to a PDF?

Post by jimmaguire »

Just what I wanted! Thanks!
Post Reply