0

I want to create a link or a bookmark in pdf that take me to the another pdf with PDFLib. For that I have used following code:

String optlist = "filename=paper_planes_catalog.pdf " +"destination={page 2 type fixed left 50 top 200 zoom 2}";

Now I have created the action for that as follow:

goto_action = p.create_action("GoToR", optlist);

But how can I apply that ?

Smit
  • 1,559
  • 17
  • 38

1 Answers1

0

You have to create the bookmark for that.

String optlist = "action={activate " + goto_action + "} fontstyle=bold textcolor={rgb 0 0 1}";

catalog_bookmark = p.create_bookmark("Our Paper Planes Catalog", optlist);

That will do the remaining.

Smit
  • 1,559
  • 17
  • 38