PHP cpdf_add_outline function

cpdf_add_outline

(PHP 3 >= 3.0.9, PHP 4, PHP 5 <= 5.0.4)

cpdf_add_outline -- Adds bookmark for current pageDescriptionint cpdf_add_outline ( int pdf_document, int lastoutline, int sublevel, int open, int pagenr, string text )

Adds a bookmark with text text that points to the
current page.

Parameters

pdf_document

The document handle, returned by
cpdf_open().

lastoutline

sublevel

open

pagenr

text

The bookmark text


Examples

Example 1. Adding a page outline

$cpdf = cpdf_open(0);
cpdf_page_init($cpdf, 1, 0, 595, 842);
cpdf_add_outline($cpdf, 0, 0, 0, 1, "Page 1");
// ...
// some drawing
// ...
cpdf_finalize($cpdf);
header("Content-type: application/pdf");
cpdf_output_buffer($cpdf);
cpdf_close($cpdf);

  • Digg
  • TwitThis
  • del.icio.us
  • Netvouz
  • description
  • Reddit
  • Furl
  • NewsVine
  • Simpy
  • Slashdot
  • Spurl
  • StumbleUpon
  • YahooMyWeb
  • TailRank
  • Technorati
  • Facebook
  • Google
  • LinkedIn
  • Live
  • MySpace
  • Ping.fm
  • Yahoo! Buzz
  • E-mail this story to a friend!



Home | PHP Functions | PHP cpdf_add_outline function