Du bist hier: Tips » Scripte » PHP
PHP
Referenzliste

PDF_create_bookmark

PDF-Funktionen

    Befehl:
int PDF_create_bookmark ( resource $pdfdoc , string $text , string $optlist )


    Beschreibung:
Erstellt ein Lesezeichen


    Aktiv in Version:
(PECL pdflib >= 2.0.0)

PDF_create_bookmark() - Beispiel


Eingabe:
Bookmarks as URL

<?php
  $action = $p->create_action("URI", "url=http://www.example.com");
  $p->create_bookmark("www.example.com", "action {activate $action}");
?>

Bookmarks as URL

<?php
  $action = pdf_create_action($p, "URI", "url=http://www.example.com");
  pdf_create_bookmark($p, "www.example.com", "action {activate $action}");
?>


Bookmarks as GoTo

<?php
  $optlist = "destination={page=1 type=fixed left=50 top=700 zoom=1}";
  $action = $p->create_action("GoTo", $optlist);
  $p->create_bookmark("page1", "action {activate $action}"); [snip]
?>

Bookmarks as GoTo

<?php
  $optlist = "destination={page=1 type=fixed left=50 top=700 zoom=1}";
  $action = pdf_create_action($p, "GoTo", $optlist);
  pdf_create_bookmark($p, "page1", "action {activate $action}");
?>

PDF-Funktionen