PHP Doku:: Erzeugt Aktionen für Objekte und Events - function.pdf-create-action.html

Verlauf / Chronik / History: (7) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzNon-Text MIME-AusgabenPDFPDF FunktionenPDF_create_action

Ein Service von Reinhard Neidl - Webprogrammierung.

PDF Funktionen

<<PDF_create_3dview

PDF_create_annotation>>

PDF_create_action

(PECL pdflib >= 2.0.0)

PDF_create_actionErzeugt Aktionen für Objekte und Events

Beschreibung

int PDF_create_action ( resource $pdfdoc , string $type , string $optlist )

Erzeugt eine Aktion, die auf verschiedene Objekte und Events angewendet werden kann.


3 BenutzerBeiträge:
- Beiträge aktualisieren...
astanos dot ch
20.03.2008 10:30
The equal sign is interpreted as a separator sign in the optlist. But there's a way to have an url with GET params.
With the example given below:

$url = PDF_create_action($p, "URI", "url {http://www.pdflib.com/?page=home}");

PDF_create_annotation ($p, 44, 100, 55,700, "Link", "linewidth=0 action {activate $url}");
hobbesmitATthatGoogleMailProvider
6.12.2007 19:41
I just want to point out that PDF_create_action does not work for URLs with GET parameters (has problems with '='). Running urlencode will just create a URL that is not translated properly by the browser (at least for Firefox 2.0.0.11).

Believe it or not, your best bet is to use pdf_add_weblink(), which is supposedly deprecated.
joshivs at gmail dot com
28.04.2006 12:59
Here is a  note i feel important for newbies

$url = PDF_create_action($p, "URI", "url=http://www.pdflib.com");

PDF_create_annotation ($p, 44, 100, 55,700, "Link", "linewidth=0 action {activate $url}");

Above  2 lines will change the hand
cursor once your cursor is in the rectangle as assigned by the
create_annotation command.  Once you click in that area, it will
bring you to the url in create_action command.



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)