aktuelle.kurse/m133/4_Modulinhalte_und_Uebungen/03 PHP Grundlagen/PHP_Referenz/funktionsreferenz/pdf_funktionen/pdf_add_pdflink.html
Harald G. Mueller 55c05c3818 muh
2022-02-23 22:54:51 +01:00

193 lines
10 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>pdf_add_pdflink</title>
<link rel="stylesheet" type="text/css" href="../../src/self.css">
<meta name="description" content="pdf_add_pdflink">
<meta name="keywords" content="SELFPHP, PHP, PDF-Funktionen, pdf_add_pdflink">
<meta name="author" content="Damir Enseleit, mail@selfphp.info">
<meta name="DC.Contributer" content="Matthias Hupp, m.hupp@selfphp3.de">
<meta name="DC.Publisher" content="Damir Enseleit, mail@selfphp.info">
<meta name="DC.Date" content="2001-08-21T12:18+01:00">
<meta name="DC.Identifier" content="http://www.selfphp3.de/funktionsreferenz/pdf_funktionen/pdf_add_pdflink.html">
<meta name="DC.Language" content="de">
<meta name="DC.Rights" content="../../editorial/index.html">
<meta name="SELF.Firstdate" content="2001-08-21T12:18+01:00">
<meta name="SELF.Version" content="1">
<meta name="SELF.Pagetype" content="Information">
<meta name="SELF.Path" content="SELFPHP == ../../index.php // Funktionsreferenz == ../index.php // PDF-Funktionen == index.html">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#AA5522" vlink="#772200" alink="#000000">
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td bgcolor="#FFEEDD" class="nav"><a class="an" name="top"><img src="../../src/refkap.gif" width="16" height="13" border="0" alt="Teil von"></a> <a href="../../index.html"><b>SELFPHP</b></a>/<a href="../../navigation/index.html">Navigationshilfen</a> <img src="../../src/refkap.gif" width="16" height="13" border="0" alt="Teil von"> <a href="../index.html"><b>Funktionsreferenz</b></a> <img src="../../src/refkap.gif" width="16" height="13" border="0" alt="Teil von"> <a href="index.html"><b>PDF-Funktionen</b></a></td>
</tr>
</table><table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td bgcolor="#EEEEEE" class="doc" width="110"><img src="../../src/logo.gif" width="106" height="109" border="0" alt="SEL.html"></td>
<td bgcolor="#EEEEEE" class="doc" valign="bottom" width="100%">
<h2>pdf_add_pdflink</h2>
<tr>
<td bgcolor="#EEEEEE" class="doc" valign="top" align="center">
<img src="../../src/dokx.gif" width="30" height="20" vspace="6" border="0" alt="Informationsseite">
</td>
<td bgcolor="#FFFFFF" valign="top" nowrap>
<p>
<img src="../../src/down.gif" width="14" height="10" border="0" alt="nach unten">&nbsp;<a href="#befehl"><b>Befehl</b></a><br>
<img src="../../src/down.gif" width="14" height="10" border="0" alt="nach unten">&nbsp;<a href="#version"><b>Version</b></a><br>
<img src="../../src/down.gif" width="14" height="10" border="0" alt="nach unten">&nbsp;<a href="#beschreibung"><b>Beschreibung</b></a><br>
<img src="../../src/down.gif" width="14" height="10" border="0" alt="nach unten">&nbsp;<a href="#beispiel"><b>Beispiel</b></a><br>
<img src="../../src/down.gif" width="14" height="10" border="0" alt="nach unten">&nbsp;<a href="#ausgabe"><b>Ausgabe</b></a><br>
</p>
</td>
</tr><tr><td colspan=2 bgcolor="#EEEEEE" class="doc"><a href="#bottom"><img src="../../src/down.gif" width="14" height="10" border="0" alt="nach unten"></a>&#160;</td></tr>
</table>
<h2 class="Sh2"><a class="an" name="befehl">Befehl</a></h2>
<table width="100%" cellpadding=10><tr>
<td class="xmpcode" bgcolor="#E4EEFF">void <b>pdf_add_pdflink</b>(int PDF-Dokument,
double llx, double lly, double urx, double ury, string filename, int page,
string dest)</td>
</tr></table>
<p>&nbsp;</p>
<table bgcolor="#EEEEEE" class="doc" width="100%"><tr><td>
<a href="#top"><img src="../../src/up.gif" width="14" height="10" border="0" alt="nach oben"></a><a href="#bottom"><img src="../../src/down.gif" width="14" height="10" border="0" alt="nach unten"></a>&#160;
</td></tr></table>
<h2 class="Sh2"><a class="an" name="version">Version</a></h2>
<table width="100%" cellpadding=10 height="32">
<tr>
<td class="xmpcode" bgcolor="#E4EEFF" height="20">
<p>PHP 3&gt;= 3.0.12, PHP 4</p>
</td>
</tr></table>
<p>&nbsp;</p>
<table bgcolor="#EEEEEE" class="doc" width="100%"><tr><td>
<a href="#top"><img src="../../src/up.gif" width="14" height="10" border="0" alt="nach oben"></a><a href="#bottom"><img src="../../src/down.gif" width="14" height="10" border="0" alt="nach unten"></a>&#160;
</td></tr></table>
<h2 class="Sh2"><a class="an" name="beschreibung">Beschreibung</a></h2>
<table width="100%" cellpadding=10 height="459">
<tr>
<td class="xmpcode" bgcolor="#E4EEFF" height="57">
<p>Mit pdf_add_pdflink() kann man innerhalb eines PDF-Dokuments (PDF-<br>
Dokument) einen Hyperlink auf eine andere PDF-Datei hinzuf&uuml;gen. Dabei
gibt man als<br>
Gr&ouml;&szlig;e die X-Y-Koordinaten der linken unteren Ecke (llx und
lly) und der rechten<br>
oberen Ecke (urx und ury) der Hyperlinkfl&auml;che an. Im PDF-Dokument
wird dann<br>
ein Kasten erstellt, welcher als Hyperlink auf den Dateinamen (filename)
des<br>
PDF-Dokuments verweist. Zus&auml;tzlich kann man die Seite (page) angeben,
auf<br>
welche man direkt springen m&ouml;chte. Der letzte Parameter (dest) legt
fest, auf<br>
welche Weise das Dokument angezeigt wird. Folgende Werte sind f&uuml;r
dest<br>
m&ouml;glich:<br>
fitbox - Es werden alle Objekte ohne Ber&uuml;cksichtigung des Seitenrandes<br>
ausgegeben.<br>
fitheight - Das Dokument wird &uuml;ber die ganze H&ouml;he ausgegeben.<br>
fitpage - Das Dokument wird im ganzen Fenster angezeigt.<br>
fitwidth - Anzeige des Dokuments &uuml;ber die ganze Breite.<br>
retain - Das Dokument wird im gegenw&auml;rtigen Anzeigemodus des Acrobat-<br>
Readers angezeigt.</p>
<p>Im unteren Beispiel wurde &uuml;ber den Kasten ein zus&auml;tzlicher
Text gelegt (&quot;Lade<br>
PDF-Dokument&quot;). Geht man nun mit dem Mauszeiger &uuml;ber den Kasten,
so wird<br>
der Link durch ein &quot;w&quot; mit einer Hand dargestellt. Wenn Sie
auf den Kasten<br>
klicken, wird auf die ausgew&auml;hlte Seite verzweigt.</p>
<p>Siehe auch:</p>
<ul>
<li><a href="pdf_set_border_style.html">pdf_set_border_style()</a></li>
<li><a href="pdf_set_border_color.html">pdf_set_border_color()</a></li>
<li><a href="pdf_set_border_dash.html">pdf_set_border_dash()</a></li>
<li><a href="pdf_add_weblink.html">pdf_add_weblink()</a></li>
</ul>
</td>
</tr></table>
<p>&nbsp;</p>
<table bgcolor="#EEEEEE" class="doc" width="100%"><tr><td>
<a href="#top"><img src="../../src/up.gif" width="14" height="10" border="0" alt="nach oben"></a><a href="#bottom"><img src="../../src/down.gif" width="14" height="10" border="0" alt="nach unten"></a>&#160;
</td></tr></table>
<h2 class="Sh2"><a class="an" name="beispiel">Beispiel</a></h2>
<table width="100%" cellpadding=10 height="66">
<tr>
<td class="xmpcode" bgcolor="#E4EEFF">
<pre>&lt;?PHP<br>$file = fopen(&quot;php.pdf&quot;, &quot;w&quot;); <br>$dokument = pdf_open($file);<br>pdf_begin_page($dokument,200,100); <br>pdf_set_border_style($dokument, solid,1);<br>pdf_set_font($dokument, &quot;Times-Roman&quot;, 14, &quot;winansi&quot;);<br>pdf_show_xy($dokument,&quot;zur Homepage&quot;,12,14);<br>pdf_add_pdflink($dokument,10,10,95,25,&quot;php1.pdf&quot;,1,&quot;retain&quot;);<br>pdf_end_page($dokument);<br>$dokument = pdf_close($dokument); <br>fclose($file); <br>?&gt;</pre>
<p></p>
</td>
</tr></table>
<p>&nbsp;</p>
<table bgcolor="#EEEEEE" class="doc" width="100%"><tr><td>
<a href="#top"><img src="../../src/up.gif" width="14" height="10" border="0" alt="nach oben"></a><a href="#bottom"><img src="../../src/down.gif" width="14" height="10" border="0" alt="nach unten"></a>&#160;
</td></tr></table>
<h2 class="Sh2"><a class="an" name="ausgabe">Ausgabe</a></h2>
<table width="100%" cellpadding=10 height="45">
<tr>
<td class="xmpcode" bgcolor="#E4EEFF" height="57">
<p><img src="../funktionsgrafiken/pdf_add_pdflink.gif" width="385" height="218"></p>
<p><b>Achtung:</b> Bei der Ausgabe des Befehls wird im Browser nichts<br>
zur&uuml;ckgegeben. Die obenstehende Grafik wurde im Acrobat-<br>
Reader ge&ouml;ffnet um die Wirkungsweise des Befehls zu zeigen.</p>
</td>
</tr></table>
<p>&nbsp;</p>
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr><td colspan=2 bgcolor="#EEEEEE" class="doc">
<a href="#top"><img src="../../src/up.gif" width="14" height="10" border="0" alt="nach oben"></a>
</td></tr>
<tr>
<td bgcolor="#EEEEEE" class="doc" align="right" width="110">weiter:<a href="pdf_add_weblink.html"><img src="../../src/next.gif" width="10" height="10" border="0" hspace="10" alt="weiter"></a></td>
<td bgcolor="#FFFFFF"><img src="../../src/dok.gif" width="15" height="10" border="0" alt="Seite">
<a href="pdf_add_weblink.html"><b>pdf_add_weblink</b></a> </td>
</tr>
<tr>
<td bgcolor="#EEEEEE" class="doc" align="right" width="110">zur&uuml;ck:<a href="pdf_add_outline.html"><img src="../../src/prev.gif" width="10" height="10" border="0" hspace="10" alt="zur&uuml;ck"></a></td>
<td bgcolor="#FFFFFF" width="100%"><img src="../../src/dok.gif" width="15" height="10" border="0" alt="Seite">
<a href="pdf_add_outline.html"><b>pdf_add_outline</b></a> </td>
</tr>
<tr><td colspan=2 bgcolor="#EEEEEE" class="doc">&#160;</td></tr>
</table><table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td bgcolor="#FFEEDD" class="nav"><a class="an" name="bottom"><img src="../../src/refkap.gif" width="16" height="13" border="0" alt="Teil von"></a>
<a href="../../index.html"><b>SELFPHP</b></a>/<a href="../../navigation/index.html">Navigationshilfen</a> <img src="../../src/refkap.gif" width="16" height="13" border="0" alt="Teil von">
<a href="../index.html"><b>Funktionsreferenz</b></a> <img src="../../src/refkap.gif" width="16" height="13" border="0" alt="Teil von">
<a href="index.html"><b>PDF-Funktionen</b></a></td>
</tr>
</table>
<p><a class="an" name="bottom">&copy; 2001, 2002, 2003</A> <img src="../../src/mail.gif" width="15" height="10" border="0" alt="E-Mail">&nbsp;<a href="mailto:mail@selfphp.info">Damir Enseleit, mail@selfphp.info</a></p>
</body>
</html>