PHP Manual
Prev |  | Next

# cpdf_add_outline

cpdf_add_outline -- Adds bookmark for current page

## Description

`void cpdf_add_outline`(int pdf document, string text);

The cpdf_add_outline() function adds a bookmark with text `text` that points to the current page.

Example 1. Adding a page outline
      1
      2 <?php
      3 $cpdf = cpdf_open(0);
      4 cpdf_page_init($cpdf, 1, 0, 595, 842);
      5 cpdf_add_outline($cpdf, 0, 0, 0, 1, "Page 1");
      6 // ...
      7 // some drawing
      8 // ...
      9 cpdf_finalize($cpdf);
     10 Header("Content-type: application/pdf");
     11 cpdf_output_buffer($cpdf);
     12 cpdf_close($cpdf);
     13 ?>
     14

Prev | Home | Next
cpdf_setrgbcolor | Up | cpdf_set_page_animation