2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2005-09-09 05:15:13 +00:00
|
|
|
<!-- $Revision: 1.5 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/pdf.xml, last change in rev 1.42 -->
|
|
|
|
<refentry id="function.pdf-add-note">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>pdf_add_note</refname>
|
2003-08-09 04:31:34 +00:00
|
|
|
<refpurpose>Sets annotation for current page</refpurpose>
|
2002-04-15 00:12:54 +00:00
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
2003-08-09 04:31:34 +00:00
|
|
|
<type>bool</type><methodname>pdf_add_note</methodname>
|
|
|
|
<methodparam><type>resource</type><parameter>pdfdoc</parameter></methodparam>
|
2002-04-15 00:12:54 +00:00
|
|
|
<methodparam><type>float</type><parameter>llx</parameter></methodparam>
|
|
|
|
<methodparam><type>float</type><parameter>lly</parameter></methodparam>
|
|
|
|
<methodparam><type>float</type><parameter>urx</parameter></methodparam>
|
|
|
|
<methodparam><type>float</type><parameter>ury</parameter></methodparam>
|
|
|
|
<methodparam><type>string</type><parameter>contents</parameter></methodparam>
|
|
|
|
<methodparam><type>string</type><parameter>title</parameter></methodparam>
|
|
|
|
<methodparam><type>string</type><parameter>icon</parameter></methodparam>
|
|
|
|
<methodparam><type>int</type><parameter>open</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2003-08-09 04:31:34 +00:00
|
|
|
Sets an annotation for the current page. <parameter>icon</parameter> is one of
|
|
|
|
<literal>comment</literal>, <literal>insert</literal>, <literal>note</literal>,
|
|
|
|
<literal>paragraph</literal>, <literal>newparagraph</literal>,
|
|
|
|
<literal>key</literal>, or <literal>help</literal>. &return.success;
|
2002-04-15 00:12:54 +00:00
|
|
|
</para>
|
2005-09-09 05:15:13 +00:00
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title>Adding a note to a PDF document with PDFlib</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
$pdfdoc = pdf_new();
|
|
|
|
if (!pdf_open_file($pdfdoc, '')) {
|
|
|
|
echo 'error!';
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
pdf_begin_page($pdfdoc, 300, 300);
|
|
|
|
if ($font = pdf_findfont($pdfdoc, 'Times-Roman', 'host', 0)) {
|
|
|
|
pdf_setfont($pdfdoc, $font, 10);
|
|
|
|
}
|
|
|
|
pdf_set_value($pdfdoc, 'textrendering', 0);
|
|
|
|
pdf_add_note($pdfdoc, 100, 100, 180, 40, 'Note Content', 'Title', 'help', 0);
|
|
|
|
pdf_show_xy($pdfdoc, 'Example', 100, 100);
|
|
|
|
pdf_end_page($pdfdoc);
|
|
|
|
pdf_close($pdfdoc);
|
|
|
|
$data = pdf_get_buffer($pdfdoc);
|
|
|
|
header('Content-type: application/pdf');
|
|
|
|
header('Content-disposition: inline; filename=example.pdf');
|
|
|
|
header('Content-length: '.strlen($data));
|
|
|
|
echo $data;
|
|
|
|
?>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
2002-04-15 00:12:54 +00:00
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|