2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2003-08-09 04:31:34 +00:00
|
|
|
<!-- $Revision: 1.4 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/pdf.xml, last change in rev 1.48 -->
|
|
|
|
<refentry id="function.pdf-open-memory-image">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>pdf_open_memory_image</refname>
|
|
|
|
<refpurpose>Opens an image created with PHP's image functions</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>int</type><methodname>pdf_open_memory_image</methodname>
|
2003-08-09 04:31:34 +00:00
|
|
|
<methodparam><type>resource</type><parameter>pdfdoc</parameter></methodparam>
|
|
|
|
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
|
2002-04-15 00:12:54 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
The <function>pdf_open_memory_image</function> function takes
|
2003-08-09 04:31:34 +00:00
|
|
|
an <parameter>image</parameter> created with the PHP's image
|
|
|
|
functions and makes it available for the pdf resource.
|
|
|
|
The function returns a pdf image identifier.
|
2002-04-15 00:12:54 +00:00
|
|
|
<example>
|
|
|
|
<title>Including a memory image</title>
|
2003-08-09 04:31:34 +00:00
|
|
|
<programlisting role="php">
|
2002-04-15 00:12:54 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
2003-08-09 04:31:34 +00:00
|
|
|
$im = imagecreate(100, 100);
|
|
|
|
$col = imagecolorallocate($im, 80, 45, 190);
|
|
|
|
imagefill($im, 10, 10, $col);
|
2002-04-15 00:12:54 +00:00
|
|
|
$pim = pdf_open_memory_image($pdf, $im);
|
2003-08-09 04:31:34 +00:00
|
|
|
imagedestroy($im);
|
2002-04-15 00:12:54 +00:00
|
|
|
pdf_place_image($pdf, $pim, 100, 100, 1);
|
|
|
|
pdf_close_image($pdf, $pim);
|
|
|
|
?>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
2003-08-09 04:31:34 +00:00
|
|
|
</example>
|
|
|
|
</para>
|
2002-04-15 00:12:54 +00:00
|
|
|
<para>
|
2003-08-09 04:31:34 +00:00
|
|
|
See also <function>pdf_close_image</function> and
|
|
|
|
<function>pdf_place_image</function>.
|
|
|
|
</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
|
|
|
|
-->
|