#1 2024-09-10 16:33:21

Kaiser
Member
Registered: 2024-09-10
Posts: 3

Bookmarks example

I'd like to have an index in my PDF.
Is there an example of how to create it?
An example of the use of CreateBookMark?

Offline

#2 2024-09-13 12:19:32

rvk
Member
Registered: 2022-04-14
Posts: 114

Re: Bookmarks example

Do you mean the bookmarks at the right of the PDF?
Have you tried using CreateBookMark yet?

If you search on this forum there are several examples of CreateBookMark (just calling it after page creation).

Offline

#3 2024-09-13 15:53:22

Kaiser
Member
Registered: 2024-09-10
Posts: 3

Re: Bookmarks example

rvk wrote:

Do you mean the bookmarks at the right of the PDF?
Have you tried using CreateBookMark yet?

If you search on this forum there are several examples of CreateBookMark (just calling it after page creation).

Thanks for your reply.
Yes, I mean the bookmarks at the right of the PDF.
I will look into it and search for examples in this forum.

Offline

#4 2024-09-16 11:18:55

Kaiser
Member
Registered: 2024-09-10
Posts: 3

Re: Bookmarks example

I tried creating bookmarks:

var
  Doc  : TPdfDocumentGDI;
  Page : TPdfPage;
...
for i := 1 to PageCount do begin
  Page   := Doc.AddPage;
  PageNr := PageNr + 1;
  Doc.CreateBookMark(0, IntStr(PageNr));
  ...
end;

When I open the pdf, there are no bookmarks. Do I need to call another function to enable the bookmarks?

Last edited by Kaiser (2024-09-16 11:21:20)

Offline

Board footer

Powered by FluxBB